|
|
@ -68,7 +68,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
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 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) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
this.init() |
|
|
|
this.newDate() |
|
|
|
}) |
|
|
|
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.createOrgSid = createOrgSid |
|
|
@ -147,6 +128,25 @@ export default { |
|
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
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) |
|
|
|
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 = '【新增】回款返利预提申请' |
|
|
|
}, |
|
|
|
showEdit(row) { |
|
|
|