diff --git a/pages/agent/ability-item/index.js b/pages/agent/ability-item/index.js
index 41e5096..586bd41 100644
--- a/pages/agent/ability-item/index.js
+++ b/pages/agent/ability-item/index.js
@@ -39,6 +39,10 @@ Component({
wx.navigateTo({ url: '/pages/login/index' })
return
}
+ if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
+ util.showToast('您不是工厂管理员,无法预约代卖,请联系工厂管理员')
+ return
+ }
if(!this.data.item.isOperations){
util.showToast(this.data.item.manageNotifyMessage)
return
diff --git a/pages/agent/agent-item/index.js b/pages/agent/agent-item/index.js
index f7be056..e33d665 100644
--- a/pages/agent/agent-item/index.js
+++ b/pages/agent/agent-item/index.js
@@ -36,6 +36,10 @@ Component({
wx.navigateTo({ url: '/pages/login/index' })
return
}
+ if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
+ util.showToast('您不是工厂管理员,无法预约代卖,请联系工厂管理员')
+ return
+ }
if(!this.data.item.isOperations){
util.showToast(this.data.item.manageNotifyMessage)
return
diff --git a/pages/agent/factory-detail/index.js b/pages/agent/factory-detail/index.js
index d09d2a5..b4c817f 100644
--- a/pages/agent/factory-detail/index.js
+++ b/pages/agent/factory-detail/index.js
@@ -1,5 +1,6 @@
// pages/message/detail/index.js
import Scene from '../../index/scene'
+import Dialog from '../../../components/dialog/dialog'
import { getFactoryPriceDetail, userPushFollowMill } from "../../../api/ztb"
const event = require('../../../utils/event')
const util = require('../../../utils/util')
@@ -96,6 +97,11 @@ Scene({
wx.navigateTo({ url: '/pages/login/index' })
return
}
+ if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
+ Dialog.alert({ title: '温馨提示', message: '您不是工厂管理员,无法预约代卖,请联系工厂管理员' }).then(() => {
+ })
+ return
+ }
if(!this.data.factoryDetail.isOperations){
util.showToast(this.data.factoryDetail.manageNotifyMessage)
return
diff --git a/pages/agent/factory-detail/index.json b/pages/agent/factory-detail/index.json
index 97a5b1a..df60778 100644
--- a/pages/agent/factory-detail/index.json
+++ b/pages/agent/factory-detail/index.json
@@ -6,6 +6,7 @@
"van-tabi": "/components/tabi/index",
"van-image": "/components/image/index",
"van-button": "/components/button/index",
+ "van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index"
}
diff --git a/pages/agent/factory-detail/index.wxml b/pages/agent/factory-detail/index.wxml
index dab213c..48cd906 100644
--- a/pages/agent/factory-detail/index.wxml
+++ b/pages/agent/factory-detail/index.wxml
@@ -130,6 +130,8 @@
我要卖货
+
+
diff --git a/pages/moment/new-list/index.js b/pages/moment/new-list/index.js
index c380cd4..a50699a 100644
--- a/pages/moment/new-list/index.js
+++ b/pages/moment/new-list/index.js
@@ -1,5 +1,6 @@
// pages/message/detail/index.js
import Scene from '../../index/scene'
+import Dialog from '../../../components/dialog/dialog'
import { getPaperMillOfInformationList } from "../../../api/ztb"
const util = require('../../../utils/util')
const math = require('../../../utils/math') //导入模块
@@ -38,6 +39,11 @@ Scene({
wx.navigateTo({url: '/pages/login/index' })
return
}
+ if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
+ Dialog.alert({ title: '温馨提示', message: '您不是工厂管理员,无法预约代卖,请联系工厂管理员' }).then(() => {
+ })
+ return
+ }
if(!e.currentTarget.dataset.operations){
util.showToast(e.currentTarget.dataset.msg)
return
diff --git a/pages/moment/new-list/index.json b/pages/moment/new-list/index.json
index 451066f..02d5d51 100644
--- a/pages/moment/new-list/index.json
+++ b/pages/moment/new-list/index.json
@@ -1,6 +1,7 @@
{
"usingComponents": {
"van-loading": "/components/loading/index",
+ "van-dialog": "/components/dialog/index",
"notification": "/pages/message/notification/index"
}
}
\ No newline at end of file
diff --git a/pages/moment/new-list/index.wxml b/pages/moment/new-list/index.wxml
index 51dc873..8bd1099 100644
--- a/pages/moment/new-list/index.wxml
+++ b/pages/moment/new-list/index.wxml
@@ -88,4 +88,5 @@
+