123
This commit is contained in:
@@ -127,7 +127,15 @@
|
||||
// return
|
||||
// }
|
||||
let _this = this
|
||||
_this.$api.pickUpCardBind(this.page).then((resp) => {
|
||||
|
||||
var params = {
|
||||
customerSid: this.page.customerSid,
|
||||
transferSid: this.page.codeKey
|
||||
}
|
||||
|
||||
console.log("params+++++++++++++++", params);
|
||||
|
||||
_this.$api.receiveTransferGoods(params).then((resp) => {
|
||||
bus.$emit('order', "监听回调");
|
||||
// setTimeout(() => {
|
||||
// uni.$emit('order', "监听回调")
|
||||
|
||||
@@ -47,11 +47,13 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 1;">
|
||||
<view
|
||||
style="display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 1;">
|
||||
<text
|
||||
style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif; flex: 1;">提货时间</text>
|
||||
|
||||
<uni-datetime-picker type="date" v-model="info.reserveDate":start="info.start" :end="info.end":disabledDate="disabledDate" />
|
||||
|
||||
<uni-datetime-picker type="date" v-model="info.reserveDate" :start="info.start"
|
||||
:end="info.end" :disabledDate="disabledDate" />
|
||||
|
||||
</view>
|
||||
|
||||
@@ -63,7 +65,8 @@
|
||||
|
||||
<text style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">提菜人</text>
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;" @click="changePer()">
|
||||
<view v-if="info.name!=''" style="display: flex;flex-direction: row;align-items: center;"
|
||||
@click="changePer()">
|
||||
|
||||
<text
|
||||
style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">{{info.name}}</text>
|
||||
@@ -72,6 +75,17 @@
|
||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
<view v-if="info.name==''" style="display: flex;flex-direction: row;align-items: center;"
|
||||
@click="changePer()">
|
||||
|
||||
<text style="font-size: 12px;color: #999; margin-left: 8px;">请完善</text>
|
||||
|
||||
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
@@ -215,11 +229,11 @@
|
||||
getSun() {
|
||||
let _this = this
|
||||
_this.$api.getExtractSaturAndSun().then((resp) => {
|
||||
|
||||
|
||||
_this.disabledDate = resp
|
||||
|
||||
|
||||
}).catch(e => {
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
address() {
|
||||
@@ -245,43 +259,55 @@
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
|
||||
jian(item){
|
||||
console.log("item》》》》", item)
|
||||
|
||||
jian(item) {
|
||||
console.log("item》》》》", item)
|
||||
const that = this
|
||||
if (Number(item.count) == 1) {
|
||||
|
||||
wx.showModal({
|
||||
content: '确定不要了吗',
|
||||
cancelText: "再想想",
|
||||
confirmText: "删除",
|
||||
confirmColor: "#FF9900",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
item.count = 0
|
||||
const index = that.pickingUpGoods.findIndex((info) => info.goodsSid === item.goodsSid)
|
||||
console.log("index》》》》", index)
|
||||
that.pickingUpGoods.splice(index, 1)
|
||||
} else if (res.cancel) {
|
||||
|
||||
if (Number(item.count) == 1) {
|
||||
|
||||
wx.showModal({
|
||||
content: '确定不要了吗',
|
||||
cancelText: "再想想",
|
||||
confirmText: "删除",
|
||||
confirmColor: "#FF9900",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
item.count = 0
|
||||
const index = that.pickingUpGoods.findIndex((info) => info.goodsSid === item
|
||||
.goodsSid)
|
||||
console.log("index》》》》", index)
|
||||
that.pickingUpGoods.splice(index, 1)
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
if (Number(item.count) > 0) {
|
||||
item.count = Number(item.count) - 1
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
if (Number(item.count) > 0) {
|
||||
item.count = Number(item.count) - 1
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
jia(item){
|
||||
jia(item) {
|
||||
if (item.count < item.goodsNumber)
|
||||
item.count = Number(item.count) + 1
|
||||
},
|
||||
congirmExtract() {
|
||||
let _this = this
|
||||
|
||||
if (_this.info.reserveDate == '') {
|
||||
this.shortToast('请选择日期')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.info.name == "" || this.info.phone == '') {
|
||||
this.shortToast('请完善提菜人信息')
|
||||
return
|
||||
}
|
||||
|
||||
let list = []
|
||||
|
||||
for (var i = 0; i < this.pickingUpGoods.length; i++) {
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
</view>
|
||||
|
||||
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
|
||||
,{{data.brandVos[selectIndex2].qssl}}起订,200斤以上免配送费</view>
|
||||
,{{data.brandVos[selectIndex2].qssl}}起订。</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
onKeyInput() {
|
||||
onKeyInput(event) {
|
||||
this.transferInfo.remarks = event.target.value
|
||||
},
|
||||
shareGift() {
|
||||
@@ -467,7 +467,9 @@
|
||||
this.getcount()
|
||||
},
|
||||
jia(item) {
|
||||
item.count = Number(item.count) + 1
|
||||
if (item.count < item.goodsNumber)
|
||||
item.count = Number(item.count) + 1
|
||||
|
||||
this.getcount()
|
||||
this.addGoods(item)
|
||||
},
|
||||
@@ -509,14 +511,14 @@
|
||||
},
|
||||
|
||||
gotoShopp() {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/home/cloudCard2',
|
||||
// })
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/bind/bind_cloudCard'
|
||||
uni.switchTab({
|
||||
url: '/pages/home/cloudCard2',
|
||||
})
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/bind/bind_cloudCard'
|
||||
// })
|
||||
|
||||
},
|
||||
|
||||
transfer() {
|
||||
@@ -558,115 +560,72 @@
|
||||
this.showModal3 = false
|
||||
},
|
||||
onShareAppMessage: function(res) {
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
icon: 'loading',
|
||||
duration: 10000
|
||||
});
|
||||
|
||||
let _this = this
|
||||
const promise = new Promise(resolve => {
|
||||
// 模拟网络请求
|
||||
setTimeout(() => {
|
||||
|
||||
var list = []
|
||||
for (var i = 0; i < this.pickingUpGoods.length; i++) {
|
||||
var item = this.pickingUpGoods[i]
|
||||
var list = []
|
||||
for (var i = 0; i < this.pickingUpGoods.length; i++) {
|
||||
var item = this.pickingUpGoods[i]
|
||||
|
||||
if (item.count > 0) {
|
||||
list.push({
|
||||
goodsSid: item.goodsSid,
|
||||
select: item.count
|
||||
})
|
||||
}
|
||||
if (item.count > 0) {
|
||||
list.push({
|
||||
goodsSid: item.goodsSid,
|
||||
select: item.count
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var params = {
|
||||
customerSid: getApp().globalData.sid,
|
||||
brandId: this.brandType,
|
||||
vos: list
|
||||
}
|
||||
var params = {
|
||||
customerSid: getApp().globalData.sid,
|
||||
brandId: _this.brandType,
|
||||
remarks: _this.transferInfo.remarks,
|
||||
vos: list
|
||||
}
|
||||
|
||||
console.log("=========0", params);
|
||||
console.log("=========0", params);
|
||||
|
||||
_this.$api.transSubmission(params).then((resp) => {
|
||||
_this.$api.transSubmission(params).then((resp) => {
|
||||
|
||||
console.log("=========", resp);
|
||||
console.log("=========", resp);
|
||||
_this.showModal3 = false
|
||||
|
||||
const promise = new Promise(resolve => {
|
||||
// 模拟网络请求
|
||||
setTimeout(() => {
|
||||
wx.hideLoading()
|
||||
this.showModal3 = false
|
||||
resolve({
|
||||
title: '标题',
|
||||
path: '页面'
|
||||
let shareData = JSON.stringify({
|
||||
params: {
|
||||
code: resp.transferCode,
|
||||
codeKey: resp.sid
|
||||
},
|
||||
functionName: 'bindCard',
|
||||
url: '/pages/bind/bind_cloudCard?code=' + resp
|
||||
.transferCode + "&codeKey=" + resp.sid
|
||||
|
||||
// url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
|
||||
// functionName: 'share'
|
||||
})
|
||||
}, 3000)
|
||||
})
|
||||
// 转码传输
|
||||
let value = encodeURIComponent(shareData)
|
||||
|
||||
return {
|
||||
promise
|
||||
}
|
||||
resolve({
|
||||
title: '汇融惠享-云菜窖',
|
||||
// ②
|
||||
path: '/pages/login/login?data=' + value,
|
||||
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
|
||||
|
||||
}).catch(e => {
|
||||
this.shortToast('发生错误,请稍后再试.')
|
||||
return
|
||||
})
|
||||
|
||||
}).catch(e => {
|
||||
_this.shortToast('发生错误,请稍后再试.')
|
||||
return
|
||||
})
|
||||
|
||||
}, 0)
|
||||
})
|
||||
|
||||
// this.shareCard()
|
||||
// wx.showLoading({
|
||||
// title: '加载中',
|
||||
// icon: 'loading',
|
||||
// duration: 10000
|
||||
// });
|
||||
// const promise = new Promise(resolve => {
|
||||
// // 模拟网络请求
|
||||
// setTimeout(() => {
|
||||
// wx.hideLoading()
|
||||
// this.showModal3 = false
|
||||
// resolve({
|
||||
// title: '标题',
|
||||
// path: '页面'
|
||||
// })
|
||||
// }, 3000)
|
||||
// })
|
||||
return promise
|
||||
|
||||
// return {
|
||||
// promise
|
||||
// }
|
||||
|
||||
// console.log("res", res)
|
||||
// console.log("data", res.target.dataset)
|
||||
// var data = res.target.dataset.info
|
||||
|
||||
// // ①
|
||||
// let shareData = JSON.stringify({
|
||||
// params: {
|
||||
// code: data.code,
|
||||
// codeKey: data.codeKey,
|
||||
// customerSid: ''
|
||||
// },
|
||||
// functionName: 'bindCard',
|
||||
// url: '/pages/detail/detail_affeection?sid=' + data.sid
|
||||
|
||||
// // url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
|
||||
// // functionName: 'share'
|
||||
// })
|
||||
// // 转码传输
|
||||
// let value = encodeURIComponent(shareData)
|
||||
|
||||
// return {
|
||||
// title: '汇融惠享-云菜窖',
|
||||
// // ②
|
||||
// path: '/pages/login/login?data=' + value,
|
||||
// imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
|
||||
// success: function(res) {
|
||||
// console.log('aaaa', "分享成功")
|
||||
// },
|
||||
// fail: function(res) {
|
||||
// // 转发失败
|
||||
// console.log('aaaa', "用户点击了取消")
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
shareCard() {
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后,您和您的朋友将获得“蔬菜品鉴礼包”。</text>
|
||||
<text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后,您将获得“蔬菜品鉴礼包”。</text>
|
||||
|
||||
<!-- <view style="display: flex;flex-direction: row;align-items: center; ">
|
||||
|
||||
@@ -287,12 +287,12 @@
|
||||
break;
|
||||
case "赠与我的":
|
||||
uni.navigateTo({
|
||||
url: '/pages/records/transferRecords',
|
||||
url: '/pages/records/transferRecords2',
|
||||
})
|
||||
break;
|
||||
case "我的转赠":
|
||||
uni.navigateTo({
|
||||
url: '/pages/records/transferRecords2',
|
||||
url: '/pages/records/transferRecords',
|
||||
})
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
console.log("人员sid", res.data.data.sid);
|
||||
console.log("token", res.data.data.token);
|
||||
|
||||
|
||||
console.log("middleware>>>>>>>>>>>>", _this.middleware);
|
||||
|
||||
if (_this.middleware != null) {
|
||||
// 走中间件的逻辑
|
||||
if ('share' == _this.middleware.functionName) {
|
||||
@@ -93,26 +96,29 @@
|
||||
} else if ('bindCard' == _this.middleware
|
||||
.functionName) {
|
||||
|
||||
_this.middleware.params.customerSid = res.data.data
|
||||
.sid
|
||||
uni.reLaunch({
|
||||
url: _this.middleware.url
|
||||
});
|
||||
// _this.middleware.params.customerSid = res.data.data
|
||||
// .sid
|
||||
|
||||
_this.$api.pickUpCardBind(_this.middleware.params)
|
||||
.then((resp) => {
|
||||
uni.reLaunch({
|
||||
url: _this.middleware.url
|
||||
});
|
||||
}).catch(e => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: e.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/pickUpCard'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
// _this.$api.pickUpCardBind(_this.middleware.params)
|
||||
// .then((resp) => {
|
||||
// uni.reLaunch({
|
||||
// url: _this.middleware.url
|
||||
// });
|
||||
// }).catch(e => {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: e.msg,
|
||||
// showCancel: false,
|
||||
// success: function(res) {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/home/pickUpCard'
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
|
||||
@@ -9,27 +9,27 @@
|
||||
|
||||
<view class="item">
|
||||
<text class="item_left">转赠单号:</text>
|
||||
<text class="item_rifht">{{item.reserveCode}}</text>
|
||||
<text class="item_rifht">{{item.transferCode}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item_left">转赠时间:</text>
|
||||
<text class="item_rifht">{{item.reserveDate}}</text>
|
||||
<text class="item_rifht">{{item.createTime}}</text>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<text class="item_left">转赠留言:</text>
|
||||
<text class="item_rifht">{{item.userPhone}}</text>
|
||||
<text class="item_rifht">{{item.remarks}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item_left">领取人员:</text>
|
||||
<text class="item_rifht">{{item.lqNick}}</text>
|
||||
</view>
|
||||
<view
|
||||
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
|
||||
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text>
|
||||
|
||||
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
|
||||
open-type="share">分享窖</button>
|
||||
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
|
||||
open-type="share">已分享</button>
|
||||
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
|
||||
|
||||
|
||||
<button v-show="item.state=='1'" class='sharebtn' :data-info="item"
|
||||
open-type="share">分享窖</button>
|
||||
<button v-show="item.state=='2'" class='sharebtn2'>转赠成功</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -54,12 +54,12 @@
|
||||
// 分页的请求
|
||||
queryList(pageNo, pageSize) {
|
||||
let _this = this
|
||||
_this.$api.myOrderListByUserSid({
|
||||
_this.$api.transferRecordsList({
|
||||
"current": pageNo,
|
||||
"size": pageSize,
|
||||
"params": {
|
||||
"customerSid": getApp().globalData.sid,
|
||||
"state": '0', //0 未提货 1 已提货
|
||||
"state": '1', //1 我转赠的 2 赠与我的
|
||||
|
||||
}
|
||||
}).then((resp) => {
|
||||
@@ -78,12 +78,12 @@
|
||||
// ①
|
||||
let shareData = JSON.stringify({
|
||||
params: {
|
||||
code: data.code,
|
||||
codeKey: data.codeKey,
|
||||
customerSid: ''
|
||||
code: data.transferCode,
|
||||
codeKey: data.sid
|
||||
},
|
||||
functionName: 'bindCard',
|
||||
url: '/pages/detail/detail_affeection?sid=' + data.sid
|
||||
url: '/pages/bind/bind_cloudCard?code=' + data
|
||||
.transferCode + "&codeKey=" + data.sid
|
||||
|
||||
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
|
||||
// FunctionName:'share!
|
||||
@@ -126,7 +126,7 @@
|
||||
}
|
||||
|
||||
.sharebtn {
|
||||
background: #FF4727;
|
||||
background: #FE9039;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
width: 30vw;
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
.sharebtn2 {
|
||||
background: #FF7165;
|
||||
background: #CFCFCF;
|
||||
width: 30vw;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
@@ -150,16 +150,4 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
.sharebtn3 {
|
||||
background: #CFCFCF;
|
||||
width: 30vw;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.sharebtn3::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -9,26 +9,24 @@
|
||||
|
||||
<view class="item">
|
||||
<text class="item_left">转赠单号:</text>
|
||||
<text class="item_rifht">{{item.reserveCode}}</text>
|
||||
<text class="item_rifht">{{item.transferCode}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item_left">转赠时间:</text>
|
||||
<text class="item_rifht">{{item.reserveDate}}</text>
|
||||
<text class="item_rifht">{{item.createTime}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item_left">转赠人员:</text>
|
||||
<text class="item_rifht">{{item.fxNick}}</text>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<text class="item_left">转赠留言:</text>
|
||||
<text class="item_rifht">{{item.userPhone}}</text>
|
||||
<text class="item_rifht">{{item.remarks}}</text>
|
||||
</view>
|
||||
<view
|
||||
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
|
||||
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text>
|
||||
|
||||
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
|
||||
open-type="share">分享窖</button>
|
||||
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
|
||||
open-type="share">已分享</button>
|
||||
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -54,12 +52,12 @@
|
||||
// 分页的请求
|
||||
queryList(pageNo, pageSize) {
|
||||
let _this = this
|
||||
_this.$api.myOrderListByUserSid({
|
||||
_this.$api.transferRecordsList({
|
||||
"current": pageNo,
|
||||
"size": pageSize,
|
||||
"params": {
|
||||
"customerSid": getApp().globalData.sid,
|
||||
"state": '0', //0 未提货 1 已提货
|
||||
"state": '2', //1 我转赠的 2 赠与我的
|
||||
|
||||
}
|
||||
}).then((resp) => {
|
||||
|
||||
Reference in New Issue
Block a user