Browse Source

修改bug

master_hella_20240701
刘忱 8 months ago
parent
commit
9120cf5060
  1. 15
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  2. 17
      src/views/wms/countManage/count/countPlanMain/index.vue

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

@ -49,6 +49,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '执行周期', label: '执行周期',
field: 'crontab', field: 'crontab',
sort: 'custom', sort: 'custom',
isForm:false,
table: { table: {
width: 150 width: 150
}, },
@ -76,7 +77,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '物料选择名单', label: '物料忽略名单',
field: 'ignoreListOfItem', field: 'ignoreListOfItem',
sort: 'custom', sort: 'custom',
table: { table: {
@ -86,7 +87,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
multiple:true,//是否可以多选 multiple:true,//是否可以多选
searchListPlaceholder: '请选择物料选择名单', // 输入框占位文本 searchListPlaceholder: '请选择物料忽略名单', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
@ -226,7 +227,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'FALSE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
@ -245,6 +246,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable:false, isTable:false,
isForm: false,
form: { form: {
value: 'Count', value: 'Count',
componentProps: { componentProps: {
@ -356,6 +358,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
@ -477,12 +480,12 @@ export const CountPlanMainRules = reactive({
type: [ type: [
{ required: true, message: '请选择盘点类型', trigger: 'change' } { required: true, message: '请选择盘点类型', trigger: 'change' }
], ],
crontab: [
{ required: false, message: '请填写执行周期', trigger: ['change','blur'] },{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
ignoreListOfItem: [ ignoreListOfItem: [
{ required: true, message: '请选物料选择名单', trigger: 'change' } { required: true, message: '请选物料选择名单', trigger: 'change' }
], ],
crontab: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
isSnapshot: [ isSnapshot: [
{ required: true, message: '请选择快照盘点', trigger: 'change' } { required: true, message: '请选择快照盘点', trigger: 'change' }
], ],

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

@ -564,7 +564,24 @@ const searchFormClick = (searchData) => {
} }
// //
const selectChange = (field, val) => { const selectChange = (field, val) => {
console.log(field,val)
console.log(CountPlanMain.allSchemas.formSchema)
if (field == 'type') { 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') { if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)' CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0

Loading…
Cancel
Save