xiaohaizhao 2 лет назад
Родитель
Сommit
f6b18fc9ab
1 измененных файлов с 30 добавлено и 8 удалено
  1. 30 8
      packageA/offers/detail.js

+ 30 - 8
packageA/offers/detail.js

@@ -210,7 +210,6 @@ Page({
                 value: res.data.leader.length ? res.data.leader[0].leadernum : ""
             }],
         })
-
     },
     /* 设置底部功能 */
     async setTabbar(status, Leader, specialoffer) {
@@ -256,6 +255,36 @@ Page({
                     label: '撤回'
                 });
             }
+
+        }
+        if (specialoffer) {
+            //开启特价
+            switch (status) {
+                case "提交":
+                    if (this.data.options.some(v => v == 'isrecheck')) tabbarList.unshift({
+                        icon: "icon-fuhe",
+                        label: "复核"
+                    })
+                    break;
+                case "复核":
+                    if (this.data.options.some(v => v == 'isrecheck')) tabbarList.unshift({
+                        icon: "icon-fanfuhe",
+                        label: "反复核"
+                    })
+                    if (this.data.isAdmin) tabbarList.unshift({
+                        icon: "icon-guanlian-fuzhi",
+                        label: "审核"
+                    })
+                    break;
+                case "审核":
+                    if (this.data.isAdmin) tabbarList.unshift({
+                        icon: "icon-guanlian-fuzhi",
+                        label: "反审核"
+                    })
+                    break;
+            }
+        } else {
+            //未开启特价
             //拥有管理权限 提交状态可以审核  审核状态可以反审核
             if (this.data.isAdmin && (status == '审核' || status == '提交')) tabbarList.unshift(status == '审核' ? {
                 icon: "icon-guanlian-fuzhi",
@@ -265,13 +294,6 @@ Page({
                 label: "审核"
             });
         }
-        if (specialoffer && ['审核', '复核'].includes(status) && this.data.options.some(v => v == 'isrecheck')) tabbarList.unshift(status == '审核' ? {
-            icon: "icon-fuhe",
-            label: "复核"
-        } : {
-            icon: "icon-fanfuhe",
-            label: "反复核"
-        });
         this.setData({
             tabbarList,
             isLeader,