Commit 3d1c07d5 authored by 罗超's avatar 罗超

1

parent 3be85e91
...@@ -377,3 +377,11 @@ export function setStudyAboradOrderConfirm(data) { ...@@ -377,3 +377,11 @@ export function setStudyAboradOrderConfirm(data) {
}); });
} }
// 同行下拉
export function getMyCustomerList(data) {
return request({
url: '/b2bcustomer/GetMyCustomerList',
method: 'post',
data
});
}
\ No newline at end of file
...@@ -68,16 +68,24 @@ ...@@ -68,16 +68,24 @@
class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" /> class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true" <!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-12 q-pb-lg" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> class="col-12 q-pb-lg" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<q-input filled stack-label :dense="false" :value="OrderMsg.Class_Price*OrderMsg.GuestNum*OrderMsg.B2CRatio" :disable="true"
class="col-12 q-pb-lg" label="优惠金额" />
<template v-if="modityOrderType==3"> <template v-if="modityOrderType==3">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12"
label="成交单价" :rules="[val => !!val || '请填成交单价']" /> label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10" <!-- <q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg" @keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" /> -->
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" :value="OrderMsg.Class_Price*OrderMsg.GuestNum*(1-OrderMsg.B2CRatio)" class="col-12 q-pb-lg"
label="应收" /> label="应收" />
<q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg" v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg"
label="客人来源" /> label="客人来源" />
...@@ -92,12 +100,23 @@ ...@@ -92,12 +100,23 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-select :disable="(modityOrderType==2)||(OrderMsg.JoinType==3)" v-model="OrderMsg.CustomerId"
:options="myCustomerList" filled use-input label="同行" option-label="CustomerName" option-value="CustomerId"
ref="CustomerName" class="col-6 q-pb-lg" emit-value map-options @filter="cusfilterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==3" filled stack-label :dense="false" <q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==3" filled stack-label :dense="false"
maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" /> maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" />
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false" <q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false"
maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" /> maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" />
<q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" <!-- <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" /> label="是否少价" class="q-mb-md" /> -->
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.IsLessPrice==1" @input="calcPrice()" <q-input :disable="(modityOrderType==2)" v-if="OrderMsg.IsLessPrice==1" @input="calcPrice()"
@keyup.native="checkPrice(OrderMsg,'PerLessMoney')" maxlength="10" filled stack-label :dense="false" @keyup.native="checkPrice(OrderMsg,'PerLessMoney')" maxlength="10" filled stack-label :dense="false"
v-model="OrderMsg.PerLessMoney" class="col-12" label="少价金额(每人)" v-model="OrderMsg.PerLessMoney" class="col-12" label="少价金额(每人)"
...@@ -122,7 +141,8 @@ ...@@ -122,7 +141,8 @@
getOrderSourceEnumList, //获取订单来源 枚举 getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //修改订单 setClassOrder, //修改订单
queryChaClassInfo, queryChaClassInfo,
GetSelectClassOrderList //获取前置下拉 GetSelectClassOrderList, //获取前置下拉
getMyCustomerList//同行下拉
} from '../../api/sale/sale' } from '../../api/sale/sale'
import { import {
queryEmployee queryEmployee
...@@ -159,6 +179,9 @@ ...@@ -159,6 +179,9 @@
OrderMsg: { OrderMsg: {
ClassId: 0, //班级编号 ClassId: 0, //班级编号
GuestNum: 0, //人数 GuestNum: 0, //人数
B2CRatio:0,
B2CReNewRatio:0,
CustomerId:0,//市场专员
Unit_Price: 0, Unit_Price: 0,
PreferPrice: 0, PreferPrice: 0,
OrderSource: 0, OrderSource: 0,
...@@ -193,6 +216,8 @@ ...@@ -193,6 +216,8 @@
CourseList: [], //课程列表 CourseList: [], //课程列表
courseObj: {}, //选择的课程 courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据 beforeOrderList: [], //前置订单数据
myCustomerList:[],//同行列表
allCustomerList:[],//所有同行列表
} }
}, },
created() { created() {
...@@ -205,6 +230,7 @@ ...@@ -205,6 +230,7 @@
this.getEmployee(); this.getEmployee();
this.initConfig(); this.initConfig();
this.getSelectClass(); this.getSelectClass();
this.getCustomerList();
}, },
mounted() { mounted() {
this.initData() this.initData()
...@@ -244,7 +270,7 @@ ...@@ -244,7 +270,7 @@
if (temp) { if (temp) {
this.courseObj = temp; this.courseObj = temp;
var tempDiscountMoney = 0; //优惠金额 var tempDiscountMoney = 0; //优惠金额
var tempSaleRemark = ""; //备注 var tempSaleRemark = `直客首次报名优惠比例${ temp.B2CRatio??0 }%`; //备注
//插班课时单价 //插班课时单价
var classHourPrice = temp.SellPrice / this.courseObj.ClassHours; var classHourPrice = temp.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(classHourPrice * (this.courseObj.ClassHours - this.OrderMsg.StartClassHours)) var chaBanPrice = Number(classHourPrice * (this.courseObj.ClassHours - this.OrderMsg.StartClassHours))
...@@ -257,17 +283,17 @@ ...@@ -257,17 +283,17 @@
} else { } else {
tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100; tempDiscountMoney = (temp.SellPrice * temp.CoursePriceList[0].PriceMoney) / 100;
} }
tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%"; // tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else { } else {
tempDiscountMoney = item.CoursePriceList[0].PriceMoney; tempDiscountMoney = item.CoursePriceList[0].PriceMoney;
tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney; // tempSaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney;
} }
} }
} }
if (guestNum > 1) { if (guestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) { if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) { if (temp.CoursePriceList[1].PriceType == 0) {
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%"; // tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
tempDiscountMoney = (chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100; tempDiscountMoney = (chaBanPrice * temp.CoursePriceList[1].PriceMoney) / 100;
} else { } else {
...@@ -275,7 +301,7 @@ ...@@ -275,7 +301,7 @@
} }
} else { } else {
tempDiscountMoney = item.CoursePriceList[1].PriceMoney; tempDiscountMoney = item.CoursePriceList[1].PriceMoney;
tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney; // tempSaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
} }
} }
} }
...@@ -365,6 +391,9 @@ ...@@ -365,6 +391,9 @@
this.OrderMsg.UpOrderId = tempData.UpOrderId; this.OrderMsg.UpOrderId = tempData.UpOrderId;
this.OrderMsg.DiscountMoney = tempData.DiscountMoney; this.OrderMsg.DiscountMoney = tempData.DiscountMoney;
this.OrderMsg.PerDiscountMoney = tempData.PerDiscountMoney; this.OrderMsg.PerDiscountMoney = tempData.PerDiscountMoney;
this.OrderMsg.B2CRatio = tempData.B2CRatio>1?(tempData.B2CRatio/100):tempData.B2CRatio;
this.OrderMsg.B2CReNewRatio = tempData.B2CReNewRatio>1?(tempData.B2CReNewRatio/100):tempData.B2CReNewRatio;
this.OrderMsg.CustomerId=tempData.CustomerId
this.UnitPrice = this.OrderMsg.Unit_Price; this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
...@@ -388,6 +417,9 @@ ...@@ -388,6 +417,9 @@
this.OrderMsg.DiscountMoney = 0; this.OrderMsg.DiscountMoney = 0;
this.OrderMsg.PerDiscountMoney = 0; this.OrderMsg.PerDiscountMoney = 0;
this.OrderMsg.OrderType = this.orderType; this.OrderMsg.OrderType = this.orderType;
this.OrderMsg.B2CRatio = 0;
this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId=0;
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1; this.OrderMsg.OrderNature = 1;
} }
...@@ -409,6 +441,12 @@ ...@@ -409,6 +441,12 @@
} else { } else {
this.OrderMsg.CourseId = ''; this.OrderMsg.CourseId = '';
} }
if(this.saveObj.B2CRatio){
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio;
}
if(this.saveObj.B2CReNewRatio){
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
}
} }
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
this.calcPrice(); this.calcPrice();
...@@ -424,6 +462,17 @@ ...@@ -424,6 +462,17 @@
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1); this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
} }
}) })
},
//筛选市场专员
cusfilterFn(val, update) {
update(() => {
if (val === '') {
this.myCustomerList = JSON.parse(JSON.stringify(this.allCustomerList))
} else {
const needle = val.toLowerCase();
this.myCustomerList = this.allCustomerList.filter(v => v.CustomerName.toLowerCase().indexOf(needle) > -1);
}
})
}, },
//获取业务员 //获取业务员
getEmployee() { getEmployee() {
...@@ -547,6 +596,12 @@ ...@@ -547,6 +596,12 @@
str = item[0].GuestName; str = item[0].GuestName;
} }
return str return str
},
getCustomerList(){
getMyCustomerList({}).then(res=>{
this.myCustomerList=res.Data
this.allCustomerList=res.Data
})
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment