|
|
@@ -24,15 +24,17 @@
|
|
|
<card style="padding: 0">
|
|
|
<DkTabs ref="tab" v-model="tabsModel" :options="tabsOptions" @on-click="clickTab"></DkTabs>
|
|
|
<DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
|
|
|
- :height="this.tableHeight-50" :primaryKey="tabsModel===$t('followTask2')?'planId':'followId'"
|
|
|
- @pageChange="pageSizeChange"
|
|
|
+ :height="this.tableHeight-50"
|
|
|
+ primaryKey="followId"
|
|
|
+ :page-size-opts="pageSizeOpts"
|
|
|
:page-size="pageInfo.pageSize"
|
|
|
+ :choose-flag="false"
|
|
|
name="table">
|
|
|
- <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerCode"
|
|
|
+ <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusCode"
|
|
|
@on-link="openCustomerMessage"></DkTableColumn>
|
|
|
- <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerName"
|
|
|
+ <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusName"
|
|
|
@on-link="openCustomerMessage"></DkTableColumn>
|
|
|
- <DkTableColumn field="customerPhone"></DkTableColumn>
|
|
|
+ <DkTableColumn field="cusPhone"></DkTableColumn>
|
|
|
<DkTableColumn field="addressFull"></DkTableColumn>
|
|
|
<DkTableColumn field="contactName"></DkTableColumn>
|
|
|
<DkTableColumn field="contactPhones"></DkTableColumn>
|
|
|
@@ -85,103 +87,77 @@
|
|
|
<Radio label="2">{{ $t('receptionNew') }}</Radio>
|
|
|
<Radio label="1">{{ $t('receptionOld') }}</Radio>
|
|
|
</RadioGroup>
|
|
|
- <DkCollapse ref="collapse">
|
|
|
+ <DkCollapse ref="collapse" v-if="receptionType=='1'">
|
|
|
<DkPanel prop="customerInfo">
|
|
|
- <DkForm slot="content" ref="formReception" style="width:100%;" :label-max-words="6">
|
|
|
+ <DkForm slot="content" ref="formReception" v-model="customerInfo4" style="width:100%;">
|
|
|
<!--客户名称-->
|
|
|
- <DkFormItem prop="customerName" :errorMessage="getErrMessage('customerName')" required>
|
|
|
- <InputPop v-model="customerInfo4.customerName"/>
|
|
|
+ <DkFormItem prop="cusName" :required="true">
|
|
|
+ <InputPop v-model="customerInfo4.cusName"/>
|
|
|
</DkFormItem>
|
|
|
<!--客户电话-->
|
|
|
- <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')" required>
|
|
|
- <InputPop :telephone="true" v-model="customerInfo4.customerPhone" @on-change="changeTel"/>
|
|
|
+ <DkFormItem prop="cusPhone" :required="true">
|
|
|
+ <InputPop :telephone="true" v-model="customerInfo4.cusPhone" @on-change="changeTel"/>
|
|
|
+ </DkFormItem>
|
|
|
+ <!--客户区域-->
|
|
|
+ <DkFormItem prop="addressName" :required="true">
|
|
|
+ <RegionsChoose v-model="addressArea" :options="cityData" :default-value="customerInfo4.addressName"
|
|
|
+ ref="customerDistrict"
|
|
|
+ @on-choose="chooseAddress"></RegionsChoose>
|
|
|
</DkFormItem>
|
|
|
- <!--行政区划-->
|
|
|
- <!-- <DkFormItem prop="customerDistrict" :errorMessage="getErrMessage('customerDistrict')">-->
|
|
|
- <!-- <!– 高德 –>-->
|
|
|
- <!-- <RegionsChooseAmap v-model="regionData" :options="cityData" ref="RegionsChoose"-->
|
|
|
- <!-- :default-value="customerInfo4.addressName"-->
|
|
|
- <!-- @on-choose="chooseAddress"></RegionsChooseAmap>-->
|
|
|
- <!-- </DkFormItem>-->
|
|
|
<!--门牌号-->
|
|
|
- <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
|
|
|
+ <DkFormItem :label="$t('addressNo')" prop="addressNo">
|
|
|
<InputPop v-model="customerInfo4.addressNo" @input="setAddressFull"/>
|
|
|
</DkFormItem>
|
|
|
<!--详细地址-->
|
|
|
- <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
|
|
|
+ <DkFormItem :label="$t('addressFull')" prop="addressFull">
|
|
|
<InputPop v-model="customerInfo4.addressFull" readonly/>
|
|
|
</DkFormItem>
|
|
|
</DkForm>
|
|
|
</DkPanel>
|
|
|
- <DkPanel prop="receptionNew">
|
|
|
- <DkForm slot="content" ref="formReceptionNew" style="width:100%;" :label-max-words="6">
|
|
|
- <!-- 客户意向-->
|
|
|
- <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
|
|
|
- <SelectPop v-model="customerInfo4.intention" :options="intentionList.filter((it)=>it.dataName!=='已流失')"
|
|
|
+ <DkPanel prop="receptionOld" v-if="receptionType=='1'">
|
|
|
+ <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
|
|
|
+ <!-- 客户意向-->
|
|
|
+ <DkFormItem prop="intention" :required="true">
|
|
|
+ <SelectPop v-model="customerInfo4.intention" :options="intentionList"
|
|
|
:multiple="false" :clearable="false"
|
|
|
- label-key="dataName" value-key="dataCode" transfer
|
|
|
- @on-change="(val)=>cleanCompetitiveBrands(val, 'customerInfo4')"/>
|
|
|
- </DkFormItem>
|
|
|
- <!-- 竞品品牌-->
|
|
|
- <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')" required>
|
|
|
- <InputPop v-model="customerInfo4.competitiveBrands" maxlength="100"/>
|
|
|
- </DkFormItem>
|
|
|
- <!-- 意向品类-->
|
|
|
- <DkFormItem prop="intentionInfo" :errorMessage="getErrMessage('intentionInfo')">
|
|
|
- <DkRow>
|
|
|
- <Col span="8" v-for="(item, index) of goodsSpecsList" :key="index">
|
|
|
- <div v-if="!item.otherFlag">
|
|
|
- <Col span="12">
|
|
|
- <Checkbox v-model="customerInfo4.intentionInfo[index].value"
|
|
|
- @on-change="selectIntentionInfo(customerInfo4.intentionInfo[index])"
|
|
|
- >{{ item.specsName }}
|
|
|
- </Checkbox>
|
|
|
- </Col>
|
|
|
- <Col span="12">
|
|
|
- <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
|
|
|
- </Col>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <Col span="12">
|
|
|
- <Checkbox v-model="customerInfo4.intentionInfo[index].value"
|
|
|
- :disabled="!customerInfo4.intentionInfo[index].other">
|
|
|
- </Checkbox>
|
|
|
- <Poptip transfer width="500" placement="left">
|
|
|
- <a>{{ item.specsName }}</a>
|
|
|
- <div slot="content">
|
|
|
- <RadioGroup v-model="otherIntentionInfo" @on-change="radioChange('4')">
|
|
|
- <Col span="6" v-for="(item2, index2) of item.children" :key="index2">
|
|
|
- <radio :label="item2.specsId">{{ item2.specsName }}</radio>
|
|
|
- </Col>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- </Poptip>
|
|
|
- </Col>
|
|
|
- <Col span="12">
|
|
|
- <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
|
|
|
- </Col>
|
|
|
- </div>
|
|
|
- </Col>
|
|
|
- </DkRow>
|
|
|
+ label-key="kindName" value-key="kindCode" transfer/>
|
|
|
</DkFormItem>
|
|
|
<!--留店时长-->
|
|
|
- <DkFormItem prop="stayTimeLen" :errorMessage="getErrMessage('stayTimeLen')">
|
|
|
+ <DkFormItem prop="stayTimeLen">
|
|
|
<SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
|
|
|
:clearable="false"
|
|
|
- label-key="dataName" value-key="dataCode" transfer/>
|
|
|
+ label-key="kindName" value-key="kindCode" transfer/>
|
|
|
</DkFormItem>
|
|
|
<!--下次邀约时间(提醒时间)-->
|
|
|
- <DkFormItem prop="nextFollowTime" :errorMessage="getErrMessage('nextFollowTime')">
|
|
|
+ <DkFormItem prop="nextFollowTime">
|
|
|
<DatePickerPop type="datetime" v-model="customerInfo4.nextFollowTime" transfer
|
|
|
format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
</DkFormItem>
|
|
|
<!--跟进内容-->
|
|
|
- <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')" required>
|
|
|
+ <DkFormItem prop="followData" :required="true">
|
|
|
<InputPop textarea-flag v-model="customerInfo4.followData" maxlength="100"/>
|
|
|
</DkFormItem>
|
|
|
- <!--下次跟进计划-->
|
|
|
- <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
|
|
|
- <InputPop textarea-flag v-model="customerInfo4.nextFollowPlan" maxlength="100"/>
|
|
|
+ </DkForm>
|
|
|
+ </DkPanel>
|
|
|
+ </DkCollapse>
|
|
|
+ <DkCollapse ref="collapse" v-if="receptionType=='2'">
|
|
|
+ <DkPanel prop="receptionNew">
|
|
|
+ <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
|
|
|
+ <!-- 客户意向-->
|
|
|
+ <DkFormItem prop="intention" :required="true">
|
|
|
+ <SelectPop v-model="customerInfo4.intention" :options="intentionList"
|
|
|
+ :multiple="false" :clearable="false"
|
|
|
+ label-key="kindName" value-key="kindCode" transfer/>
|
|
|
+ </DkFormItem>
|
|
|
+ <!--留店时长-->
|
|
|
+ <DkFormItem prop="stayTimeLen">
|
|
|
+ <SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
|
|
|
+ :clearable="false"
|
|
|
+ label-key="kindName" value-key="kindCode" transfer/>
|
|
|
+ </DkFormItem>
|
|
|
+ <!--跟进内容-->
|
|
|
+ <DkFormItem prop="followData" :required="true">
|
|
|
+ <InputPop v-model="customerInfo4.followData" maxlength="100"/>
|
|
|
</DkFormItem>
|
|
|
</DkForm>
|
|
|
</DkPanel>
|
|
|
@@ -190,7 +166,7 @@
|
|
|
<p slot="title">
|
|
|
{{ $t('appendix') }}
|
|
|
</p>
|
|
|
- <DkPicWall v-model="customerInfo4.annexPaths.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
|
|
|
+ <DkPicWall v-model="customerInfo4.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
@@ -204,69 +180,70 @@
|
|
|
<DkPanel prop="customerInfo">
|
|
|
<DkForm slot="content" ref="formMeasure" style="width:100%;" name="dk-form" v-model="customerInfo5">
|
|
|
<!--客户名称-->
|
|
|
- <DkFormItem prop="customerId" :errorMessage="getErrMessage('customerId')">
|
|
|
- <span>{{ customerInfo.customerName }}</span>
|
|
|
+ <DkFormItem prop="cusName">
|
|
|
+ <InputPop v-model="customerInfo.cusName" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--客户电话-->
|
|
|
- <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')">
|
|
|
- <span>{{ customerInfo.customerPhone }}</span>
|
|
|
+ <DkFormItem prop="cusPhone">
|
|
|
+ <InputPop v-model="customerInfo.cusPhone" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--详细地址-->
|
|
|
- <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
|
|
|
- <span>{{ customerInfo.addressFull }}</span>
|
|
|
+ <DkFormItem :label="$t('addressFull')" prop="addressFull">
|
|
|
+ <InputPop v-model="customerInfo.addressFull" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--门牌号-->
|
|
|
- <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
|
|
|
- <span>{{ customerInfo.addressNo }}</span>
|
|
|
+ <DkFormItem :label="$t('addressNo')" prop="addressNo">
|
|
|
+ <InputPop v-model="customerInfo.addressNo" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--导购员-->
|
|
|
- <DkFormItem :label="$t('shoppingGuide')" required>
|
|
|
- {{ $store.state.user.userName }}
|
|
|
+ <DkFormItem :label="$t('staffName')">
|
|
|
+ <InputPop v-model="customerInfo.staffName" :readonly="true"/>
|
|
|
</DkFormItem>
|
|
|
<!--是否复尺-->
|
|
|
- <DkFormItem prop="flgAgainMeasure" :errorMessage="getErrMessage('flgAgainMeasure')" required>
|
|
|
+ <DkFormItem prop="flgAgainMeasure" :required="true">
|
|
|
<RadioGroup v-model="customerInfo5.flgAgainMeasure">
|
|
|
<Radio label="true">{{ $t('yes') }}</Radio>
|
|
|
<Radio label="false">{{ $t('no') }}</Radio>
|
|
|
</RadioGroup>
|
|
|
</DkFormItem>
|
|
|
<!--量尺备注-->
|
|
|
- <DkFormItem prop="measureRemarks" :errorMessage="getErrMessage('measureRemarks')">
|
|
|
+ <DkFormItem prop="measureRemarks">
|
|
|
<InputPop textarea-flag v-model="customerInfo5.measureRemarks" maxlength="100"/>
|
|
|
</DkFormItem>
|
|
|
<!--量尺时间-->
|
|
|
- <DkFormItem prop="measureTime" :errorMessage="getErrMessage('measureTime')" required>
|
|
|
+ <DkFormItem prop="measureTime" :required="true">
|
|
|
<DatePickerPop type="datetime" v-model="customerInfo5.measureTime" transfer/>
|
|
|
</DkFormItem>
|
|
|
</DkForm>
|
|
|
</DkPanel>
|
|
|
<DkPanel prop="appendix">
|
|
|
<!-- 下拉区域 -->
|
|
|
- <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="7">
|
|
|
- <div v-for="(item,index) of customerInfo5.measureAnnex" :key="index">
|
|
|
- <DkFormItem :label="$t('usedLocation2')" prop="usedLocation"
|
|
|
- :errorMessage="getErrMessage('usedLocation')"
|
|
|
- required>
|
|
|
- <InputPop v-model="item.usedLocation" maxlength="100"/>
|
|
|
+ <DkForm slot="content" ref="formInline" v-model="customerInfo5" style="width: 100%" :labelMaxWords="7"
|
|
|
+ :col-count="1">
|
|
|
+ <div v-for="(item,index) of customerInfo5.measureRoomList" :key="index" style="width: 100%;margin:25px 35px">
|
|
|
+ <DkFormItem :label="$t('usedLocation2')" prop="roomName" :required="true">
|
|
|
+ <InputPop v-model="item.roomName" maxlength="100"/>
|
|
|
</DkFormItem>
|
|
|
- <DkPicWall v-model="item.annexPaths" folder="t_csm_follow/measure_annex"></DkPicWall>
|
|
|
- <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error"></Button>
|
|
|
+ <div style="display: flex;justify-content: space-between;align-items: center">
|
|
|
+ <DkPicWall v-model="item.measureAnnex"></DkPicWall>
|
|
|
+ <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error" style="width: 30px"></Button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px"></Button>
|
|
|
+ <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px;margin-left: 20px"></Button>
|
|
|
</DkForm>
|
|
|
</DkPanel>
|
|
|
</DkCollapse>
|
|
|
</DkModal>
|
|
|
|
|
|
<!-- 跟进任务-->
|
|
|
- <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.customerNames"
|
|
|
+ <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.cusNames"
|
|
|
:customer-ids="customerInfo6.customerIds" @ok="initData(1)"/>
|
|
|
|
|
|
<!-- 跟进-->
|
|
|
<Follow v-model="followModal" :goods-specs="goodsSpecsList" :customer-data="customerInfo"
|
|
|
:goods-specs-list-back-up="goodsSpecsListBackUp" ref="modal_inner_follow"
|
|
|
:intention-list="intentionList" :invite-result-list="inviteResultList"
|
|
|
- :follow-type-list="followTypeList"></Follow>
|
|
|
+ :follow-type-list="followTypeList" :stay-time-len="stayTimeLenList"></Follow>
|
|
|
|
|
|
<Modal v-model="filesShow" :title="$t('files')" @on-cancel="currentRow={}">
|
|
|
|
|
|
@@ -279,13 +256,13 @@
|
|
|
</div>
|
|
|
|
|
|
<divider v-if="currentRow && currentRow.annexPaths && currentRow.annexPaths.annexPaths &&
|
|
|
- currentRow.annexPaths.annexPaths.length>0 && currentRow.measureAnnex"/>
|
|
|
+ currentRow.annexPaths.annexPaths.length>0 && currentRow.measureRoomList"/>
|
|
|
|
|
|
- <div v-if="currentRow.measureAnnex">
|
|
|
- <span v-if="currentRow.measureAnnex">{{ $t('measureAnnex') }}</span>
|
|
|
- <div v-for="(item, index) of currentRow.measureAnnex" :key="index">
|
|
|
- <Tag style="margin-left: 5px">{{ item.usedLocation }}</Tag>
|
|
|
- <DkPicWall v-model="item.annexPaths" only-show></DkPicWall>
|
|
|
+ <div v-if="currentRow.measureRoomList">
|
|
|
+ <span v-if="currentRow.measureRoomList">{{ $t('measureRoomList') }}</span>
|
|
|
+ <div v-for="(item, index) of currentRow.measureRoomList" :key="index">
|
|
|
+ <Tag style="margin-left: 5px">{{ item.roomName }}</Tag>
|
|
|
+ <DkPicWall v-model="item.measureAnnex" only-show></DkPicWall>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
@@ -294,19 +271,18 @@
|
|
|
|
|
|
<script>
|
|
|
import {indexMixin} from '@/mixins'
|
|
|
-import FollowTask from './follow-task'
|
|
|
import Follow from './follow'
|
|
|
|
|
|
export default {
|
|
|
- name: 'customer-follow',
|
|
|
+ name: 'cus-follow',
|
|
|
mixins: [indexMixin],
|
|
|
components: {
|
|
|
- FollowTask,
|
|
|
Follow
|
|
|
},
|
|
|
data() {
|
|
|
let self = this
|
|
|
return {
|
|
|
+ addressArea: [],
|
|
|
cityData: [],
|
|
|
//当前展示行附件
|
|
|
currentRow: {},
|
|
|
@@ -315,35 +291,36 @@ export default {
|
|
|
customerReadOnly: false,
|
|
|
// 客户信息 接待
|
|
|
customerInfo4: {
|
|
|
- customerId: null,
|
|
|
- customerName: '',
|
|
|
- customerPhone: null,
|
|
|
- addressFull: null,
|
|
|
- addressNo: null,
|
|
|
+ cusId: null,
|
|
|
+ cusName: '',
|
|
|
+ cusPhone: null,
|
|
|
followData: null,
|
|
|
- nextFollowPlan: null,
|
|
|
followType: null,
|
|
|
stayTimeLen: 1,
|
|
|
nextFollowTime: null,
|
|
|
intention: null,
|
|
|
competitiveBrands: null,
|
|
|
intentionInfo: [],
|
|
|
- annexPaths: {
|
|
|
- annexPaths: []
|
|
|
- },
|
|
|
+ addressArea: null, // 行政区划
|
|
|
+ addressGcj02: null, // 经纬度
|
|
|
+ addressName: null, // 小区
|
|
|
+ addressNo: null, // 门牌号
|
|
|
+ addressFull: null, // 详细地址
|
|
|
+ annexPaths: null,
|
|
|
},
|
|
|
// 客户信息 量尺回执
|
|
|
customerInfo5: {
|
|
|
+ cusId:null,
|
|
|
followId: null,
|
|
|
flgAgainMeasure: 'false',
|
|
|
measureRemarks: null,
|
|
|
- measureTime: new Date(),
|
|
|
- measureAnnex: [{usedLocation: null, annexPaths: []}],
|
|
|
+ measureTime: new Date().format(),
|
|
|
+ measureRoomList: [{roomName: null, measureAnnex: null,displayNo:null,}],
|
|
|
},
|
|
|
// 客户信息 跟进任务
|
|
|
customerInfo6: {
|
|
|
customerIds: [],
|
|
|
- customerNames: [],
|
|
|
+ cusNames: [],
|
|
|
followUsers: []
|
|
|
},
|
|
|
// 错误信息
|
|
|
@@ -371,56 +348,21 @@ export default {
|
|
|
receptionModal: false,
|
|
|
// 接待类型 1 留资 2 陌生
|
|
|
receptionType: '2',
|
|
|
- regionData: [],
|
|
|
- // 接待校验
|
|
|
- rule4: {
|
|
|
- customerName: [
|
|
|
- {required: true, trigger: 'none'},
|
|
|
- ],
|
|
|
- customerPhone: [
|
|
|
- {required: true, trigger: 'none'},
|
|
|
- {
|
|
|
- required: true,
|
|
|
- trigger: 'none',
|
|
|
- max: 11,
|
|
|
- min: 11,
|
|
|
- message: self.$t('W_071', {'param': self.$t('customerPhone')})
|
|
|
- },
|
|
|
- ],
|
|
|
- followData: [
|
|
|
- {required: true, trigger: 'none'},
|
|
|
- ],
|
|
|
- intention: [
|
|
|
- {required: true, trigger: 'none'},
|
|
|
- ],
|
|
|
- },
|
|
|
- // 回执校验
|
|
|
- rule5: {
|
|
|
- flgAgainMeasure: [
|
|
|
- {required: true, trigger: 'none'},
|
|
|
- ],
|
|
|
- measureTime: [
|
|
|
- {required: true, trigger: 'none', type: 'date'},
|
|
|
- ],
|
|
|
- },
|
|
|
- // 客成状态list
|
|
|
- saleStatusList: [],
|
|
|
// 留店时长list
|
|
|
stayTimeLenList: [],
|
|
|
// 查询条件
|
|
|
searchCond: {},
|
|
|
- //TODO 以后会是动态的所以先做个查询的例子
|
|
|
searchContent: [
|
|
|
{
|
|
|
- valueFormat: {code: 'customerCode'},
|
|
|
+ valueFormat: {code: 'cusCode'},
|
|
|
valueKind: 'STR'
|
|
|
},
|
|
|
{
|
|
|
- valueFormat: {code: 'customerName'},
|
|
|
+ valueFormat: {code: 'cusName'},
|
|
|
valueKind: 'STR'
|
|
|
},
|
|
|
{
|
|
|
- valueFormat: {code: 'customerPhone'},
|
|
|
+ valueFormat: {code: 'cusPhone'},
|
|
|
valueKind: 'STR'
|
|
|
},
|
|
|
{
|
|
|
@@ -484,6 +426,8 @@ export default {
|
|
|
tabsOptions: [
|
|
|
{label: self.$t('allReceipt'), name: self.$t('allReceipt')},
|
|
|
{label: self.$t('followTask2'), name: self.$t('followTask2')},
|
|
|
+ {label: self.$t('followToStore'), name: self.$t('followToStore')},
|
|
|
+ {label: self.$t('followReserve'), name: self.$t('followReserve')}
|
|
|
],
|
|
|
pageInfo: {
|
|
|
total: 0,
|
|
|
@@ -499,8 +443,8 @@ export default {
|
|
|
* @date : 2024-02-01 14:23
|
|
|
*/
|
|
|
openCustomerMessage(row) {
|
|
|
- if (row['customerId']) {
|
|
|
- this.$router.push('/sale/customer/detail/' + row['customerId'])
|
|
|
+ if (row['cusId']) {
|
|
|
+ this.$router.push('/sale/customer/detail/' + row['cusId'])
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
@@ -509,7 +453,7 @@ export default {
|
|
|
* @date : 2024-02-01 14:23
|
|
|
*/
|
|
|
addNewMeasureAnnex() {
|
|
|
- this.customerInfo5.measureAnnex.push({"usedLocation": null, "annexPaths": null})
|
|
|
+ this.customerInfo5.measureRoomList.push({"roomName": null, "measureAnnex": null, "displayNo": null})
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 关闭接待弹窗
|
|
|
@@ -518,18 +462,18 @@ export default {
|
|
|
*/
|
|
|
cancelReception() {
|
|
|
this.receptionModal = false
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : checkBox修改意向品类
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:23
|
|
|
- */
|
|
|
- selectIntentionInfo(val) {
|
|
|
- if (val.value) {
|
|
|
- val.count = 1
|
|
|
- } else {
|
|
|
- val.count = 0
|
|
|
- }
|
|
|
+ this.customerInfo4.cusId = null
|
|
|
+ this.customerInfo4.cusName = null
|
|
|
+ this.customerInfo4.cusPhone = null
|
|
|
+ this.customerInfo4.addressFull = null
|
|
|
+ this.customerInfo4.addressNo = null
|
|
|
+ this.customerInfo4.addressName = null
|
|
|
+ this.customerInfo4.addressArea = null
|
|
|
+ this.customerInfo4.addressGcj02 = null
|
|
|
+ this.customerInfo4.followData = null
|
|
|
+ this.customerInfo4.intention = null
|
|
|
+ this.customerInfo4.nextFollowTime = null
|
|
|
+ this.customerInfo4.stayTimeLen = null
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 取消量尺回执
|
|
|
@@ -539,7 +483,7 @@ export default {
|
|
|
cancelMeasure() {
|
|
|
this.measureModal = false
|
|
|
this.$refs['formMeasure'].$refs['dk-form'].resetFields()
|
|
|
- this.customerInfo5.measureAnnex = [{usedLocation: null, annexPaths: null}]
|
|
|
+ this.customerInfo5.measureRoomList = [{roomName: null, annexPaths: null}]
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 接待输入电话
|
|
|
@@ -547,7 +491,32 @@ export default {
|
|
|
* @date : 2024-02-01 14:23
|
|
|
*/
|
|
|
changeTel() {
|
|
|
-
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.customerInfo4.cusPhone == null || this.customerInfo4.cusPhone == '') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ cusPhone: this.customerInfo4.cusPhone
|
|
|
+ }
|
|
|
+ this.excute(this.$service.customerService, this.$service.customerService.selectByCondNoPage, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ if (res.data) {
|
|
|
+ this.customerInfo4.cusId = res.data[0].cusId
|
|
|
+ this.customerInfo4.cusName = res.data[0].cusName
|
|
|
+ this.customerInfo4.cusPhone = res.data[0].cusPhone
|
|
|
+ this.customerInfo4.addressFull = res.data[0].addressFull
|
|
|
+ this.customerInfo4.addressNo = res.data[0].addressNo
|
|
|
+ this.customerInfo4.addressName = res.data[0].addressName
|
|
|
+ this.customerInfo4.addressArea = res.data[0].addressArea
|
|
|
+ this.customerInfo4.addressGcj02 = res.data[0].addressGcj02
|
|
|
+ } else {
|
|
|
+ this.customerInfo4.cusId = null
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 选择地址
|
|
|
@@ -555,45 +524,34 @@ export default {
|
|
|
* @date : 2024-02-01 14:23
|
|
|
*/
|
|
|
chooseAddress(value) {
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 清除竞争品牌
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:23
|
|
|
- */
|
|
|
- cleanCompetitiveBrands(val, col) {
|
|
|
-
|
|
|
+ this.customerInfo4.customerDistrict = value;
|
|
|
+ // 说明是清空
|
|
|
+ if (!value) {
|
|
|
+ this.customerInfo4.addressName = null;
|
|
|
+ this.customerInfo4.addressArea = {};
|
|
|
+ this.customerInfo4.addressFull = null;
|
|
|
+ this.customerInfo4.addressGcj02 = {};
|
|
|
+ } else {
|
|
|
+ //按照title进行
|
|
|
+ this.customerInfo4.addressName = value.addressName;
|
|
|
+ this.customerInfo4.addressArea = value.addressArea;
|
|
|
+ this.customerInfo4.addressGcj02 = value.addressGcj02;
|
|
|
+ this.customerInfo4.addressFull = value.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '');
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 点击tab
|
|
|
* @author : 付斌
|
|
|
* @date : 2024-02-01 14:24
|
|
|
*/
|
|
|
- clickTab(val) {
|
|
|
- if (val == this.$t('followTask2')) {
|
|
|
- // 仅在跟进任务添加此查询条件
|
|
|
- this.searchContent.push(
|
|
|
- {
|
|
|
- valueFormat: {
|
|
|
- code: 'finishStatus',
|
|
|
- data: [
|
|
|
- {id: 1, name: '完结'},
|
|
|
- {id: 2, name: '逾期'},
|
|
|
- {id: 3, name: '未逾期'},
|
|
|
- ],
|
|
|
- valueKey: 'id',
|
|
|
- labelKey: 'name',
|
|
|
- default: [3]
|
|
|
- },
|
|
|
- valueKind: 'M-CHOICE'
|
|
|
- },
|
|
|
- )
|
|
|
- this.$refs.searchCond.setForm()
|
|
|
- } else {
|
|
|
- this.searchContent.splice(this.searchContent.length - 1, 1)
|
|
|
- }
|
|
|
- this.tabsModel = val
|
|
|
- this.initData(1)
|
|
|
+ clickTab() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ //查询条件
|
|
|
+ this.loading = true
|
|
|
+ this.tableData = []
|
|
|
+ this.pageInfo.currentPage = 1
|
|
|
+ this.searchData()
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 跟进任务完成
|
|
|
@@ -612,37 +570,22 @@ export default {
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 查询客户来源
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:24
|
|
|
- */
|
|
|
- getCustomerFrom() {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 分页
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:24
|
|
|
- */
|
|
|
- pageSizeChange(pageInfo) {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * @desc : 查询事件
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:24
|
|
|
- */
|
|
|
- initData(currentPage) {
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
* @desc : 打开跟进弹窗
|
|
|
* @author : 付斌
|
|
|
* @date : 2024-02-01 14:24
|
|
|
*/
|
|
|
follow() {
|
|
|
- this.followModal = true
|
|
|
-
|
|
|
+ if (this.$refs['table-select'].batchKeys.length == 1) {
|
|
|
+ if (!this.$refs['table-select'].batchRows[0].cusId) {
|
|
|
+ this.$Message.error(this.$t('W_068'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.followModal = true
|
|
|
+ // 查询客户信息
|
|
|
+ this.getCustomerInfo()
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t('W_013'))
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 跟进任务
|
|
|
@@ -652,21 +595,37 @@ export default {
|
|
|
followTask() {
|
|
|
this.followTaskModal = true
|
|
|
},
|
|
|
+
|
|
|
/**
|
|
|
- * @desc : 查询数据
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:24
|
|
|
+ * @desc : 查询参数设定
|
|
|
+ * @author : 常皓宁
|
|
|
+ * @date : 2024/4/7 11:22
|
|
|
*/
|
|
|
- getData() {
|
|
|
-
|
|
|
+ setSearchParams(params) {
|
|
|
+ params.flgValid = true
|
|
|
+ if (this.tabsModel === this.$t('allReceipt')) {
|
|
|
+ params.followStatus = ''
|
|
|
+ } else if (this.tabsModel === this.$t('followTask2')) {
|
|
|
+ params.followStatus = '跟进状态-跟进'
|
|
|
+ } else if (this.tabsModel === this.$t('followToStore')) {
|
|
|
+ params.followStatus = '跟进状态-邀约'
|
|
|
+ } else if (this.tabsModel === this.$t('followReserve')) {
|
|
|
+ params.followStatus = '跟进状态-约尺'
|
|
|
+ }
|
|
|
+ return params
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 校验
|
|
|
+ * @desc : 查询数据
|
|
|
* @author : 付斌
|
|
|
- * @date : 2024-02-01 14:25
|
|
|
+ * @date : 2024-02-01 14:24
|
|
|
*/
|
|
|
- getErrMessage(prop) {
|
|
|
- return this.errMessage[prop]
|
|
|
+ getData(params) {
|
|
|
+ // 查询数据
|
|
|
+ this.excute(this.$service.cusFollowService, this.$service.cusFollowService.selectByCond, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.tableData = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 量尺回执
|
|
|
@@ -674,30 +633,34 @@ export default {
|
|
|
* @date : 2024-02-01 14:25
|
|
|
*/
|
|
|
measuringStickReceipt() {
|
|
|
- this.measureModal = true
|
|
|
+ if (this.$refs['table-select'].batchKeys.length == 1 &&
|
|
|
+ this.$refs['table-select'].batchRows[0].followStatus == '跟进状态-约尺') {
|
|
|
+ if (!this.$refs['table-select'].batchRows[0].cusId) {
|
|
|
+ this.$Message.error(this.$t('W_068'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.measureModal = true
|
|
|
+ this.customerInfo5.followId = this.$refs['table-select'].batchRows[0].followId
|
|
|
+ this.customerInfo5.cusId = this.$refs['table-select'].batchRows[0].cusId
|
|
|
+ this.getCustomerInfo()
|
|
|
+ } else {
|
|
|
+ this.$Message.error(this.$t('W_040'))
|
|
|
+ }
|
|
|
},
|
|
|
- /**
|
|
|
- * @desc : 量尺回执客户选中
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:25
|
|
|
- */
|
|
|
- measureCusOk(val) {
|
|
|
|
|
|
- },
|
|
|
/**
|
|
|
- * @desc : 意向 其他分类选中事件
|
|
|
- * @author : 付斌
|
|
|
- * @date : 2024-02-01 14:26
|
|
|
+ * @desc : 查询客户信息
|
|
|
+ * @author : 常皓宁
|
|
|
+ * @date : 2024/4/8 13:00
|
|
|
*/
|
|
|
- radioChange(val) {
|
|
|
- let other = this.goodsSpecsList.filter(f => f.otherFlag)
|
|
|
- if (other && other.length > 0) {
|
|
|
- other[0].specsId = this.otherIntentionInfo
|
|
|
- other[0].specsName = other[0].children.filter(f => f.specsId == this.otherIntentionInfo)[0].specsName
|
|
|
- }
|
|
|
- this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].specsId = this.otherIntentionInfo
|
|
|
- this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].other = true
|
|
|
- this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].value = true
|
|
|
+ getCustomerInfo() {
|
|
|
+ this.excuteNoParam(this.$service.customerService, this.$service.customerService.selectById, [this.$refs['table-select'].batchRows[0].cusId], false).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.customerInfo = res.data
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 打开接待弹窗
|
|
|
@@ -721,7 +684,10 @@ export default {
|
|
|
* @date : 2024-02-01 14:26
|
|
|
*/
|
|
|
setAddressFull(e) {
|
|
|
-
|
|
|
+ // 客户区域有值才会拼接详细地址
|
|
|
+ if (!this.setCustomerFlag && this.customerInfo4.customerDistrict && this.customerInfo4.customerDistrict.addressFull) {
|
|
|
+ this.customerInfo4.addressFull = this.customerInfo4.customerDistrict.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '')
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 展示附件
|
|
|
@@ -737,6 +703,52 @@ export default {
|
|
|
* @date : 2024-02-01 14:26
|
|
|
*/
|
|
|
submitReception() {
|
|
|
+ this.$refs['formReception'].validate().then(valid => {
|
|
|
+ // 校验
|
|
|
+ if (!valid) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let param
|
|
|
+ // 1 留资 建客户是报备,旧客户是接待 2 陌生
|
|
|
+ if (this.receptionType == 1) {
|
|
|
+ param = Object.assign({
|
|
|
+ followStatus: (this.customerInfo4.cusId ? '跟进状态-接待' : '跟进状态-报备')
|
|
|
+ }, this.customerInfo4)
|
|
|
+ } else {
|
|
|
+ param = Object.assign({
|
|
|
+ followStatus: '跟进状态-报备'
|
|
|
+ }, {
|
|
|
+ stayTimeLen: this.customerInfo4.stayTimeLen,
|
|
|
+ followData: this.customerInfo4.followData,
|
|
|
+ annexPaths: this.customerInfo4.annexPaths,
|
|
|
+ followType: this.customerInfo4.followType,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ // 下次邀约时间
|
|
|
+ if (param.nextFollowTime) {
|
|
|
+ param.nextFollowTime = param.nextFollowTime.format()
|
|
|
+ }
|
|
|
+
|
|
|
+ //附件
|
|
|
+ if (param.annexPaths && param.annexPaths.annexPaths) {
|
|
|
+ param.annexPaths.annexPaths = param.annexPaths.annexPaths.map(m => m.path)
|
|
|
+ }
|
|
|
+ param.followOrg = this.$store.state.user.orgId
|
|
|
+ this.loading = true
|
|
|
+ // 保存
|
|
|
+ this.excute(this.$service.cusFollowService, this.$service.cusFollowService.insert, param).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.$Message.success(res.message)
|
|
|
+ //关闭接待弹窗
|
|
|
+ this.cancelReception()
|
|
|
+ this.initData(1)
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
@@ -745,7 +757,45 @@ export default {
|
|
|
* @date : 2024-02-01 14:26
|
|
|
*/
|
|
|
submitMeasure() {
|
|
|
+ this.$refs['formMeasure'].validate().then(valid => {
|
|
|
+ // 校验
|
|
|
+ if (!valid) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let param = Object.assign({}, this.customerInfo5)
|
|
|
+
|
|
|
+ //量尺附件
|
|
|
+ if (param.measureRoomList) {
|
|
|
+ for (let it of param.measureRoomList) {
|
|
|
+ let i = 1
|
|
|
+ it.displayNo = i
|
|
|
+ i++
|
|
|
+ if (it.measureAnnex) {
|
|
|
+ it.measureAnnex = it.measureAnnex.map(m => {
|
|
|
+ return {
|
|
|
+ name: m.name,
|
|
|
+ url: m.path,
|
|
|
+ type: m.type,
|
|
|
+ createTime: m.createTime
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ //保存
|
|
|
+ this.excute(this.$service.cusFollowService,this.$service.cusFollowService.updateMeasure,param).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$Message.success(res.message)
|
|
|
+ //关闭接待弹窗
|
|
|
+ this.cancelMeasure()
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 上传文件
|
|
|
@@ -755,10 +805,67 @@ export default {
|
|
|
uploadFile(response, file, fileList) {
|
|
|
|
|
|
},
|
|
|
+ /**
|
|
|
+ * @desc : 获取客户意向
|
|
|
+ * @author : 常皓宁
|
|
|
+ * @date : 2024/4/7 13:30
|
|
|
+ */
|
|
|
+ getIntention() {
|
|
|
+ let params = {
|
|
|
+ dataSourceCode: 'customerIntention'
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.intentionList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 获取留店时长
|
|
|
+ * @author : 常皓宁
|
|
|
+ * @date : 2024/4/7 13:31
|
|
|
+ */
|
|
|
+ getStayTimeLen() {
|
|
|
+ let params = {
|
|
|
+ dataSourceCode: 'storeRetentionTime'
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.stayTimeLenList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 获取邀约结果
|
|
|
+ * @author : 常皓宁
|
|
|
+ * @date : 2024/4/7 13:31
|
|
|
+ */
|
|
|
+ getInviteResult() {
|
|
|
+ let params = {
|
|
|
+ dataSourceCode: 'inviteResult'
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.inviteResultList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 查询事件
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2024-02-01 14:24
|
|
|
+ */
|
|
|
+ initData() {
|
|
|
+ this.getStayTimeLen()
|
|
|
+ this.getIntention()
|
|
|
+ this.getInviteResult()
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
- this.primaryKey = 'customerFollowId' // 设置主键Id
|
|
|
- this.routeObjName = 'customerFollow' // 设置路由名称
|
|
|
+ this.primaryKey = 'followId' // 设置主键Id
|
|
|
+ this.routeObjName = 'cusFollow' // 设置路由名称
|
|
|
}
|
|
|
}
|
|
|
</script>
|