whj 1 year ago
parent
commit
5346c3ae62
1 changed files with 60 additions and 13 deletions
  1. 60 13
      src/views/repair/application-form/modules/DetailRepair.vue

+ 60 - 13
src/views/repair/application-form/modules/DetailRepair.vue

@@ -134,19 +134,31 @@
           </a-table>
         </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>
-              </template>
-            </span>
-          </a-table>
+          <a-tabs default-active-key="1" @change="callback">
+            <a-tab-pane key="1" tab="维修记录">
+              <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>
+                  </template>
+                </span>
+              </a-table>
+            </a-tab-pane>
+            <a-tab-pane key="2" tab="转派记录">
+              <a-table
+                :data-source="redeployRecord"
+                :columns="redeploycolumnsRecord"
+                tableLayout="auto"
+                rowKey="id">
+              </a-table>
+            </a-tab-pane>
+
+          </a-tabs>
         </div>
         <div class="main gutter-color" v-show="current == 4">
           <div class="title">备件清单</div>
@@ -516,6 +528,7 @@ export default {
       dataReason: [],
       dataRepairResolve: [],
       dataRecord: [],
+      redeployRecord: [],
       dataVerifyRecord: [],
       // 表头
       columns: [
@@ -741,6 +754,37 @@ export default {
           scopedSlots: { customRender: 'action' }
         }
       ],
+      redeploycolumnsRecord: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          width: '70px',
+          customRender: (text, record, index) => {
+            return `${index + 1}`
+          }
+        },
+        {
+          title: '转派人',
+          dataIndex: 'createdUserName',
+          ellipsis: true,
+          width: '150px'
+        },
+        {
+          title: '转派时间',
+          dataIndex: 'createdTime',
+          width: '150px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN2)
+          }
+        },
+        {
+          title: '转派备注',
+          dataIndex: 'dataRemark',
+          ellipsis: true,
+          width: '150px'
+        }
+      ],
+
       columnsRecord: [
         {
           title: '序号',
@@ -997,6 +1041,9 @@ export default {
       queryRepairRecord({ objId: this.model.id, remark: 'repair_record' }).then(res => {
         this.dataRecord = res.data.rows
       })
+      queryRepairRecord({ objId: this.model.id, remark: 'dispatch_record' }).then(res => {
+        this.redeployRecord = res.data.rows
+      })
       queryRepairRecord({ objId: this.model.id, pageSize: 20, remark: 'repair_status_record' }).then(res => {
         this.repairStatus = res.data.rows
       })