Jelajahi Sumber

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

hfxc226 2 tahun lalu
induk
melakukan
0b5238f62d

+ 10 - 0
src/api/repair/application-form.js

@@ -17,6 +17,16 @@ export function getRepairApplicationFormPage (parameter) {
   })
 }
 
+export function getRepairApplicationFormPoolPage (parameter) {
+  return axios({
+    url: '/repair/application-forms/pool/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
 /**
  * add func
  * parameter: { }

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

@@ -205,6 +205,7 @@ const constantRouterComponents = {
   'WaitAllocatedRepairForm': () => import('@/views/repair/application-form/WaitAllocatedRepairForm'),
   'WaitDispatchRepairForm': () => import('@/views/repair/application-form/WaitDispatchRepairForm'),
   'ReportRepairForm': () => import('@/views/repair/application-form/ReportRepairForm'),
+  'RepairFormPool': () => import('@/views/repair/application-form/RepairFormPool'),
   // 验收单
   'RepairCheck': () => import('@/views/repair/check/RepairCheck'),
   // 故障类别
@@ -271,7 +272,8 @@ const constantRouterComponents = {
   'ActivitiUserModel': () => import('@/views/activiti/user-model/ActivitiUserModel'), // 流程审批节点设置
   'DesignForm': () => import('@/views/design/designForm/DesignForm'),
   // 隐患管理
-  'HiddenDanger': () => import('@/views/hidden/hidden/HiddenDanger'), // 隐患任务
+  'HiddenDangerWait': () => import('@/views/hidden/hidden/HiddenDangerWait'), // 隐患任务
+  'HiddenDangerHandle': () => import('@/views/hidden/hidden/HiddenDangerHandle'), // 隐患任务
   // 调拨申请
   'SbAllocateApply': () => import('@/views/sb/allocate-apply/ProjectSbAllocateApply'),
   'GroupToProjectSbAllocateApply': () => import('@/views/sb/allocate-apply/GroupToProjectSbAllocateApply'),

+ 2 - 1
src/utils/dict.js

@@ -922,7 +922,8 @@ DictCache.VALUE = {
     CALLER_REPAIR_VERIFY_FAIL_TWO: 18, // 计划报修二审被拒
     CALLER_REPAIR_VERIFYING_THREE: 19, // 计划报修三审中
     CALLER_REPAIR_VERIFY_FAIL_THREE: 20, // 	计划报修三审被拒
-    BIG_REPAIR_VERIFYING: 21 // 大修审核中
+    BIG_REPAIR_VERIFYING: 21, // 大修审核中
+    CALLER_REPAIR_VERIFY_SUCCESS_THREE: 22 // 计划维修报修成功
   },
   REPAIR_PREPARATION_STATUS: {
     NOT_ALLOCATED: 1, // 待分配

+ 2 - 1
src/views/fill/gather/modules/CreateTaskForm.vue

@@ -219,7 +219,7 @@ export default {
       })
     },
     handleSbSelect () {
-      this.$refs.sbInfoSelectModal.base({}, {})
+      this.$refs.sbInfoSelectModal.base({}, this.sbIds)
     },
     handleInfoSelect () {
       this.$refs.infoSelectModal.base(this.model)
@@ -263,6 +263,7 @@ export default {
     handleCancel (values) {
       this.visible = false
       this.form.resetFields()
+      this.sbIds = []
       this.$emit('ok', values)
     }
 

+ 9 - 9
src/views/fill/gather/modules/SbInfoSelectModal.vue

@@ -217,7 +217,7 @@ export default {
     }
   },
   created () {
-    this.tableOption()
+    // this.tableOption()
     this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
@@ -274,8 +274,8 @@ export default {
       this.$refs.table.refresh()
     },
     onSelectChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = Array.from(new Set([...selectedRowKeys, ...this.selectedRowKeys]))
-      this.selectedRows = Array.from(new Set([...selectedRows, ...this.selectedRows]))
+      this.selectedRowKeys = Array.from(new Set([...selectedRowKeys]))
+      this.selectedRows = Array.from(new Set([...selectedRows]))
     },
     resetSearchForm () {
       this.queryParam = {
@@ -293,17 +293,15 @@ export default {
         this.treeData = res.data
       })
     },
-    base (record, queryParam = {}) {
+    base (record, keys) {
       this.visible = true
       this.modalTitle = '选择设备'
-      this.extraQueryParam = queryParam
       if (this.isCreated) {
-        console.log(this.$refs.table)
-        this.$refs.table.clearSelected()
+        if (keys.length === 0) this.$refs.table.clearSelected()
         this.options.rowSelection.type = this.type
         this.handleOk()
       } else {
-        this.tableOption()
+        // this.tableOption()
         this.isCreated = true
       }
       // this.mySelect(this.selectedRowKeys, this.selectedRows)
@@ -319,13 +317,15 @@ export default {
         this.confirmLoading = true
         this.$emit('selected', this.selectedRowKeys, this.selectedRows)
         this.confirmLoading = false
+        this.queryParam = {
+        }
         this.visible = false
         this.selectedRowKeys = []
         this.selectedRows = []
       }
     },
     mySelect (selectedRowKeys, selectedRows) {
-      this.$refs.table.updateSelect([...selectedRowKeys, ...this.selectedRowKeys], [...selectedRows, ...this.selectedRows])
+      this.$refs.table.updateSelect([...selectedRowKeys], [...selectedRows])
       this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
     }
   }

+ 12 - 4
src/views/hidden/hidden/HiddenDanger.vue

@@ -68,7 +68,7 @@
           <template>
             <a @click="handleView(record)">查看</a>
             <operation-button
-              v-if="$auth('hidden-dangers-edit')"
+              v-if="record.status === 0"
               @click="handleRepair(record)"
             >转维修</operation-button>
             <operation-button
@@ -76,7 +76,7 @@
               @click="handleEdit(record)"
             >修改</operation-button>
             <operation-button
-              v-if="$auth('hidden-hiddens-del')"
+              v-if="record.status === 0"
               :type="2"
               title="是否要删除该条数据?"
               @confirm="batchDelete(record.id)">删除</operation-button>
@@ -105,7 +105,7 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import RepairBaseForm from './modules/RepairBaseForm'
 
-import { getHiddenDangerPage, deleteHiddenDangers, fetchHiddenDanger, exportHiddenDanger, transferRepair } from '@/api/hidden/hidden-danger'
+import { getHiddenDangerPage, deleteHiddenDangers, fetchHiddenDanger, exportHiddenDanger } from '@/api/hidden/hidden-danger'
 
 export default {
   name: 'HiddenDanger',
@@ -116,12 +116,20 @@ export default {
     Detail,
     RepairBaseForm
   },
+  props: {
+    searchType: {
+      type: Number,
+      default: -1
+    }
+  },
   data () {
     return {
       advanced: false,
       visible: true,
       // 查询参数
-      queryParam: {},
+      queryParam: {
+        searchType: this.searchType
+      },
       professorTypeMap: {},
       checkLevelMap: {},
       statusMap: {},

+ 17 - 0
src/views/hidden/hidden/HiddenDangerHandle.vue

@@ -0,0 +1,17 @@
+<template>
+  <HiddenDanger :search-type="2"/>
+</template>
+
+<script>
+import HiddenDanger from './HiddenDanger'
+export default {
+  name: 'HiddenDangerHandle',
+  components: {
+    HiddenDanger
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 17 - 0
src/views/hidden/hidden/HiddenDangerWait.vue

@@ -0,0 +1,17 @@
+<template>
+  <HiddenDanger :search-type="1"/>
+</template>
+
+<script>
+import HiddenDanger from './HiddenDanger'
+export default {
+  name: 'HiddenDangerWait',
+  components: {
+    HiddenDanger
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 30 - 5
src/views/hidden/hidden/modules/Detail.vue

@@ -8,14 +8,14 @@
       </a-col>
     </a-row>
     <a-descriptions :column="3" bordered>
-      <a-descriptions-item label="设备">{{ model.sbId }}</a-descriptions-item>
+      <a-descriptions-item label="设备">{{ model.sbName }}</a-descriptions-item>
       <a-descriptions-item label="设备位号">{{ model.positionNo }}</a-descriptions-item>
-      <a-descriptions-item label="检查区域">{{ model.positionId }}</a-descriptions-item>
+      <a-descriptions-item label="检查区域">{{ model.positionName }}</a-descriptions-item>
       <a-descriptions-item label="存在问题">{{ model.existsQuestion }}</a-descriptions-item>
       <a-descriptions-item label="可能风险">{{ model.hiddenRisk }}</a-descriptions-item>
       <a-descriptions-item label="整改建议">{{ model.opition }}</a-descriptions-item>
-      <a-descriptions-item label="整改责任人">{{ model.dutyUser }}</a-descriptions-item>
-      <a-descriptions-item label="属地负责人">{{ model.areaUser }}</a-descriptions-item>
+      <a-descriptions-item label="整改责任人">{{ dutyUsers.find(item=>item.userId===model.dutyUser ).realName }}</a-descriptions-item>
+      <a-descriptions-item label="属地负责人">{{ areaUsers.find(item=>item.userId===model.areaUser ).realName }}</a-descriptions-item>
       <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
       <a-descriptions-item label="添加人ID">{{ model.createdUserId }}</a-descriptions-item>
       <a-descriptions-item label="修改人ID">{{ model.updateUserId }}</a-descriptions-item>
@@ -25,12 +25,29 @@
       <a-descriptions-item label="检查级别  公司级-部门组织-专业自查">{{ model.checkLevel }}</a-descriptions-item>
       <a-descriptions-item label="整改时限">{{ model.requireTime }}</a-descriptions-item>
       <a-descriptions-item label="修改时间">{{ model.updateTime }}</a-descriptions-item>
+      <a-descriptions-item label="图片" :span="3">
+        <div v-if="model.beforeImageList != null && model.beforeImageList.length > 0">
+          <viewer :images="model.beforeImageList" @inited="inited" ref="viewer" :index="1" >
+            <img
+              v-for="item in model.beforeImageList"
+              :src="item.url"
+              :key="item.id"
+              class="image"
+              width="200px"
+              style="margin:10px;">
+          </viewer></div>
+        <div v-if="model.beforeImageList == null || model.beforeImageList.length === 0"> 暂无</div>
+      </a-descriptions-item>
+      <a-descriptions-item label="文件">
+        <a v-for="item in model.fileList" :key="item.id" :href="item.url" target="downloadFile" :download="item.name">{{ item.name }}</a>
+      </a-descriptions-item>
     </a-descriptions>
   </a-card>
 </template>
 
 <script>
 import DetailList from '@/components/tools/DetailList'
+import { getDangersUser } from '@/api/hidden/hidden-danger'
 
 const DetailListItem = DetailList.Item
 
@@ -46,6 +63,8 @@ export default {
       mdl: {},
       modalTitle: null,
       visible: false,
+      areaUsers: [],
+      dutyUsers: [],
       // 下拉框map
       model: {
         'sbId': null,
@@ -70,7 +89,13 @@ export default {
   },
   created () {
     // 下拉框map
-
+    getDangersUser('HIDDEN_DANGER_AREA_USER').then(res => {
+      this.areaUsers = res.data
+      console.log(res)
+    })
+    getDangersUser('HIDDEN_DANGER_DUTY_USER').then(res => {
+      this.dutyUsers = res.data
+    })
   },
   methods: {
     base (record) {

+ 4 - 3
src/views/hidden/hidden/modules/RepairBaseForm.vue

@@ -9,7 +9,7 @@
   >
     <a-form :form="form">
 
-      <a-form-item v-show="false" >
+      <a-form-item >
         <a-input v-decorator="['id']" type="hidden"/>
         <a-input v-decorator="['sbId']" type="hidden"/>
         <a-input v-decorator="['partId']" type="hidden"/>
@@ -566,6 +566,7 @@ export default {
       }
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
+          'id',
           'sbId',
           'sbCph',
           'partId',
@@ -646,8 +647,8 @@ ${record.hiddenRisk}`
         values.repairFileList = this.repairFileList
         values.repairProfessor = values.repairProfessor.join(',')
         values.repairType = values.repairType.join(',')
-        values.applicationFileList = this.applicationFileList
-        values.reportFileList = this.reportFileList
+        values.beforeImageList = this.applicationFileList
+        values.fileList = this.reportFileList
         // values.sbPosition = values.sbPosition.join('->')
         if (values.partId === undefined) {
           values.partId = ''

+ 513 - 0
src/views/repair/application-form/RepairFormPool.vue

@@ -0,0 +1,513 @@
+<template>
+  <div>
+    <a-card v-show="visible">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="48">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关键字">
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输入设备名称/设备编号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="设备自编号">
+                <a-input v-model="queryParam.zbh" placeholder="请输入设备自编号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="报修人">
+                <a-input v-model="queryParam.actualUser" placeholder="请输入报修人"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="维修人">
+                <a-input v-model="queryParam.repairUserName" placeholder="请输入维修人"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="问题描述">
+                <a-input v-model="queryParam.content" placeholder="问题描述模糊查询"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <a-select v-model="queryParam.status" placeholder="请选择">
+                  <a-select-option
+                    v-for="(label,value) in statusMap"
+                    :key="value"
+                    :label="label"
+                    :value="parseInt(value)">{{ label }}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="报修起始日期">
+                <a-date-picker
+                  v-model="queryParam.searchStartTime"
+                  style="width: 100%"
+                  :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="报修结束日期">
+                <a-date-picker
+                  v-model="queryParam.searchEndTime"
+                  style="width: 100%"
+                  :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :md="8 || 24" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="handleOk()">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <div class="table-operator" style="margin-bottom: 8px;">
+        <a-button v-if="$auth('repair-application-forms-add')" type="primary" icon="plus" @click="$refs.baseModal.base({},{filter: -1})">新增</a-button>
+        <a-button style="margin-left: 8px" v-if="$auth('repair-application-forms-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('repair-application-forms-del')">
+          <a-menu slot="overlay">
+            <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+              <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+            </a-popconfirm>
+          </a-menu>
+          <a-button style="margin-left: 8px">
+            批量操作 <a-icon type="down" />
+          </a-button>
+        </a-dropdown>
+      </div>
+
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        :alert="options.alert"
+        :rowSelection="options.rowSelection"
+        :scroll="{x: 1000, y: BaseTool.Constant.scrollY }"
+        showPagination="auto"
+      >
+        <span slot="action" slot-scope="record">
+          <template>
+            <a @click="handleView(record)">工单主页</a>
+            <!-- <operation-button
+              v-show="allocatedFlag"
+              v-if="(DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status)"
+              :type="2"
+              title="是否要接单?"
+              @confirm="receiveRepair(record)">接单</operation-button>
+            <operation-button
+              v-show="editFlag"
+              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>
+            <operation-button
+              v-show="dispatchFlag"
+              v-if="( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === record.status ||
+                DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REPAIR_FAIL === record.status) && $auth('repair-application-forms-dispatch')"
+              @click="handleAssign(record)" >派工</operation-button>
+            <operation-button
+              v-show="allocatedFlag"
+              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
+              @click="handleAssign(record)" >接收并派工</operation-button>
+            <operation-button
+              v-show="allocatedFlag"
+              v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status)"
+              :type="2"
+              title="是否要驳回?"
+              @confirm="handleRefused(record)">报修驳回</operation-button>-->
+          </template>
+        </span>
+        <span slot="content" slot-scope="content">
+          <span v-html="content"></span>
+        </span>
+        <span slot="status" slot-scope="text">
+          <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]"/>
+        </span>
+        <span slot="level" slot-scope="text">
+          <badge :text="BaseTool.Object.getField(levelMap,text)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[text]"/>
+        </span>
+      </s-table>
+    </a-card>
+    <base-form ref="baseModal" @ok="handleOk"/>
+    <base-out-form ref="baseOutModal" @ok="handleOk"/>
+    <detail ref="detailModal" @ok="handleOk"/>
+    <detail-out ref="detailOutModal" @ok="handleOk"/>
+    <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>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import BaseOutForm from './modules/BaseOutForm'
+import AssignForm from './modules/AssignForm'
+import Detail from './modules/DetailRepair'
+import DetailOut from './modules/DetailRepairOut'
+import RefusedForm from './modules/RefusedForm'
+import {
+  getRepairApplicationFormPoolPage,
+  deleteRepairApplicationForms,
+  fetchRepairApplicationForm,
+  exportRepairApplicationForm,
+  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,
+    BaseOutForm,
+    DetailOut,
+    AssignForm,
+    Detail,
+    DispatchBaseForm,
+    RefusedForm
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+      },
+      visible: true,
+      dispatchFlag: false,
+      allocatedFlag: false,
+      editFlag: false,
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          checked: true,
+          width: '70px',
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '工单编号',
+          checked: true,
+          width: '100px',
+          dataIndex: 'no'
+        },
+        {
+          title: '设备名称',
+          checked: true,
+          width: '150px',
+          dataIndex: 'sbId',
+          customRender: (text, record, index) => {
+            return record.sbName
+          }
+        },
+        {
+          title: '设备位号',
+          checked: true,
+          width: '100px',
+          dataIndex: 'positionNo'
+        },
+        {
+          title: '工作内容',
+          checked: true,
+          width: '150px',
+          dataIndex: 'content',
+          scopedSlots: { customRender: 'content' }
+        },
+        {
+          title: '录入时间',
+          checked: true,
+          width: '200px',
+          dataIndex: 'applyTime'
+        },
+        {
+          title: '来源分类',
+          checked: true,
+          width: '100px',
+          dataIndex: 'source',
+          customRender: (text, record, index) => {
+            if (text === 1) {
+              return '内部报修'
+            } else if (text === 2) {
+              return '生产报修'
+            } else if (text === 3) {
+              return '隐患排查'
+            } else if (text === 4) {
+              return '巡检'
+            }
+          }
+        },
+        {
+          title: '检修等级',
+          checked: true,
+          width: '100px',
+          dataIndex: 'repairPlanLevel'
+        },
+        {
+          title: '工单类型',
+          checked: true,
+          width: '100px',
+          dataIndex: 'category',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.planFlagMap, text)
+          }
+        },
+        /* {
+          title: '紧急等级',
+          checked: true,
+          width: '200px',
+          dataIndex: 'level',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.levelMap, text)
+          }
+        },
+        {
+          title: '计划性维修',
+          checked: true,
+          dataIndex: 'needStop',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.needStopMap, text)
+          }
+        }, */
+        {
+          title: '工单状态',
+          checked: true,
+          width: '100px',
+          fixed: 'right',
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          checked: true,
+          fixed: 'right',
+          key: 'action',
+          width: '150px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      sourceMap: {},
+      levelMap: {},
+      statusMap: {},
+      categoryMap: {},
+      needStopMap: {},
+      planFlagMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          type: null,
+          dataScope: {
+            sortBy: 'asc, desc',
+            sortName: 'status, apply_time'
+          }
+        }
+        return getRepairApplicationFormPoolPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            console.log(res.data.model)
+            console.log(res.data)
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created () {
+    this.dispatchFlag = false
+    this.allocatedFlag = false
+    this.editFlag = false
+    // const repairModel = this.DictCache.getConfigValueByType(this.DictCache.TYPE.REPAIR_STRATEGY_MODEL)
+    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
+    } */
+    // 下拉框map
+    this.categoryMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
+    this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
+    this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
+    // 获取浏览器的请求参数:报修单编号:no
+    const no = this.$route.query.no
+    if (no != null) {
+      this.queryParam.no = no
+    }
+    this.tableOption()
+  },
+  methods: {
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteRepairApplicationForms(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    receiveRepair (record) {
+      const params = {}
+      params.id = record.id
+      params.repairDeptId = record.repairDeptId
+      params.applyTime = record.applyTime
+      params.userId = record.userId
+      params.no = record.no
+      params.category = record.category
+      receiveRepair(params).then(() => {
+        this.$message.info('接单成功')
+        this.handleOk()
+      })
+    },
+    handleEdit (record) {
+      fetchRepairApplicationForm({ id: record.id }).then(res => {
+        const type = res.data.type
+        const modal = type === 2 ? this.$refs.baseOutModal : this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      fetchRepairApplicationForm({ id: record.id }).then(res => {
+        this.visible = false
+        const type = res.data.type
+        const modal = type === 2 ? this.$refs.detailOutModal : this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleAssign (record) {
+      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 => {
+        receive(res.data).then(() => {
+          temp.handleOk()
+        })
+      })
+    },
+    handleRefused (record) {
+      const modal = this.$refs.refusedForm
+      modal.base(record)
+    },
+
+    handleOk () {
+      this.visible = true
+      this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
+      this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+      }
+      this.$refs.table.refresh(true)
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam,
+        searchStartTime: this.queryParam.searchStartTime,
+        searchEndTime: this.queryParam.searchEndTime
+      }
+      exportRepairApplicationForm(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    handleDispatching (record) {
+      const modal = this.$refs.dispatchBaseForm
+      modal.base(record)
+    }
+  }
+}
+</script>

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

@@ -301,6 +301,7 @@
       <div class="btn" v-else>
         <a-button style="margin-left: 8px" type="primary" @click="handleCancel">返回</a-button>
         <a-button v-show="model.status===15 || model.status===17 || model.status === 19 " style="margin-left: 8px" type="primary" @click="handleCheck">审核</a-button>
+        <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.CALLER_REPAIR_VERIFY_SUCCESS_THREE === model.status " style="margin-left: 16px" type="default" @click="handleAssign">派单</a-button>
         <a-button v-show="model.status===20" style="margin-left: 8px" type="primary" @click="handleCheck">再次发起审核</a-button>
         <a-button v-if="$auth('repair-application-forms-examine') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleFinish()">完成维修</a-button>
         <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="default" @click="handleViewTicket()">维修票证</a-button>