diff --git a/pages/agent/detail/index.js b/pages/agent/detail/index.js index 7778391..7f89285 100644 --- a/pages/agent/detail/index.js +++ b/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 () { diff --git a/pages/agent/detail/index.wxml b/pages/agent/detail/index.wxml index 4c353de..a194fec 100644 --- a/pages/agent/detail/index.wxml +++ b/pages/agent/detail/index.wxml @@ -12,16 +12,13 @@ - - + + 货车车牌:{{item.logisticcsInfo.plateNumber}} {{agent.orderStatus(item.status)}} - - 取消 - - - + + 结算单价 {{formate.formatePrice2(item.weightnoteInfo.settleUtiPrice)}} @@ -29,11 +26,11 @@ 净重 {{formate.formateWeight(item.weightnoteInfo.netWeight)}} - + 结算重量 {{formate.formateWeight(item.weightnoteInfo.settleWeight)}} - + 扣点 {{item.weightnoteInfo.deductedPoint}}% @@ -47,67 +44,88 @@ - - - - 预计总金额 - {{formate.formateAmount(item.preTotalMoney)}}元 - - - 预计收款金额 - - {{formate.formateAmount(item.preSettleMoney)}}元 - ({{'首款70%'}}) - - - - 代卖费 - -{{formate.formateAmount(item.proxyAmount)}}元 - - - 预计结算金额: - {{formate.formateAmount(item.settlePrice)}}元 - + + + + + 预计总金额 + {{formate.formateAmount(item.preTotalMoney)}}元 + + + 结算单价x净重 + {{formate.formatePrice2(item.unitPrice)}}*{{formate.formateWeight(item.weightnoteInfo.netWeight)}} - - - - 总金额 - {{formate.formateAmount(item.settlePrice)}}元 - - - 调节费 - -{{formate.formateAmount(item.adjustMoney)}}元 - - - 已结算金额: - -{{formate.formateAmount(item.preSettleMoney)}}元 - - - 剩余结算金额: - {{formate.formateAmount(item.finalPayMoney)}}元 - + + 首笔应收金额 + {{formate.formateAmount(item.prepayMoney)}}元 - - - - 总金额 - {{formate.formateAmount(item.preTotalMoney)}}元 - - - 调节费 - {{formate.formateAmount(item.adjustMoney)}}元 - - - 代卖费 - -{{formate.formateAmount(item.proxyAmount)}}元 - - - 结算金额: - {{formate.formateAmount(item.weightnoteInfo.settlePrice)}}元 - + + 预估总金额x{{agent.getActivitySettleType(orderInfo.activitySettleType)}} + + + + 代卖费 + {{formate.formateAmount(item.proxyAmount) || 0}}元 + + + 代卖费单价x净重 + {{formate.formatePrice2(item.unitSurcharge)}}x{{formate.formateWeight(item.weightnoteInfo.netWeight)}} + + + 首笔实收金额: + {{formate.formateAmount(item.preSettleMoney)}}元 + + + + 未结算金额 + {{formate.formateAmount(item.unSettleMoney)}}元 + + + 结算单价x结算重量-首笔应收金额 + {{formate.formatePrice2(item.unitPrice)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}}-{{formate.formateAmount(item.prepayMoney)}}元 + + + 调节费 + -{{formate.formateAmount(item.adjustMoney)}}元 + + + 尾款实收金额: + {{formate.formateAmount(item.finalPayMoney)}}元 + + + 总收款金额: + {{formate.formateAmount(item.settlePrice)}}元 + + + + + + 总金额 + {{formate.formateAmount(item.preTotalMoney)}}元 + + + 结算单价x结算重量 + {{formate.formatePrice2(item.weightnoteInfo.settleUtiPrice)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}} + + + 调节费 + {{formate.formateAmount(item.adjustMoney)}}元 + + + 代卖费 + {{formate.formateAmount(item.proxyAmount)}}元 + + + 代卖费单价x结算重量 + {{formate.formatePrice2(item.unitSurcharge)}}x{{formate.formateWeight(item.weightnoteInfo.settletWeight)}} + + + 总收款金额: + {{formate.formateAmount(item.weightnoteInfo.settlePrice)}}元 + + @@ -127,10 +145,6 @@ 货到时间 {{orderInfo.paperMillDeliveryTime || ''}} - - 信息费 - {{formate.formatePrice2(orderInfo.unitSurcharge)}} - 注意事项 {{orderInfo.attenssion || ''}} diff --git a/pages/agent/index.wxs b/pages/agent/index.wxs index eae96ac..5c8e395 100644 --- a/pages/agent/index.wxs +++ b/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 } \ No newline at end of file diff --git a/pages/home/index/index.js b/pages/home/index/index.js index 4074f5f..b713448 100644 --- a/pages/home/index/index.js +++ b/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,