Compare commits

...

4 Commits

Author SHA1 Message Date
xpz2018 1febd416fe no message 5 years ago
xpz2018 018742adf8 no message 5 years ago
xpz2018 e8bccd2163 no message 5 years ago
xpz2018 c4a01681f8 no message 5 years ago
9 changed files with 46 additions and 27 deletions
Split View
  1. 3
      pages/formate.wxs
  2. 6
      pages/process/index/index.js
  3. 5
      pages/process/order-info/index.wxml
  4. 16
      pages/process/order-price/index.js
  5. 12
      pages/process/payment-list/index.js
  6. 1
      pages/process/payment-list/index.json
  7. 20
      pages/process/payment-list/index.wxml
  8. 4
      pages/process/payment/index.wxml
  9. 6
      project.config.json

3
pages/formate.wxs

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

6
pages/process/index/index.js

@ -30,9 +30,9 @@ Component({
],
show: false,
actions: [
{ name: '选项1' },
{ name: '选项2' },
{ name: '选项3' },
{ name: '今年' },
{ name: '今月' },
{ name: '今日' },
],
form: {},
totalInfo: {

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

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

16
pages/process/order-price/index.js

@ -110,14 +110,14 @@ Page({
util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/KG-'+ this.data.nowItem.highestUnitPrice + '元/KG')
return
}
// if(this.data.deductType == 1 && (util.isEmpty(this.data.form.deductWeight) || Number(this.data.form.deductWeight) <= 0)){
// util.showToast('请输入扣重')
// return
// }
// if(this.data.deductType == 2 && (util.isEmpty(this.data.form.deductPercent) || Number(this.data.form.deductPercent) <= 0)){
// util.showToast('请输入扣点')
// return
// }
if(!util.isEmpty(this.data.form.deductWeight) && Number(this.data.form.deductWeight) >= Number(this.data.nowItem.totalWeight)){
util.showToast('扣重不得超过皮重')
return
}
if(!util.isEmpty(this.data.form.deductPercent) && Number(this.data.form.deductPecent) >= 100){
util.showToast('扣点范围:0-100')
return
}
wx.showLoading({ title: '处理中', mask: true })
var data = {id: this.data.form.id}
if(Number(this.data.form.deductWeight) > 0){

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

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

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

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

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

@ -1,4 +1,5 @@
<!--pages/process/order-list/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">待付款订单</view>
</cu-custom>
@ -13,23 +14,28 @@
</view>
<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 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 class="flex flex-justify item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<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 wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text>
</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 class="flex flex-center" wx:if="{{item.status == 4}}">
<view class="text-df" style="color:#FA541C">待付款</view>
</view>
<view class="flex flex-center" wx:if="{{item.status == 5}}">
<view class="text-df" style="color:#028A00">已完成</view>
</view>
</view>
</view>
</view>

4
pages/process/payment/index.wxml

@ -23,7 +23,7 @@
<view style="height:24rpx;width:6rpx;background:#007AFF"></view>
<view style="margin-left: 12rpx">
<text class="text-black text-sg text-bold">订单列表</text>
<text class="text-gray text-sm" style="margin-left:18rpx">(共3笔订单)</text>
<text class="text-gray text-sm" style="margin-left:18rpx">(共{{orderList.length}}笔订单)</text>
</view>
</view>
<van-cell clickable wx:for="{{ orderList }}" wx:key="index" data-index="{{index}}" bindtap="lookItem">
@ -32,7 +32,7 @@
<view style="flex:1;margin-left:16rpx">
<view class="flex flex-justify">
<view class="text-black text-lg">{{item.factoryCustomerName}} {{item.factoryCustomerMobile}}</view>
<view class="text-sm text-gray">2021年2月22日</view>
<view class="text-sm text-gray">{{item.bangTime}}</view>
</view>
<view class="text-sm text-gray" style="line-height:54rpx">
<text>废纸品类:{{item.productName}}</text>

6
project.config.json

@ -6,7 +6,7 @@
"setting": {
"urlCheck": false,
"es6": true,
"enhance": false,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
@ -16,7 +16,7 @@
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"uglifyFileName": true,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
@ -40,7 +40,7 @@
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.14.0",
"libVersion": "2.15.0",
"appid": "wx8214a7f3614a3340",
"projectname": "ztb-saas-mini",
"debugOptions": {

Loading…
Cancel
Save