| | |
| | | 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: { |
| | |
| | | ] |
| | | } |
| | | 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++) { |
| | |
| | | this.getServiceOrderList() |
| | | } else if (this.editConfig.title === "产品名称") { |
| | | this.getProductList() |
| | | } else if (this.editConfig.title === "销售退货单") { |
| | | this.getSalesReturnList() |
| | | } |
| | | }, |
| | | // 销售总单 |
| | |
| | | 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 |
| | | }, |
| | |
| | | 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") |
| | | } |
| | | }, |
| | | // 搜索 |