Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
995a1a69db
10 changed files with 48 additions and 56 deletions
  1. 6
      pages/home/customer-list/index.js
  2. 10
      pages/home/customer-list/index.wxml
  3. 12
      pages/message/card-list/index.js
  4. 1
      pages/message/card-list/index.json
  5. 5
      pages/message/card-list/index.wxml
  6. 11
      pages/message/card-list/index.wxss
  7. 8
      pages/process/order-list/index.wxml
  8. 8
      pages/process/outside-list/index.wxml
  9. 5
      pages/process/payment/index.js
  10. 38
      pages/process/payment/index.wxml

6
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)
}
})

10
pages/home/customer-list/index.wxml

@ -3,7 +3,7 @@
<view slot="content">客户列表</view>
</cu-custom>
<van-search value="{{ form.name }}" disabled="{{!orderList.length}}" shape="round" placeholder="请输入名字或者电话号码" use-action-slot bind:change="onChange">
<van-search value="{{ form.name }}" disabled="{{!orderList.length}}" shape="round" placeholder="请输入姓名、电话号码、卡号" use-action-slot bind:change="onChange">
<!-- <van-button slot="action" plain type="info" size="small" bind:click="addCustomer">添加客户</van-button> -->
<view slot="action" bind:tap="onChange" style="padding: 0rpx 8rpx" wx:if="{{form.name}}">取消</view>
</van-search>
@ -30,8 +30,8 @@
<view style="width:100%;flex:1">
<view class="text-sg text-bold">{{item.name || ''}}</view>
<view class="text-sm text-gray" style="line-height:32rpx;height:32rpx">
<text wx:if="{{item.mobile}}">{{'电话号码:' + item.mobile}}</text>
<text wx:elif="{{item.cardNo}}">{{'卡号:' + item.cardNo}}</text>
<text wx:if="{{item.mobile}}" style="padding-right: 24rpx;">{{'电话号码:' + item.mobile}}</text>
<text wx:if="{{item.cardNo}}">{{'卡号:' + item.cardNo}}</text>
</view>
</view>
<view class="text-blue" style="padding:6rpx 0rpx" data-index="{{index}}" catchtap="bindCustomer" wx:if="{{!item.userId}}">注册纸通宝</view>
@ -50,8 +50,8 @@
<view style="width:100%;flex:1">
<view class="text-sg text-bold">{{item.name || ''}}</view>
<view class="text-sm text-gray" style="line-height:32rpx;height:32rpx">
<text wx:if="{{item.mobile}}">{{'电话号码:' + item.mobile}}</text>
<text wx:elif="{{item.cardNo}}">{{'卡号:' + item.cardNo}}</text>
<text wx:if="{{item.mobile}}" style="padding-right: 24rpx;">{{'电话号码:' + item.mobile}}</text>
<text wx:if="{{item.cardNo}}">{{'卡号:' + item.cardNo}}</text>
</view>
</view>
<view class="text-blue" style="padding:6rpx 24rpx;" data-page="{{pageIndex}}" data-index="{{index}}"

12
pages/message/card-list/index.js

@ -21,7 +21,7 @@ Scene({
pageSize: 15
},
show: false,
actions: [ { id: 1, name: '绑定客户' } ],
actions: [ { id: 1, name: '绑定客户' }, { id:3, name: '删除', color: '#ee0a24' } ],
nowItem: null
},
/**
@ -29,7 +29,7 @@ Scene({
*/
onLoad: function (options) {
if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 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 => {

1
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"
}

5
pages/message/card-list/index.wxml

@ -12,10 +12,7 @@
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
</view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<van-swipe-cell wx:for="{{pageItem}}" wx:key="index" right-width="{{ 65 }}">
<van-cell clickable is-link center title="卡号:{{item.cardNo || ''}}" value="点击进行处理" label="时间:{{item.createTime}}" data-page="{{pageIndex}}" data-index="{{index}}" bind:click="lookItem"/>
<view slot="right" data-page="{{pageIndex}}" data-index="{{index}}" class="van-swipe-cell__right" catchtap="onDelete">删除</view>
</van-swipe-cell>
<van-cell wx:for="{{pageItem}}" wx:key="index" clickable is-link center title="卡号:{{item.cardNo || ''}}" value="点击进行处理" label="时间:{{item.createTime}}" data-page="{{pageIndex}}" data-index="{{index}}" bind:click="lookItem"/>
</view>
<!--加载更多的UI-->
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx">

11
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;
}
/* pages/storage/index/index.wxss */

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

@ -64,11 +64,11 @@
<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;width:200rpx" data-id="{{item.id}}"
<van-button round type="danger" custom-style="height:64rpx;width:200rpx" data-id="{{item.id}}"
bind:click="cancelOrder" wx:if="{{item.status != 6 && item.status != 41 && item.status != 42}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-id="{{item.id}}"
bind:click="priceOrder" wx:if="{{item.status == 1}}">定价</van-button>
<van-button round plain type="default" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-id="{{item.id}}"
<van-button round type="warning" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" 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;width:200rpx" data-id="{{item.id}}"
bind:click="checkOrder" wx:if="{{item.status == 3}}">审核</van-button>
@ -76,7 +76,9 @@
bind:click="paymentItem" wx:if="{{item.status == 4 && admin}}">去支付</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" 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:200rpx" data-id="{{item.id}}"
<van-button round type="primary" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-id="{{item.id}}"
bind:click="loggerItem" wx:if="{{item.status == 6}}">恢复订单</van-button>
<van-button round type="default" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-id="{{item.id}}"
bind:click="loggerItem" wx:if="{{item.status == 5 || item.status == 6}}">查看日志</van-button>
</view>
</view>

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

@ -60,15 +60,15 @@
<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;width:200rpx" data-id="{{item.orderId}}"
<van-button round type="danger" custom-style="height:64rpx;width:200rpx" data-id="{{item.orderId}}"
bind:click="cancelOrder" wx:if="{{item.orderStatus != 6 && item.orderStatus != 41 && item.orderStatus != 42}}">取消订单</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-page="{{pageIndex}}" data-index="{{index}}"
<van-button round type="warning" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" 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;width:200rpx" 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;width:200rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 1}}">确认定价</van-button>
<van-button round plain type="default" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" data-id="{{item.orderId}}"
<van-button round type="warning" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" 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;width:200rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="lookItem" wx:if="{{item.orderStatus == 3}}">审核订单</van-button>
@ -76,7 +76,7 @@
bind:click="lookItem" wx:if="{{item.orderStatus == 4 && admin}}">去支付</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:200rpx" 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;margin-left:24rpx;width:200rpx" data-id="{{item.orderId}}"
<van-button round type="default" custom-style="height:64rpx;margin-left:24rpx;width:200rpx" data-id="{{item.orderId}}"
bind:click="orderLogger" wx:if="{{item.orderStatus == 5 || item.orderStatus == 6}}">查看日志</van-button>
</view>
</view>

5
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)

38
pages/process/payment/index.wxml

@ -14,25 +14,25 @@
<view style="height:30rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">付款方式</view>
</view>
<view style="min-height:90rpx;padding-right:32rpx">
<van-radio-group value="{{ settleType }}" bind:change="onTypeChange">
<van-cell-group>
<van-cell title="现金支付" clickable data-name="1" bind:click="onTypeClick">
<van-radio slot="right-icon" name="1" />
</van-cell>
<van-cell clickable data-name="2" bind:click="onTypeClick">
<text slot="title">
<text>银行卡转账</text>
<text wx:if="{{params.bankCardNo}}">({{params.bankCardNo}})</text>
</text>
<van-radio slot="right-icon" name="2" disabled="{{!params.bankCardNo}}" />
</van-cell>
<van-cell title="使用千鸟代付" clickable data-name="3" bind:click="onTypeClick" wx:if="{{orderStatus == 4}}">
<van-radio slot="right-icon" name="3" />
</van-cell>
</van-cell-group>
</van-radio-group>
</view>
<van-radio-group value="{{ settleType }}" bind:change="onTypeChange">
<van-cell-group>
<van-cell title="现金支付" clickable data-name="1" bind:click="onTypeClick">
<van-radio slot="right-icon" name="1" />
</van-cell>
<van-cell title="{{params.bankCardNo ? '银行卡转账(' + params.bankCardNo + ')' : '银行卡转账' }}" clickable data-name="2" bind:click="onTypeClick">
<van-radio slot="right-icon" name="2" disabled="{{!params.bankCardNo}}" />
</van-cell>
<van-cell title="使用千鸟代付" clickable data-name="3" bind:click="onTypeClick" wx:if="{{orderStatus == 4}}">
<van-radio slot="right-icon" name="3" />
</van-cell>
<van-cell title="微信支付" clickable data-name="4" bind:click="onTypeClick">
<van-radio slot="right-icon" name="4" />
</van-cell>
<van-cell title="支付宝支付" clickable data-name="5" bind:click="onTypeClick">
<van-radio slot="right-icon" name="5" />
</van-cell>
</van-cell-group>
</van-radio-group>
<view class="flex flex-center" style="justify-content: flex-start;padding: 24rpx 32rpx">
<view class="text-black text-sg">付款备注</view>
</view>

Loading…
Cancel
Save