Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
758a9f9ffe
3 changed files with 18 additions and 2 deletions
  1. 15
      pages/process/order-info/index.js
  2. 3
      pages/process/order-info/index.wxml
  3. 2
      pages/process/order-list/index.wxml

15
pages/process/order-info/index.js

@ -1,7 +1,7 @@
// pages/process/order-check/index.js
import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { repeatOrder, getFactoryOrderInfo, checkingOrder, printOrder} from "../../../api/saas"
import { cancelOrder, repeatOrder, getFactoryOrderInfo, checkingOrder, printOrder} from "../../../api/saas"
const event = require('../../../utils/event')
const util = require('../../../utils/util')
const app = getApp()
@ -91,6 +91,19 @@ Scene({
}
})
},
cancelOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {
wx.showLoading({ title: '正在获取', mask: true })
cancelOrder(this.data.form.id).then(result => {
wx.hideLoading()
util.showBackToast('订单已经删除')
event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
})
},
repeatOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定重新过皮重?' }).then(() => {
wx.showLoading({ title: '正在处理', mask: true })

3
pages/process/order-info/index.wxml

@ -175,6 +175,9 @@
</view>
<view style="height:16rpx"></view>
<submit-layout wx:if="{{form && form.status == 2 }}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消订单</van-button>
</submit-layout>
<submit-layout wx:if="{{form && form.status == 3 && !agent }}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="repeatOrder">重新过皮重</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="checkOrder">通过审核</van-button>

2
pages/process/order-list/index.wxml

@ -65,7 +65,7 @@
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="cancelOrder" wx:if="{{item.status == 1}}">取消订单</van-button>
bind:click="cancelOrder" wx:if="{{item.status == 1 || item.status == 2}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:132rpx" data-id="{{item.id}}"
bind:click="priceOrder" wx:if="{{item.status == 1}}">定价</van-button>
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"

Loading…
Cancel
Save