liangluogis 3 months ago
parent
commit
658140c61d

+ 10 - 0
src/api/flowInfo.js

@@ -143,6 +143,16 @@ export function getFlowPage(seachInfo) {
   })
 }
 
+// 分页获取领料、退料的新增字段
+export function getSingleProcessInfo(params) {
+  return request({
+    url: '/tofly-flow/tfprocessl/getSingleProcessInfo',
+    method: 'get',
+    params
+  })
+}
+
+
 // 分页获取流程流程
 export function getFlowById(params) {
   return request({

+ 8 - 1
src/api/process/processDetail.ts

@@ -33,7 +33,14 @@ export function getProcessNode(id) {
         method: 'get'
     })
 }
-
+// 获取流程节点数据,台账专用
+export function getProcessNodeByIdAndAuth(params) {
+    return request({
+        url: `/tofly-flow/tfprocessl/getByIdAndAuth`,
+        params,
+        method: 'get'
+    })
+}
 // 获取材料信息信息
 export function getMaterial(params) {
     return request({

+ 8 - 2
src/views/zhpt/projectAccount/index.vue

@@ -41,7 +41,7 @@
 import tableCom from '@/components/projectCom/table/index.vue'
 import commonFlow from '@/utils/commonFlow.js'
 import inputCom from '@/components/projectCom/input/index.vue'
-import { getProcessList, getProcessNode, getProcessList2 } from '@/api/process/processDetail.ts'
+import { getProcessList, getProcessNode, getProcessNodeByIdAndAuth,getProcessList2 } from '@/api/process/processDetail.ts'
 import TfMap from '@/views/zhpt/common/tfMap.vue'
 import commonSend from '@/utils/commonSend.js'
 import mainFlow from '@/components/projectCom/flowMap/mainFlow.vue'
@@ -412,7 +412,13 @@ export default {
       this.title = '详情 (工单id:' + processId + ')'
       // 流程信息
       if (!configId || !edition) return this.$message.error('获取流程信息失败')
-      getProcessNode(processId).then((pres) => {
+      debugger
+      // getProcessNode(processId).then((pres) => {
+    let params={
+      processId:processId,
+      postIds:this.$store.state.user.tenantId
+    };
+        getProcessNodeByIdAndAuth(params).then((pres) => {
         if (pres.code == 200) {
           // this.currentInfo = pres.data
           this.currentAllData = commonMe.notJsonCopy(pres.data)

+ 32 - 1
src/views/zhpt/projectManager/newInstall/common/mixins/page.js

@@ -3,7 +3,7 @@ import ProjectInfo from '@/views/zhpt/projectManager/newInstall/components/proje
 import QueryForm from '@/components/projectCom/searchCom/index.vue'
 import TableCom from '@/components/projectCom/table/index.vue'
 import { getProcessNode } from '@/api/process/processDetail.ts'
-import { deleteFlow, getFlowPage } from '@/api/flowInfo'
+import { deleteFlow, getFlowPage,getSingleProcessInfo } from '@/api/flowInfo'
 import Config from '@/views/imConfig'
 
 const subFlowInfo = {
@@ -76,6 +76,36 @@ export default (key = 'newInstall') => ({
         console.log(error)
         this.$message.error(error.message || '获取流程数据失败')
       }
+    },
+      /**
+       * 新安装需要加入其它数据
+      */
+    async getNewInstall(data){
+      return new Promise((reso,rej)=>{
+        if(key=="newInstall"&&data.records.length>0){
+          let processIds=data.records.map(e=>{return e.processId}).join(',');
+          getSingleProcessInfo({processIds:processIds,label: this.$route.name}).then(tres=>{
+            if(tres.code==200){
+              let tempObj={}
+              for(let i=0;i<data.records.length;i++){
+                tempObj[data.records[i].processId]=data.records[i]
+              }
+              for(let i=0;i<tres.data.length;i++){
+                const tempData=tres.data[i]
+                tempObj[tempData.processId].lastCheckTime=tempData.lastCheckTime;
+                tempObj[tempData.processId].isOverTime=tempData.isOverTime?"是":"否";
+                tempObj[tempData.processId].completeTime=tempData.completeTime;
+              }
+            }
+            reso(data)
+          }).catch(e=>{
+            reso(data);
+          })
+        }else{
+          reso(data)
+        }
+      })
+    
     },
     async tableChage(pageInfo) {
       if (!this.id) return
@@ -95,6 +125,7 @@ export default (key = 'newInstall') => ({
     async getData(searchData) {
       try {
         const { data } = await getFlowPage(searchData)
+        await this.getNewInstall(data)
         const { records, total } = data || {}
         return { records: records || [], total: total || 0 }
       } catch (error) {

+ 34 - 2
src/views/zhpt/projectManager/newInstall/common/mixins/page2.js

@@ -3,7 +3,7 @@ import ProjectInfo from '@/views/zhpt/projectManager/newInstall/components/proje
 import QueryForm from '@/components/projectCom/searchCom/index.vue'
 import TableCom from '@/components/projectCom/table/index.vue'
 import { getProcessNode } from '@/api/process/processDetail.ts'
-import { deleteFlow, getFlowPage } from '@/api/flowInfo'
+import { deleteFlow, getFlowPage,getSingleProcessInfo } from '@/api/flowInfo'
 import Config from '@/views/imConfig'
 
 const subFlowInfo = {
@@ -14,6 +14,7 @@ const subFlowInfo = {
   pipeRepair: () => import('@/views/zhpt/projectManager/pipeRepair/subFlowInfo/index.vue')
 }
 
+let currentType="";
 export default (key = 'newInstall') => ({
   components: {
     ProjectInfo,
@@ -79,7 +80,7 @@ export default (key = 'newInstall') => ({
     },
     async tableChage(pageInfo) {
       if (!this.id) return
-
+      debugger
       return this.getData({
         ...pageInfo,
         dto: {
@@ -95,6 +96,7 @@ export default (key = 'newInstall') => ({
     async getData(searchData) {
       try {
         const { data } = await getFlowPage(searchData)
+        await this.getNewInstall(data)
         const { records, total } = data || {}
         return { records: records || [], total: total || 0 }
       } catch (error) {
@@ -102,6 +104,36 @@ export default (key = 'newInstall') => ({
         return new Error(error)
       }
     },
+    /**
+     * 新安装需要加入其它数据
+    */
+   async getNewInstall(data){
+     return new Promise((reso,rej)=>{
+        if(key=="newInstall"&&data.records.length>0){
+          let processIds=data.records.map(e=>{return e.processId}).join(',');
+          getSingleProcessInfo({processIds:processIds,label: this.$route.name}).then(tres=>{
+            if(tres.code==200){
+              let tempObj={}
+              for(let i=0;i<data.records.length;i++){
+                tempObj[data.records[i].processId]=data.records[i]
+              }
+              for(let i=0;i<tres.data.length;i++){
+                const tempData=tres.data[i]
+                tempObj[tempData.processId].lastCheckTime=tempData.lastCheckTime;
+                tempObj[tempData.processId].isOverTime=tempData.isOverTime?"是":"否";
+                tempObj[tempData.processId].completeTime=tempData.completeTime;
+              }
+            }
+            reso(data)
+          }).catch(e=>{
+            reso(data);
+          })
+        }else{
+          reso(data)
+        }
+      })
+    
+    },
     getTableHeight() {
       this.rowHeight = this.$refs.searchDiv.$el.clientHeight
     },

+ 8 - 5
src/views/zhpt/projectManager/newInstall/proCheck/proRematerial/index.vue

@@ -33,20 +33,23 @@ export default {
         index: true,
         fieldList: [
           { label: '工程编号', field: 'processNumber', width: '120px' },
-          { label: '工程名称', field: 'projectName', width: '150px' },
+          { label: '工程名称123', field: 'projectName', width: '150px' },
           { label: '工程地址', field: 'addre', width: '180px' },
-          { label: '工程性质', field: 'yhlx', minWidth: '100px' },
-          { label: '项目负责人', field: 'xmfzrName', minWidth: '120px' },
+          { label: '工程性质', field: 'yhlx', minWidth: '80px' },
+          { label: '项目负责人', field: 'xmfzrName', minWidth: '70px' },
           // { label: '工程性质', field: 'gcxz', width: '130px' },
           // { label: '当前节点', field: 'stepName', width: '130px' },
-          { label: '当前处理信息', field: 'dqclrName', width: '140px' },
-          { label: '超期日期', field: 'timeLimit', width: '150px', setCellClassMethod: this.setTimeLimit },
+          { label: '当前处理信息', field: 'dqclrName', width: '130px' },
+          { label: '超期日期', field: 'timeLimit', width: '100px', setCellClassMethod: this.setTimeLimit },
           {
             label: '流程状态',
             field: 'labelStateName',
             width: '100px',
             setCellClassMethod: (e) => commonFlow.getStateInfo(e.row)
           },
+          { label: '综合验收日期', field: 'lastCheckTime', width: '140px' },
+          { label: '完成时间', field: 'completeTime', width: '100px' },
+          { label: '是否超期', field: 'isOverTime', width: '100px' },
           { label: '所属公司', field: 'tenantName', minWidth: '150px' }
         ],
         actionList: [

+ 12 - 8
src/views/zhpt/projectManager/newInstall/recieveMaterial/addProject/index.vue

@@ -24,6 +24,7 @@ export default {
   components: { AddFlow },
   mixins: [PageMixin2('newInstall')],
   data() {
+    debugger
     return {
       id: 30,
       title: '工程领料',
@@ -35,21 +36,24 @@ export default {
         index: true,
         fieldList: [
           { label: '工程编号', field: 'processNumber', width: '120px' },
-          { label: '工程名称', field: 'projectName', width: '150px' },
-          { label: '工程地址', field: 'addre', width: '180px' },
-          { label: '工程性质', field: 'yhlx', minWidth: '100px' },
-          { label: '项目负责人', field: 'xmfzrName', minWidth: '120px' },
+          { label: '工程名称', field: 'projectName', width: '110px' },
+          { label: '工程地址', field: 'addre', width: '140px' },
+          { label: '工程性质', field: 'yhlx', minWidth: '80px' },
+          { label: '项目负责人', field: 'xmfzrName', minWidth: '70px' },
           // { label: '当前节点', field: 'stepName', width: '130px' },
-          { label: '当前处理信息', field: 'dqclrName', width: '140px' },
-          { label: '超期日期', field: 'timeLimit', width: '150px', setCellClassMethod: this.setTimeLimit },
+          { label: '当前处理信息', field: 'dqclrName', width: '130px' },
+          { label: '超期日期', field: 'timeLimit', width: '100px', setCellClassMethod: this.setTimeLimit },
           {
             label: '流程状态',
             field: 'labelStateName',
             width: '100px',
             setCellClassMethod: (e) => commonFlow.getStateInfo(e.row)
           },
-          { label: '所属公司', field: 'tenantName', minWidth: '150px' },
-          { label: '领料日期', field: 'dataTime', minWidth: '150px' }
+          { label: '综合验收日期', field: 'lastCheckTime', width: '140px' },
+          { label: '完成时间', field: 'completeTime', width: '100px' },
+          { label: '是否超期', field: 'isOverTime', width: '100px' },
+          { label: '所属公司', field: 'tenantName', minWidth: '100px' },
+          { label: '领料日期', field: 'dataTime', minWidth: '100px' }
         ],
         actionList: [
           {