guarantee-lsq 2 年之前
父节点
当前提交
4606aae093

+ 10 - 0
src/api/upms/user.js

@@ -211,3 +211,13 @@ export function exportUser (parameter) {
     responseType: 'blob'
   })
 }
+
+export function checkBxr () {
+  return axios({
+    url: `/upms/users/check/bxr`,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

+ 4 - 0
src/store/modules/user.js

@@ -5,6 +5,7 @@ import { configData } from '@/api/upms/config'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
 import DictCache from '@/utils/dict'
 import { welcome } from '@/utils/util'
+import { checkBxr } from '@/api/upms/user'
 
 const user = {
   state: {
@@ -65,6 +66,9 @@ const user = {
               const data = response.data
               Vue.ls.set(DictCache.BASE_DATA_CACHE, data)
             })
+            checkBxr().then(res => {
+              Vue.ls.set('bxrFlag', res.data)
+            })
             resolve()
           }).catch(error => {
             reject(error)

+ 32 - 5
src/views/repair/application-form/RepairForm.vue

@@ -104,11 +104,19 @@
               :type="2"
               title="是否要接单?"
               @confirm="receiveRepair(record)">接单</operation-button>
-            <!--            <operation-button
+            <operation-button
               v-show="editFlag"
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REFUSED_REPAIR === record.status && $auth('repair-application-forms-edit')"
-              @click="handleEdit(record)" >再次报修</operation-button>
+              v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === record.status)"
+              :type="2"
+              title="是否要接受?"
+              @confirm="handleApprove">接受</operation-button>
             <operation-button
+              v-show="editFlag"
+              v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === record.status)"
+              :type="2"
+              title="是否要拒绝?"
+              @confirm="handleReturn">拒绝</operation-button>
+            <!-- <operation-button
               v-show="editFlag"
               v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-edit')"
               @click="handleEdit(record)" >修改</operation-button>
@@ -147,6 +155,7 @@
     <assign-form ref="assignForm" @ok="handleOk" />
     <dispatch-base-form ref="dispatchBaseForm" @ok="handleOk" />
     <refused-form ref="refusedForm" @ok="handleOk"/>
+    <check-form ref="checkForm" @ok="handleOk" />
   </div>
 </template>
 
@@ -163,13 +172,16 @@ import {
   deleteRepairApplicationForms,
   fetchRepairApplicationForm,
   exportRepairApplicationForm,
-  receive, receiveRepair
+  receive, receiveRepair, approve
 } from '@/api/repair/application-form'
 import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
+import CheckForm from './modules/CheckForm'
+import Vue from 'vue'
 
 export default {
   name: 'RepairForm',
   components: {
+    CheckForm,
     STable,
     Ellipsis,
     BaseForm,
@@ -230,7 +242,7 @@ export default {
           }
         },
         {
-          title: '使用位置',
+          title: '车间具体位置',
           checked: true,
           width: '120px',
           dataIndex: 'sbCph'
@@ -380,6 +392,11 @@ export default {
     if (this.searchType === 3) {
       this.allocatedFlag = true
     }
+    // 获取当前用户角色
+    const bxrFlag = Vue.ls.get('bxrFlag')
+    if (this.searchType === 5 && bxrFlag === 1) {
+      this.editFlag = true
+    }
     /* if (repairModel === this.DictCache.VALUE.REPAIR_MODEL_TYPE.BASE_MODEL) {
       this.dispatchFlag = false
     } */
@@ -470,6 +487,16 @@ export default {
       const modal = this.$refs.assignForm
       modal.base(record)
     },
+    handleApprove (record) {
+      approve(record).then(() => {
+        this.$message.info('操作成功')
+        this.handleOk()
+      })
+    },
+    handleReturn (record) {
+      const modal = this.$refs.checkForm
+      modal.base(record, 1)
+    },
     handleReceive (record) {
       const temp = this
       fetchRepairApplicationForm({ id: record.id }).then(res => {

+ 13 - 12
src/views/repair/application-form/modules/BaseForm.vue

@@ -30,6 +30,15 @@
           </a-form-item>
         </row-item>
         <row-item>
+          <a-form-item
+            label="机电仪位号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input v-decorator="['parentSbNo']" />
+          </a-form-item>
+        </row-item>
+<!--        <row-item>
           <a-form-item
             label="设备部位"
             :labelCol="BaseTool.Constant.labelCol"
@@ -40,16 +49,8 @@
               disabled
               v-decorator="['partName']" />
             <a-button style="width: 30%" type="primary" @click="handlePartSelect">选择</a-button>
-<!--            <a-select v-decorator="['repairDeptId', {rules: [{required: true, message: '维修部门不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="(label,value) in repairDeptMap"
-                :key="value"
-                :label="label"
-                :value="value">{{ label }}
-              </a-select-option>
-            </a-select>-->
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
             label="送修部门"
@@ -68,12 +69,12 @@
         </row-item>
         <row-item>
           <a-form-item
-            label="使用位置"
+            label="车间具体位置"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input
-              v-decorator="['sbCph', {rules: [{required: true, message: '设备使用位置不能为空'}]}]" />
+            <a-input placeholder='比如:甲七车间北侧'
+              v-decorator="['sbCph']" />
           </a-form-item>
         </row-item>
         <row-item>

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

@@ -76,7 +76,10 @@
               <a-descriptions-item label="报修单号">{{ model.no }}</a-descriptions-item>
               <a-descriptions-item label="设备编号">{{ model.sbNo }}</a-descriptions-item>
               <a-descriptions-item label="设备名称">{{ model.sbName }}</a-descriptions-item>
-              <a-descriptions-item label="使用位置">{{ model.sbCph }}</a-descriptions-item>
+              <a-descriptions-item label="机电仪位号">{{ model.parentSbNo }}</a-descriptions-item>
+              <a-descriptions-item label="父位号">{{ model.selfParentNo }}</a-descriptions-item>
+              <a-descriptions-item label="报修车间">{{ model.sbPositionName }}</a-descriptions-item>
+              <a-descriptions-item label="车间具体位置">{{ model.sbCph }}</a-descriptions-item>
               <a-descriptions-item label="工单类别">{{ BaseTool.Object.getField(planFlagMap,model.category) }}</a-descriptions-item>
               <a-descriptions-item label="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></a-descriptions-item>
               <a-descriptions-item label="报修时间">{{ model.applyTime }}</a-descriptions-item>
@@ -767,7 +770,10 @@ export default {
         'userId': null,
         'sbCph': null,
         'actualUser': null,
-        'dispatchUserId': null
+        'dispatchUserId': null,
+        'parentSbNo': null,
+        'sbPositionName': null,
+        'selfParentNo': null
       }
     }
   },

+ 47 - 20
src/views/repair/application-form/modules/TicketForm.vue

@@ -13,11 +13,11 @@
       <div class="tables" >
         <table>
           <tr>
-            <td colspan="3">委单位</td>
+            <td colspan="3">委单位</td>
             <td colspan="27">
               <a-radio-group v-model="value1">
                 <a-radio :value="1">
-                  <a-icon class="check" v-show="value1 ==1" type="check" />生产部
+                  <a-icon class="check" v-show="value1 ==1" type="check" />生产部-{{ model.sbPositionName }}
                 </a-radio>
                 <a-radio :value="2">
                   <a-icon class="check" v-show="value1 ==2" type="check" />研发部
@@ -42,7 +42,7 @@
             <td colspan="27">
               <a-radio-group v-model="value2">
                 <a-radio :value="1">
-                  <a-icon class="check" v-show="value2 ==1" type="check" />设备
+                  <a-icon class="check" v-show="value2 ==1" type="check" />机械
                 </a-radio>
                 <a-radio :value="2">
                   <a-icon class="check" v-show="value2 ==2" type="check" />电气
@@ -51,7 +51,19 @@
                   <a-icon class="check" v-show="value2 ==3" type="check" />仪表
                 </a-radio>
                 <a-radio :value="4">
-                  <a-icon class="check" v-show="value2 ==4" type="check" />其他
+                  <a-icon class="check" v-show="value2 ==4" type="check" />保温保冷
+                </a-radio>
+                <a-radio :value="5">
+                  <a-icon class="check" v-show="value2 ==5" type="check" />防腐
+                </a-radio>
+                <a-radio :value="6">
+                  <a-icon class="check" v-show="value2 ==6" type="check" />安环
+                </a-radio>
+                <a-radio :value="7">
+                  <a-icon class="check" v-show="value2 ==7" type="check" />压力管道
+                </a-radio>
+                <a-radio :value="8">
+                  <a-icon class="check" v-show="value2 ==8" type="check" />其他
                 </a-radio>
               </a-radio-group>
             </td>
@@ -65,7 +77,8 @@
           <tr>
             <td colspan="3">工作优选权</td>
             <td colspan="27">
-              <a-radio-group v-model="value3">
+              {{ model.requireHours }}小时
+<!--              <a-radio-group v-model="value3">
                 <a-radio :value="1">
                   <a-icon class="check" v-show="value3 ==1" type="check" />紧急
                 </a-radio>
@@ -84,7 +97,7 @@
                 <a-radio :value="6">
                   <a-icon class="check" v-show="value3 ==6" type="check" />其它
                 </a-radio>
-              </a-radio-group>
+              </a-radio-group>-->
             </td>
           </tr>
           <tr>
@@ -101,11 +114,23 @@
                   <a-icon class="check" v-show="value4 ==3" type="check" />受限空间作业
                 </a-radio>
                 <a-radio :value="4">
-                  <a-icon class="check" v-show="value4 ==4" type="check" />高作业
+                  <a-icon class="check" v-show="value4 ==4" type="check" />高作业
                 </a-radio>
                 <a-radio :value="5">
-                  <a-icon class="check" v-show="value4 ==5" type="check" />其它特殊作业
+                  <a-icon class="check" v-show="value4 ==5" type="check" />吊装作业
+                </a-radio>
+                <a-radio :value="6">
+                  <a-icon class="check" v-show="value4 ==6" type="check" />动土作业
+                </a-radio>
+                <a-radio :value="7">
+                  <a-icon class="check" v-show="value4 ==7" type="check" />断路作业
                 </a-radio>
+                <a-radio :value="8">
+                  <a-icon class="check" v-show="value4 ==8" type="check" />设备检修作业
+                </a-radio>
+<!--                <a-radio :value="9">
+                  <a-icon class="check" v-show="value4 ==9" type="check" />盲板抽堵作业
+                </a-radio>-->
               </a-radio-group></td>
           </tr>
           <tr>
@@ -113,7 +138,7 @@
             <td colspan="9">{{ this.model.sbNo }}</td>
             <td colspan="3">设备名称</td>
             <td colspan="7"> {{ this.model.sbName }} </td>
-            <td colspan="1">设备位置</td>
+            <td colspan="1">车间具体位置</td>
             <td colspan="9">{{ this.model.sbLocation }} </td>
           </tr>
           <tr >
@@ -145,20 +170,20 @@
           <tr>
             <td colspan="14" >
               <a-checkbox-group v-model="value8" style="width:100%" @change="onChange">
-                <a-checkbox :value="1">
+                <a-checkbox :value="1" disabled>
                   <span style="position:relative"><a-icon class="checks" v-show="value8.includes(1)" type="check" />需检维修单元已经排放冲洗干净</span>
                 </a-checkbox >
                 <br/>
-                <a-checkbox :value="2">
+                <a-checkbox :value="2" disabled>
                   <span style="position:relative"><a-icon class="checks" v-show="value8.includes(2)" type="check" />需检维修单元已经隔离
                   </span>
                 </a-checkbox >
                 <br/>
-                <a-checkbox :value="3">
+                <a-checkbox :value="3" disabled>
                   <span style="position:relative"><a-icon class="checks" v-show="value8.includes(3)" type="check" />需检维修单元设备已经停电</span>
                 </a-checkbox>
                 <br/>
-                <a-checkbox :value="4">
+                <a-checkbox :value="4" disabled>
                   <span style="position:relative"><a-icon class="checks" v-show="value8.includes(4)" type="check" />其他</span>
                 </a-checkbox >
               </a-checkbox-group>
@@ -169,7 +194,7 @@
             <td colspan="4"> {{ this.model.caller }}</td>
             <td colspan="3">确认可施工</td>
             <td colspan="4"> </td>
-            <td colspan="3">派工主管</td>
+            <td colspan="3">派工工程师</td>
             <td colspan="11"> {{ this.model.dispatcher }}</td>
           </tr>
           <tr>
@@ -181,9 +206,8 @@
             <td colspan="11">{{ this.model.repairMan }} </td>
           </tr>
           <tr>
-            <td colspan="3"> </td>
-            <td colspan="4"> </td>
-            <td colspan="3"> </td>
+            <td colspan="3">特殊作业监护人</td>
+            <td colspan="11"> </td>
             <td colspan="4"> </td>
             <td colspan="3"> </td>
             <td colspan="11"> </td>
@@ -191,7 +215,8 @@
           <tr>
             <td colspan="3">特殊作业核准</td>
             <td colspan="11"> </td>
-            <td colspan="3">特殊作业监护人</td>
+            <td colspan="4"> </td>
+            <td colspan="3"> </td>
             <td colspan="11"> </td>
           </tr>
           <tr>
@@ -215,7 +240,7 @@ export default {
     return {
       visible: false,
       disabled: false,
-      value1: null,
+      value1: 1,
       value2: null,
       value3: null,
       value4: null,
@@ -232,7 +257,9 @@ export default {
         'caller': null,
         'dispatcher': null,
         'repairMan': null,
-        'content': null
+        'content': null,
+        'sbPositionName': null,
+        'requireHours': null
       }
     }
   },

+ 1 - 0
src/views/workplace/backlog/WorkplaceBacklog.vue

@@ -282,6 +282,7 @@ export default {
           record.detailType === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE, 'REPAIR_DISPATCH') ||
           record.detailType === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE, 'REPAIR_BACK') ||
           record.detailType === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE, 'REPAIR_RECEIVE') ||
+          record.detailType === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE,'REPAIR_MANAGE_RECEIVE') ||
           record.detailType === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE, 'REPAIR_APPLICATION_STOP')) {
           fetchRepairApplicationForm({ id: record.otherId }).then(res => {
             this.visible = false