销售明细单 选择了销售报价单之后带出对应的产品列表,切换或者清空操作的时候清空产品管理,并修改
| | |
| | | if (!this.selectBox) { |
| | | this.getProductList() |
| | | } |
| | | this.getTableInfo() |
| | | }, |
| | | watch:{ |
| | | "productTableList": { |
| | | handler() { |
| | | this.getTableInfo() |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | getTableInfo(){ |
| | | this.tableList = this.productTableList |
| | | if (this.tableList.tableData.length === 1 && this.tableList.tableData[0].name === "") { |
| | | this.isRecalculate = false |
| | |
| | | this.isRecalculate = true |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | // 产品名称 |
| | | async getProductList() { |
| | | await getProductList({ |
| | |
| | | this.getSaleChanceList(item) |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.productTableList.tableData = item.products?item.products:[] |
| | | this.tableData = item.products?item.products:[] |
| | | } else { |
| | | this.contactId = item.id |
| | | } |
| | |
| | | this.clientId = row.client.id |
| | | this.saleChanceId = row.id |
| | | this.productTableList.tableData = row.products?row.products:[] |
| | | this.tableData = row.products?row.products:[] |
| | | } else { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } |
| | | this.productTableList.tableData = [] |
| | | this.tableData = [] |
| | | this.refresh() |
| | | }, |
| | | // 销售机会列表 |
| | |
| | | this.subbillId = item.id |
| | | this.editConfig.infomation.subbill_name = item.number |
| | | } else if (value === "quotation") { |
| | | // this.productTableList.tableData = item.products |
| | | // this.tableData = item.products |
| | | this.productTableList.tableData = item.products |
| | | this.tableData = item.products |
| | | this.editConfig.infomation.quotation_number = item.number |
| | | this.quotationId = item.id |
| | | } |
| | |
| | | this.subbillId = row.id |
| | | } else if (value === "quotation") { |
| | | this.productTableList.tableData = row.products |
| | | // this.tableData = row.products |
| | | this.tableData = row.products |
| | | this.editConfig.infomation.quotation_number = row.number |
| | | //反向 客户名称 |
| | | this.editConfig.infomation.client_name = row.client.name |
| | |
| | | this.quotationId = 0 |
| | | } |
| | | this.productTableList.tableData = [] |
| | | this.tableData = [] |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |