| | |
| | | :search-options="searchOptions" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | :search-sel="searchSel" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" @batchDelete="delClick" /> |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | "uninvoicedAmount", |
| | | "number", |
| | | "unOutoundNo", |
| | | "taxUnitPrice", |
| | | "priceTax" |
| | | ], |
| | | mergeNumber: 6 |
| | |
| | | infomation: {} |
| | | }, |
| | | selValueList: [], |
| | | search_map: {} |
| | | search_map: {}, |
| | | searchSel: { |
| | | value: "number", |
| | | label: "订单编号" |
| | | }, |
| | | keyword: "", |
| | | keywordType: "" |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | if (!this.isDetail) { |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | } else { |
| | | this.keyword = this.addConfig.keyword |
| | | this.keywordType = this.addConfig.keywordType |
| | | } |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | |
| | | tableColumn: [ |
| | | { label: "订单编号", prop: "number", isCommonClick: true }, |
| | | { label: "客户名称", prop: "client_name", isClientClick: true }, |
| | | { label: "签约日期", prop: "signTime", isTime: true, width: 150 }, |
| | | { label: "销售负责人", prop: "memberId" }, |
| | | { label: "出库状态", prop: "outboundStatus" }, |
| | | { label: "签约日期", prop: "signTime", width: 150 }, |
| | | { label: "销售负责人", prop: "member_name" }, |
| | | // { label: "出库状态", prop: "outboundStatus" }, |
| | | { label: "已收总额", prop: "receiveTotalAmount", price: true }, |
| | | { label: "合计", prop: "total", price: true }, |
| | | { label: "应收余额", prop: "amountReceivable", price: true }, |
| | | { label: "已开票金额", prop: "invoicedAmount", price: true }, |
| | | { label: "未开票金额", prop: "uninvoicedAmount", price: true }, |
| | | { label: "产品名称", prop: "productName" }, |
| | | { label: "数量", prop: "number1" }, |
| | | { label: "含税单价", prop: "taxUnitPrice", price: true }, |
| | | { label: "未出库数量", prop: "unOutoundNo" }, |
| | | { label: "价税合计", prop: "priceTax", price: true } |
| | | { label: "产品名称", prop: "productName", isProductName: true }, |
| | | { label: "数量", prop: "productNumber", isProductAmount: true }, |
| | | { label: "销售单价", prop: "taxUnitPrice", isProductPrice: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getSalesDetailsList({ |
| | | search_map: this.search_map, |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.client.name |
| | | client_name: item.client.name, |
| | | member_name: item.Member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.keyword = content |
| | | this.keywordType = val.label |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = {} |
| | | this.editConfig.infomation = { ...this.addConfig, currency: "人民币" } |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row, sale_chance_name: "" } |
| | | this.editConfig.infomation = { ...row, sale_chance_name: "", currency: "人民币" } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | |
| | | selClientClick(row) { |
| | | console.log(row) |
| | | this.clientDeail.visible = true |
| | | this.clientDeail.infomation = { ...row, client_name: row.name } |
| | | this.clientDeail.infomation = { |
| | | ...row.client, |
| | | member: row.Member, |
| | | client_name: row.client.name, |
| | | client_level: row.client.client_level.name, |
| | | client_status: row.client.client_status.name |
| | | } |
| | | }, |
| | | // 联系人详情 |
| | | selCommonClick(row) { |
| | |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table .cell, |
| | | .el-table th.el-table__cell > .cell { |
| | | padding: 0 2px; |
| | | .el-table .el-table__cell { |
| | | padding: 0; |
| | | } |
| | | .el-table__header tr, |
| | | .el-table__header th { |
| | | height: 48px; |
| | | } |
| | | .el-table__footer-wrapper tbody td.el-table__cell { |
| | | height: 48px; |
| | | } |
| | | } |
| | | </style> |