Browse Source

完善回款返利预提、核对

master
yunuo970428 4 months ago
parent
commit
467adc418e
  1. 39
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanhedui/collectionrebatecheckedAdd.vue
  2. 40
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanyuti/collectionrebatewithholdingAdd.vue

39
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanhedui/collectionrebatecheckedAdd.vue

@ -68,7 +68,7 @@
<script> <script>
import req from '@/api/manufacturerrebates/collectionrebatecheck' import req from '@/api/manufacturerrebates/collectionrebatecheck'
import { fetchBySid } from '@/api/cheliang/dictcommons' import { fetchByParNo, fetchBySid } from '@/api/cheliang/dictcommons'
import yiheduihiukuanfanli from './relation/yiheduihiukuanfanli' import yiheduihiukuanfanli from './relation/yiheduihiukuanfanli'
import heduishenpiAdd from './relation/heduishenpiAdd' import heduishenpiAdd from './relation/heduishenpiAdd'
@ -110,24 +110,6 @@ export default {
} }
}, },
methods: { methods: {
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() //
let day = date.getDate() //
if (month < 1 && day < 7) {
month = 12
year = date.getFullYear() - 1
} else if (month < 1 && day > 6) {
month = date.getMonth() + 1 //
} else if (month > 0 && day > 6) {
month = date.getMonth() + 1 //
} else if (month > 0 && day < 7) {
month = date.getMonth() //
}
this.formobj.checkApply = year + '年' + month + '月'
},
init() { init() {
fetchBySid(this.formobj.createOrgSid).then((res) => { fetchBySid(this.formobj.createOrgSid).then((res) => {
if (res.success) { if (res.success) {
@ -149,6 +131,25 @@ export default {
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1) this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
fetchByParNo({ parNo: 'CW_FLYJSRQ' }).then((res) => {
if (res.success) {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() //
let day = date.getDate() //
if (month < 1 && day < res.data) {
month = 12
year = date.getFullYear() - 1
} else if (month < 1 && day > res.data) {
month = date.getMonth() + 1 //
} else if (month > 0 && day > res.data) {
month = date.getMonth() + 1 //
} else if (month > 0 && day < res.data) {
month = date.getMonth() //
}
this.formobj.checkApply = year + '年' + month + '月'
}
})
this.viewTitle = '【新增】回款返利核对审核申请' this.viewTitle = '【新增】回款返利核对审核申请'
}, },
showEdit(row) { showEdit(row) {

40
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanyuti/collectionrebatewithholdingAdd.vue

@ -68,7 +68,7 @@
<script> <script>
import req from '@/api/manufacturerrebates/collectionrebatewithholding' import req from '@/api/manufacturerrebates/collectionrebatewithholding'
import { fetchBySid } from '@/api/cheliang/dictcommons' import { fetchByParNo, fetchBySid } from '@/api/cheliang/dictcommons'
import huikuanfanliselect from './relation/huikuanfanliselect' import huikuanfanliselect from './relation/huikuanfanliselect'
import huikuanfanliAdd from './relation/huikuanfanliAdd' import huikuanfanliAdd from './relation/huikuanfanliAdd'
@ -116,29 +116,10 @@ export default {
} }
}) })
}, },
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() //
let day = date.getDate() //
if (month < 1 && day < 7) {
month = 12
year = date.getFullYear() - 1
} else if (month < 1 && day > 6) {
month = date.getMonth() + 1 //
} else if (month > 0 && day > 6) {
month = date.getMonth() + 1 //
} else if (month > 0 && day < 7) {
month = date.getMonth() //
}
this.formobj.collectionApply = year + '年' + month + '月'
},
showAdd(createOrgSid) { showAdd(createOrgSid) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
this.init() this.init()
this.newDate()
}) })
this.formobj.createBySid = window.sessionStorage.getItem('userSid') this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.createOrgSid = createOrgSid this.formobj.createOrgSid = createOrgSid
@ -147,6 +128,25 @@ export default {
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1) this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
fetchByParNo({ parNo: 'CW_FLYJSRQ' }).then((res) => {
if (res.success) {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() //
let day = date.getDate() //
if (month < 1 && day < res.data) {
month = 12
year = date.getFullYear() - 1
} else if (month < 1 && day > res.data) {
month = date.getMonth() + 1 //
} else if (month > 0 && day > res.data) {
month = date.getMonth() + 1 //
} else if (month > 0 && day < res.data) {
month = date.getMonth() //
}
this.formobj.collectionApply = year + '年' + month + '月'
}
})
this.viewTitle = '【新增】回款返利预提申请' this.viewTitle = '【新增】回款返利预提申请'
}, },
showEdit(row) { showEdit(row) {

Loading…
Cancel
Save