Browse Source

提交代码

Lijy 1 month ago
parent
commit
37bbf7b7e4

+ 9 - 14
fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue

@@ -52,20 +52,15 @@
                 <el-form-item label="任务完成校验" v-if="user.timeType.taskFileCharge">
                     <el-checkbox v-model="addForm.attachFileRequired" >是否必须上传成果文件</el-checkbox>
                 </el-form-item>
-                <el-form-item label="审核人" v-if="showMmeiLaiDe && user.roleId != 2283" prop="checkSecondId">
-                    <div class="customizedReviewer">
-                        <el-select v-model="addForm.checkFirstId" :disabled="true" size="small">
-                            <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                        </el-select>
-                        <div class="reviewImages"> 
-                            <img src="../assets/image/shenhejianto.png" alt="">
-                            <img src="../assets/image/shenhejianto.png" alt="">
-                        </div> 
-                        <el-select v-model="addForm.checkSecondId" :disabled="!addForm.checkFirstId || doYouWantToDisableAll" size="small">
-                            <el-option v-for="item in pmUserList" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                        </el-select>
-                    </div>
-                    
+                <el-form-item label="第一审核人" v-if="showMmeiLaiDe && user.roleId != 2283" prop="checkSecondId">
+                    <el-select v-model="addForm.checkFirstId" :disabled="true" size="small">
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="第二审核人" v-if="showMmeiLaiDe && user.roleId != 2283" prop="checkSecondId">
+                    <el-select v-model="addForm.checkSecondId" :disabled="!addForm.checkFirstId || doYouWantToDisableAll" size="small">
+                        <el-option v-for="item in pmUserList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
                 </el-form-item>
                 <el-form-item  :label="$t('taskdefinition')" prop="name">
                     <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :placeholder="$t('enterthetaskcontent')" clearable></el-input>

+ 9 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -75,7 +75,7 @@
                     <el-table :data="popoverData" :height="tableHeight" size="small">
                         <el-table-column property="type" :label="$t('other.messageContent')" align="left">
                             <template slot-scope="scope">
-                                <el-link type="primary" :underline="false" @click="locationHerf(scope.row.id,scope.row.content, scope.row.type)">
+                                <el-link type="primary" :underline="false" @click="locationHerf(scope.row.id, scope.row.content, scope.row.type, scope.row)">
                                     <span style="font-size:13px;">
                                         <span v-if="scope.row.msg == null">
                                             {{msgTypeTxt[scope.row.type]}}
@@ -716,7 +716,7 @@
             },
 
             //点击消息的跳转
-            locationHerf(id, date, type) {
+            locationHerf(id, date, type, row) {
                 this.http.post( this.port.manage.check, { id: id },
                 res => {
                     if (res.code == "ok") {
@@ -772,7 +772,13 @@
                             this.$router.push("/projectInside/"+date);
                             this.drawer = false;
                         } else if(type == 11) {
-                            this.$router.push("/list");
+                            const { taskId } = row
+                            this.$router.push({
+                                path: '/list',
+                                query: { 
+                                    messageTaskId: taskId
+                                }
+                            });
                             this.drawer = false;
                         }
                         

+ 7 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/gantt.vue

@@ -60,6 +60,13 @@ export default {
   },
 
   methods: {
+    detaliTaskExposure(row) {
+      this.title = '编辑计划'
+      setTimeout(() => {
+        console.log('开始执行')
+        this.editTask(row)
+      }, 1000)
+    },
     getDistanceToParent(element, parent) {
       let distance = 0;
       while (element && element !== parent) {
@@ -141,7 +148,6 @@ export default {
               taskVue: data.projectId ? false : true,
               meetingId: this.addForm.meetingId
             }
-
             this.addFormVisible = true
           } else {
             this.$message({ message: res.msg, type: "error" });

+ 45 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -76,6 +76,11 @@
                             <el-dropdown-item v-if="permissions.projectClassification">
                                 <el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
                             </el-dropdown-item>
+                            <el-dropdown-item v-if="user.companyId == '7536'">
+                                <el-link type="primary" :underline="false" @click="qrCodeClickEvent()">
+                                    二维码管理
+                                </el-link>
+                            </el-dropdown-item>
                             <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
                                 <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
                             </el-dropdown-item>
@@ -109,7 +114,7 @@
                         <el-link type="primary" :underline="false" @click="isganttshow = true">{{ $t('resourceallocation') }}</el-link>
                     <!-- </router-link> -->
                     <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
-                        <projectgantt></projectgantt>
+                        <projectgantt ref="projectganttRef"></projectgantt>
                     </el-dialog>
                 </el-form-item>
 
@@ -1754,6 +1759,13 @@
                 </el-link>
             </div>
         </el-dialog>
+
+        <!-- 二维码管理 -->
+        <el-dialog title="二维码管理" show-header="false" :visible.sync="qrCodeManagementVisable" top="60px" :close-on-click-modal="false" width="1200px">
+            <div>
+                <QrCodeManagement ref="qrCodeManagementRef"></QrCodeManagement>
+            </div>
+        </el-dialog>
         <!-- 选择人 -->
         <DepartmentSelectionPersonnel :visible="batchProjectTaskParticipantVisible" @changeParticipant="changeTaskParticipantVisible" @submitParticipant="addProjectTaskParticipant"></DepartmentSelectionPersonnel>
     </section>
@@ -1793,6 +1805,7 @@ a {
     import vueCascader from "@/components/cascader.vue"
     import vueCascadeSelection from "@/components/cascadeSelection.vue"
     import DepartmentSelectionPersonnel from "@/components/departmentSelectionPersonnel.vue"
+    import QrCodeManagement from './qrCodeManagement.vue'
 
     // 尝试字段
     import selectPersonnel from "@/components/selectPersonnel.vue"
@@ -1803,7 +1816,8 @@ a {
             vueCascader,
             vueCascadeSelection,
             DepartmentSelectionPersonnel,
-            selectPersonnel
+            selectPersonnel,
+            QrCodeManagement
         },
         data() {
             return {
@@ -2078,7 +2092,8 @@ a {
                 batchChangeStageDialogVisible: false,
                 batchChangeStageLoading: false,
                 batchProjectTaskParticipantVisible: false,
-                batchDepartment: []
+                batchDepartment: [],
+                qrCodeManagementVisable: false
             };
         },
         // 过滤器
@@ -2121,6 +2136,15 @@ a {
             },
             filterText2(val) {
                 this.$refs.chooseMembTree2.filter(val);
+            },
+            '$route'(to, from) {
+                if (to.path === '/list') {
+                    const { messageTaskId } = to.query
+                    console.log(messageTaskId, '<======== messageTaskId')
+                    if(messageTaskId && this.user.companyId == 876) {
+                        this.openTheReviewPopUpWindowSeparately(messageTaskId)
+                    }
+                }
             }
         },
         updated () {
@@ -2130,6 +2154,19 @@ a {
             })
         },
         methods: {
+            openTheReviewPopUpWindowSeparately(taskId) {
+                this.isganttshow = true
+                setTimeout(() => {
+                    console.log(this.$refs.projectganttRef, ',=========== this.$refs.projectganttRef')
+                    this.$refs.projectganttRef.parentLevelOpensPopUpWindowGantt({ taskId })
+                }, 300)
+            },
+            qrCodeClickEvent() {
+                this.qrCodeManagementVisable = true
+                this.$nextTick(()=>{
+                    this.$refs.qrCodeManagementRef.resetData()
+                })
+            },
             addProjectTaskParticipant(userList) {
                 const userIds = userList.map(item => item.id).join(',')
                 const projectIds = this.checkedProjectArr.map(a => a.id).join(',')
@@ -6277,6 +6314,11 @@ a {
             if (this.user.timeType.projectManDay == 1) {
                 this.getManDaySetting();
             }
+
+            const { messageTaskId } = this.$route.query
+            if(this.user.companyId == 876 && messageTaskId) {
+                this.openTheReviewPopUpWindowSeparately(messageTaskId)
+            }
         },
     };
 </script>

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -242,6 +242,11 @@ export default {
     this.isDataLoaded = true
   },
   methods: {
+    parentLevelOpensPopUpWindowGantt(row) {
+      setTimeout(() => {
+        this.$refs.ganttTable1.detaliTaskExposure(row);
+      }, 1000)
+    },
     closeBounced(obj) {
       if(obj.submitInsert) {
         this.dateupdata()

+ 214 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/qrCodeManagement.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="qrCodeManagement">
+    <di class="qrCodeManagement-header">
+      <div class="header-filter">
+        <div>项目号:</div>
+        <el-input v-model="filterValForm.orderId" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>项目名:</div>
+        <el-input v-model="filterValForm.projectId" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>生产工单号:</div>
+        <el-input v-model="filterValForm.projectName" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>行号:</div>
+        <el-input v-model="filterValForm.line" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>生产工单日期:</div>
+        <el-date-picker v-model="filterValForm.relsDate" type="date" placeholder="选择日期" size="small"
+          style="width: 150px;" value-format="YYYY-MM-dd">
+        </el-date-picker>
+      </div>
+    </di>
+    <div class="qrCodeManagement-con">
+      <el-table :data="tableData" style="width: 100%;height: 100%" border @selection-change="handleSelectionChange" :loading="tableLoading">
+        <el-table-column type="selection" width="55" />
+        <el-table-column prop="orderId" label="项目号" />
+        <el-table-column prop="projectId" label="项目名" />
+        <el-table-column prop="projectName" label="生产工单号" />
+        <el-table-column prop="line" label="行号" />
+      </el-table>
+    </div>
+    <div class="qrCodeManagement-bon">
+      <el-button type="primary" size="small" :disabled="!multipleSelection.length" @click="exportQrCode()"
+        :loading="exportQrCodeLoading">导出二维码</el-button>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageIndex"
+        :page-sizes="[100, 200, 300, 400, 500]" :page-size="pageSize" layout="total, prev, pager, next, sizes, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  components: {},
+  data() {
+    return {
+      user: JSON.parse(sessionStorage.getItem("user")),
+      permissions: JSON.parse(sessionStorage.getItem("permissions")),
+      tableData: [],
+      multipleSelection: [],
+      filterValForm: {
+        orderId: '',
+        projectId: '',
+        projectName: '',
+        line: '',
+        relsDate: ''
+      },
+      pageIndex: 1,
+      pageSize: 100,
+      total: 0,
+      exportQrCodeLoading: false,
+      tableLoading: false,
+      debounceTimer: null,
+    };
+  },
+  watch: {
+    filterValForm: {
+      handler() {
+        this.debounceGeTableData();
+      },
+      deep: true
+    }
+  },
+  mounted() { },
+  methods: {
+    // 重置数据并加载
+    resetData() {
+      this.filterValForm = {
+        orderId: '',
+        projectId: '',
+        projectName: '',
+        line: '',
+        relsDate: ''
+      }
+      this.pageIndex = 1
+      this.pageSize = 100
+      this.debounceGeTableData()
+    },
+    exportQrCode() {
+      this.exportQrCodeLoading = true
+      this.postData('/qrCode/generateQRCodeByErpIds', {
+        erpIds: this.multipleSelection.map(item => item.id).join(',')
+      }).then(res => {
+        console.log('res', res)
+        this.$message({
+          message: '导出成功,下载中...',
+          type: 'success'
+        });
+        var filePath = res.data;
+        const a = document.createElement('a'); // 创建a标签
+        a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
+        a.setAttribute('href', filePath);// href链接
+        a.click(); //自执行点击事件
+        a.remove();
+      }).finally(() => {
+        this.exportQrCodeLoading = false
+      })
+    },
+    // 赛选条件改动执行
+    debounceGeTableData() {
+      clearTimeout(this.debounceTimer);
+      this.debounceTimer = setTimeout(() => {
+        this.geTableData();
+      }, 500);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    handleSizeChange(val) {
+      this.pageIndex = 1
+      this.pageSize = val
+      this.geTableData()
+    },
+    handleCurrentChange(val) {
+      this.pageIndex = val
+      this.geTableData()
+    },
+    geTableData() {
+      const filteredParams = {};
+      for (const key in this.filterValForm) {
+        const val = this.filterValForm[key];
+        if (val !== '' && val !== null && val !== undefined) {
+          filteredParams[key] = val;
+        }
+      }
+
+      this.tableLoading = true
+      this.postData('/erpOrderInfo/getInfoPage', {
+        pageIndex: this.pageIndex,
+        pageSize: this.pageSize,
+        ...this.filteredParams
+      }).then(res => {
+        console.log('res', res)
+        console.log(res.data.data, '<======= 数据')
+        this.tableData = res.data.data || []
+        this.total = res.data.total || 0
+      }).finally(() => {
+        this.tableLoading = false
+      })
+    },
+    async postData(urls, param) {
+      return new Promise((resolve, reject) => {
+        this.http.post(urls, { ...param },
+          res => {
+            if (res.code == 'ok') {
+              resolve(res)
+            } else {
+              this.$message({
+                message: res.msg,
+                type: 'error'
+              })
+              reject(res)
+            }
+            resolve(res)
+          },
+          error => {
+            this.$message({
+              message: error,
+              type: "error"
+            });
+            reject(error)
+          }
+        )
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.qrCodeManagement {
+  width: 100%;
+  height: 70vh;
+
+  .qrCodeManagement-header {
+    display: flex;
+    align-items: center;
+    height: 8%;
+
+    .header-filter {
+      display: flex;
+      align-items: center;
+      margin-left: 14px;
+    }
+  }
+
+  .qrCodeManagement-con {
+    height: 84%;
+  }
+
+  .qrCodeManagement-bon {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 8%;
+  }
+}
+</style>