Browse Source

客户退货申请添加最大数量限制subReturnedQty

hella_online_20240924
yufei_wang 2 months ago
parent
commit
e1c3e9d6fe
  1. 22
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

22
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -58,7 +58,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onEnter="onEnter"
@inputNumberChange="inputNumberChange"
/>
<!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
@ -729,14 +729,30 @@ const tableSelectionDelete = (selection) => {
}
//true0
const flag = ref(false)
const inputNumberChange = (field, val,row, index) => {
if(field=='qty'){
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`)
}
}
console.log('inputNumberChange',field, val,row, index)
}
//
const submitForm = async (formType, submitData) => {
let data = {...submitData}
if(data.masterId){
data.id = data.masterId
}
let flag = true
tableData.value.forEach(item=>{
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){
flag = false
message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`)
}
})
if(!flag){
return
}
data.subList = tableData.value //
data.subList.forEach(obj => {
if(obj.qty == 0){

Loading…
Cancel
Save