Browse Source

添加唯一性校验、物料可以多选去掉放大镜

hella_online_20240829
wangyufei 4 months ago
parent
commit
8cfc97a9c4
  1. 26
      src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue
  2. 4
      src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts

26
src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue

@ -235,16 +235,22 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
if (type == 'tableForm') {
//
if (formField == 'itemCode') {
let newRow = {...row}
newRow[formField] = val[0][searchField]
newRow['batch'] = val[0]['batch']
newRow['itemCode'] = val[0]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['itemName'] = val[0]['itemName']
newRow['inventoryBalance'] = val[0]['qty']
newRow['fromLocationCode'] = val[0]['locationCode']
newRow['packingNumber'] = val[0]['packingNumber']
tableData.value.push(newRow)
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['batch']==item['batch']&&item1['packingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['inventoryStatus']==item['inventoryStatus']))
val.forEach(item=>{
let newRow = {...item}
newRow[formField] = item[searchField]
newRow['batch'] =item['batch']
newRow['itemCode'] =item['itemCode']
newRow['uom'] = item['uom']
newRow['itemName'] = item['itemName']
newRow['inventoryBalance'] = item['qty']
newRow['fromLocationCode'] = item['locationCode']
newRow['packingNumber'] = item['packingNumber']
newRow['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
})
} else if (formField == 'fromLocationCode') {
row[formField] = val[0][searchField]
// let params = {

4
src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/purchasereturnRequestSpareMain.data.ts

@ -735,7 +735,9 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
multiple:true,
disabled:true,
// isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',

Loading…
Cancel
Save