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({
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' }
],
})

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

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

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

@ -215,27 +215,42 @@ export const Documentsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
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' }
],
})

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

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

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

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

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

@ -359,7 +359,8 @@ export const Jobsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
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' }
],
})

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

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

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

@ -148,9 +148,13 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
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' }
],
})

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

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

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

@ -225,7 +225,8 @@ export const Requestsetting = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
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' }
],
})

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

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

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

@ -203,10 +203,12 @@ export const Transactiontype = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
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' }
],
})
Loading…
Cancel
Save