From 46ed69e3b72658140a40127f4bae16bef9a02d56 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 21 八月 2023 11:23:34 +0800 Subject: [PATCH] bug修复 --- src/views/sales/salesReturn/DetailReturn.vue | 84 ++++++++++++++++++----------------------- 1 files changed, 37 insertions(+), 47 deletions(-) diff --git a/src/views/sales/salesReturn/DetailReturn.vue b/src/views/sales/salesReturn/DetailReturn.vue index a678fda..24b03ca 100644 --- a/src/views/sales/salesReturn/DetailReturn.vue +++ b/src/views/sales/salesReturn/DetailReturn.vue @@ -37,11 +37,11 @@ <li v-for="(item, i) in basicInfoList" :key="i"> <div class="left"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> - <div class="right"> - <div class="content-title">{{ item.rightStr }}</div> - <div class="content-data">{{ item.rightValue }}</div> + <div v-if="item.rightStr" class="right"> + <div class="content-title">{{ item.rightStr + "锛�" }}</div> + <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> </div> </li> </ul> @@ -59,11 +59,11 @@ <li v-for="(item, i) in dynamicInfoList" :key="i"> <div class="left"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> - <div class="right"> - <div class="content-title">{{ item.rightStr }}</div> - <div class="content-data">{{ item.rightValue }}</div> + <div v-if="item.rightStr" class="right"> + <div class="content-title">{{ item.rightStr + "锛�" }}</div> + <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> </div> </li> </ul> @@ -81,14 +81,14 @@ <li> <div class="left remark"> <div class="content-title">{{ "閫�璐у師鍥狅細" }}</div> - <div class="content-data">{{ "" }}</div> + <div class="content-data">{{ detailConfig.infomation.reason }}</div> </div> </li> </ul> </div> </div> <!-- 闄勪欢淇℃伅 --> - <div class="basic-info"> + <!-- <div class="basic-info"> <div class="basic-info-label" @click="expandClick('annex')"> <i v-if="isAnnexExpand" class="el-icon-arrow-down"></i> <i v-else class="el-icon-arrow-up"></i> @@ -104,7 +104,7 @@ </li> </ul> </div> - </div> + </div> --> <!-- 浜у搧绠$悊 --> <div class="basic-info"> <div class="basic-info-label" @click="expandClick('product')"> @@ -123,7 +123,7 @@ </div> </div> <div v-if="activeName === 'refundForm'" class="second"> - <RefundForm :isDetail="true" /> + <RefundForm :isDetail="true" :add-config="addConfig" /> </div> </div> </el-drawer> @@ -165,38 +165,48 @@ sumProp: ["other1", "other2", "other3", "other4"], mergeNumber: 3 }, - productTableList: {} + productTableList: {}, + addConfig: {} } }, created() { - this.setData() + this.setData(this.detailConfig.infomation) + this.addConfig = { + keywordType: "閿�鍞��璐у崟", + keyword: this.detailConfig.infomation.number, + id: this.detailConfig.infomation.id, + client_name: this.detailConfig.infomation.client.name, + contact_name: this.detailConfig.infomation.contact_name, + client_id: this.detailConfig.infomation.client_id, + contact_id: this.detailConfig.infomation.contact_id + } this.setTableForm() }, mounted() {}, methods: { - setData() { + setData(item) { this.basicInfoList = [ { leftStr: "瀹㈡埛鍚嶇О", - leftValue: "", + leftValue: item.client.name, rightStr: "閿�鍞��璐у崟缂栧彿", - rightValue: "" + rightValue: item.number }, { leftStr: "閫夋嫨婧愬崟", leftValue: "", rightStr: "閫�鍏ヤ粨搴�", - rightValue: "" + rightValue: item.repository }, { leftStr: "閿�鍞礋璐d汉", - leftValue: "", + leftValue: item.Member.username, rightStr: "瀹℃壒鐘舵��", rightValue: "" }, { leftStr: "閫�璐ф棩鏈�", - leftValue: "", + leftValue: item.returnDate, rightStr: "鍒涘缓鏃堕棿", rightValue: "" }, @@ -216,7 +226,7 @@ }, { leftStr: "鐘舵��", - leftValue: "", + leftValue: item.SalesReturnStatus.name, rightStr: "宸查��娆�", rightValue: "" } @@ -246,33 +256,13 @@ }, setTableForm() { this.productTableList = { - tableData: [ - { - id: "1", - productName: "涓婃捣鏈夐檺鍏徃", - other0: "ZDYBD03-1", - other1: "12", - other2: "5.00", - other4: "3.00", - other3: "2.00" - } - ], + tableData: this.detailConfig.infomation.products, tableColumn: [ - { label: "#", prop: "id", width: 40 }, - { label: "鍚◣鍗曚环", prop: "other9", input: true }, - { label: "浜у搧鍚嶇О", prop: "productName", input: true, isRequird: true }, - { label: "浜у搧缂栧彿", prop: "other0" }, - { label: "鏁伴噺", prop: "other1", input: true, isRequird: true }, - { label: "鎶樻墸鐜�(%)", prop: "other6", input: true }, - { label: "涓嶅惈绋庡崟浠�", prop: "other7", input: true }, - { label: "鎶樻墸棰�", prop: "other2" }, - { label: "绋�(閿�鍞�)", prop: "other7", input: true }, - { label: "瀹為檯鍚◣鍗曚环", prop: "other3" }, - { label: "涓嶅惈绋庨噾棰�", prop: "other4" }, - { label: "浠风◣鍚堣", prop: "other3", input: true }, - { label: "鎻忚堪", prop: "other8" }, - { label: "婧愬崟绫诲瀷", prop: "other5" }, - { label: "婧愬崟", prop: "other6" } + { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true }, + { label: "浜у搧缂栧彿", prop: "number" }, + { label: "鏁伴噺", prop: "amount", inputNumber: true, isRequird: true }, + { label: "閿�鍞崟浠�", prop: "price", inputFloat: true }, + { label: "浠风◣鍚堣", prop: "total", inputFloat: true } ] } } -- Gitblit v1.8.0