From 47121dff8da689923f2f1af9daf63854f385c395 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 03 十一月 2023 13:37:58 +0800 Subject: [PATCH] 查看产品、产品类别弹窗调整上架规则 --- src/views/productManage/product/AddProductDialog.vue | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue index e24ecd2..8be8160 100644 --- a/src/views/productManage/product/AddProductDialog.vue +++ b/src/views/productManage/product/AddProductDialog.vue @@ -43,6 +43,7 @@ :show-procure="showProcure" :countObject="statisticsMap" :show-sale="showSale" + @listingRulesClick="listingRulesClick" /> <div class="bottom"> <el-tabs v-model="activeName" type="card"> @@ -558,22 +559,24 @@ /** * 闈炲繀濉」鍚庣杩斿洖鐨勬槸鏁板瓧 0,琛ㄥ崟闇�瑕佺┖涓叉墠鑳借涓烘湭閫夋嫨鍥炴樉 */ - setOptionalFieldsToEmpty(){ - ['productType','categoryId'] - .filter(filed => this.editConfig.infomation[filed] === 0) - .forEach(filed => { - this.editConfig.infomation[filed] = '' - }) + setOptionalFieldsToEmpty() { + let arr = ["productType", "categoryId"] + arr + .filter((filed) => this.editConfig.infomation[filed] === 0) + .forEach((filed) => { + this.editConfig.infomation[filed] = "" + }) }, /** * 鍚庣鍙帴鍙楁暟瀛楀舰寮�, 淇濆瓨鏃惰繕寰楀啀杞洖鍘� */ - unsetFieldsToNumber(){ - ['productType','categoryId'] - .filter(filed => this.editConfig.infomation[filed] === '') - .forEach(filed => { - this.editConfig.infomation[filed] = 0 - }) + unsetFieldsToNumber() { + let arr = ["productType", "categoryId"] + arr + .filter((filed) => this.editConfig.infomation[filed] === "") + .forEach((filed) => { + this.editConfig.infomation[filed] = 0 + }) }, // 鑾峰彇浜у搧绫诲埆 async getProductCategoryList() { @@ -645,7 +648,7 @@ this.$message.success("娣诲姞鎴愬姛") this.$parent.getData() } - },console.error) + }, console.error) } }) }, @@ -779,6 +782,20 @@ }) } }, + // 涓婃灦瑙勫垯 + listingRulesClick() { + this.$refs.form.validate((valid) => { + if (valid) { + this.$router.push({ + path: "/warehouseManage/listingRules", + query: { + productName: this.editConfig.infomation.name, + productId: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id + } + }) + } + }) + }, // 鍙攢鍞�/鍙噰璐� checkboxChange(val, param) { if (val === "閲囪喘") { -- Gitblit v1.8.0