| | |
| | | :visible.sync="editConfig.visible" |
| | | :width="dialogWidth" |
| | | :before-close="handleClose" |
| | | append-to-body |
| | | custom-class="iframe-dialog" |
| | | > |
| | | <el-form |
| | | <el-form v-if="refreshFlag" |
| | | ref="form" |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="208px" |
| | | size="mini" |
| | | style="height: 60vh; overflow-x: hidden" |
| | | > |
| | |
| | | <div class="basic-info-title">机会基本信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="销售机会编号" prop="number">--> |
| | | <!-- <el-input v-model="editConfig.infomation.number"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会编号" prop="number"> |
| | | <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | | :disabled="editConfig.infomation.id || isIdDisabled" |
| | | :inputValue="inputValue" |
| | | @codeList="codeList" |
| | | /> |
| | | <span v-else-if="method == 0" style="color: #f56c6c" |
| | | >请优先配置编码规范 |
| | | <el-button type="text" @click="numberClick"> |
| | | 配置规范 |
| | | </el-button |
| | | ></span |
| | | > |
| | | <span v-else>{{editConfig.title==='新建'? '自动生成': editConfig.infomation.number}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="customName"> |
| | | <el-form-item label="客户名称" prop="client_name" ref="clientName"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.customName"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | | <div 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" |
| | | class="common-select-btn" |
| | | @click="clearupClient('client')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会编号" prop="salesOpportunityNo"> |
| | | <el-input v-model="editConfig.infomation.salesOpportunityNo"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="机会名称" prop="opportunityName"> |
| | | <el-form-item label="机会名称" prop="name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.opportunityName"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contactName"> |
| | | <el-input v-model="editConfig.infomation.contactName"></el-input> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.contact_name && editConfig.infomation.contact_name.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('contact')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机来源" prop="businessSource"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.businessSource" |
| | | :common-options="businessSourceOptions" |
| | | /> |
| | | <el-form-item label="商机来源" prop="sales_sources_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sales_sources_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="item in businessSourceOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机类型" prop="businessType"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.businessType" |
| | | :common-options="businessTypeOptions" |
| | | /> |
| | | <el-form-item label="商机类型" prop="sale_type_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sale_type_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in businessTypeOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售阶段" prop="saleStage"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.saleStage" |
| | | :common-options="saleStageOptions" |
| | | /> |
| | | <el-form-item label="销售阶段" prop="sale_stage_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sale_stage_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in saleStageOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售负责人" prop="salesHead"> |
| | | <el-form-item label="销售负责人" prop="member_id"> |
| | | <el-select |
| | | v-model="editConfig.infomation.salesHead" |
| | | v-model="editConfig.infomation.member_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in salesHeadOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="老客户营销" prop="oldCustomerMarket"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.oldCustomerMarket" |
| | | :common-options="oldCustomerMarketOptions" |
| | | /> |
| | | <el-form-item label="老客户营销" prop="regular_customers_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.regular_customers_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="item in oldCustomerMarketOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="竞争对手" prop="competitor"> |
| | | <el-input v-model="editConfig.infomation.competitor"></el-input> |
| | | <el-form-item label="竞争对手" prop="competitors"> |
| | | <el-input v-model="editConfig.infomation.competitors"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="可能性(%)" prop="possible"> |
| | | <CommonSelectView :common-value="editConfig.infomation.possible" :common-options="possibleOptions" /> |
| | | <el-form-item label="可能性(%)" prop="possibilities_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.possibilities_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in possibleOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | v-model="editConfig.infomation.currency" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in currencyOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="预算绝对值" prop="budgetAbsoluteValue"> |
| | | <el-input v-model="editConfig.infomation.budgetAbsoluteValue"></el-input> |
| | | <el-form-item label="预算绝对值" prop="budget"> |
| | | <el-input-number |
| | | v-model="editConfig.infomation.budget" |
| | | placeholder="请输入" |
| | | :min="0" |
| | | :precision="2" |
| | | :controls="false" |
| | | style="width: 100%" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="预计成交日期" prop="expectDealDate"> |
| | | <el-date-picker v-model="editConfig.infomation.expectDealDate" type="date" placeholder="选择日期"> |
| | | <el-form-item label="预计成交日期" prop="expected_time"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.expected_time" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | style="width: 100%" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="预计合同金额" prop="expectContractAmount"> |
| | | <el-input v-model="editConfig.infomation.expectContractAmount"></el-input> |
| | | <el-form-item label="预计合同金额" prop="projected_amount"> |
| | | <el-input-number |
| | | v-model="editConfig.infomation.projected_amount" |
| | | placeholder="请输入" |
| | | :min="0" |
| | | :controls="false" |
| | | style="width: 100%; margin-right: 5px" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="当前状态" prop="currentState"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.currentState" |
| | | :common-options="currentStateOptions" |
| | | /> |
| | | <el-form-item label="当前状态" prop="status_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.status_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in currentStateOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- 商机七要素 --> |
| | | <div class="basic-info-title">商机七要素(5W2P)</div> |
| | | <div class="address-view"> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="客户需求或痛点(why)" prop="demandPainPoint"> |
| | | <el-col> |
| | | <el-form-item label="客户需求或痛点(why)" prop="pain_points"> |
| | | <el-input |
| | | type="textarea" |
| | | style="width: 100%" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.demandPainPoint" |
| | | v-model="editConfig.infomation.pain_points" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="是否已经立项(plan)" prop="projectApproval"> |
| | | <el-col> |
| | | <el-form-item label="是否已经立项(plan)" prop="whether_established"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.projectApproval" |
| | | v-model="editConfig.infomation.whether_established" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="资金预算是多少(plan)" prop="fundBudget"> |
| | | <el-col> |
| | | <el-form-item label="资金预算是多少(plan)" prop="capital_budget"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.fundBudget" |
| | | v-model="editConfig.infomation.capital_budget" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="关键决策人是谁(who)" prop="decisionMaker"> |
| | | <el-col> |
| | | <el-form-item label="关键决策人是谁(who)" prop="key_maker"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.decisionMaker" |
| | | v-model="editConfig.infomation.key_maker" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="关键决策因素有哪些(what)" prop="decisionFactors"> |
| | | <el-col> |
| | | <el-form-item label="关键决策因素有哪些(what)" prop="key_factors"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.decisionFactors" |
| | | v-model="editConfig.infomation.key_factors" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="决策流程是怎样的(what)" prop="decisionFlow"> |
| | | <el-col> |
| | | <el-form-item label="决策流程是怎样的(what)" prop="process"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.decisionFlow" |
| | | v-model="editConfig.infomation.process" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="竞争对手提供的方案(what)" prop="programme"> |
| | | <el-col> |
| | | <el-form-item label="竞争对手提供的方案(what)" prop="solutions"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.programme" |
| | | v-model="editConfig.infomation.solutions" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </div> |
| | | <!-- SWOT分析 --> |
| | | <div class="basic-info-title">SWOT分析</div> |
| | | <div class="address-view"> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="优势(S)" prop="advantage"> |
| | | <el-form-item label="优势(S)" prop="advantages"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.advantage" |
| | | v-model="editConfig.infomation.advantages" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="劣势(W)" prop="disadvantage"> |
| | | <el-form-item label="劣势(W)" prop="disadvantages"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.disadvantage" |
| | | v-model="editConfig.infomation.disadvantages" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="机会(O)" prop="opportunity"> |
| | | <el-form-item label="机会(O)" prop="opportunities"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.opportunity" |
| | | v-model="editConfig.infomation.opportunities" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="威胁(T)" prop="threaten"> |
| | | <el-form-item label="威胁(T)" prop="threats"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.threaten" |
| | | v-model="editConfig.infomation.threats" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </div> |
| | | <!-- 地址信息 --> |
| | | <div class="basic-info-title">地址信息</div> |
| | | <div class="address-view"> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <!-- <el-col :span="20"> |
| | | <el-form-item label="定位" prop="position"> |
| | | <el-input v-model="editConfig.infomation.position"></el-input> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="地图" prop="map"> |
| | | <div style="height: 100px"></div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="国家" prop="country"> |
| | | <CommonSelectView :common-value="editConfig.infomation.country" :common-options="countryOptions" /> |
| | | <el-form-item label="国家" prop="country_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.country_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | disabled |
| | | > |
| | | <el-option v-for="item in countryOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="省份" prop="province"> |
| | | <CommonSelectView :common-value="editConfig.infomation.province" :common-options="provinceOptions" /> |
| | | <el-form-item label="省份" prop="province_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.province_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | @change="selProvinceChange" |
| | | > |
| | | <el-option v-for="item in provinceOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="城市" prop="city"> |
| | | <CommonSelectView :common-value="editConfig.infomation.city" :common-options="cityOptions" /> |
| | | <el-form-item label="城市" prop="city_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.city_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | :disabled="cityOptions.length <= 0 ? true : false" |
| | | > |
| | | <el-option v-for="item in cityOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="区域" prop="region"> |
| | | <CommonSelectView :common-value="editConfig.infomation.region" :common-options="regionOptions" /> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="区域" prop="region_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.region_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in regionOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <div class="common-select-btn"><i class="el-icon-setting"></i></div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form-item label="详细地址" prop="address"> |
| | | </el-col> --> |
| | | <el-col> |
| | | <el-form-item label="详细地址" prop="detail_address"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | placeholder="请输入内容" |
| | | v-model="editConfig.infomation.address" |
| | | v-model="editConfig.infomation.detail_address" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <div class="basic-info-title">备注信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="备注" prop="notes"> |
| | | <el-col> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | placeholder="请输入内容" |
| | | v-model="editConfig.infomation.notes" |
| | | v-model="editConfig.infomation.remark" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- 附件信息 --> |
| | | <div class="basic-info-title">附件信息</div> |
| | | <!-- <div class="basic-info-title">附件信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" size="small" @click="editConfig.visible = false">保存</el-button> |
| | | <el-button size="small" @click="editConfig.visible = false">取消</el-button> |
| | | <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button> |
| | | <el-button size="small" @click="handleClose">取消</el-button> |
| | | </div> |
| | | <!-- 选择客户 --> |
| | | <SelectClientDialog |
| | | v-if="editSelectClientConfig.editVisible" |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择联系人 --> |
| | | <SelectContactDialog |
| | | v-if="editSelectContactConfig.editVisible" |
| | | :edit-common-config="editSelectContactConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import CommonSelectView from "@/components/makepager/CommonSelectView" |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddSaleChance, getUpdateSaleChance } from "@/api/sales/salesOpportunity" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | import { getCityList } from "@/api/common/address" |
| | | import WordInput from "@/components/wordInput.vue"; |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"; |
| | | export default { |
| | | name: "AddSalesOpportunityDialog", |
| | | mixins:[codeMixin], |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | return { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: { |
| | | customName: "", |
| | | salesOpportunityNo: "POT521", |
| | | opportunityName: "", |
| | | contactName: "", |
| | | businessSource: "", |
| | | businessType: "", |
| | | saleStage: "", |
| | | salesHead: "", |
| | | oldCustomerMarket: "", |
| | | competitor: "", |
| | | possible: "", |
| | | currency: "", |
| | | budgetAbsoluteValue: "", |
| | | expectDealDate: "", |
| | | expectContractAmount: "", |
| | | currentState: "", |
| | | demandPainPoint: "", |
| | | projectApproval: "", |
| | | fundBudget: "", |
| | | decisionMaker: "", |
| | | decisionFactors: "", |
| | | decisionFlow: "", |
| | | programme: "", |
| | | advantage: "", |
| | | disadvantage: "", |
| | | opportunity: "", |
| | | threaten: "", |
| | | position: "", |
| | | map: "", |
| | | country: "1", |
| | | province: "1", |
| | | city: "1", |
| | | region: "1", |
| | | notes: "" |
| | | } |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: { CommonSelectView }, |
| | | components: {WordInput, SelectClientDialog, SelectContactDialog }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | | }, |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | refreshFlag:true, |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | salesOpportunityNo: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | opportunityName: [{ required: true, message: "请选择", trigger: "change" }], |
| | | salesHead: [{ required: true, message: "请选择", trigger: "change" }], |
| | | saleStage: [{ required: true, message: "请选择", trigger: "change" }], |
| | | currency: [{ required: true, message: "请选择", trigger: "change" }], |
| | | expectDealDate: [{ required: true, message: "请选择", trigger: "change" }], |
| | | expectContractAmount: [{ required: true, message: "请选择", trigger: "change" }] |
| | | number: [{ required: true, message: "请输入销售机会编号", trigger: "blur" }], |
| | | name: [{ required: true, message: "请输入机会名称", trigger: "blur" }], |
| | | |
| | | member_id: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | sale_stage_id: [{ required: true, message: "请选择销售阶段", trigger: "change" }], |
| | | currency: [{ required: true, message: "请选择币种", trigger: "change" }], |
| | | expected_time: [{ required: true, message: "请选择预计成交日期", trigger: "change" }], |
| | | projected_amount: [{ required: true, message: "请输入预计合同金额", trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户", trigger: "change" }], |
| | | }, |
| | | businessSourceOptions: [ |
| | | { value: "1", label: "后台注册" }, |
| | | { value: "2", label: "代理商客户" }, |
| | | { value: "3", label: "电话陌生拜访" }, |
| | | { value: "4", label: "直接访问" }, |
| | | { value: "5", label: "项目合作" }, |
| | | { value: "6", label: "个人自找" }, |
| | | { value: "7", label: "二次销售" }, |
| | | { value: "8", label: "公司电话" } |
| | | ], |
| | | salesHeadOptions: [ |
| | | { value: "1", label: "BOSS" }, |
| | | { value: "2", label: "Mia" }, |
| | | { value: "3", label: "财务" }, |
| | | { value: "4", label: "市场" }, |
| | | { value: "5", label: "系统管理员" }, |
| | | { value: "6", label: "销售" }, |
| | | { value: "7", label: "销售总监" } |
| | | ], |
| | | businessSourceOptions: [], |
| | | memberOptions: [], |
| | | businessTypeOptions: [], // 商机类型 |
| | | saleStageOptions: [], // 销售阶段 |
| | | oldCustomerMarketOptions: [], // 老客户营销 |
| | | possibleOptions: [], // 可能性 |
| | | currencyOptions: [], // 币种 |
| | | currencyOptions: [{ id: 1, name: "人民币" }], // 币种 |
| | | currentStateOptions: [], // 当前状态 |
| | | countryOptions: [{ value: "1", label: "中国" }], // 国家 |
| | | provinceOptions: [ |
| | | { value: "1", label: "北京市" }, |
| | | { value: "2", label: "上海市" }, |
| | | { value: "3", label: "吉林省" }, |
| | | { value: "4", label: "陕西省" } |
| | | ], // 省份 |
| | | cityOptions: [ |
| | | { value: "1", label: "北京市" }, |
| | | { value: "2", label: "上海市" }, |
| | | { value: "3", label: "吉林市" }, |
| | | { value: "4", label: "西安市" } |
| | | ], // 城市 |
| | | regionOptions: [ |
| | | { value: "1", label: "朝阳区" }, |
| | | { value: "2", label: "海淀区" }, |
| | | { value: "3", label: "通州区" }, |
| | | { value: "4", label: "西城区" } |
| | | ] // 区域 |
| | | countryOptions: [{ id: 1, name: "中国" }], // 国家 |
| | | provinceOptions: [], // 省份 |
| | | cityOptions: [], // 城市 |
| | | regionOptions: [], // 区域 |
| | | editSelectClientConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelectContactConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | restaurants: [], |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | contactId: this.editCommonConfig.infomation.contact_id, |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "销售机会编码",codeStandID:'' }, |
| | | } |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id !== 0) { |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo(); |
| | | }, |
| | | watch:{ |
| | | 'editConfig.visible'(val){ |
| | | if(val){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editConfig.infomation.codeStandID'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | | this.objCode.codeStandID = '' |
| | | if(this.editConfig.infomation.codeStandID){ |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID; |
| | | } |
| | | this.getRCodeStandardList(); |
| | | }, |
| | | getCommonData() { |
| | | this.editConfig.infomation.country_id = 1 |
| | | this.editConfig.infomation.province_id = |
| | | this.editConfig.infomation.province_id === 0 ? "" : this.editConfig.infomation.province_id |
| | | this.editConfig.infomation.city_id = |
| | | this.editConfig.infomation.city_id === 0 ? "" : this.editConfig.infomation.city_id |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | this.businessSourceOptions = res.data.sales_source |
| | | this.businessTypeOptions = res.data.sale_type |
| | | this.oldCustomerMarketOptions = res.data.regular_customers |
| | | this.saleStageOptions = res.data.sale_stage |
| | | this.provinceOptions = res.data.province |
| | | this.regionOptions = res.data.region |
| | | this.possibleOptions = res.data.possibility |
| | | // this.currencyOptions = res.data.currency |
| | | this.currentStateOptions = res.data.status |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | console.log(this.editConfig.infomation.client_name) |
| | | if (this.editConfig.title === "新建" && this.editConfig.infomation.client_name) { |
| | | this.$parent.handleClose() |
| | | } |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSaleChance(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | // } |
| | | } |
| | | }) |
| | | } else { |
| | | getUpdateSaleChance(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | advantages: data.advantages || "", |
| | | budget: data.budget || 0, |
| | | capital_budget: data.capital_budget || "", |
| | | city_id: data.city_id || 0, |
| | | client_id: this.clientId || 0, |
| | | competitors: data.competitors || "", |
| | | contact_id: this.contactId || 0, |
| | | country_id: data.country_id || 0, |
| | | currency: data.currency || 0, |
| | | disadvantages: data.disadvantages || "", |
| | | expected_time: data.expected_time || "", |
| | | key_factors: data.key_factors || "", |
| | | key_maker: data.key_maker || "", |
| | | member_id: data.member_id || 0, |
| | | name: data.name || "", |
| | | number: data.number || "", |
| | | opportunities: data.opportunities || "", |
| | | pain_points: data.pain_points || "", |
| | | possibilities: data.possibilities_id || 0, |
| | | process: data.process || "", |
| | | projected_amount: data.projected_amount || 0, |
| | | province_id: data.province_id || 0, |
| | | region_id: data.region_id || 0, |
| | | regular_customers_id: data.regular_customers_id || 0, |
| | | sale_stage_id: data.sale_stage_id || 0, |
| | | sale_type_id: data.sale_type_id || 0, |
| | | sales_sources_id: data.sales_sources_id || 0, |
| | | solutions: data.solutions || "", |
| | | status_id: data.status_id || 0, |
| | | threats: data.threats || "", |
| | | whether_established: data.whether_established || "", |
| | | |
| | | remark: data.remark || "", |
| | | detail_address: data.detail_address || "", |
| | | |
| | | codeStandID:data.ID, |
| | | codeRule:this.codeRule, |
| | | } |
| | | return params |
| | | }, |
| | | // 选择用户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | | createStateFilter(queryString) { |
| | | return (state) => { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } |
| | | }, |
| | | selClientClick(value) { |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | } |
| | | this.refresh() |
| | | }, |
| | | /** |
| | | * 强制刷新form组件 |
| | | * 外部更改表单值不会触发表单校验,导致即使有值夜被表单校验阻塞住 |
| | | */ |
| | | refresh(){ |
| | | this.refreshFlag=false |
| | | requestAnimationFrame(()=>{ |
| | | this.refreshFlag=true |
| | | }) |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } |
| | | this.refresh() |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {} |
| | | setFormatClick() {}, |
| | | // 选择省份 |
| | | selProvinceChange(val) { |
| | | this.getCityList(val, "sel") |
| | | }, |
| | | async getCityList(val, value) { |
| | | await getCityList({ province_id: val }).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.cityOptions = res.data.data.list |
| | | if (value === "sel") { |
| | | this.editConfig.infomation.city_id = "" |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .add-sales-opportunity { |
| | | .basic-info { |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | color: #666; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | } |
| | | .basic-info-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .custom-name { |
| | | ::v-deep { |
| | | .iframe-dialog .el-dialog__body { |
| | | .basic-info { |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | color: #666; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | } |
| | | .basic-info-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .custom-name, |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .common-select { |
| | | .common-select-sel { |
| | | flex: 1; |
| | | } |
| | | } |
| | | .custom-name{ |
| | | .el-autocomplete{ |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | .annex-view { |
| | | display: flex; |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 18px; |
| | | color: #6166d3; |
| | | .setFormat { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | } |
| | | .address-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | } |
| | | .annex-view { |
| | | .unflod-collapse { |
| | | display: flex; |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #6166d3; |
| | | .setFormat { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | } |
| | | .unflod-collapse { |
| | | display: flex; |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #6166d3; |
| | | } |
| | | .dialog-footer { |
| | | background-color: #f5f5f5; |
| | | height: 55px; |
| | | line-height: 55px; |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-dialog__header { |
| | | padding: 12.5px 10px; |
| | | border-bottom: 1px solid #e5e5e5; |
| | | .el-dialog__title { |
| | | font-size: 15px; |
| | | color: #323232; |
| | | font-weight: bold; |
| | | .dialog-footer { |
| | | background-color: #f5f5f5; |
| | | height: 55px; |
| | | line-height: 55px; |
| | | } |
| | | } |
| | | .el-dialog__body { |
| | | padding: 0px; |
| | | } |
| | | .el-dialog__footer { |
| | | padding: 0px; |
| | | text-align: center; |
| | | box-sizing: border-box; |
| | | border-top: 1px solid #dadee5; |
| | | .el-input__inner { |
| | | text-align: left; |
| | | } |
| | | } |
| | | } |
| | | </style> |