|
|
@@ -40,6 +40,11 @@ Page({
|
|
|
})
|
|
|
this.getDetail()
|
|
|
getApp().globalData.Language.getLanguagePackage(this, '改善单详情');
|
|
|
+ let auth = wx.getStorageSync('auth').wServiceImprovement;
|
|
|
+ console.log("auth",auth)
|
|
|
+ this.setData({
|
|
|
+ isProduct: auth.options.includes("product")
|
|
|
+ })
|
|
|
},
|
|
|
getDetail() {
|
|
|
_Http.basic({
|
|
|
@@ -84,6 +89,9 @@ Page({
|
|
|
value: res.data.class2
|
|
|
}, {
|
|
|
label: "分析负责人",
|
|
|
+ value: res.data.name_analysis
|
|
|
+ }, {
|
|
|
+ label: "方案编辑人",
|
|
|
value: res.data.name_charge
|
|
|
}, {
|
|
|
label: "责任部门",
|
|
|
@@ -285,7 +293,7 @@ Page({
|
|
|
label: "提交分析"
|
|
|
},
|
|
|
撤回分析: {
|
|
|
- icon: "icon-tijiao",
|
|
|
+ icon: "icon-dibu-chehui",
|
|
|
label: "撤回分析"
|
|
|
},
|
|
|
中止: {
|
|
|
@@ -293,32 +301,47 @@ Page({
|
|
|
label: "中止"
|
|
|
},
|
|
|
发布方案: {
|
|
|
- icon: "icon-dibu-tuihui",
|
|
|
+ icon: "icon-fabufangan",
|
|
|
label: "发布方案"
|
|
|
},
|
|
|
撤回方案: {
|
|
|
- icon: "icon-shanchu1",
|
|
|
+ icon: "icon-dibu-chehui",
|
|
|
label: "撤回方案"
|
|
|
}
|
|
|
};
|
|
|
|
|
|
let statusOptions = {
|
|
|
- 新建: ['编辑', '中止'],
|
|
|
- 分析已提交: ['中止'],
|
|
|
- 方案已发布: ['中止'],
|
|
|
+ 新建: ['编辑'],
|
|
|
+ 分析已提交: [],
|
|
|
+ 方案已发布: [],
|
|
|
}
|
|
|
if (detail.userid_analysis == userid) {
|
|
|
//真因分析负责人
|
|
|
statusOptions.新建.splice(1, 0, '提交分析')
|
|
|
statusOptions.分析已提交.unshift('撤回分析')
|
|
|
+ statusOptions.新建.push('中止')
|
|
|
+ statusOptions.分析已提交.push('中止')
|
|
|
+ statusOptions.方案已发布.push('中止')
|
|
|
this.setData({
|
|
|
user_analysis: true
|
|
|
})
|
|
|
+ }
|
|
|
|
|
|
- } else if (detail.userid_charge == userid) {
|
|
|
+ if (detail.userid_charge == userid) {
|
|
|
//改善方案责任人
|
|
|
- statusOptions.分析已提交.unshift('发布方案')
|
|
|
- statusOptions.方案已发布.unshift('撤回方案')
|
|
|
+ statusOptions.分析已提交.unshift('发布方案');
|
|
|
+ statusOptions.方案已发布.unshift('撤回方案');
|
|
|
+ if (!statusOptions.新建.includes('中止')) {
|
|
|
+ statusOptions.新建.push('中止')
|
|
|
+ statusOptions.分析已提交.push('中止')
|
|
|
+ statusOptions.方案已发布.push('中止')
|
|
|
+ }
|
|
|
+
|
|
|
+ if (detail.abort_userids.includes(userid) && !statusOptions.新建.includes('中止')) {
|
|
|
+ statusOptions.新建.push('中止')
|
|
|
+ statusOptions.分析已提交.push('中止')
|
|
|
+ statusOptions.方案已发布.push('中止')
|
|
|
+ }
|
|
|
this.setData({
|
|
|
user_charge: true
|
|
|
})
|