Bläddra i källkod

创建在制品 请先投料在报工提示

longfenglin 1 år sedan
förälder
incheckning
39d0f89807

+ 12 - 9
src/views/produce/components/jobBooking/components/jobDdBom.vue

@@ -72,6 +72,7 @@
                             </el-input>
                         </div>
                     </div>
+                    
 
                     <!-- <div class="rw ww20 rx-cc">
               <div class="penalize" v-if="!isDetails" :style="{ background: not.warehouseId ? '#FFA07A' : '' }"
@@ -105,13 +106,13 @@
 
                         </div>
                     </div>
-
-                    <div class="rx ww43" v-if="item.currentTaskDiagram.isFirstTask&&item.semiProductList.length<0">
-                        <div class="lable lable100 rx-cc"></div>
-                        <el-button class="" @click="singleQuery" type="primary">
-                            创建在制品
-                        </el-button>
-                    </div>
+                    
+                </div>
+                <div class="btn-margin" v-if="item.currentTaskDiagram.isFirstTask==1 && item.semiProductList.length==0">
+                    <div class="lable lable100 rx-cc"></div>
+                    <el-button class="" @click="singleQuery" type="primary">
+                        创建在制品
+                    </el-button>
                 </div>
             </div>
 
@@ -154,8 +155,7 @@ export default {
             immediate: true,
             deep: true,
             handler(newVal) {
-                console.log(newVal, '996633');
-
+                console.log('jhsaighajighsag',newVal)
                 if (newVal.semiProductList.length) {
                     let formedNum = 0;
                     let noFormingNum = 0;
@@ -568,4 +568,7 @@ export default {
         background: rgb(21, 122, 44);
     }
 }
+.btn-margin{
+    margin: 10px 0 10px 100px;
+}
 </style>

+ 6 - 2
src/views/produce/components/jobBooking/index.vue

@@ -212,6 +212,9 @@ export default {
       default() {
         return [];
       }
+    },
+    reportNeedFeed:{
+
     }
   },
 
@@ -229,7 +232,8 @@ export default {
       executorTime:'',
       warehouseList: [],
 
-      loading: null
+      loading: null,
+      
     };
   },
 
@@ -469,7 +473,7 @@ export default {
         return this.$message.warning('请选择执行时间');
       }
 
-      if(this.List[0].semiProductList.length==0 && this.List[0].pickOutInList.length==0){
+      if(this.reportNeedFeed==1){
         this.loading.close();
         return this.$message.warning('请先投料再报工');
       }

+ 1 - 6
src/views/produce/components/warehousing/components/jobDdBom.vue

@@ -106,13 +106,8 @@
                         </div>
                     </div>
 
-                    <div class="rx ww43" v-if="item.currentTaskDiagram.isFirstTask">
-                        <div class="lable lable100 rx-cc"></div>
-                        <el-button class="" @click="singleQuery" type="primary">
-                            创建在制品
-                        </el-button>
-                    </div>
                 </div>
+                
             </div>
 
         

+ 3 - 1
src/views/produce/index.vue

@@ -94,7 +94,7 @@
 
                 <!-- // 设备 入库 -->
                 <!-- 普通报工 -->
-                <jobBooking v-else :workListIds="workListIds" ref="jobRef"></jobBooking>
+                <jobBooking v-else :workListIds="workListIds" ref="jobRef" :reportNeedFeed="reportNeedFeed"></jobBooking>
 
 
 
@@ -208,6 +208,7 @@ export default {
         value: 'code'
       },
       feedNeedEquipment:0,//投料是否要添加生产设备1是0否
+      reportNeedFeed:0,//生产质检是否需要处置再报工1是0否
     };
   },
 
@@ -298,6 +299,7 @@ export default {
     handleNodeClick(data) {
       console.log(data,'11111sassasgasg');
       this.feedNeedEquipment=data.feedNeedEquipment
+      this.reportNeedFeed=data.reportNeedFeed
 
       let obj = {
         '1': `${data.workCenterName}-${data.name}(普通工序)`,

+ 7 - 1
src/views/produceOrder/index.vue

@@ -619,8 +619,14 @@ export default {
     },
     // 发布工单
     handleOrderPublish(type, row) {
+      // this.$router.push({
+      //   path: '/produce',
+      //   query: {
+      //     workOrderId: row.id
+      //   }
+      // });
       this.$router.push({
-        path: '/produce',
+        path: '/produceOrder/workReport',
         query: {
           workOrderId: row.id
         }

+ 266 - 0
src/views/workReport/index.vue

@@ -0,0 +1,266 @@
+<template>
+  <div class="index_box">
+    <div class="content_box">
+      <div class="top-ste">
+        <el-steps
+          :active="activeIndex"
+          space="20px"
+          align-center
+          style="margin-top: 18px"
+        >
+          <el-step
+            v-for="(item, index) in routeList"
+            :key="index"
+            :title="item.taskTypeName"
+            @click.native="handIdx(index, item)"
+            :description="desIndex == index ? '此处' : ''"
+            :class="desIndex == index?'active':''"
+          ></el-step>
+        </el-steps>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getTaskInstanceList } from '@/api/produce/job';
+
+export default {
+  components: {
+  
+  },
+  data() {
+    return {
+     activeIndex:0,
+     routeList:[],
+     desIndex: 0,
+    };
+  },
+
+  computed: {
+   
+  },
+
+  created() {
+    this.init()
+  },
+  methods: {
+    //  折叠悬浮中样式调整
+    init() {
+      this.$store.dispatch('theme/setCollapse', true);
+    },
+
+    //工序步骤条数据
+    getTaskFn() {
+      let workid=this.$route.query.workOrderId
+      getTaskInstanceList(workid).then((res) => {
+        this.routeList = res;
+
+        // 使用findIndex方法查找
+        const index = this.routeList.findIndex(
+          (item) => Number(item.taskId) == Number(this.workOrderInfo.taskId)
+        );
+
+        
+        this.desIndex = index;
+        console.log(this.routeList,'888888');
+        // this.newId = this.routeList[this.desIndex].taskId||'';
+
+        // if (this.workOrderInfo.taskId != -2) {
+        //   this.curTaskObj = JSON.parse(JSON.stringify(this.routeObj));
+        // } else {
+        //   this.curTaskObj = JSON.parse(JSON.stringify(this.routeList[0]));
+        //   this.desIndex = 0;
+        // }
+        this.activeIndex = index;
+      });
+    },
+    
+  },
+
+  mounted() {
+    this.$nextTick(() => {
+      const targetElements =
+        document.getElementsByClassName('ele-admin-tabs');
+
+      if (targetElements.length > 0) {
+        // 遍历所有具有 'ele-admin-tabs' 类的元素
+        Array.from(targetElements).forEach((element) => {
+          // 对每个元素添加 'new-ele-admin-tabs' 类
+          element.classList.add('new-ele-admin-tabs');
+        });
+      }
+    });
+  },
+
+  destroyed() {
+    this.$nextTick(() => {
+      const targetElements =
+        document.getElementsByClassName('ele-admin-tabs');
+      if (targetElements.length > 0) {
+        Array.from(targetElements).forEach((element) => {
+          element.classList.remove('new-ele-admin-tabs');
+        });
+      }
+    });
+  }
+};
+</script>
+
+<style>
+.content_box {
+  width:100%;
+  height: 100%;
+  background-color: #fff;
+}
+
+
+
+.footBtn {
+  position: absolute;
+  bottom: 20px;
+  left: 0;
+}
+
+.new-ele-admin-tabs {
+  display: none !important;
+}
+
+.c_title {
+  color: #157a2c;
+  font-size: 16px;
+  font-weight: bold;
+}
+
+.tableZ_box {
+  border: 1px solid #e3e5e5;
+  margin: 6px 0;
+
+  &:last-child {
+    border-bottom: none;
+  }
+
+  .row {
+    width: 100%;
+    display: flex;
+  }
+
+  .col {
+    width: calc(100% / 5);
+    display: flex;
+    align-items: center;
+    min-width: 200px;
+    min-height: 32px;
+    border-bottom: 1px solid #e3e5e5;
+    border-right: 1px solid #e3e5e5;
+
+    &:last-child {
+      border-right: none;
+    }
+
+    .name {
+      display: flex;
+      align-items: center;
+      padding: 4px;
+      width: 80px;
+      height: 100%;
+      background-color: #d0e4d5;
+      color: #000;
+    }
+
+    .content {
+      padding: 4px 6px;
+      color: #000;
+    }
+  }
+
+  .pd6 {
+    padding: 0 6px;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.seek-list {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10px 10px;
+}
+
+.right_main_box {
+  background-color: #fff;
+  height: 100%;
+  box-sizing: border-box;
+}
+
+.index_box {
+  padding: 10px;
+  padding-bottom: 0;
+  width: 100%;
+  box-sizing: border-box;
+  min-width: 1280px !important;
+  height: calc(100vh - 60px);
+  // overflow-x: auto;
+  /* 当内容超出宽度时,允许水平滚动 */
+  white-space: nowrap;
+  /* 防止内部文本换行,确保所有内容都在一行显示 */
+  scrollbar-width: thin;
+  /* 设置滚动条宽度(浏览器兼容性可能有所不同) */
+  scrollbar-color: #40a9ff transparent;
+  /* 设置滚动条颜色和轨道颜色(同样,浏览器兼容性) */
+}
+
+.main {
+  width: 100%;
+  min-width: 1280px;
+
+  height: calc(100vh - 70px - 50px - 80px);
+  display: flex;
+  justify-content: space-between;
+}
+
+.left_main {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  min-width: 640px;
+
+  .top {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+  }
+
+  // .bottom {
+  //   width: 100%;
+  //   min-height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
+  //   overflow: hidden;
+  // }
+}
+
+::v-deep .el-tabs__item.is-active {
+  background-color: #DFFADE;
+  /* 蓝色背景 */
+  color: #333;
+}
+
+::v-deep .is-active {
+  color: #DFFADE;
+}
+
+
+.right_main {
+  min-width: 640px;
+  padding-bottom: 12px;
+  height: calc((100vh - 70px - 50px - 80px - 12px));
+  background: #f0f3f3;
+}
+
+//工单报工样式
+.top-ste{
+
+}
+</style>