编辑界面
parent
c45ba9346f
commit
527107f0f3
|
@ -51,6 +51,10 @@ public class ProcurementDetail {
|
||||||
|
|
||||||
// 已采购数量
|
// 已采购数量
|
||||||
private BigDecimal amountAlready = BigDecimal.ZERO;
|
private BigDecimal amountAlready = BigDecimal.ZERO;
|
||||||
|
private BigDecimal amountCurrent;
|
||||||
|
|
||||||
|
// 未采购数量
|
||||||
|
private BigDecimal amountLeft;
|
||||||
|
|
||||||
private List<BudgetPurchaseDetail> purchaseDetails;
|
private List<BudgetPurchaseDetail> purchaseDetails;
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,10 @@ public class ProjectProcessService {
|
||||||
detail.setPurchaseDetails(purchaseDetails);
|
detail.setPurchaseDetails(purchaseDetails);
|
||||||
detail.setBudgetCostId(costDetail.getId());
|
detail.setBudgetCostId(costDetail.getId());
|
||||||
detail.setCategory(getCategory(costDetail));
|
detail.setCategory(getCategory(costDetail));
|
||||||
|
detail.setAmountLeft(amount.getAmountLeft());
|
||||||
detail.setAmountAlready(amount.getAmountAlready());
|
detail.setAmountAlready(amount.getAmountAlready());
|
||||||
|
detail.setAmountCurrent(amount.getAmountCurrent());
|
||||||
|
ret.add(detail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#newBusinessProcurementContractProcess {
|
#procurementContractProcess {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,11 +76,9 @@
|
||||||
<span>{{processForm.projectNo}}</span>
|
<span>{{processForm.projectNo}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-tooltip :disabled="!projectSelected" effect="light" :content="projectTitle" placement="top-start">
|
<el-form-item label="项目标题">
|
||||||
<el-form-item label="项目标题">
|
<span>{{processForm.projectTitle}}</span>
|
||||||
<span>{{projectTitle}}</span>
|
</el-form-item>
|
||||||
</el-form-item>
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<el-form-item label="申请时间">
|
<el-form-item label="申请时间">
|
||||||
<span>{{processForm.applyDate}}</span>
|
<span>{{processForm.applyDate}}</span>
|
||||||
|
@ -108,7 +106,14 @@
|
||||||
|
|
||||||
<el-form-item label="申请部门" :rules="[{ required: true, message: '申请部门不能为空'}]" prop="applyDeptId">
|
<el-form-item label="申请部门" :rules="[{ required: true, message: '申请部门不能为空'}]" prop="applyDeptId">
|
||||||
<el-cascader :options="applyDeptSectorOptions" clearable v-model="processForm.applyDeptId"
|
<el-cascader :options="applyDeptSectorOptions" clearable v-model="processForm.applyDeptId"
|
||||||
:props="{ expandTrigger: 'hover', label:'name', value: 'id'}" @change="applyDeptSelected"></el-cascader>
|
:props="{ expandTrigger: 'hover', label:'name', value: 'id'}" @change="applyDeptSelected">
|
||||||
|
|
||||||
|
<template slot-scope="{ node, data }">
|
||||||
|
<span>{{ data.name }}</span>
|
||||||
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="申请人">
|
<el-form-item label="申请人">
|
||||||
|
@ -460,19 +465,20 @@
|
||||||
<script src="${base}/element-ui/element-ui.js"></script>
|
<script src="${base}/element-ui/element-ui.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const newBusinessProcurementContractProcess = "newBusinessProcurementContractProcess"
|
|
||||||
const procurementContractDetail = "procurementContractDetail"
|
const procurementContractDetail = "procurementContractDetail"
|
||||||
|
const procurementContractProcess = "procurementContractProcess"
|
||||||
|
|
||||||
const saleContractProcess = "saleContractProcess"
|
const saleContractProcess = "saleContractProcess"
|
||||||
const saleContractDetail = "saleContractDetail"
|
const saleContractDetail = "saleContractDetail"
|
||||||
const BUTTON = "btn"
|
const BUTTON = "btn"
|
||||||
|
|
||||||
|
const saleContract = "sale_contract"
|
||||||
|
const procurementContract = "procurement_contract"
|
||||||
|
|
||||||
const procurementDetailProperties = [
|
const procurementDetailProperties = [
|
||||||
"spec",
|
"spec",
|
||||||
"amount",
|
"amount",
|
||||||
"purchaseList",
|
"purchaseList",
|
||||||
"amountAlready",
|
|
||||||
"amountCurrent",
|
"amountCurrent",
|
||||||
"supplierName",
|
"supplierName",
|
||||||
"totalTaxInclude",
|
"totalTaxInclude",
|
||||||
|
@ -482,7 +488,14 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
const isEmpty = (obj) => {
|
const isEmpty = (obj) => {
|
||||||
return !obj || (obj.length && obj.length === 0)
|
if (!obj) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.hasOwnProperty('length')) {
|
||||||
|
return obj.length === 0
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const isNotEmpty = (obj) => {
|
const isNotEmpty = (obj) => {
|
||||||
|
@ -502,6 +515,7 @@
|
||||||
mode: "btn", // btn
|
mode: "btn", // btn
|
||||||
processForm: {
|
processForm: {
|
||||||
sealTypes: [],
|
sealTypes: [],
|
||||||
|
applyDeptId: []
|
||||||
},
|
},
|
||||||
processType: '',
|
processType: '',
|
||||||
projectSelected: false,
|
projectSelected: false,
|
||||||
|
@ -544,6 +558,12 @@
|
||||||
})
|
})
|
||||||
console.log(emptyRows)
|
console.log(emptyRows)
|
||||||
if (isNotEmpty(emptyRows)) {
|
if (isNotEmpty(emptyRows)) {
|
||||||
|
this.procurementDetails.filter(detail => {
|
||||||
|
const properties = procurementDetailProperties.filter(property => isBlank(detail[property]))
|
||||||
|
console.log(properties)
|
||||||
|
return isNotEmpty(properties)
|
||||||
|
})
|
||||||
|
|
||||||
const row = emptyRows[0]
|
const row = emptyRows[0]
|
||||||
this.$message.error("合同清单明细 费用项目为:'" + row.feeType + "' 采购类别为:'" + row.category + "' 的数据未填写")
|
this.$message.error("合同清单明细 费用项目为:'" + row.feeType + "' 采购类别为:'" + row.category + "' 的数据未填写")
|
||||||
return false
|
return false
|
||||||
|
@ -671,7 +691,7 @@
|
||||||
this.changeMode(saleContractProcess)
|
this.changeMode(saleContractProcess)
|
||||||
}
|
}
|
||||||
else if (process.processType === 'procurement_contract') {
|
else if (process.processType === 'procurement_contract') {
|
||||||
this.changeMode(newBusinessProcurementContractProcess)
|
this.changeMode(procurementContractProcess)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -921,18 +941,12 @@
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data,
|
data,
|
||||||
computed: {
|
computed: {
|
||||||
projectTitle() {
|
|
||||||
const { projectNo, projectName, applyPersonName, applyDate } = this.processForm
|
|
||||||
if (projectNo && projectName) {
|
|
||||||
return projectNo.trim() + "-" + projectName.trim() + "-" + applyPersonName + "-" + applyDate
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
},
|
|
||||||
isButtonMode() {
|
isButtonMode() {
|
||||||
return this.mode === BUTTON
|
return this.mode === BUTTON
|
||||||
},
|
},
|
||||||
isProcurementContractMode() {
|
isProcurementContractMode() {
|
||||||
return this.mode === newBusinessProcurementContractProcess
|
return this.mode === procurementContractProcess
|
||||||
|
|
||||||
},
|
},
|
||||||
isProcurementContractDetailMode() {
|
isProcurementContractDetailMode() {
|
||||||
return this.mode === procurementContractDetail
|
return this.mode === procurementContractDetail
|
||||||
|
@ -953,7 +967,7 @@
|
||||||
return "编辑销售合同清单明细"
|
return "编辑销售合同清单明细"
|
||||||
case procurementContractDetail:
|
case procurementContractDetail:
|
||||||
return "编辑业务采购合同清单明细"
|
return "编辑业务采购合同清单明细"
|
||||||
case newBusinessProcurementContractProcess:
|
case procurementContractProcess:
|
||||||
return "编辑业务采购合同流程"
|
return "编辑业务采购合同流程"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -964,7 +978,9 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
const processId = ${processId}
|
const processId = ${processId}
|
||||||
this.loadProject(processId)
|
this.loadProject(processId)
|
||||||
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}').map(option => ({
|
||||||
|
...option, label: option.name, value: option.id
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue