From 9604a786b1b24f8a81aa4e2393336af69341f260 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Wed, 27 Dec 2023 17:37:34 +0800 Subject: [PATCH] 11 --- pages/inventory/gategory.vue | 9 ++++++ pages/inventory/gategoryLow.vue | 52 ++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/pages/inventory/gategory.vue b/pages/inventory/gategory.vue index 24b6d7a..6f2e9d3 100644 --- a/pages/inventory/gategory.vue +++ b/pages/inventory/gategory.vue @@ -93,6 +93,15 @@ icon: 'none' }) return; + } + for(let i=0;i { @@ -207,25 +209,41 @@ }).catch((res) => {}) break; case 'attrAdd': - this.tui.request("/app/productAttribute/save", "post", { - attributeName: e, - categoryId: this.isOpenId - }, false, true).then((res) => { - if (res.code == 200) { - this.getGategoryList() - uni.showToast({ - title:"添加成功", - icon: 'none' - }) - } else { + for(let i=0;i { + if (res.code == 200) { + this.getGategoryList() + uni.showToast({ + title:"添加成功", + icon: 'none' + }) + } else { + uni.showToast({ + title:"添加失败", + icon: 'none' + }) + } + }).catch((res) => {}) + break; + case 'attrValAdd': + if(e == ''){ uni.showToast({ - title:"添加失败", + title:"不能为空!", icon: 'none' }) + return } - }).catch((res) => {}) - break; - case 'attrValAdd': this.tui.request("/app/productAttributeValue/save", "post", { value: e, attributeId: this.isOpenId @@ -238,7 +256,7 @@ }) } else { uni.showToast({ - title:"添加失败", + title:res.message, icon: 'none' }) }