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.
206 lines
12 KiB
206 lines
12 KiB
<!--pages/mall/factory/index.wxml-->
|
|
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
|
|
<cu-custom bgColor="bg-white" isBack="{{true}}">
|
|
<view slot="content" class="text-black text-xl">纸厂详情</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">
|
|
<wux-image width="{{54}}" height="{{54}}" wux-class="image" shape="rounded" src="{{factoryDetail.logoImg}}" />
|
|
<view class="flex flex-column flex-center" style="margin-left:24rpx;align-items:flex-start;width: 100%">
|
|
<view class="flex flex-justify text-sg text-bold" style="white-space: nowrap;width: 100%;">
|
|
<view class="text-cut" style="max-width: 400rpx">{{factoryDetail.name}}</view>
|
|
<view style="width: 160rpx;height: 50rpx;background-color: rgba(0,0,0,0.10);font-size: 24rpx;border-radius: 25rpx;text-align: center;padding-top: 8rpx;" data-cid="{{hasFollowed}}" bindtap="onAttentionChange">
|
|
<text class="{{hasFollowed == false ? 'text-blue' : 'text-red'}}">{{hasFollowed == false ? '关注' : '取消关注'}}</text>
|
|
</view>
|
|
</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 >= 0}}">昨日排队:{{factoryDetail.yesterdayTotalQuantity}}辆</text>
|
|
<text wx:else>昨日排队:--</text>
|
|
</view>
|
|
<view class="flex text-df flex-justify" style="margin-top:4rpx;align-items: flex-start">
|
|
<text class="text-black" wx:if="{{factoryDetail.proxypaySurcharge}}">代卖费:</text>
|
|
<text class="text-red" wx:if="{{factoryDetail.proxypaySurcharge}}">{{formate.formatePrice2(factoryDetail.proxypaySurcharge, kg)}}</text>
|
|
<text class="text-black" style="margin-left:32rpx" wx:if="{{factoryDetail.foreignPaybackIntervalString}}">纸厂账期:</text>
|
|
<text class="text-red" wx:if="{{factoryDetail.foreignPaybackIntervalString}}">{{factoryDetail.foreignPaybackIntervalString}}天</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view style="height:16rpx"></view> -->
|
|
<wux-divider show-text="{{ false }}"></wux-divider>
|
|
<!-- TabContent-->
|
|
<wux-sticky scrollTop="{{scrollTop}}" sticky-top="{{stickyTop}}" sticky-height="90rpx" id="sticky" bind:fixed="onFixedChange">
|
|
<view slot="header" class="bg-white" style="height:90rpx;border-bottom:2rpx solid #eee">
|
|
<wux-tabi tab-data="{{tabList}}" tab-index="{{tabIndex}}" bind:change="onTabChange"></wux-tabi>
|
|
</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, kg)}}</text>
|
|
<text class="text-sm" wx:if="{{item.publicSubsidies}}">(已含补贴{{formate.formatePrice2(item.publicSubsidies, kg)}})</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, 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="{{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, 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>
|
|
<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 wx:if="{{!momentList.length}}">
|
|
<view class="list-empty" style="height:{{height - 400}}rpx">
|
|
<view class="load-spinner text-gray" style="margin-bottom:24px" wx:if="{{requesting}}" />
|
|
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image>
|
|
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
|
|
</view>
|
|
</view>
|
|
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{momentList}}" wx:key="pageIndex">
|
|
<view wx:for="{{pageItem}}" wx:key="index">
|
|
<!-- <view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>
|
|
<article-item item="{{item}}" mclick="{{false}}"></article-item> -->
|
|
<info-item item="{{item}}" mclick="{{false}}"></info-item>
|
|
</view>
|
|
</view>
|
|
<view wx:if="{{form.pageNum>1}}" style="padding:20rpx">
|
|
<wux-divider>
|
|
<view class="loadmore">
|
|
<text class="icon--refresher" wx:if="{{!finished}}"></text>
|
|
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
|
|
</view>
|
|
</wux-divider>
|
|
</view>
|
|
</view>
|
|
<view class="bg-white" style="display:{{tabIndex == 2 ? '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:30rpx"></view>
|
|
</view>
|
|
<view class="bg-white" style="display:{{tabIndex == 3 ? '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:30rpx"></view>
|
|
</view>
|
|
</view>
|
|
</wux-sticky>
|
|
|
|
</scroll-view>
|
|
|
|
<view class="cu-bar bg-white tabbar foot" style="height:{{120 + safeBottom}}rpx;padding: 32rpx 32rpx {{safeBottom + 32}}rpx 16rpx;" wx:if="{{factoryDetail && tabIndex == 0}}">
|
|
<view class="action" style="min-width: 90rpx;padding-bottom:12rpx;">
|
|
<button class="share-btn" bindtap="toService">
|
|
<image style="width:24px;height:24px" src="/assets/image/ico_service.png"></image>
|
|
<text class="text-xs">客服</text>
|
|
</button>
|
|
</view>
|
|
<view class="action" style="min-width: 90rpx;padding-bottom:12rpx;margin-right: 12rpx;margin-left: -8rpx">
|
|
<button open-type="share" class="share-btn">
|
|
<image style="width:24px;height:24px" src="/assets/image/ico_share.png"></image>
|
|
<text class="text-xs">分享</text>
|
|
</button>
|
|
</view>
|
|
<view style="width:100%">
|
|
<wux-button block type="{{factoryDetail.isOperations? 'positive' : 'stable'}}" disabled="{{disabled}}" bind:click="saleGood">我要卖货</wux-button>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="booking-tool" style="bottom:{{200 + safeBottom}}rpx;z-index: 22" bindtap="postMoment" wx:if="{{factoryDetail && tabIndex== 1}}">
|
|
<view class="roder-add flex flex-center">
|
|
<text class="cuIcon-add text-white" style="font-size:32px"></text>
|
|
</view>
|
|
</view>
|
|
|
|
<wux-popup wux-class="wux-landscape" wux-content-class="wux-landscape__popup" wux-body-class="wux-landscape__popup-body"
|
|
hasHeader="{{ false }}" hasFooter="{{ false }}" visible="{{ visible }}" mask="{{ true }}">
|
|
<view class="wux-close" bindtap="onClose" wx:if="{{visible}}">
|
|
<text class="cuIcon-roundclose text-white" style="font-size:64rpx"></text>
|
|
</view>
|
|
<view class="wux-landscape__inner">
|
|
<wux-image width="{{604}}" height="{{806}}" nuit="{{'rpx'}}" src="/assets/popup/need-member.png" bind:click="onImageClick">
|
|
</wux-image>
|
|
</view>
|
|
</wux-popup>
|
|
|
|
<wxs module="priceItem">
|
|
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){
|
|
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>
|