yusheng 1 долоо хоног өмнө
parent
commit
f2bb72c5fd

+ 18 - 5
src/views/recordComponents/workOrderReport.vue

@@ -222,7 +222,10 @@
             ></image-upload>
           </el-form-item>
         </el-col>
-        <el-col :span="9" v-if="pageName == 'HaulSlag'||pageName == 'TransportAsh'">
+        <el-col
+          :span="9"
+          v-if="pageName == 'HaulSlag' || pageName == 'TransportAsh'"
+        >
           <el-form-item label="照片" prop="vehiclePhotoUrl">
             <image-upload
               v-model="addForm.vehiclePhotoUrl"
@@ -734,6 +737,19 @@
         try {
           const data = await getById(id);
           console.log('data', data);
+          if (data.type == 1) {
+            //班组报工默认单前登录人
+            data.executeUsers = [
+              {
+                groupId: this.$store.state.user.info.groupId,
+                groupName: this.$store.state.user.info.groupName,
+                teamId: null,
+                teamName: '',
+                userId: this.$store.state.user.info.userId,
+                userName: this.$store.state.user.info.name
+              }
+            ];
+          }
           data.detailList = data.detailList.map((i) => {
             i.toolNames = i.tools.map((j) => j.toolName).join(',');
             if (i.checkUsers && i.checkUsers.length > 0) {
@@ -772,10 +788,7 @@
           this.addForm.checkFinishTime =
             this.addForm.checkFinishTime ||
             dayjs(new Date()).format('YYYY-M-D HH:mm:ss');
-          console.log(
-            this.addForm.checkStartTime,
-            'this.addForm.checkStartTime'
-          );
+          console.log(this.addForm, 'this.addForm.checkStartTime');
           // 处理数据
           this.addForm.executeUsersIds = this.addForm.executeUsers
             .map((i) => i.userId)