From bf3f0e8f2e4d9a1b79897bd343a99cd597b2ad98 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期四, 16 十一月 2023 16:07:27 +0800 Subject: [PATCH] Merge branch 'master' of ssh://192.168.5.5:29418/web/SRM --- src/.env | 18 +++++++++ src/views/productManage/product/index.vue | 1 src/.env.preview | 12 ++++++ src/views/other/commonDialog/EditDropdownDialog.vue | 71 ++++++++++++++++++++++------------- src/.env.development | 8 ++++ 5 files changed, 83 insertions(+), 27 deletions(-) diff --git a/src/.env b/src/.env new file mode 100644 index 0000000..bd7fd8a --- /dev/null +++ b/src/.env @@ -0,0 +1,18 @@ +# 鎵�鏈夌幆澧冮粯璁� + +# 椤甸潰 title 鍓嶇紑 +VUE_APP_TITLE=Basic +NODE_ENV=development +VUE_APP_BATH_PATH='http://192.168.20.119:9084' +# 缃戠粶璇锋眰鍏敤鍦板潃 +VUE_APP_API=/api/ + +# 浠撳簱鍦板潃 +VUE_APP_REPO="" + +# 鍥介檯鍖栭厤缃� +VUE_APP_I18N_LOCALE=zh-chs +VUE_APP_I18N_FALLBACK_LOCALE=en + +# element 棰滆壊 +VUE_APP_ELEMENT_COLOR=#2A78FB diff --git a/src/.env.development b/src/.env.development new file mode 100644 index 0000000..174ce30 --- /dev/null +++ b/src/.env.development @@ -0,0 +1,8 @@ +# 寮�鍙戠幆澧� +# 鎸囧畾鏋勫缓妯″紡 +NODE_ENV=development + +# 椤甸潰 title 鍓嶇紑 +VUE_APP_TITLE=Basic +VUE_APP_BATH_PATH='http://192.168.20.119:9084' + diff --git a/src/.env.preview b/src/.env.preview new file mode 100644 index 0000000..6d2aea2 --- /dev/null +++ b/src/.env.preview @@ -0,0 +1,12 @@ +# 鏋勫缓棰勮椤甸潰 + +# 鎸囧畾鏋勫缓妯″紡 +NODE_ENV=production + +# 鏍囪褰撳墠鏋勫缓鏂瑰紡 +VUE_APP_BUILD_MODE=PREVIEW +VUE_APP_BATH_PATH='http://www.fai365.com:9084 +VUE_APP_SCOURCE_LINK=TRUE + +# 閮ㄧ讲璺緞 +VUE_APP_PUBLIC_PATH=/ diff --git a/src/views/other/commonDialog/EditDropdownDialog.vue b/src/views/other/commonDialog/EditDropdownDialog.vue index c51d8de..e67830f 100644 --- a/src/views/other/commonDialog/EditDropdownDialog.vue +++ b/src/views/other/commonDialog/EditDropdownDialog.vue @@ -80,7 +80,8 @@ return { dialogWidth: "20%", editConfig: this.editDropdownConfig, - tableData: [] + tableData: [], + isName: false } }, created() { @@ -101,7 +102,7 @@ pageSize: 100 }).then((res) => { console.log(res.data) - this.tableData = res.data.data.list + this.tableData = res.data.list }) }, // 鎵�灞炶涓� @@ -164,34 +165,50 @@ name: "" }) }, + // 鍒ゆ柇娣诲姞name鏄惁涓虹┖ + determineNameEmpty(data) { + for (let i = 0; i < data.length; i++) { + if (data[i].name.length === 0) { + this.isName = true + break + } else { + this.isName = false + } + } + }, async saveClick() { console.log(this.tableData) - this.tableData.map((ite) => { - ite.ID = 0 - return { ...ite } - }) - if (this.editConfig.title === "渚涘簲鍟嗙被鍨�") { - updateSupplierType({ - supplierTypes: this.tableData - }).then((res) => { - console.log(res) - if (res.code === 200) { - this.$message.success("缂栬緫鎴愬姛") - this.$parent.getSupplierTypeList() - this.handleClose() - } + this.determineNameEmpty(this.tableData) + if (this.isName) { + this.$message.error("鍚嶇О涓嶈兘涓虹┖") + } else { + this.tableData.map((ite) => { + ite.ID = 0 + return { ...ite } }) - } else if (this.editConfig.title === "鎵�灞炶涓�") { - updateIndustry({ - industries: this.tableData - }).then((res) => { - console.log(res) - if (res.code === 200) { - this.$message.success("缂栬緫鎴愬姛") - this.$parent.getIndustryList() - this.handleClose() - } - }) + if (this.editConfig.title === "渚涘簲鍟嗙被鍨�") { + updateSupplierType({ + supplierTypes: this.tableData + }).then((res) => { + console.log(res) + if (res.code === 200) { + this.$message.success("缂栬緫鎴愬姛") + this.$parent.getSupplierTypeList() + this.handleClose() + } + }) + } else if (this.editConfig.title === "鎵�灞炶涓�") { + updateIndustry({ + industries: this.tableData + }).then((res) => { + console.log(res) + if (res.code === 200) { + this.$message.success("缂栬緫鎴愬姛") + this.$parent.getIndustryList() + this.handleClose() + } + }) + } } } } diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue index f85e494..5979391 100644 --- a/src/views/productManage/product/index.vue +++ b/src/views/productManage/product/index.vue @@ -130,6 +130,7 @@ const list = res.data.data.list.map((item) => { return { ...item, + supplierName: item.supplier.name, supplierNumber: item.supplier.number } }) -- Gitblit v1.8.0