guarantee-lsq há 2 anos atrás
pai
commit
5e2db88370

+ 10 - 0
src/api/customize/fieldTemplateData.js

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

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

@@ -210,6 +210,20 @@ export function dispatchModelByDTO (parameter) {
   })
 }
 
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function refusedByDTO (parameter) {
+  return axios({
+    url: '/repair/application-forms/refused/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
 /**
  * finish func
  * parameter: { }

+ 127 - 0
src/api/repair/repair.js

@@ -0,0 +1,127 @@
+import { axios } from '@/utils/request'
+import { stringify } from 'qs'
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getRepairSchemePage (parameter) {
+  return axios({
+    url: '/repair/repairs/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * add func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function addRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs',
+    method: 'POST',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: parameter
+  })
+}
+
+/**
+ * update func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function updateRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
+}
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function fetchRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * query list func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function queryRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * delete batch func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteRepairSchemes (parameter) {
+  return axios({
+    url: '/repair/repairs',
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * delete single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function deleteRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs/' + parameter.id,
+    method: 'DELETE',
+    data: parameter
+  })
+}
+
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportRepairScheme (parameter) {
+  return axios({
+    url: '/repair/repairs/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}

+ 4 - 0
src/router/generator-platform-routers.js

@@ -167,6 +167,10 @@ const constantRouterComponents = {
   'MRepairForm': () => import('@/views/repair/application-form/MyRepairForm'),
   'MyRepairForm': () => import('@/views/repair/form/MyRepairForm'),
   'WaitRepairForm': () => import('@/views/repair/application-form/WaitRepairForm'),
+  'RepairCallerCheckForm': () => import('@/views/repair/application-form/RepairCallerCheckForm'),
+  'RepairManagerCheckForm': () => import('@/views/repair/application-form/RepairManagerCheckForm'),
+  'WaitAllocatedRepairForm': () => import('@/views/repair/application-form/WaitAllocatedRepairForm'),
+  'WaitDispatchRepairForm': () => import('@/views/repair/application-form/WaitDispatchRepairForm'),
   // 验收单
   'RepairCheck': () => import('@/views/repair/check/RepairCheck'),
   // 故障类别

+ 11 - 6
src/utils/dict.js

@@ -145,7 +145,8 @@ DictCache.TYPE = {
   REPAIR_OUT_TYPE: 'REPAIR_OUT_TYPE', // 费用类别
   REPAIR_PROJECT_TYPE: 'REPAIR_PROJECT_TYPE', // 费用类别
   REPAIR_TECHNOLOGY_TYPE: 'REPAIR_TECHNOLOGY_TYPE', // 费用类别
-  PURCHASE_STORE_FORM_STATUS: 'PURCHASE_STORE_FORM_STATUS', // 采购入库状态
+  PURCHASE_STORE_FORM_STATUS: 'PURCHASE_STORE_FORM_STATUS', // 采购入库状态,
+  REPAIR_DEPT_CATEGORY: 'REPAIR_DEPT_CATEGORY', // 维修部门集合
   /* 点巡检模块 */
   CHECK_STANDARD_PARAM_TYPE: 'CHECK_STANDARD_PARAM_TYPE', // 标准参数类型
   CHECK_STANDARD_TYPE: 'CHECK_STANDARD_TYPE', // 检查类型
@@ -852,9 +853,11 @@ DictCache.VALUE = {
     NOT_ALLOCATED: 1, // 待接收
     PROCESSING: 2, // 维修中
     WAIT_SUBMIT: 3, // 待审核
-    NOT_ACCEPTANCE: 4, // 审核中
+    NOT_ACCEPTANCE: 4, // 审核中--生产
     REBACK: 5, // 已驳回
-    FINISHED: 6// 已完成
+    FINISHED: 6, // 已完成
+    REFUSED_REPAIR: 7, // 报修被拒
+    REPAIR_FAIL: 8 // 维修失败,再次派工
   },
   /**
    * 维修状态
@@ -1409,9 +1412,11 @@ DictCache.COLOR = {
     1: 'warning', // 待接收
     2: 'processing', // 维修中
     3: 'yellow', // 待提交审核
-    4: 'error', // 审核中
-    5: 'success', // 已驳回
-    6: 'default' // 已完成
+    4: 'yellow', // 审核中
+    5: 'error', // 已驳回
+    6: 'success', // 已完成
+    7: 'error', // 报修被拒
+    8: 'processing' // 维修转派
   },
   /**
    * 维修状态

+ 17 - 0
src/views/repair/application-form/RepairCallerCheckForm.vue

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

+ 38 - 20
src/views/repair/application-form/RepairForm.vue

@@ -99,26 +99,24 @@
           <template>
             <a @click="handleView(record)">查看</a>
             <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-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-del')"-->
-            <!--              :type="2"-->
-            <!--              title="是否要删除该条数据?"-->
-            <!--              @confirm="batchDelete(record.id)">删除</operation-button>-->
-            <!--<operation-button
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
-              @click="handleDispatching(record)" >派工</operation-button>-->
             <operation-button
               v-show="dispatchFlag"
-              v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
+              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="!dispatchFlag"
+              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="handleReceive(record)">接收</operation-button>
+              title="是否要驳回?"
+              @confirm="handleRefused(record)">报修驳回</operation-button>
           </template>
         </span>
         <span slot="status" slot-scope="text">
@@ -135,6 +133,7 @@
     <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'/>
   </div>
 </template>
 
@@ -145,6 +144,7 @@ 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 {
   getRepairApplicationFormPage,
   deleteRepairApplicationForms,
@@ -164,7 +164,8 @@ export default {
     DetailOut,
     AssignForm,
     Detail,
-    DispatchBaseForm
+    DispatchBaseForm,
+    RefusedForm
   },
   props: {
     filter: {
@@ -173,7 +174,7 @@ export default {
     },
     searchType: {
       type: Number,
-      default: null
+      default: -1
     }
   },
   data () {
@@ -186,7 +187,9 @@ export default {
 
       },
       visible: true,
-      dispatchFlag: true,
+      dispatchFlag: false,
+      allocatedFlag: false,
+      editFlag: false,
       // 表头
       columns: [
         {
@@ -217,7 +220,7 @@ export default {
           title: '报修人',
           checked: true,
           width: '120px',
-          dataIndex: 'actualUser'
+          dataIndex: 'userName'
         },
         {
           title: '维修人',
@@ -344,11 +347,22 @@ export default {
     }
   },
   created () {
-    const repairModel = this.DictCache.getConfigValueByType(this.DictCache.TYPE.REPAIR_STRATEGY_MODEL)
-    console.log(repairModel)
-    if (repairModel === this.DictCache.VALUE.REPAIR_MODEL_TYPE.BASE_MODEL) {
-      this.dispatchFlag = false
+    this.dispatchFlag = false
+    this.allocatedFlag = false
+    this.editFlag = false
+    // const repairModel = this.DictCache.getConfigValueByType(this.DictCache.TYPE.REPAIR_STRATEGY_MODEL)
+    if (this.searchType === 4) {
+      this.dispatchFlag = true
     }
+    if (this.searchType === 3) {
+      this.allocatedFlag = true
+    }
+    if (this.searchType === 1) {
+      this.editFlag = true
+    }
+    /* if (repairModel === this.DictCache.VALUE.REPAIR_MODEL_TYPE.BASE_MODEL) {
+      this.dispatchFlag = false
+    } */
     // 下拉框map
     this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
@@ -432,6 +446,10 @@ export default {
         })
       })
     },
+    handleRefused (record) {
+      const modal = this.$refs.refusedForm
+      modal.base(record)
+    },
 
     handleOk () {
       this.visible = true

+ 17 - 0
src/views/repair/application-form/RepairManagerCheckForm.vue

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

+ 17 - 0
src/views/repair/application-form/WaitAllocatedRepairForm.vue

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

+ 17 - 0
src/views/repair/application-form/WaitDispatchRepairForm.vue

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

+ 8 - 19
src/views/repair/application-form/modules/AssignForm.vue

@@ -34,7 +34,7 @@
           >
             <a-textarea
               :rows="4"
-              v-decorator="['repairDispatchRemark']"/>
+              v-decorator="['remark']"/>
           </a-form-item>
         </row-item>
       </row-list>
@@ -59,11 +59,7 @@ export default {
       form: this.$form.createForm(this),
       visible: false,
       // 下拉框map
-      sourceMap: {},
-      levelMap: {},
-      statusMap: {},
       record: {},
-      userList: [],
       deptUserList: []
     }
   },
@@ -71,11 +67,6 @@ export default {
   },
   created () {
     // 下拉框map
-    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.getUsers()
-    this.getDeptUsers()
   },
   methods: {
     base (record) {
@@ -83,21 +74,15 @@ export default {
       // 如果是空标识添加
       this.modalTitle = '派工'
       this.record = record
+      this.getDeptUsers(record.repairDeptId)
     },
-    getDeptUsers () {
-      queryUserDept({ userStatus: 1 }).then(res => {
-        // queryUserDept({ userStatus: 1 }).then(res2 => {
+    getDeptUsers (deptId) {
+      queryUserDept({ userStatus: 1, deptId: deptId }).then(res => {
         this.deptUserList = res.data
-        console.log("role11")
         console.log(this.deptUserList)
       })
       // })
     },
-    getUsers () {
-      queryUser({ status: 1 }).then(res => {
-        this.userList = res.data
-      })
-    },
     save () {
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true
@@ -107,6 +92,10 @@ export default {
           return
         }
         values.id = this.record.id
+        values.sbId = this.record.sbId
+        values.sbCph = this.record.sbCph
+        values.content = this.record.content
+        values.actualUser = this.record.actualUser
         dispatchModelByDTO(values)
           .then(() => {
             this.handleCancel(values)

+ 22 - 3
src/views/repair/application-form/modules/BaseForm.vue

@@ -94,7 +94,7 @@
               v-decorator="['limitHours']" />
           </a-form-item>
         </row-item>
-        <row-item>
+<!--        <row-item>
           <a-form-item
             label="报修单号"
             :labelCol="BaseTool.Constant.labelCol"
@@ -104,7 +104,7 @@
               disabled
               v-decorator="['no', {rules: [{required: false, message: '报修单号不能为空'}]}]" />
           </a-form-item>
-        </row-item>
+        </row-item>-->
 <!--        <row-item>
           <a-form-item
             label="报修来源"
@@ -128,9 +128,26 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
+              disabled='disabled'
               v-decorator="['actualUser', {initialValue: userInfo.realName, rules: [{required: true, message: '报修人不能为空'}]}]"/>
           </a-form-item>
         </row-item>
+        <row-item>
+          <a-form-item
+            label="维修部门"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <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>
           <a-form-item
             label="紧急等级"
@@ -280,6 +297,7 @@ export default {
       applicationFileList: [], // 报修图片
       checkFileList: [], // 审核图片
       repairFileList: [], // 维修图片,
+      repairDeptMap: {},
       headers: {
         Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
       }
@@ -299,6 +317,7 @@ export default {
     this.questionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_QUESTION)
     this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
     this.categoryMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
+    this.repairDeptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_DEPT_CATEGORY)
     this.getUsers()
   },
   methods: {
@@ -309,7 +328,7 @@ export default {
       })
       // 如果是空标识添加
       if (this.BaseTool.Object.isBlank(record)) {
-        this.modalTitle = '添加'
+        this.modalTitle = '报修'
         if (!this.BaseTool.Object.isBlank(record) && !this.BaseTool.Object.isBlank(record.sbId)) {
           const { form: { setFieldsValue } } = this
           this.$nextTick(() => {

+ 163 - 3
src/views/repair/application-form/modules/DetailRepair.vue

@@ -89,7 +89,8 @@
               <a-descriptions-item label="报修时间">{{ model.applyTime }}</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.limitHours }}小时</a-descriptions-item>
-              <a-descriptions-item label="要求日期" :span="2">{{ model.limitDate }}</a-descriptions-item>
+              <a-descriptions-item label="维修主管">{{ model.checkUserName }}</a-descriptions-item>
+              <a-descriptions-item label="报修人">{{ model.actualUser }}</a-descriptions-item>
               <a-descriptions-item label="故障描述" :span="3">{{ model.content }}</a-descriptions-item>
               <a-descriptions-item label="报修图片" :span="3">
                 <div v-if="model.applicationFileList != null && model.applicationFileList.length > 0">
@@ -156,6 +157,25 @@
             </a-descriptions-item>
           </a-descriptions >
         </div>
+        <div class="main gutter-color" v-show="current == 3">
+          <div class="title">维修记录</div>
+          <a-table
+            :data-source="dataRecord"
+            :columns="columnsRecord"
+            tableLayout="auto"
+            rowKey="id">
+            <span slot="action" slot-scope="record">
+              <template>
+                <a @click="handleViewRecord(record)">查看</a>
+                <operation-button
+                  @click="handleEditRecord(record)" >修改</operation-button>
+                <operation-button
+                  title="确认该条维修记录?"
+                  @confirm="deleteRecord(record.id)" >删除</operation-button>
+              </template>
+            </span>
+          </a-table>
+        </div>
         <div class="main gutter-color" v-show="current == 4">
           <div class="title">备件清单</div>
           <div style="margin:20px;" class="table-operator" v-if="$auth('repair-application-forms-finish')">
@@ -248,6 +268,31 @@
             </span>
           </a-table>
         </div>
+        <div class="main gutter-color" v-show="current == 7">
+          <div class="title">维修方案</div>
+          <div style="margin:20px;margin-left:45%;" class="table-operator" >
+            <a-button type="primary" @click="handleAddRepairResolve">
+              <a-icon type="plus"/>
+              添加方案
+            </a-button>
+          </div>
+          <a-table
+            :data-source="dataRepairResolve"
+            :columns="columnsRepairResolve"
+            tableLayout="auto"
+            rowKey="id">
+            <span slot="action" slot-scope="record">
+              <template>
+                <a @click="handleViewRepairResolve(record)">方案详情</a>
+                <operation-button
+                  @click="handleEditRepairResolve(record)" >修改</operation-button>
+<!--                <operation-button
+                  title="确认该条维修记录?"
+                  @confirm="deleteRepairResolve(record.id)" >删除</operation-button>-->
+              </template>
+            </span>
+          </a-table>
+        </div>
       </div>
       <div class="btn">
         <a-button v-if="$auth('repair-application-forms-finish')" style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
@@ -283,6 +328,8 @@
     <base-form ref="baseRepairProjectModal" @ok="handleOk"/>
     <detail ref="detailRepairProjectModal"/>
     <edit-form ref="editForm" @ok="handleOk" />
+    <resolve-base-form ref='resolveBaseForm' @ok='handleResolveOk'/>
+    <resolve-detail ref='resolveDetail' @ok='handleResolveOk'/>
   </div>
 </template>
 
@@ -312,11 +359,15 @@ import { deleteRepairFees, fetchRepairFee, queryRepairFee } from '@/api/repair/f
 import ReasonBaseForm from '@/views/repair/repair-reason/modules/BaseForm'
 import ReasonDetail from '@/views/repair/repair-reason/modules/Detail'
 import { deleteRepairReasons, fetchRepairReason, queryRepairReason } from '@/api/repair/repair-reason'
+import { queryRepairRecord } from '@/api/customize/fieldTemplateData'
 import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
 import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
 import { fetchSbInfo } from '@/api/sb/info'
+import { getRepairSchemePage, fetchRepairScheme } from '@/api/repair/repair'
 import BaseForm from '@/views/repair/repairproject/modules/BaseForm'
 import Detail from '@/views/repair/repairproject/modules/Detail'
+import ResolveBaseForm from '@/views/repair/repair/modules/BaseForm'
+import ResolveDetail from '@/views/repair/repair/modules/Detail'
 const DetailListItem = DetailList.Item
 
 export default {
@@ -344,7 +395,9 @@ export default {
     BaseFormForRepair,
     SpareStoreSelectModal,
     BaseForm,
-    Detail
+    Detail,
+    ResolveBaseForm,
+    ResolveDetail
   },
   data () {
     return {
@@ -372,6 +425,8 @@ export default {
       dataSpare: [],
       dataFee: [],
       dataReason: [],
+      dataRepairResolve: [],
+      dataRecord: [],
       // 表头
       columns: [
         {
@@ -486,6 +541,78 @@ export default {
           scopedSlots: { customRender: 'action' }
         }
       ],
+      columnsRecord: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          width: '70px',
+          customRender: (text, record, index) => {
+            return `${index + 1}`
+          }
+        },
+        {
+          title: '维修时间',
+          dataIndex: 'createdTime',
+          width: '150px'
+        },
+        {
+          title: '结束时间',
+          dataIndex: 'updateTime',
+          width: '150px'
+        },
+        {
+          title: '维修人',
+          dataIndex: 'createdUserName',
+          ellipsis: true,
+          width: '150px'
+        },
+        {
+          title: '维修意见',
+          dataIndex: 'dataRemark',
+          ellipsis: true,
+          width: '150px'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      columnsRepairResolve: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          width: '70px',
+          customRender: (text, record, index) => {
+            return `${index + 1}`
+          }
+        },
+        {
+          title: '维修意见',
+          dataIndex: 'opinion',
+          width: '200px'
+        },
+        {
+          title: '方案提供者',
+          dataIndex: 'createdUserName',
+          width: '120px'
+        },
+        {
+          title: '方案提供时间',
+          dataIndex: 'createdTime',
+          ellipsis: true,
+          width: '150px'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
       columnsReason: [
         {
           title: '序号',
@@ -560,7 +687,8 @@ export default {
         'limitDate': null,
         'updateUserName': null,
         'repairFormVO': null,
-        'repairCheckVO': null
+        'repairCheckVO': null,
+        'checkUserName': null
       }
     }
   },
@@ -614,6 +742,12 @@ export default {
       queryRepairReason({ repairId: this.model.id }).then(res => {
         this.dataReason = res.data
       })
+      queryRepairRecord({ objId: this.model.id, remark: 'repair_record' }).then(res => {
+        this.dataRecord = res.data
+      })
+      getRepairSchemePage({ repairId: this.model.id }).then(res => {
+        this.dataRepairResolve = res.data.rows
+      })
     },
     handleViewBom (record) {
       this.visible = false
@@ -682,6 +816,24 @@ export default {
         modal.base(res.data)
       })
     },
+    handleAddRepairResolve () {
+      const modal = this.$refs.resolveBaseForm
+      modal.base({ repairId: this.model.id, repairNo: this.model.no })
+    },
+    handleViewRepairResolve (record) {
+      this.visible = false
+      fetchRepairScheme({ id: record.id }).then(res => {
+        const modal = this.$refs.resolveDetail
+        modal.base(res.data)
+      })
+    },
+    handleEditRepairResolve (record) {
+      fetchRepairScheme({ id: record.id }).then(res => {
+        const modal = this.$refs.resolveBaseForm
+        const data = res.data
+        modal.base(data)
+      })
+    },
     batchDeleteReason (id) {
       let ids = []
       if (this.BaseTool.String.isBlank(id)) {
@@ -746,6 +898,14 @@ export default {
       })
       this.init()
     },
+    handleResolveOk () {
+      this.loading = true
+      this.visible = true
+      getRepairSchemePage({ repairId: this.model.id }).then(res => {
+        this.loading = false
+        this.dataRepairResolve = res.data.rows
+      })
+    },
     handleFinish () {
       const modal = this.$refs.finishForm
       modal.base(this.model)

+ 96 - 0
src/views/repair/application-form/modules/RefusedForm.vue

@@ -0,0 +1,96 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+  >
+    <a-form :form="form">
+      <a-form-item v-show='false'>
+        <a-input v-decorator="['id']" type='hidden' />
+        <a-input v-decorator="['userId']" type='hidden' />
+        <a-input v-decorator="['no']" type='hidden' />
+        <a-input v-decorator="['repairStartTime']" type='hidden' />
+      </a-form-item>
+      <row-list :col="1">
+        <row-item>
+          <a-form-item
+            label="驳回原因"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-textarea
+              :rows="4"
+              v-decorator="['remark']"/>
+          </a-form-item>
+        </row-item>
+      </row-list>
+    </a-form>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import { refusedByDTO } from '@/api/repair/application-form'
+import pick from 'lodash.pick'
+export default {
+  name: 'DispatchBaseForm',
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false
+      // 下拉框map
+    }
+  },
+  props: {
+  },
+  created () {
+    // 下拉框map
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      // 如果是空标识添加
+      const { form: { setFieldsValue } } = this
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign(pick(record, [
+          'id',
+          'no',
+          'userId',
+          'repairStartTime'
+        ])))
+      })
+      this.modalTitle = '驳回'
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        refusedByDTO(values)
+          .then(() => {
+            this.handleCancel(values)
+          }).catch(() => {
+            this.confirmLoading = false
+          })
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        this.$emit('ok')
+      }
+    }
+  }
+}
+</script>

+ 268 - 0
src/views/repair/repair/RepairScheme.vue

@@ -0,0 +1,268 @@
+<template>
+    <a-card :bordered="false">
+        <div v-show="visible">
+            <div class="table-page-search-wrapper"  @keyup.enter="handleEnter">
+                <a-form layout="inline">
+                    <a-row :gutter="48" v-show="advanced">
+                        <a-col :md="6" :sm="24">
+                            <a-form-item label="关键字">
+                                <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                            </a-form-item>
+                        </a-col>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </a-row>
+                    <a-row :gutter="48">
+                        <a-col :md="24 || 24" :sm="24" style="text-align: right">
+                            <span class="table-page-search-submitButtons">
+                              <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                              <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                              <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                              </a>
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+
+            <div class="table-operator" style="margin-bottom: 8px;">
+                <a-row>
+                    <a-col :md="16">
+                        <a-button v-if="$auth('repair-repairs-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+                        <a-button style="margin-left: 8px" v-if="$auth('repair-repairs-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+                        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('repair-repairs-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>
+                    </a-col>
+                </a-row>
+            </div>
+
+            <s-table
+                    ref="table"
+                    size="default"
+                    rowKey="id"
+                    :columns="columns"
+                    :data="loadData"
+                    :alert="options.alert"
+                    :rowSelection="options.rowSelection"
+                    showPagination="auto"
+            >
+                <span slot="action" slot-scope="record">
+                  <template>
+                    <a @click="handleView(record)">查看</a>
+                    <operation-button
+                            v-if="$auth('repair-repairs-edit')" @click="handleEdit(record)"
+                          >修改</operation-button>
+                    <operation-button
+                            v-if="$auth('repair-repairs-del')"
+                            :type="2"
+                            title="是否要删除该条数据?"
+                            @confirm="batchDelete(record.id)">删除</operation-button>
+                  </template>
+                </span>
+            </s-table>
+        </div>
+        <base-form ref="baseModal" @ok="handleOk"/>
+        <detail ref="detailModal" @ok="handleOk"/>
+    </a-card>
+</template>
+
+<script>
+    import { STable, Ellipsis } from '@/components'
+    import BaseForm from './modules/BaseForm'
+    import Detail from './modules/Detail'
+    import { getRepairSchemePage, deleteRepairSchemes, fetchRepairScheme, exportRepairScheme } from '@/api/repair/repair'
+
+    export default {
+        name: 'RepairSchemeList',
+        components: {
+            STable,
+            Ellipsis,
+            BaseForm,
+            Detail
+        },
+        data () {
+            return {
+                advanced: false,
+                visible: true,
+                // 查询参数
+                queryParam: {
+                },
+                // 表头
+                columns: [
+                    {
+                        title: '序号',
+                        dataIndex: 'index',
+                        customRender: (text, record, index) => {
+                            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+                        }
+                    },
+                                                                                                                                                {
+                                title: '维修单',
+                                dataIndex: 'repairId'
+                            },
+                                                                                                                                                        {
+                                title: '维修意见',
+                                dataIndex: 'opinion'
+                            },
+                                                                                                                                                        {
+                                title: '维修意见图',
+                                dataIndex: 'imageList'
+                            },
+                                                                                                                                                        {
+                                title: '维修方案文件',
+                                dataIndex: 'opinionFile'
+                            },
+                                                                                                                                                                                                                                                {
+                                title: '方案提供者',
+                                dataIndex: 'createdUserName'
+                            },
+                                                                                                                                                                                                    {
+                                title: '方案添加时间',
+                                dataIndex: 'createdTime'
+                            },
+                                                                                                                                                                                                    {
+                                title: '状态保留字段',
+                                dataIndex: 'status'
+                            },
+                                                                                                                                                        {
+                                title: '删除标识 0 正常 1 删除',
+                                dataIndex: 'deleteFlag'
+                            },
+                                                                                            {
+                        title: '操作',
+                        key: 'action',
+                        width: '200px',
+                        align: 'center',
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            // 加载数据方法 必须为 Promise 对象
+                loadData: parameter => {
+                    parameter = {
+                        ...parameter,
+                        ...this.queryParam,
+                        dataScope: {
+                            sortBy: 'desc',
+                            sortName: 'update_time'
+                        }
+                    }
+                    return getRepairSchemePage(Object.assign(parameter, this.queryParam))
+                            .then(res => {
+                                return res.data
+                            })
+                },
+                selectedRowKeys: [],
+                selectedRows: [],
+
+                options: {
+                    alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                    rowSelection: {
+                        selectedRowKeys: this.selectedRowKeys,
+                        onChange: this.onSelectChange
+                    }
+                },
+                optionAlertShow: false
+            }
+        },
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            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]
+                }
+                deleteRepairSchemes(ids).then(res => {
+                    this.$message.info('删除成功')
+                    this.handleOk()
+                    this.$refs.table.clearSelected()
+                })
+            },
+            handleAdd () {
+                this.visible = false
+                const modal = this.$refs.baseModal
+                modal.base()
+            },
+            handleEdit (record) {
+                this.visible = false;
+                fetchRepairScheme({ id: record.id }).then(res => {
+                    const modal = this.$refs.baseModal
+                    modal.base(res.data)
+                })
+            },
+            handleView (record) {
+                this.visible = false;
+                fetchRepairScheme({ id: record.id }).then(res => {
+                    const modal = this.$refs.detailModal
+                    modal.base(res.data)
+                })
+            },
+            handleOk (values) {
+                this.visible = true
+                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
+                }
+                exportRepairScheme(parameter).then(file => {
+                    this.BaseTool.Util.downLoadExportExcel(file)
+                })
+            },
+            handleEnter () {
+                this.$refs.table.refresh(true)
+            }
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
+    }
+</script>

+ 251 - 0
src/views/repair/repair/modules/BaseForm.vue

@@ -0,0 +1,251 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @cancel="handleCancel"
+  >
+    <a-form :form='form'>
+
+      <a-form-item v-show='false'>
+        <a-input v-decorator="['id']" type='hidden' />
+        <a-input v-decorator="['repairId']" type='hidden' />
+      </a-form-item>
+
+      <row-list :col='1'>
+        <row-item>
+          <a-form-item
+            label='维修单号'
+            :labelCol='BaseTool.Constant.labelCol'
+            :wrapperCol='BaseTool.Constant.wrapperCol'
+          >
+            <a-input
+              disabled='disabled'
+              v-decorator="['repairNo']" />
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="方案描述"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-textarea
+              :rows="4"
+              v-decorator="['opinion', {rules: [{required: true, message: '故障描述不能为空'}]}]"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="方案图片"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-upload
+              :action="uploadUrl"
+              :multiple="true"
+              list-type="picture"
+              :file-list="this.defaultApplicationFileList"
+              @change="handleApplicationFileChange"
+              accept="image/*"
+              :headers="headers"
+            >
+              <a-button> <a-icon type="upload" /> 上传图片 </a-button>
+            </a-upload>
+          </a-form-item>
+        </row-item>
+<!--        <row-item>
+          <a-form-item
+            label='方案图'
+            :labelCol='BaseTool.Constant.labelCol'
+            :wrapperCol='BaseTool.Constant.wrapperCol'
+          >
+            <a-input
+              v-decorator="['imageList', {rules: [{required: true, message: '维修意见图不能为空'}]}]" />
+          </a-form-item>
+        </row-item>-->
+        <row-item>
+          <a-form-item
+            label="维修方案"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-upload
+              :action="uploadUrl"
+              :multiple="true"
+              :file-list="defaultFileList"
+              @change="handleFileChange"
+              :headers="headers"
+            >
+              <a-button> <a-icon type="upload" /> 上传文件 </a-button>
+            </a-upload>
+          </a-form-item>
+
+<!--          <a-form-item
+            label='维修方案文件'
+            :labelCol='BaseTool.Constant.labelCol'
+            :wrapperCol='BaseTool.Constant.wrapperCol'
+          >
+            <a-input
+              v-decorator="['opinionFile', {rules: [{required: true, message: '维修方案文件不能为空'}]}]" />
+          </a-form-item>-->
+        </row-item>
+        <!--<row-item>
+          <a-form-item
+            label='状态保留字段'
+            :labelCol='BaseTool.Constant.labelCol'
+            :wrapperCol='BaseTool.Constant.wrapperCol'
+          >
+            <a-input-number
+              style='width: 100%'
+              :min='0'
+              :formatter='BaseTool.Amount.formatter'
+              :parser='BaseTool.Amount.parser'
+              v-decorator="['status', {rules: [{required: true, message: '状态保留字段不能为空'}]}]" />
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label='删除标识 0 正常 1 删除'
+            :labelCol='BaseTool.Constant.labelCol'
+            :wrapperCol='BaseTool.Constant.wrapperCol'
+          >
+            <a-input-number
+              style='width: 100%'
+              :min='0'
+              :formatter='BaseTool.Amount.formatter'
+              :parser='BaseTool.Amount.parser'
+              v-decorator="['deleteFlag', {rules: [{required: true, message: '删除标识 0 正常 1 删除不能为空'}]}]" />
+          </a-form-item>
+        </row-item>-->
+      </row-list>
+    </a-form>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import { addRepairScheme, updateRepairScheme } from '@/api/repair/repair'
+import { uploadUrl } from '@/api/upms/file'
+import Vue from 'vue'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+
+export default {
+  name: 'BaseRepairScheme',
+  data () {
+    return {
+      confirmLoading: false,
+      modalTitle: null,
+      form: this.$form.createForm(this),
+      visible: false,
+      uploadUrl: uploadUrl,
+      defaultApplicationFileList: [],
+      applicationFileList: [],
+      defaultFileList: [],
+      fileList: [],
+      headers: {
+        Authorization: 'Bearer ' + Vue.ls.get(ACCESS_TOKEN)
+      }
+    }
+  },
+  props: {},
+  components: {
+    uploadUrl
+  },
+  created () {
+    // 下拉框map
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.defaultFileList = []
+      this.applicationFileList = []
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign(pick(record, [
+          'id',
+          'repairId',
+          'opinion',
+          'imageList',
+          'opinionFile',
+          'status',
+          'deleteFlag',
+          'repairNo'
+        ])))
+      })
+      // 如果是空标识添加
+      if (this.BaseTool.Object.isBlank(record)) {
+        this.modalTitle = '维修方案'
+        return
+      }
+      this.modalTitle = '编辑'
+      this.defaultApplicationFileList = this.BaseTool.UPLOAD.transImg(record.imageList)
+      this.defaultFileList = this.BaseTool.UPLOAD.transImg(record.opinionFile)
+    },
+    save () {
+      const { form: { validateFieldsAndScroll } } = this
+      this.confirmLoading = true
+      validateFieldsAndScroll((errors, values) => {
+        if (errors) {
+          this.confirmLoading = false
+          return
+        }
+        values.imageList = this.applicationFileList // 维修方案图片
+        values.opinionFile = this.fileList // 维修方案文件
+        // 日期处理
+        if (this.BaseTool.String.isBlank(values.id)) {
+          addRepairScheme(values)
+            .then(() => {
+              this.handleCancel(values)
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+        } else {
+          updateRepairScheme(values)
+            .then(() => {
+              this.handleCancel(values)
+            }).catch(() => {
+              this.confirmLoading = false
+            })
+        }
+      })
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.confirmLoading = false
+      this.form.resetFields()
+      this.defaultApplicationFileList = []
+      if (this.BaseTool.Object.isNotBlank(values)) {
+        this.$emit('ok', values)
+      } else {
+        this.$emit('ok')
+      }
+    },
+    handleApplicationFileChange (info) {
+      this.defaultApplicationFileList = info.fileList
+      this.applicationFileList = this.setFileList(info, 11)
+    },
+    handleFileChange (info) {
+      this.defaultFileList = info.fileList
+      this.fileList = this.setFileList(info, 19)
+    },
+    setFileList (info, type) {
+      const file = info.file
+      const fileList = info.fileList
+      if (file.status === 'done') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'removed') {
+        return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
+      } else if (file.status === 'error') {
+        this.$message.error('上传失败')
+        return []
+      }
+    }
+  }
+}
+</script>

+ 87 - 0
src/views/repair/repair/modules/Detail.vue

@@ -0,0 +1,87 @@
+<template>
+  <a-card :bordered='false' v-show='visible' class='card' :title='modalTitle'>
+    <a-row :gutter='48' slot='extra'>
+      <a-col :md='48' :sm='48'>
+              <span class='table-page-search-submitButtons' style='float: right'>
+                <a-button style='margin-left: 8px' type='default' @click='handleCancel()'>返回</a-button>
+              </span>
+      </a-col>
+    </a-row>
+    <detail-list title='' :col='2'>
+      <detail-list-item term='方案提供者'>{{ model.createdUserName }}</detail-list-item>
+      <detail-list-item term='方案提供时间'>{{ model.createdTime }}</detail-list-item>
+      <detail-list-item term='方案修改者'>{{ model.updateUserName }}</detail-list-item>
+      <detail-list-item term='方案修改时间'>{{ model.updateTime }}</detail-list-item>
+    </detail-list>
+    <detail-list title='' :col='1'>
+      <detail-list-item term='维修意见'>{{ model.opinion }}</detail-list-item>
+    </detail-list>
+    <title-divider title="维修方案" width="90px"></title-divider>
+    <detail-list title="" :col="1">
+      <detail-list-item term="" v-if="model.imageList != null && model.imageList.length > 0">
+        <viewer :images="model.imageList" @inited="inited" ref="viewer" :index="1" >
+          <img v-for="item in model.imageList" :src="item.url" :key="item.id" class="image">
+        </viewer>
+      </detail-list-item>
+      <detail-list-item term="" v-if="model.imageList == null || model.imageList.length === 0">
+        暂无
+      </detail-list-item>
+    </detail-list>
+    <detail-list title="" :col="8">
+      <detail-list-item term="方案文件">
+        <a-upload
+          :multiple="true"
+          :fileList="BaseTool.UPLOAD.transImg(model.opinionFile)"
+        >
+        </a-upload>
+      </detail-list-item>
+    </detail-list>
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'RepairSchemeDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data() {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      model: {
+        'opinion': null,
+        'imageList': null,
+        'opinionFile': null,
+        'createdUserName': null,
+        'createdTime': null,
+        'updateUserName': null,
+        'updateTime': null
+      }
+    }
+  },
+  created () {
+    // 下拉框map
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '方案详情'
+      this.model = record
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.$emit('ok')
+    }
+  }
+}
+</script>

+ 300 - 0
src/views/repair/repair/modules/RepairSchemeSelectModal.vue

@@ -0,0 +1,300 @@
+<template>
+    <a-modal
+            :title="modalTitle"
+            :width="1000"
+            :visible="visible"
+            :confirmLoading="confirmLoading"
+            class="ant-modal2"
+            @cancel="handleCancel"
+    >
+        <a-card :bordered="false">
+            <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="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                            </a-form-item>
+                        </a-col>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a-col :md="6 || 24" :sm="24">
+                            <span class="table-page-search-submitButtons">
+                                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                                <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
+                                  {{ advanced ? '收起' : '展开' }}
+                                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                                </a>
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+
+            <div class="table-operator">
+            </div>
+
+            <s-table
+                    ref="table"
+                    size="default"
+                    rowKey="id"
+                    :columns="columns"
+                    :data="loadData"
+                    :alert="options.alert"
+                    :customRow="options.customRow"
+                    :rowSelection="options.rowSelection"
+                    showPagination="auto"
+            >
+                <span slot="action" slot-scope="record1">
+                  <template>
+                    <a @click="handleView(record1)">查看</a>
+                  </template>
+                </span>
+            </s-table>
+            <detail ref="detailModal"/>
+        </a-card>
+        <template slot="footer">
+            <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
+            <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">确定</a-button>
+        </template>
+    </a-modal>
+</template>
+
+<script>
+    import { STable, Ellipsis } from '@/components'
+    import Detail from './Detail'
+    import { getRepairSchemePage, fetchRepairScheme } from '@/api/repair/repair'
+
+    export default {
+        name: 'RepairSchemeSelectModal',
+        components: {
+            STable,
+            Ellipsis,
+            Detail
+        },
+        props: {
+            type: {
+                type: String,
+                default: 'radio'
+            },
+            selectedRowKey: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            },
+            selectedRow: {
+                type: Array,
+                default: () => {
+                    return []
+                }
+            }
+        },
+        data () {
+            return {
+                advanced: false,
+                confirmLoading: false,
+                mdl: {},
+                modalTitle: null,
+                visible: false,
+                record: null,
+                // 查询参数
+                queryParam: {
+                },
+                extraQueryParam: {
+                },
+                // 表头
+                columns: [
+                    {
+                        title: '序号',
+                        dataIndex: 'index',
+                        customRender: (text, record, index) => {
+                            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+                        }
+                    },
+                                                                                                                                                {
+                                title: '维修单',
+                                dataIndex: 'repairId'
+                            },
+                                                                                                                                                        {
+                                title: '维修意见',
+                                dataIndex: 'opinion'
+                            },
+                                                                                                                                                        {
+                                title: '维修意见图',
+                                dataIndex: 'imageList'
+                            },
+                                                                                                                                                        {
+                                title: '维修方案文件',
+                                dataIndex: 'opinionFile'
+                            },
+                                                                                                                                                                                                                                                {
+                                title: '方案提供者',
+                                dataIndex: 'createdUserName'
+                            },
+                                                                                                                                                                                                    {
+                                title: '方案添加时间',
+                                dataIndex: 'createdTime'
+                            },
+                                                                                                                                                                                                        {
+                                    title: '状态保留字段',
+                                    dataIndex: 'status',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                                                                                            {
+                                    title: '删除标识 0 正常 1 删除',
+                                    dataIndex: 'deleteFlag',
+                                    customRender: (text, record, index) => {
+                                        return this.BaseTool.Amount.formatter(text)
+                                    }                                ,
+                                },
+                                                                                            {
+                        title: '操作',
+                        key: 'action',
+                        width: '200px',
+                        align: 'center',
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            // 加载数据方法 必须为 Promise 对象
+                loadData: parameter => {
+                    parameter = {
+                        ...parameter,
+                        ...this.queryParam,
+                        ...this.extraQueryParam,
+                        dataScope: {
+                            sortBy: 'desc',
+                            sortName: 'update_time'
+                        }
+                    }
+                    return getRepairSchemePage(Object.assign(parameter, this.queryParam))
+                            .then(res => {
+                                return res.data
+                            })
+                },
+                selectedRowKeys: [],
+                selectedRows: [],
+
+                options: {
+                    alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                    rowSelection: {
+                        selectedRowKeys: this.selectedRowKeys,
+                        onChange: this.onSelectChange
+                    }
+                },
+                optionAlertShow: false,
+                isCreated: false
+            }
+        },
+        created () {
+            // 下拉框map
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        methods: {
+            tableOption () {
+                if (!this.optionAlertShow) {
+                    this.options = {
+                        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+                        rowSelection: {
+                            selectedRowKeys: this.selectedRowKeys,
+                            onChange: this.onSelectChange,
+                            type: this.type,
+                            getCheckboxProps: record => ({
+                                props: {
+                                    disabled: false,
+                                    name: record.id
+                                }
+                            })
+                        },
+                        customRow: (record) => {
+                            return {
+                                on: { // 事件
+                                    click: (event) => { // 点击行
+                                        // 选择对象
+                                        this.mySelect([record.id], [record])
+                                    },
+                                    dblclick: (event) => {
+                                        this.mySelect([record.id], [record])
+                                        this.handleSelect()
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    this.optionAlertShow = true
+                } else {
+                    this.options = {
+                        alert: false,
+                        rowSelection: null
+                    }
+                    this.optionAlertShow = false
+                }
+            },
+            handleView (record) {
+                fetchRepairScheme({ id: record.id }).then(res => {
+                    const modal = this.$refs.detailModal
+                    modal.base(res.data)
+                })
+            },
+            handleOk () {
+                this.$refs.table.refresh()
+            },
+            onSelectChange (selectedRowKeys, selectedRows) {
+                this.selectedRowKeys = selectedRowKeys
+                this.selectedRows = selectedRows
+            },
+            resetSearchForm () {
+                this.queryParam = {
+                }
+                this.$refs.table.refresh(true)
+            },
+            base (record, queryParam = {}) {
+                this.visible = true
+                this.modalTitle = '选择信息'
+                this.extraQueryParam = queryParam
+                this.record = record
+                if (this.isCreated) {
+                    this.$refs.table.clearSelected()
+                    this.options.rowSelection.type = this.type
+                    this.handleOk()
+                } else {
+                    this.tableOption()
+                    this.isCreated = true
+                }
+            },
+            handleCancel () {
+                this.visible = false
+                this.confirmLoading = false
+            },
+            handleSelect () {
+                if (this.selectedRowKeys.length === 0) {
+                    this.$message.warn('请至少选择一项信息')
+                } else {
+                    this.confirmLoading = true
+                    this.$emit('selected', this.record, this.selectedRowKeys, this.selectedRows)
+                    this.confirmLoading = false
+                    this.visible = false
+                }
+            },
+            mySelect(selectedRowKeys, selectedRows) {
+                if (this.type === 'radio') {
+                    this.$refs.table.updateSelect(selectedRowKeys, selectedRows)
+                            this.$refs.table.rowSelection.onChange(selectedRowKeys, selectedRows)
+                } else {
+                    let mySelectedRowKeys
+                    let mySelectedRows = this.selectedRows.filter(item => item.id !== selectedRowKeys[0])
+                    if (this.selectedRowKeys.includes(selectedRowKeys[0])) {
+                        mySelectedRowKeys = this.selectedRowKeys.filter(item => item !== selectedRowKeys[0])
+                    } else {
+                        mySelectedRowKeys = [...selectedRowKeys, ...this.selectedRowKeys]
+                        mySelectedRows = [...mySelectedRows, ...selectedRows]
+                    }
+                    this.$refs.table.updateSelect(mySelectedRowKeys, mySelectedRows)
+                            this.$refs.table.rowSelection.onChange(mySelectedRowKeys, mySelectedRows)
+                }
+
+            }
+        }
+    }
+</script>