From 83830b509d3cce2dba0be3fdbc6f4db054b78d74 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 18 十月 2023 18:43:30 +0800
Subject: [PATCH] 鉴定

---
 src/views/eam/EquipmentCalibrationOrder.vue |  139 +++++++++++++++++-----------------------------
 1 files changed, 51 insertions(+), 88 deletions(-)

diff --git a/src/views/eam/EquipmentCalibrationOrder.vue b/src/views/eam/EquipmentCalibrationOrder.vue
index 94c693b..2ed65ff 100644
--- a/src/views/eam/EquipmentCalibrationOrder.vue
+++ b/src/views/eam/EquipmentCalibrationOrder.vue
@@ -92,10 +92,10 @@
         :loading="loading"
         class="j-table-force-nowrap"
         @change="handleTableChange"
-        :rowSelection="rowSelection"
         :customRow="clickThenSelect"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
       >
-        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
+       
         <span
           slot="action"
           slot-scope="text, record"
@@ -154,6 +154,14 @@
             v-if="record.status === '4'"
             type="vertical"
           />
+          <a
+           
+            @click="handleFinal(record)"
+          >褰曞叆缁撴灉</a>
+           <!-- v-if="record.status === '5'" -->
+           <a-divider
+            type="vertical"
+          />
           <a-dropdown>
             <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
             <a-menu slot="overlay">
@@ -186,37 +194,20 @@
         </span>
       </a-table>
       <a-tabs
-        type="card"
         defaultActiveKey="1"
       >
         <a-tab-pane
           key="1"
-          forceRender
+          tab="妫�楠岄」"
         >
-          <span slot="tab">
-            <a-badge>绮惧害鍙傛暟&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a-badge>
-          </span>
-          <div
-            class="table-operator"
-            style="margin:10px"
-          >
-            <equipment-precision-parameters-list ref="PrecisionParametersList"></equipment-precision-parameters-list>
-          </div>
+            <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>
         </a-tab-pane>
 
         <a-tab-pane
           key="2"
-          forceRender
+          tab="妫�瀹氭姤鍛�"
         >
-          <span slot="tab">
-            <a-badge>妫�瀹氭姤鍛�&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a-badge>
-          </span>
-          <div
-            class="table-operator"
-            style="margin:10px"
-          >
-            <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList"></equipment-calibration-order-report-list>
-          </div>
+            <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList"  :calibrationOrderId="mainId"></equipment-calibration-order-report-list>
         </a-tab-pane>
 
       </a-tabs>
@@ -231,44 +222,49 @@
       ref="EquipmentCalibrationOrderExeDrawer"
       @ok="modalFormOk"
     ></equipment-calibration-order-exe-drawer>
+    <final-modal ref="finalModal"  @ok="modalFormOk"></final-modal>
   </a-card>
 </template>
 
 <script>
 
 import '@/assets/less/TableExpand.less'
-import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import EquipmentCalibrationOrderModal from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal'
 import EquipmentCalibrationOrderExeDrawer from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer'
 import { getAction, postAction, requestPut } from '@/api/manage'
 import EquipmentPrecisionParametersList from './modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList'
 import EquipmentCalibrationOrderReportList from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList'
+import FinalModal from './modules/equipmentCalibrationOrder/FinalModal.vue'
+
 
 export default {
   name: 'EquipmentCalibrationOrder',
-  mixins: [JeecgListMixin, mixinDevice],
+  mixins: [JeecgListMixin],
   components: {
     EquipmentCalibrationOrderModal,
     EquipmentCalibrationOrderExeDrawer,
     EquipmentPrecisionParametersList,
     EquipmentCalibrationOrderReportList,
+    FinalModal
   },
   data() {
     return {
       description: '璁惧妫�瀹氬伐鍗�',
-      /* 鍒嗛〉鍙傛暟 */
-      ipagination: {
-        current: 1,
-        pageSize: 5,
-        pageSizeOptions: ['5', '10', '50'],
-        showTotal: (total, range) => {
-          return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
-        },
-        showQuickJumper: true,
-        showSizeChanger: true,
-        total: 0
+      ipagination:{
+          current: 1,
+          pageSize: 5,
+          pageSizeOptions: ['5', '10', '50'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
       },
+      dictOptions:{
+      },
+      /* 鍒嗛〉鍙傛暟 */
       // 琛ㄥご
       columns: [
         {
@@ -326,7 +322,7 @@
         {
           title: '鍒ゅ畾缁撴灉',
           align: "center",
-          dataIndex: 'calibrationResult'
+          dataIndex: 'calibrationOrderUda6_dictText'
         },
         {
           title: '鍒涘缓浜�',
@@ -367,6 +363,7 @@
         delete: "/eam/calibrationOrder/delete",
         edit: "/eam/calibrationOrder/editStatus",
       },
+      mainId:'',
     }
   },
 
@@ -374,41 +371,14 @@
     importExcelUrl: function () {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     },
-    rowSelection() {
-      return {
-        type: 'checkbox',
-        onChange: (selectedRowKeys, selectedRows) => {
-          this.selectedRowKeys = selectedRowKeys;
-          this.onSelectChange(selectedRowKeys, selectedRows);
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.distable
-          },
-        }),
-        selectedRowKeys: this.selectedRowKeys,
-      };
-    },
   },
 
   methods: {
-    clickThenSelect(record) {
-      return {
-        on: {
-          click: () => {
-            this.onSelectChange(record.id.split(","), [record]);
-          }
-        }
-      }
-    },
-
     onSelectChange(selectedRowKeys, selectionRows) {
       if (selectedRowKeys.length == 1) {
-        this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = selectedRowKeys[0]
-        this.$refs.PrecisionParametersList.calibrationOrderId = selectedRowKeys[0]
+        this.mainId = selectedRowKeys[0];
       } else {
-        this.$refs.PrecisionParametersList.calibrationOrderId = '-1'
-        this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1'
+        this.mainId = '-1';
       }
       this.selectedRowKeys = selectedRowKeys;
       this.selectionRows = selectionRows;
@@ -453,30 +423,23 @@
         }
       })
     },
-    searchQuery() {
-      this.$refs.PrecisionParametersList.calibrationOrderId = '-1'
-      this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1'
-      this.loadData(1);
+    onClearSelected() {
+        this.selectedRowKeys = [];
+        this.selectionRows = [];
+        this.mainId=''
     },
-    searchReset() {
-      this.queryParam = {};
-      this.selectedRowKeys = []
-      this.selectionRows = []
-      this.$refs.PrecisionParametersList.calibrationOrderId = '-1'
-      this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1'
-      this.loadData(1);
+    clickThenSelect(record) {
+        return {
+          on: {
+            click: () => {
+              this.onSelectChange(record.id.split(","), [record]);
+            }
+          }
+        }
     },
-
-    modalFormOk() {
-      // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
-      this.loadData()
-      //娓呯┖鍒楄〃閫変腑
-      this.onClearSelected()
-
-      this.$refs.PrecisionParametersList.calibrationOrderId = '-1'
-      this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1'
-    },
-
+    handleFinal(record){
+      this.$refs.finalModal.edit(record);
+    }
   }
 }
 </script>

--
Gitblit v1.9.3