Browse Source

修改入库数量判断

dev
long 2 years ago
parent
commit
799f362480
  1. 12
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue

12
src/views/activiti/form/ProcessMaterialWarehousingForm.vue

@ -135,11 +135,12 @@
</a-form-item>
</div>
<a-form-item v-if="isPlanType" :wrapperCol="{ span: 24 }" style="text-align: center">
<span v-if="quantityChange">
<a-button type="primary" @click="handleSubmit">保存</a-button>
<a-button style="margin-left: 8px" type="primary" @click="saveAndpassTask">通过</a-button>
<!-- <a-button type="primary" @click="ewrold">下载</a-button>-->
<a-button style="margin-left: 8px" @click="backTask">驳回</a-button>
</span>
</a-form-item>
</div>
</a-spin>
@ -211,6 +212,7 @@
isGetOneAndLast:false,
isIfDirect:false,
isIfInspection: false,
quantityChange: true,
refKeys: ['processMaterialWarehousingList'],
tableKeys: ['processMaterialWarehousingList'],
activeKey: 'processMaterialWarehousingList',
@ -493,10 +495,10 @@
]
if(this.planQuantity-this.warehousingQuantity-record.row.materialQuantity<0){
this.$message.error('入库数量不能大于采购数量')
this.isGetOneAndLast=false;
this.quantityChange=false;
return;
}else {
this.isGetOneAndLast=true;
this.quantityChange=true;
}
console.log(record.row.materialQuantity,"----------++++");
this.$refs.processMaterialWarehousingList.setValues(values)
@ -637,11 +639,12 @@
if (formData.processMaterialWarehousingListList[i].materialPrice*formData.processMaterialWarehousingListList[i].materialQuantity!=formData.processMaterialWarehousingListList[i].materialAmount){
this.$message.error('请检查入库数量');
return;
}else if (e==true){
this.passTask()
}
}
formData.describes = this.describes
console.log('格式化后的数据', formData)
this.form.validateFields((err, values) => {
if (!err) {
formData.procDefId = this.processData.id
@ -780,7 +783,6 @@
this.processUdgetPlanIds = ids.join(',')
},
saveAndpassTask() {
this.passTask()
this.handleSubmit(true);
},
validateError(msg) {

Loading…
Cancel
Save