| | |
| | | @select="handleSelectClient('chance', $event)" |
| | | :disabled="isNameChanceEdit || isView" |
| | | ></el-autocomplete> |
| | | <!-- &&editConfig.infomation.client_name --> |
| | | <div |
| | | v-if="!isNameChanceEdit && !isView&&editConfig.infomation.client_name" |
| | | v-if="!isNameChanceEdit && !isView" |
| | | class="common-select-btn" |
| | | @click="selClientClick('chance')" |
| | | > |
| | |
| | | } |
| | | ]" |
| | | > |
| | | <!-- isAddQuatation || --> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.quotation_number" |
| | |
| | | value-key="number" |
| | | @select="handleSelectClient('quotation', $event)" |
| | | style="width: 100%" |
| | | placeholder="请先选择销售机会" |
| | | :disabled="isAddQuatation || isView" |
| | | placeholder="请选择销售报价单" |
| | | :disabled=" isView" |
| | | ></el-autocomplete> |
| | | <!-- !isAddQuatation && editConfig.infomation.sale_chance_name &&--> |
| | | <div |
| | | v-if="!isAddQuatation && !isView&&editConfig.infomation.sale_chance_name" |
| | | v-if=" !isView" |
| | | class="common-select-btn" |
| | | @click="selClientClick('quotation')" |
| | | > |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <!-- !isAddQuatation && --> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.quotation_number && |
| | | editConfig.infomation.quotation_number.length > 0 && |
| | | !isAddQuatation && |
| | | !isView |
| | | " |
| | | class="common-select-btn" |
| | |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | | if(this.clientId){ |
| | | this.editSelectChanceConfig.clientId = this.clientId |
| | | } |
| | | this.editSelectChanceConfig.editVisible = true |
| | | } else if (value === "subbill") { |
| | | this.editSelCommonConfig.title = "销售子单" |
| | |
| | | this.editSelCommonConfig.clientId = this.clientId |
| | | } else if (value === "quotation") { |
| | | this.editSelCommonConfig.title = "报价单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | if(this.saleChanceId&&this.clientId){ |
| | | this.editSelCommonConfig.clientId = this.clientId |
| | | // 正向选择客户 销售机会 报价单 |
| | | this.editSelCommonConfig.isRequest = false |
| | | this.editSelCommonConfig.count=this.count |
| | | this.editSelCommonConfig.tableInfomation = [...this.quotationList] |
| | | }else{ |
| | | // 反向选择 |
| | | this.editSelCommonConfig.isRequest = true; |
| | | } |
| | | this.editSelCommonConfig.editVisible = true |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.sale_chance_name = "" |
| | | this.saleChanceId='' |
| | | this.editConfig.infomation.subbill_name = "" |
| | | // 清空报价单 |
| | | this.editConfig.infomation.quotation_number ='' |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.getSaleChanceList(row) |
| | | this.getSubOrderList(row) |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.editConfig.infomation.client_name = row.client.name |
| | | this.clientId = row.client.id |
| | | this.saleChanceId = row.id |
| | | // 清空报价单 |
| | | this.editConfig.infomation.quotation_number ='' |
| | | this.isAddQuatation = false |
| | | this.getQuotation(row.id) |
| | | } else if (value === "subbill") { |
| | |
| | | this.productTableList.tableData = row.products |
| | | // this.tableData = row.products |
| | | this.editConfig.infomation.quotation_number = row.number |
| | | //反向 客户名称 |
| | | this.editConfig.infomation.client_name = row.client.name |
| | | this.clientId = row.client.id |
| | | //反向 销售机会 |
| | | this.editConfig.infomation.sale_chance_name = row.sale_chance.name |
| | | this.saleChanceId = row.sale_chance.id |
| | | this.quotationId = row.id |
| | | } |
| | | }, |