Commit e4393b79 by 高淑倩

物流_确认收货

parent e3e661c2
......@@ -10,7 +10,8 @@ wxService.page({
* 页面的初始数据
*/
data: {
logisData:[]
logisData:[],
orderId:''
},
/**
......@@ -24,20 +25,24 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { code, logisticsNo} = this.options
console.log('-----code----', code)
const { code, logisticsNo,id} = this.options
console.log('-----code----', code,id)
if(code){
this.setData({
orderId: id
},()=>{
this.getLogisticsInfo(code, logisticsNo)
})
}
},
// 确认收货
handelConfirmReceipt(e) {
const { id } = e.currentTarget.dataset
handelConfirmReceipt() {
const { orderId } = this.data
wx.showLoading({
title: '加载中',
mask: true
})
wxService.post(`/sale/trade/buyer/confirm/${id}`).then(res => {
wxService.post(`/sale/trade/buyer/confirm/${orderId}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......
......@@ -140,12 +140,12 @@
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button>
</view>
<view class="order-status" wx-if="{{item.status == 'P'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}" hover-class="none">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
</navigator>
</view>
<view class="order-status" wx-if="{{item.status == 'D'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}" hover-class="none">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
</navigator>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelConfirmReceipt">确认收货</button>
......
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