Merge branch 'master' of gitee.com:darlk/ShengTangManage into develop
This commit is contained in:
@ -1,15 +1,56 @@
|
||||
<template>
|
||||
<!-- -->
|
||||
<!-- 添加或修改导粉管理对话框 -->
|
||||
<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>
|
||||
<el-dialog :title="title" :visible.sync="open" width="1050px" :close-on-click-modal="false" append-to-body @closed="cancel">
|
||||
<!--<div style="margin-bottom: 20px;color:red">1、添加导粉记录时会根据进粉渠道、当前时间来自动确定所属直播间,当前时间段没有直播,则取上一次直播,若账号从未直播过,则为空</div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<!--<el-form-item label="账号渠道" prop="channel">
|
||||
<el-select
|
||||
v-model="queryParams.channel"
|
||||
placeholder="请选择账号渠道"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in fanChanneloptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="销售" prop="saleId" label-width="50px">
|
||||
<el-select
|
||||
v-model="queryParams.saleId"
|
||||
placeholder="请选择销售"
|
||||
clearable
|
||||
filterable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in preSaleIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信账号" prop="wxAccount">
|
||||
<el-input v-model.trim="queryParams.wxAccount" placeholder="请输入微信号" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="height: 500px; overflow: auto">
|
||||
<el-table v-loading="loading" :data="wxAccountList">
|
||||
<!--<el-table-column label="微信昵称" align="center" prop="wxNickName" />-->
|
||||
<el-table-column label="微信号" align="center" prop="wxAccount" width="160"/>
|
||||
<el-table-column label="销售" align="center" prop="saleName" width="120"/>
|
||||
<el-table-column label="已导粉数量" align="center" prop="importFanNum" width="120"/>
|
||||
<el-table-column label="进粉渠道" align="center" prop="importFanChannel" >
|
||||
<!--<el-table-column label="已导粉数量" align="center" prop="importFanNum" width="120"/>-->
|
||||
<el-table-column label="账号渠道" align="center" prop="importFanChannel" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.importFanChannel"
|
||||
@ -46,7 +87,23 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="导粉数量" align="center" prop="fanNum" width="200">
|
||||
<el-table-column label="导粉时间" align="center" prop="fanTime" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.fanTime"
|
||||
type="datetime"
|
||||
placeholder="选择导粉时间"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
:picker-options="fanPickerOptions"
|
||||
@change="autoSelectLive(scope.row)"
|
||||
>
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="导粉数量" align="center" prop="fanNum" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.fanNum" :min="1" :max="10000" label="导粉数量" style="width:160px"></el-input-number>
|
||||
</template>
|
||||
@ -76,6 +133,7 @@
|
||||
<script>
|
||||
import { addImportFanRecord,getWxAccountAndSale } from "@/api/custom/importFanRecord";
|
||||
import { getAllLiveSchedulByDate,getLiveSchedulByTime } from "@/api/custom/liveSchedul";
|
||||
import { mapGetters } from "vuex";
|
||||
import dayjs from "dayjs";
|
||||
const nowTime = dayjs().format("YYYY-MM-DD HH:mm");
|
||||
export default {
|
||||
@ -107,12 +165,28 @@ export default {
|
||||
//总导粉统计
|
||||
fanNumList:[],
|
||||
//是否进行了导粉操作
|
||||
importFanFlag: false
|
||||
importFanFlag: false,
|
||||
queryParams:{
|
||||
channel: null,
|
||||
saleId: null,
|
||||
wxAccount: null
|
||||
},
|
||||
fanPickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now() || time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created(){
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
// 售前字典
|
||||
"preSaleIdOptions"
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
showDialog(data, callback, fanChanneloptions) {
|
||||
@ -149,18 +223,29 @@ export default {
|
||||
//获取所有可接粉的微信号
|
||||
getListWxAccount() {
|
||||
this.loading = true;
|
||||
getWxAccountAndSale({'importFanDate': this.data.importFanDate}).then((response) => {
|
||||
getWxAccountAndSale(this.queryParams).then((response) => {
|
||||
response.data.wxSaleAccountList.forEach((item,index) => {
|
||||
item.fanNum = 1;
|
||||
item.importFanNum = this.getTotalFanNum(response.data.fanNumList, item.id);
|
||||
//item.importFanNum = this.getTotalFanNum(response.data.fanNumList, item.id);
|
||||
item.importFanChannel = null;
|
||||
item.importFanLive = null;
|
||||
item.fanTime = null;
|
||||
});
|
||||
this.wxAccountList = response.data.wxSaleAccountList;
|
||||
this.fanNumList = response.data.fanNumList;
|
||||
//this.fanNumList = response.data.fanNumList;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleQuery(){
|
||||
this.getListWxAccount();
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
channel: null,
|
||||
saleId: null,
|
||||
wxAccount: null
|
||||
};
|
||||
},
|
||||
getAllLiveSchedulByDate(){
|
||||
getAllLiveSchedulByDate({'liveSchedulDate':this.data.importFanDate}).then((response) => {
|
||||
response.data.forEach((item,index) => {
|
||||
@ -186,7 +271,15 @@ export default {
|
||||
if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '进粉渠道不能为空',
|
||||
message: '账号渠道不能为空',
|
||||
center: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(row.fanTime == undefined || row.fanTime == null || row.fanTime == ""){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '导粉时间不能为空',
|
||||
center: true
|
||||
});
|
||||
return;
|
||||
@ -273,7 +366,7 @@ export default {
|
||||
row.importFanLive = null;
|
||||
return;
|
||||
}
|
||||
getLiveSchedulByTime({'fanChannel':row.importFanChannel,'liveStartTimeString':encodeURIComponent(dayjs().format("YYYY-MM-DD HH:mm"))}).then((response) => {
|
||||
getLiveSchedulByTime({'fanChannel':row.importFanChannel,'liveStartTimeString':encodeURIComponent(row.fanTime)}).then((response) => {
|
||||
if (response.code === 200) {
|
||||
let live = response.data;
|
||||
if(live != undefined && live != null){
|
||||
|
@ -111,8 +111,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="售前" prop="preSaleId">
|
||||
<el-col :span="8" v-show="preSaleShow">
|
||||
<el-form-item label="售前" prop="preSaleId" >
|
||||
<el-select v-model="form.preSaleId" placeholder="请选择" filterable
|
||||
clearable>
|
||||
<el-option
|
||||
@ -124,7 +124,20 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-show="!afterNutiShow">
|
||||
<el-col :span="8" v-show="pushPreSaleShow">
|
||||
<el-form-item label="售前推送" prop="preSaleId" title="售前推送人就是该客户体验单的销售,只有售中一开单需要选择">
|
||||
<el-select v-model="form.pushPreSaleId" placeholder="请选择" filterable
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="dict in pushPreSaleIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-show="onSaleShow">
|
||||
<el-form-item label="售中" prop="onSaleId">
|
||||
<el-select v-model="form.onSaleId" placeholder="请选择">
|
||||
<el-option
|
||||
@ -243,11 +256,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="推荐人" prop="recommender">
|
||||
<el-input v-model="form.recommender" placeholder="请输入推荐人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="10">
|
||||
<el-form-item label="成交时间" prop="orderTime">
|
||||
<el-date-picker
|
||||
@ -263,7 +276,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="服务开始时间" prop="startTime" label-width="120">
|
||||
<el-form-item label="服务开始时间" prop="startTime" label-width="180">
|
||||
<el-date-picker
|
||||
style="width: 182.5px"
|
||||
v-model="form.startTime"
|
||||
@ -347,11 +360,15 @@ export default {
|
||||
visible: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
customer: [
|
||||
/*customer: [
|
||||
{ required: true, message: "客户姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
],*/
|
||||
amount: [{ required: true, message: "金额不能为空", trigger: "blur" }],
|
||||
phone: [
|
||||
/*payTypeId: [{ required: true, message: "收款方式不能为空", trigger: "blur" }],
|
||||
accountId: [{ required: true, message: "渠道不能为空", trigger: "blur" }],
|
||||
serveTime: [{ required: true, message: "服务时间不能为空", trigger: "blur" }],
|
||||
conditioningProjectId: [{ required: true, message: "服务项目不能为空", trigger: "blur" }],*/
|
||||
/*phone: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
@ -359,7 +376,7 @@ export default {
|
||||
pattern: /^[0-9]{5,11}$/,
|
||||
message: "手机号格式不正确",
|
||||
},
|
||||
],
|
||||
],*/
|
||||
orderTime: [
|
||||
{ required: true, message: "成交时间不能为空", trigger: "blur" },
|
||||
{ required: true, trigger: "blur", validator: checkOrderTime },
|
||||
@ -425,6 +442,7 @@ export default {
|
||||
return time.getTime() < Date.now();
|
||||
},
|
||||
},
|
||||
data: null,
|
||||
// 收款方式字典
|
||||
payTypeIdOptions: [],
|
||||
// 账号
|
||||
@ -444,7 +462,14 @@ export default {
|
||||
secondAfterSaleFlagShow: false,
|
||||
//分成比例
|
||||
orderRateOptions: orderTypeData["orderRateArray"],
|
||||
//比例是否显示
|
||||
orderRateOptionsShow: false,
|
||||
//售前是否显示
|
||||
preSaleShow: true,
|
||||
//售中是否显示
|
||||
onSaleShow: false,
|
||||
//售前推送人是否显示(售中一开单才存在)
|
||||
pushPreSaleShow: false,
|
||||
//售后、营养师、营养师助理是否显示
|
||||
afterNutiShow: true,
|
||||
};
|
||||
@ -511,6 +536,8 @@ export default {
|
||||
"operatorIdOptions",
|
||||
// 运营助理字典
|
||||
"operatorAssisIdOptions",
|
||||
//售前推送
|
||||
"pushPreSaleIdOptions"
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
@ -518,7 +545,7 @@ export default {
|
||||
// this.data = data;
|
||||
this.callback = callback;
|
||||
this.reset(data);
|
||||
|
||||
this.data = data;
|
||||
this.title = `${data.orderId ? "修改" : "创建"}「${
|
||||
data.customer
|
||||
}」客户订单`;
|
||||
@ -527,15 +554,15 @@ export default {
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (valid && this.validateAddOrder()) {
|
||||
if (this.form.orderId != null) {
|
||||
updateOrder(this.form).then((response) => {
|
||||
/*updateOrder(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.callback && this.callback();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
} else {
|
||||
addOrder(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
@ -548,6 +575,88 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
//验证订单参数
|
||||
validateAddOrder(){
|
||||
//普通单、拆分单
|
||||
if(this.form.orderTypeList[0] == 0 || this.form.orderTypeList[0] == 1){
|
||||
//售前、售后、营养师助理都不能为空
|
||||
if(this.form.preSaleId == null || this.form.preSaleId <= 0 || this.form.afterSaleId == null || this.form.afterSaleId <= 0
|
||||
|| this.form.nutriAssisId == null || this.form.nutriAssisId <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '售前、售后、营养师助理不能为空',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//根据是否拆分判断营养师
|
||||
if(this.form.orderTypeList[0] == 0){
|
||||
if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 1 || this.form.nutritionistIdList[0] <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '营养师不能为空,普通单只能选择一个营养师',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 2 || this.form.nutritionistIdList[0] <= 0 || this.form.nutritionistIdList[1] <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '营养师不能为空,拆分单需要选择两个营养师',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
//体验单
|
||||
else if(this.form.orderTypeList[0] == 2){
|
||||
//售前、售中不能为空
|
||||
if(this.form.preSaleId == null || this.form.preSaleId <= 0 || this.form.onSaleId == null || this.form.onSaleId <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '售前、售中不能为空',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//售中单
|
||||
else if(this.form.orderTypeList[0] == 3){
|
||||
//售中、售后、营养师助理不能为空
|
||||
if(this.form.onSaleId == null || this.form.onSaleId <= 0 || this.form.afterSaleId == null || this.form.afterSaleId <= 0
|
||||
|| this.form.nutriAssisId == null || this.form.nutriAssisId <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '售中、售后、营养师助理不能为空',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//判断是否拆分单
|
||||
if(this.form.orderTypeList[1] == 0 || this.form.orderTypeList[1] == 1){
|
||||
if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 1 || this.form.nutritionistIdList[0] <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '营养师不能为空,普通单只能选择一个营养师',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 2 || this.form.nutritionistIdList[0] <= 0 || this.form.nutritionistIdList[1] <= 0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '营养师不能为空,拆分单需要选择两个营养师',
|
||||
center: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
reset(obj = {}) {
|
||||
const defaultPayType = this.payTypeIdOptions.find(
|
||||
(opt) => opt.remark === "default"
|
||||
@ -614,6 +723,7 @@ export default {
|
||||
pauseTime: null,
|
||||
payTypeId: defaultPayType ? parseInt(defaultPayType.dictValue) : null,
|
||||
preSaleId: defaultPresale ? parseInt(defaultPresale.dictValue) : null,
|
||||
pushPreSaleId: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
onSaleId: null,
|
||||
@ -696,7 +806,7 @@ export default {
|
||||
// },
|
||||
"form.orderTypeList": function (newVal, oldVal) {
|
||||
//判断订单类型是否选择了二开
|
||||
if (newVal[1] == 1) {
|
||||
if (newVal[1] == 1 || newVal[1] == 3) {
|
||||
this.form.secondAfterSaleFlag = 1;
|
||||
this.secondAfterSaleFlagShow = true;
|
||||
} else {
|
||||
@ -704,7 +814,7 @@ export default {
|
||||
this.secondAfterSaleFlagShow = false;
|
||||
}
|
||||
//判断是否选择了比例拆分单
|
||||
if (newVal[0] == 1) {
|
||||
if (newVal[0] == 1 || newVal[1] == 2 || newVal[1] == 3) {
|
||||
this.orderRateOptionsShow = true;
|
||||
this.form.nutritionistRate = "2,8";
|
||||
} else {
|
||||
@ -713,15 +823,40 @@ export default {
|
||||
}
|
||||
//判断是否选择了体验单
|
||||
if (newVal[0] == 2) {
|
||||
this.afterNutiShow = false;
|
||||
this.form.onSaleId = parseInt(this.onSaleIdOptions[1].dictValue);
|
||||
this.form.serveTimeId = 7;
|
||||
this.form.conditioningProjectId = 12;
|
||||
this.onSaleShow = true;
|
||||
this.afterNutiShow = false;
|
||||
} else {
|
||||
this.form.onSaleId = null;
|
||||
this.form.serveTimeId = 90;
|
||||
this.afterNutiShow = true;
|
||||
this.form.conditioningProjectId = 0;
|
||||
this.onSaleShow = false;
|
||||
this.afterNutiShow = true;
|
||||
}
|
||||
//判断是否选择了售中单
|
||||
if(newVal[0] == 3){
|
||||
//不需要选择销售,需要选择售中
|
||||
this.form.preSaleId = null;
|
||||
this.onSaleShow = true;
|
||||
this.preSaleShow = false;
|
||||
//一开单
|
||||
if(newVal[1] == 0 || newVal[1] == 2){
|
||||
this.form.pushPreSaleId = (this.data && this.data.preSaleId != null) ? this.data.preSaleId : null;
|
||||
this.pushPreSaleShow = true;
|
||||
}else{
|
||||
this.pushPreSaleShow = false;
|
||||
this.form.pushPreSaleId = null;
|
||||
}
|
||||
}else{
|
||||
this.form.pushPreSaleId = null;
|
||||
this.pushPreSaleShow = false;
|
||||
this.preSaleShow = true;
|
||||
//需要判断是否为体验单
|
||||
if (newVal[0] != 2) {
|
||||
this.form.onSaleId = null;
|
||||
this.onSaleShow = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -66,16 +66,18 @@ export default {
|
||||
return {
|
||||
orderDetailList: [],
|
||||
visible: false,
|
||||
preSaleTitle: "售前",
|
||||
preSaleValue: "preSale",
|
||||
//订单详情的标题,按竖显示
|
||||
orderTitleData: [
|
||||
["订单类型","审核状态", "成交时间"],
|
||||
["调理项目","姓名", "手机号"],
|
||||
["金额","收款方式", "收款账号"],
|
||||
["服务时长","赠送时长", "售前"],
|
||||
["售中","售后","营养师"],
|
||||
["助理营养师","策划","策划助理"],
|
||||
["运营","运营助理","开始时间"],
|
||||
["结束时间","备注",""]
|
||||
["售前推送","售中","售后"],
|
||||
["营养师","助理营养师","策划"],
|
||||
["策划助理","运营","运营助理"],
|
||||
["开始时间","结束时间","备注"]
|
||||
],
|
||||
//订单详情的属性名称,与标题对应,按竖显示
|
||||
orderValueData: [
|
||||
@ -83,10 +85,10 @@ export default {
|
||||
["conditioningProject","customer", "phone"],
|
||||
["amount","payType", "account"],
|
||||
["serveTime","giveServeDay", "preSale"],
|
||||
["onSale","afterSale","nutritionist"],
|
||||
["nutriAssis","planner","plannerAssis"],
|
||||
["operator","operatorAssis","startTime"],
|
||||
["serverEndTime","remark",""]
|
||||
["pushPreSale","onSale","afterSale"],
|
||||
["nutritionist","nutriAssis","planner"],
|
||||
["plannerAssis","operator","operatorAssis"],
|
||||
["startTime","serverEndTime","remark"]
|
||||
],
|
||||
};
|
||||
},
|
||||
|
@ -90,7 +90,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="8" v-show="preSaleShow">
|
||||
<el-form-item label="售前" prop="preSaleId">
|
||||
<el-select v-model="form.preSaleId" placeholder="请选择">
|
||||
<el-option
|
||||
@ -102,6 +102,19 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-show="pushPreSaleShow">
|
||||
<el-form-item label="售前推送" prop="preSaleId">
|
||||
<el-select v-model="form.pushPreSaleId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in pushPreSaleIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-show="onSaleShow">
|
||||
<el-form-item label="售中" prop="onSaleId">
|
||||
<el-select v-model="form.onSaleId" placeholder="请选择">
|
||||
@ -198,11 +211,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="推荐人" prop="recommender">
|
||||
<el-input v-model="form.recommender" placeholder="请输入推荐人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="10">
|
||||
<el-form-item label="成交时间" prop="orderTime">
|
||||
<el-date-picker
|
||||
@ -218,7 +231,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务开始时间" prop="startTime" label-width="120">
|
||||
<el-form-item label="服务开始时间" prop="startTime" label-width="160">
|
||||
<el-date-picker
|
||||
style="width: 182.5px"
|
||||
v-model="form.startTime"
|
||||
@ -392,8 +405,12 @@ export default {
|
||||
reviewStatusOptions: [],
|
||||
//下拉列表对应关系(用于选择收款账号自动选择策划、策划助理、运营、运营助理)
|
||||
orderDropdownCorrespondingOptions: [],
|
||||
//是否显示售中
|
||||
//售前是否显示
|
||||
preSaleShow: true,
|
||||
//售中是否显示
|
||||
onSaleShow: false,
|
||||
//售前推送人是否显示(售中一开单才存在)
|
||||
pushPreSaleShow: false,
|
||||
//是否显示售后、营养师、营养师助理
|
||||
afterSaleNutriAssShow: true,
|
||||
//是否显示策划、策划助理、运营、运营助理
|
||||
@ -448,6 +465,8 @@ export default {
|
||||
"operatorIdOptions",
|
||||
// 运营助理字典
|
||||
"operatorAssisIdOptions",
|
||||
//售前推送
|
||||
"pushPreSaleIdOptions"
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
@ -545,6 +564,7 @@ export default {
|
||||
pauseTime: null,
|
||||
payTypeId: defaultPayType ? parseInt(defaultPayType.dictValue) : null,
|
||||
preSaleId: defaultPresale ? parseInt(defaultPresale.dictValue) : null,
|
||||
pushPreSaleId: null,
|
||||
onSaleId: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
@ -575,13 +595,42 @@ export default {
|
||||
accountId,
|
||||
...obj,
|
||||
};
|
||||
// console.log(this.form);
|
||||
this.resetForm("form");
|
||||
// console.log("--"+obj.orderType);
|
||||
this.onSaleShow = this.form.orderType == "2";
|
||||
this.afterSaleNutriAssShow =
|
||||
this.form.orderType != "2" && this.form.afterSaleCommissOrder == 0;
|
||||
this.planOperatorShow = this.form.afterSaleCommissOrder == 0;
|
||||
|
||||
//售前是否显示
|
||||
this.preSaleShow = true;
|
||||
//售中是否显示
|
||||
this.onSaleShow = false;
|
||||
//售前推送人是否显示(售中一开单才存在)
|
||||
this.pushPreSaleShow= false;
|
||||
//是否显示售后、营养师、营养师助理
|
||||
this.afterSaleNutriAssShow= true;
|
||||
//是否显示策划、策划助理、运营、运营助理
|
||||
this.planOperatorShow = true;
|
||||
|
||||
if(this.form.orderType == "3"){
|
||||
//售中单的非提成单不显示售前
|
||||
if(this.form.afterSaleCommissOrder == null || this.form.afterSaleCommissOrder == 0){
|
||||
this.preSaleShow = false;
|
||||
}
|
||||
if(this.form.orderCountType == 0 || this.form.orderCountType == 2){
|
||||
this.pushPreSaleShow = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.form.orderType == "2" || (this.form.orderType == "3" && (this.form.afterSaleCommissOrder == null || this.form.afterSaleCommissOrder == 0))){
|
||||
this.onSaleShow = true;
|
||||
}
|
||||
|
||||
if((this.form.afterSaleCommissOrder != null && this.form.afterSaleCommissOrder != 0) || this.form.orderType == "2"){
|
||||
this.afterSaleNutriAssShow = false;
|
||||
}
|
||||
|
||||
if(this.form.afterSaleCommissOrder != null && this.form.afterSaleCommissOrder != 0){
|
||||
this.planOperatorShow = false;
|
||||
}
|
||||
|
||||
//console.log(this.preSaleShow + " | " + this.pushPreSaleShow + " | " + this.onSaleShow + " | " + this.afterSaleNutriAssShow + "|" + this.planOperatorShow);
|
||||
},
|
||||
handleOnClosed() {
|
||||
this.reset();
|
||||
|
@ -23,6 +23,7 @@ const getters = {
|
||||
plannerIdOptions: state => state.global.plannerIdOptions,
|
||||
plannerAssisIdOptions: state => state.global.plannerAssisIdOptions,
|
||||
operatorIdOptions: state => state.global.operatorIdOptions,
|
||||
operatorAssisIdOptions: state => state.global.operatorAssisIdOptions
|
||||
operatorAssisIdOptions: state => state.global.operatorAssisIdOptions,
|
||||
pushPreSaleIdOptions: state => state.global.pushPreSaleIdOptions
|
||||
};
|
||||
export default getters;
|
||||
|
@ -11,6 +11,7 @@ const oriState = {
|
||||
operatorIdOptions: [],
|
||||
operatorAssisIdOptions: [],
|
||||
msgUnreadCount: 0,
|
||||
pushPreSaleIdOptions:[]
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@ -48,7 +49,8 @@ const actions = {
|
||||
plannerIdOptions: options["planner"] || [],
|
||||
plannerAssisIdOptions: options["planner_assis"] || [],
|
||||
operatorIdOptions: options["operator"] || [],
|
||||
operatorAssisIdOptions: options["operator_assis"] || []
|
||||
operatorAssisIdOptions: options["operator_assis"] || [],
|
||||
pushPreSaleIdOptions: options["push_pre_sale"] || [],
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -25,6 +25,29 @@ export const orderCountTypeArray = [
|
||||
}
|
||||
]
|
||||
|
||||
//订单次数加拆分类型
|
||||
export const orderCountExtendedTypeArray = [
|
||||
{
|
||||
value: 0,
|
||||
label: "一开单",
|
||||
children: orderMoneyTypeArray
|
||||
},{
|
||||
value: 1,
|
||||
label: "二开单",
|
||||
children: orderMoneyTypeArray
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: "一开单(拆分)",
|
||||
children: orderMoneyTypeArray
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: "二开单(拆分)",
|
||||
children: orderMoneyTypeArray
|
||||
}
|
||||
]
|
||||
|
||||
//订单类型(订单新增)
|
||||
export const orderTypeArray = [
|
||||
{
|
||||
@ -47,6 +70,11 @@ export const orderTypeArray = [
|
||||
label: "全款单"
|
||||
}]
|
||||
}]
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: "售中单",
|
||||
children: orderCountExtendedTypeArray
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="进粉渠道" prop="channelId">
|
||||
<el-select v-model="queryParams.channelId" placeholder="请选择">
|
||||
<el-select v-model="queryParams.channelId" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in accountIdOptions"
|
||||
:key="dict.dictValue"
|
||||
|
@ -356,7 +356,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("fan_channel").then((response) => {
|
||||
this.getDicts("cus_account").then((response) => {
|
||||
this.accountIdOptions = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -327,7 +327,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("fan_channel").then((response) => {
|
||||
this.getDicts("cus_account").then((response) => {
|
||||
this.accountIdOptions = response.data;
|
||||
});
|
||||
this.getDicts("sale_group").then((response) => {
|
||||
|
Reference in New Issue
Block a user