You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
4.1 KiB
89 lines
4.1 KiB
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
|
|
<wxs module="moment" src="../../moment/index.wxs"></wxs>
|
|
<view class="item-tips" wx:if="{{item.tipsTime}}">{{moment.formateDate(item.tipsTime)}}</view>
|
|
<view class="bg-white flex flex-justify" style="padding:18rpx 32rpx" bindtap="lookItem">
|
|
<view style="width: 30%;" >
|
|
<highlight-text content="{{item.shortName}}" keyword="{{keyword}}" class="text-df text-black text-cut"/>
|
|
<view class="{{item.hasFollowed ? 'attention-bg' : 'attention-unbg'}}" catchtap="attention">
|
|
<text>{{item.hasFollowed ? '已关注' : '点击关注'}}</text>
|
|
</view>
|
|
</view>
|
|
<view style="width: 30%;">
|
|
<view class="flex flex-center" style="justify-content: flex-start">
|
|
<text class="text-lg text-bold {{moment.colorText(item.typicalFloatingQuotedPrice)}}">{{formate.formatePrice(item.typicalFloatingQuotedPrice, 0)}}</text>
|
|
<image class="float-image" src="{{moment.floatImage(item.typicalFloatingQuotedPrice)}}" wx:if="{{moment.checkPrice(item.typicalFloatingQuotedPrice)}}"></image>
|
|
</view>
|
|
<view class="text-gray text-sm" style="margin-top: 4rpx;">调价时间:{{moment.formateTimes(item.latestQuoteTime, 5, 10)}}</view>
|
|
</view>
|
|
<view class="text-black" style="width: 20%;">{{stringUtil.queue(item.totalReceivedQuantity)}}</view>
|
|
<view class="text-black" style="width: 16%;">{{stringUtil.precent(item.startDeductionPoints)}}</view>
|
|
<view style="width: 48rpx;" catchtap="onFlodTap">
|
|
<text class="cuIcon-triangle{{unflod ? 'upfill': 'downfill'}} text-gray" style="font-size:48rpx;"></text>
|
|
</view>
|
|
</view>
|
|
<view style="display: {{ unflod ? 'block' : 'none'}};padding:16rpx 24rpx;">
|
|
<view class="list-empty" style="height:240rpx" wx:if="{{requesting}}">
|
|
<view class="load-spinner text-gray" />
|
|
</view>
|
|
<view class="list-empty" style="height:240rpx" catchtap="fetchItemList" wx:elif="{{!requesting && !itemList.length}}">
|
|
<view class="text-empty" style="margin-top: 0rpx;">暂无数据,点击刷新</view>
|
|
</view>
|
|
<view wx:else>
|
|
<view class="flex" style="padding-bottom: 16rpx;">
|
|
<view style="width: 25%;padding-left: 24rpx;">品类</view>
|
|
<view style="width: 25%;">
|
|
<text class="text-df" style="color: #555555;">价格</text>
|
|
<text style="color: #555555;font-size: 20rpx;">(元/吨)</text>
|
|
</view>
|
|
<view style="width: 15%;">涨跌</view>
|
|
<view style="width: 35%;">
|
|
<text class="text-df" style="color: #555555;">平均扣点</text>
|
|
<text style="color: #555555;font-size: 20rpx;">(最近7天)</text>
|
|
</view>
|
|
</view>
|
|
<view class="flex flex-center bg-white item-content" wx:for="{{itemList}}" wx:for-item="element" wx:key="index">
|
|
<view class="text-df text-black" style="width: 25%;">{{element.categoryName}}</view>
|
|
<view class="flex flex-center" style="width: 25%;justify-content: flex-start">
|
|
<text class="text-lg {{moment.colorText(element.floatingQuotedPrice)}}">{{formate.formatePrice(element.quotedPrice, 0)}}</text>
|
|
<image class="float-image" src="{{moment.floatImage(element.floatingQuotedPrice)}}" wx:if="{{moment.checkPrice(element.floatingQuotedPrice)}}"></image>
|
|
</view>
|
|
<view class="text-df {{moment.colorText(element.floatingQuotedPrice)}}" style="width:15%;">{{stringUtil.roundPrice(element.floatingQuotedPrice)}}</view>
|
|
<view class="text-df text-black" style="width: 15%;">{{stringUtil.precent(element.averageDeductionPoints)}}</view>
|
|
<view class="flex flex-center" style="width: 20%;align-items: flex-end">
|
|
<wux-button outline round type="{{item.isOperations? 'positive' : 'stable'}}" size="cate" data-index="{{index}}" bind:click="agentOrder">代卖</wux-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<wxs module="stringUtil">
|
|
var queue = function(val) {
|
|
if(val === null){
|
|
return '- -'
|
|
}
|
|
if(val >= 0){
|
|
return val + '辆'
|
|
}
|
|
return '- -'
|
|
}
|
|
var precent = function(val) {
|
|
if(val === null){
|
|
return '- -'
|
|
}
|
|
if(val >= 0){
|
|
return val + '%'
|
|
}
|
|
return '- -'
|
|
}
|
|
var roundPrice = function(val){
|
|
if(val > 0){
|
|
return '+' + (val * 1000)
|
|
} else if(val < 0){
|
|
return (val * 1000)
|
|
}
|
|
return '- -'
|
|
}
|
|
module.exports.queue = queue;
|
|
module.exports.precent = precent;
|
|
module.exports.roundPrice = roundPrice;
|
|
</wxs>
|