ly 3 年之前
父節點
當前提交
82f9d0bde7
共有 3 個文件被更改,包括 60 次插入10 次删除
  1. 5 0
      ui/src/router/index.js
  2. 27 0
      ui/src/views/invoicing/firework/index.vue
  3. 28 10
      ui/src/views/invoicing/hazardwork/index.vue

+ 5 - 0
ui/src/router/index.js

@@ -62,6 +62,11 @@ export const constantRoutes = [
     component: (resolve) => require(['@/views/invoicing/hazardwork/index'], resolve),
     hidden: true
   },
+  {
+    path: '/firework',
+    component: (resolve) => require(['@/views/invoicing/firework/index'], resolve),
+    hidden: true
+  },
   {
     path: '',
     component: Layout,

+ 27 - 0
ui/src/views/invoicing/firework/index.vue

@@ -1543,6 +1543,7 @@
 import {
   listMatters
 } from "@/api/ehs/throughcleanbcc";
+import {getInfo} from "@/api/invoicing/hazardwork";
 
 export default {
   data() {
@@ -1799,6 +1800,32 @@ export default {
   /* 页面渲染前执行的方法*/
   created() {
     this.queryMatters();
+    var id = this.$route.query.aId;
+    console.log("id=============" + id)
+    if (id != null) {
+      getInfo(id).then(response => {
+        // this.form = response.data
+          this.aEquipmentName = response.data.aEquipmentName,
+          this.aEquipmentLeader= response.data.aEquipmentLeader,
+          this.aEquipmentTel= response.data.aEquipmentTel,
+          this.aEquipmentOffice= response.data.aEquipmentOffice,
+          this.aConstructionName= response.data.aConstructionName,
+          this.aConstructionLeader= response.data.aConstructionLeader,
+          this.aConstructionTel= response.data.aConstructionTel,
+          this.aConstructionOffice= response.data.aConstructionOffice,
+          // this.aContractorName: null,
+          // this.aContractorLeader: null,
+          // this.aContractorTel: null,
+          // this.aContractorOffice: null,
+          // this.aIsNeedSafeLiaison: null,
+          // this.aSafeLiaisonName: null,
+          // this.aSafeLiaisonSign: null,
+          // this.aSafeLiaisonTel: null,
+          // this.aSafeLiaisonOffice: null,
+        this.msgSuccess(this.$t('数据加载成功'));
+      });
+      this.aIdDisabled = true;
+    }
   },
   methods: {
     /* 动态改变勾选 */

+ 28 - 10
ui/src/views/invoicing/hazardwork/index.vue

@@ -315,7 +315,9 @@
                     </td>
                     <td>火灾或爆炸性危害,参考动火许可证:
                       <el-input style="width: 140px;" v-model="form.cHId"
-                                :disabled="this.form.cIsFire==true?false:true"><i slot="prefix" class="el-input__icon el-icon-word">H</i></el-input>
+                                @click.native="aIdFireClick"  >
+<!--                                :disabled="this.form.cIsFire==true?false:true">-->
+                        <i slot="prefix" class="el-input__icon el-icon-word">H</i></el-input>
                     </td>
                   </tr>
                   <tr>
@@ -1779,7 +1781,7 @@
                   </tr>
                 </table>
               </el-collapse-item>
-              <el-collapse-item title="J1 中途的E&I功能测试      J2 中途测试后,再次停用装置设备" name="10">
+              <el-collapse-item title="J1 中途的E&I功能测试       J2 中途测试后,再次停用装置设备" name="10">
                 <table>
                   <tr>
                     <td>
@@ -2057,8 +2059,8 @@ export default {
         value: 'CTM',
         label: 'CTM'
       }, {
-        value: 'BCC',
-        label: 'BCC'
+        value: 'CBP/C',
+        label: 'CBP/C'
       }],
       aConstructions: [],
       aConstructionsQuery: {
@@ -2665,17 +2667,33 @@ export default {
 
       }
     },
+    //点击生成火票
+    aIdFireClick() {
+      let routeData = this.$router.resolve({
+        path: "/firework",
+        query:{aId: this.form.aId}
+      });
+      window.open(routeData.href, '_blank');
+      // if (this.form.aId == null) {
+      //   addTicket(this.form).then(response => {
+      //     this.form.aId = response.data;
+      //     this.msgSuccess(this.$t('生成ID成功'));
+      //   });
+      //   this.aIdDisabled = true;
+      // } else {
+      // }
+    },
     //生产装置后台数据联动
     aEquipmentChange(val) {
-      if (val == 1) {
-        this.form.aEquipmentLeader = 'xmh';
-        this.form.aEquipmentTel = '10086';
-        this.form.aEquipmentOffice = 'D700-A楼';
+      if (val == 'CBP/C') {
+        this.form.aEquipmentLeader = '张三';
+        this.form.aEquipmentTel = '6647';
+        this.form.aEquipmentOffice = 'D301';
       }
-      if (val == 2) {
+      if (val == 'CTM') {
         this.form.aEquipmentLeader = 'wj';
         this.form.aEquipmentTel = '12315';
-        this.form.aEquipmentOffice = 'D600-B楼';
+        this.form.aEquipmentOffice = 'D700-B楼';
       }
     },
     //施工单位后台数据联动