Ver Fonte

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 há 2 anos atrás
pai
commit
1f5b9220ad

+ 13 - 1
src/api/repair/application-form.js

@@ -193,7 +193,19 @@ export function finish (parameter) {
     data: parameter
   })
 }
-
+/**
+ * finish func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function changeFieldTemplateData (parameter) {
+  return axios({
+    url: '/customize/fieldTemplateData/ticket/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
 /**
  * examine func 提交审核
  * parameter: { }

+ 3 - 1
src/router/generator-platform-routers.js

@@ -372,7 +372,9 @@ const constantRouterComponents = {
   'Hotspot': () => import('@/views/qykh/hotspot/Hotspot'),
   'HotspotHelp': () => import('@/views/qykh/hotspot-help/HotspotHelp'),
   'Information': () => import('@/views/qykh/information/Information'),
-  'InformationHelp': () => import('@/views/qykh/information-help/InformationHelp')
+  'InformationHelp': () => import('@/views/qykh/information-help/InformationHelp'),
+  // 日历
+  'Calendar': () => import('@/views/calendar/Calendar')
 }
 
 // 前端未找到页面路由(固定不用改)

+ 44 - 0
src/views/calendar/Calendar.vue

@@ -0,0 +1,44 @@
+<template>
+  <a-card :bordered="false">
+    <a-calendar @select="handleSelect">
+      <div v-if="date.includes(BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN))" slot="dateCellRender" slot-scope="value" class="events">
+        休
+      </div>
+      <div v-else slot="dateCellRender">班</div>
+    </a-calendar>
+  </a-card>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      date: []
+    }
+  },
+  methods: {
+    handleSelect (value) {
+      const info = this.BaseTool.Date.formatter(value, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (this.date.includes(info)) {
+        this.date = this.date.filter(item => item !== info)
+      } else {
+        this.date.push(info)
+      }
+    }
+  }
+}
+</script>
+<style scoped>
+.events {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+  color: red;
+}
+.events .ant-badge-status {
+  overflow: hidden;
+  white-space: nowrap;
+  width: 100%;
+  text-overflow: ellipsis;
+  font-size: 12px;
+}
+</style>

+ 1 - 0
src/views/repair/application-form/RepairForm.vue

@@ -463,6 +463,7 @@ export default {
       params.applyTime = record.applyTime
       params.userId = record.userId
       params.no = record.no
+      params.category = record.category
       receiveRepair(params).then(() => {
         this.$message.info('接单成功')
         this.handleOk()

+ 2 - 1
src/views/repair/application-form/modules/DetailRepair.vue

@@ -948,7 +948,7 @@ export default {
       this.visible = false
       fetchRepairTicketRecord({ id: this.model.id }).then(res => {
         const modal = this.$refs.ticketForm
-        modal.base(res.data)
+        modal.base(res.data, this.model.id)
       })
     },
     handleVerifyRecord (record) {
@@ -1015,6 +1015,7 @@ export default {
       params.applyTime = this.model.applyTime
       params.userId = this.model.userId
       params.no = this.model.no
+      params.category = this.model.category
       receiveRepair(params).then(() => {
         this.$message.info('接单成功')
         this.handleOk()

+ 82 - 22
src/views/repair/application-form/modules/TicketForm.vue

@@ -3,6 +3,7 @@
     <div>
       <a-button type="primary" v-print="'#print-container2'" :disabled="disabled">打印</a-button>
       <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+      <a-button style="margin-left: 8px" @click="save">保存</a-button>
     </div>
     <div id="print-container2">
       <div class="title">
@@ -87,7 +88,7 @@
           </tr>
           <tr>
             <td colspan="3">生产装置</td>
-            <td colspan="12"></td>
+            <td colspan="12">{{ this.model.sbPositionName }}</td>
             <td colspan="3">委托时间</td>
             <td colspan="12"> {{ this.model.callTime }}</td>
           </tr>
@@ -255,18 +256,31 @@
                   <span style="position:relative"><a-icon class="checks" v-show="value8.includes(3)" type="check" />设备已经停电挂牌上锁</span>
                 </a-checkbox>
                 <a-checkbox :value="4" >
-                  <span style="position:relative"><a-icon class="checks" v-show="value8.includes(4)" type="check" />其他(<a-input style="width:200px" placeholder="委修人确认" />)</span>
+                  <span style="position:relative"><a-icon class="checks" v-show="value8.includes(4)" type="check" />其他
+                    <!-- (<a-input style="width:200px" placeholder="委修人确认" />) -->
+                  </span>
                 </a-checkbox >
               </a-checkbox-group>
             </td>
           </tr>
           <tr>
             <td colspan="29" >
-              <div style="display:flex;justify-content:space-around">
-                <div style="flex:1">委修人:{{ this.model.caller }}</div>
-                <div style="flex:1">委修主管:</div>
+              <div style="display:flex;justify-content:space-around;align-items: center;">
+                <div style="flex:1">委修人:{{ model.caller }}</div>
+                <div style="flex:1">委修主管: <span>
+                  {{ model.trustDeptManager }}
+                </span>
+                  <a-button v-if="(!model.trustDeptManager||model.trustDeptManager==='')" size="small" @click="handleSign('trustDeptManager')">
+                    签字
+                  </a-button>
+                </div>
                 <div style="flex:1">特殊作业监护人:<a-input style="width:150px" placeholder="属地监护 " /></div>
-                <div style="flex:1">确认完工:<a-input style="width:150px" placeholder="属地验收人" /></div>
+                <div style="flex:1">确认完工: <span>
+                  {{ model.validate }}
+                </span>
+                  <a-button v-if="(!model.validate ||model.validate ==='')" size="small" @click="handleSign('validate')">
+                    签字
+                  </a-button></div>
               </div>
             </td>
           </tr>
@@ -274,13 +288,17 @@
             <td colspan="29" >
               <div>
 
-                计划开始时间:<a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/>
+                <!--                计划开始时间:<a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/>
                 计划完工时间:
                 <a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/><br>
                 实际开始时间:
                 <a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/>
                 实际结束时间:
-                <a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/>
+                <a-date-picker style="min-width:30px;" show-time placeholder="选择时间" suffixIcon=" "/>-->
+                计划开始时间:&nbsp;&nbsp;&nbsp;&nbsp;{{ model.planStartTime }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                计划完工时间:&nbsp;&nbsp;&nbsp;&nbsp;{{ model.planEndTime }}<br>
+                实际开始时间:&nbsp;&nbsp;&nbsp;&nbsp;{{ model.repairStartTime }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                实际结束时间:&nbsp;&nbsp;&nbsp;&nbsp;{{ model.repairEndTime }}
               </div>
             </td>
           </tr>
@@ -289,7 +307,7 @@
               <div>
                 1、维修工作描述:(派工工程师填写)<br/>
                 <a-textarea
-                  v-model="value6"
+                  v-model="model.repairContent "
                   style="resize:none;border:none;width:100%;"
                   :rows="4"
                   placeholder="(1)判断故障原因或明确改造内容;
@@ -306,7 +324,7 @@
               <div>
                 2、检修结果描述:(检维修人填写)<br/>
                 <a-textarea
-                  v-model="value9"
+                  v-model="model.repairResultContent "
                   style="resize:none;border:none;width:100%;"
                   :rows="4"
                   placeholder="(1)检修前、技改施工前数据确认;
@@ -319,7 +337,7 @@
           </tr>
           <tr>
             <td colspan="29" style="line-height:37px;">
-              3、故障部位:<a-textarea style="resize:none;border:none;width:87%;" placeholder="派工工程师填写" :rows="1" v-model="value6"/>
+              3、故障部位:<a-textarea style="resize:none;border:none;width:87%;" placeholder="派工工程师填写" :rows="1" v-model="model.exceptionPart "/>
             </td>
           </tr>
           <tr>
@@ -341,7 +359,7 @@
                   <span style="position:relative"><a-icon class="checks" v-show="value10.includes(4)" type="check" />使用寿命</span>
                 </a-checkbox>
                 <a-checkbox :value="5" >
-                  <span style="position:relative"><a-icon class="checks" v-show="value10.includes(5)" type="check" />需分析(<a-input style="width:200px" placeholder="派工工程师填写" />)</span>
+                  <span style="position:relative"><a-icon class="checks" style="top:1px" v-show="value10.includes(5)" type="check" />需分析(<a-input style="width:200px" v-model="model.exceptionStr" placeholder="派工工程师填写" />)</span>
                 </a-checkbox >
               </a-checkbox-group>
             </td>
@@ -349,10 +367,15 @@
           <tr>
             <td colspan="29" >
               <div style="display:flex;justify-content:space-around">
-                <div style="flex:1">派工工程师:</div>
-                <div style="flex:1">检维修人:</div>
-                <div style="flex:1">工时统计:<a-input style="width:150px" placeholder="检维修人填写" /></div>
-                <div style="flex:1">主管确认:</div>
+                <div style="flex:1">派工工程师:{{ model.dispatcher }}</div>
+                <div style="flex:1">检维修人:{{ model.repairMan }}</div>
+                <div style="flex:1">工时统计:{{ model.repairMin }}</div>
+                <div style="flex:1">主管确认: <span>
+                  {{ model.repairManager }}
+                </span>
+                  <a-button v-if="(!model.repairManager ||model.repairManager ==='')" size="small" @click="handleSign('repairManager')">
+                    签字
+                  </a-button></div>
               </div>
             </td>
           </tr>
@@ -363,15 +386,16 @@
   </div>
 </template>
 <script>
-import { stringify } from 'qs'
+import { changeFieldTemplateData } from '@/api/repair/application-form'
 export default {
   data () {
     return {
       visible: false,
       disabled: false,
-      value1: 1,
+      value1: null,
       value2: [],
       value3: null,
+      id: '',
       value4: [],
       value5: null,
       value6: null,
@@ -392,7 +416,14 @@ export default {
         'sbPositionName': null,
         'requireHours': null,
         'repairProfessor': null,
-        'repairType': null
+        'repairType': null,
+        'trustDept': null,
+        'level': null,
+        'repairStartTime': null,
+        'repairEndTime': null,
+        'planStartTime': null,
+        'planEndTime': null,
+        'repairMin': null
       }
     }
   },
@@ -400,14 +431,43 @@ export default {
     onChange (checkedValues) {
       console.log(this.value8, this.value8.includes(1))
     },
-    base (record) {
+    handleSign (val) {
+      this.model[val] = this.$store.getters.userInfo.realName
+      console.log(this.$store.getters.userInfo.realName)
+    },
+    base (record, id) {
       this.visible = true
       this.model = record
-      this.value2 = [this.model.repairProfessor]
+      this.id = id
+      console.log(record)
+      this.value1 = this.model.trustDept
+      this.value2 = this.model.repairProfessor
+      this.value3 = this.model.level
       this.value4 = this.model.repairType
       this.value5 = this.model.content
+      this.value8 = this.model.repairUnitStatus || []
+      this.value10 = this.model.exceptions || []
+    },
+    save () {
+      const params = {
+        ...this.model,
+        trustDept: this.value1,
+        repairProfessor: this.value2,
+        level: this.value3,
+        repairType: this.value4,
+        content: this.value5,
+        repairUnitStatus: this.value8,
+        exceptions: this.value10,
+        id: this.id
+      }
+      console.log(params)
+      changeFieldTemplateData(params).then(res => {
+        console.log(res)
+        this.$message.success(res.message)
+        this.handleCancel()
+      })
     },
-    handleCancel (values) {
+    handleCancel () {
       this.visible = false
       this.$emit('ok')
     }