Browse Source

----

featrue/v4.4
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
fa1c55a77e
4 changed files with 34 additions and 12 deletions
  1. 5
      pages/agent/detail/index.js
  2. 13
      pages/agent/detail/item-money-info/money-info.js
  3. 24
      pages/agent/detail/pound-info/pound-info.js
  4. 4
      pages/agent/detail/pound-info/pound-info.wxml

5
pages/agent/detail/index.js

@ -37,6 +37,9 @@ Page({
})
getProxyOrderInfo(this.data.id).then(result => {
this.data.cancel = true
result.data.orderItems[0].activitySettleType= result.data.activitySettleType
for (let index = 0; index < result.data.orderItems.length; index++) {
const element = result.data.orderItems[index]
if (element.weightnoteInfo && element.weightnoteInfo.id) {
@ -61,11 +64,13 @@ Page({
element.finalSettlePrice = math.plus(element.finalPayMoney, element.preSettleMoney)
}
}
this.setData({
orderInfo: result.data,
safeBottom: app.globalData.safeBottom,
cancel: this.data.cancel
})
var orderInfoStepLs = result.data.orderItems
result.data.orderItems.forEach((element1, index1) => {
for (let i = 0; i <element1.orderItemTimeList.length; i++) {

13
pages/agent/detail/item-money-info/money-info.js

@ -35,7 +35,7 @@ Component({
},
attached: function () {
// 在组件实例进入页面节点树时执行
console.log(this.data.item)
// console.log(this.data.item)
this.data.item.otherAmountDtoList.forEach(element => {
if (element.amount != null&&element.amount!=0) {
this.setData({
@ -43,6 +43,8 @@ Component({
})
}
});
console.log(this.data)
console.log(this.data.isShowtotalOtherAmount)
//首笔货款金额tiptip提示
var firstFkbl = (this.data.item.activitySettleType == 0 ? '(×首付70%)' : (this.data.item.activitySettleType == 1 ? '(×首付85%)' :(this.data.item.activitySettleType == 2?'(×首付100%)':'')))
var firstLeft = '预估总金额' + firstFkbl + '-代码费总额'
@ -56,20 +58,17 @@ Component({
firstMoneyStringTip: firstLeft + '=' + rightJsdj + '×' + rightJsjz + '×' + rightFkbl + rightDmf + '×' + rightJz
})
//尾款金额toptip提示
console.log(1)
var secondLeft = '结算单价x结算重量-首笔货款金额' + firstFkbl + '+' + (this.data.isShowtotalOtherAmount == false ? '纸厂补贴与扣款' : '') + '+返还补贴+调节费'
if (this.data.item.unitPrice) {
var secondJsdj = (math.times(this.data.item.unitPrice, 1000) + '元/吨')
} else {
var secondJsdj = '0'
}
console.log(2)
if (this.data.item.weightnoteInfo.settleWeight) {
var secondJszl = (math.divide(this.data.item.weightnoteInfo.settleWeight, 1000) + '吨')
} else {
var secondJszl = '0'
}
console.log(3)
if (this.data.item.weightnoteInfo.netWeight) {
var secondJsjz = (math.divide(this.data.item.weightnoteInfo.netWeight, 1000) + '吨')
} else {
@ -93,9 +92,7 @@ Component({
this.setData({
secondMoneyStringTip: secondLeft + '=' + secondJsdj + '×' + secondJszl + secondSbhkje + secondzcbtykk + '+' + secondbtdj + '×' + secondJsjz +'+'+ secondfhbt
})
console.log(this.data)
console.log(this.data.firstMoneyStringTip)
console.log(this.data.secondMoneyStringTip)
},
detached: function () {
@ -114,7 +111,7 @@ Component({
})
},
onChange(e) {
console.log('onChange', e)
// console.log('onChange', e)
this.setData({
visible: e.detail.visible,
})

24
pages/agent/detail/pound-info/pound-info.js

@ -11,12 +11,32 @@ Component({
orderInfo: { type: Object, value: null },
item: { type: Object, value: null }
},
//组件的生命周期
lifetimes: {
created: function () {
// 在组件实例刚刚被创建时执行
},
attached: function () {
// 在组件实例进入页面节点树时执行
// console.log(this.data.item)
this.data.item.otherAmountDtoList.forEach(element => {
if (element.amount != null&&element.amount!=0) {
this.setData({
isShowtotalOtherAmount: false
})
}
});
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的初始数据
*/
data: {
isShowtotalOtherAmount: true,
},
/**

4
pages/agent/detail/pound-info/pound-info.wxml

@ -25,7 +25,7 @@
<text class="text-gray">{{formate.formatePrice2(item.unitSurcharge==null?0:item.unitSurcharge)}}</text>
</view>
<!--纸厂补贴与扣款-->
<view class="" style="margin-top:20rpx;width:104%">
<view class="" style="margin-top:20rpx;width:104%" wx:if="{{isShowtotalOtherAmount==false}}">
<wux-accordion-group style="padding:0rpx">
<wux-accordion>
<view slot="header" class="flex flex-justify" style="width: 100%">
@ -34,7 +34,7 @@
</view>
<view class="text-df text-gray" style="padding-right:16rpx;">{{formate.formateAmount(item.totalOtherAmount==null?0:item.totalOtherAmount)}}元</view>
</view>
<view class="flex flex-justify text-sg" wx:for="{{ item.otherAmountDtoList }}" wx:for-item="cell" wx:for-index="cellIndex" wx:key="cellIndex" style="margin-top:{{cellIndex==0?0:20}}px;font-size:28rpx">
<view class="flex flex-justify text-sg" wx:for="{{ item.otherAmountDtoList }}" wx:for-item="cell" wx:for-index="cellIndex" wx:key="cellIndex" style="margin-top:{{cellIndex==0?0:20}}px;font-size:28rpx" wx:if="{{cell.amount!=0&&cell.amount!=null}}">
<text class="text-black">{{cell.title}}</text>
<text class="text-gray">{{formate.formateAmount(cell.amount==null?0:cell.amount)}}元</text>
</view>

Loading…
Cancel
Save