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.
64 lines
1.9 KiB
64 lines
1.9 KiB
const util = require('../../../utils/util')
|
|
const app = getApp()
|
|
|
|
Component({
|
|
options: {
|
|
addGlobalClass: true,
|
|
multipleSlots: true
|
|
},
|
|
properties: {
|
|
item: { type: Object, value: null },
|
|
frist: { type: Boolean, value: true }
|
|
},
|
|
data: {
|
|
cateIndex: 0
|
|
},
|
|
methods: {
|
|
lookItem: function (e) {
|
|
wx.navigateTo({ url: `/xtends/proxysell/factory-detail/index?id=${this.data.item.paperMillId}`})
|
|
},
|
|
unflodItem: function(){
|
|
this.setData({ ['item.fold']: !this.data.item.fold })
|
|
},
|
|
checkTag: function(e){
|
|
var cateIndex = -1
|
|
if(util.isEmpty(this.data.cateIndex)){
|
|
cateIndex = e.currentTarget.dataset.ck
|
|
} else if(this.data.cateIndex != e.currentTarget.dataset.ck){
|
|
cateIndex = e.currentTarget.dataset.ck
|
|
}
|
|
if(cateIndex >= 0){
|
|
this.setData({ cateIndex })
|
|
}
|
|
this.data.item.cateIndex = e.currentTarget.dataset.ck
|
|
var that = this
|
|
wx.navigateTo({
|
|
url: `/pages/process/order-appointment/index?type=1&id=${this.data.item.supplyChainId}`,
|
|
success: function(res) {
|
|
res.eventChannel.emit('onParam', that.data.item)
|
|
}
|
|
})
|
|
},
|
|
saleGood: function(e){
|
|
if (!app.userInfo) {
|
|
wx.navigateTo({ url: '/pages/login/index' })
|
|
return
|
|
}
|
|
if(!this.data.item.isOperations){
|
|
util.showToast(this.data.item.manageNotifyMessage)
|
|
return
|
|
}
|
|
if(util.isEmpty(this.data.cateIndex)){
|
|
util.showToast('请选择一个纸品')
|
|
return
|
|
}
|
|
if(util.isEmpty(this.data.item.paperCategoryList[this.data.cateIndex].unitPrice)){
|
|
util.showToast('该纸品暂无报价,无法卖货')
|
|
return
|
|
}
|
|
var categoryId = this.data.item.paperCategoryList[this.data.cateIndex].categoryId
|
|
wx.navigateTo({ url: '/xtends/proxysell/appointment/index?id=' + this.data.item.paperMillId + '&categoryId=' + categoryId })
|
|
}
|
|
}
|
|
|
|
})
|