From d9abc7cc0df325a31c43fae4c994640aec1dcccb Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期四, 26 十月 2023 11:09:32 +0800 Subject: [PATCH] 销售明细单和退货单产品选择修改 --- src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue index d4806a9..4cead8b 100644 --- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue +++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue @@ -117,7 +117,7 @@ </div> </el-form-item> </el-col> - <el-col :span="12"> + <!-- <el-col :span="12"> <el-form-item label="閿�鍞瓙鍗�" prop="subbill_name"> <div class="custom-name"> <el-autocomplete @@ -148,7 +148,7 @@ </div> </div> </el-form-item> - </el-col> + </el-col> --> <el-col :span="12"> <el-form-item label="閿�鍞姤浠峰崟" prop="quotation_number"> <div class="custom-name"> @@ -596,8 +596,8 @@ saveClick(formName) { this.$refs[formName].validate((valid) => { if (valid) { - for (let i = 0; i < this.tableData.length; i++) { - if (this.tableData[i].name.length === 0) { + for (let i = 0; i < this.selProductData.length; i++) { + if (this.selProductData[i].name.length === 0) { this.isNoProduct = true break } else { @@ -625,6 +625,7 @@ } }) } else { + console.log(this.selProductData) getUpdateSalesDetails(params).then((res) => { console.log(res) this.editConfig.visible = false @@ -699,8 +700,14 @@ this.tableData = item.products this.tableData.map((item, index) => { item.productId = index + 1 + this.selProductData.forEach((key) => { + if (item.number === key.number) { + item.amount = key.amount + item.id = key.id + } + }) }) - this.productTableList.tableData = item.products + this.productTableList.tableData = this.tableData this.selProductData.forEach((key) => { this.tableData.forEach((row) => { if (key.number === row.number) { @@ -834,6 +841,8 @@ this.editConfig.infomation.sale_chance_name = "" this.editConfig.infomation.client_name = "" this.editConfig.infomation.subbill_name = "" + this.editConfig.infomation.quotation_number = "" + this.quotationId = 0 this.clientId = 0 this.saleChanceId = 0 this.subbillId = 0 @@ -846,7 +855,11 @@ } else if (value === "subbill") { this.editConfig.infomation.subbill_name = "" this.subbillId = 0 + } else if (value === "quotation") { + this.editConfig.infomation.quotation_number = "" + this.quotationId = 0 } + this.productTableList.tableData = [] }, // 娣诲姞闄勪欢 addAnnexClick() {}, -- Gitblit v1.8.0