采购合同合同金额 联动
parent
7932299cb3
commit
d6f62e53ce
|
@ -687,6 +687,15 @@
|
||||||
* 保存 业务采购合同清单明细,返回上一级的表单界面
|
* 保存 业务采购合同清单明细,返回上一级的表单界面
|
||||||
*/
|
*/
|
||||||
saveProcurementContractDetail() {
|
saveProcurementContractDetail() {
|
||||||
|
let contractAmount = 0
|
||||||
|
for (let element of this.procurementDetails) {
|
||||||
|
const children = element['children'] || []
|
||||||
|
contractAmount += element['totalTaxInclude'] || 0
|
||||||
|
for (let child of children) {
|
||||||
|
contractAmount += child['totalTaxInclude'] || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.contractAmount = contractAmount
|
||||||
this.goToProcurementContract()
|
this.goToProcurementContract()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -836,6 +845,7 @@
|
||||||
}
|
}
|
||||||
ret.push(parent)
|
ret.push(parent)
|
||||||
}
|
}
|
||||||
|
console.log(ret)
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1298,24 +1308,6 @@
|
||||||
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
|
||||||
// 每当 question 改变时,这个函数就会执行
|
|
||||||
procurementDetails(newValue, oldValue) {
|
|
||||||
if (this.processType === procurementContract) {
|
|
||||||
let contractAmount = 0
|
|
||||||
for (let element of newValue) {
|
|
||||||
const children = element['children'] || []
|
|
||||||
contractAmount = newValue['totalTaxInclude'] || 0
|
|
||||||
for (let child of children) {
|
|
||||||
contractAmount = contractAmount + child['contractAmount'] || 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.contractAmount = contractAmount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
filters: {
|
filters: {
|
||||||
ellipsis(value, limit = 40) {
|
ellipsis(value, limit = 40) {
|
||||||
if (!value) return ''
|
if (!value) return ''
|
||||||
|
|
|
@ -255,7 +255,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="合同金额">
|
<el-form-item label="合同金额">
|
||||||
<span v-if="projectSelected">{{processForm.contractAmount}}元</span>
|
<span v-if="projectSelected">{{processForm.contractAmount|numberFormat}}元</span>
|
||||||
<span v-else>未选择项目</span>
|
<span v-else>未选择项目</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -834,10 +834,20 @@
|
||||||
* 保存 业务采购合同清单明细
|
* 保存 业务采购合同清单明细
|
||||||
*/
|
*/
|
||||||
saveProcurementContractDetail() {
|
saveProcurementContractDetail() {
|
||||||
|
let contractAmount = 0
|
||||||
|
for (let element of this.procurementDetails) {
|
||||||
|
const children = element['children'] || []
|
||||||
|
contractAmount += element['totalTaxInclude'] || 0
|
||||||
|
for (let child of children) {
|
||||||
|
contractAmount += child['totalTaxInclude'] || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.processForm['contractAmount'] = contractAmount
|
||||||
this.changeMode(procurementContractProcess)
|
this.changeMode(procurementContractProcess)
|
||||||
this.processType = procurementContract
|
this.processType = procurementContract
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
goToContractDetail() {
|
goToContractDetail() {
|
||||||
const { projectId } = this.processForm
|
const { projectId } = this.processForm
|
||||||
if (projectId) {
|
if (projectId) {
|
||||||
|
@ -1475,23 +1485,6 @@
|
||||||
// this.handleSelectProject({ id: 135 })
|
// this.handleSelectProject({ id: 135 })
|
||||||
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// 每当 question 改变时,这个函数就会执行
|
|
||||||
procurementDetails(newValue, oldValue) {
|
|
||||||
if (this.processType === procurementContract) {
|
|
||||||
let contractAmount = 0
|
|
||||||
for (let element of newValue) {
|
|
||||||
const children = element['children'] || []
|
|
||||||
contractAmount = newValue['totalTaxInclude'] || 0
|
|
||||||
for (let child of children) {
|
|
||||||
contractAmount = contractAmount + child['contractAmount'] || 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.processForm['contractAmount'] = contractAmount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
filters: {
|
filters: {
|
||||||
ellipsis(value, limit = 40) {
|
ellipsis(value, limit = 40) {
|
||||||
|
|
Loading…
Reference in New Issue