Browse Source

数量

hella_online_20240829
王宇飞 9 months ago
parent
commit
e7ec27eac3
  1. 14
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

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

@ -177,19 +177,25 @@ 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']
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

Loading…
Cancel
Save