Browse Source

Merge branch 'master' into 测试

lxf 1 year ago
parent
commit
ab7805c33a

+ 58 - 3
src/views/group/data-board/turnover-rate/index.vue

@@ -68,6 +68,9 @@
           <el-icon style="cursor: pointer; margin-left: 4px; transform: translateY(2px)"><QuestionFilled /></el-icon>
         </el-tooltip>
       </template>
+      <template #predictOutStorageDaysHeader>
+        <span>预计消耗天</span>
+      </template>
     </byTable>
   </el-card>
 </template>
@@ -133,11 +136,53 @@ const config = computed(() => {
         width: 120,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "品名",
+    //     slot: "bomSpecName",
+    //     "min-width": 220,
+    //   },
+    // },{
+    {
+      attrs: {
+        label: "种类",
+        prop: "species",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "售价体系",
+        prop: "sellingPriceSystem",
+        width: 90,
+      },
+    },
+    {
+      attrs: {
+        label: "色层",
+        prop: "chromatophore",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "正面纹路",
+        prop: "frontGrain",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "背面纹路",
+        prop: "reverseGrain",
+        width: 130,
+      },
+    },
     {
       attrs: {
-        label: "品名",
-        slot: "bomSpecName",
-        "min-width": 220,
+        label: "颜色",
+        prop: "colour",
+        width: 170,
       },
     },
     {
@@ -219,6 +264,16 @@ const config = computed(() => {
         width: 90,
       },
     },
+    {
+      attrs: {
+        label: "预计消耗天",
+        prop: "predictOutStorageDays",
+        width: 140,
+        slotHeader: "predictOutStorageDaysHeader",
+      },
+      sortable: true,
+      header: true,
+    },
   ];
 });
 const getDemandData = () => {

+ 23 - 11
src/views/group/order/management/index.vue

@@ -450,17 +450,19 @@ const config = computed(() => {
                 },
               }
             : {},
-          {
-            attrs: {
-              label: "修改包装配置",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickChangePackaging(row);
-            },
-          },
+          judgeRoles()
+            ? {
+                attrs: {
+                  label: "修改包装配置",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickChangePackaging(row);
+                },
+              }
+            : {},
           props.selectStatus
             ? {
                 attrs: {
@@ -976,6 +978,16 @@ const selectExpressPacking = (data) => {
   }
   ElMessage({ message: "添加成功", type: "success" });
 };
+const judgeRoles = () => {
+  let status = true;
+  if (proxy.useUserStore().user.roles && proxy.useUserStore().user.roles.length > 0) {
+    let list = proxy.useUserStore().user.roles.filter((item) => ["factoryAdmin", "factoryLaser", "factoryPacker", "factoryZxy"].includes(item.roleKey));
+    if (list && list.length > 0) {
+      status = false;
+    }
+  }
+  return status;
+};
 </script>
 
 <style lang="scss" scoped>

+ 23 - 11
src/views/production/schedule/order-inquiry/index.vue

@@ -251,17 +251,19 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "修改包装配置",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickChangePackaging(row);
-            },
-          },
+          judgeRoles()
+            ? {
+                attrs: {
+                  label: "修改包装配置",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickChangePackaging(row);
+                },
+              }
+            : {},
           [40, 50].includes(row.status)
             ? {
                 attrs: {
@@ -568,6 +570,16 @@ const selectExpressPacking = (data) => {
   }
   ElMessage({ message: "添加成功", type: "success" });
 };
+const judgeRoles = () => {
+  let status = true;
+  if (proxy.useUserStore().user.roles && proxy.useUserStore().user.roles.length > 0) {
+    let list = proxy.useUserStore().user.roles.filter((item) => ["factoryAdmin", "factoryLaser", "factoryPacker", "factoryZxy"].includes(item.roleKey));
+    if (list && list.length > 0) {
+      status = false;
+    }
+  }
+  return status;
+};
 </script>
 
 <style lang="scss" scoped>