Просмотр исходного кода

添加筛选状态,已经底部按钮权限修改

xiaohaizhao 2 лет назад
Родитель
Сommit
87ecf56336
3 измененных файлов с 46 добавлено и 37 удалено
  1. 41 36
      packageA/contract/detail.js
  2. 1 1
      packageA/contract/index.js
  3. 4 0
      packageA/contract/modules/type.wxs

+ 41 - 36
packageA/contract/detail.js

@@ -162,45 +162,50 @@ Page({
             isLeader = s.data.editable == 1;
             editdataleader = s.data.editdataleader == 1;
         }
-        if (isAdmin) tabbarList = [{
-            icon: "icon-genjin",
-            label: "审核"
-        }, {
-            icon: "icon-genjin",
-            label: "反审核"
-        }].concat(tabbarList);
-        if (isLeader || isAdmin) {
-            if (editdataleader) tabbarList.unshift({
-                icon: "icon-zhuanyi",
-                label: "更换负责人"
-            });
+        if (status != '已终止' && status != '已过期') {
+            if (isAdmin) tabbarList = [{
+                icon: "icon-genjin",
+                label: "审核"
+            }, {
+                icon: "icon-genjin",
+                label: "反审核"
+            }].concat(tabbarList);
+            if (isLeader || isAdmin) {
+                if (editdataleader) tabbarList.unshift({
+                    icon: "icon-zhuanyi",
+                    label: "更换负责人"
+                });
+                tabbarList = [{
+                    icon: "icon-shanchu",
+                    label: "作废"
+                }].concat(tabbarList)
+                if (status == '新建') {
+                    tabbarList.push({
+                        icon: "icon-bianji",
+                        label: "编辑"
+                    })
+                    tabbarList.unshift({
+                        icon: "icon-genjin",
+                        label: '提交'
+                    })
+                } else if (status == '已提交') {
+                    tabbarList.unshift({
+                        icon: "icon-genjin",
+                        label: '撤回'
+                    })
+                } else if (status == '审核') {
+                    tabbarList.unshift({
+                        icon: "icon-genjin",
+                        label: "终止"
+                    })
+                }
+            };
+        } else {
             tabbarList = [{
                 icon: "icon-shanchu",
                 label: "作废"
-            }].concat(tabbarList)
-            if (status == '新建') {
-                tabbarList.push({
-                    icon: "icon-bianji",
-                    label: "编辑"
-                })
-            } else if (status == '已提交') {
-                tabbarList.unshift({
-                    icon: "icon-genjin",
-                    label: '撤回'
-                })
-            } else if (status == '审核') {
-                tabbarList.unshift({
-                    icon: "icon-genjin",
-                    label: "终止"
-                })
-            } else {
-                tabbarList.unshift({
-                    icon: "icon-genjin",
-                    label: '提交'
-                })
-            }
-
-        };
+            }];
+        }
         this.setData({
             isLeader,
             tabbarList,

+ 1 - 1
packageA/contract/index.js

@@ -61,7 +61,7 @@ Page({
             show: false,
             type: ['项目', '居间', '工具借用', '框架'], //状态项
             typeActive: "",
-            status: ['新建', '已提交', '审核', '已终止'], //状态项
+            status: ['新建', '已提交', '审核', '已终止', '已过期'], //状态项
             statusActive: "",
             startdate: "",
             enddate: ""

+ 4 - 0
packageA/contract/modules/type.wxs

@@ -5,6 +5,10 @@ module.exports = {
             color = '#3874F6';
         } else if (status == '已提交') {
             color = '#52C41A';
+        } else if (status == '已终止') {
+            color = '#BBB';
+        } else if (status == '已过期') {
+            color = '#BBB';
         } else {
             color = '#FA8C16';
         };