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 (type == 'tableForm') {
// //
if(formField == 'itemCode') { 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) const isType = await isItemType(val[0]['itemCode'], labelType.value)
if(!isType){ if(!isType){
message.warning('当前物料可制造与其他数据不一致,请重新选择!') message.warning('当前物料可制造与其他数据不一致,请重新选择!')
} else { } else {
row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch'] row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch']
row['itemCode'] = val[0]['itemCode'] row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = val[0]['qty'] row['qty'] = Number(val[0]['qty'])
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'qty') { if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = val[0]['qty'] item.tableForm.max = Number(val[0]['qty'])
} }
if(item.field == 'batch') { if(item.field == 'batch') {
item.tableForm.disabled = false item.tableForm.disabled = false
} }
}) })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
val.forEach(item=>{ val.forEach(item=>{

Loading…
Cancel
Save