Browse Source

no message

feature/v1.1
xpz2018 5 years ago
parent
commit
0864dc17da
5 changed files with 30 additions and 11 deletions
  1. 3
      pages/formate.wxs
  2. 5
      pages/process/order-info/index.wxml
  3. 12
      pages/process/payment-list/index.js
  4. 1
      pages/process/payment-list/index.json
  5. 20
      pages/process/payment-list/index.wxml

3
pages/formate.wxs

@ -53,6 +53,9 @@ function formateDate(datetime) {
} }
function formateAmount(amount) { function formateAmount(amount) {
if (isEmpty(amount)) {
return ''
}
return Number(amount).toFixed(2) return Number(amount).toFixed(2)
} }

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

@ -1,4 +1,5 @@
<!--pages/process/order-check/index.wxml--> <!--pages/process/order-check/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">{{title}}</view> <view slot="content">{{title}}</view>
</cu-custom> </cu-custom>
@ -111,7 +112,7 @@
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">单价(元/KG)</view> <view class="text-black">单价(元/KG)</view>
<view class="text-gray">{{form.settleUnitPrice}}</view>
<view class="text-gray">{{formate.formateAmount(form.settleUnitPrice)}}</view>
</view> </view>
</van-cell> </van-cell>
<!-- <van-cell> <!-- <van-cell>
@ -123,7 +124,7 @@
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view> <view class="text-black">结算金额(元)</view>
<view class="text-gray">{{form.settlePrice || ''}}</view>
<view class="text-gray">{{formate.formateAmount(form.settlePrice)}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell> <van-cell>

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

@ -16,6 +16,7 @@ Page({
form: { form: {
status: 4, status: 4,
funcType: 4, funcType: 4,
isSameCustomer: 0,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
@ -29,13 +30,17 @@ Page({
}, },
onEvent: function(message){ onEvent: function(message){
if (message.what == 12) { if (message.what == 12) {
this.onRefreshList()
this.onRefreshList(this.data.form.isSameCustomer)
} }
}, },
onRefreshList: function () {
checkSame: function(){
this.onRefreshList(this.data.form.isSameCustomer ? 0 : 1)
},
onRefreshList: function (isame) {
this.setData({ this.setData({
orderList: [], orderList: [],
['form.pageNum']: 1, ['form.pageNum']: 1,
['form.isSameCustomer']: isame == 1 ? 1 : 0,
loading: true, loading: true,
finished: false finished: false
}) })
@ -62,6 +67,9 @@ Page({
if (this.data.lastTime.length > 10) { if (this.data.lastTime.length > 10) {
this.data.lastTime = this.data.lastTime.substring(0, 10) this.data.lastTime = this.data.lastTime.substring(0, 10)
} }
if(this.data.form.pageNum == 1 && i == 0){
respList[i].vcheck = true
}
respList[i].tipsTime = this.data.lastTime respList[i].tipsTime = this.data.lastTime
} else { } else {
var itemTime = respList[i].createTime var itemTime = respList[i].createTime

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

@ -4,6 +4,7 @@
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-index-bar": "/components/index-bar/index", "van-index-bar": "/components/index-bar/index",
"van-index-anchor": "/components/index-anchor/index", "van-index-anchor": "/components/index-anchor/index",
"van-checkbox": "/components/checkbox/index",
"van-cell": "/components/cell/index", "van-cell": "/components/cell/index",
"van-divider": "/components/divider/index", "van-divider": "/components/divider/index",
"van-loading": "/components/loading/index" "van-loading": "/components/loading/index"

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

@ -1,4 +1,5 @@
<!--pages/process/order-list/index.wxml--> <!--pages/process/order-list/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">待付款订单</view> <view slot="content">待付款订单</view>
</cu-custom> </cu-custom>
@ -13,23 +14,28 @@
</view> </view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> <view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view class="bg-white" wx:for="{{pageItem}}" wx:key="index"> <view class="bg-white" wx:for="{{pageItem}}" wx:key="index">
<view style="background-color:#f3f3f3;" wx:if="{{item.tipsTime}}">
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text>
<view class="flex flex-justify" style="background-color:#f3f3f3;" wx:if="{{item.tipsTime}}">
<text class="text-sg" style="line-height:72rpx;padding-left:32rpx">{{item.tipsTime}}</text>
<!-- <view class="flex flex-center" style="padding-right:32rpx" wx:if="{{item.vcheck}}" bindtap="checkSame">
<view class="text-gray" style="margin-right:8rpx">同一客户合并付款</view>
<van-checkbox value="{{ form.isSameCustomer }}" icon-size="32rpx"></van-checkbox>
</view> -->
</view> </view>
<view class="flex flex-justify item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem"> <view class="flex flex-justify item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<view style="height: 88rpx"> <view style="height: 88rpx">
<view class="flex flex-center text-sg text-black">
<view class="flex text-sg text-black">
<text>客户名称:{{item.factoryCustomerName}}</text> <text>客户名称:{{item.factoryCustomerName}}</text>
<text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text> <text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text>
</view> </view>
<view class="text-sm text-gray" style="margin-top:12rpx">毛重:{{item.totalWeight}}KG</view>
<view class="text-sm text-gray" style="margin-top:12rpx">
<text>废纸品类:{{item.productName}}</text>
<!-- <text style="margin-left:36rpx">毛重:{{item.totalWeight}}KG</text> -->
<text style="margin-left:36rpx">金额:{{formate.formateAmount(item.settlePrice)}}元</text>
</view>
</view> </view>
<view class="flex flex-center" wx:if="{{item.status == 4}}"> <view class="flex flex-center" wx:if="{{item.status == 4}}">
<view class="text-df" style="color:#FA541C">待付款</view> <view class="text-df" style="color:#FA541C">待付款</view>
</view> </view>
<view class="flex flex-center" wx:if="{{item.status == 5}}">
<view class="text-df" style="color:#028A00">已完成</view>
</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save