|
@@ -636,6 +636,10 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
|
+ let s=this.$store.state.user.isEnterSales
|
|
|
|
+ if(s){
|
|
|
|
+ this.$store.commit('user/isOrderBehalfBustomers', true);
|
|
|
|
+ }
|
|
console.log(options,"6556")
|
|
console.log(options,"6556")
|
|
this.$commonLoad.onload(options);
|
|
this.$commonLoad.onload(options);
|
|
let mchList = JSON.parse(options.mch_list);
|
|
let mchList = JSON.parse(options.mch_list);
|
|
@@ -722,6 +726,7 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
customerInfo(nVal, oVal) { //获取客户token代客下单用
|
|
customerInfo(nVal, oVal) { //获取客户token代客下单用
|
|
|
|
+
|
|
this.$request({
|
|
this.$request({
|
|
url: this.$api.sale.get_token,
|
|
url: this.$api.sale.get_token,
|
|
data: {
|
|
data: {
|
|
@@ -732,7 +737,7 @@
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$store.commit('user/customerAccessToken', res.data.access_token);
|
|
this.$store.commit('user/customerAccessToken', res.data.access_token);
|
|
this.$store.commit('user/isOrderBehalfBustomers', true);
|
|
this.$store.commit('user/isOrderBehalfBustomers', true);
|
|
-
|
|
|
|
|
|
+
|
|
delete this.previewData.address
|
|
delete this.previewData.address
|
|
const formData = this.$store.state.orderSubmit.formData;
|
|
const formData = this.$store.state.orderSubmit.formData;
|
|
const mutusemaxCoup= this.$store.getters['orderSubmit/getusemaxCoup'];
|
|
const mutusemaxCoup= this.$store.getters['orderSubmit/getusemaxCoup'];
|
|
@@ -904,6 +909,14 @@
|
|
loadPreviewData() {
|
|
loadPreviewData() {
|
|
// let obj = this.$store.state.orderSubmit.formData
|
|
// let obj = this.$store.state.orderSubmit.formData
|
|
// let formDateNew = JSON.stringify(obj)
|
|
// let formDateNew = JSON.stringify(obj)
|
|
|
|
+ // let s=this.$store.state.user.isEnterSales
|
|
|
|
+ // if(s){
|
|
|
|
+ // this.$store.commit('user/isOrderBehalfBustomers', true);
|
|
|
|
+ // }
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ mask: true,
|
|
|
|
+ title: '加载中',
|
|
|
|
+ });
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
let obj1 = this.$store.state.orderSubmit.formData
|
|
let obj1 = this.$store.state.orderSubmit.formData
|
|
let formDateNew1 = JSON.stringify(obj1)
|
|
let formDateNew1 = JSON.stringify(obj1)
|
|
@@ -950,10 +963,7 @@
|
|
});
|
|
});
|
|
}, 1600);
|
|
}, 1600);
|
|
this.loadingPreviewData = true;
|
|
this.loadingPreviewData = true;
|
|
- uni.showLoading({
|
|
|
|
- mask: true,
|
|
|
|
- title: '加载中',
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
|
|
this.$request({
|
|
this.$request({
|
|
url: this.previewUrl,
|
|
url: this.previewUrl,
|
|
@@ -963,7 +973,7 @@
|
|
},
|
|
},
|
|
}).then(response => {
|
|
}).then(response => {
|
|
this.loadingPreviewData = false;
|
|
this.loadingPreviewData = false;
|
|
- uni.hideLoading();
|
|
|
|
|
|
+ // uni.hideLoading();
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
if (response.data.allZiti && !response.data.address) {
|
|
if (response.data.allZiti && !response.data.address) {
|
|
response.data.address = {
|
|
response.data.address = {
|
|
@@ -993,7 +1003,7 @@
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loadingPreviewData = false;
|
|
this.loadingPreviewData = false;
|
|
- uni.hideLoading();
|
|
|
|
|
|
+ // uni.hideLoading();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
navigateStore(mchIndex) {
|
|
navigateStore(mchIndex) {
|
|
@@ -1211,6 +1221,7 @@
|
|
}).then(response => {
|
|
}).then(response => {
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.submitLock = false;
|
|
this.submitLock = false;
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -1252,8 +1263,10 @@
|
|
content: '代客下单成功',
|
|
content: '代客下单成功',
|
|
showCancel: false,
|
|
showCancel: false,
|
|
success: function(res) {
|
|
success: function(res) {
|
|
- if (res.confirm) {
|
|
|
|
- uni.navigateBack()
|
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:"/pages/sale/cusmter/dklist"
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1365,6 +1378,12 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
subscribe() {
|
|
subscribe() {
|
|
|
|
+ // let s=this.$store.state.user.isEnterSales
|
|
|
|
+ // console.log(s,878787878)
|
|
|
|
+ // if(s){
|
|
|
|
+ // console.log(s,878787878)
|
|
|
|
+ // this.$store.commit('user/isOrderBehalfBustomers', true);
|
|
|
|
+ // }
|
|
if (this.p_pay_id) {
|
|
if (this.p_pay_id) {
|
|
this.pay({
|
|
this.pay({
|
|
id: this.p_pay_id
|
|
id: this.p_pay_id
|