|
@@ -69,7 +69,7 @@
|
|
|
<view>销售员工</view>
|
|
|
</view>
|
|
|
<scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
|
|
|
- <view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem,1)"
|
|
|
+ <view class="zp-item" v-for="ygitem in saleyg.list" @click="choosYg(ygitem,1)"
|
|
|
:class="{'choose': ygitem.id == sale_yg.id}">
|
|
|
<image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
|
|
|
<view class="zp-name">{{ygitem.name}}</view>
|
|
@@ -355,6 +355,9 @@
|
|
|
loadingType: 'loadmore',
|
|
|
loaded: false,
|
|
|
},
|
|
|
+ saleyg: {
|
|
|
+ list: []
|
|
|
+ },
|
|
|
choose_yg: {},
|
|
|
sale_yg: {},
|
|
|
payInfo: {},
|
|
@@ -434,8 +437,13 @@
|
|
|
}
|
|
|
},
|
|
|
// 获取员工列表
|
|
|
- getMen() {
|
|
|
+ getMen(type ) {
|
|
|
let that = this
|
|
|
+ if(type == 're') {
|
|
|
+ that.yg.loadingType = 'more'
|
|
|
+ that.yg.page = 1
|
|
|
+ that.yg.list = []
|
|
|
+ }
|
|
|
if(that.yg.loadingType == 'noMore' || that.yg.loadingType == 'loading' ) {
|
|
|
return
|
|
|
}
|
|
@@ -447,8 +455,14 @@
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
let arr = []
|
|
|
- arr = arr.concat(res.data.list)
|
|
|
- that.yg.list = that.yg.list.concat(arr)
|
|
|
+
|
|
|
+ let arr1 = res.data.list
|
|
|
+ let arr2 = [{
|
|
|
+ id: 0,
|
|
|
+ name: '暂无'
|
|
|
+ }]
|
|
|
+ that.yg.list = arr1
|
|
|
+ that.saleyg.list = arr2.concat(arr1)
|
|
|
if(that.yg.limit == res.data.list.length) {
|
|
|
that.yg.loadingType = 'more'
|
|
|
that.yg.page++
|
|
@@ -581,6 +595,9 @@
|
|
|
} else {
|
|
|
this.addressType(1, e);
|
|
|
}
|
|
|
+ this.getMen('re')
|
|
|
+ this.choose_yg = {}
|
|
|
+ this.sale_yg = {}
|
|
|
},
|
|
|
// 选择配送方式
|
|
|
onDelivery() {
|
|
@@ -743,7 +760,7 @@
|
|
|
pay_type: e.value,
|
|
|
store_id: that.system_store.id,
|
|
|
reservation_time: that.yytime,
|
|
|
- sale_uid: that.sale_yg.id
|
|
|
+ sale_uid: that.sale_yg.id || 0
|
|
|
}).then(res => {
|
|
|
let status = res.data.status,
|
|
|
orderId = res.data.result.order_id,
|
|
@@ -995,11 +1012,11 @@
|
|
|
this.pay_close = false;
|
|
|
},
|
|
|
goPay() {
|
|
|
- if(!this.sale_yg.id) {
|
|
|
- return this.$util.Tips({
|
|
|
- title: '请选择销售员工'
|
|
|
- });
|
|
|
- }
|
|
|
+ // if(!this.sale_yg.id) {
|
|
|
+ // return this.$util.Tips({
|
|
|
+ // title: '请选择销售员工'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
if(!this.choose_yg.id) {
|
|
|
return this.$util.Tips({
|
|
|
title: '请选择预约员工'
|