Browse Source

创建标签批次校验

intex_online20241228
张立 2 months ago
parent
commit
fb70b898d1
  1. 8
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 3
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  3. 15
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  4. 13
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

8
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -629,15 +629,15 @@ const buttonTableClick = async (val, row) => {
locationCode: item.toLocationCode
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
})
if ( toManagementPrecision.value == 'BY_BATCH') {
// row['fromBatchFormItemType'] = 'FormDate'
row['disabled_batch'] = false
} else {
item['disabled_batch'] = true
} else if(toManagementPrecision.value == 'BY_QUANTITY') {
// row['fromBatchFormItemType'] = ''
row['disabled_batch'] = true
item['disabled_batch'] = false
}
})
})
} else if (val == 'mainHandle') {
//
//

3
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1728,6 +1728,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
},
tableForm: {
disabled: true,
type: 'FormDate',
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
@ -2136,7 +2137,7 @@ export const ProductreceiptRequestLabelRules = reactive({
{ required: true, message: '请选择生产线', trigger: 'change' }
],
batch: [
{ required: true, message: '请选择生产线', trigger: ['change','blur'] }
{ required: true, message: '请选择批次', trigger: ['change','blur'] }
],
})

15
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -155,6 +155,7 @@ import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as ruleApi from '@/api/wms/rule/index'
const { loadStart, loadDone } = usePageLoading()
//
//
@ -381,6 +382,7 @@ const butttondata = (row,$index) => {
// -
const toManagementPrecision = ref('')
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
@ -505,6 +507,19 @@ const buttonTableClick = async (val, row) => {
return
}
})
ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
locationCode: item.toLocationCode
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
if ( toManagementPrecision.value == 'BY_BATCH') {
// row['fromBatchFormItemType'] = 'FormDate'
item['disabled_batch'] = true
} else if(toManagementPrecision.value == 'BY_QUANTITY') {
// row['fromBatchFormItemType'] = ''
item['disabled_batch'] = false
}
})
})
} else if (val == 'mainHandle') { //

13
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -1732,8 +1732,12 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled:true
}
disabled: true,
type:'FormDate',
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
},
},
{
label: '数量',
@ -2090,6 +2094,9 @@ export const ProductreceiptRequestLabelRules = reactive({
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
]
],
batch: [
{ required: true, message: '请选择批次', trigger: ['change', 'blur'] }
],
})

Loading…
Cancel
Save