|
@@ -37,7 +37,6 @@ Page({
|
|
|
this.setData({
|
|
this.setData({
|
|
|
detail: res.data
|
|
detail: res.data
|
|
|
})
|
|
})
|
|
|
- this.setPreview(res);
|
|
|
|
|
this.setTabbar()
|
|
this.setTabbar()
|
|
|
this.partialRenewal();
|
|
this.partialRenewal();
|
|
|
})
|
|
})
|
|
@@ -78,25 +77,57 @@ Page({
|
|
|
abortreasonShow: true
|
|
abortreasonShow: true
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
- case '退回':
|
|
|
|
|
- this.setData({
|
|
|
|
|
- backreasonShow: true
|
|
|
|
|
|
|
+ case '编辑':
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: `/E-service/serviceImprovement/edit`
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
- case '转工单':
|
|
|
|
|
- wx.navigateTo({
|
|
|
|
|
- url: "/E-service/serviceBillList/transferWorkOrder/transfer?id=" + detail.sa_service_improvementid + '&historicalservicesqty=' + detail.historicalservicesqty
|
|
|
|
|
|
|
+ case '撤回分析':
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: getApp().globalData.Language.getMapText('提示'),
|
|
|
|
|
+ content: getApp().globalData.Language.getMapText(`确认撤回分析吗`) + '?',
|
|
|
|
|
+ confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
|
|
|
+ cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
|
|
|
+ complete: ({
|
|
|
|
|
+ confirm
|
|
|
|
|
+ }) => {
|
|
|
|
|
+ if (confirm) _Http.basic({
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_service_improvementid": detail.sa_service_improvementid
|
|
|
|
|
+ },
|
|
|
|
|
+ "id": "2026013111242402",
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ getApp().globalData.Language.showToast(res.code == '1' ? "撤回成功" : res.msg)
|
|
|
|
|
+ if (res.code == 1) that.getDetail();
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
- case '编辑':
|
|
|
|
|
- wx.navigateTo({
|
|
|
|
|
- url: `/E-service/serviceBillList/insert?type=${this.data.type}&edit=true`
|
|
|
|
|
|
|
+ case '撤回方案':
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: getApp().globalData.Language.getMapText('提示'),
|
|
|
|
|
+ content: getApp().globalData.Language.getMapText(`确认撤回方案吗`) + '?',
|
|
|
|
|
+ confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
|
|
|
+ cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
|
|
|
+ complete: ({
|
|
|
|
|
+ confirm
|
|
|
|
|
+ }) => {
|
|
|
|
|
+ if (confirm) _Http.basic({
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_service_improvementid": detail.sa_service_improvementid
|
|
|
|
|
+ },
|
|
|
|
|
+ "id": "2026013111253202",
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ getApp().globalData.Language.showToast(res.code == '1' ? "撤回成功" : res.msg)
|
|
|
|
|
+ if (res.code == 1) that.getDetail();
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
- case '提交':
|
|
|
|
|
|
|
+ case '提交分析':
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
title: getApp().globalData.Language.getMapText('提示'),
|
|
title: getApp().globalData.Language.getMapText('提示'),
|
|
|
- content: getApp().globalData.Language.getMapText(`确认提交当前服务改善单吗`) + '?',
|
|
|
|
|
|
|
+ content: getApp().globalData.Language.getMapText(`确认提交分析吗`) + '?',
|
|
|
confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
|
cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
|
complete: ({
|
|
complete: ({
|
|
@@ -104,11 +135,9 @@ Page({
|
|
|
}) => {
|
|
}) => {
|
|
|
if (confirm) _Http.basic({
|
|
if (confirm) _Http.basic({
|
|
|
"content": {
|
|
"content": {
|
|
|
- "sa_service_improvementid": detail.sa_service_improvementid,
|
|
|
|
|
- "issumbit": 1,
|
|
|
|
|
- backreason: ""
|
|
|
|
|
|
|
+ "sa_service_improvementid": detail.sa_service_improvementid
|
|
|
},
|
|
},
|
|
|
- "id": "20230206101403",
|
|
|
|
|
|
|
+ "id": "2026013111240602",
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
getApp().globalData.Language.showToast(res.code == '1' ? "提交成功" : res.msg)
|
|
getApp().globalData.Language.showToast(res.code == '1' ? "提交成功" : res.msg)
|
|
|
if (res.code == 1) that.getDetail();
|
|
if (res.code == 1) that.getDetail();
|
|
@@ -116,10 +145,10 @@ Page({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
- case "删除":
|
|
|
|
|
|
|
+ case "发布方案":
|
|
|
wx.showModal({
|
|
wx.showModal({
|
|
|
title: getApp().globalData.Language.getMapText('提示'),
|
|
title: getApp().globalData.Language.getMapText('提示'),
|
|
|
- content: getApp().globalData.Language.getMapText(`确认删除当前改善单吗`) + '?',
|
|
|
|
|
|
|
+ content: getApp().globalData.Language.getMapText(`确认发布方案吗`) + '?',
|
|
|
confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
confirmBtn: getApp().globalData.Language.getMapText('确定'),
|
|
|
cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
cancelBtn: getApp().globalData.Language.getMapText('取消'),
|
|
|
complete: ({
|
|
complete: ({
|
|
@@ -127,14 +156,12 @@ Page({
|
|
|
}) => {
|
|
}) => {
|
|
|
if (confirm) _Http.basic({
|
|
if (confirm) _Http.basic({
|
|
|
"content": {
|
|
"content": {
|
|
|
- "sa_service_improvementids": [detail.sa_service_improvementid],
|
|
|
|
|
|
|
+ "sa_service_improvementid": detail.sa_service_improvementid,
|
|
|
},
|
|
},
|
|
|
- "id": "20230206091803",
|
|
|
|
|
|
|
+ "id": "2026013111251602",
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
- getApp().globalData.Language.showToast(res.code == '1' ? "删除成功" : res.msg)
|
|
|
|
|
- if (res.code == '1') setTimeout(() => {
|
|
|
|
|
- wx.navigateBack()
|
|
|
|
|
- }, 500);
|
|
|
|
|
|
|
+ getApp().globalData.Language.showToast(res.code == '1' ? "提交成功" : res.msg)
|
|
|
|
|
+ if (res.code == 1) that.getDetail();
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -143,8 +170,10 @@ Page({
|
|
|
},
|
|
},
|
|
|
/* 底部功能 */
|
|
/* 底部功能 */
|
|
|
async setTabbar() {
|
|
async setTabbar() {
|
|
|
- let status = this.data.detail.status,
|
|
|
|
|
|
|
+ let detail = this.data.detail;
|
|
|
|
|
+ let status = detail.status,
|
|
|
tabbarList = [];
|
|
tabbarList = [];
|
|
|
|
|
+ let userid = wx.getStorageSync('userMsg').userid;
|
|
|
let options = {
|
|
let options = {
|
|
|
编辑: {
|
|
编辑: {
|
|
|
icon: "icon-bianji2",
|
|
icon: "icon-bianji2",
|
|
@@ -171,6 +200,22 @@ Page({
|
|
|
label: "撤回方案"
|
|
label: "撤回方案"
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ let statusOptions = {
|
|
|
|
|
+ 新建: ['编辑', '中止'],
|
|
|
|
|
+ 分析已提交: ['中止'],
|
|
|
|
|
+ 方案已发布: ['中止'],
|
|
|
|
|
+ }
|
|
|
|
|
+ if (detail.userid_analysis == userid) {
|
|
|
|
|
+ //真因分析负责人
|
|
|
|
|
+ statusOptions.新建.splice(1, 0, '提交分析')
|
|
|
|
|
+ statusOptions.分析已提交.unshift('撤回分析')
|
|
|
|
|
+ } else if (detail.userid_charge == userid) {
|
|
|
|
|
+ //改善方案责任人
|
|
|
|
|
+ statusOptions.分析已提交.unshift('发布方案')
|
|
|
|
|
+ statusOptions.方案已发布.unshift('撤回方案')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (statusOptions[status]) {
|
|
if (statusOptions[status]) {
|
|
|
tabbarList = statusOptions[status].map(v => options[v]);
|
|
tabbarList = statusOptions[status].map(v => options[v]);
|
|
|
}
|
|
}
|
|
@@ -178,130 +223,6 @@ Page({
|
|
|
tabbarList
|
|
tabbarList
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- setPreview(res) {
|
|
|
|
|
- /* 基本信息 */
|
|
|
|
|
- let list1 = [{
|
|
|
|
|
- label: "改善单号",
|
|
|
|
|
- value: res.data.billno
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "单据日期",
|
|
|
|
|
- value: res.data.billdate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "状态",
|
|
|
|
|
- value: getApp().globalData.Language.getMapText(res.data.status),
|
|
|
|
|
- style: `color:${this.data.sColors[res.data.status]}`
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "企业名称",
|
|
|
|
|
- value: res.data.enterprisename
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "企业编号",
|
|
|
|
|
- value: res.data.agentnum
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "省市县",
|
|
|
|
|
- value: res.data.province + res.data.city + res.data.county
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "详细地址",
|
|
|
|
|
- value: res.data.address
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "关联订单",
|
|
|
|
|
- value: res.data.sonum
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "现场联系人",
|
|
|
|
|
- value: res.data.scenecontact,
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "身份备注",
|
|
|
|
|
- value: res.data.scenecontactrole
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "现场联系人电话",
|
|
|
|
|
- value: res.data.scenecontactphonenumber
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "应用系统",
|
|
|
|
|
- value: res.data.class1
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "服务开始日期",
|
|
|
|
|
- value: res.data.begdate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "服务结束日期",
|
|
|
|
|
- value: res.data.enddate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "问题描述",
|
|
|
|
|
- value: res.data.reason
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "业务员",
|
|
|
|
|
- value: res.data.saler_name
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "业务员电话",
|
|
|
|
|
- value: res.data.saler_phonenumber
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "项目名称",
|
|
|
|
|
- value: res.data.projectnote
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "异常类型",
|
|
|
|
|
- value: res.data.exception_type
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "服务等级",
|
|
|
|
|
- value: res.data.service_level,
|
|
|
|
|
- style: `color:${this.data.sColors[res.data.service_level]}`
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "评估意见",
|
|
|
|
|
- value: res.data.evaluation_comment
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "备注",
|
|
|
|
|
- value: res.data.remarks
|
|
|
|
|
- }];
|
|
|
|
|
- /* 系统信息 */
|
|
|
|
|
- let list2 = [{
|
|
|
|
|
- label: "创建人",
|
|
|
|
|
- value: res.data.createby
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "创建时间",
|
|
|
|
|
- value: res.data.createdate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "最近编辑人",
|
|
|
|
|
- value: res.data.changeby
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "最近编辑时间",
|
|
|
|
|
- value: res.data.changedate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "最近提交人",
|
|
|
|
|
- value: res.data.submitby
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "最近提交时间",
|
|
|
|
|
- value: res.data.submitdate
|
|
|
|
|
- }];
|
|
|
|
|
- let list3 = [{
|
|
|
|
|
- label: "供应方",
|
|
|
|
|
- value: res.data.supplier
|
|
|
|
|
- }];
|
|
|
|
|
- let list4 = [{
|
|
|
|
|
- label: "最近编辑人",
|
|
|
|
|
- value: res.data.changeby
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "最近编辑时间",
|
|
|
|
|
- value: res.data.changedate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "转单人",
|
|
|
|
|
- value: res.data.transformer
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "转单时间",
|
|
|
|
|
- value: res.data.transdate
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "退回原因",
|
|
|
|
|
- value: res.data.backreason
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "中止原因",
|
|
|
|
|
- value: res.data.abortreason
|
|
|
|
|
- }, {
|
|
|
|
|
- label: "中止时间",
|
|
|
|
|
- value: res.data.abortdate
|
|
|
|
|
- }];
|
|
|
|
|
- this.setData({
|
|
|
|
|
- list1,
|
|
|
|
|
- list2,
|
|
|
|
|
- list3,
|
|
|
|
|
- list4
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
//tabs 切换
|
|
//tabs 切换
|
|
|
tabsChange({
|
|
tabsChange({
|
|
|
detail
|
|
detail
|