From 4c71426795d126d0491f2e4105090273909e6d51 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 19 四月 2024 15:16:38 +0800 Subject: [PATCH] 辅助数量限制值修改 --- src/views/productManage/product/AddProductDialog.vue | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue index 6c74ea1..18ba9bc 100644 --- a/src/views/productManage/product/AddProductDialog.vue +++ b/src/views/productManage/product/AddProductDialog.vue @@ -86,6 +86,7 @@ <el-input style="width: 85%" :disabled="!showFooter" + clearable v-model="editConfig.infomation.specs" placeholder="璇疯緭鍏�" ></el-input> @@ -95,6 +96,7 @@ v-model="editConfig.infomation.productType" placeholder="璇烽�夋嫨" size="mini" + clearable style="width: 85%" :disabled="!showFooter" > @@ -146,7 +148,7 @@ placeholder="鍗曚綅" filterable @change="Gtechange" - style="width: calc(85% - 110px)" + style="width: calc(85% - 120px)" > <el-option v-for="ele in unitList" @@ -165,9 +167,9 @@ :disabled="editConfig.infomation.unit&&showFooter?false:true" v-model="editConfig.infomation.moreUnit" @change="moreUnitChange" - ></el-checkbox + >鍚敤澶氬崟浣�</el-checkbox > - <span class="margin_left_10px cursor_pointer" @click="handleUnitMore">鍚敤澶氬崟浣�</span> + <!-- <span class="margin_left_10px cursor_pointer" @click="handleUnitMore">鍚敤澶氬崟浣�</span> --> </el-form-item> <el-form-item label="浜у搧鏍囩" prop="productTagName"> @@ -227,6 +229,8 @@ v-model="editConfig.infomation.categoryId" placeholder="璇烽�夋嫨" size="mini" + clearable + filterable style="width: 85%" :disabled="!showFooter" > @@ -243,6 +247,7 @@ <el-input style="width: 85%" :disabled="!showFooter" + filterable v-model="editConfig.infomation.type" placeholder="璇疯緭鍏�" ></el-input> @@ -610,6 +615,7 @@ ref="unitMoreDialog" @saveUnitMore="saveUnitMore" :workList="unitList" + :unitRight='editConfig.infomation.unit' :dataList="editConfig.infomation.moreUnitList" title="鍚敤澶氬崟浣�" ></UnitMoreDialog> @@ -814,19 +820,26 @@ }, // 鍚敤澶氬崟浣嶇殑寮�鍏� moreUnitChange(){ - let string=false; - if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ - for(let i in this.editConfig.infomation.moreUnitList){ - if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ - string=true; - break; - } + // let string=false; + if(this.editConfig.infomation.unit){ + // if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ + // for(let i in this.editConfig.infomation.moreUnitList){ + // if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ + // string=true; + // break; + // } + // } + // } + if(this.editConfig.infomation.moreUnit){ + // this.editConfig.infomation.moreUnit=false + // this.$message.error('璇峰厛閰嶇疆澶氬崟浣嶏紒') + this.$refs.unitMoreDialog.editDialogVisible = true; } - } - if(!string){ + }else{ this.editConfig.infomation.moreUnit=false - this.$message.error('璇峰厛閰嶇疆澶氬崟浣嶏紒') + this.$message.error('璇峰厛閫夋嫨鍗曚綅锛�') } + }, handleConfirmSave(dataList) { saveUnitDict({ data: dataList }).then((res) => { @@ -978,7 +991,7 @@ params.codeStandardID = this.autoCodeObj.codeStandardID params.autoIncr = this.autoCodeObj.maxAutoIncr } - if(params.moreUnitList.length>0){ + if(params.moreUnitList&¶ms.moreUnitList.length>0){ for(let i in params.moreUnitList){ params.moreUnitList[i].amount=Number(params.moreUnitList[i].amount) } -- Gitblit v1.8.0