From 3b9f77437b3d4e9b54166e5f08e169522577b6fc Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 14 Dec 2023 10:24:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=96=E7=95=A5=E4=BC=98=E5=85=88=E7=BA=A7?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA0=EF=BC=8C=E4=B8=BA0=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E4=B8=8D=E8=AE=A9=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arrivalInspectionStrategy/AddForm.vue | 52 ++- .../strategy/batchStrategy/AddForm.vue | 53 ++- .../strategy/downShelfStrategy/AddForm.vue | 53 ++- .../strategy/inspectStrategy/AddForm.vue | 53 ++- .../manageAccuracyStrategy/AddForm.vue | 54 ++- .../purchaseReceiptStrategy/AddForm.vue | 53 ++- .../repairMaterialStrategy/AddForm.vue | 51 ++- .../storageCapacityStrategy/AddForm.vue | 52 ++- .../supplieDeliveryStrategy/AddForm.vue | 361 ++++++++++++------ .../supplieDeliveryStrategy/index.vue | 2 +- .../strategy/upShelfStrategy/AddForm.vue | 55 ++- .../utensilCapacityStrategy/AddForm.vue | 51 ++- .../warehouseStorageStrategy/AddForm.vue | 52 ++- 13 files changed, 645 insertions(+), 297 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue index f2d9086a7..3387408a9 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue @@ -229,6 +229,22 @@ const options = reactive({ { value: 3, label: '供应商3' } ] }) +// 弹窗按钮 +const Butttondata = ref([ + defaultButtons.formSaveBtn(null), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 +]) +// 按钮事件 +const buttonBaseClick = (val, item) => { + // 保存 + if (val == 'save') { + submitForm() + } + // 关闭 + else if (val == 'close') { + dialogVisible.value = false + } +} // 获取供应商列表的参数 const querySupplierParams = ref({ type: '' @@ -265,6 +281,16 @@ const open = async (type: string, strategyCode: string, id?: number) => { formData.value.description = data.description formData.value.priority = data.priority formData.value.status = data.status == 0 ? true : false + if (formData.value.priority == 0) { + Butttondata.value = [ + defaultButtons.formCloseBtn(null) // 关闭 + ] + } else { + Butttondata.value = [ + defaultButtons.formSaveBtn(null), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 + ] + } if (data.condition) { formData.value.condition = JSON.parse(data.condition) } @@ -277,6 +303,11 @@ const open = async (type: string, strategyCode: string, id?: number) => { } finally { formLoading.value = false } + }else { + Butttondata.value = [ + defaultButtons.formSaveBtn(null), // 保存 + defaultButtons.formCloseBtn(null) // 关闭 + ] } } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -288,6 +319,10 @@ const submitForm = async () => { if (!formRef) return const valid = await formRef.value.validate() if (!valid) return + if(formData.value.priority == 0){ + message.error('优先级不可以为0') + return + } let list = Object.values(formData.value.configuration) let onlyOne = list.filter((item) => { return item == 'TRUE' @@ -350,22 +385,7 @@ const resetForm = () => { } } -// 弹窗按钮 -const Butttondata = [ - defaultButtons.formSaveBtn(null), // 保存 - defaultButtons.formCloseBtn(null) // 关闭 -] -// 按钮事件 -const buttonBaseClick = (val, item) => { - // 保存 - if (val == 'save') { - submitForm() - } - // 关闭 - else if (val == 'close') { - dialogVisible.value = false - } -} +