Commit 35b4af4d authored by dcy's avatar dcy

特需金额为空或为0无需生成应收明细,无需做必填判断,只有金额大于0才需要必填币种、付款类型

parent 763a4c6b
...@@ -87,13 +87,21 @@ export default { ...@@ -87,13 +87,21 @@ export default {
p1.push(item) p1.push(item)
} }
}) })
specialNeedCreate(p1).then(r=>{ let p2 = p1.filter(i => Number(i.transFee) > 0)
if(r.code === 0){ if(p2.every(i => !!i.payType)){
this.$emit('update:show',false) specialNeedCreate(p1).then(r=>{
this.$emit('determine') if(r.code === 0){
this.$message.success('提交成功'); this.$emit('update:show',false)
} this.$emit('determine')
}) this.$message.success('提交成功');
}
})
}else {
let v = p2.map(i => i.advanceType);
console.log(this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS),'this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS)')
let v2 = this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(i => v.includes(i.value))
this.$modal.notifyWarning(`请选择"${ v2.map(i => i.label).join('')}"的付款类型。`)
}
}, },
}, },
watch:{ watch:{
...@@ -105,7 +113,7 @@ export default { ...@@ -105,7 +113,7 @@ export default {
orderId:this.orderId, orderId:this.orderId,
transFee:'',//预计金额 transFee:'',//预计金额
transCurrency:1,//运输费币种 transCurrency:1,//运输费币种
payType:'1' payType:''
}) })
}) })
//特需回显 //特需回显
......
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