| | |
| | | if (res[i].contractId === Number(that.$route.query.contractId)) { |
| | | // 当前合同信息 |
| | | that.currentContract = res[i] |
| | | // 当前合同信息 - 服务结束日期 |
| | | that.currentContract.serviceEndDate = new Date(res[i].serviceStartsDate).getTime() - 24 * 60 * 60 * 1000 |
| | | } |
| | | } |
| | | } |
| | |
| | | that.contractInvoiceList = [] |
| | | // 判断所属合同是否为空 |
| | | if (that.crud.form.contractId != null && that.crud.form.contractId !== '') { |
| | | that.currentContract = that.contractList.filter(item => item.contractId === that.crud.form.contractId)[0] || {} |
| | | // 获取发票数据 |
| | | that.getContractInvoice() |
| | | } else { |
| | | that.currentContract = {} |
| | | } |
| | | }, |
| | | // 获取发票数据 |
| | |
| | | // 所属年度变更 |
| | | changeFundBelongYear() { |
| | | const that = this |
| | | // 款项开始日期 |
| | | that.crud.form.fundBelongStart = that.crud.form.fundBelongYear + that.crud.toDate(that.currentContract.serviceStartsDate).substring(4, 10) |
| | | // 款项结束日期 |
| | | that.crud.form.fundBelongEnd = that.crud.toDate(that.currentContract.serviceEndDate).substring(4, 10) === '-12-31' |
| | | ? Number(that.crud.form.fundBelongYear) + that.crud.toDate(that.currentContract.serviceEndDate).substring(4, 10) |
| | | : (Number(that.crud.form.fundBelongYear) + 1) + that.crud.toDate(that.currentContract.serviceEndDate).substring(4, 10) |
| | | if (!that.crud.form.id) { |
| | | // 款项开始日期 |
| | | that.crud.form.fundBelongStart = that.crud.form.fundBelongYear + that.crud.toDate(that.currentContract.serviceStartsDate).substring(4, 10) |
| | | } |
| | | } |
| | | } |
| | | } |