|
|
@@ -8,6 +8,7 @@ const _Http = getApp().globalData.http,
|
|
|
let paramvalue = false;
|
|
|
Page({
|
|
|
data: {
|
|
|
+ isInsert: false,
|
|
|
loading: true,
|
|
|
isLeader: false, //是否为负责人
|
|
|
isRecover: false, //关闭弹窗是否恢复项目
|
|
|
@@ -245,16 +246,19 @@ Page({
|
|
|
icon: "icon-genjin",
|
|
|
label: "跟进"
|
|
|
}];
|
|
|
+ if (wx.getStorageSync('auth').wproject.options.some(v => v == "auditauthorization")) tabbarList.unshift({
|
|
|
+ icon: "icon-shenheshouquan",
|
|
|
+ label: "审核授权"
|
|
|
+ })
|
|
|
if (!isLeader) {
|
|
|
let s = await getApp().agentOrNot("sa_project", this.data.sa_projectid);
|
|
|
isLeader = s.data.editable == 1;
|
|
|
editdataleader = s.data.editdataleader == 1;
|
|
|
}
|
|
|
if (isAdmin) tabbarList = [{
|
|
|
- icon: "icon-genjin",
|
|
|
+ icon: "icon-baobeishenhe",
|
|
|
label: "报备审核"
|
|
|
}].concat(tabbarList);
|
|
|
-
|
|
|
if (isLeader || isAdmin) {
|
|
|
if (status != '已失败' && status != '已结案') {
|
|
|
_Http.basic({
|
|
|
@@ -271,7 +275,7 @@ Page({
|
|
|
icon: "icon-bianji",
|
|
|
label: "编辑"
|
|
|
}, {
|
|
|
- icon: "icon-genjin",
|
|
|
+ icon: "icon-tijiaobaobei1",
|
|
|
label: "提交报备"
|
|
|
}])
|
|
|
if (editdataleader) tabbarList.push({
|
|
|
@@ -279,7 +283,6 @@ Page({
|
|
|
label: "更换负责人"
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
if (isLeader) {
|
|
|
if (status == '已成交') tabbarList.push({
|
|
|
icon: "icon-dibu-jieshu",
|
|
|
@@ -295,19 +298,15 @@ Page({
|
|
|
label: "恢复"
|
|
|
}]
|
|
|
}
|
|
|
-
|
|
|
tabbarList.push({
|
|
|
icon: "icon-shanchu",
|
|
|
label: "作废"
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
|
|
|
icon: "icon-a-shouyejingangquhehuoren",
|
|
|
label: "查看重复"
|
|
|
});
|
|
|
-
|
|
|
this.setData({
|
|
|
isLeader,
|
|
|
tabbarList,
|
|
|
@@ -330,6 +329,16 @@ Page({
|
|
|
case "结案":
|
|
|
this.selectComponent("#Dialog").onClick(this.data.sa_projectid)
|
|
|
break;
|
|
|
+ case "发起授权":
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `./impower/initiate?projectname=${data.projectname}&sa_projectid=${data.sa_projectid}`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case "审核授权":
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `./impower/impower?sa_projectid=${data.sa_projectid}`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
case "恢复":
|
|
|
_Http.basic({
|
|
|
"id": 20221208184202,
|
|
|
@@ -683,8 +692,9 @@ Page({
|
|
|
onGetList({
|
|
|
detail
|
|
|
}) {
|
|
|
+ let tabbarList = this.data.tabbarList;
|
|
|
if (detail.data.systemtag.includes('报备中')) {
|
|
|
- let tabbarList = this.data.tabbarList.filter(v => v.label != '提交报备')
|
|
|
+ tabbarList = tabbarList.filter(v => v.label != '提交报备')
|
|
|
let index = tabbarList.findIndex(v => v.label == '报备审核');
|
|
|
if (index != -1) tabbarList.splice(index, 0, {
|
|
|
icon: "icon-genjin",
|
|
|
@@ -693,11 +703,17 @@ Page({
|
|
|
this.setData({
|
|
|
tabbarList
|
|
|
})
|
|
|
+ } else if (detail.data.systemtag.includes('已报备')) {
|
|
|
+ let status = this.data.detail.status
|
|
|
+ if (this.data.isLeader && status != '已失败' && status != '已结案') tabbarList.unshift({
|
|
|
+ icon: "icon-faqishouquan",
|
|
|
+ label: "发起授权"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ isInsert: true,
|
|
|
+ tabbarList
|
|
|
+ })
|
|
|
}
|
|
|
- this.setData({
|
|
|
- isInsert: detail.data.systemtag.includes('已报备')
|
|
|
- })
|
|
|
- console.log(123123, this.data.isInsert)
|
|
|
},
|
|
|
onUnload() {
|
|
|
const page = getCurrentPages().find(v => v.__route__ == 'packageA/project/index');
|