Commit 402ade04 authored by xiangzj's avatar xiangzj

审批

parent 480791fc
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
:required="taskNode.subProcUnitId === 'base'" :required="taskNode.subProcUnitId === 'base'"
label="基地审批量" label="基地审批量"
placeholder="" placeholder=""
:disabled="isReadonly" :disabled="taskNode.subProcUnitId !== 'base'"
/> />
<van-field <van-field
v-if="isShowWarZone" v-if="isShowWarZone"
...@@ -52,16 +52,16 @@ ...@@ -52,16 +52,16 @@
:required="taskNode.subProcUnitId === 'warZone'" :required="taskNode.subProcUnitId === 'warZone'"
placeholder="" placeholder=""
error-message="" error-message=""
:disabled="isReadonly" :disabled="taskNode.subProcUnitId !== 'warZone'"
/> />
<van-field <van-field
v-if="isShowWork" v-if="isShowWork"
v-model="form.salecenterAuditQuantity" v-model="form.salecenterAuditQuantity"
required :required="taskNode.subProcUnitId === 'work'"
label="内勤审批量" label="内勤审批量"
placeholder="" placeholder=""
error-message="" error-message=""
:disabled="isReadonly" :disabled="taskNode.subProcUnitId !== 'work'"
/> />
</van-cell-group> </van-cell-group>
</div> </div>
...@@ -335,6 +335,9 @@ export default { ...@@ -335,6 +335,9 @@ export default {
} }
} }
} }
this.form.baseAuditQuantity = res.data.wantGoodsDetailList[0].baseAuditQuantity || 0
this.form.warAuditQuantity = res.data.wantGoodsDetailList[0].warAuditQuantity || 0
this.form.salecenterAuditQuantity = res.data.wantGoodsDetailList[0].salecenterAuditQuantity || 0
}) })
}, },
flowPath() { flowPath() {
...@@ -349,23 +352,41 @@ export default { ...@@ -349,23 +352,41 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
async submit(handleResult) { async submit(handleResult) {
this.conditions = { ...this.conditions, ...this.form } this.conditions = { ...this.conditions }
this.conditions.handleResult = handleResult this.conditions.handleResult = handleResult
const params = JSON.parse(JSON.stringify(this.conditions)) const params = JSON.parse(JSON.stringify(this.conditions))
params.wantGoodsDetailList[0].baseAuditQuantity = this.form.baseAuditQuantity
params.wantGoodsDetailList[0].warAuditQuantity = this.form.warAuditQuantity
params.wantGoodsDetailList[0].salecenterAuditQuantity = this.form.salecenterAuditQuantity
params.currentHandleId = this.taskNode.procUnitHandlerId params.currentHandleId = this.taskNode.procUnitHandlerId
params.currentHandleGroupId = this.taskNode.groupId params.currentHandleGroupId = this.taskNode.groupId
params.taskId = this.$route.query.taskId params.taskId = this.$route.query.taskId
if (this.isShowBase && !this.form.baseAuditQuantity) { if (this.isShowBase && this.taskNode.subProcUnitId === 'base') {
Toast('请正确填写基地审批量') if (this.form.baseAuditQuantity - 0 <= 0) {
return Toast('请正确填写基地审批量')
return
} else if (this.form.baseAuditQuantity - 0 > params.wantGoodsDetailList[0].wantQuantity - 0) {
Toast('基地审批数量不能大于本次要货数量')
return
}
} }
if (this.isShowWarZone && !this.form.warAuditQuantity) { if (this.isShowWarZone && this.taskNode.subProcUnitId === 'warZone') {
Toast('请正确填写战区审批量') if (this.form.warAuditQuantity - 0 <= 0) {
return Toast('请正确填写战区审批量')
return
} else if (this.form.warAuditQuantity - 0 > this.form.baseAuditQuantity - 0) {
Toast('战区审批数量不能大于本次要货数量')
return
}
} }
if (this.isShowWork && !this.form.salecenterAuditQuantity) { if (this.isShowWork && !this.form.salecenterAuditQuantity) {
Toast('请正确填写内勤审批量') if (this.form.salecenterAuditQuantity - 0 <= 0) {
return Toast('请正确填写内勤审批量')
return
} else if (this.form.salecenterAuditQuantity - 0 > this.form.warAuditQuantity - 0) {
Toast('销售内勤审批数量不能大于本次要货数量')
return
}
} }
if (this.conditions.id) { if (this.conditions.id) {
const toast = Toast.loading({ const toast = Toast.loading({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment