Browse Source

数量

hella_online_20240829
wangyufei 4 months ago
parent
commit
e7ec27eac3
  1. 24
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

24
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -177,24 +177,30 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') {
//
if(formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`)
return
}
const isType = await isItemType(val[0]['itemCode'], labelType.value)
if(!isType){
message.warning('当前物料可制造与其他数据不一致,请重新选择!')
} else {
row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = val[0]['qty']
row['qty'] = Number(val[0]['qty'])
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty') {
item.tableForm.max = val[0]['qty']
}
if(item.field == 'batch') {
item.tableForm.disabled = false
}
})
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty'])
}
if(item.field == 'batch') {
item.tableForm.disabled = false
}
})
}
} else if(formField == 'workStationCode') {
val.forEach(item=>{

Loading…
Cancel
Save