|
@@ -28,13 +28,17 @@ Page({
|
|
|
reminddays: 0,
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ const authOptions = wx.getStorageSync('auth').worderform.options;
|
|
|
+ const checkPermission = (permission) => authOptions.includes(permission);
|
|
|
this.setData({
|
|
|
sa_orderid: options.id,
|
|
|
order_rebate_used: wx.getStorageSync('siteP').order_rebate_used,
|
|
|
userrole: wx.getStorageSync('userrole'),
|
|
|
- isSubmit: wx.getStorageSync('auth').worderform.options.some(v => v == 'submit'),
|
|
|
- isDelete: wx.getStorageSync('auth').worderform.options.some(v => v == 'delete'),
|
|
|
- fixATime: wx.getStorageSync('auth').worderform.options.some(v => v == 'fixATime'),
|
|
|
+ isSubmit: checkPermission('submit'),
|
|
|
+ isDelete: checkPermission("delete"),
|
|
|
+ fixATime: checkPermission("fixATime"),
|
|
|
+ isRecall: checkPermission("recall"),
|
|
|
+ isSure: checkPermission("sure"),
|
|
|
});
|
|
|
this.getDetail(true);
|
|
|
//销售分类
|
|
@@ -625,9 +629,56 @@ Page({
|
|
|
title: s.code != '1' ? s.msg : getApp().globalData.Language.getMapText('提交成功'),
|
|
|
icon: "none"
|
|
|
});
|
|
|
- if (s.code == '1') this.setData({
|
|
|
- "detail.status": "提交"
|
|
|
- })
|
|
|
+ if (s.code == '1') this.getDetail(true, false)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ confirmSubmit() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ cancelText: getApp().globalData.Language.getMapText('取消'),
|
|
|
+ confirmText: getApp().globalData.Language.getMapText('确定'),
|
|
|
+ title: getApp().globalData.Language.getMapText('提示'),
|
|
|
+ content: getApp().globalData.Language.getMapText('是否确认提交订单') + '?',
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 2025011514120303,
|
|
|
+ "content": {
|
|
|
+ sa_orderid: that.data.sa_orderid,
|
|
|
+ reminddays: that.data.reminddays
|
|
|
+ },
|
|
|
+ }).then(s => {
|
|
|
+ console.log("确定提交订单", s)
|
|
|
+ wx.showToast({
|
|
|
+ title: s.code != '1' ? s.msg : getApp().globalData.Language.getMapText('提交成功'),
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (s.code == '1') that.getDetail(true, false)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ recall() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ cancelText: getApp().globalData.Language.getMapText('取消'),
|
|
|
+ confirmText: getApp().globalData.Language.getMapText('确定'),
|
|
|
+ title: getApp().globalData.Language.getMapText('提示'),
|
|
|
+ content: getApp().globalData.Language.getMapText('是否确认撤回订单') + '?',
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20230301190202,
|
|
|
+ "content": {
|
|
|
+ sa_orderid: that.data.sa_orderid
|
|
|
+ },
|
|
|
+ }).then(s => {
|
|
|
+ console.log("确定提交订单", s)
|
|
|
+ wx.showToast({
|
|
|
+ title: s.code != '1' ? s.msg : getApp().globalData.Language.getMapText('撤回成功'),
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (s.code == '1') that.getDetail(true, false)
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
stepperSubmit() {
|