From 4a63f03516cc177ad60ebbe28a65e80587846b3e Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期四, 24 八月 2023 14:56:45 +0800 Subject: [PATCH] 新增销售退款单增加选择退货单及其他bug --- src/views/other/commonDialog/SelectCommonDialog.vue | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue index 3090ad6..1225670 100644 --- a/src/views/other/commonDialog/SelectCommonDialog.vue +++ b/src/views/other/commonDialog/SelectCommonDialog.vue @@ -45,6 +45,7 @@ import { getServiceContractList } from "@/api/serviceManage/serviceContract" import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" import { getProductList } from "@/api/common/other" +import { getSalesReturnList } from "@/api/sales/salesReturn" export default { name: "EditSelCommonDialog", props: { @@ -150,6 +151,17 @@ ] } this.searchSel = { value: "name", label: "浜у搧鍚嶇О" } + } else if (this.editConfig.title === "閿�鍞��璐у崟") { + this.tableList = { + tableInfomation: [], + tableColumn: [ + { label: "閫�璐у崟缂栧彿", prop: "number", isClick: true }, + { label: "閫�璐ф棩鏈�", prop: "returnDate" }, + { label: "鐘舵��", prop: "salesReturnStatus_name" }, + { label: "閫�鍏ヤ粨搴�", prop: "repository" } + ] + } + this.searchSel = { value: "number", label: "閿�鍞��璐у崟缂栧彿" } } this.searchOptions = [] for (let i = 0; i < this.tableList.tableColumn.length; i++) { @@ -173,6 +185,8 @@ this.getServiceOrderList() } else if (this.editConfig.title === "浜у搧鍚嶇О") { this.getProductList() + } else if (this.editConfig.title === "閿�鍞��璐у崟") { + this.getSalesReturnList() } }, // 閿�鍞�诲崟 @@ -326,6 +340,29 @@ this.loading = false }) }, + async getSalesReturnList() { + await getSalesReturnList({ + keyword: this.keyword, + keywordType: this.keywordType, + page: 0, + pageSize: 0 + }).then((res) => { + if (res.code === 200) { + if (res.data.list && res.data.list.length > 0) { + const list = res.data.list.map((item) => { + return { + ...item, + salesReturnStatus_name: item.SalesReturnStatus.name + } + }) + this.tableList.tableInfomation = list.slice(0, 5) || [] + } else { + this.tableList.tableInfomation = [] + } + } + this.loading = false + }) + }, handleClose() { this.editConfig.editVisible = false }, @@ -343,6 +380,8 @@ this.$emit("selClient", row, "customService") } else if (this.editConfig.title === "浜у搧鍚嶇О") { this.$emit("selClient", row, "productName") + } else if (this.editConfig.title === "閿�鍞��璐у崟") { + this.$emit("selClient", row, "salesReturn") } }, // 鎼滅储 -- Gitblit v1.8.0