纸通宝SAAS仓库
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.
 

163 lines
9.5 KiB

<!--pages/message/detail/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">纸厂详情</view>
</cu-custom>
<scroll-view scroll-y style="height: {{height}}rpx;" bindscroll="onScroll" scroll-into-view="{{toView}}" bind:scrolltolower="fetchMomentList" wx:if="{{factoryDetail}}">
<view class="bg-white flex" style="padding:30rpx">
<van-image use-loading-slot width="108rpx" height="108rpx" radius="4" lazy-load src="{{factoryDetail.logoImg}}">
<image class="image-load" slot="loading" src="/assets/image/def_image.png"></image>
</van-image>
<view class="flex flex-column flex-center" style="margin-left:24rpx;align-items:flex-start;width: 100%">
<view class="flex flex-justify" style="white-space: nowrap;width: 100%;">
<text class="text-sg text-bold">{{factoryDetail.name}}</text>
<van-button round type="{{ hasFollowed ? 'danger' : 'info'}}" size="mini" custom-style="width:120rpx" bind:click="onAttentionChange">{{ hasFollowed ? '取消关注' : '关注'}}</van-button>
</view>
<view class="text-xs text-gray" style="margin-top:4rpx">
<text>{{factoryDetail.locProvinceName + factoryDetail.locCityName + factoryDetail.locDistrictName}}</text>
<text class="text-gray" style="margin: 0rpx 8rpx" wx:if="{{factoryDetail.cumulativeWeight > 0}}">|</text>
<text wx:if="{{factoryDetail.cumulativeWeight > 0}}">已代卖:{{factoryDetail.cumulativeWeight}}吨</text>
<text class="text-gray" style="margin: 0rpx 8rpx">|</text>
<text wx:if="{{factoryDetail.yesterdayTotalQuantity &&factoryDetail.yesterdayTotalQuantity >= 0}}">昨日排队:{{factoryDetail.yesterdayTotalQuantity}}辆</text>
<text wx:else>昨日排队:--</text>
</view>
<view class="flex flex-justify text-df" style="margin-top:4rpx;width:100%">
<view class="flex flex-center" wx:if="{{factoryDetail.proxypaySurcharge}}">
<text class="text-black">代卖费:</text>
<text class="text-red">{{formate.formatePrice(factoryDetail.proxypaySurcharge)}}元/吨</text>
</view>
<view class="flex" wx:if="{{factoryDetail.foreignPaybackIntever}}">
<text class="text-black">纸厂账期:</text>
<text class="text-red">{{factoryDetail.foreignPaybackIntever}}天</text>
</view>
</view>
</view>
</view>
<view style="height:1px;width:100%;background-color:#eee"></view>
<van-sticky scrollTop="{{scrollTop}}" sticky-top="{{stickyTop}}" sticky-height="88rpx" id="sticky" bind:fixed="onFixedChange">
<view slot="header" class="bg-white" style="height:90rpx;border-bottom:2rpx solid #eee">
<van-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"/>
</view>
<view slot="content" style="min-height:{{height - 90}}rpx">
<view class="bg-white" style="display:{{tabIndex == 0 ? 'block' : 'none'}}">
<view class="bg-white flex flex-justify" style="padding:30rpx 30rpx 12rpx 30rpx">
<view class="flex flex-center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-sg tetx-bold" style="margin-left:12rpx">今日参考报价</text>
</view>
<text class="text-df text-gray">{{daytimes}}</text>
</view>
<view class="text-sm text-gray" style="padding:12rpx 30rpx">
<text class="text-cut">展示价格为纸厂品类参考价格,具体价格以实际纸厂交易价格为准</text>
</view>
<view style="padding:12rpx 30rpx 12rpx 30rpx">
<view class="item-cate {{cateIndex == index ? 'cate-tag' : ''}}" wx:for="{{factoryDetail.paperCategoryList}}" wx:key="index" data-index="{{index}}" bindtap="checkTag">
<view class="flex flex-justify">
<view class="text-sg text-black">{{item.categoryName}}</view>
<text class="text-sg text-black" wx:if="{{item.unitPrice}}">
<text>{{priceItem(item)}}</text>
<text class="text-sm" wx:if="{{item.publicSubsidies}}">(已含补贴{{formate.formatePrice(item.publicSubsidies)}}元/吨)</text>
</text>
<text class="text-sg text-gray" wx:else>暂无报价</text>
</view>
<view class="flex flex-justify text-xs text-gray" style="margin-top:4rpx">
<text>价格更新:{{factoryDetail.priceDate}}</text>
<view class="flex flex-center" style="padding:6rpx 0rpx" wx:if="{{item.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(item.floatingPrice)}}元/吨</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="{{item.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(-item.floatingPrice)}}元/吨</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>
<text class="text-xl text-gray">-</text>
<text class="text-xl text-gray" style="margin-left:4rpx">-</text>
</view>
</view>
</view>
</view>
<view style="height:{{120 + safeBottom}}rpx"></view>
</view>
<!-- <view style="display:{{tabIndex == 1 ? 'block' : 'none'}}">
<view class="list-empty" style="height:{{height - 400}}rpx" wx:if="{{!momentList.length}}">
<view style="margin-bottom:24px" wx:if="{{requesting}}">
<van-loading type="spinner" size="32" />
</view>
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image>
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
</view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{momentList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index" class="cu-card dynamic no-card">
<view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>
<article-item item="{{item}}" mclick="{{false}}"></article-item>
</view>
</view>
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}">
<van-loading type="spinner" size="16" wx:if="{{!finished}}" />
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
</van-divider>
</view> -->
<view class="bg-white" style="display:{{tabIndex == 1 ? 'block' : 'none'}}">
<view style="padding: 0rpx 30rpx" wx:for="{{factoryDetail.paperCategoryList}}" wx:key="index">
<wux-divider show-text="{{ false }}" wx:if="{{ index != 0 }}"></wux-divider>
<view class="flex" style="padding: 20rpx 0rpx;align-items: center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-lg text-bold" style="margin-left:12rpx">{{item.categoryName}}</text>
</view>
<view class="text-df" style="padding: 20rpx 0rpx">{{item.inspectionNote || '暂无信息'}}</view>
</view>
<view style="height:{{120 + safeBottom}}rpx"></view>
</view>
<view class="bg-white" style="display:{{tabIndex == 2 ? 'block' : 'none'}}">
<view style="padding: 24rpx 30rpx;">
<view class="flex" style="align-items: center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-lg text-bold" style="margin-left:12rpx">报车</text>
</view>
<view class="text-df" style="padding: 30rpx 0rpx">{{factoryDetail.attentionsReportCar}}</view>
</view>
<view style="padding: 24rpx 30rpx;border-top:2rpx solid #eee">
<view class="flex" style="align-items: center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-lg text-bold" style="margin-left:12rpx">装车</text>
</view>
<view class="text-df" style="padding: 30rpx 0rpx">{{factoryDetail.attentionsLoadingCar}}</view>
</view>
<view style="padding: 24rpx 30rpx;border-top:2rpx solid #eee">
<view class="flex" style="align-items: center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-lg text-bold" style="margin-left:12rpx">到货</text>
</view>
<view class="text-df" style="padding: 30rpx 0rpx">{{factoryDetail.attentionsArrival}}</view>
</view>
<view style="padding: 24rpx 30rpx;border-top:2rpx solid #eee">
<view class="flex" style="align-items: center">
<text style="width:8rpx;height:30rpx;background-color:#008AFF"></text>
<text class="text-lg text-bold" style="margin-left:12rpx">卸货规定</text>
</view>
<view class="text-df" style="padding: 30rpx 0rpx">{{factoryDetail.attentionsRegulations}}</view>
</view>
<view style="height:{{120 + safeBottom}}rpx"></view>
</view>
</view>
</van-sticky>
</scroll-view>
<submit-layout wx:if="{{factoryDetail}}">
<van-button type="{{factoryDetail.isOperations? 'info' : 'default'}}" custom-style="height:88rpx;width:686rpx" bind:click="saleGood">我要卖货</van-button>
</submit-layout>
<notification id="qn-notification"/>
<wxs module="priceItem">
function priceItem(item) {
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;
</wxs>