diff --git a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts index 3bd8e9fef..899b8de1d 100644 --- a/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts +++ b/src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts @@ -49,6 +49,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ label: '执行周期', field: 'crontab', sort: 'custom', + isForm:false, table: { width: 150 }, @@ -76,7 +77,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ } }, { - label: '物料选择名单', + label: '物料忽略名单', field: 'ignoreListOfItem', sort: 'custom', table: { @@ -86,7 +87,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ componentProps: { isSearchList: true, // 开启查询弹窗 multiple:true,//是否可以多选 - searchListPlaceholder: '请选择物料选择名单', // 输入框占位文本 + searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '物料信息', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 @@ -226,7 +227,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ isTable: true, form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -245,6 +246,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ width: 150 }, isTable:false, + isForm: false, form: { value: 'Count', componentProps: { @@ -356,6 +358,7 @@ export const CountPlanMain = useCrudSchemas(reactive([ dictClass: 'string', isSearch: false, isTable: false, + isForm: false, form: { component: 'Switch', value: 'TRUE', @@ -477,12 +480,12 @@ export const CountPlanMainRules = reactive({ type: [ { required: true, message: '请选择盘点类型', trigger: 'change' } ], + crontab: [ + { required: false, message: '请填写执行周期', trigger: ['change','blur'] },{ max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], ignoreListOfItem: [ { required: true, message: '请选物料选择名单', trigger: 'change' } ], - crontab: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } - ], isSnapshot: [ { required: true, message: '请选择快照盘点', trigger: 'change' } ], @@ -753,4 +756,4 @@ export const CountPlanDetailRules = reactive({ { required: true, message: '请选择盘点范围值', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], -}) \ No newline at end of file +}) diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index 68b146824..2e192447a 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -564,7 +564,24 @@ const searchFormClick = (searchData) => { } // 选择盘点类型的时候针对限值的操作 const selectChange = (field, val) => { + console.log(field,val) + console.log(CountPlanMain.allSchemas.formSchema) if (field == 'type') { + // 循环盘点 + if (val == 'CYCLE') { + CountPlanMain.allSchemas.formSchema.splice(1,0,{ + component: "Input", + componentProps: {}, + field:"crontab", + label:"执行周期", + value:"" + }) + CountPlanMainRules.crontab[0].required = true + }else{ + CountPlanMain.allSchemas.formSchema.splice(1,1) + CountPlanMainRules.crontab[0].required = false + } + if (val == 'DYNAMIC') { CountPlanMain.allSchemas.formSchema[3].label = '限值(%)' CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0