xiongchao 3 lat temu
rodzic
commit
f23f96abfc

+ 8 - 0
src/utils/dict.js

@@ -119,6 +119,7 @@ DictCache.TYPE = {
   REPAIR_APPLICATION_FORM_LEVEL: 'REPAIR_APPLICATION_FORM_LEVEL', // 紧急等级
   REPAIR_APPLICATION_FORM_STATUS: 'REPAIR_APPLICATION_FORM_STATUS', // 报修状态
   REPAIR_REASON_STATUS: 'REPAIR_REASON_STATUS', // 分析措施状态
+  REPAIR_REASON_TYPE: 'REPAIR_REASON_TYPE', // 分析措施类别
   REPAIR_QUESTION: 'REPAIR_QUESTION', // 故障描述
   YES_NO: 'YES_NO', // 是否
   REPAIR_FORM_STATUS: 'REPAIR_FORM_STATUS', // 维修状态
@@ -1198,6 +1199,13 @@ DictCache.COLOR = {
     7: 'error', // 停用中
     8: 'error' // 维修中
   },
+  /**
+   * 改进措施状态
+   */
+  REPAIR_REASON_STATUS: {
+    1: 'processing', // 处理中
+    2: 'success' // 已完成
+  },
   /**
    * 备件状态
    */

+ 0 - 1
src/views/check/checkstandard/modules/DetailSbCheck.vue

@@ -288,7 +288,6 @@ export default {
       this.$refs.sbInfoSelectModal.base()
     },
     handleSbSelected (keys, rows) {
-      const [ key ] = keys
       const [ row ] = rows
       // 日期处理
       copy({ sbId: this.model.id, copySbId: row.id })

+ 29 - 29
src/views/repair/application-form/modules/DetailRepairOut.vue

@@ -7,7 +7,7 @@
             <a-popconfirm v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要接收?" @confirm="receive">
               <a-button>接收</a-button>
             </a-popconfirm>
-<!--            <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleEdit()">编辑</a-button>-->
+            <!--            <a-button v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleEdit()">编辑</a-button>-->
             <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleFinish()">委外维修完成</a-button>
             <!--          <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleSparePick">领用备件</a-button>-->
             <a-button style="margin-left: 8px" @click="handleCancel">返回</a-button>
@@ -72,33 +72,33 @@
           </template>
         </span>
       </a-table>
-<!--      <title-divider title="原因分析" width="90px"></title-divider>-->
-<!--      <div class="table-operator" v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)">-->
-<!--        <a-button type="primary" @click="handleAddReason">-->
-<!--          <a-icon type="plus"/>-->
-<!--          添加-->
-<!--        </a-button>-->
-<!--      </div>-->
-<!--      <a-table-->
-<!--        :data-source="dataReason"-->
-<!--        :columns="columnsReason"-->
-<!--        tableLayout="fixed"-->
-<!--        rowKey="id">-->
-<!--        <span slot="action" slot-scope="record">-->
-<!--          <template>-->
-<!--            <a @click="handleViewReason(record)">查看</a>-->
-<!--            <operation-button-->
-<!--              v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"-->
-<!--              @click="handleEditReason(record)" >修改</operation-button>-->
+      <!--      <title-divider title="原因分析" width="90px"></title-divider>-->
+      <!--      <div class="table-operator" v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)">-->
+      <!--        <a-button type="primary" @click="handleAddReason">-->
+      <!--          <a-icon type="plus"/>-->
+      <!--          添加-->
+      <!--        </a-button>-->
+      <!--      </div>-->
+      <!--      <a-table-->
+      <!--        :data-source="dataReason"-->
+      <!--        :columns="columnsReason"-->
+      <!--        tableLayout="fixed"-->
+      <!--        rowKey="id">-->
+      <!--        <span slot="action" slot-scope="record">-->
+      <!--          <template>-->
+      <!--            <a @click="handleViewReason(record)">查看</a>-->
+      <!--            <operation-button-->
+      <!--              v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"-->
+      <!--              @click="handleEditReason(record)" >修改</operation-button>-->
 
-<!--            <operation-button-->
-<!--              v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"-->
-<!--              :type="2"-->
-<!--              title="确认删除该记录?"-->
-<!--              @confirm="batchDeleteReason(record.id)" >删除</operation-button>-->
-<!--          </template>-->
-<!--        </span>-->
-<!--      </a-table>-->
+      <!--            <operation-button-->
+      <!--              v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"-->
+      <!--              :type="2"-->
+      <!--              title="确认删除该记录?"-->
+      <!--              @confirm="batchDeleteReason(record.id)" >删除</operation-button>-->
+      <!--          </template>-->
+      <!--        </span>-->
+      <!--      </a-table>-->
 
     </a-card>
     <check-form ref="checkForm" @ok="handleOk" />
@@ -107,10 +107,10 @@
     <dispatch-form ref="dispatchForm" @ok="handleCancel" />
     <assign-form ref="assignForm" @ok="handleCancel" />
     <spare-pick-base-form ref="baseModal" @ok="handleOk"/>
-<!--    <repair-project-select-Modal :type="'checkbox'" ref="repairProjectSelectModal" @selected="handleRepairProjectSelected"/>-->
+    <!--    <repair-project-select-Modal :type="'checkbox'" ref="repairProjectSelectModal" @selected="handleRepairProjectSelected"/>-->
     <!--    <spare-part-info-select-modal :type="'checkbox'" ref="spareSelectModal" @selected="handleSpareSelected"/>-->
     <base-form-for-repair ref="baseFormForRepair" @ok="handleOk" />
-<!--    <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>-->
+    <!--    <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>-->
     <fee-base-form ref="feeForm" @ok="handleOk" />
     <fee-detail ref="feeDetail" @ok="handleOk" />
     <reason-base-form ref="reasonForm" @ok="handleOk" />

+ 2 - 0
src/views/repair/repair-reason/RepairReason.vue

@@ -159,6 +159,8 @@ export default {
   created () {
     // 下拉框map
     this.tableOption()
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_STATUS)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     tableOption () {

+ 154 - 203
src/views/repair/repair-reason/modules/BaseForm.vue

@@ -1,217 +1,141 @@
 <template>
   <a-card :bordered="false" :title="modalTitle" v-show="visible">
-    <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="primary" @click="finish()">完成</a-button>-->
-          <a-button style="margin-left: 8px" type="primary" @click="save()">保存</a-button>
-          <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
-        </span>
-      </a-col>
-    </a-row>
-    <title-divider title="基本信息" width="90px"></title-divider>
-    <a-form :form="form">
-      <a-form-item v-show="false" >
-        <a-input v-decorator="['id']" type="hidden"/>
-        <a-input v-decorator="['sbId']" type="hidden"/>
-        <a-input v-decorator="['repairId']" type="hidden"/>
-      </a-form-item>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="编号"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-input
-              disabled="disabled"
-              v-decorator="['no']"
-            />
-          </a-form-item>
+    <div v-show="visible2">
+      <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="primary" @click="finish()">完成</a-button>-->
+            <a-button style="margin-left: 8px" type="primary" @click="save()">保存</a-button>
+            <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+          </span>
         </a-col>
       </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="分析时间"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-date-picker
-              style="width: 100%"
-              v-decorator="['analyzeTime', {rules: [{required: true, message: '分析时间不能为空'}]}]"
-              :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="故障现象"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2">
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['problemDesc', {rules: [{required: true, message: '分析时间不能为空'}]}]"
-            />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-            label="检查处理过程"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['checkProcess', {rules: [{required: true, message: '检查处理过程不能为空'}]}]"/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-            label="原因分析">
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['reasonAnalysis', {rules: [{required: true, message: '原因分析不能为空'}]}]" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <title-divider title="改进措施" width="90px"></title-divider>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="更新维修计划"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-checkbox :checked="changeRepairPlan" v-model="changeRepairPlan"></a-checkbox>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="内容"
-            v-show="changeRepairPlan"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['changeRepairPlanContent']" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="更新备件计划"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-checkbox :checked="changeSparePlan" v-model="changeSparePlan"></a-checkbox>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="内容"
-            v-show="changeSparePlan"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['changeSparePlanContent']" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="人员培训"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-checkbox :checked="userTeach" v-model="userTeach"></a-checkbox>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="内容"
-            v-show="userTeach"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['userTeachContent']" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="设备改造升级"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-checkbox :checked="sbChange" v-model="sbChange"></a-checkbox>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="内容"
-            v-show="sbChange"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['sbChangeContent']" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="12" :md="24" :sm="24">
-          <a-form-item
-            label="其他"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol">
-            <a-checkbox :checked="otherChange" v-model="otherChange"></a-checkbox>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
-        <a-col :lg="24" :md="24" :sm="24">
-          <a-form-item
-            label="内容"
-            v-show="otherChange"
-            :labelCol="BaseTool.Constant.labelCol2"
-            :wrapperCol="BaseTool.Constant.wrapperCol2"
-          >
-            <a-textarea
-              :auto-size="{ minRows: 5 }"
-              v-decorator="['otherChangeContent']" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
+      <title-divider title="基本信息" width="90px"></title-divider>
+      <a-form :form="form">
+        <a-form-item v-show="false" >
+          <a-input v-decorator="['id']" type="hidden"/>
+          <a-input v-decorator="['sbId']" type="hidden"/>
+          <a-input v-decorator="['repairId']" type="hidden"/>
+        </a-form-item>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="编号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol">
+              <a-input
+                disabled="disabled"
+                v-decorator="['no']"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="分析时间"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-date-picker
+                style="width: 100%"
+                v-decorator="['analyzeTime', {rules: [{required: true, message: '分析时间不能为空'}]}]"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="24" :md="24" :sm="24">
+            <a-form-item
+              label="故障现象"
+              :labelCol="BaseTool.Constant.labelCol2"
+              :wrapperCol="BaseTool.Constant.wrapperCol2">
+              <a-textarea
+                :auto-size="{ minRows: 5 }"
+                v-decorator="['problemDesc', {rules: [{required: true, message: '分析时间不能为空'}]}]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="24" :md="24" :sm="24">
+            <a-form-item
+              :labelCol="BaseTool.Constant.labelCol2"
+              :wrapperCol="BaseTool.Constant.wrapperCol2"
+              label="检查处理过程"
+            >
+              <a-textarea
+                :auto-size="{ minRows: 5 }"
+                v-decorator="['checkProcess', {rules: [{required: true, message: '检查处理过程不能为空'}]}]"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="24" :md="24" :sm="24">
+            <a-form-item
+              :labelCol="BaseTool.Constant.labelCol2"
+              :wrapperCol="BaseTool.Constant.wrapperCol2"
+              label="原因分析">
+              <a-textarea
+                :auto-size="{ minRows: 5 }"
+                v-decorator="['reasonAnalysis', {rules: [{required: true, message: '原因分析不能为空'}]}]" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <title-divider title="改进措施" width="90px"></title-divider>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="24" :md="24" :sm="24">
+            <a-form-item
+              label="改进类别1"
+              :labelCol="BaseTool.Constant.labelCol2"
+              :wrapperCol="BaseTool.Constant.wrapperCol2"
+            >
+              <a-select @change="changeType" style="width: 70%" v-decorator="['type', {rules: [{required: true, message: '改进类别不能为空'}]}]" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in typeMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+              <a-button v-show="type==1" style="margin-left: 10px" @ok="handleOk" @click="handleViewCheck()" type="default" >保养项目完善</a-button>
+              <a-button v-show="type==2" style="margin-left: 10px" type="default" @ok="handleOk" @click="handleViewBom()">备件bom完善</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="24" :md="24" :sm="24">
+            <a-form-item
+              label="改进内容"
+              :labelCol="BaseTool.Constant.labelCol2"
+              :wrapperCol="BaseTool.Constant.wrapperCol2"
+            >
+              <a-textarea
+                :auto-size="{ minRows: 5 }"
+                v-decorator="['changeRepairPlanContent']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
+    <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
   </a-card>
 </template>
 
 <script>
 import { addRepairReason, updateRepairReason, finishRepairReason } from '@/api/repair/repair-reason'
 import pick from 'lodash.pick'
+import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
+import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
+import { fetchSbInfo } from '@/api/sb/info'
 
 export default {
   name: 'BaseRepairReason',
+  components: {
+    DetailSbCheck,
+    DetailSbBom
+  },
   data () {
     return {
       confirmLoading: false,
@@ -224,8 +148,12 @@ export default {
       otherChange: false,
       addFlag: false,
       statusMap: {},
+      typeMap: {},
+      type: 0,
       form: this.$form.createForm(this),
-      visible: false
+      visible: false,
+      visible2: false,
+      model: null
       // 下拉框map
     }
   },
@@ -233,11 +161,18 @@ export default {
   created () {
     // 下拉框map
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_STATUS)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
+    changeType (value) {
+      console.log(this.type)
+      this.type = value
+    },
     base (record, repairForm = {}) {
       this.visible = true
+      this.visible2 = true
       this.currentTab = 0
+      this.model = repairForm
       const { form: { setFieldsValue } } = this
       // 如果是空标识添加
       if (this.BaseTool.Object.isBlank(record)) {
@@ -355,8 +290,24 @@ export default {
       this.confirmLoading = false
       this.form.resetFields()
       this.$emit('ok', values)
+    },
+    handleOk (values) {
+      this.visible2 = true
+    },
+    handleViewCheck () {
+      this.visible2 = false
+      fetchSbInfo({ id: this.model.sbId }).then(res => {
+        const modal = this.$refs.detailSbCheckModal
+        modal.base(res.data)
+      })
+    },
+    handleViewBom (record) {
+      this.visible2 = false
+      fetchSbInfo({ id: this.model.sbId }).then(res => {
+        const modal = this.$refs.detailSbBomModal
+        modal.base(res.data)
+      })
     }
-
   }
 }
 </script>

+ 36 - 28
src/views/repair/repair-reason/modules/Detail.vue

@@ -12,60 +12,66 @@
       <detail-list-item term="分析时间">{{ model.analyzeTime }}</detail-list-item>
     </detail-list>
 
+    <title-divider title="故障现象" width="120px"></title-divider>
     <a-row>
       <a-col style="margin-top: 10px">
-        <div class="term">故障现象:</div>
         <div class="content">{{ model.problemDesc }}</div>
       </a-col>
     </a-row>
+    <title-divider title="检查处理过程" width="120px"></title-divider>
     <a-row>
       <a-col style="margin-top: 10px">
-        <div class="term">检查处理过程:</div>
         <div class="content">{{ model.checkProcess }}</div>
       </a-col>
     </a-row>
+    <title-divider title="原因分析" width="120px"></title-divider>
     <a-row>
       <a-col style="margin-top: 10px">
-        <div class="term">原因分析:</div>
         <div class="content">{{ model.reasonAnalysis }}</div>
       </a-col>
     </a-row>
-<!--    <a-row>
+    <title-divider title="改进措施类别" width="120px"></title-divider>
+    <a-row>
       <a-col style="margin-top: 10px">
-        <div class="term">改进措施:</div>
-        <div class="content">{{ model.improveMeasure }}</div>
+        <div class="content">{{ BaseTool.Object.getField(typeMap,model.type) }}</div>
       </a-col>
-    </a-row>-->
+    </a-row>
+    <title-divider title="改进措施内容" width="120px"></title-divider>
     <a-row>
       <a-col style="margin-top: 10px">
-        <div class="term">更新维修计划:</div>
         <div class="content">{{ model.changeRepairPlanContent }}</div>
       </a-col>
     </a-row>
-    <a-row>
+<!--    <a-row>
       <a-col style="margin-top: 10px">
         <div class="term">更新备件计划:</div>
         <div class="content">{{ model.changeSparePlanContent }}</div>
       </a-col>
-    </a-row>
-    <a-row>
-      <a-col style="margin-top: 10px">
-        <div class="term">人员培训:</div>
-        <div class="content">{{ model.userTeachContent }}</div>
-      </a-col>
-    </a-row>
-    <a-row>
-      <a-col style="margin-top: 10px">
-        <div class="term">设备改造升级:</div>
-        <div class="content">{{ model.sbChangeContent }}</div>
-      </a-col>
-    </a-row>
-    <a-row>
-      <a-col style="margin-top: 10px">
-        <div class="term">其他:</div>
-        <div class="content">{{ model.otherChangeContent }}</div>
-      </a-col>
-    </a-row>
+    </a-row>-->
+    <!--      <a-row>
+        <a-col style="margin-top: 10px">
+          <div class="term">更新备件计划:</div>
+          <div class="content">{{ model.changeSparePlanContent }}</div>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col style="margin-top: 10px">
+          <div class="term">人员培训:</div>
+          <div class="content">{{ model.userTeachContent }}</div>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col style="margin-top: 10px">
+          <div class="term">设备改造升级:</div>
+          <div class="content">{{ model.sbChangeContent }}</div>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col style="margin-top: 10px">
+          <div class="term">其他:</div>
+          <div class="content">{{ model.otherChangeContent }}</div>
+        </a-col>
+      </a-row>-->
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
     </template>
@@ -108,6 +114,8 @@ export default {
   },
   created () {
     // 下拉框map
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_STATUS)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     base (record) {

+ 2 - 0
src/views/repair/repair-reason/modules/RepairReasonTable.vue

@@ -176,6 +176,8 @@ export default {
   created () {
     // 下拉框map
     this.tableOption()
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_STATUS)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     tableOption () {