diff --git a/pages/home/customer-list/index.js b/pages/home/customer-list/index.js index 0c170b2..3a29d91 100644 --- a/pages/home/customer-list/index.js +++ b/pages/home/customer-list/index.js @@ -166,7 +166,11 @@ Scene({ this.data.orderList.forEach(element => { element.data.forEach(item => { var keyword = detail.toLocaleUpperCase() - if (item.name.indexOf(keyword) !== -1 || item.mobile.indexOf(keyword) !== -1) { + if(!util.isEmpty(item.name) && item.name.indexOf(keyword) !== -1){ + result.push(item) + } else if(!util.isEmpty(item.mobile) && item.mobile.indexOf(keyword) !== -1){ + result.push(item) + } else if(!util.isEmpty(item.cardNo) && item.cardNo.indexOf(keyword) !== -1){ result.push(item) } }) diff --git a/pages/home/customer-list/index.wxml b/pages/home/customer-list/index.wxml index 716a8f3..50fb96e 100644 --- a/pages/home/customer-list/index.wxml +++ b/pages/home/customer-list/index.wxml @@ -3,7 +3,7 @@ 客户列表 - + 取消 @@ -30,8 +30,8 @@ {{item.name || ''}} - {{'电话号码:' + item.mobile}} - {{'卡号:' + item.cardNo}} + {{'电话号码:' + item.mobile}} + {{'卡号:' + item.cardNo}} 注册纸通宝 @@ -50,8 +50,8 @@ {{item.name || ''}} - {{'电话号码:' + item.mobile}} - {{'卡号:' + item.cardNo}} + {{'电话号码:' + item.mobile}} + {{'卡号:' + item.cardNo}} = 0){ - this.data.actions = [{ id: 2, name: '绑定员工' }, { id: 1, name: '绑定客户' }] + this.data.actions = [{ id: 2, name: '绑定员工' }, { id: 1, name: '绑定客户' }, { id:3, name: '删除', color: '#ee0a24' }] } this.setData({ height: app.globalData.fragmentHeight, actions: this.data.actions }) event.on('EventMessage', this, this.onEvent) @@ -82,6 +82,9 @@ Scene({ wx.navigateTo({ url: `/pages/home/customer-info/index?cardNo=${this.data.nowItem.cardNo}` }) } else if(detail.id == 2){ wx.navigateTo({ url: `/pages/home/employee-info/index?cardNo=${this.data.nowItem.cardNo}` }) + } else if(detail.id == 3){ + // wx.navigateTo({ url: `/pages/home/employee-info/index?cardNo=${this.data.nowItem.cardNo}` }) + this.onDelete(this.data.nowItem.cardNo) } }, lookItem: function (e) { @@ -92,10 +95,9 @@ Scene({ } wx.navigateTo({ url: `/pages/home/customer-info/index?cardNo=${this.data.nowItem.cardNo}` }) }, - onDelete: function (e) { - var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] + onDelete: function (cardNo) { wx.showLoading({ title: '正在处理', mask: true }) - removeCardNop(item.cardNo).then(result => { + removeCardNop(cardNo).then(result => { this.onRefreshList() wx.hideLoading() }).catch(err => { diff --git a/pages/message/card-list/index.json b/pages/message/card-list/index.json index deb007e..7b492db 100644 --- a/pages/message/card-list/index.json +++ b/pages/message/card-list/index.json @@ -4,7 +4,6 @@ "van-divider": "/components/divider/index", "van-loading": "/components/loading/index", "van-cell": "/components/cell/index", - "van-swipe-cell": "/components/swipe-cell/index", "van-action-sheet": "/components/action-sheet/index", "notification": "/pages/message/notification/index" } diff --git a/pages/message/card-list/index.wxml b/pages/message/card-list/index.wxml index 171f2e5..061584b 100644 --- a/pages/message/card-list/index.wxml +++ b/pages/message/card-list/index.wxml @@ -12,10 +12,7 @@ {{loading? '正在加载' : '暂无数据'}} - - - 删除 - + diff --git a/pages/message/card-list/index.wxss b/pages/message/card-list/index.wxss index 035dd90..c3de589 100644 --- a/pages/message/card-list/index.wxss +++ b/pages/message/card-list/index.wxss @@ -1,10 +1 @@ -/* pages/storage/index/index.wxss */ -.van-swipe-cell__right { - display: inline-block; - width: 65px; - font-size: 15px; - line-height: 65px; - color: #fff; - text-align: center; - background-color: #ee0a24; -} \ No newline at end of file +/* pages/storage/index/index.wxss */ \ No newline at end of file diff --git a/pages/process/order-list/index.wxml b/pages/process/order-list/index.wxml index d4a3175..7ed5585 100644 --- a/pages/process/order-list/index.wxml +++ b/pages/process/order-list/index.wxml @@ -64,11 +64,11 @@ - 取消订单 定价 - 重新定价 审核 @@ -76,7 +76,9 @@ bind:click="paymentItem" wx:if="{{item.status == 4 && admin}}">去支付 去结算 - 恢复订单 + 查看日志 diff --git a/pages/process/outside-list/index.wxml b/pages/process/outside-list/index.wxml index e5a2f82..718f784 100644 --- a/pages/process/outside-list/index.wxml +++ b/pages/process/outside-list/index.wxml @@ -60,15 +60,15 @@ - 取消订单 - 修改订单 收货 确认定价 - 重新定价 审核订单 @@ -76,7 +76,7 @@ bind:click="lookItem" wx:if="{{item.orderStatus == 4 && admin}}">去支付 去结算 - 查看日志 diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js index be5968a..cdae9fe 100644 --- a/pages/process/payment/index.js +++ b/pages/process/payment/index.js @@ -125,7 +125,7 @@ Scene({ this.setData({ settleType: detail }) }, onTypeClick(e) { - if(Number(e.currentTarget.dataset.name == 2) && util.isEmpty(this.data.params.bankCardNo)){ + if(Number(e.currentTarget.dataset.name) == 2 && util.isEmpty(this.data.params.bankCardNo)){ util.showToast('暂无客户银行卡信息,无法进行银行卡转账') return } @@ -157,9 +157,6 @@ Scene({ this.setData({ [form_data]: e.detail }) }, agentPayment: function(settleType){ - if(Number(settleType) != 1 && Number(settleType) != 2){ - settleType = 3 - } wx.showLoading({ title: '正在处理', mask: true }) this.data.requesting = true this.data.params.settleType = Number(settleType) diff --git a/pages/process/payment/index.wxml b/pages/process/payment/index.wxml index 82f755a..f59a2bf 100644 --- a/pages/process/payment/index.wxml +++ b/pages/process/payment/index.wxml @@ -14,25 +14,25 @@ 付款方式 - - - - - - - - - 银行卡转账 - ({{params.bankCardNo}}) - - - - - - - - - + + + + + + + + + + + + + + + + + + + 付款备注