Commit 05e25781 authored by youjie's avatar youjie

下单选择销售

parent e8fb8612
......@@ -871,6 +871,25 @@
">0-2周岁(不含)</text>
<u-number-box size="28" @change="yeChange" :min="0" :max="crCount" v-model="yeCount"></u-number-box>
</view>
<view class="line-flex" style="padding: 30rpx; background: #fff"
v-if="SaleList&&SaleList.length>1" @click="showSalePreviwe=true">
<text style="font-size: 28rpx; color: #111; font-weight: 500">销售</text>
<text style="
font-size: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"></text>
<view class="SaleNameTetx">
<view>
<text v-if="SaleName">{{ SaleName }}</text>
<text v-else style="color: #999">
请选择
</text>
</view>
<u-icon name="arrow-down" size="24"></u-icon>
</view>
</view>
</view>
<view class="jz_OrderDiv" style="box-shadow: none; width: 100%; padding: 20rpx">
<view>
......@@ -952,6 +971,33 @@
</scroll-view>
</view>
</u-popup>
<u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
<view>
<view style="font-size: 17px;text-align: center;padding: 20px 0;">
选择销售
</view>
<scroll-view scroll-x="true" style="width: 100%;height: 550rpx;">
<view class="SaleBox">
<view v-for="(item,index) in SaleList"
:key="index"
class="SaleText"
@click="SelectSales(item)">
<view>{{ item.EmName }}</view>
<uni-icons :type="SaleId==item.CreateBy?'checkmarkempty':''"
:color="SaleId==item.CreateBy?'#ff3166':''" size="24"></uni-icons>
</view>
</view>
</scroll-view>
<u-button size="80" :ripple="true" shape="circle" :custom-style="{
backgroundColor: '#333',
height: '80rpx',
color: '#fff',
fontSize: '14px',
margin: '0 auto',
width: '90vw',
}" @click="showSalePreviwe=false">确定</u-button>
</view>
</u-popup>
</view>
</template>
<script>
......@@ -1013,10 +1059,16 @@
startCities: [],
is_show_auth: 0, //是否配置启用授权(1-开启)
b2bUser: {}, //同行信息
showSalePreviwe: false,
SaleList: [],
customer: {},
SaleName: '',
SaleId: 0,
};
},
created() {},
onLoad(option) {
this.customer = uni.getStorageSync("b2b_user");
if (!option.scene) {
if (option.lineId) {
this.delMsg.lineId = option.lineId;
......@@ -1035,6 +1087,11 @@
pid: option.pid
})
}
if (option.createBy) {
this.SaleId = option.createBy
}else{
this.getSale()
}
} else {
let t = decodeURIComponent(option.scene).split('&')
t.forEach(x => {
......@@ -1085,6 +1142,36 @@
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
SelectSales(item){
this.SaleName = item.EmName
this.SaleId = item.CreateBy
},
getSale(){
this.apipost(
"b2b_get_GetCustomerCreateByList",
{
CustomerId: this.customer.customerId
},
(res) => {
if (res.resultCode == 1) {
if(res.data.length>0){
this.SaleList = res.data
if(res.data.length==1){
this.SaleName = res.data[0].EmName
this.SaleId = res.data[0].CreateBy
}
}else{
this.SaleId = 0
}
} else {
}
},
(err) => {
}
);
},
changeStartCity(item) {
this.showStartCities = false
this.delMsg.cityId = item.StartCityId
......@@ -1475,6 +1562,14 @@
this.is_show_auth = 1;
return;
}
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0) {
uni.showToast({
title: "请选择销售",
icon: "none",
});
this.showSalePreviwe = true;
return;
}
let myObj = {};
myObj.startCityName = this.dataList.startCityName;
myObj.startDate = this.currentPrice.startDate;
......@@ -1490,6 +1585,7 @@
myObj.tcid = this.currentPrice.tcid;
myObj.teamType = this.currentPrice.teamType;
myObj.lineteamId = this.dataList.lineteamId;
myObj.CreateBy = this.SaleId;
let imgCover = JSON.parse(this.dataList.imgCover);
if (imgCover.length > 0) {
myObj.CoverImg = imgCover[0].Url;
......@@ -2258,4 +2354,20 @@
height: 10vh;
margin-right: 1px;
}
.SaleNameTetx{
display: flex;
}
.SaleNameTetx view{
margin-right: 15rpx;
}
.SaleBox{
padding: 0 20px;
}
.SaleText{
height: 70rpx;
line-height: 67rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #eee;
}
</style>
......@@ -840,7 +840,7 @@
CommissionSharePeople: 0,
CommissionShareMoney: 0,
MiniAppUserId: MiniAppUserId,
CreateBy: CustomerCreateBy, //同行联系人创建人
CreateBy: this.currentPriceInfo.CreateBy, //同行联系人创建人 CustomerCreateBy
DirectCustomerId: 0, //直客Id
// #ifdef MP-WEIXIN
OrderSource: 5,
......
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