ysy hace 1 año
padre
commit
60af05aef7
Se han modificado 2 ficheros con 100 adiciones y 71 borrados
  1. 93 71
      src/views/produce/components/footBtn.vue
  2. 7 0
      src/views/produce/index.vue

+ 93 - 71
src/views/produce/components/footBtn.vue

@@ -1,87 +1,111 @@
 <template>
-    <div class="foot_box">
-      <div v-for="(item, index) in btnList" :key="index" class="btn" :style="{'background': item.bjColor}" @click="footClick(item.type)">
-        <img src="../../../assets/Frame.png" class="Frame">
-        {{ item.name }}
-      </div>
+  <div class="foot_box">
+    <div
+      v-for="(item, index) in btnList"
+      :key="index"
+      class="btn"
+      :style="{ background: item.bjColor }"
+      @click="footClick(item.type)"
+    >
+      <img src="../../../assets/Frame.png" class="Frame" />
+      {{ item.name }}
     </div>
+  </div>
 </template>
 
 <script>
-export default {
+  export default {
     data() {
-        return {
-          btnList: [
-            {
-                name: '领料',
-                type: 'pick',
-                bjColor: '#FC1B75'
-            },
-            {
-                name: '投料',
-                type: 'feed',
-                bjColor: '#FBD114'
-            },
+      return {
+        btnList: [
+          {
+            name: '领料',
+            type: 'pick',
+            bjColor: '#FC1B75'
+          },
+          {
+            name: '投料',
+            type: 'feed',
+            bjColor: '#FBD114'
+          },
 
-            {
-                name: '报工',
-                type: 'job',
-                bjColor: '#157A2C'
-            },
+          {
+            name: '报工',
+            type: 'job',
+            bjColor: '#157A2C'
+          },
 
-            {
-                name: '请托',
-                type: '',
-                bjColor: '#3490DE'
-            },
+          {
+            name: '请托',
+            type: '',
+            bjColor: '#3490DE'
+          },
 
-            {
-                name: '委外',
-                type: '',
-                bjColor: '#39D9AC'
-            },
+          {
+            name: '委外',
+            type: '',
+            bjColor: '#39D9AC'
+          },
 
-            {
-                name: '副产品回收',
-                type: '',
-                bjColor: '#6639A6'
-            },
+          {
+            name: '副产品回收',
+            type: '',
+            bjColor: '#6639A6'
+          },
 
-            {
-                name: '暂停',
-                type: '',
-                bjColor: '#858585'
-            },
+          {
+            name: '暂停',
+            type: '',
+            bjColor: '#858585'
+          },
 
-            {
-                name: '异常',
-                type: '',
-                bjColor: '#FF4D4F'
-            },
-            
-            {
-                name: '交接',
-                type: '',
-                bjColor: '#2B56C2'
-            }
+          {
+            name: '异常',
+            type: '',
+            bjColor: '#FF4D4F'
+          },
 
-
-          ]
-        };
+          {
+            name: '交接',
+            type: '',
+            bjColor: '#2B56C2'
+          }
+        ]
+      };
     },
-    created() {
 
+    computed: {
+      taskObj() {
+        return this.$store.state.user.taskObj;
+      },
+
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
     },
-    methods: {
-        footClick(type) {
-            this.$emit('footBtn', type);
+    watch: {
+      taskObj(val) {
+        if (this.clientEnvironmentId == 2 && val.type == 3) {
+          this.btnList[1].name = '质检';
+          this.btnList[1].type = 'inspection';
+        } else {
+          this.btnList[1].name = '投料';
+          this.btnList[1].type = 'feed';
         }
+      }
+    },
+
+    created() {},
+    methods: {
+      footClick(type) {
+        this.$emit('footBtn', type);
+      }
     }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.foot_box{
+  .foot_box {
     min-width: 1280px;
     width: 100%;
     height: 80px;
@@ -90,9 +114,9 @@ export default {
     align-items: center;
     justify-content: space-between;
     font-size: 20px;
-}
+  }
 
-.btn{
+  .btn {
     height: 80px;
     width: calc(100% / 9);
     margin: 0 3px;
@@ -106,11 +130,9 @@ export default {
     justify-content: center;
     cursor: pointer;
 
-    .Frame{
-        width: 26px;
-        height: 26px;
+    .Frame {
+      width: 26px;
+      height: 26px;
     }
-
-}
-
+  }
 </style>

+ 7 - 0
src/views/produce/index.vue

@@ -33,6 +33,7 @@
 
         <template v-slot:content>
           <div class="right_main">
+
             <div v-if="operationType == 'pick'">
               <pickDetails ref="pickListRef" @pickAdd="pickAdd"></pickDetails>
             </div>
@@ -54,6 +55,12 @@
                 ref="jobRef"
               ></jobBooking>
             </div>
+
+
+            <div v-if="operationType == 'inspection'">
+              55
+            </div>
+
           </div>
         </template>
       </ele-split-layout>