|
|
@@ -217,8 +217,11 @@ Page({
|
|
|
label: "报备审核时间",
|
|
|
value: data.reportcheckdate
|
|
|
}, {
|
|
|
- label: "作废原因",
|
|
|
- value: data.deletereason
|
|
|
+ label: "结束原因",
|
|
|
+ value: data.endreason
|
|
|
+ }, {
|
|
|
+ label: "失败原因",
|
|
|
+ value: data.defeatreason
|
|
|
}, {
|
|
|
label: "转手次数",
|
|
|
value: data.changecount
|
|
|
@@ -245,13 +248,14 @@ Page({
|
|
|
}].concat(tabbarList);
|
|
|
|
|
|
if (isLeader || isAdmin) {
|
|
|
- if (status != '已失败') tabbarList = tabbarList.concat([{
|
|
|
+ if (status != '已失败' && status != '已结束') tabbarList = tabbarList.concat([{
|
|
|
icon: "icon-bianji",
|
|
|
label: "编辑"
|
|
|
}, {
|
|
|
icon: "icon-genjin",
|
|
|
label: "提交报备"
|
|
|
}])
|
|
|
+
|
|
|
if (editdataleader) tabbarList.push({
|
|
|
icon: "icon-zhuanyi",
|
|
|
label: "更换负责人"
|
|
|
@@ -260,7 +264,13 @@ Page({
|
|
|
icon: "icon-shanchu",
|
|
|
label: "作废"
|
|
|
})
|
|
|
- tabbarList.push(status == '已失败' ? {
|
|
|
+ }
|
|
|
+ if (isLeader && status != '已失败') {
|
|
|
+ tabbarList.push({
|
|
|
+ icon: "icon-dibu-wuxiao",
|
|
|
+ label: "失败"
|
|
|
+ })
|
|
|
+ tabbarList.push(status == '已结束' ? {
|
|
|
icon: "icon-dibu-chehui",
|
|
|
label: "恢复"
|
|
|
} : {
|
|
|
@@ -285,39 +295,15 @@ Page({
|
|
|
let data = this.data.detail,
|
|
|
that = this;
|
|
|
switch (detail.label) {
|
|
|
- case "结束":
|
|
|
- if (data.status != '跟进中') return wx.showToast({
|
|
|
- title: '当前状态不可结束',
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
-
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '是否确认结束项目',
|
|
|
- complete: ({
|
|
|
- confirm
|
|
|
- }) => {
|
|
|
- if (confirm) _Http.basic({
|
|
|
- "id": 20221215163702,
|
|
|
- "content": {
|
|
|
- "sa_projectid": data.sa_projectid
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log('结束', res)
|
|
|
- wx.showToast({
|
|
|
- title: res.msg == '成功' ? '已结束' : res.msg,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- if (res.msg == '成功') setTimeout(this.getDetail, 300);
|
|
|
- })
|
|
|
- }
|
|
|
+ case "失败":
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/packageA/project/modules/fail/index?id=' + this.data.sa_projectid
|
|
|
})
|
|
|
break;
|
|
|
+ case "结束":
|
|
|
+ this.selectComponent("#Dialog").onClick(this.data.sa_projectid)
|
|
|
+ break;
|
|
|
case "恢复":
|
|
|
- if (data.status != '已失败') return wx.showToast({
|
|
|
- title: '失败项目才可恢复!',
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
_Http.basic({
|
|
|
"id": 20221208184202,
|
|
|
"content": {
|
|
|
@@ -607,9 +593,6 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
- console.log()
|
|
|
- },
|
|
|
onReachBottom() {
|
|
|
this.partialRenewal();
|
|
|
},
|