Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
f5bf4943dc
8 changed files with 48 additions and 25 deletions
  1. 4
      app.js
  2. 10
      pages/process/check-list/index.wxml
  3. 3
      pages/process/order-list/index.js
  4. 16
      pages/process/order-list/index.wxml
  5. 20
      pages/process/outside-list/index.wxml
  6. 14
      pages/process/payment-list/index.js
  7. 1
      pages/process/payment-list/index.json
  8. 5
      pages/process/payment-list/index.wxml

4
app.js

@ -1,8 +1,8 @@
//app.js
App({
evn: 1, // 0: 开发版本;1:测试版本;2:生产版本
evn: 2, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: '2.2.1',
version: '2.3.1',
xAppId: '503258978847953926',
userInfo: null,
//----------------------------------------------globalData--------------------------------------

10
pages/process/check-list/index.wxml

@ -56,13 +56,13 @@
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</view>
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.id}}"
bind:click="cancelOrder" wx:if="{{item.status == 1}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-id="{{item.id}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="cancelOrder">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="priceOrder" wx:if="{{item.status == 1}}">定价</van-button>
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.id}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="repriceOrder" wx:if="{{item.status == 3}}">重新定价</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-id="{{item.id}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="checkOrder" wx:if="{{item.status == 3}}">审核</van-button>
</view>
</view>

3
pages/process/order-list/index.js

@ -160,6 +160,9 @@ Scene({
checkOrder: function(e){
wx.navigateTo({ url: '/pages/process/order-info/index?id=' + e.currentTarget.dataset.id })
},
loggerItem: function(e){
wx.navigateTo({url: `/pages/process/order-logger/index?type=1&orderId=${e.currentTarget.dataset.id}` })
},
paymentItem: function (e) {
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
if(!this.data.admin) {

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

@ -64,18 +64,20 @@
<image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.status == 6}}"></image>
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.id}}"
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;" data-id="{{item.id}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="cancelOrder" wx:if="{{item.status != 6}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="priceOrder" wx:if="{{item.status == 1}}">定价</van-button>
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.id}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="repriceOrder" wx:if="{{item.status == 3}}">重新定价</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-id="{{item.id}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="checkOrder" wx:if="{{item.status == 3}}">审核</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="paymentItem" wx:if="{{item.status == 4 && admin}}">去支付</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="paymentItem" wx:if="{{item.status == 42 && admin}}">去结算</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.id}}"
bind:click="loggerItem" wx:if="{{item.status == 5 || item.status == 6}}">查看日志</van-button>
</view>
</view>
</view>

20
pages/process/outside-list/index.wxml

@ -60,23 +60,23 @@
<image class="item-icon" src="/assets/image/icon-delete.png" wx:if="{{item.orderStatus == 6}}"></image>
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.orderId}}"
bind:click="cancelOrder" wx:if="{{item.orderStatus == 0 || item.orderStatus == 1}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.orderId}}"
bind:click="cancelOrder" wx:if="{{item.orderStatus != 6}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="editItem" wx:if="{{item.orderStatus == 0}}">修改订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 0}}">收货</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 1}}">确认定价</van-button>
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.orderId}}"
<van-button round plain type="default" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-id="{{item.orderId}}"
bind:click="repriceOrder" wx:if="{{item.orderStatus == 3}}">重新定价</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 3}}">审核订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 4 && admin}}">去支付</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 42 && admin}}">去结算</van-button>
<van-button round plain type="default" custom-style="height:64rpx;" data-id="{{item.orderId}}"
<van-button round plain type="default" custom-style="height:64rpx;margin-left:24rpx;width:180rpx" data-id="{{item.orderId}}"
bind:click="orderLogger" wx:if="{{item.orderStatus == 5 || item.orderStatus == 6}}">查看日志</van-button>
</view>
</view>

14
pages/process/payment-list/index.js

@ -1,5 +1,6 @@
// pages/process/order-list/index.js
import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { getFactoryOrderList } from "../../../api/saas"
const util = require('../../../utils/util')
const app = getApp()
@ -84,6 +85,19 @@ Scene({
this.refresh.setRefresh(false)
})
},
cancelOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {
wx.showLoading({ title: '正在获取', mask: true })
cancelOrder(e.currentTarget.dataset.id).then(result => {
wx.hideLoading()
util.showToast('订单已经删除')
this.onRefreshList()
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
})
},
lookItem: function (e) {
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
if(!this.data.admin) {

1
pages/process/payment-list/index.json

@ -6,6 +6,7 @@
"van-icon": "/components/icon/index",
"van-divider": "/components/divider/index",
"van-loading": "/components/loading/index",
"van-dialog": "/components/dialog/index",
"notification": "/pages/message/notification/index"
}
}

5
pages/process/payment-list/index.wxml

@ -57,7 +57,9 @@
<view class="text-sm text-black">{{item.settlePrice || '- -'}}</view>
</view>
<view class="flex" style="justify-content: flex-end;margin-top:16rpx">
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round plain type="default" custom-style="height:64rpx;width:180rpx" data-id="{{item.orderId}}"
bind:click="cancelOrder" wx:if="{{item.status != 6}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:180rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{(item.status == 4 || item.status == 42) && admin}}">去支付</van-button>
</view>
</view>
@ -70,4 +72,5 @@
</van-divider>
</refresh-view>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/>
Loading…
Cancel
Save