xiongchao 3 years ago
parent
commit
7e2f1a9422

+ 1 - 1
src/views/check/checkjob/CheckJob.vue

@@ -308,7 +308,7 @@ export default {
           ...this.queryParam,
           dataScope: {
             sortBy: 'asc',
-            sortName: 'start_time'
+            sortName: 'sbNo'
           }
         }
         return getCheckJobPage(Object.assign(parameter, this.queryParam))

+ 35 - 56
src/views/repair/application-form/modules/Detail.vue

@@ -78,26 +78,7 @@
           </div>
         </a-layout-sider>
       </a-layout>
-      <!--    <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="handleRepairProjectSelect">-->
-      <!--        <a-icon type="plus"/>-->
-      <!--        添加-->
-      <!--      </a-button>-->
-      <!--    </div>-->
-      <!--    <a-table-->
-      <!--      :data-source="data"-->
-      <!--      :columns="columns"-->
-      <!--      tableLayout="auto"-->
-      <!--      rowKey="id">-->
-      <!--    </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="handleSpareSelect">-->
-      <!--          <a-icon type="plus"/>-->
-      <!--          添加-->
-      <!--        </a-button>-->
-      <!--      </div>-->
       <a-table
         :data-source="dataSpare"
         :columns="columnsSpare"
@@ -118,36 +99,29 @@
         :columns="columnsFee"
         tableLayout="auto"
         rowKey="id">
-<!--        <span slot="action" slot-scope="record">-->
-<!--          <template>-->
-<!--            <a @click="handleViewFee(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="handleEditFee(record)" >修改</operation-button>-->
+        <span slot="action" slot-scope="record">
+          <template>
+            <a @click="handleViewFee(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="handleEditFee(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="batchDeleteFee(record.id)" >删除</operation-button>-->
-<!--          </template>-->
-<!--        </span>-->
+            <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="batchDeleteFee(record.id)" >删除</operation-button>
+          </template>
+        </span>
       </a-table>
-      <!--<q-tabs :activeKey="activeKey" @change="changeTab">
-      <q-tab-pane key="a" tab="配件更换">
-        <spare-part-used-select-table :type="1" :table-params="{sbId: model.sbId, modelId: model.modelId, repairId: model.id}" ref="sparePartUsedSelectTable"/>
-      </q-tab-pane>
-      <q-tab-pane key="b" tab="备件领用">
-        <spare-pick-form-select-table :type="1" :table-params="{repairId: model.id, repairNo: model.no}" ref="sparePickFormSelectTable"/>
-      </q-tab-pane>
-    </q-tabs>-->
+
       <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>-->
+      <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"
@@ -156,15 +130,15 @@
         <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)"
+              @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>-->
+            <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>
@@ -229,6 +203,7 @@ export default {
       descripitionMap: {},
       statusMap: {},
       typeMap: {},
+      typeReasonMap: {},
       repairProjectMap: {},
       repairTechnologyMap: {},
       data: [],
@@ -369,10 +344,13 @@ export default {
           width: '200px'
         },
         {
-          title: '改进措施',
+          title: '改进措施类别',
           dataIndex: 'improveMeasure',
           ellipsis: true,
-          width: '200px'
+          width: '200px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.typeReasonMap, text)
+          }
         },
         {
           title: '操作',
@@ -419,6 +397,7 @@ export default {
     this.repairTechnologyMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_TECHNOLOGY_TYPE)
     this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_QUESTION)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FEE_TYPE)
+    this.typeReasonMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     base (record) {

+ 10 - 4
src/views/repair/application-form/modules/DetailCheck.vue

@@ -8,7 +8,7 @@
               <a-button :loading="confirmLoading" style="margin-left: 8px" type="primary">接受</a-button>
             </a-popconfirm>
             <a-popconfirm v-if="$auth('repair-application-forms-reback') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ACCEPTANCE === model.status" title="是否要拒绝?" @confirm="handleReturn">
-              <a-button style="margin-left: 8px" type="primary">拒绝</a-button>
+              <a-button style="margin-left: 8px" type="error">拒绝</a-button>
             </a-popconfirm>
             <a-button style="margin-left: 8px" @click="handleCancel">返回</a-button>
           </span>
@@ -125,7 +125,8 @@
       <div class="table-operator" >
         <a-button type="primary" @click="handleAddReason">
           <a-icon type="plus"/>
-        </a-button>-
+          添加
+        </a-button>
       </div>
       <a-table
         :data-source="dataReason"
@@ -346,10 +347,13 @@ export default {
           width: '200px'
         },
         {
-          title: '改进措施',
+          title: '改进措施类别',
           dataIndex: 'improveMeasure',
           ellipsis: true,
-          width: '200px'
+          width: '200px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.typeReasonMap, text)
+          }
         },
         {
           title: '操作',
@@ -359,6 +363,7 @@ export default {
           scopedSlots: { customRender: 'action' }
         }
       ],
+      typeReasonMap: {},
       model: {
         'id': null,
         'sbId': null,
@@ -396,6 +401,7 @@ export default {
     this.repairTechnologyMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_TECHNOLOGY_TYPE)
     this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_QUESTION)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FEE_TYPE)
+    this.typeReasonMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     base (record) {

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

@@ -399,10 +399,13 @@ export default {
           width: '150px'
         },
         {
-          title: '原因分析',
-          dataIndex: 'reasonAnalysis',
+          title: '改进措施类别',
+          dataIndex: 'type',
           ellipsis: true,
-          width: '150px'
+          width: '150px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.typeReasonMap, text)
+          }
         },
         {
           title: '操作',
@@ -412,6 +415,7 @@ export default {
           scopedSlots: { customRender: 'action' }
         }
       ],
+      typeReasonMap: {},
       model: {
         'id': null,
         'sbId': null,
@@ -449,6 +453,7 @@ export default {
     this.repairTechnologyMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_TECHNOLOGY_TYPE)
     this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIRE_ACTION)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_FEE_TYPE)
+    this.typeReasonMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_REASON_TYPE)
   },
   methods: {
     base (record) {

+ 7 - 4
src/views/repair/repair-reason/RepairReason.vue

@@ -108,16 +108,19 @@ export default {
           width: '200px'
         },
         {
-          title: '检查处理过程',
+          title: '处理过程',
           dataIndex: 'checkProcess',
           ellipsis: true,
           width: '200px'
         },
         {
-          title: '原因分析',
-          dataIndex: 'reasonAnalysis',
+          title: '改进措施类别',
+          dataIndex: 'type',
           ellipsis: true,
-          width: '200px'
+          width: '200px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.typeMap, text)
+          }
         },
         {
           title: '操作',

+ 3 - 2
src/views/repair/repair-reason/modules/BaseForm.vue

@@ -86,7 +86,7 @@
         <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
           <a-col :lg="24" :md="24" :sm="24">
             <a-form-item
-              label="改进类别1"
+              label="改进类别"
               :labelCol="BaseTool.Constant.labelCol2"
               :wrapperCol="BaseTool.Constant.wrapperCol2"
             >
@@ -165,7 +165,6 @@ export default {
   },
   methods: {
     changeType (value) {
-      console.log(this.type)
       this.type = value
     },
     base (record, repairForm = {}) {
@@ -196,6 +195,7 @@ export default {
       this.sbChange = record.sbChange
       this.otherChange = record.otherChange
       this.modalTitle = '编辑'
+      this.type = record.type
       // 日期处理
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
@@ -212,6 +212,7 @@ export default {
           'changeRepairPlanContent',
           'changeSparePlan',
           'changeSparePlanContent',
+          'type',
           'userTeach',
           'userTeachContent',
           'sbChange',