| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | :disabled="isNameChanceEdit" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.client_name && editConfig.infomation.client_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.client_name && |
| | | editConfig.infomation.client_name.length > 0 && |
| | | !isNameChanceEdit |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('client')" |
| | | > |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | :disabled="isNameChanceEdit" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.sale_chance_name && editConfig.infomation.sale_chance_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.sale_chance_name && |
| | | editConfig.infomation.sale_chance_name.length > 0 && |
| | | !isNameChanceEdit |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('chance')" |
| | | > |
| | |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getSaleChanceList} from "@/api/sales/salesOpportunity" |
| | | import {mapActions} from "vuex" |
| | | |
| | | export default { |
| | | name: "AddSalesDetailsDialog", |
| | | mixins: [codeMixin], |
| | |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | amountTotal: 0 |
| | | amountTotal: 0, |
| | | isNameChanceEdit: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | if (this.editConfig.title === "新建" && this.editConfig.infomation.client_name.length > 0) { |
| | | this.isNameChanceEdit = true |
| | | } |
| | | // else { |
| | | |
| | | // } |
| | | }, |
| | | watch: { |
| | | "editClientManageConfig.visible"(val) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getChanceFilter"]), |
| | | formInfo() { |
| | | this.objCode.type = "销售明细编码" |
| | | this.objCode.codeStandID = "" |
| | |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | // 需要修改 |
| | | await getSaleChanceList({ |
| | | client_id:this.clientId |
| | | }).then((res)=>{ |
| | | this.getChanceFilter(res.data.list) |
| | | }) |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.editConfig.infomation.client_name = item.name |