Browse Source

no message

featrue/v4.3
xpz2018 5 years ago
parent
commit
b15922d0a0
7 changed files with 42 additions and 50 deletions
  1. 11
      pages/agent/ability-item/index.js
  2. 3
      pages/agent/ability-item/index.json
  3. 43
      pages/agent/ability-item/index.wxml
  4. 13
      pages/agent/edit/index.js
  5. 13
      pages/agent/factory-fragment/index.js
  6. 7
      pages/agent/factory-fragment/index.wxml
  7. 2
      pages/api/ztb.js

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

@ -20,9 +20,9 @@ Component({
}
},
methods: {
// lookItem: function (e) {
// util.navigateTo('/pages/agent/factory/index?id=' + this.data.item.paperMillId)
// },
toAbilityRule: function (e) {
util.navigateTarget(this.data.item.redirectInfo)
},
unflodItem: function(){
this.setData({ ['item.fold']: !this.data.item.fold })
},
@ -51,7 +51,10 @@ Component({
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 })
var activityId = this.data.item.activityId
var unitPrice = this.data.item.paperCategoryList[this.data.item.cateIndex].unitPrice
var params = this.data.item.paperMillId + '&categoryId=' + categoryId + '&activityId=' + activityId + '&unitPrice=' + unitPrice
wx.navigateTo({ url: '/pages/agent/edit/index?id=' + params })
}
}

3
pages/agent/ability-item/index.json

@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"wux-button": "/components/button/index",
"wux-image": "/components/image/index"
"wux-image": "/components/image/index",
"wux-tag": "/components/tag/index"
}
}

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

@ -7,53 +7,24 @@
<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-sg text-cut text-bold">{{item.activityName}}</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 class="text-df text-black">{{item.name}}</view>
<view>时间:{{formate.substring(item.startTime, 0, 10)}}至{{formate.substring(item.endTime, 0, 10)}}</view>
</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>
<wux-tag bind:click="toAbilityRule">
<text class="text-df">活动规则</text>
</wux-tag>
</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="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>
<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}}">

13
pages/agent/edit/index.js

@ -29,12 +29,14 @@ Page({
picking: false,
requesting: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
event.on('EventMessage', this, this.onEvent)
if(options.activityId){
this.data.form.activityId = options.activityId
}
if(options.id){
this.data.form.paperCategoryId = options.categoryId
wx.showLoading({ title: '加载中', mask: true })
@ -57,7 +59,11 @@ Page({
for (let index = 0; index < result.data.paperCategoryList.length; index++) {
const element = result.data.paperCategoryList[index]
if(element.categoryId == options.categoryId){
this.data.form.unitPrice = element.unitPrice
if(options.unitPrice){
this.data.form.unitPrice = Number(options.unitPrice)
} else {
this.data.form.unitPrice = element.unitPrice
}
this.data.cateName = element.categoryName
}
if(!util.isEmpty(element.unitPrice)){
@ -178,6 +184,9 @@ Page({
this.setData({ ['vehicleList[' + event.currentTarget.dataset.index + '].' + event.target.id]: event.detail.value })
},
showPicker: function (e) {
if(!util.isEmpty(this.data.form.activityId)){
return
}
this.pickerView = this.pickerView || this.selectComponent('#picker-view')
if(e.currentTarget.id == 'deliveryTime'){
this.pickerView.showPicker(this.data.timeList, null, 1)

13
pages/agent/factory-fragment/index.js

@ -29,7 +29,8 @@ Component({
pageNum: 1,
listType: 0
},
firstShow: false
firstShow: false,
hasActivity: false
},
lifetimes: {
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
@ -37,7 +38,7 @@ Component({
this.setData({ height: app.globalData.fragmentHeight - 90, kg: app.globalData.kg })
if(app.globalData.userInfo){
hasActivity().then(result => {
this.setData({ hasActivity: result.data })
})
}
}
@ -50,13 +51,13 @@ Component({
}
this.data.firstShow = true
},
toAbility: function(){
wx.navigateTo({ url: '/pages/agent/ability/index' })
},
fetchRegionList: function () {
getFactoryCity().then(result => {
//成功回调
this.data.cateList = [{
cityId: '',
cityName: '全部'
}].concat(result.data)
this.data.cateList = [{ cityId: '', cityName: '全部' }].concat(result.data)
for (let index = 0; index < this.data.cateList.length; index++) {
this.data.tabList.push(this.data.cateList[index].cityName)
}

7
pages/agent/factory-fragment/index.wxml

@ -13,6 +13,13 @@
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
</view>
<view wx:else>
<view class="bg-white" style="padding:32rpx 32rpx 0rpx 32rpx" wx:if="{{hasActivity}}" bindtap="toAbility">
<wux-image width="{{686}}" height="{{240}}" nuit="{{'rpx'}}" shape="rounded" lazyLoad="true" src="http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/21010821394555058.png" mode="aspectFill">
<view class="flex flex-center" slot="loading" style="height:240;width:686rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>
</view>
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex">
<view wx:for="{{pageItem}}" wx:key="index">
<view style="height:16rpx" wx:if="{{pageIndex != 0 || index != 0 }}"></view>

2
pages/api/ztb.js

@ -48,7 +48,7 @@ const cancelReservation = (id) => mPost(`/recycle-service/proxy-sell/cancel/rese
const cancelProxyOrderItem = (id) => mPost(`/recycle-service/proxy-sell/cancel/order-item/${id}`, null, zconfig)
const hasActivity = () => mGet(`/recycle-service/proxy-sell-activity/get/has-activity`, null, zconfig)
const getActivityList = (params) => mGet(`/recycle-service//proxy-sell-activity/list`, params, zconfig)
const getActivityList = (params) => mGet(`/recycle-service/proxy-sell-activity/list`, params, zconfig)
// /purchase/get/product-list 获取店铺采购商品列表接口
const getProductList = (params) => mGet(`/recycle-service/purchase/get/product-list`, params, zconfig)
// /recycle-service/get/store-product-list

Loading…
Cancel
Save