Эх сурвалжийг харах

Merge branch 'master' of http://47.114.101.16:7070/ssy/newcpms

zhangding 3 жил өмнө
parent
commit
a8ac74f7b2

+ 23 - 7
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -23,10 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 预约开票申请Controller
@@ -57,6 +54,16 @@ public class TApproveReserveInvoiceController extends BaseController {
     public TableDataInfo list(TApproveReserveInvoice tApproveReserveInvoice) {
         startPage();
         List<TApproveReserveInvoice> list = tApproveReserveInvoiceService.selectTApproveReserveInvoiceList(tApproveReserveInvoice);
+        for (TApproveReserveInvoice tApprove : list) {
+            String[] ids;
+            ids = tApprove.getInvoiceId().split(",");
+            List<Object> devList = new ArrayList<>();
+            for (String id : ids) {
+                TInvoiceBookingworkticket book = workService.getById(id);
+                devList.add(book);
+            }
+            tApprove.setDevList(devList);
+        }
         return getDataTable(list);
     }
 
@@ -78,7 +85,16 @@ public class TApproveReserveInvoiceController extends BaseController {
     @PreAuthorize("@ss.hasPermi('invoice:invoice:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return AjaxResult.success(tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(id));
+        TApproveReserveInvoice tApprove = tApproveReserveInvoiceService.selectTApproveReserveInvoiceById(id);
+        String[] ids;
+        ids = tApprove.getInvoiceId().split(",");
+        List<Object> devList = new ArrayList<>();
+        for (String inId : ids) {
+            TInvoiceBookingworkticket book = workService.getById(inId);
+            devList.add(book);
+        }
+        tApprove.setDevList(devList);
+        return AjaxResult.success(tApprove);
     }
 
     /**
@@ -125,7 +141,7 @@ public class TApproveReserveInvoiceController extends BaseController {
     @PutMapping("/handle")
     public AjaxResult handle(@RequestBody DevTask devTask) {
         //流程审批意见
-        String symbol= "";
+        String symbol = "";
         if (devTask.getComment() != "") {
             symbol = ",";
         }
@@ -140,7 +156,7 @@ public class TApproveReserveInvoiceController extends BaseController {
             devTask.setComment("通过" + symbol + devTask.getComment());
             invoice.setStatus(2L);
             invoice.setEnddate(new Date());
-        }else if (devTask.getCondition().equals("0")) {
+        } else if (devTask.getCondition().equals("0")) {
             devTask.setComment("未通过" + symbol + devTask.getComment());
             invoice.setStatus(3L);
             invoice.setEnddate(new Date());

+ 12 - 0
master/src/main/java/com/ruoyi/project/invoice/domain/TApproveReserveInvoice.java

@@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * 预约开票申请对象 t_approve_reserve_invoice
@@ -137,6 +138,17 @@ public class TApproveReserveInvoice extends BaseEntity {
     @TableField(exist = false)
     private String isSpecial;
 
+    @TableField(exist = false)
+    private List<Object> devList;
+
+    public List<Object> getDevList() {
+        return devList;
+    }
+
+    public void setDevList(List<Object> devList) {
+        this.devList = devList;
+    }
+
     public String getIsToday() {
         return isToday;
     }

+ 54 - 54
master/src/main/resources/processes/reserveInvoice.bpmn

@@ -5,29 +5,29 @@
     <userTask id="yhzgtask" name="用户主管签字确认" activiti:assignee="#{yhzgusers}"></userTask>
     <userTask id="zzzgtask" name="装置主管签字确认" activiti:assignee="#{zzzgusers}"></userTask>
     <sequenceFlow id="flow2" sourceRef="yhzgtask" targetRef="zzzgtask"></sequenceFlow>
-    <userTask id="istodaytask" name="作业开始时间是否为预约当天"></userTask>
-    <sequenceFlow id="flow5" sourceRef="zzzgtask" targetRef="istodaytask"></sequenceFlow>
     <userTask id="zzgcstask" name="装置工程师签字确认" activiti:assignee="#{zzgcsusers}"></userTask>
-    <sequenceFlow id="flow6" name="是" sourceRef="istodaytask" targetRef="zzgcstask">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
-    </sequenceFlow>
-    <userTask id="isspecialtask" name="是否涉及特技动火、受限空间"></userTask>
-    <sequenceFlow id="flow7" name="否" sourceRef="istodaytask" targetRef="isspecialtask">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
-    </sequenceFlow>
     <userTask id="zzjltask" name="装置经理签字确认" activiti:assignee="#{zzjlusers}"></userTask>
-    <sequenceFlow id="flow8" name="是" sourceRef="isspecialtask" targetRef="zzjltask">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
-    </sequenceFlow>
     <userTask id="confirmtask" name="各班班长、开票人员确认、整合信息关联至CTS系统" activiti:assignee="#{bzusers}"></userTask>
-    <sequenceFlow id="flow9" name="否" sourceRef="isspecialtask" targetRef="confirmtask">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow10" sourceRef="zzgcstask" targetRef="isspecialtask"></sequenceFlow>
     <sequenceFlow id="flow11" sourceRef="zzjltask" targetRef="confirmtask"></sequenceFlow>
     <endEvent id="end" name="结束"></endEvent>
     <sequenceFlow id="flow12" sourceRef="confirmtask" targetRef="end"></sequenceFlow>
     <sequenceFlow id="flow13" sourceRef="start" targetRef="yhzgtask"></sequenceFlow>
+    <exclusiveGateway id="istoday" name="作业开始时间是否为预约当天"></exclusiveGateway>
+    <sequenceFlow id="flow18" sourceRef="zzzgtask" targetRef="istoday"></sequenceFlow>
+    <sequenceFlow id="flow19" name="是" sourceRef="istoday" targetRef="zzgcstask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
+    </sequenceFlow>
+    <exclusiveGateway id="isspecial" name="是否涉及特技动火、受限空间"></exclusiveGateway>
+    <sequenceFlow id="flow20" name="否" sourceRef="istoday" targetRef="isspecial">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow21" name="否" sourceRef="isspecial" targetRef="confirmtask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='否'}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow22" name="是" sourceRef="isspecial" targetRef="zzjltask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${message=='是'}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow23" sourceRef="zzgcstask" targetRef="isspecial"></sequenceFlow>
   </process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_reserveInvoice">
     <bpmndi:BPMNPlane bpmnElement="reserveInvoice" id="BPMNPlane_reserveInvoice">
@@ -40,15 +40,9 @@
       <bpmndi:BPMNShape bpmnElement="zzzgtask" id="BPMNShape_zzzgtask">
         <omgdc:Bounds height="55.0" width="145.0" x="295.0" y="180.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="istodaytask" id="BPMNShape_istodaytask">
-        <omgdc:Bounds height="71.0" width="145.0" x="295.0" y="270.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="zzgcstask" id="BPMNShape_zzgcstask">
         <omgdc:Bounds height="71.0" width="136.0" x="590.0" y="270.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="isspecialtask" id="BPMNShape_isspecialtask">
-        <omgdc:Bounds height="71.0" width="145.0" x="295.0" y="390.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
       <bpmndi:BPMNShape bpmnElement="zzjltask" id="BPMNShape_zzjltask">
         <omgdc:Bounds height="71.0" width="136.0" x="50.0" y="390.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
@@ -58,59 +52,65 @@
       <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
         <omgdc:Bounds height="35.0" width="35.0" x="350.0" y="620.0"></omgdc:Bounds>
       </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="istoday" id="BPMNShape_istoday">
+        <omgdc:Bounds height="40.0" width="40.0" x="347.0" y="285.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="isspecial" id="BPMNShape_isspecial">
+        <omgdc:Bounds height="40.0" width="40.0" x="347.0" y="405.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
         <omgdi:waypoint x="367.0" y="145.0"></omgdi:waypoint>
         <omgdi:waypoint x="367.0" y="180.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
+      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
+        <omgdi:waypoint x="118.0" y="461.0"></omgdi:waypoint>
+        <omgdi:waypoint x="118.0" y="545.0"></omgdi:waypoint>
+        <omgdi:waypoint x="295.0" y="545.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
+        <omgdi:waypoint x="367.0" y="581.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="620.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
+        <omgdi:waypoint x="367.0" y="45.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="90.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">
         <omgdi:waypoint x="367.0" y="235.0"></omgdi:waypoint>
-        <omgdi:waypoint x="367.0" y="270.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="285.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
-        <omgdi:waypoint x="440.0" y="305.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">
+        <omgdi:waypoint x="387.0" y="305.0"></omgdi:waypoint>
         <omgdi:waypoint x="590.0" y="305.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="12.0" x="440.0" y="305.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="100.0" x="387.0" y="305.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
-        <omgdi:waypoint x="367.0" y="341.0"></omgdi:waypoint>
-        <omgdi:waypoint x="367.0" y="390.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow20" id="BPMNEdge_flow20">
+        <omgdi:waypoint x="367.0" y="325.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="405.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="12.0" x="367.0" y="341.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="100.0" x="367.0" y="325.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
-        <omgdi:waypoint x="295.0" y="425.0"></omgdi:waypoint>
-        <omgdi:waypoint x="186.0" y="425.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow21" id="BPMNEdge_flow21">
+        <omgdi:waypoint x="367.0" y="445.0"></omgdi:waypoint>
+        <omgdi:waypoint x="367.0" y="510.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="12.0" x="295.0" y="425.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="100.0" x="367.0" y="445.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
-        <omgdi:waypoint x="367.0" y="461.0"></omgdi:waypoint>
-        <omgdi:waypoint x="367.0" y="510.0"></omgdi:waypoint>
+      <bpmndi:BPMNEdge bpmnElement="flow22" id="BPMNEdge_flow22">
+        <omgdi:waypoint x="347.0" y="425.0"></omgdi:waypoint>
+        <omgdi:waypoint x="186.0" y="425.0"></omgdi:waypoint>
         <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="14.0" width="12.0" x="367.0" y="461.0"></omgdc:Bounds>
+          <omgdc:Bounds height="14.0" width="100.0" x="261.0" y="432.0"></omgdc:Bounds>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
+      <bpmndi:BPMNEdge bpmnElement="flow23" id="BPMNEdge_flow23">
         <omgdi:waypoint x="658.0" y="341.0"></omgdi:waypoint>
         <omgdi:waypoint x="657.0" y="425.0"></omgdi:waypoint>
-        <omgdi:waypoint x="440.0" y="425.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
-        <omgdi:waypoint x="118.0" y="461.0"></omgdi:waypoint>
-        <omgdi:waypoint x="118.0" y="545.0"></omgdi:waypoint>
-        <omgdi:waypoint x="295.0" y="545.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
-        <omgdi:waypoint x="367.0" y="581.0"></omgdi:waypoint>
-        <omgdi:waypoint x="367.0" y="620.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
-        <omgdi:waypoint x="367.0" y="45.0"></omgdi:waypoint>
-        <omgdi:waypoint x="367.0" y="90.0"></omgdi:waypoint>
+        <omgdi:waypoint x="387.0" y="425.0"></omgdi:waypoint>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>

+ 8 - 0
ui/src/api/invoice/invoice.js

@@ -51,3 +51,11 @@ export function exportInvoice(query) {
     params: query
   })
 }
+
+export function handleApprove(data) {
+  return request({
+    url: '/approve/invoice/handle',
+    data: data,
+    method: 'put'
+  })
+}

+ 375 - 0
ui/src/views/approve/approveDetail/invoice-detail.vue

@@ -0,0 +1,375 @@
+<template>
+  <el-dialog
+    :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    :append-to-body="true">
+    <el-form :model="taskForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
+      <el-form-item :label="$t('申请开票')">
+        <el-table :data="devList" border style="width: 100%;">
+          <el-table-column label="作业单位" align="center" prop="workUnit" :formatter="workUnitFormat"/>
+          <el-table-column label="作业区域" align="center" prop="workArea" :formatter="workAreaFormat"/>
+          <el-table-column label="单元号" align="center" prop="unitNumber" :formatter="unitNumberFormat"/>
+          <el-table-column label="楼层位置" align="center" prop="floorLocation" :formatter="floorLocationFormat"/>
+          <el-table-column label=" 作业开始时间" align="center" prop="workStartTime" width="100">
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.workStartTime, '{y}-{m}-{d}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="作业结束时间" align="center" prop="workEndTime" width="100">
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.workEndTime, '{y}-{m}-{d}') }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="联系人" align="center" prop="contact" :show-overflow-tooltip="true"/>
+          <el-table-column label="联系方式" align="center" prop="phonenumber" :show-overflow-tooltip="true"/>
+          <el-table-column label="状态" align="center" prop="status" width="100" :formatter="statusFormat"/>
+        </el-table>
+      </el-form-item>
+      <el-form-item :label="$t('申请时间')" prop="creattime">
+        <el-input v-model="dataForm.creattime" disabled></el-input>
+      </el-form-item>
+    </el-form>
+    <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
+      <input name="approveId" v-model="dataForm.id"  hidden  />
+      <input name="processId" v-model="dataForm.processId"  hidden  />
+    </form>
+    <span slot="footer" class="dialog-footer">
+      <el-button v-if="this.taskForm.taskId == ''" @click="visible = false">{{$t('message.return')}}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" :disabled="submitDisabled">{{$t('通过')}}</el-button>
+      <el-button v-if="!this.taskForm.taskId == ''" type="danger" @click="dataFormSubmit(0)" :disabled="submitDisabled">{{$t('拒绝')}}</el-button>
+    </span>
+    <div>
+      <span>{{$t('流转详情')}}</span>
+      <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
+        <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>
+        <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
+        <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>
+        <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>
+        <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>
+      </el-table>
+    </div>
+    <record v-if="recordVisible" ref="recordDeal"></record>
+  </el-dialog>
+</template>
+
+<script>
+  import {getToken} from "@/utils/auth";
+  import {getHistorylist} from "@/api/ehs/approvedanger";
+  import record from "./spec-itemDetail";
+  import {getInvoice, listInvoice} from "@/api/invoice/invoice";
+
+export default {
+  name: "invoice-detail",
+  components: {record},
+  data() {
+    return {
+      loading: true,
+      // 总条数
+      total: 0,
+      approvedangerList: [],
+      // 状态字典
+      statusOptions: [],
+      // 作业单位字典
+      workUnitOptions: [],
+      // 作业区域字典
+      workAreaOptions: [],
+      // 单元号字典
+      unitNumberOptions: [],
+      // 楼层字典
+      floorLocationOptions: [],
+      // 用户单位字典
+      userUnitOptions: [],
+      // 用户主管字典
+      userMgOptions: [],
+      // 作业类型字典
+      workTypeOptions: [],
+      // 风险等级字典
+      riskLevelOptions: [],
+      // 监护人单位字典
+      guardianUnitOptions: [],
+      recordVisible: false,
+      // 遮罩层
+      historyLoading: false,
+      //显示详细列表
+      IfDataIndex: false,
+      //流转列表
+      historyList: [],
+      visible: false,
+      devList: [],
+      recordList: [],
+      dataList: [],
+      fileTips: '',
+      showDelay: false,
+      submitDisabled: false,
+      dataListLoading:true,
+      taskName: '',
+      dataForm: {
+        id: 0,
+        userId: '',
+        devId: '',
+        devType: '',
+        approveType: '',
+        content: '',
+        fileUrls: '',
+        reUrls: '',
+        status: '',
+        creattime: '',
+        plantCode: '',
+        unit: '',
+        devname: '',
+        devno: '',
+        files: [],
+        delayDate: '',
+        delayReason: '',
+        delayMeasure: '',
+        delayNotice: ''
+      },
+      taskForm: {
+        comment: '',
+        taskId: '',
+        files: '',
+        govDate: '',
+        govFileList: []
+      },
+      // 查询参数
+      queryParams: {
+        processId: null,
+      },
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
+        commonfileList: null,
+        pType: 'traning',
+        pId: null
+      },
+      dataRule: {
+        approveType: [
+          { required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur' }
+        ],
+        content: [
+          { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
+        ]
+      },
+      downloadAction: process.env.VUE_APP_BASE_API +'/sems/approve/exportPDF',
+      approveOption: [],
+      belong: '',
+      fileList: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    // 状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 字典翻译
+    workUnitFormat(row, column) {
+      return this.selectDictLabel(this.workUnitOptions, row.workUnit);
+    },
+    // 字典翻译
+    workAreaFormat(row, column) {
+      return this.selectDictLabel(this.workAreaOptions, row.workArea);
+    },
+    // 字典翻译
+    unitNumberFormat(row, column) {
+      return this.selectDictLabel(this.unitNumberOptions, row.unitNumber);
+    },
+    // 字典翻译
+    floorLocationFormat(row, column) {
+      return this.selectDictLabel(this.floorLocationOptions, row.floorLocation);
+    },
+    // 字典翻译
+    userMgFormat(row, column) {
+      return this.selectDictLabel(this.userMgOptions, row.userMg);
+    },
+    // 字典翻译
+    userUnitFormat(row, column) {
+      return this.selectDictLabel(this.userUnitOptions, row.userUnit);
+    },
+    // 字典翻译
+    workTypeFormat(row, column) {
+      return this.selectDictLabel(this.workTypeOptions, row.workType);
+    },
+    // 字典翻译
+    riskLevelFormat(row, column) {
+      return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
+    },
+    // 字典翻译
+    guardianUnitFormat(row, column) {
+      return this.selectDictLabel(this.guardianUnitOptions, row.guardianUnit);
+    },
+    init (id, taskId, processId,taskName) {
+      console.log(id)
+      console.log("idididid")
+      this.reset();
+      this.fileList = [];
+      this.getDicts("booking_work_status").then(response => {
+        this.statusOptions = response.data;
+      });
+      this.getDicts("book_work_area").then(response => {
+        this.workAreaOptions = response.data;
+      });
+      this.getDicts("book_unit_number").then(response => {
+        this.unitNumberOptions = response.data;
+      });
+      this.getDicts("book_floor_location").then(response => {
+        this.floorLocationOptions = response.data;
+      });
+      this.getDicts("book_user_mg").then(response => {
+        this.userMgOptions = response.data;
+      });
+      this.getDicts("book_user_unit").then(response => {
+        this.userUnitOptions = response.data;
+      });
+      this.getDicts("book_work_unit").then(response => {
+        this.workUnitOptions = response.data;
+      });
+      this.getDicts("book_work_type").then(response => {
+        this.workTypeOptions = response.data;
+      });
+      this.getDicts("book_risk_level").then(response => {
+        this.riskLevelOptions = response.data;
+      });
+      this.getDicts("book_guardian_unit").then(response => {
+        this.guardianUnitOptions = response.data;
+      });
+      this.dataForm.processId = processId
+      this.taskName = taskName
+      this.taskForm.taskId = taskId
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.queryParams.processId = processId;
+      getHistorylist(this.queryParams).then(response => {
+        console.log(response.rows)
+        this.historyList = response.rows;
+        this.historyLoading = false
+      });
+      getInvoice(id).then(response => {
+        console.log(response)
+        this.taskForm.businessKey = response.data.id
+        this.dataForm.userId = response.data.userId
+        this.dataForm.devId = response.data.devId
+        this.dataForm.devType = response.data.devType
+        // this.dataForm.approveType = response.data.approveType
+        this.dataForm.approveType = '维修'
+        this.dataForm.content = response.data.content
+        this.dataForm.fileUrls = response.data.fileUrls
+        this.dataForm.reUrls = response.data.reUrls
+        this.dataForm.status = response.data.status
+        this.dataForm.creattime = response.data.creattime
+        this.dataForm.plantCode = response.data.plantCode
+        this.dataForm.unit = response.data.unit
+        this.dataForm.devname = response.data.devname
+        this.dataForm.devno = response.data.devno
+        this.dataForm.files = response.data.files
+        this.devList = response.data.devList
+        this.dataForm.delayDate = response.data.delayDate
+        this.dataForm.delayReason = response.data.delayReason
+        this.dataForm.delayMeasure = response.data.delayMeasure
+        this.dataForm.delayNotice = <response className="data delayNotice"></response>
+      });
+
+    },
+    // 设备类型:字典翻译
+    devTypeFormat(row, column) {
+      // return this.selectDictLabel(this.devTypeOptions, row.devType);
+    },
+    // 审批类型字典翻译
+    approveTypeFormat(row, column) {
+      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
+    },
+
+    // 取消按钮
+    cancel() {
+      this.visible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        userId: null,
+        devId: null,
+        devType: null,
+        approveType: null,
+        content: null,
+        fileUrls: null,
+        reUrls: null,
+        status: 0,
+        creattime: null,
+        enddate: null,
+        processId: null,
+        govDate: null,
+        delayDate: null,
+        delayReason: null,
+        delayMeasure: null,
+        delayNotice: null,
+        apNo: null,
+        checkDate: null,
+        reportId: null,
+        monthId: null,
+        delFlag: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+
+    /** 提交按钮 */
+    // 表单提交
+    dataFormSubmit (val) {
+      this.submitDisabled = true
+      console.log(this.taskForm.govFileList)
+      this.dataForm.files = []
+      if (this.taskForm.govFileList.length > 0) {
+        for (let i = 0; i < this.taskForm.govFileList.length; i++) {
+          let obj = {}
+          obj.fileName = this.taskForm.govFileList[i].response.fileName
+          obj.fileUrl = this.taskForm.govFileList[i].response.url
+          this.dataForm.files.push(obj)
+        }
+      }
+      this.taskForm.condition = val
+      this.taskForm.govFiles = this.dataForm.files
+      handleApprove(this.taskForm).then(response => {
+        this.submitDisabled = false
+        this.msgSuccess(this.$t('处理成功'));
+        this.visible = false;
+        this.$emit('refreshDataList')
+      });
+      this.$nextTick(function () {
+        this.comment = ''
+      })
+    },
+    recordHandle(devList,dataForm){
+      this.recordVisible = true
+      this.$nextTick(() => {
+        this.$refs.recordDeal.init(devList,dataForm);
+      })
+    },
+}
+}
+
+
+</script>

+ 2 - 1
ui/src/views/approve/myapprove/index.vue

@@ -64,10 +64,11 @@
   import SpecMaintenance from '../approveDetail/specMaintenance-detail';
   import IntactDetail from '../approveDetail/intact-detail';
   import KekaoDetail from "@/views/approve/approveDetail/kekao-detail";
+  import InvoiceDetail from "@/views/approve/approveDetail/invoice-detail";
 
   export default {
     name: "Myapprove",
-    components: { Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail},
+    components: { Treeselect,ProcessImg,AddOrUpdate,SpecModify,SpecTrainingPlan,SpecMaintenance,IntactDetail,KekaoDetail,InvoiceDetail},
     data() {
       return {
         // 遮罩层