seyason 1 год назад
Родитель
Сommit
a816be3527

+ 45 - 11
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/fillReport.vue

@@ -17,7 +17,7 @@
           </template>
         </van-cell>
         <van-cell title="质检类型" :value="checkTypeTxt[reportForm.check_type]" v-if="reportForm.progress==100"/>
-        <van-cell title="质检人" :value="reportForm.checker_name" is-link v-if="reportForm.progress==100">
+        <van-cell title="质检人" :value="reportForm.checker_name" is-link v-if="reportForm.progress==100" @click="showCheckerOptionList">
         </van-cell>
       </van-cell-group>
       <div style="margin: 16px;">
@@ -27,7 +27,19 @@
       </div>
     </van-form>
     <!-- 弹出层选人 -->
-    <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
+    <van-popup v-model="checkerShow" position="bottom">
+        <van-picker
+        show-toolbar
+        value-key="name"
+        :columns="checkerOptionList"
+        @confirm="onConfirm"
+        @cancel="checkerShow = false"
+        >
+        <template #option="item">
+            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+            <span v-else>{{item.name}}</span>
+        </template>
+        </van-picker>
     </van-popup>
   </div>
 </template>
@@ -39,6 +51,8 @@ export default {
   },
   data() {
     return {
+      checkerShow: false,
+      user: JSON.parse(localStorage.userInfo),
       saving: false,
       checkTypeTxt:['自检','互检','专检'],
       reportForm: {
@@ -58,7 +72,23 @@ export default {
     back() {
       this.$router.go(-1);
     },
- 
+    onConfirm(value,key){
+        this.reportForm.checkerId = value.id
+        this.reportForm.checker_name = value.name
+        this.checkerShow = false
+    },
+    showCheckerOptionList() {
+      this.checkerShow = true;
+      this.$axios.post("/report/getCheckerList", {check_type: this.reportForm.check_type, deptId: this.reportForm.station_id})
+        .then(res => {
+          this.saving = false;
+            if(res.code == "ok") {
+                this.checkerOptionList = res.data;
+            } else {
+                this.$toast.fail(res.msg);
+            }
+        }).catch(err=> {this.$toast.clear();});
+    },
     onSubmit() {
         if (this.reportForm.progress == 0){
           this.$toast.fail('进度不可为0')
@@ -94,14 +124,18 @@ export default {
         }).catch(err=> {this.$toast.clear();});
     },
     getMyPlanProcedureList() {
-      this.$axios.post("/plan-procedure-total/getFillProcedureDetail", {id: this.$route.query.id})
-      .then(res => {
-          if(res.code == "ok") {
-              this.reportForm = res.data;
-          } else {
-              this.$toast.fail(res.msg);
-          }
-      }).catch(err=> {this.$toast.clear();});
+        this.$axios.post("/plan-procedure-total/getFillProcedureDetail", {id: this.$route.query.id})
+        .then(res => {
+            if(res.code == "ok") {
+                this.reportForm = res.data;
+                if (this.reportForm.check_type == 0) {
+                  //自检
+                  this.reportForm.checker_name = this.user.name;
+                }
+            } else {
+                this.$toast.fail(res.msg);
+            }
+        }).catch(err=> {this.$toast.clear();});
     },
 
     //打开报工页面

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

@@ -3,6 +3,7 @@
     <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>
       <div v-for="(prod, prodIndex) in myPlanProcedureList">
           <div class="distribution_header">
             <div>{{prod.product_name}}</div>
@@ -13,7 +14,7 @@
             <div>
               <van-row >
                 <van-col span="20">{{ item.procedure_name }}</van-col>
-                <van-col span="4">{{ item.work_time }} h</van-col>
+                <van-col span="4"><span style="color:goldenrod;font-size:16px;">{{ item.work_time }}</span> h</van-col>
               </van-row>
               <div style="margin-top:10px;text-align: center;">
                 <van-row gutter="20" >
@@ -62,7 +63,6 @@ export default {
     return {
       checkTypeTxt:['自检','互检','专检'],
       myPlanProcedureList:[],
-      
       distributionIndex: null,
       popupShow: false,
       titleText: '今日计划', // 默认文字

Разница между файлами не показана из-за своего большого размера
+ 29 - 468
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/workReport/daily.vue