From 4dbcdab87bce4d374c0bad7827e90c96f8041453 Mon Sep 17 00:00:00 2001 From: admin <> Date: Mon, 17 Jun 2024 16:07:33 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pagesApp/components/addSupplier.vue | 25 ++++++++++++++----------- src/pagesApp/supplierMgt.vue | 1 - 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/pagesApp/components/addSupplier.vue b/src/pagesApp/components/addSupplier.vue index 3e9d6ca..00b0ce4 100644 --- a/src/pagesApp/components/addSupplier.vue +++ b/src/pagesApp/components/addSupplier.vue @@ -320,7 +320,7 @@ const startSave = (v: boolean) => { delta: 1, success: (res) => { uni.$emit("pricingParams", { - name: model1.formData.name + name: model1.formData.name, }); }, }); @@ -366,18 +366,21 @@ onMounted(() => { onLoad((option: any) => { // 接收传递的标题参数 const title = option.title; - SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => { - if (res.code === 200) { - if (res.data.length > 0) { - model1.formData = res.data[0]; - if (model1.formData.cardCode) { - model1.formData.stockCardName = model1.formData.cardCode; + if (option.item) { + SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => { + if (res.code === 200) { + if (res.data.length > 0) { + model1.formData = res.data[0]; + if (model1.formData.cardCode) { + model1.formData.stockCardName = model1.formData.cardCode; + } + } else { + uni.showToast({ title: "未查询到供应商" }); } - } else { - uni.showToast({ title: "未查询到供应商" }); } - } - }); + }); + } + // 新增供应商卡号必填 编辑供应商卡号非必填 if (!option.item) { formAttrList[1].required = true; diff --git a/src/pagesApp/supplierMgt.vue b/src/pagesApp/supplierMgt.vue index 1eb9463..a954f33 100644 --- a/src/pagesApp/supplierMgt.vue +++ b/src/pagesApp/supplierMgt.vue @@ -118,7 +118,6 @@ const update = (item: any) => { }; const edit = (item: any) => { - console.log(JSON.stringify(item)) uni.navigateTo({ url: "/pagesApp/components/addSupplier?title=编辑供应商&item=" +