Lijy 1 år sedan
förälder
incheckning
22358e5e34

+ 141 - 127
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/workView.vue

@@ -1,55 +1,56 @@
 <template>
   <div class="distribution">
-    <van-nav-bar title="报工" left-text="返回"  @click-left="back" fixed left-arrow/>
-    
+    <van-nav-bar title="报工" left-text="返回" @click-left="back" fixed left-arrow />
+
     <div class="distribution_con contentRoll">
-      <van-empty v-if="myPlanProcedureList.length==0">暂无待报工任务</van-empty>
+      <van-empty v-if="myPlanProcedureList.length == 0">暂无待报工任务</van-empty>
       <div v-for="(prod, prodIndex) in myPlanProcedureList">
-          <div class="distribution_header">
-            <div>{{prod.plan_type == 0?prod.product_name:prod.task_name}}</div>
-            <div v-if="prod.plan_type == 0">{{prod.product_scheduling_num}}</div>
-            <div>{{prod.start_date}}至{{prod.end_date}}</div>
-          </div>
-          <div class="distribution_box" v-for="item,index in prod.procedureList" :key="index" @click="reportItem(item)">
-            <div>
-              <van-row >
-                <van-col span="19">{{ prod.plan_type == 0?item.procedure_name : prod.task_change_notice_num}}</van-col>
-                <van-col span="5" style="text-align:right;"><span style="color:goldenrod;font-size:16px;">{{ item.work_time }}</span> <span style="font-size:12px;">分钟</span></van-col>
+        <div class="distribution_header">
+          <div class="textDis">{{ prod.plan_type == 0 ? prod.product_name : prod.task_name }}</div>
+          <div v-if="prod.plan_type == 0">{{ prod.product_scheduling_num }}</div>
+          <div>{{ prod.start_date }}至{{ prod.end_date }}</div>
+        </div>
+        <div class="distribution_box" v-for="item, index in prod.procedureList" :key="index" @click="reportItem(item)">
+          <div>
+            <van-row>
+              <van-col span="19">{{ prod.plan_type == 0 ? item.procedure_name : prod.task_change_notice_num }}</van-col>
+              <van-col span="5" style="text-align:right;"><span style="color:goldenrod;font-size:16px;">{{ item.work_time
+              }}</span> <span style="font-size:12px;">分钟</span></van-col>
+            </van-row>
+            <div style="margin-top:10px;text-align: center;">
+              <van-row gutter="20">
+                <van-col span="8">
+                  <div class="valueCls">
+                    {{ item.progress }}%
+                  </div>
+                  <div class="labelCls">
+                    进度
+                  </div>
+                </van-col>
+                <van-col span="8">
+                  <div class="valueCls">
+                    {{ checkTypeTxt[prod.plan_type == 0 ? item.check_type : item.plan_check_type] }}
+                  </div>
+                  <div class="labelCls">
+                    质检方式
+                  </div>
+                </van-col>
+                <van-col span="8">
+                  <div class="valueCls">
+                    {{ item.checker_name ? item.checker_name : '待设置' }}
+                  </div>
+                  <div class="labelCls">
+                    质检人
+                  </div>
+                </van-col>
               </van-row>
-              <div style="margin-top:10px;text-align: center;">
-                <van-row gutter="20" >
-                  <van-col span="8">
-                      <div class="valueCls">
-                        {{item.progress}}%
-                      </div>
-                      <div class="labelCls">
-                        进度
-                      </div>
-                  </van-col>
-                  <van-col span="8">
-                    <div class="valueCls">
-                        {{checkTypeTxt[prod.plan_type == 0?item.check_type:item.plan_check_type]}}
-                      </div>
-                      <div class="labelCls">
-                        质检方式
-                      </div>
-                  </van-col>
-                  <van-col span="8">
-                    <div class="valueCls">
-                        {{item.checker_name?item.checker_name:'待设置'}}
-                      </div>
-                      <div class="labelCls">
-                        质检人
-                      </div>
-                  </van-col>
-                </van-row>
-              </div>
             </div>
           </div>
+        </div>
       </div>
     </div>
     <!-- 弹出层选人 -->
-    <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
+    <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%', background: '#F4F4F4' }">
     </van-popup>
   </div>
 </template>
@@ -61,8 +62,8 @@ export default {
   },
   data() {
     return {
-      checkTypeTxt:['自检','互检','专检'],
-      myPlanProcedureList:[],
+      checkTypeTxt: ['自检', '互检', '专检'],
+      myPlanProcedureList: [],
       distributionIndex: null,
       popupShow: false,
       titleText: '今日计划', // 默认文字
@@ -71,7 +72,7 @@ export default {
   },
   computed: {},
   watch: {},
-  created() {},
+  created() { },
   mounted() {
     this.getMyPlanProcedureList();
   },
@@ -90,19 +91,19 @@ export default {
 
     getMyPlanProcedureList() {
       const toast = this.$toast.loading({
-          forbidClick: true,
-          duration: 0
+        forbidClick: true,
+        duration: 0
       });
       this.$axios.post("/plan-procedure-total/getReportForWorkList", this.form)
-      .then(res => {
-          if(res.code == "ok") {
-              this.$toast.clear();
-              this.myPlanProcedureList = res.data;
+        .then(res => {
+          if (res.code == "ok") {
+            this.$toast.clear();
+            this.myPlanProcedureList = res.data;
           } else {
-              this.$toast.clear();
-              this.$toast.fail(res.msg);
+            this.$toast.clear();
+            this.$toast.fail(res.msg);
           }
-      }).catch(err=> {this.$toast.clear();});
+        }).catch(err => { this.$toast.clear(); });
     },
 
     //打开报工页面
@@ -119,90 +120,103 @@ export default {
 </script>
 
 <style scoped lang="less">
-  * {
-    box-sizing: border-box;
-  }
-  .valueCls {
-    color:#20a0ff;
-    margin-top: 5px;
-    margin-bottom: 5px;;
-  }
-  .labelCls {
-    color:#666;
-  }
-  .distribution {
-    width: 100%;
-    height: 100%;
-    padding: 44px 15px 15px 15px;
-    display: flex;
-    flex-direction: column;
-    flex-wrap: wrap;
-    background-color: #F4F4F4;
-    color: #333;
-
-    .distribution_header {
-      font-size: 16px;
-      div {
-        margin-top: 6px;
-        margin-bottom: 5px;
-      }
+* {
+  box-sizing: border-box;
+}
+
+.textDis {
+  width: 320px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.valueCls {
+  color: #20a0ff;
+  margin-top: 5px;
+  margin-bottom: 5px;
+  ;
+}
+
+.labelCls {
+  color: #666;
+}
+
+.distribution {
+  width: 100%;
+  height: 100%;
+  padding: 44px 15px 15px 15px;
+  display: flex;
+  flex-direction: column;
+  flex-wrap: wrap;
+  background-color: #F4F4F4;
+  color: #333;
+
+  .distribution_header {
+    font-size: 16px;
+
+    div {
+      margin-top: 6px;
+      margin-bottom: 5px;
     }
+  }
+
+  .distribution_con {
+    flex: 1;
+    overflow: auto;
+    margin-top: 14px;
 
-    .distribution_con {
-      flex: 1;
-      overflow: auto;
-      margin-top: 14px;
-
-      .distribution_box {
-        width: 100%;
-        background-color: #fff;
-        border-radius: 4px;
-        padding: 10px;
-        margin-bottom: 15px;
-        position: relative;
-        overflow: hidden;
-
-        .distribution_ItemBom {
-          font-size: 16px;
+    .distribution_box {
+      width: 100%;
+      background-color: #fff;
+      border-radius: 4px;
+      padding: 10px;
+      margin-bottom: 15px;
+      position: relative;
+      overflow: hidden;
+
+      .distribution_ItemBom {
+        font-size: 16px;
+        display: flex;
+        flex-wrap: wrap;
+        padding: 0px 6px 6px 6px;
+
+        .PlanItem {
+          width: 50%;
           display: flex;
-          flex-wrap: wrap;
-          padding: 0px 6px 6px 6px;
-
-          .PlanItem {
-            width: 50%;
-            display: flex;
-            padding-top: 12px;
-
-            &:first-child {
-              width: 100%;
-              padding-top: 10px;
-              span {
-                font-size: 18px;
-                color: #333;
-              }
-            }
+          padding-top: 12px;
 
-            &:nth-child(2) {
-              width: 100%;
-              span {
-                width: 230px;
-                word-break: break-all;
-              }
-            }
+          &:first-child {
+            width: 100%;
+            padding-top: 10px;
 
-            div {
-              width: 80px;
-              text-align: right;
-              color: #666;
+            span {
+              font-size: 18px;
+              color: #333;
             }
+          }
+
+          &:nth-child(2) {
+            width: 100%;
 
             span {
-              display: inline-block;
-              color: #333;
+              width: 230px;
+              word-break: break-all;
             }
           }
+
+          div {
+            width: 80px;
+            text-align: right;
+            color: #666;
+          }
+
+          span {
+            display: inline-block;
+            color: #333;
+          }
         }
       }
     }
   }
-</style>
+}</style>