Browse Source

合格转隔离申请添加明细

master_hella_20240701
wangyufei 2 months ago
parent
commit
490b675447
  1. 47
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  2. 1
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

47
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -329,26 +331,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){
row['fromPackingNumber'] = val[0]['packingNumber']
row['fromContainerNumber'] = val[0]['containerNumber']
row['itemCode'] = val[0]['itemCode']
row['fromBatch'] = val[0]['batch']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
row['uom'] = val[0]['uom']
if(routeName.value == 'OktoholdRequestMain'){
row['toInventoryStatus'] = "HOLD"
}else if ( routeName.value == 'HoldtookRequestMain') {
row['toInventoryStatus'] = "OK"
}else if ( routeName.value == 'HoldtoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'OktoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'ScraptoholdRequestMain') {
row['toInventoryStatus'] = "HOLD"
}else{
row['toInventoryStatus'] = val[0]['inventoryStatus']
}
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromPackingNumber'] = item['packingNumber']
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
if(routeName.value == 'OktoholdRequestMain'){
newRow['toInventoryStatus'] = "HOLD"
}else if ( routeName.value == 'HoldtookRequestMain') {
newRow['toInventoryStatus'] = "OK"
}else if ( routeName.value == 'HoldtoscrapRequestMain') {
newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'OktoscrapRequestMain') {
newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'ScraptoholdRequestMain') {
newRow['toInventoryStatus'] = "HOLD"
}else{
newRow['toInventoryStatus'] = item['inventoryStatus']
}
tableData.value.push(newRow)
})
} else {
row[formField] = val[0][searchField]
}

1
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -545,6 +545,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',

Loading…
Cancel
Save