Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
12c5d228ea
3 changed files with 11 additions and 10 deletions
  1. 17
      pages/agent/ability-item/index.js
  2. 2
      pages/agent/ability-item/index.wxml
  3. 2
      pages/moment/info-item/index.wxml

17
pages/agent/ability-item/index.js

@ -11,7 +11,8 @@ Component({
item: { type: Object, value: null }
},
data: {
kg: app.globalData.kg
kg: app.globalData.kg,
cateIndex: 0
},
lifetimes: {
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
@ -28,13 +29,13 @@ Component({
},
checkTag: function(event){
var cateIndex = -1
if(util.isEmpty(this.data.item.cateIndex)){
if(util.isEmpty(this.data.cateIndex)){
cateIndex = event.currentTarget.dataset.ck
} else if(this.data.item.cateIndex != event.currentTarget.dataset.ck){
} else if(this.data.cateIndex != event.currentTarget.dataset.ck){
cateIndex = event.currentTarget.dataset.ck
}
if(cateIndex >= 0){
this.setData({ ['item.cateIndex']: cateIndex })
this.setData({cateIndex })
}
},
saleGood: function(e){
@ -46,17 +47,17 @@ Component({
util.showToast(this.data.item.manageNotifyMessage)
return
}
if(util.isEmpty(this.data.item.cateIndex)){
if(util.isEmpty(this.data.cateIndex)){
util.showToast('请选择一个纸品')
return
}
if(util.isEmpty(this.data.item.paperCategoryList[this.data.item.cateIndex].unitPrice)){
if(util.isEmpty(this.data.item.paperCategoryList[this.data.cateIndex].unitPrice)){
util.showToast('该纸品暂无报价,无法卖货')
return
}
var categoryId = this.data.item.paperCategoryList[this.data.item.cateIndex].categoryId
var categoryId = this.data.item.paperCategoryList[this.data.cateIndex].categoryId
var activityId = this.data.item.activityId
var unitPrice = this.data.item.paperCategoryList[this.data.item.cateIndex].unitPrice
var unitPrice = this.data.item.paperCategoryList[this.data.cateIndex].unitPrice
var params = this.data.item.paperMillId + '&categoryId=' + categoryId + '&activityId=' + activityId + '&unitPrice=' + unitPrice
wx.navigateTo({ url: '/pages/agent/edit/index?id=' + params })
}

2
pages/agent/ability-item/index.wxml

@ -19,7 +19,7 @@
</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="item-cate {{cateIndex == ck ? 'cate-tag' : ''}}" data-page="{{pageIndex}}" data-index="{{index}}" data-ck="{{ck}}" catchtap="checkTag">
<view class="flex flex-justify" style="padding: 8rpx 0rpx">
<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>

2
pages/moment/info-item/index.wxml

@ -7,7 +7,7 @@
<text class="text-blue text-cut" style="max-width: 160rpx;">{{item.shortName || item.millPaperName}}</text>
<text class="cuIcon-right text-blue" style="font-size:24rpx;"></text>
</view>
<view class="text-sm text-gray" style="padding-top: 2rpx;">{{moment.formatMTime(item.updatetime)}}</view>
<view class="text-sm text-gray" style="padding-top: 2rpx;">{{moment.formatMTime(item.updateTime)}}</view>
<view class="text-sm text-gray" style="margin-left: 16rpx;">{{item.readingQuantity || 0}}次阅读</view>
</view>
</view>

Loading…
Cancel
Save