diff --git a/pages/agent/ability-item/index.js b/pages/agent/ability-item/index.js
index 6089ca3..69570e3 100644
--- a/pages/agent/ability-item/index.js
+++ b/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 })
}
}
diff --git a/pages/agent/ability-item/index.json b/pages/agent/ability-item/index.json
index 4a8859e..b452c48 100644
--- a/pages/agent/ability-item/index.json
+++ b/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"
}
}
\ No newline at end of file
diff --git a/pages/agent/ability-item/index.wxml b/pages/agent/ability-item/index.wxml
index e60071e..4533ef0 100644
--- a/pages/agent/ability-item/index.wxml
+++ b/pages/agent/ability-item/index.wxml
@@ -7,53 +7,24 @@
- {{item.name}}
+ {{item.activityName}}
- {{item.locProvinceName + item.locCityName + item.locDistrictName}}
- |
- 已代卖:{{formate.formateWeight(item.cumulativeWeight, kg)}}
- |
- 昨日排队:{{item.yesterdayTotalQuantity}}辆
- 昨日排队:--
+ {{item.name}}
+ 时间:{{formate.substring(item.startTime, 0, 10)}}至{{formate.substring(item.endTime, 0, 10)}}
-
-
- 代卖费:
- {{formate.formatePrice2(item.proxypaySurcharge, kg)}}
-
-
- 纸厂账期:
- {{item.foreignPaybackIntever}}天
-
-
-
+
+ 活动规则
+
-
+
{{cateItem.categoryName}}
{{formate.formatePrice2(cateItem.unitPrice, kg)}}
暂无报价
-
- 价格更新:{{item.priceDate}}
-
-
- {{formate.formatePrice(cateItem.floatingPrice, kg)}}
- 较昨日
-
-
-
- {{formate.formatePrice(-cateItem.floatingPrice, kg)}}
- 较昨日
-
-
- -
- -
-
-
diff --git a/pages/agent/edit/index.js b/pages/agent/edit/index.js
index a52dd0b..ca23005 100644
--- a/pages/agent/edit/index.js
+++ b/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)
diff --git a/pages/agent/factory-fragment/index.js b/pages/agent/factory-fragment/index.js
index 79c242d..68512cc 100644
--- a/pages/agent/factory-fragment/index.js
+++ b/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)
}
diff --git a/pages/agent/factory-fragment/index.wxml b/pages/agent/factory-fragment/index.wxml
index 99f9741..f4c1393 100644
--- a/pages/agent/factory-fragment/index.wxml
+++ b/pages/agent/factory-fragment/index.wxml
@@ -13,6 +13,13 @@
{{loading? '正在加载' : '暂无数据'}}
+
+
+
+
+
+
+
diff --git a/pages/api/ztb.js b/pages/api/ztb.js
index febd64c..73be963 100644
--- a/pages/api/ztb.js
+++ b/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