19 changed files with 209 additions and 181 deletions
Split View
Diff Options
-
58pages/agent/ability-item/index.js
-
7pages/agent/ability-item/index.json
-
73pages/agent/ability-item/index.wxml
-
31pages/agent/ability-item/index.wxss
-
9pages/agent/ability/index.js
-
2pages/agent/ability/index.json
-
5pages/agent/ability/index.wxml
-
34pages/agent/factory-fragment/index.js
-
2pages/agent/factory-fragment/index.wxml
-
4pages/agent/factory/index.js
-
16pages/agent/focus-fragment/index.js
-
5pages/api/ztb.js
-
2pages/article/allNewInfo/index.wxml
-
116pages/article/allNewInfo/index.wxss
-
6pages/article/attentionPaperFactory/index.js
-
3pages/article/feedback/index.wxml
-
2pages/home/attentionPaperList/index.js
-
11pages/login/index.js
-
4utils/util.js
@ -0,0 +1,58 @@ |
|||
// pages/message/index.js
|
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
Component({ |
|||
options: { |
|||
addGlobalClass: true, |
|||
multipleSlots: true |
|||
}, |
|||
properties: { |
|||
item: { type: Object, value: null } |
|||
}, |
|||
data: { |
|||
kg: app.globalData.kg |
|||
}, |
|||
lifetimes: { |
|||
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
|
|||
attached: function () { |
|||
this.setData({ kg: app.globalData.kg }) |
|||
} |
|||
}, |
|||
methods: { |
|||
// lookItem: function (e) {
|
|||
// util.navigateTo('/pages/agent/factory/index?id=' + this.data.item.paperMillId)
|
|||
// },
|
|||
unflodItem: function(){ |
|||
this.setData({ ['item.fold']: !this.data.item.fold }) |
|||
}, |
|||
checkTag: function(event){ |
|||
var cateIndex = -1 |
|||
if(util.isEmpty(this.data.item.cateIndex)){ |
|||
cateIndex = event.currentTarget.dataset.ck |
|||
} else if(this.data.item.cateIndex != event.currentTarget.dataset.ck){ |
|||
cateIndex = event.currentTarget.dataset.ck |
|||
} |
|||
if(cateIndex >= 0){ |
|||
this.setData({ ['item.cateIndex']: cateIndex }) |
|||
} |
|||
}, |
|||
saleGood: function(e){ |
|||
if (!app.globalData.userInfo) { |
|||
wx.navigateTo({ url: '/pages/login/index' }) |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.item.cateIndex)){ |
|||
util.showToast('请选择一个纸品') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.item.paperCategoryList[this.data.item.cateIndex].unitPrice)){ |
|||
util.showToast('该纸品暂无报价,无法卖货') |
|||
return |
|||
} |
|||
var categoryId = this.data.item.paperCategoryList[this.data.item.cateIndex].categoryId |
|||
wx.navigateTo({ url: '/pages/agent/edit/index?id=' + this.data.item.paperMillId + '&categoryId=' + categoryId }) |
|||
} |
|||
} |
|||
|
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"wux-button": "/components/button/index", |
|||
"wux-image": "/components/image/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
<!--pages/message/index.wxml--> |
|||
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> |
|||
<view class="flex flex-justify item-content"> |
|||
<wux-image width="{{54}}" height="{{54}}" shape="rounded" lazyLoad="true" src="{{item.logoImg}}" mode="aspectFill"> |
|||
<image class="image-load" slot="loading" src="/assets/image/def_image.png"></image> |
|||
<image class="image-load" slot="error" src="/assets/image/def_image.png"></image> |
|||
<image class="image-load" slot="empty" src="/assets/image/def_image.png"></image> |
|||
</wux-image> |
|||
<view style="margin-left:24rpx;flex:1"> |
|||
<view class="text-sg text-cut text-bold">{{item.name}}</view> |
|||
<view class="text-xs text-gray" style="margin-top:4rpx"> |
|||
<text>{{item.locProvinceName + item.locCityName + item.locDistrictName}}</text> |
|||
<text class="text-gray" style="margin: 0rpx 8rpx" wx:if="{{item.cumulativeWeight > 0}}">|</text> |
|||
<text wx:if="{{item.cumulativeWeight > 0}}">已代卖:{{formate.formateWeight(item.cumulativeWeight, kg)}}</text> |
|||
<text class="text-gray" style="margin: 0rpx 8rpx">|</text> |
|||
<text wx:if="{{item.yesterdayTotalQuantity && item.yesterdayTotalQuantity >= 0}}">昨日排队:{{item.yesterdayTotalQuantity}}辆</text> |
|||
<text wx:else>昨日排队:--</text> |
|||
</view> |
|||
<view class="flex text-df" style="margin-top:4rpx"> |
|||
<view class="flex" wx:if="{{item.proxypaySurcharge}}"> |
|||
<text class="text-black">代卖费:</text> |
|||
<text class="text-red">{{formate.formatePrice2(item.proxypaySurcharge, kg)}}</text> |
|||
</view> |
|||
<view class="flex" style="margin-left:64rpx" wx:if="{{item.foreignPaybackIntever}}"> |
|||
<text class="text-black">纸厂账期:</text> |
|||
<text class="text-red">{{item.foreignPaybackIntever}}天</text> |
|||
</view> |
|||
</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 {{item.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}}">{{formate.formatePrice2(cateItem.unitPrice, kg)}}</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>价格更新:{{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-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-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 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="positive" 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}}"> |
|||
<text class="cuIcon-{{item.fold ? 'fold' : 'unfold'}} text-blue" style="font-size:16px;"></text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,31 @@ |
|||
/* pages/mall/shops/index.wxss */ |
|||
.item-content { |
|||
background: rgba(255, 255, 255, 1); |
|||
padding: 32rpx; |
|||
} |
|||
|
|||
.item-cate { |
|||
flex: 5; |
|||
padding: 10rpx 30rpx; |
|||
border-radius: 10rpx; |
|||
border: 1rpx solid #f3f3f3; |
|||
background-color: #f3f3f3; |
|||
} |
|||
|
|||
.cate-tag { |
|||
background-color: #e6f7ff; |
|||
border: 1rpx solid #1890ff; |
|||
} |
|||
|
|||
.image-load { |
|||
width: 54px; |
|||
height: 54px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.transform { |
|||
transform-origin: 50% 50%; |
|||
transform: rotate(180deg); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save