Browse Source

no message

featrue/v4.3
xpz2018 5 years ago
parent
commit
8b93000daa
4 changed files with 101 additions and 73 deletions
  1. 5
      pages/agent/detail/index.js
  2. 154
      pages/agent/detail/index.wxml
  3. 14
      pages/agent/index.wxs
  4. 1
      pages/home/index/index.js

5
pages/agent/detail/index.js

@ -33,7 +33,9 @@ Page({
for (let index = 0; index < result.data.orderItems.length; index++) {
const element = result.data.orderItems[index]
if(element.weightnoteInfo && element.weightnoteInfo.id){
element.proxyAmount = math.times(element.weightnoteInfo.settleWeight, element.unitSurcharge)
if(element.weightnoteInfo.settleWeight){
element.proxyAmount = math.times(element.weightnoteInfo.settleWeight, element.unitSurcharge)
}
this.data.cancel = false
}
}
@ -42,6 +44,7 @@ Page({
}).catch(err => {
wx.hideLoading()
util.showToast(err)
console.log(err)
})
},
cancelOrder: function () {

154
pages/agent/detail/index.wxml

@ -12,16 +12,13 @@
<!--结算中和已完成、收货待审核-->
<view wx:if="{{orderInfo && (orderInfo.status == 53 || orderInfo.status == 54)}}">
<view class="bg-white" wx:for="{{orderInfo.orderItems}}" wx:key="index" style="padding:24rpx 30rpx;margin-top:{{index == 0 ? 0 : 16}}rpx">
<view class="flex flex-justify text-sg">
<view wx:for="{{orderInfo.orderItems}}" wx:key="index" style="margin-top:{{index == 0 ? 0 : 16}}rpx">
<view class="bg-white flex flex-justify text-sg" style="padding: 24rpx 30rpx">
<text class="text-sg text-bold">货车车牌:{{item.logisticcsInfo.plateNumber}}</text>
<text class="text-black" style="padding: 4rpx 0rpx 4rpx 16rpx">{{agent.orderStatus(item.status)}}</text>
</view>
<view class="flex" wx:if="{{item.status == 50 || item.status == 51}}" style="border-top:2rpx solid #f3f3f3;margin-top:24rpx;padding-top:24rpx;justify-content: flex-end">
<wux-button outline type="assertive" size="copy" data-index="{{index}}" bind:click="cancelOrderItem" wx:if="{{item.status == 51}}">取消</wux-button>
</view>
<view wx:elif="{{item.weightnoteInfo && item.weightnoteInfo.id}}" style="border-top:2rpx solid #f3f3f3;margin-top:24rpx">
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<view class="bg-white" wx:if="{{item.weightnoteInfo && item.weightnoteInfo.id}}" style="border-top:2rpx solid #f3f3f3;padding: 24rpx 30rpx">
<view class="flex flex-justify text-sg">
<text class="text-black">结算单价</text>
<text class="text-gray">{{formate.formatePrice2(item.weightnoteInfo.settleUtiPrice)}}</text>
</view>
@ -29,11 +26,11 @@
<text class="text-black">净重</text>
<text class="text-gray">{{formate.formateWeight(item.weightnoteInfo.netWeight)}}</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<view class="flex flex-justify text-sg" style="margin-top:20rpx" wx:if="{{item.weightnoteInfo.settleWeight}}">
<text class="text-black">结算重量</text>
<text class="text-gray">{{formate.formateWeight(item.weightnoteInfo.settleWeight)}}</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<view class="flex flex-justify text-sg" style="margin-top:20rpx" wx:if="{{item.weightnoteInfo.deductedPoint}}">
<text class="text-black">扣点</text>
<text class="text-gray">{{item.weightnoteInfo.deductedPoint}}%</text>
</view>
@ -47,67 +44,88 @@
<view style="margin-top:20rpx">
<sudoku-image image-list="{{item.weightnoteInfo.imageUrls}}" square="{{true}}" clickable="{{true}}"></sudoku-image>
</view>
<!-- 预付款 -->
<view wx:if="{{item.paymentType == 1}}">
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">预计总金额</text>
<text class="text-gray">{{formate.formateAmount(item.preTotalMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">预计收款金额</text>
<text class="text-gray">
<text>{{formate.formateAmount(item.preSettleMoney)}}元</text>
<text style="color:#F5222D">({{'首款70%'}})</text>
</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">代卖费</text>
<text class="text-gray">-{{formate.formateAmount(item.proxyAmount)}}元</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black text-bold">预计结算金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.settlePrice)}}元</text>
</view>
</view>
<!-- 预付款 -->
<view class="bg-white" style="padding: 24rpx 30rpx;margin-top:16rpx" wx:if="{{item.activityOrderAuditPassNum == 1}}">
<view class="flex flex-justify text-sg">
<text class="text-black">预计总金额</text>
<text class="text-gray">{{formate.formateAmount(item.preTotalMoney)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:4rpx">
<text class="text-gray">结算单价x净重</text>
<text class="text-gray">{{formate.formatePrice2(item.unitPrice)}}*{{formate.formateWeight(item.weightnoteInfo.netWeight)}}</text>
</view>
<!-- 尾款 -->
<view wx:elif="{{item.paymentType == 2}}">
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">总金额</text>
<text class="text-gray">{{formate.formateAmount(item.settlePrice)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx" wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text class="text-gray">-{{formate.formateAmount(item.adjustMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">已结算金额:</text>
<text class="text-gray">-{{formate.formateAmount(item.preSettleMoney)}}元</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black text-bold">剩余结算金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.finalPayMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">首笔应收金额</text>
<text class="text-gray">{{formate.formateAmount(item.prepayMoney)}}元</text>
</view>
<!-- 全款 -->
<view wx:else>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">总金额</text>
<text class="text-gray">{{formate.formateAmount(item.preTotalMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx" wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text class="text-gray">{{formate.formateAmount(item.adjustMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">代卖费</text>
<text class="text-gray">-{{formate.formateAmount(item.proxyAmount)}}元</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black text-bold">结算金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.weightnoteInfo.settlePrice)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:12rpx">
<text class="text-gray">预估总金额x{{agent.getActivitySettleType(orderInfo.activitySettleType)}}</text>
<text class="text-gray"></text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">代卖费</text>
<text class="text-gray">{{formate.formateAmount(item.proxyAmount) || 0}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:12rpx">
<text class="text-gray">代卖费单价x净重</text>
<text class="text-gray">{{formate.formatePrice2(item.unitSurcharge)}}x{{formate.formateWeight(item.weightnoteInfo.netWeight)}}</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:20rpx">
<text class="text-black text-bold">首笔实收金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.preSettleMoney)}}元</text>
</view>
</view>
<!-- 尾款 -->
<view class="bg-white" style="padding: 24rpx 30rpx;margin-top:16rpx" wx:if="{{item.activityOrderAuditPassNum == 2}}">
<view class="flex flex-justify text-sg">
<text class="text-black">未结算金额</text>
<text class="text-gray">{{formate.formateAmount(item.unSettleMoney)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:4rpx">
<text class="text-gray">结算单价x结算重量-首笔应收金额</text>
<text class="text-gray">{{formate.formatePrice2(item.unitPrice)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}}-{{formate.formateAmount(item.prepayMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3" wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text class="text-gray">-{{formate.formateAmount(item.adjustMoney)}}元</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black text-bold">尾款实收金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.finalPayMoney)}}元</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black text-bold">总收款金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.settlePrice)}}元</text>
</view>
</view>
<!-- 全款 -->
<view class="bg-white" style="padding: 24rpx 30rpx;margin-top:16rpx" wx:if="{{item.activityOrderAuditPassNum == 0}}">
<view class="flex flex-justify text-sg">
<text class="text-black">总金额</text>
<text class="text-gray">{{formate.formateAmount(item.preTotalMoney)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:4rpx">
<text class="text-gray">结算单价x结算重量</text>
<text class="text-gray">{{formate.formatePrice2(item.weightnoteInfo.settleUtiPrice)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}}</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx" wx:if="{{item.adjustMoney}}">
<text class="text-black">调节费</text>
<text class="text-gray">{{formate.formateAmount(item.adjustMoney)}}元</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:16rpx">
<text class="text-black">代卖费</text>
<text class="text-gray">{{formate.formateAmount(item.proxyAmount)}}元</text>
</view>
<view class="flex flex-justify text-sm" style="margin-top:4rpx">
<text class="text-gray">代卖费单价x结算重量</text>
<text class="text-gray">{{formate.formatePrice2(item.unitSurcharge)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}}</text>
</view>
<view class="flex text-sg" style="justify-content: flex-end;margin-top:20rpx;border-top:2rpx solid #f3f3f3;padding-top:20rpx">
<text class="text-black text-bold">总收款金额:</text>
<text class="text-gray" style="color:#F5222D">{{formate.formateAmount(item.weightnoteInfo.settlePrice)}}元</text>
</view>
</view>
</view>
<view class="bg-white margin-top" style="padding:24rpx 30rpx">
@ -127,10 +145,6 @@
<text class="text-black">货到时间</text>
<text class="text-gray">{{orderInfo.paperMillDeliveryTime || ''}}</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx">
<text class="text-black">信息费</text>
<text class="text-gray">{{formate.formatePrice2(orderInfo.unitSurcharge)}}</text>
</view>
<view class="flex flex-justify text-sg" style="margin-top:20rpx;align-items: flex-start">
<text class="text-black" style="min-width:180rpx">注意事项</text>
<text class="text-gray">{{orderInfo.attenssion || ''}}</text>

14
pages/agent/index.wxs

@ -50,8 +50,20 @@ function backStatus(status) {
return ''
}
function getActivitySettleType(type) {
if (type == 0) {
return '70%'
} else if (type == 1) {
return '85%'
} else if (type == 2) {
return '100%'
}
return ''
}
module.exports = {
orderStatus: orderStatus,
iconStatus: iconStatus,
backStatus: backStatus
backStatus: backStatus,
getActivitySettleType: getActivitySettleType
}

1
pages/home/index/index.js

@ -45,7 +45,6 @@ Component({
CustomBar: app.globalData.CustomBar,
userInfo: app.globalData.userInfo
})
console.log(this.data.height)
if (app.globalData.userInfo && app.globalData.userInfo.memberExpiredAt) {
this.setData({
'userInfo.memberExpiredAt': app.globalData.userInfo.memberExpiredAt,

Loading…
Cancel
Save