Browse Source

1、订单列表未审核单据长按删除功能

master
chenxuhui 7 years ago
parent
commit
e59de90397
2 changed files with 28 additions and 1 deletions
  1. +27
    -0
      pages/order/order.js
  2. +1
    -1
      pages/order/order.wxml

+ 27
- 0
pages/order/order.js View File

@ -6,6 +6,7 @@ var PageSize = 10
var UnCheckPageIndex = 0
var CheckedPageIndex = 0
var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList'
var deleteItem = "/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/Delete"
// 未审核订单列表
function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) {
@ -167,11 +168,37 @@ Page({
getCheckedOrderList(that, CheckedPageIndex, PageSize);
},
// 进入订单详情
itemclick: function(e) {
wx.navigateTo({
url: 'detail/detail?ID=' + e.currentTarget.dataset.orderid,
})
},
// 长按删除一条单据
longPressDelete: function (event) {
var that = this;
var itemID = event.currentTarget.dataset.orderid;
wx.showModal({
title: '提示',
content: '确定要删除' + itemID + '号单据吗?',
success: function (res) {
if (res.confirm) {
var params = [itemID];
network.transfer_request(deleteItem, params, function (res) {
wx.showToast({
title: '操作成功',
})
that.onShow();
})
} else if (res.cancel) {
console.log('点击取消了');
return false;
}
}
})
},
createNew: function(e) {
wx.navigateTo({
url: 'newBill/newBill',


+ 1
- 1
pages/order/order.wxml View File

@ -11,7 +11,7 @@
<scroll-view scroll-y="true" class='scroll-views' style='height:{{winHeight -43}}px' bindscrolltolower="unCheckedScrollLower">
<view class="custmer_list_view_main" wx:for="{{unCheckDataArr}}" wx:key="item">
<view class='custmer_list_view' catchtap='itemclick' data-orderid='{{item.orderID}}'>
<view class='custmer_list_view' catchtap='itemclick' bindlongpress="longPressDelete" data-orderid='{{item.orderID}}'>
<view class='phone_h'>
<text class='text_name'>{{item.Customer_Name}}</text>
<text style='color:{{item.color}}' class='text_state'>流程状态:{{item.workFlowName}}</text>


Loading…
Cancel
Save