| | |
| | | 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: { |
| | |
| | | { label: "服务单编号", prop: "serviceNumber", isClick: true }, // 服务单编号 |
| | | { label: "主题", prop: "subject" }, // 主题 |
| | | { label: "服务方式", prop: "serviceType_name" }, // 服务方式 |
| | | { label: "服务人员", prop: "serviceManId" }, // 服务人员 |
| | | { label: "优先级别", prop: "priorityLevelId" }, // 优先级别 |
| | | { label: "处理状态", prop: "status" }, // 处理状态 |
| | | { label: "服务人员", prop: "serviceMan_name" }, // 服务人员 |
| | | { label: "优先级别", prop: "priorityLevel_name" }, // 优先级别 |
| | | { label: "处理状态", prop: "serviceOrderStatus_name" }, // 处理状态 |
| | | { label: "客户签名", prop: "qianming" } // 客户签名 |
| | | ] |
| | | } |
| | |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "Name", isClick: true }, |
| | | { label: "产品编号", prop: "Number" }, |
| | | { label: "规格型号", prop: "MaterialMode" } |
| | | { label: "产品名称", prop: "name", isClick: true }, |
| | | { label: "产品编号", prop: "number" } |
| | | ] |
| | | } |
| | | this.searchSel = { value: "Name", label: "产品名称" } |
| | | 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() |
| | | } |
| | | }, |
| | | // 销售总单 |
| | |
| | | pageSize: 0 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | if (res.data.data && res.data.data.length > 0) { |
| | | const list = res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.Client.name, |
| | | serviceType_name: item.ServiceType.name, |
| | | faultType_name: item.FaultType.name, |
| | | serviceContract_Number: item.ServiceContract.number |
| | | serviceContract_Number: item.ServiceContract.number, |
| | | serviceMan_name: item.serviceMan.username, |
| | | priorityLevel_name: item.PriorityLevel.name, |
| | | serviceOrderStatus_name: item.ServiceOrderStatus_name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | |
| | | // 产品名称 |
| | | async getProductList() { |
| | | await getProductList({ |
| | | productName: "", |
| | | productNumber: "", |
| | | productName: this.keywordType === "产品名称" ? this.keyword : "", |
| | | productNumber: this.keywordType === "产品编号" ? this.keyword : "", |
| | | page: 1, |
| | | pageSize: 5 |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.data && res.data.data.data.length > 0) { |
| | | const list = res.data.data.data.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | async getSalesReturnList() { |
| | | await getSalesReturnList({ |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: 0, |
| | | pageSize: 0 |
| | | }).then((res) => { |
| | |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.Client.name, |
| | | serviceType_name: item.ServiceType.name, |
| | | faultType_name: item.FaultType.name, |
| | | serviceContract_Number: item.ServiceContract.number |
| | | salesReturnStatus_name: item.SalesReturnStatus.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | |
| | | 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") |
| | | } |
| | | }, |
| | | // 搜索 |
| | |
| | | .bg-view { |
| | | margin: 10px; |
| | | .query-bg { |
| | | margin-left: -20px; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |