|
|
@@ -63,12 +63,60 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
tabbarOnClick(e) {
|
|
|
+ let that = this,
|
|
|
+ detail = this.data.detail;
|
|
|
switch (e.detail.label) {
|
|
|
case '编辑':
|
|
|
wx.navigateTo({
|
|
|
url: `/E-service/serviceBillList/insert?type=${this.data.type}&edit=true`
|
|
|
})
|
|
|
break;
|
|
|
+ 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_serviceorderid": detail.sa_serviceorderid,
|
|
|
+ "issumbit": 1,
|
|
|
+ backreason: ""
|
|
|
+ },
|
|
|
+ "id": "20230206101403",
|
|
|
+ }).then(res => {
|
|
|
+ getApp().globalData.Language.showToast(res.code == '1' ? "提交成功" : res.msg)
|
|
|
+ if (res.code == 1) that.getDetail();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ 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_serviceorderids": [detail.sa_serviceorderid],
|
|
|
+ },
|
|
|
+ "id": "20230206091803",
|
|
|
+ }).then(res => {
|
|
|
+ getApp().globalData.Language.showToast(res.code == '1' ? "删除成功" : res.msg)
|
|
|
+ if (res.code == '1') setTimeout(() => {
|
|
|
+ wx.navigateBack()
|
|
|
+ }, 500);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
/* 底部功能 */
|
|
|
@@ -287,8 +335,7 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- } else {
|
|
|
- }
|
|
|
+ } else {}
|
|
|
})
|
|
|
}
|
|
|
})
|