Jelajahi Sumber

危害、动火开票

jiangbiao 2 tahun lalu
induk
melakukan
0ce9b46f6f

+ 34 - 2
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -111,6 +111,37 @@ public class TApproveReserveInvoiceController extends BaseController {
         return AjaxResult.success(tApprove);
     }
 
+    @GetMapping(value = "/infoByInvoiceId/{invoiceId}")
+    public AjaxResult getInfoByInvoiceId(@PathVariable("invoiceId") Long invoiceId) {
+        TApproveReserveInvoice tApprove = tApproveReserveInvoiceService.selectTApproveReserveInvoiceByInvoiceId(invoiceId);
+        // 申请人
+        SysUser sqr = iSysUserService.selectUserById(tApprove.getUserId());
+        if (sqr != null) {
+            tApprove.setUser(sqr);
+        }
+        // 用户主管
+        SysUser yhzg = iSysUserService.selectUserById(tApprove.getUserSupId());
+        if (yhzg != null) {
+            tApprove.setUserSup(yhzg);
+        }
+        // 装置主管
+        SysUser zzzg = iSysUserService.selectUserById(tApprove.getDevSupId());
+        if (zzzg != null) {
+            tApprove.setDevSup(zzzg);
+        }
+        // 装置工程师
+        SysUser zzgcs = iSysUserService.selectUserById(tApprove.getDevEngineerId());
+        if (zzgcs != null) {
+            tApprove.setDevEngineer(zzgcs);
+        }
+        // 装置经理
+        SysUser zzjl = iSysUserService.selectUserById(tApprove.getManagerconId());
+        if (zzjl != null) {
+            tApprove.setManagercon(zzjl);
+        }
+        return AjaxResult.success(tApprove);
+    }
+
     /**
      * 新增预约开票申请
      */
@@ -226,9 +257,10 @@ public class TApproveReserveInvoiceController extends BaseController {
         }
         if (DateUtils.dateTime(invoiceBook.getCreatedate()).equals(DateUtils.dateTime(invoiceBook.getWorkStartTime()))) {
             param.put("istoday", "1");
-            out:for (TInvoiceWorkcontent workcontent : workcontents) {
+            out:
+            for (TInvoiceWorkcontent workcontent : workcontents) {
                 for (String workType : workcontent.getWorkType().split(",")) {
-                    if (workType.equals("1")||workType.equals("15")) {
+                    if (workType.equals("1") || workType.equals("15")) {
                         param.put("isspecial", "1");
                         break out;
                     } else {

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

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;
+import com.ruoyi.project.system.domain.SysUser;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -29,24 +30,29 @@ public class TApproveReserveInvoice extends BaseEntity {
      */
     @Excel(name = "申请人id")
     private Long userId;
+    private SysUser user;
 
     /**
      * 装置经理
      */
     @Excel(name = "装置经理")
     private Long managerconId;
+    private SysUser managercon;
+
 
     /**
      * 用户主管
      */
     @Excel(name = "用户主管")
     private Long userSupId;
+    private SysUser userSup;
 
     /**
      * 装置工程师
      */
     @Excel(name = "装置工程师")
     private Long devEngineerId;
+    private SysUser devEngineer;
 
     /**
      * 班长
@@ -126,6 +132,7 @@ public class TApproveReserveInvoice extends BaseEntity {
      */
     @Excel(name = "装置主管")
     private Long devSupId;
+    private SysUser devSup;
 
     /**
      * 装置主管
@@ -145,6 +152,46 @@ public class TApproveReserveInvoice extends BaseEntity {
         return devList;
     }
 
+    public SysUser getUser() {
+        return user;
+    }
+
+    public void setUser(SysUser user) {
+        this.user = user;
+    }
+
+    public SysUser getManagercon() {
+        return managercon;
+    }
+
+    public void setManagercon(SysUser managercon) {
+        this.managercon = managercon;
+    }
+
+    public SysUser getUserSup() {
+        return userSup;
+    }
+
+    public void setUserSup(SysUser userSup) {
+        this.userSup = userSup;
+    }
+
+    public SysUser getDevEngineer() {
+        return devEngineer;
+    }
+
+    public void setDevEngineer(SysUser devEngineer) {
+        this.devEngineer = devEngineer;
+    }
+
+    public SysUser getDevSup() {
+        return devSup;
+    }
+
+    public void setDevSup(SysUser devSup) {
+        this.devSup = devSup;
+    }
+
     public void setDevList(List<Object> devList) {
         this.devList = devList;
     }

+ 1 - 0
master/src/main/java/com/ruoyi/project/invoice/mapper/TApproveReserveInvoiceMapper.java

@@ -21,6 +21,7 @@ public interface TApproveReserveInvoiceMapper extends BaseMapper<TApproveReserve
      * @return 预约开票申请
      */
     public TApproveReserveInvoice selectTApproveReserveInvoiceById(Long id);
+    public TApproveReserveInvoice selectTApproveReserveInvoiceByInvoiceId(Long id);
 
     /**
      * 查询预约开票申请列表

+ 1 - 0
master/src/main/java/com/ruoyi/project/invoice/service/ITApproveReserveInvoiceService.java

@@ -19,6 +19,7 @@ public interface ITApproveReserveInvoiceService
      * @return 预约开票申请
      */
     public TApproveReserveInvoice selectTApproveReserveInvoiceById(Long id);
+    public TApproveReserveInvoice selectTApproveReserveInvoiceByInvoiceId(Long id);
 
     /**
      * 查询预约开票申请列表

+ 6 - 0
master/src/main/java/com/ruoyi/project/invoice/service/impl/TApproveReserveInvoiceServiceImpl.java

@@ -32,6 +32,12 @@ public class TApproveReserveInvoiceServiceImpl implements ITApproveReserveInvoic
         return tApproveReserveInvoiceMapper.selectTApproveReserveInvoiceById(id);
     }
 
+    @Override
+    public TApproveReserveInvoice selectTApproveReserveInvoiceByInvoiceId(Long id)
+    {
+        return tApproveReserveInvoiceMapper.selectTApproveReserveInvoiceByInvoiceId(id);
+    }
+
     /**
      * 查询预约开票申请列表
      *

+ 17 - 1
master/src/main/java/com/ruoyi/project/ticket/controller/TFireWorkPermitController.java

@@ -1,9 +1,19 @@
 package com.ruoyi.project.ticket.controller;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
+import com.deepoove.poi.data.TextRenderData;
+import com.deepoove.poi.data.Texts;
+import com.deepoove.poi.data.style.Style;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.project.common.controller.WordController;
+import com.ruoyi.project.configuration.domain.TMatter;
+import com.ruoyi.project.configuration.mapper.TMatterMapper;
 import com.ruoyi.project.ticket.domain.PermitRelation;
+import com.ruoyi.project.ticket.domain.THazardWorkPermit;
 import com.ruoyi.project.ticket.domain.TTicketId;
 import com.ruoyi.project.ticket.service.ITPermitRelationService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -25,6 +35,8 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 
+import javax.annotation.Resource;
+
 /**
  * 【请填写功能名称】Controller
  *
@@ -43,6 +55,8 @@ public class TFireWorkPermitController extends BaseController
     private ITPermitRelationService itPermitRelationService;
     @Autowired
     private TTicketIdController tTicketIdController;
+    @Resource
+    private TMatterMapper tMatterMapper;
     /**
      * 查询【动火作业票】列表
      */
@@ -90,6 +104,7 @@ public class TFireWorkPermitController extends BaseController
         tTicketId.setId(1l);
         Long ticketId =  tTicketIdController.createId(tTicketId);
         logger.info("ticketId:" + ticketId);
+        tFireWorkPermit.sethId(ticketId);
         tFireWorkPermitService.insertTFireWorkPermit(tFireWorkPermit);
         //保存危害工作许可证关联数据
         PermitRelation permitRelation = new PermitRelation();
@@ -97,7 +112,7 @@ public class TFireWorkPermitController extends BaseController
         permitRelation.setPermitType("H");
         permitRelation.setPermitStatus(1L);
         this.itPermitRelationService.add(permitRelation);
-        return AjaxResult.success(permitRelation.getaId());
+        return AjaxResult.success(ticketId);
     }
 
     /**
@@ -121,4 +136,5 @@ public class TFireWorkPermitController extends BaseController
     {
         return toAjax(tFireWorkPermitService.deleteTFireWorkPermitByIds(hIds));
     }
+
 }

+ 4 - 0
master/src/main/resources/mybatis/invoice/TApproveReserveInvoiceMapper.xml

@@ -62,6 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTApproveReserveInvoiceVo"/>
         where id = #{id}
     </select>
+    <select id="selectTApproveReserveInvoiceByInvoiceId" parameterType="Long" resultMap="TApproveReserveInvoiceResult">
+        <include refid="selectTApproveReserveInvoiceVo"/>
+        where invoice_id = #{id}
+    </select>
 
     <select id="selectTApproveReserveInvoiceByinvoiceId" parameterType="String" resultMap="TApproveReserveInvoiceResult">
         <include refid="selectTApproveReserveInvoiceVo"/>

+ 1 - 1
master/src/main/resources/mybatis/ticket/TFireWorkPermitMapper.xml

@@ -676,8 +676,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="aSafeLiaisonSign != null">#{aSafeLiaisonSign},</if>
             <if test="aSafeLiaisonTel != null">#{aSafeLiaisonTel},</if>
             <if test="aSafeLiaisonOffice != null">#{aSafeLiaisonOffice},</if>
-            <if test="bDeviceName != null">#{bDeviceName},</if>
             <if test="bAreaNo != null">#{bAreaNo},</if>
+            <if test="bDeviceName != null">#{bDeviceName},</if>
             <if test="bWorkContent != null">#{bWorkContent},</if>
             <if test="bValidityStartTime != null">#{bValidityStartTime},</if>
             <if test="bValidityEndTime != null">#{bValidityEndTime},</if>

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

@@ -16,6 +16,13 @@ export function getInvoice(id) {
     method: 'get'
   })
 }
+// 查询预约开票申请详细
+export function getInfoByInvoiceId(invoiceId) {
+  return request({
+    url: '/approve/invoice/infoByInvoiceId/' + invoiceId,
+    method: 'get'
+  })
+}
 
 // 新增预约开票申请
 export function addInvoice(data) {

+ 8 - 0
ui/src/api/invoicing/firework.js

@@ -2,6 +2,14 @@ import request from '@/utils/request'
 import {praseStrEmpty} from "@/utils/ruoyi";
 
 
+export function addFireTicket(data) {
+  return request({
+    url: '/ticket/firework',
+    method: 'post',
+    data: data
+  })
+}
+
 // 修改票据
 export function updateFireTicket(data) {
   return request({

+ 42 - 2
ui/src/views/ehs/jobticket/index.vue

@@ -241,9 +241,29 @@
       <u-table-column :label="$t('延期许可证号')" align="center" sortable="custom" prop="yqxkzh" width="120"
                        :show-overflow-tooltip="true"/>
       <u-table-column :label="$t('危害工作许可证号')" align="center" sortable="custom" prop="whgzxkzh" width="120"
-                       :show-overflow-tooltip="true"/>
+                       :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.whgzxkzh"
+            size="mini"
+            type="text"
+            @click="updateWhTicket(scope.row.whgzxkzh)"
+          >{{ scope.row.whgzxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
       <u-table-column :label="$t('动火作业许可证号')" align="center" sortable="custom" prop="dhzyxkzh" width="120"
-                       :show-overflow-tooltip="true"/>
+                       :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.dhzyxkzh"
+            size="mini"
+            type="text"
+            @click="updateDhTicket(scope.row.dhzyxkzh)"
+          >{{ scope.row.dhzyxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
       <u-table-column :label="$t('火票级别')" align="center" sortable="custom" prop="hpjb" :formatter="hpjbFormat"/>
       <u-table-column :label="$t('限制空间许可证号')" align="center" sortable="custom" prop="xzkjxkzh" width="120"
                        :show-overflow-tooltip="true"/>
@@ -935,6 +955,26 @@ export default {
     });
   },
   methods: {
+    updateWhTicket(aId) {
+      if (aId != null) {
+        this.$router.push({
+          path: '/ticket/hazardwork',
+          query: {
+            aId: aId
+          }
+        });
+      }
+    },
+    updateDhTicket(hId) {
+      if (hId != null) {
+        this.$router.push({
+          path: '/ticket/firework',
+          query: {
+            hId: hId
+          }
+        });
+      }
+    },
     //当前时间
     getNowFormatDate() {
       var date = new Date();

+ 192 - 40
ui/src/views/invoice/bookingworkticket/index.vue

@@ -11,7 +11,8 @@
         />
       </el-form-item>
       <el-form-item label="作业区域" prop="workArea">
-        <el-select v-model="queryParams.workArea" placeholder="请选择作业区域" clearable size="small" @change="handleQuery" filterable>
+        <el-select v-model="queryParams.workArea" placeholder="请选择作业区域" clearable size="small"
+                   @change="handleQuery" filterable>
           <el-option
             v-for="dict in workAreaOptions"
             :key="dict.id"
@@ -51,7 +52,8 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item label="作业类型" prop="workType">
-        <el-select v-model="queryParams.workType" placeholder="请选择作业类型" clearable size="small" @change="handleQuery" filterable>
+        <el-select v-model="queryParams.workType" placeholder="请选择作业类型" clearable size="small"
+                   @change="handleQuery" filterable>
           <el-option
             v-for="dict in workTypeOptions"
             :key="dict.dictValue"
@@ -158,7 +160,7 @@
              :span-method="mergeMethod" @selection-change="handleSelectionChange" :height="clientHeight" border
              use-virtual :row-key="row => { return row.id }"
              showBodyOverflow="title"
-             :data-changes-scroll-top =false
+             :data-changes-scroll-top=false
     >
       <u-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
       <u-table-column label="作业单位" align="center" prop="bookingworkticket.workUnit" width="80"
@@ -180,11 +182,15 @@
           <el-tag v-else-if="scope.row.xpxp == 12" size="small" type="info">续票</el-tag>
         </template>
       </u-table-column>
-      <u-table-column label="作业类型" align="center" prop="workType" width="120" :show-overflow-tooltip="true" :formatter="workTypeFormat"/>
+      <u-table-column label="作业类型" align="center" prop="workType" width="120" :show-overflow-tooltip="true"
+                      :formatter="workTypeFormat"/>
 
-      <u-table-column label="作业内容描述" align="center" prop="workDescription" width="160" :show-overflow-tooltip="true"/>
-      <u-table-column label="作业人员数" align="center" prop="workPeopleNumber" width="70" :show-overflow-tooltip="true"/>
-      <u-table-column label="预计作业时间" align="center" prop="estimateWorktime" width="70" :show-overflow-tooltip="true"/>
+      <u-table-column label="作业内容描述" align="center" prop="workDescription" width="160"
+                      :show-overflow-tooltip="true"/>
+      <u-table-column label="作业人员数" align="center" prop="workPeopleNumber" width="70"
+                      :show-overflow-tooltip="true"/>
+      <u-table-column label="预计作业时间" align="center" prop="estimateWorktime" width="70"
+                      :show-overflow-tooltip="true"/>
       <u-table-column label="联系人" align="center" prop="bookingworkticket.contact" width="80"
                       :show-overflow-tooltip="true"/>
       <u-table-column label="联系方式" align="center" prop="bookingworkticket.phonenumber" width="100"
@@ -194,7 +200,7 @@
           <span>{{ parseTime(scope.row.bookingworkticket.createdate, '{y}-{m}-{d}') }}</span>
         </template>
       </u-table-column>
-      <u-table-column label="预约状态" align="center" prop="bookingworkticket.status" :formatter="statusFormat" />
+      <u-table-column label="预约状态" align="center" prop="bookingworkticket.status" :formatter="statusFormat"/>
       <u-table-column label="票号" align="center" width="40" prop="reservationNumber">
         <template slot-scope="scope">
           <span>  {{ scope.row.reservationNumber }}</span>
@@ -208,25 +214,115 @@
           ></el-button>
         </template>
       </u-table-column>
-      <u-table-column label="危害工作许可证号" align="center" prop="whgzxkzh" width="100" :show-overflow-tooltip="true"/>
-      <u-table-column label="动火作业许可证号" align="center" prop="dhzyxkzh" width="100" :show-overflow-tooltip="true"/>
+      <u-table-column label="危害工作许可证号" align="center" prop="whgzxkzh" width="100" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.bookingworkticket.status== 3&&!scope.row.whgzxkzh&&itemInStr(scope.row.workType,[16,17,18,19,10])"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="takeWhTicket(scope.row)"
+          >开票
+          </el-button>
+          <el-button
+            v-else-if="scope.row.bookingworkticket.status== 3&&itemInStr(scope.row.workType,[16,17,18,19,10])"
+            size="mini"
+            type="text"
+            @click="updateWhTicket(scope.row.whgzxkzh)"
+          >{{ scope.row.whgzxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
+      <u-table-column label="动火作业许可证号" align="center" prop="dhzyxkzh" width="100"
+                      :show-overflow-tooltip="true">
+      <template slot-scope="scope">
+        <el-button
+          v-if="scope.row.bookingworkticket.status== 3&&!scope.row.dhzyxkzh&&itemInStr(scope.row.workType,[1,2,3])"
+          size="mini"
+          type="text"
+          icon="el-icon-edit"
+          @click="takeDhTicket(scope.row)"
+        >开票
+        </el-button>
+        <el-button
+          v-else-if="scope.row.bookingworkticket.status== 3&&itemInStr(scope.row.workType,[1,2,3])"
+          size="mini"
+          type="text"
+          @click="updateDhTicket(scope.row.dhzyxkzh)"
+        >{{ scope.row.dhzyxkzh }}
+        </el-button>
+      </template>
+      </u-table-column>
       <u-table-column label="火票级别" align="center" prop="hpjb" width="50" :formatter="hpjbFormat"/>
-      <u-table-column label="限制空间许可证号" align="center" prop="xzkjxkzh" width="100" :show-overflow-tooltip="true"/>
-      <u-table-column label="盲板作业许可证号" align="center" prop="mbzyxkzh" width="100" :show-overflow-tooltip="true"/>
-      <u-table-column label="高处作业许可证号" align="center" prop="gczyxkzh" width="100" :show-overflow-tooltip="true"/>
+      <u-table-column label="限制空间许可证号" align="center" prop="xzkjxkzh" width="100"
+                      :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.bookingworkticket.status== 3&&!scope.row.xzkjxkzh&&itemInStr(scope.row.workType,[15])"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click=""
+          >开票
+          </el-button>
+          <el-button
+            v-else-if="scope.row.bookingworkticket.status== 3&&itemInStr(scope.row.workType,[15])"
+            size="mini"
+            type="text"
+            @click=""
+          >{{ scope.row.xzkjxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
+      <u-table-column label="盲板作业许可证号" align="center" prop="mbzyxkzh" width="100"
+                      :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.bookingworkticket.status== 3&&!scope.row.mbzyxkzh&&itemInStr(scope.row.workType,[11])"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click=""
+          >开票
+          </el-button>
+          <el-button
+            v-else-if="scope.row.bookingworkticket.status== 3&&itemInStr(scope.row.workType,[11])"
+            size="mini"
+            type="text"
+            @click=""
+          >{{ scope.row.mbzyxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
+      <u-table-column label="高处作业许可证号" align="center" prop="gczyxkzh" width="100"
+                      :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.bookingworkticket.status== 3&&!scope.row.gczyxkzh&&itemInStr(scope.row.workType,[5,6,7,8])"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click=""
+          >开票
+          </el-button>
+          <el-button
+            v-else-if="scope.row.bookingworkticket.status== 3&&itemInStr(scope.row.workType,[5,6,7,8])"
+            size="mini"
+            type="text"
+            @click=""
+          >{{ scope.row.gczyxkzh }}
+          </el-button>
+        </template>
+      </u-table-column>
       <u-table-column label="高处作业级别" align="center" prop="gczyjb" width="50" :formatter="gczyjbFormat"/>
       <u-table-column label="延期许可证号" align="center" prop="yqxkzh" width="100" :show-overflow-tooltip="true"/>
       <u-table-column label="票盒" align="center" prop="tag" width="60" :show-overflow-tooltip="true"/>
       <u-table-column label="开票" align="center" fixed="right" width="90">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.addStatus == 1" size="small" type="success">已开票</el-tag>
-          <el-button
-            v-else-if="scope.row.bookingworkticket.status== 3"
-            size="mini"
-            type="text"
-            @click="tickedStatis(scope.row)"
-          > <span>开票</span>
-          </el-button>
+
+          <el-tag v-else-if="scope.row.bookingworkticket.status== 3" size="small" type="info">未开票</el-tag>
+
         </template>
 
       </u-table-column>
@@ -237,7 +333,7 @@
             size="mini"
             type="text"
             @click="handleXp(scope.row)"
-          > <span>续票预约</span>
+          ><span>续票预约</span>
           </el-button>
         </template>
       </u-table-column>
@@ -262,8 +358,11 @@
 
         <!--        </template>-->
         <template slot-scope="scope">
-          <el-button @click="handleCancel(scope.row)" v-if="scope.row.bookingworkticket.status== 3" type="text" size="small" style="margin-right: 6px">作废</el-button>
-          <el-dropdown v-if="scope.row.bookingworkticket.status== 3 && scope.row.xpxp == 10" size="mini" @command="(command) => handleCommand(command, scope.row)">
+          <el-button @click="handleCancel(scope.row)" v-if="scope.row.bookingworkticket.status== 3" type="text"
+                     size="small" style="margin-right: 6px">作废
+          </el-button>
+          <el-dropdown v-if="scope.row.bookingworkticket.status== 3 && scope.row.xpxp == 10" size="mini"
+                       @command="(command) => handleCommand(command, scope.row)">
       <span class="el-dropdown-link">
         <el-button
           type="text"
@@ -272,7 +371,7 @@
       </span>
             <el-dropdown-menu slot="dropdown">
               <el-dropdown-item command="billSee">票据预览</el-dropdown-item>
-              <el-dropdown-item  command="handleDownload" >下载申请单</el-dropdown-item>
+              <el-dropdown-item command="handleDownload">下载申请单</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -289,7 +388,8 @@
     />
 
     <!-- 添加或修改预约作业票台账对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="1200px" append-to-bod :before-close="cancel">
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="1200px" append-to-bod
+               :before-close="cancel">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="8">
@@ -391,10 +491,12 @@
               </el-form-item>
             </el-col>
             <el-col :span="3">
-              <el-button type="success" plain @click.prevent="addDomain(ruleForm)" style="float: right;">拷贝</el-button>
+              <el-button type="success" plain @click.prevent="addDomain(ruleForm)" style="float: right;">拷贝
+              </el-button>
             </el-col>
             <el-col :span="3">
-              <el-button type="info" plain @click.prevent="removeDomain(ruleForm)" style="float: right;">删除</el-button>
+              <el-button type="info" plain @click.prevent="removeDomain(ruleForm)" style="float: right;">删除
+              </el-button>
             </el-col>
           </el-row>
           <el-row>
@@ -413,12 +515,13 @@
 
             <el-col :span="6">
               <el-form-item label="作业人数" prop="workPeopleNumber">
-                <el-input-number v-model="ruleForm.workPeopleNumber" :min="1" :max="999" ></el-input-number>
+                <el-input-number v-model="ruleForm.workPeopleNumber" :min="1" :max="999"></el-input-number>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="预计作业时间" prop="estimateWorktime">
-                <el-input-number v-model="ruleForm.estimateWorktime" :min="1" :max="999" ></el-input-number>H
+                <el-input-number v-model="ruleForm.estimateWorktime" :min="1" :max="999"></el-input-number>
+                H
               </el-form-item>
             </el-col>
           </el-row>
@@ -433,7 +536,8 @@
       </div>
     </el-dialog>
     <!-- 报告附件对话框 -->
-    <el-dialog :close-on-click-modal="false" v-loading="loadingFlash" element-loading-background="rgba(0,0,0,0.2)" v-dialogDrag :title="pdf.title"
+    <el-dialog :close-on-click-modal="false" v-loading="loadingFlash" element-loading-background="rgba(0,0,0,0.2)"
+               v-dialogDrag :title="pdf.title"
                :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body>
       <div style="margin-top: -60px;float: right;margin-right: 40px;">
         <el-button size="mini" type="text" @click="openPdf">新页面预览</el-button>
@@ -580,7 +684,7 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import AddApprove from "../approveinvoice/index"
-import {addInvoice} from "@/api/invoice/invoice";
+import {addInvoice, getInfoByInvoiceId, getInvoice} from "@/api/invoice/invoice";
 import base from "@/assets/js/base";
 
 export default {
@@ -760,10 +864,10 @@ export default {
       },
       licenseRules: {
         hpjb: [
-          { validator: checkHpjb, trigger: 'blur' }
+          {validator: checkHpjb, trigger: 'blur'}
         ],
         gczyjb: [
-          { validator: checkGczyjb, trigger: 'blur' }
+          {validator: checkGczyjb, trigger: 'blur'}
         ],
         tag: [
           {required: true, message: "票盒不能为空", trigger: "blur"}
@@ -818,6 +922,54 @@ export default {
 
   },
   methods: {
+    itemInStr(str,arr){
+      for (let i = 0; i < arr.length; i++) {
+        if(str.indexOf(arr[i].toString())>-1){
+          return true;
+        }
+      }
+      return false;
+    },
+    updateWhTicket(aId) {
+      if (aId != null) {
+        this.$router.push({
+          path: '/ticket/hazardwork',
+          query: {
+            aId: aId
+          }
+        });
+      }
+    },
+    takeWhTicket(row) {
+      console.log('1111---', row)
+      let routeData = this.$router.resolve({
+        path: "/hazard",
+        query: {
+          data: JSON.stringify(row),
+        }
+      });
+      window.open(routeData.href, '_blank');
+    },
+    updateDhTicket(hId) {
+      if (hId != null) {
+        this.$router.push({
+          path: '/ticket/firework',
+          query: {
+            hId: hId
+          }
+        });
+      }
+    },
+    takeDhTicket(row) {
+      console.log('1111---', row)
+      let routeData = this.$router.resolve({
+        path: "/firework",
+        query: {
+          data: JSON.stringify(row),
+        }
+      });
+      window.open(routeData.href, '_blank');
+    },
     // 自定义校验重复数据规则
     checkSame(rule, value, callback) {
       // rule 对应使用bargainMoney自定义验证的 对象
@@ -850,8 +1002,8 @@ export default {
       var rows = this.dataListSelections.map(item => {
         return item
       })
-      let putData = row? [row] : rows
-      for (let i = 0; i <putData.length ; i++) {
+      let putData = row ? [row] : rows
+      for (let i = 0; i < putData.length; i++) {
         if (putData[i].bookingworkticket.status != 3) {
           this.$alert(this.$t('只能提交状态为已完成的预约票'), this.$t('提示'), {
             type: 'warning'
@@ -1016,7 +1168,7 @@ export default {
       let oldParams = JSON.stringify(this.queryParams)
       listBookingworkticket(this.queryParams).then(response => {
         //解决防止出现结果和搜索不一致的问题
-        if (oldParams != JSON.stringify(this.queryParams)){
+        if (oldParams != JSON.stringify(this.queryParams)) {
           this.loading = false;
           return
         }
@@ -1108,7 +1260,7 @@ export default {
         userUnit: null
       };
       this.resetForm("form");
-      this.userMgOptions=[];
+      this.userMgOptions = [];
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -1347,7 +1499,7 @@ export default {
     // 预约续票
     handleXp(row) {
       this.xpForm = base.deepClone(row)
-      if(!this.xpForm.yqxkzh) {
+      if (!this.xpForm.yqxkzh) {
         this.xpForm.yqxkzh = 'V'
       }
       this.xpVisible = true
@@ -1534,10 +1686,10 @@ export default {
       }
 
     },
-    handleCommand(command,row) {
+    handleCommand(command, row) {
       if (command == 'billSee') {
         this.billSee(row)
-      }else if (command == 'handleDownload') {
+      } else if (command == 'handleDownload') {
         this.handleDownload(row)
       }
     },

File diff ditekan karena terlalu besar
+ 306 - 441
ui/src/views/invoicing/firework/index.vue


File diff ditekan karena terlalu besar
+ 2005 - 1931
ui/src/views/invoicing/hazardwork/index.vue


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini