Browse Source

HL-5374盘点计划 新增时,不拆分时只能盲盘,不能明盘,应该增加校验

hella_online_20240816
张立 11 months ago
parent
commit
58d03b0918
  1. 44
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  2. 25
      src/views/wms/countManage/count/countPlanMain/index.vue

44
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -90,6 +90,25 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
// }
// }
// },
{
label: '明盘',
field: 'isOpenCount',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
sort: 'custom',
table: {
width: 150
},
},
{
label: '任务拆分方式',
field: 'countSplitType',
@ -102,7 +121,10 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:true,
isForm: true,
form: {
value: 'locationCode'
value: 'masterId',
componentProps: {
disabled:true
}
}
},
@ -211,25 +233,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '明盘',
field: 'isOpenCount',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',

25
src/views/wms/countManage/count/countPlanMain/index.vue

@ -401,6 +401,22 @@ const buttonTableClick = async (val, row) => {
}
const onChange = (field, value) => {
console.log(field, value)
if (field == 'isOpenCount') {
if (value == 'FALSE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = true
}
})
formRef.value.formRef.formModel.countSplitType = 'masterId'
} else {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = false
}
})
}
}
}
/** 添加/修改操作 */
const formRef = ref()
@ -435,6 +451,13 @@ const openForm = async (type: string, row?: any) => {
}
})
}
if (type == 'create') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'countSplitType') {
item.componentProps.disabled = true
}
})
}
formRef.value.open(type, row)
// Promise.all([getOwnerAllList(),
@ -458,7 +481,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
// getAreaAllList()
// getLocationgroupAllList()
// getLocationAllList()
detailRef.value.openDetail(row, titleName, titleValue,"planCountMain")
detailRef.value.openDetail(row, titleName, titleValue, 'planCountMain')
}
//
const detailOpenForm = (type, row) => {

Loading…
Cancel
Save