|
@@ -1,21 +1,21 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <el-dialog append-to-body :title="title" :visible.sync="dialogFormVisible" width="60%" @close="close">
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ style="margin-top: -8vh"
|
|
|
|
|
+ :title="title"
|
|
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
|
|
+ width="60%"
|
|
|
|
|
+ @close="close">
|
|
|
<el-steps :active="activeSteps" align-center style="margin: -15px 0 15px 0">
|
|
<el-steps :active="activeSteps" align-center style="margin: -15px 0 15px 0">
|
|
|
- <el-step title="创建项目" />
|
|
|
|
|
|
|
+ <el-step title="修改项目" />
|
|
|
<el-step title="添加产品" />
|
|
<el-step title="添加产品" />
|
|
|
- <!-- <el-step title="跟进日程" />-->
|
|
|
|
|
</el-steps>
|
|
</el-steps>
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules">
|
|
<el-form ref="form" :model="form" :rules="rules">
|
|
|
<el-row v-if="activeSteps === 1" :gutter="20">
|
|
<el-row v-if="activeSteps === 1" :gutter="20">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="关联客户" prop="custName">
|
|
<el-form-item label="关联客户" prop="custName">
|
|
|
- <el-input
|
|
|
|
|
- v-model="form.custName"
|
|
|
|
|
- :disabled="Boolean(custInfo.custName)"
|
|
|
|
|
- readonly
|
|
|
|
|
- suffix-icon="el-icon-search"
|
|
|
|
|
- @focus="handleSelectCustomer" />
|
|
|
|
|
|
|
+ <el-input v-model="form.custName" disabled readonly />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -30,21 +30,6 @@
|
|
|
<el-input v-model="form.nboName" />
|
|
<el-input v-model="form.nboName" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="主要联系人" prop="contactName">
|
|
|
|
|
- <el-input v-model="form.contactName" readonly suffix-icon="el-icon-search" @focus="handleSelectContact" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="职位" prop="contactPostion">
|
|
|
|
|
- <el-input v-model="form.contactPostion" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="联系电话" prop="contactTelephone">
|
|
|
|
|
- <el-input v-model="form.contactTelephone" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="项目来源" prop="nboSource">
|
|
<el-form-item label="项目来源" prop="nboSource">
|
|
|
<el-select v-model="form.nboSource" clearable placeholder="项目来源" style="width: 100%">
|
|
<el-select v-model="form.nboSource" clearable placeholder="项目来源" style="width: 100%">
|
|
@@ -52,6 +37,16 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col v-if="form.nboSource === '80'" :span="8">
|
|
|
|
|
+ <el-form-item label="招标信息" prop="bidInfo">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.bidInfo"
|
|
|
|
|
+ :disabled="!isBid"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
|
|
+ @focus="handleSelectCustomerBid" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="销售工程师" prop="saleName">
|
|
<el-form-item label="销售工程师" prop="saleName">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -87,26 +82,6 @@
|
|
|
@focus="handleSelectDistributor" />
|
|
@focus="handleSelectDistributor" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="是否来自历史招标信息" prop="isBid">
|
|
|
|
|
- <el-switch v-model="isBid" active-text="是" inactive-text="否" style="width: 100%" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="招标信息" prop="bidInfo">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="form.bidInfo"
|
|
|
|
|
- :disabled="!isBid"
|
|
|
|
|
- readonly
|
|
|
|
|
- suffix-icon="el-icon-search"
|
|
|
|
|
- @focus="handleSelectCustomerBid" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="项目预算" prop="nboBudget">
|
|
|
|
|
- <amount-input v-model.trim="form.nboBudget" placeholder="请输入金额" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="是否大项目" prop="isBig">
|
|
<el-form-item label="是否大项目" prop="isBig">
|
|
|
<el-select v-model="form.isBig" placeholder="请选择" style="width: 100%">
|
|
<el-select v-model="form.isBig" placeholder="请选择" style="width: 100%">
|
|
@@ -115,128 +90,128 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-col :span="8">-->
|
|
|
- <!-- <el-form-item label="预计成交价格" prop="estTransPrice">-->
|
|
|
|
|
- <!-- <amount-input v-model.trim="form.estTransPrice" placeholder="请输入金额" />-->
|
|
|
|
|
|
|
+ <!-- <el-form-item label="项目类别" prop="nboType">-->
|
|
|
|
|
+ <!-- <el-select v-model="form.nboType" placeholder="请选择" style="width: 100%">-->
|
|
|
|
|
+ <!-- <el-option label="C类" value="30" />-->
|
|
|
|
|
+ <!-- <el-option label="储备" value="50" />-->
|
|
|
|
|
+ <!-- </el-select>-->
|
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-form-item>-->
|
|
|
<!-- </el-col>-->
|
|
<!-- </el-col>-->
|
|
|
|
|
+ <!-- C => B -->
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="预计成交时间" prop="estTransTime">
|
|
|
|
|
- <el-date-picker v-model="form.estTransTime" placeholder="选择日期" style="width: 100%" type="datetime" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="计划采购时间" prop="planPurchaseTime">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="form.planPurchaseTime"
|
|
|
|
|
- placeholder="选择日期"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- type="datetime" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="风险情况" prop="riskProfile">
|
|
|
|
|
- <el-input v-model="form.riskProfile" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="困难点" prop="difficulty">
|
|
|
|
|
- <el-input v-model="form.difficulty" />
|
|
|
|
|
|
|
+ <el-form-item label="项目预算" prop="nboBudget">
|
|
|
|
|
+ <amount-input v-model.trim="form.nboBudget" placeholder="请输入金额" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <div v-if="form.salesModel !== '10'">
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="渠道销售人员" prop="dealerSalesName">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.dealerSalesName"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
|
|
+ @focus="handleSelectDistributorContact" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
|
+ <el-form-item label="渠道销售电话/微信" prop="dealerSalesContact">
|
|
|
|
|
+ <el-input v-model="form.dealerSalesContact" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <el-col :span="8">-->
|
|
|
|
|
+ <!-- <el-form-item-->
|
|
|
|
|
+ <!-- label="报价单"-->
|
|
|
|
|
+ <!-- prop="quotationFile"-->
|
|
|
|
|
+ <!-- :required="form.nboType === '10' || form.nboType === '20'">-->
|
|
|
|
|
+ <!-- <el-upload-->
|
|
|
|
|
+ <!-- :action="uploadFileUrl"-->
|
|
|
|
|
+ <!-- :file-list="quotationFileList"-->
|
|
|
|
|
+ <!-- :limit="1"-->
|
|
|
|
|
+ <!-- :on-success="setQuotationFile">-->
|
|
|
|
|
+ <!-- <el-button size="mini" type="primary">点击上传</el-button>-->
|
|
|
|
|
+ <!-- </el-upload>-->
|
|
|
|
|
+ <!-- </el-form-item>-->
|
|
|
|
|
+ <!-- </el-col>-->
|
|
|
|
|
+ <!-- B => A -->
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="竞争公司" prop="competitor">
|
|
|
|
|
- <el-input v-model="form.competitor" />
|
|
|
|
|
|
|
+ <el-form-item label="采购方式" prop="purchasingWay">
|
|
|
|
|
+ <el-select v-model="form.purchasingWay" placeholder="请选择" style="width: 100%">
|
|
|
|
|
+ <el-option v-for="item in purchasingWayOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="介入情况" prop="intervention">
|
|
|
|
|
- <el-input v-model="form.intervention" />
|
|
|
|
|
|
|
+ <el-form-item label="资金来源" prop="capitalSource">
|
|
|
|
|
+ <el-input v-model="form.capitalSource" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="技术支持时间" prop="technicalSupportTime">
|
|
|
|
|
|
|
+ <el-form-item label="计划采购时间" prop="planPurchaseTime">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- v-model="form.technicalSupportTime"
|
|
|
|
|
|
|
+ v-model="form.planPurchaseTime"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
- type="datetime" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="技术支持人员" prop="technicalSupportName">
|
|
|
|
|
- <el-input v-model="form.technicalSupportName" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="技术支持内容" prop="technicalSupportContent">
|
|
|
|
|
- <el-input v-model="form.technicalSupportContent" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="总部对接人" prop="parentReceiver">
|
|
|
|
|
- <el-input v-model="form.parentReceiver" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="资金来源" prop="capitalSource">
|
|
|
|
|
- <el-input v-model="form.capitalSource" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="项目预算期限" prop="nboBudgetTime">
|
|
|
|
|
- <el-date-picker v-model="form.nboBudgetTime" placeholder="选择日期" style="width: 100%" type="datetime" />
|
|
|
|
|
|
|
+ type="datetime"
|
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="产品/方案满足情况" prop="productSatisfaction">
|
|
|
|
|
- <el-input v-model="form.productSatisfaction" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="采购方式" prop="purchasingWay">
|
|
|
|
|
- <!-- <el-input v-model="form.purchasingWay" /> -->
|
|
|
|
|
- <el-select v-model="form.purchasingWay" placeholder="请选择" style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in purchasingWayOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ <el-form-item label="客户决策人" prop="makerName">
|
|
|
|
|
+ <el-input v-model="form.makerName" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="采购时间" prop="purchasingTime">
|
|
|
|
|
- <el-date-picker v-model="form.purchasingTime" placeholder="选择日期" style="width: 100%" type="datetime" />
|
|
|
|
|
|
|
+ <el-form-item label="客户决策部门" prop="makerDept">
|
|
|
|
|
+ <el-input v-model="form.makerDept" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="决策人员" prop="makerName">
|
|
|
|
|
- <el-input v-model="form.makerName" />
|
|
|
|
|
|
|
+ <el-form-item label="客户联系人" prop="contactName">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.contactName"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
|
|
+ @focus="handleSelectCustomerContact" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="决策部门" prop="makerDept">
|
|
|
|
|
- <el-input v-model="form.makerDept" />
|
|
|
|
|
|
|
+ <el-form-item label="客户联系人电话/微信" prop="contactTelephone">
|
|
|
|
|
+ <el-input v-model="form.contactTelephone" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="经销商销售人员" prop="dealerSalesName">
|
|
|
|
|
- <el-input v-model="form.dealerSalesName" />
|
|
|
|
|
|
|
+ <el-form-item label="竞争公司" prop="competitor">
|
|
|
|
|
+ <el-input v-model="form.competitor" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="维护部门及人员" prop="accendant">
|
|
|
|
|
- <el-input v-model="form.accendant" />
|
|
|
|
|
|
|
+ <el-form-item label="客户倾向厂家" prop="customerIntentionFactory">
|
|
|
|
|
+ <el-input v-model="form.customerIntentionFactory" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="是否采纳大数技术参数" prop="isAdoptDashoo">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="form.isAdoptDashoo"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="是否采纳"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- @change="changeSalesModel" :disabled="true">
|
|
|
|
|
- <el-option v-for="dict in yesOrNoOptions" :key="dict.key" :label="dict.value" :value="dict.key" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
|
|
+ <!-- <el-col :span="8">-->
|
|
|
|
|
+ <!-- <el-form-item-->
|
|
|
|
|
+ <!-- label="是否采纳大数技术参数"-->
|
|
|
|
|
+ <!-- prop="isAdoptDashoo"-->
|
|
|
|
|
+ <!-- :required="type === 'up' && form.nboType === '10'">-->
|
|
|
|
|
+ <!-- <el-radio-group v-model="form.isAdoptDashoo" style="width: 100%">-->
|
|
|
|
|
+ <!-- <el-radio label="10">是</el-radio>-->
|
|
|
|
|
+ <!-- <el-radio label="20">否</el-radio>-->
|
|
|
|
|
+ <!-- </el-radio-group>-->
|
|
|
|
|
+ <!-- </el-form-item>-->
|
|
|
|
|
+ <!-- </el-col>-->
|
|
|
|
|
+ <!-- <el-col v-if="form.isAdoptDashoo === '10'" :span="8">-->
|
|
|
|
|
+ <!-- <el-form-item label="参数文件" prop="dashooParamFile" :required="form.isAdoptDashoo === '10'">-->
|
|
|
|
|
+ <!-- <el-upload-->
|
|
|
|
|
+ <!-- :action="uploadFileUrl"-->
|
|
|
|
|
+ <!-- :file-list="dashooParamFileList"-->
|
|
|
|
|
+ <!-- :limit="1"-->
|
|
|
|
|
+ <!-- :on-success="setDashooParamFile">-->
|
|
|
|
|
+ <!-- <el-button size="mini" type="primary">点击上传</el-button>-->
|
|
|
|
|
+ <!-- </el-upload>-->
|
|
|
|
|
+ <!-- </el-form-item>-->
|
|
|
|
|
+ <!-- </el-col>-->
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注信息" prop="remark">
|
|
<el-form-item label="备注信息" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注信息" rows="3" show-word-limit type="textarea" />
|
|
<el-input v-model="form.remark" placeholder="请输入备注信息" rows="3" show-word-limit type="textarea" />
|
|
@@ -253,33 +228,6 @@
|
|
|
@delProductData="delProductData" />
|
|
@delProductData="delProductData" />
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
-
|
|
|
|
|
- <!-- <el-row v-if="activeSteps === 3" :gutter="20">-->
|
|
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
|
|
- <!-- <el-form-item label="跟进时间" prop="followTime">-->
|
|
|
|
|
- <!-- <el-date-picker v-model="form.followTime" placeholder="选择时间" style="width: 100%" type="datetime" />-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
|
|
- <!-- <el-form-item label="负责人员" prop="followUserName">-->
|
|
|
|
|
- <!-- <el-input-->
|
|
|
|
|
- <!-- v-model="form.followUserName"-->
|
|
|
|
|
- <!-- readonly-->
|
|
|
|
|
- <!-- suffix-icon="el-icon-search"-->
|
|
|
|
|
- <!-- @focus="handleSelectFollowUser" />-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
- <!-- <el-col :span="24">-->
|
|
|
|
|
- <!-- <el-form-item label="跟进内容" prop="followContent">-->
|
|
|
|
|
- <!-- <el-input-->
|
|
|
|
|
- <!-- v-model="form.followContent"-->
|
|
|
|
|
- <!-- placeholder="请输入跟进内容"-->
|
|
|
|
|
- <!-- rows="5"-->
|
|
|
|
|
- <!-- show-word-limit-->
|
|
|
|
|
- <!-- type="textarea" />-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
- <!-- </el-col>-->
|
|
|
|
|
- <!-- </el-row>-->
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button v-if="activeSteps !== 1" type="primary" @click="activeSteps--">上一步</el-button>
|
|
<el-button v-if="activeSteps !== 1" type="primary" @click="activeSteps--">上一步</el-button>
|
|
@@ -289,13 +237,13 @@
|
|
|
<!-- 选择客户弹窗 -->
|
|
<!-- 选择客户弹窗 -->
|
|
|
<select-customer ref="selectCustomer" @save="selectCustomer" />
|
|
<select-customer ref="selectCustomer" @save="selectCustomer" />
|
|
|
<!-- 选择客户联系人弹窗 -->
|
|
<!-- 选择客户联系人弹窗 -->
|
|
|
- <select-contact
|
|
|
|
|
- ref="selectContact"
|
|
|
|
|
|
|
+ <select-customer-contact
|
|
|
|
|
+ ref="selectCustomerContact"
|
|
|
:default-customer="customerInfo"
|
|
:default-customer="customerInfo"
|
|
|
- :query-params="queryContact"
|
|
|
|
|
- @save="selectContact" />
|
|
|
|
|
|
|
+ :query-params="queryCustomerContact"
|
|
|
|
|
+ @save="selectCustomerContact" />
|
|
|
<!-- 选择客户招标信息弹窗 -->
|
|
<!-- 选择客户招标信息弹窗 -->
|
|
|
- <select-customer-bid ref="selectCustomerBid" :query-params="queryContact" @save="selectCustomerBid" />
|
|
|
|
|
|
|
+ <select-customer-bid ref="selectCustomerBid" :query-params="queryCustomerContact" @save="selectCustomerBid" />
|
|
|
<!-- 选择销售工程师弹窗 -->
|
|
<!-- 选择销售工程师弹窗 -->
|
|
|
<select-user
|
|
<select-user
|
|
|
ref="selectSales"
|
|
ref="selectSales"
|
|
@@ -303,32 +251,38 @@
|
|
|
@save="selectSales" />
|
|
@save="selectSales" />
|
|
|
<!-- 选择经销商弹窗 -->
|
|
<!-- 选择经销商弹窗 -->
|
|
|
<select-distributor ref="selectDistributor" @save="selectDistributor" />
|
|
<select-distributor ref="selectDistributor" @save="selectDistributor" />
|
|
|
|
|
+ <!-- 选择渠道销售人员弹窗 -->
|
|
|
|
|
+ <select-distributor-contact
|
|
|
|
|
+ ref="selectDistributorContact"
|
|
|
|
|
+ :default-dist="distInfo"
|
|
|
|
|
+ :query-params="queryDistContact"
|
|
|
|
|
+ @save="selectDistributorContact" />
|
|
|
<!-- 选择产品弹窗 -->
|
|
<!-- 选择产品弹窗 -->
|
|
|
<select-product ref="selectProduct" multiple @save="selectProduct" />
|
|
<select-product ref="selectProduct" multiple @save="selectProduct" />
|
|
|
- <!-- 选择跟进负责人弹窗 -->
|
|
|
|
|
- <select-user ref="selectFollowUser" @save="selectFollowUser" />
|
|
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import businessApi from '@/api/proj/business'
|
|
|
|
|
- import AmountInput from '@/components/currency'
|
|
|
|
|
import to from 'await-to-js'
|
|
import to from 'await-to-js'
|
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
+ import businessApi from '@/api/proj/business'
|
|
|
|
|
+ import AmountInput from '@/components/currency'
|
|
|
import ProductTable from './ProductTable'
|
|
import ProductTable from './ProductTable'
|
|
|
- import SelectCustomerBid from '@/components/select/SelectCustomerBid'
|
|
|
|
|
- import SelectContact from '@/components/select/SelectCustomerContact'
|
|
|
|
|
import SelectCustomer from '@/components/select/SelectCustomer'
|
|
import SelectCustomer from '@/components/select/SelectCustomer'
|
|
|
- import SelectUser from '@/components/select/SelectUser'
|
|
|
|
|
|
|
+ import SelectCustomerContact from '@/components/select/SelectCustomerContact'
|
|
|
|
|
+ import SelectCustomerBid from '@/components/select/SelectCustomerBid'
|
|
|
import SelectDistributor from '@/components/select/SelectDistributor'
|
|
import SelectDistributor from '@/components/select/SelectDistributor'
|
|
|
|
|
+ import SelectDistributorContact from '@/components/select/SelectDistributorContact'
|
|
|
|
|
+ import SelectUser from '@/components/select/SelectUser'
|
|
|
import SelectProduct from '@/components/select/SelectProduct'
|
|
import SelectProduct from '@/components/select/SelectProduct'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'BusinessEdit',
|
|
name: 'BusinessEdit',
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ SelectCustomerContact,
|
|
|
|
|
+ SelectDistributorContact,
|
|
|
AmountInput,
|
|
AmountInput,
|
|
|
ProductTable,
|
|
ProductTable,
|
|
|
- SelectContact,
|
|
|
|
|
SelectProduct,
|
|
SelectProduct,
|
|
|
SelectDistributor,
|
|
SelectDistributor,
|
|
|
SelectCustomer,
|
|
SelectCustomer,
|
|
@@ -350,8 +304,9 @@
|
|
|
else callback()
|
|
else callback()
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|
|
|
- loading: false,
|
|
|
|
|
|
|
+ canSelectBid: true,
|
|
|
activeSteps: 1,
|
|
activeSteps: 1,
|
|
|
|
|
+ loading: false,
|
|
|
form: {
|
|
form: {
|
|
|
nboName: '',
|
|
nboName: '',
|
|
|
custId: undefined,
|
|
custId: undefined,
|
|
@@ -378,48 +333,54 @@
|
|
|
intervention: undefined,
|
|
intervention: undefined,
|
|
|
remark: undefined,
|
|
remark: undefined,
|
|
|
products: undefined,
|
|
products: undefined,
|
|
|
|
|
+ nboType: '30',
|
|
|
bidId: undefined,
|
|
bidId: undefined,
|
|
|
bidInfo: undefined,
|
|
bidInfo: undefined,
|
|
|
-
|
|
|
|
|
// 跟进
|
|
// 跟进
|
|
|
followTime: new Date(),
|
|
followTime: new Date(),
|
|
|
followUserId: undefined,
|
|
followUserId: undefined,
|
|
|
followUserName: undefined,
|
|
followUserName: undefined,
|
|
|
followContent: undefined,
|
|
followContent: undefined,
|
|
|
-
|
|
|
|
|
- //20230330 新添加编辑
|
|
|
|
|
- nextFollowTime: undefined,
|
|
|
|
|
- finalFollowTime: undefined,
|
|
|
|
|
- technicalSupportTime: undefined,
|
|
|
|
|
- technicalSupportName: undefined,
|
|
|
|
|
- technicalSupportContent: undefined,
|
|
|
|
|
- parentReceiver: undefined,
|
|
|
|
|
- capitalSource: undefined,
|
|
|
|
|
- nboBudgetTime: undefined,
|
|
|
|
|
- productSatisfaction: undefined,
|
|
|
|
|
- purchasingWay: undefined,
|
|
|
|
|
- purchasingTime: undefined,
|
|
|
|
|
- makerName: undefined,
|
|
|
|
|
- makerDept: undefined,
|
|
|
|
|
- dealerSalesName: undefined,
|
|
|
|
|
- accendant: undefined,
|
|
|
|
|
- isAdoptDashoo: undefined,
|
|
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
- nboName: [{ required: true, trigger: ['blur', 'change'], message: '请输入项目名称' }],
|
|
|
|
|
custName: [{ required: true, trigger: ['blur', 'change'], message: '请选择关联客户' }],
|
|
custName: [{ required: true, trigger: ['blur', 'change'], message: '请选择关联客户' }],
|
|
|
|
|
+ productLine: [{ required: true, trigger: ['blur', 'change'], message: '请选择产品线' }],
|
|
|
|
|
+ nboName: [{ required: true, trigger: ['blur', 'change'], message: '请输入项目名称' }],
|
|
|
nboSource: [{ required: true, trigger: ['blur', 'change'], message: '请选择项目来源' }],
|
|
nboSource: [{ required: true, trigger: ['blur', 'change'], message: '请选择项目来源' }],
|
|
|
- contactName: [{ required: true, trigger: ['blur', 'change'], message: '请选择主要联系人' }],
|
|
|
|
|
|
|
+ bidInfo: [{ required: true, trigger: ['blur', 'change'], message: '请选择招标信息' }],
|
|
|
saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
|
|
saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
|
|
|
salesModel: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售模式' }],
|
|
salesModel: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售模式' }],
|
|
|
distributorName: [
|
|
distributorName: [
|
|
|
{ validator: validateDistributor, trigger: ['blur', 'change'], message: '请选择经销商/代理商' },
|
|
{ validator: validateDistributor, trigger: ['blur', 'change'], message: '请选择经销商/代理商' },
|
|
|
],
|
|
],
|
|
|
isBig: [{ required: true, trigger: ['blur', 'change'], message: '请选择是否大项目' }],
|
|
isBig: [{ required: true, trigger: ['blur', 'change'], message: '请选择是否大项目' }],
|
|
|
- productLine: [{ required: true, trigger: ['blur', 'change'], message: '请选择产品线' }],
|
|
|
|
|
- // 跟进
|
|
|
|
|
- followTime: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进时间' }],
|
|
|
|
|
- followContent: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进内容' }],
|
|
|
|
|
|
|
+
|
|
|
|
|
+ nboType: [{ required: true, trigger: ['blur', 'change'], message: '请选择项目类别' }],
|
|
|
|
|
+ // C => B
|
|
|
|
|
+ nboBudget: [
|
|
|
|
|
+ { required: true, trigger: ['blur', 'change'], message: '请输入项目预算' },
|
|
|
|
|
+ // { validator: validateNboBudget, trigger: ['blur', 'change'], message: '项目预算应大于0' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ dealerSalesId: [{ required: true, trigger: ['blur', 'change'], message: '请选择渠道销售' }],
|
|
|
|
|
+ dealerSalesName: [{ required: true, trigger: ['blur', 'change'], message: '请选择项渠道销售人员' }],
|
|
|
|
|
+ dealerSalesContact: [{ required: true, trigger: ['blur', 'change'], message: '请输入渠道销售电话/微信' }],
|
|
|
|
|
+ estTransPrice: [{ required: true, trigger: ['blur', 'change'], message: '请选择预计出货金额' }],
|
|
|
|
|
+ // quotationFile: [{ required: true, trigger: ['blur', 'change'], message: '请选择报价单' }],
|
|
|
|
|
+ products: [{ required: true, trigger: ['blur', 'change'], message: '请选择产品' }],
|
|
|
|
|
+ // B => A
|
|
|
|
|
+ purchasingWay: [{ required: true, trigger: ['blur', 'change'], message: '请选择采购方式' }],
|
|
|
|
|
+ capitalSource: [{ required: true, trigger: ['blur', 'change'], message: '请输入资金来源' }],
|
|
|
|
|
+ planPurchaseTime: [{ required: true, trigger: ['blur', 'change'], message: '请选择计划采购时间' }],
|
|
|
|
|
+ contactId: [{ required: true, trigger: ['blur', 'change'], message: '请选择客户联系人' }],
|
|
|
|
|
+ contactName: [{ required: true, trigger: ['blur', 'change'], message: '请选择客户联系人姓名' }],
|
|
|
|
|
+ contactTelephone: [{ required: true, trigger: ['blur', 'change'], message: '请输入客户联系人电话/微信' }],
|
|
|
|
|
+ makerId: [{ required: true, trigger: ['blur', 'change'], message: '请选择客户决策人' }],
|
|
|
|
|
+ makerName: [{ required: true, trigger: ['blur', 'change'], message: '请选择客户决策人姓名' }],
|
|
|
|
|
+ makerDept: [{ required: true, trigger: ['blur', 'change'], message: '请选择客户决策部门' }],
|
|
|
|
|
+ customerIntentionFactory: [{ required: true, trigger: ['blur', 'change'], message: '请输入客户倾向厂家' }],
|
|
|
|
|
+ competitor: [{ required: true, trigger: ['blur', 'change'], message: '请输入竞争公司' }],
|
|
|
|
|
+ // isAdoptDashoo: [{ required: true, trigger: ['blur', 'change'], message: '请选择是或否' }],
|
|
|
|
|
+ // dashooParamFile: [{ validator: validateAdoptDashoo, trigger: ['blur', 'change'], message: '请选择上传文件' }],
|
|
|
},
|
|
},
|
|
|
title: '',
|
|
title: '',
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
@@ -427,11 +388,13 @@
|
|
|
salesModelOptions: [],
|
|
salesModelOptions: [],
|
|
|
productLineOptions: [],
|
|
productLineOptions: [],
|
|
|
yesOrNoOptions: [],
|
|
yesOrNoOptions: [],
|
|
|
- queryContact: {},
|
|
|
|
|
|
|
+ purchasingWayOptions: [],
|
|
|
|
|
+ queryCustomerContact: {},
|
|
|
customerInfo: {},
|
|
customerInfo: {},
|
|
|
|
|
+ queryDistContact: {},
|
|
|
|
|
+ distInfo: {},
|
|
|
productData: [],
|
|
productData: [],
|
|
|
isBid: true,
|
|
isBid: true,
|
|
|
- purchasingWayOptions: [],
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -444,7 +407,7 @@
|
|
|
watch: {
|
|
watch: {
|
|
|
custInfo: function (val) {
|
|
custInfo: function (val) {
|
|
|
this.form.custId = val.custId
|
|
this.form.custId = val.custId
|
|
|
- this.queryContact.custId = val.custId
|
|
|
|
|
|
|
+ this.queryCustomerContact.custId = val.custId
|
|
|
this.form.custName = val.custName
|
|
this.form.custName = val.custName
|
|
|
this.customerInfo = val
|
|
this.customerInfo = val
|
|
|
},
|
|
},
|
|
@@ -461,16 +424,15 @@
|
|
|
this.getDicts('sys_product_line'),
|
|
this.getDicts('sys_product_line'),
|
|
|
this.getDicts('sys_yes_no'),
|
|
this.getDicts('sys_yes_no'),
|
|
|
this.getDicts('proj_purchasing_way'),
|
|
this.getDicts('proj_purchasing_way'),
|
|
|
- ]).then(([nboSource, salesModel, productLine, yesOrNo, purchasingWay]) => {
|
|
|
|
|
|
|
+ ]).then(([nboSource, salesModel, productLine, yesOrNo, purchasing]) => {
|
|
|
this.nboSourceOptions = nboSource.data.values || []
|
|
this.nboSourceOptions = nboSource.data.values || []
|
|
|
this.salesModelOptions = salesModel.data.values || []
|
|
this.salesModelOptions = salesModel.data.values || []
|
|
|
this.productLineOptions = productLine.data.values || []
|
|
this.productLineOptions = productLine.data.values || []
|
|
|
this.yesOrNoOptions = yesOrNo.data.values || []
|
|
this.yesOrNoOptions = yesOrNo.data.values || []
|
|
|
- this.purchasingWayOptions = purchasingWay.data.values || []
|
|
|
|
|
|
|
+ this.purchasingWayOptions = purchasing.data.values || []
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
nextStep() {
|
|
nextStep() {
|
|
|
- console.log(typeof this.form.nboBudget)
|
|
|
|
|
if (this.activeSteps === 1) {
|
|
if (this.activeSteps === 1) {
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -494,12 +456,12 @@
|
|
|
handleSelectCustomer() {
|
|
handleSelectCustomer() {
|
|
|
this.$refs.selectCustomer.open()
|
|
this.$refs.selectCustomer.open()
|
|
|
},
|
|
},
|
|
|
- handleSelectContact() {
|
|
|
|
|
- if (!this.queryContact.custId) {
|
|
|
|
|
|
|
+ handleSelectCustomerContact() {
|
|
|
|
|
+ if (!this.queryCustomerContact.custId) {
|
|
|
this.$message.warning('请先选择客户')
|
|
this.$message.warning('请先选择客户')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- this.$refs.selectContact.open()
|
|
|
|
|
|
|
+ this.$refs.selectCustomerContact.open()
|
|
|
},
|
|
},
|
|
|
handleSelectSale() {
|
|
handleSelectSale() {
|
|
|
this.$refs.selectSales.open()
|
|
this.$refs.selectSales.open()
|
|
@@ -507,17 +469,17 @@
|
|
|
handleSelectDistributor() {
|
|
handleSelectDistributor() {
|
|
|
this.$refs.selectDistributor.open()
|
|
this.$refs.selectDistributor.open()
|
|
|
},
|
|
},
|
|
|
|
|
+ handleSelectDistributorContact() {
|
|
|
|
|
+ this.$refs.selectDistributorContact.open()
|
|
|
|
|
+ },
|
|
|
handleSelectProduct() {
|
|
handleSelectProduct() {
|
|
|
this.$refs.selectProduct.open()
|
|
this.$refs.selectProduct.open()
|
|
|
},
|
|
},
|
|
|
- handleSelectFollowUser() {
|
|
|
|
|
- this.$refs.selectFollowUser.open()
|
|
|
|
|
- },
|
|
|
|
|
handleSelectCustomerBid() {
|
|
handleSelectCustomerBid() {
|
|
|
if (!this.isBid) {
|
|
if (!this.isBid) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (!this.queryContact.custId) {
|
|
|
|
|
|
|
+ if (!this.queryCustomerContact.custId) {
|
|
|
this.$message.warning('请先选择客户')
|
|
this.$message.warning('请先选择客户')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -525,7 +487,7 @@
|
|
|
},
|
|
},
|
|
|
selectCustomer(val) {
|
|
selectCustomer(val) {
|
|
|
if (val && val.length > 0) {
|
|
if (val && val.length > 0) {
|
|
|
- this.queryContact.custId = val[0].id
|
|
|
|
|
|
|
+ this.queryCustomerContact.custId = val[0].id
|
|
|
this.customerInfo = {
|
|
this.customerInfo = {
|
|
|
custId: val[0].id,
|
|
custId: val[0].id,
|
|
|
custName: val[0].custName,
|
|
custName: val[0].custName,
|
|
@@ -541,12 +503,24 @@
|
|
|
this.form.nboName = this.form.custName + productLineName
|
|
this.form.nboName = this.form.custName + productLineName
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- selectContact(val) {
|
|
|
|
|
|
|
+ selectCustomerContact(val) {
|
|
|
if (val && val.length > 0) {
|
|
if (val && val.length > 0) {
|
|
|
this.form.contactId = val[0].id
|
|
this.form.contactId = val[0].id
|
|
|
this.form.contactName = val.map((item) => item.cuctName).join()
|
|
this.form.contactName = val.map((item) => item.cuctName).join()
|
|
|
this.form.contactPostion = val.map((item) => item.postion).join()
|
|
this.form.contactPostion = val.map((item) => item.postion).join()
|
|
|
- this.form.contactTelephone = val.map((item) => item.telephone).join()
|
|
|
|
|
|
|
+ this.form.contactTelephone = val
|
|
|
|
|
+ .map((item) => {
|
|
|
|
|
+ if (item.telephone !== '' && item.wechat !== '') {
|
|
|
|
|
+ return item.telephone + '/' + item.wechat
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.telephone !== '') {
|
|
|
|
|
+ return item.telephone
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.wechat !== '') {
|
|
|
|
|
+ return item.wechat
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .join()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
selectSales(val) {
|
|
selectSales(val) {
|
|
@@ -557,12 +531,39 @@
|
|
|
},
|
|
},
|
|
|
selectDistributor(val) {
|
|
selectDistributor(val) {
|
|
|
if (val && val.length > 0) {
|
|
if (val && val.length > 0) {
|
|
|
|
|
+ this.form.dealerSalesId = undefined
|
|
|
|
|
+ this.form.dealerSalesName = undefined
|
|
|
|
|
+ this.form.dealerSalesContact = undefined
|
|
|
|
|
+
|
|
|
|
|
+ this.queryDistContact = {
|
|
|
|
|
+ distId: val[0].id,
|
|
|
|
|
+ }
|
|
|
|
|
+ this.distInfo = {
|
|
|
|
|
+ distId: val[0].id,
|
|
|
|
|
+ distName: val[0].distName,
|
|
|
|
|
+ }
|
|
|
this.form.distributorId = val[0].id
|
|
this.form.distributorId = val[0].id
|
|
|
this.form.distributorName = val.map((item) => item.distName).join()
|
|
this.form.distributorName = val.map((item) => item.distName).join()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- selectFollowUser(val) {
|
|
|
|
|
- this.form.followUserName = val.map((item) => item.nickName).join()
|
|
|
|
|
|
|
+ selectDistributorContact(val) {
|
|
|
|
|
+ if (val && val.length > 0) {
|
|
|
|
|
+ this.form.dealerSalesId = val[0].id
|
|
|
|
|
+ this.form.dealerSalesName = val.map((item) => item.name).join()
|
|
|
|
|
+ this.form.dealerSalesContact = val
|
|
|
|
|
+ .map((item) => {
|
|
|
|
|
+ if (item.phone !== '' && item.wechat !== '') {
|
|
|
|
|
+ return item.phone + '/' + item.wechat
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.phone !== '') {
|
|
|
|
|
+ return item.phone
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.wechat !== '') {
|
|
|
|
|
+ return item.wechat
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .join()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
selectProduct(data) {
|
|
selectProduct(data) {
|
|
|
let projData = data.map((item) => ({
|
|
let projData = data.map((item) => ({
|
|
@@ -578,7 +579,6 @@
|
|
|
this.productData = this.removeDuplicateObj(this.productData)
|
|
this.productData = this.removeDuplicateObj(this.productData)
|
|
|
},
|
|
},
|
|
|
selectCustomerBid(val) {
|
|
selectCustomerBid(val) {
|
|
|
- console.log(val)
|
|
|
|
|
if (val && val.length > 0) {
|
|
if (val && val.length > 0) {
|
|
|
this.form.bidId = val[0].id
|
|
this.form.bidId = val[0].id
|
|
|
this.form.bidInfo = val[0].title
|
|
this.form.bidInfo = val[0].title
|
|
@@ -608,10 +608,18 @@
|
|
|
this.productData = data
|
|
this.productData = data
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- showEdit(row) {
|
|
|
|
|
|
|
+ showEdit(row, bid) {
|
|
|
this.activeSteps = 1
|
|
this.activeSteps = 1
|
|
|
this.productData = []
|
|
this.productData = []
|
|
|
- if (!row) {
|
|
|
|
|
|
|
+ if (bid) {
|
|
|
|
|
+ this.canSelectBid = false
|
|
|
|
|
+ this.isBid = true
|
|
|
|
|
+ this.selectCustomer([{ id: bid.custId, custName: bid.cuctName }])
|
|
|
|
|
+ this.selectCustomerBid([bid])
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.canSelectBid = true
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!row.id) {
|
|
|
this.title = '添加'
|
|
this.title = '添加'
|
|
|
if (this.roleKeys.includes('SalesEngineer') || this.roleKeys.includes('ProductLineManager')) {
|
|
if (this.roleKeys.includes('SalesEngineer') || this.roleKeys.includes('ProductLineManager')) {
|
|
|
this.form.saleId = this.userId
|
|
this.form.saleId = this.userId
|
|
@@ -624,17 +632,18 @@
|
|
|
if (this.form.bidId) {
|
|
if (this.form.bidId) {
|
|
|
this.isBid = true
|
|
this.isBid = true
|
|
|
}
|
|
}
|
|
|
- this.queryContact.custId = this.form.custId
|
|
|
|
|
- this.customerInfo = {
|
|
|
|
|
- custId: this.form.custId,
|
|
|
|
|
- custName: this.form.custName,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.queryCustomerContact.custId = this.form.custId
|
|
|
|
|
+ this.customerInfo = { custId: this.form.custId, custName: this.form.custName }
|
|
|
|
|
+ this.queryDistContact = { distId: this.form.distributorId }
|
|
|
|
|
+ this.distInfo = { distId: this.form.distributorId, distName: this.form.distributorName }
|
|
|
this.getProductData(row.id)
|
|
this.getProductData(row.id)
|
|
|
}
|
|
}
|
|
|
|
|
+ this.$nextTick(() => this.$refs['form'].clearValidate())
|
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
},
|
|
|
close() {
|
|
close() {
|
|
|
this.$refs['form'].resetFields()
|
|
this.$refs['form'].resetFields()
|
|
|
|
|
+ this.$refs['form'].clearValidate()
|
|
|
this.form = this.$options.data().form
|
|
this.form = this.$options.data().form
|
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -647,6 +656,7 @@
|
|
|
if (this.form.id) {
|
|
if (this.form.id) {
|
|
|
const [err, res] = await to(businessApi.doEdit(this.form))
|
|
const [err, res] = await to(businessApi.doEdit(this.form))
|
|
|
if (err) {
|
|
if (err) {
|
|
|
|
|
+ this.loading = false
|
|
|
this.$baseMessage(res.msg, 'error')
|
|
this.$baseMessage(res.msg, 'error')
|
|
|
} else {
|
|
} else {
|
|
|
this.$baseMessage(res.msg, 'success')
|
|
this.$baseMessage(res.msg, 'success')
|
|
@@ -654,6 +664,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
const [err, res] = await to(businessApi.doAdd(this.form))
|
|
const [err, res] = await to(businessApi.doAdd(this.form))
|
|
|
if (err) {
|
|
if (err) {
|
|
|
|
|
+ this.loading = false
|
|
|
this.$baseMessage(res.msg, 'error')
|
|
this.$baseMessage(res.msg, 'error')
|
|
|
} else {
|
|
} else {
|
|
|
this.$baseMessage(res.msg, 'success')
|
|
this.$baseMessage(res.msg, 'success')
|