Browse Source

--6.29优化调整--

featrue/v4.5
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
af3d1a8add
4 changed files with 53 additions and 37 deletions
  1. 2
      pages/agent/agent-item/index.js
  2. 67
      pages/agent/agent-item/index.wxml
  3. 9
      pages/agent/edit/index.js
  4. 12
      pages/agent/factory/index.wxml

2
pages/agent/agent-item/index.js

@ -9,7 +9,7 @@ Component({
multipleSlots: true
},
properties: {
item: { type: Object, value: null }
item: { type: Object, value: null },
},
data: {
kg: app.globalData.kg,

67
pages/agent/agent-item/index.wxml

@ -13,30 +13,36 @@
<text class="text-gray" style="margin: 0rpx 8rpx" wx:if="{{item.cumulativeWeight > 0}}">|</text>
<text wx:if="{{item.cumulativeWeight > 0}}">已代卖:{{item.cumulativeWeight}}吨</text>
<text class="text-gray" style="margin: 0rpx 8rpx">|</text>
<text wx:if="{{item.yesterdayTotalQuantity && item.yesterdayTotalQuantity >= 0}}">昨日排队:{{item.yesterdayTotalQuantity}}辆</text>
<text
wx:if="{{item.yesterdayTotalQuantity && item.yesterdayTotalQuantity >= 0}}">昨日排队:{{item.yesterdayTotalQuantity}}辆</text>
<text wx:else>昨日排队:--</text>
</view>
<view class="flex flex-justify text-df" style="margin-top:4rpx">
<text class="flex" wx:if="{{item.proxypaySurcharge}}">
<text class="text-black">代卖费:</text>
<text class="text-red">{{formate.formatePrice2(item.proxypaySurcharge, kg)}}</text>
<text class="flex" >
<text class="text-black" wx:if="{{item.proxypaySurcharge}}">代卖费:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{item.proxypaySurcharge}}">{{formate.formatePrice2(item.proxypaySurcharge, kg)}}</text>
<text class="text-black" style="margin-left:12rpx" wx:if="{{item.foreignPaybackIntervalString}}">纸厂账期:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{item.foreignPaybackIntervalString}}">{{item.foreignPaybackIntervalString}}</text>
</text>
<text class="flex" wx:if="{{item.foreignPaybackIntervalString}}">
<!-- <text class="flex" wx:if="{{item.foreignPaybackIntervalString}}">
<text class="text-black">纸厂账期:</text>
<text class="text-red">{{item.foreignPaybackIntervalString}}</text>
</text>
</view>
</text> -->
</view>
</view>
<text class="cuIcon-right text-gray" style="font-size:18px"></text>
</view>
<view class="bg-white" style="padding:0rpx 32rpx 10rpx 32rpx">
<view class="flex" wx:for-item="cateItem" wx:for-index="ck" wx:for="{{item.paperCategoryList}}" wx:key="ck" wx:if="{{item.fold || ck < 3}}" style="margin-bottom: 20rpx">
<view class="item-cate {{cateIndex == ck ? 'cate-tag' : ''}}" data-page="{{pageIndex}}" data-index="{{index}}" data-ck="{{ck}}" catchtap="checkTag">
<view class="flex" wx:for-item="cateItem" wx:for-index="ck" wx:for="{{item.paperCategoryList}}" wx:key="ck"
wx:if="{{item.fold || ck < 3}}" style="margin-bottom: 20rpx">
<view class="item-cate {{cateIndex == ck ? 'cate-tag' : ''}}" data-page="{{pageIndex}}" data-index="{{index}}"
data-ck="{{ck}}" catchtap="checkTag">
<view class="flex flex-justify">
<view class="text-sg text-black">{{cateItem.categoryName}}</view>
<text class="text-sg text-black" wx:if="{{cateItem.unitPrice}}">
<text>{{priceItem(cateItem, kg)}}</text>
<text class="text-sm" wx:if="{{cateItem.publicSubsidies}}">(已含补贴{{formate.formatePrice2(cateItem.publicSubsidies, kg)}})</text>
<text>{{priceItem(cateItem, kg)}}</text>
<text class="text-sm"
wx:if="{{cateItem.publicSubsidies}}">(已含补贴{{formate.formatePrice2(cateItem.publicSubsidies, kg)}})</text>
</text>
<text class="text-sg text-gray" wx:else>暂无报价</text>
</view>
@ -44,12 +50,14 @@
<text>价格更新:{{item.priceDate}}</text>
<view class="flex flex-center" style="padding:6rpx 0rpx" wx:if="{{cateItem.floatingPrice > 0}}">
<text class="cuIcon-refresharrow text-red transform" style="font-size:24rpx;margin-top:2rpx;"></text>
<text class="text-red text-xs" style="padding-top:2rpx">{{formate.formatePrice(cateItem.floatingPrice, kg)}}</text>
<text class="text-red text-xs"
style="padding-top:2rpx">{{formate.formatePrice(cateItem.floatingPrice, kg)}}</text>
<text class="text-xs text-gray" style="margin-left:16rpx">较昨日</text>
</view>
<view class="flex flex-center text-df" style="padding:6rpx 0rpx" wx:elif="{{cateItem.floatingPrice < 0}}">
<text class="cuIcon-refresharrow text-green" style="font-size:24rpx;margin-top:2rpx;"></text>
<text class="text-green text-xs" style="padding-top:2rpx">{{formate.formatePrice(-cateItem.floatingPrice, kg)}}</text>
<text class="text-green text-xs"
style="padding-top:2rpx">{{formate.formatePrice(-cateItem.floatingPrice, kg)}}</text>
<text class="text-xs text-gray" style="margin-left:16rpx">较昨日</text>
</view>
<view class="flex flex-center text-sg" style="margin-left:24rpx" wx:else>
@ -62,13 +70,16 @@
<view class="flex" style="padding: 4rpx 0rpx 16rpx 0rpx;" wx:if="{{item.paperCategoryList.length > 0}}">
<view style="flex:1"></view>
<view style="flex:1.2">
<wux-button block type="{{item.isOperations? 'positive' : 'stable'}}" size="sale" data-page="{{pageIndex}}" data-index="{{index}}" bind:click="saleGood">我要卖货</wux-button>
<wux-button block type="{{item.isOperations? 'positive' : 'stable'}}" size="sale" data-page="{{pageIndex}}"
data-index="{{index}}" bind:click="saleGood">我要卖货</wux-button>
</view>
<view class="flex flex-center" style="flex:1;justify-content: flex-end">
<view data-page="{{pageIndex}}" data-index="{{index}}" catchtap="unflodItem" wx:if="{{item.paperCategoryList.length > 3}}">
<text class="text-blue text-df">{{item.fold ? '点击收起' : '查看全部' }}({{item.paperCategoryList.length}})</text>
</view>
<view style="margin-left:4rpx;padding-top:8rpx" data-page="{{pageIndex}}" data-index="{{index}}" catchtap="unflodItem" wx:if="{{item.paperCategoryList.length > 3}}">
<view data-page="{{pageIndex}}" data-index="{{index}}" catchtap="unflodItem"
wx:if="{{item.paperCategoryList.length > 3}}">
<text class="text-blue text-df">{{item.fold ? '点击收起' : '查看全部' }}({{item.paperCategoryList.length}})</text>
</view>
<view style="margin-left:4rpx;padding-top:8rpx" data-page="{{pageIndex}}" data-index="{{index}}"
catchtap="unflodItem" wx:if="{{item.paperCategoryList.length > 3}}">
<text class="cuIcon-{{item.fold ? 'fold' : 'unfold'}} text-blue" style="font-size:16px;"></text>
</view>
</view>
@ -76,20 +87,20 @@
</view>
<wxs module="priceItem">
function priceItem(item, kg) {
if(kg){
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
function priceItem(item, kg) {
if (kg) {
if (item.publicSubsidies && Number(item.publicSubsidies) > 0) {
var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price)).toFixed(3) + '元/KG'
}
return (parseFloat(item.unitPrice)).toFixed(3) + '元/KG'
} else {
if(item.publicSubsidies && Number(item.publicSubsidies) > 0){
return (parseFloat(item.unitPrice)).toFixed(3) + '元/KG'
} else {
if (item.publicSubsidies && Number(item.publicSubsidies) > 0) {
var price = parseFloat(item.unitPrice) + parseFloat(item.publicSubsidies)
return (parseFloat(price) * 1000).toFixed(1) + '元/吨'
}
return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨'
}
}
module.exports = priceItem;
return (parseFloat(item.unitPrice) * 1000).toFixed(1) + '元/吨'
}
}
module.exports = priceItem;
</wxs>

9
pages/agent/edit/index.js

@ -14,7 +14,8 @@ Page({
safeBottom: app.globalData.safeBottom,
form: {
paperCategoryId: '',
unitPrice: ''
unitPrice: '',
totalEstimatedWeight:'30'
},
timeList: [],
cateName: '',
@ -49,6 +50,12 @@ Page({
this.data.vateList.push({plateNumber: '查看更多', fold: 1})
this.setData({ vateList: this.data.vateList })
}
if(this.data.vateList.length>0 && this.data.vateList[0].plateNumber){
this.setData({
vehicleList:[{plateNumber: this.data.vateList[0].plateNumber}]
})
}
}).catch(err => {
//异常回调
})

12
pages/agent/factory/index.wxml

@ -23,13 +23,11 @@
<text wx:else>昨日排队:--</text>
</view>
<view class="flex text-df" style="margin-top:4rpx">
<view class="flex" wx:if="{{factoryDetail.proxypaySurcharge}}">
<text class="text-black">代卖费:</text>
<text class="text-red">{{formate.formatePrice2(factoryDetail.proxypaySurcharge, kg)}}</text>
</view>
<view class="flex" style="margin-left:64rpx" wx:if="{{factoryDetail.foreignPaybackIntervalString}}">
<text class="text-black">纸厂账期:</text>
<text class="text-red">{{factoryDetail.foreignPaybackIntervalString}}</text>
<view class="flex" >
<text class="text-black" wx:if="{{factoryDetail.proxypaySurcharge}}">代卖费:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{factoryDetail.proxypaySurcharge}}">{{formate.formatePrice2(factoryDetail.proxypaySurcharge, kg)}}</text>
<text class="text-black" style="margin-left:12rpx" wx:if="{{factoryDetail.foreignPaybackIntervalString}}">纸厂账期:</text>
<text class="text-red" style="font-size:26rpx" wx:if="{{factoryDetail.foreignPaybackIntervalString}}">{{factoryDetail.foreignPaybackIntervalString}}</text>
</view>
</view>
</view>

Loading…
Cancel
Save