From 61a499ce9ba017afbf2a2520171eb1b48d73f733 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 29 Dec 2023 17:01:55 +0800 Subject: [PATCH] bug --- .../itemManage/bom/bom.data.ts | 2 + .../itemManage/itembasic/itembasic.data.ts | 6 + .../strategy/batchStrategy/AddForm.vue | 10 + .../supplierdeliverRequestMain/index.vue | 1055 +++++++++-------- 4 files changed, 583 insertions(+), 490 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts index 8ef4fdabc..791640a6c 100644 --- a/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts +++ b/src/views/wms/basicDataManage/itemManage/bom/bom.data.ts @@ -262,9 +262,11 @@ export const BomRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, ], version: [ + { required: true, message: '请输入版本', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], layer: [ + { required: true, message: '请输入层级', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], remark: [ diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index ddf7bb6d9..2edc82652 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -439,6 +439,12 @@ export const rules = reactive({ name: [ { required: true, message: '请输入名称', trigger: 'blur' } ], + desc1: [ + { required: true, message: '请输入描述1', trigger: 'blur' } + ], + desc2: [ + { required: true, message: '请输入描述2', trigger: 'blur' } + ], status: [ { required: true, message: '请选择状态', trigger: 'change' } ], diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue index 8cfbac120..b75b1e6cb 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue @@ -264,6 +264,7 @@ import * as RuleApi from '@/api/wms/rule' import { isString } from '@/utils/is' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' +import { json } from 'stream/consumers' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -450,6 +451,10 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 提交表单 */ const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调 +const hasSameData = (array)=>{ + const set = new Set(array.map(JSON.stringify)) + return set.size !== array.length +} const submitForm = async () => { // 校验表单 inputBlur() @@ -460,6 +465,10 @@ const submitForm = async () => { message.error('优先级不可以为0') return } + if (hasSameData( formData.value.configuration.ManagementPrecision)) { + message.error('规则配置数据重复,请重新填写') + return; + } // 提交请求 formLoading.value = true try { @@ -480,6 +489,7 @@ const submitForm = async () => { Value:str } }) + let data = { id: formData.value.id, strategyCode: formData.value.strategyCode, //策略代码 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index a83bec284..800143343 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -1,58 +1,96 @@