Browse Source

校验

hella_online_20240829
wangyufei 4 months ago
parent
commit
88b734d97c
  1. 7
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  2. 1
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

7
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -128,6 +128,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// row['uom'] = val[0]['uom']
// }
if(formField == 'itemCode') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['code']))
if(itemCodes.length>0){
itemCodes = itemCodes.map(item=>(item['code']))
message.warning(`物料${itemCodes.join(',')}已经存在`)
}
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['code']))
if(val.length==0) return
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['code'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))

1
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -649,6 +649,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',

Loading…
Cancel
Save