Browse Source

唯一性

hella_online_20240829
wangyufei 4 months ago
parent
commit
1e4c2ac1c1
  1. 7
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  2. 7
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  3. 3
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

7
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

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

7
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -132,6 +132,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'containerNumber') { if(formField == 'containerNumber') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['containerNumber']==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['containerNumber']==item['code']))
if(val.length==0) return
val.forEach(item=>{ val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['code'] newRow['containerNumber'] = item['code']

3
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -359,7 +359,8 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
tableForm:{ tableForm:{
multiple:true, multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: false, // 开启查询弹窗
disabled: true,
searchListPlaceholder: '请选择器具号', searchListPlaceholder: '请选择器具号',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '器具信息', searchTitle: '器具信息',

Loading…
Cancel
Save