Browse Source

单据设置管理修改

master
李胜楠 1 year ago
parent
commit
53ac80b293
  1. 17
      src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts
  2. 26
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  3. 27
      src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts
  4. 26
      src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue
  5. 26
      src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue
  6. 6
      src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts
  7. 26
      src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue
  8. 6
      src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts
  9. 26
      src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue
  10. 6
      src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts
  11. 26
      src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue
  12. 9
      src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts

17
src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts

@ -309,10 +309,15 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const BusinesstypeRules = reactive({ export const BusinesstypeRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
name: [ 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: [ itemTypes: [
{ required: true, message: '请选择可用物品类型范围', trigger: 'change' } { required: true, message: '请选择可用物品类型范围', trigger: 'change' }
@ -327,6 +332,12 @@ export const BusinesstypeRules = reactive({
{ required: true, message: '请输入入库事务类型', trigger: 'blur' } { required: true, message: '请输入入库事务类型', trigger: 'blur' }
], ],
useOnTheWay: [ 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' }
], ],
}) })

26
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="BusinesstypeRules" :rules="BusinesstypeRules"
:formAllSchemas="Businesstype.allSchemas" :formAllSchemas="Businesstype.allSchemas"
:apiUpdate="BusinesstypeApi.updateBusinesstype" :apiUpdate="BusinesstypeApi.updateBusinesstype"
@ -146,6 +146,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {

27
src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts

@ -215,27 +215,42 @@ export const Documentsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const DocumentsettingRules = reactive({ export const DocumentsettingRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
name: [ 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: [ type: [
{ required: true, message: '请选择单据类型', trigger: 'change' } { required: true, message: '请选择单据类型', trigger: 'change' }
], ],
businessType: [ businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' } { required: true, message: '请输入业务类型', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
numberPrefix: [ numberPrefix: [
{ required: true, message: '请输入号码前缀', trigger: 'blur' } { required: true, message: '请输入号码前缀', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
dateFormat: [ dateFormat: [
{ required: true, message: '请输入号码时间格式', trigger: 'blur' } { required: true, message: '请输入号码时间格式', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
serialLength: [ serialLength: [
{ required: true, message: '请输入号码流水长度', trigger: 'blur' } { required: true, message: '请输入号码流水长度', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
resetPeriod: [ resetPeriod: [
{ required: true, message: '请选择流水重置周期', trigger: 'change' } { required: true, message: '请选择流水重置周期', trigger: 'change' }
], ],
separatorStr: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })

26
src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="DocumentsettingRules" :rules="DocumentsettingRules"
:formAllSchemas="Documentsetting.allSchemas" :formAllSchemas="Documentsetting.allSchemas"
:apiUpdate="DocumentsettingApi.updateDocumentsetting" :apiUpdate="DocumentsettingApi.updateDocumentsetting"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

26
src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="JobsettingRules" :rules="JobsettingRules"
:formAllSchemas="Jobsetting.allSchemas" :formAllSchemas="Jobsetting.allSchemas"
:apiUpdate="JobsettingApi.updateJobsetting" :apiUpdate="JobsettingApi.updateJobsetting"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

6
src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts

@ -359,7 +359,8 @@ export const Jobsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const JobsettingRules = reactive({ export const JobsettingRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
validMinutes: [ validMinutes: [
{ required: true, message: '请输入有效分钟', trigger: 'blur' } { required: true, message: '请输入有效分钟', trigger: 'blur' }
@ -394,4 +395,7 @@ export const JobsettingRules = reactive({
allowModifyPackingNumber: [ allowModifyPackingNumber: [
{ required: true, message: '请选择是否允许修改包装号', trigger: 'change' } { required: true, message: '请选择是否允许修改包装号', trigger: 'change' }
], ],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })

26
src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="RecordsettingRules" :rules="RecordsettingRules"
:formAllSchemas="Recordsetting.allSchemas" :formAllSchemas="Recordsetting.allSchemas"
:apiUpdate="RecordsettingApi.updateRecordsetting" :apiUpdate="RecordsettingApi.updateRecordsetting"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

6
src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts

@ -148,9 +148,13 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const RecordsettingRules = reactive({ export const RecordsettingRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
interfaceType: [ interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' } { required: true, message: '请选择接口类型', trigger: 'change' }
], ],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })

26
src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="RequestsettingRules" :rules="RequestsettingRules"
:formAllSchemas="Requestsetting.allSchemas" :formAllSchemas="Requestsetting.allSchemas"
:apiUpdate="RequestsettingApi.updateRequestsetting" :apiUpdate="RequestsettingApi.updateRequestsetting"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

6
src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts

@ -225,7 +225,8 @@ export const Requestsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const RequestsettingRules = reactive({ export const RequestsettingRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
requestMode: [ requestMode: [
{ required: true, message: '请选择申请模式', trigger: 'change' } { required: true, message: '请选择申请模式', trigger: 'change' }
@ -242,4 +243,7 @@ export const RequestsettingRules = reactive({
directCreateRecord: [ directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
], ],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })

26
src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue

@ -41,7 +41,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="TransactiontypeRules" :rules="TransactiontypeRules"
:formAllSchemas="Transactiontype.allSchemas" :formAllSchemas="Transactiontype.allSchemas"
:apiUpdate="TransactiontypeApi.updateTransactiontype" :apiUpdate="TransactiontypeApi.updateTransactiontype"
@ -144,6 +144,30 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

9
src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts

@ -203,10 +203,12 @@ export const Transactiontype = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const TransactiontypeRules = reactive({ export const TransactiontypeRules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
name: [ name: [
{ required: true, message: '请输入名称', trigger: 'blur' } { required: true, message: '请输入名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
inventoryAction: [ inventoryAction: [
{ required: true, message: '请选择库存动作', trigger: 'change' } { required: true, message: '请选择库存动作', trigger: 'change' }
@ -214,4 +216,7 @@ export const TransactiontypeRules = reactive({
allowNegative: [ allowNegative: [
{ required: true, message: '请选择允许复数', trigger: 'change' } { required: true, message: '请选择允许复数', trigger: 'change' }
], ],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })
Loading…
Cancel
Save