diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts index bb06b1725..6302db632 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts @@ -309,10 +309,15 @@ export const Businesstype = useCrudSchemas(reactive([ //表单校验 export const BusinesstypeRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], name: [ - { required: true, message: '请输入名称', trigger: 'blur' } + { required: true, message: '请输入名称', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + description: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], itemTypes: [ { required: true, message: '请选择可用物品类型范围', trigger: 'change' } @@ -327,6 +332,12 @@ export const BusinesstypeRules = reactive({ { required: true, message: '请输入入库事务类型', trigger: 'blur' } ], useOnTheWay: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入使用在途库', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + onTheWayArea: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], }) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue index e26a8d5cf..216f652ff 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Businesstype.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await BusinesstypeApi.createBusinesstype(data) + message.success(t('common.createSuccess')) + } else { + await BusinesstypeApi.updateBusinesstype(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { diff --git a/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts index 52d4814ee..ee753a94b 100644 --- a/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts @@ -215,27 +215,42 @@ export const Documentsetting = useCrudSchemas(reactive([ //表单校验 export const DocumentsettingRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], name: [ - { required: true, message: '请输入名称', trigger: 'blur' } + { required: true, message: '请输入名称', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + description: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], type: [ { required: true, message: '请选择单据类型', trigger: 'change' } ], businessType: [ - { required: true, message: '请输入业务类型', trigger: 'blur' } + { required: true, message: '请输入业务类型', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], numberPrefix: [ - { required: true, message: '请输入号码前缀', trigger: 'blur' } + { required: true, message: '请输入号码前缀', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], dateFormat: [ - { required: true, message: '请输入号码时间格式', trigger: 'blur' } + { required: true, message: '请输入号码时间格式', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], serialLength: [ - { required: true, message: '请输入号码流水长度', trigger: 'blur' } + { required: true, message: '请输入号码流水长度', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], resetPeriod: [ { required: true, message: '请选择流水重置周期', trigger: 'change' } ], + separatorStr: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], }) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue index 3fcdcf703..de8e1276a 100644 --- a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Documentsetting.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await DocumentsettingApi.createDocumentsetting(data) + message.success(t('common.createSuccess')) + } else { + await DocumentsettingApi.updateDocumentsetting(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue index f0ffb816d..e0ae87843 100644 --- a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Jobsetting.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await JobsettingApi.createJobsetting(data) + message.success(t('common.createSuccess')) + } else { + await JobsettingApi.updateJobsetting(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts index e99abb2dc..0429f197c 100644 --- a/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts @@ -359,7 +359,8 @@ export const Jobsetting = useCrudSchemas(reactive([ //表单校验 export const JobsettingRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], validMinutes: [ { required: true, message: '请输入有效分钟', trigger: 'blur' } @@ -394,4 +395,7 @@ export const JobsettingRules = reactive({ allowModifyPackingNumber: [ { required: true, message: '请选择是否允许修改包装号', trigger: 'change' } ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], }) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue index 5e59a6cb8..b27655030 100644 --- a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Recordsetting.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await RecordsettingApi.createRecordsetting(data) + message.success(t('common.createSuccess')) + } else { + await RecordsettingApi.updateRecordsetting(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts index 9445110ed..e84e79833 100644 --- a/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts @@ -148,9 +148,13 @@ export const Recordsetting = useCrudSchemas(reactive([ //表单校验 export const RecordsettingRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], interfaceType: [ { required: true, message: '请选择接口类型', trigger: 'change' } ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], }) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue index b4363d4d9..73da59e61 100644 --- a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Requestsetting.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await RequestsettingApi.createRequestsetting(data) + message.success(t('common.createSuccess')) + } else { + await RequestsettingApi.updateRequestsetting(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts index 31dafae08..3661babae 100644 --- a/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts @@ -225,7 +225,8 @@ export const Requestsetting = useCrudSchemas(reactive([ //表单校验 export const RequestsettingRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], requestMode: [ { required: true, message: '请选择申请模式', trigger: 'change' } @@ -242,4 +243,7 @@ export const RequestsettingRules = reactive({ directCreateRecord: [ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], }) \ No newline at end of file diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue index 63850ca38..7aa6b6fd0 100644 --- a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue @@ -41,7 +41,7 @@ { basicFormRef.value.open(type, row) } +// form表单提交 +const formsSuccess = async (formType,data) => { + var isHave =Transactiontype.allSchemas.formSchema.some(function (item) { + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; + } + } + if(data.activeTime==0)data.activeTime = null; + if(data.expireTime==0)data.expireTime = null; + if (formType === 'create') { + await TransactiontypeApi.createTransactiontype(data) + message.success(t('common.createSuccess')) + } else { + await TransactiontypeApi.updateTransactiontype(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.dialogVisible = false + getList() +} + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts b/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts index 1875725b4..89c6c0bc3 100644 --- a/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts @@ -203,10 +203,12 @@ export const Transactiontype = useCrudSchemas(reactive([ //表单校验 export const TransactiontypeRules = reactive({ code: [ - { required: true, message: '请输入代码', trigger: 'blur' } + { required: true, message: '请输入代码', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], name: [ - { required: true, message: '请输入名称', trigger: 'blur' } + { required: true, message: '请输入名称', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], inventoryAction: [ { required: true, message: '请选择库存动作', trigger: 'change' } @@ -214,4 +216,7 @@ export const TransactiontypeRules = reactive({ allowNegative: [ { required: true, message: '请选择允许复数', trigger: 'change' } ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], }) \ No newline at end of file