建客户档案时根据直播记录匹配营养师

This commit is contained in:
xiezhijun
2021-05-26 19:06:14 +08:00
parent b249035da0
commit cf766cb817
11 changed files with 182 additions and 42 deletions

View File

@ -1,7 +1,8 @@
<template>
<!-- -->
<!-- 添加或修改导粉管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1100px" :close-on-click-modal="false" append-to-body @closed="cancel">
<el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" append-to-body @closed="cancel">
<div style="margin-bottom: 20px;color:red">1添加导粉记录时会根据进粉渠道当前时间来自动确定所属直播间当前时间段没有直播则取上一次直播若账号从未直播过则为空</div>
<div style="height: 500px; overflow: auto">
<el-table v-loading="loading" :data="wxAccountList">
<!--<el-table-column label="微信昵称" align="center" prop="wxNickName" />-->
@ -27,7 +28,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="直播间" align="center" prop="importFanLive" >
<!--<el-table-column label="直播间" align="center" prop="importFanLive" >
<template slot-scope="scope">
<el-select
v-model="scope.row.importFanLive"
@ -44,7 +45,7 @@
/>
</el-select>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="导粉数量" align="center" prop="fanNum" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.fanNum" :min="1" :max="10000" label="导粉数量" style="width:160px"></el-input-number>
@ -74,7 +75,7 @@
</template>
<script>
import { addImportFanRecord,getWxAccountAndSale } from "@/api/custom/importFanRecord";
import { getAllLiveSchedulByDate } from "@/api/custom/liveSchedul";
import { getAllLiveSchedulByDate,getLiveSchedulByTime } from "@/api/custom/liveSchedul";
import dayjs from "dayjs";
const nowTime = dayjs().format("YYYY-MM-DD HH:mm");
export default {
@ -125,7 +126,7 @@ export default {
this.reset();
this.callback = callback;
this.getListWxAccount();
this.getAllLiveSchedulByDate();
//this.getAllLiveSchedulByDate();
this.open = true;
},
reset(){
@ -268,7 +269,24 @@ export default {
return (value == undefined || value == null || value == "") ? "" : value;
},
autoSelectLive(row){
if(row.importFanLive == undefined || row.importFanLive == null || row.importFanLive == ""){
if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){
row.importFanLive = null;
return;
}
getLiveSchedulByTime({'fanChannel':row.importFanChannel,'liveStartTimeString':encodeURIComponent(dayjs().format("YYYY-MM-DD HH:mm"))}).then((response) => {
if (response.code === 200) {
let live = response.data;
if(live != undefined && live != null){
row.importFanLive = live.id;
}else{
row.importFanLive = null;
}
}else{
row.importFanLive = null;
}
});
/*if(row.importFanLive == undefined || row.importFanLive == null || row.importFanLive == ""){
if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){
row.importFanLive = null;
}else{
@ -286,7 +304,7 @@ export default {
});
}
}
}
} */
}
},
};

View File

@ -57,6 +57,8 @@
<el-select
v-model="form.accountId"
placeholder="请选择"
filterable
clearable
@change="handleOnChanelIdChange"
>
<el-option
@ -96,6 +98,8 @@
<el-form-item label="调理项目" prop="conditioningProjectId">
<el-select
v-model="form.conditioningProjectId"
filterable
clearable
placeholder="请选择"
>
<el-option
@ -109,7 +113,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="售前" prop="preSaleId">
<el-select v-model="form.preSaleId" placeholder="请选择">
<el-select v-model="form.preSaleId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in preSaleIdOptions"
:key="dict.dictValue"
@ -133,7 +138,8 @@
</el-col>
<el-col :span="8" v-show="afterNutiShow">
<el-form-item label="售后" prop="afterSaleId">
<el-select v-model="form.afterSaleId" placeholder="请选择">
<el-select v-model="form.afterSaleId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in afterSaleIdOptions"
:key="dict.dictValue"
@ -148,6 +154,7 @@
<el-select
v-model="form.nutritionistIdList"
multiple
filterable
placeholder="请选择"
>
<el-option
@ -173,7 +180,8 @@
</el-col>
<el-col :span="8" v-show="afterNutiShow">
<el-form-item label="助理营养师" prop="nutriAssisId">
<el-select v-model="form.nutriAssisId" placeholder="请选择">
<el-select v-model="form.nutriAssisId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in nutriAssisIdOptions"
:key="dict.dictValue"
@ -185,7 +193,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="策划" prop="plannerId">
<el-select v-model="form.plannerId" placeholder="请选择">
<el-select v-model="form.plannerId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in plannerIdOptions"
:key="dict.dictValue"
@ -197,7 +206,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="策划助理" prop="plannerAssisId">
<el-select v-model="form.plannerAssisId" placeholder="请选择">
<el-select v-model="form.plannerAssisId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in plannerAssisIdOptions"
:key="dict.dictValue"
@ -209,7 +219,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="运营" prop="operatorId">
<el-select v-model="form.operatorId" placeholder="请选择">
<el-select v-model="form.operatorId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in operatorIdOptions"
:key="dict.dictValue"
@ -221,7 +232,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="运营助理" prop="operatorAssisId">
<el-select v-model="form.operatorAssisId" placeholder="请选择">
<el-select v-model="form.operatorAssisId" placeholder="请选择" filterable
clearable>
<el-option
v-for="dict in operatorAssisIdOptions"
:key="dict.dictValue"