From 4b62098fb4528e3f38df4265e1e2ec081664d4b4 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期三, 25 十月 2023 13:18:41 +0800
Subject: [PATCH] 鉴定工单调整

---
 src/views/eam/EquipmentCalibrationOrder.vue |  496 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 262 insertions(+), 234 deletions(-)

diff --git a/src/views/eam/EquipmentCalibrationOrder.vue b/src/views/eam/EquipmentCalibrationOrder.vue
index 6189f01..0bc40df 100644
--- a/src/views/eam/EquipmentCalibrationOrder.vue
+++ b/src/views/eam/EquipmentCalibrationOrder.vue
@@ -1,23 +1,23 @@
 <template>
   <a-card
-    :bordered="false"
-    title="鎶�鏈姸鎬侀壌瀹氱鐞�"
+    :bordered='false'
+    title='鎶�鏈姸鎬侀壌瀹氱鐞�'
   >
     <!-- 鏌ヨ鍖哄煙 -->
-    <div class="table-page-search-wrapper">
+    <div class='table-page-search-wrapper'>
       <a-form
-        layout="inline"
-        @keyup.enter.native="searchQuery"
+        layout='inline'
+        @keyup.enter.native='searchQuery'
       >
-        <a-row :gutter="24">
+        <a-row :gutter='24'>
           <a-col
-            :md="6"
-            :sm="8"
+            :md='6'
+            :sm='8'
           >
-            <a-form-item label="宸ュ崟缂栫爜">
+            <a-form-item label='宸ュ崟缂栫爜'>
               <a-input
-                placeholder="璇疯緭鍏ュ伐鍗曠紪鐮�"
-                v-model="queryParam.num"
+                placeholder='璇疯緭鍏ュ伐鍗曠紪鐮�'
+                v-model='queryParam.num'
               ></a-input>
             </a-form-item>
           </a-col>
@@ -33,23 +33,23 @@
             </a-form-item>
           </a-col> -->
           <a-col
-            :md="6"
-            :sm="8"
+            :md='6'
+            :sm='8'
           >
             <span
-              style="float: left;overflow: hidden;"
-              class="table-page-search-submitButtons"
+              style='float: left;overflow: hidden;'
+              class='table-page-search-submitButtons'
             >
               <a-button
-                type="primary"
-                @click="searchQuery"
-                icon="search"
+                type='primary'
+                @click='searchQuery'
+                icon='search'
               >鏌ヨ</a-button>
               <a-button
-                type="primary"
-                @click="searchReset"
-                icon="reload"
-                style="margin-left: 8px"
+                type='primary'
+                @click='searchReset'
+                icon='reload'
+                style='margin-left: 8px'
               >閲嶇疆</a-button>
             </span>
           </a-col>
@@ -59,171 +59,190 @@
     <!-- 鏌ヨ鍖哄煙-END -->
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
-    <div class="table-operator">
+    <div class='table-operator'>
       <a-button
-        @click="handleAdd"
-        type="primary"
-        icon="plus"
-      >鏂板</a-button>
+        @click='handleAdd'
+        type='primary'
+        icon='plus'
+      >鏂板
+      </a-button>
     </div>
 
     <!-- table鍖哄煙-begin -->
     <div>
       <div
-        class="ant-alert ant-alert-info"
-        style="margin-bottom: 16px;"
+        class='ant-alert ant-alert-info'
+        style='margin-bottom: 16px;'
       >
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+        <i class='anticon anticon-info-circle ant-alert-icon'></i> 宸查�夋嫨 <a
+        style='font-weight: 600'>{{ selectedRowKeys.length }}</a>椤�
         <a
-          style="margin-left: 24px"
-          @click="onClearSelected"
+          style='margin-left: 24px'
+          @click='onClearSelected'
         >娓呯┖</a>
       </div>
 
       <a-table
-        ref="table"
-        size="middle"
-        :scroll="{ x: 'calc(2000px + 50%)', y: 900 }"
+        ref='table'
+        size='middle'
+        :scroll="{ x: 'calc(700px + 50%)', y: 900 }"
         bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        @change="handleTableChange"
-        :customRow="clickThenSelect"
+        rowKey='id'
+        :columns='columns'
+        :dataSource='dataSource'
+        :pagination='ipagination'
+        :loading='loading'
+        class='j-table-force-nowrap'
+        @change='handleTableChange'
+        :customRow='clickThenSelect'
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
       >
 
         <span
-          slot="action"
-          slot-scope="text, record"
+          slot='action'
+          slot-scope='text, record'
         >
-          <a-popconfirm
-            title="纭畾涓嬪彂宸ュ崟鍚�?"
-            @confirm="() => handleOrderIssue(record)"
-          >
-            <a v-if="record.status === '1'">涓嬪彂</a>
-          </a-popconfirm>
-          <a-divider
-            v-if="record.status === '1'"
-            type="vertical"
-          />
-          <a
-            v-if="record.status === '1'"
-            @click="handleEdit(record)"
-          >缂栬緫</a>
-          <a-divider
-            v-if="record.status === '1'"
-            type="vertical"
-          />
-          <a
-            v-if="record.status === '2' "
-            @click="handleOrderExe(record)"
-          >鎵ц</a>
-          <a-divider
-            v-if="record.status === '2'"
-            type="vertical"
-          />
-          <a
-            v-if="record.status === '4'"
-            @click="handleOrderExe(record)"
-          >鏌ョ湅</a>
-          <a-divider
-            v-if="record.status === '4'"
-            type="vertical"
-          />
-          <a-popconfirm
-            title="纭畾鎾ゅ洖宸ュ崟鍚�?"
-            @confirm="() => handleOrderReset(record,'1')"
-          >
-            <a v-if="record.status === '2'">鎾ゅ洖</a>
-          </a-popconfirm>
-          <a-divider
-            v-if="record.status === '2'"
-            type="vertical"
-          />
-          <a-popconfirm
-            title="纭畾鎾ゅ洖宸ュ崟鍚�?"
-            @confirm="() => handleOrderReset(record,'2')"
-          >
-            <a v-if="record.status === '4'">鎾ゅ洖</a>
-          </a-popconfirm>
-          <a-divider
-            v-if="record.status === '4'"
-            type="vertical"
-          />
-          <a
-             v-if="record.status === '4'"
-            @click="handleFinal(record)"
-          >褰曞叆缁撴灉</a>
-           <!-- v-if="record.status === '5'" -->
+           <a
+             v-if="record.status === '1'"
+             @click='handleAddOrderReport(record)'
+           >缁撴灉褰曞叆</a>
            <a-divider
-            v-if="record.status === '4'"
-            type="vertical"
-          />
-          <a-dropdown>
-            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">璇︽儏</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm
-                  title="纭畾鍒犻櫎鍚�?"
-                  @confirm="() => handleDelete(record.id)"
-                >
-                  <a v-if="record.status === '1'">鍒犻櫎</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+             v-if="record.status === '1'"
+             type='vertical'
+           />
+               <a @click='handleDetail(record)'>璇︽儏</a>
+          <!--          <a-popconfirm-->
+          <!--            title='纭畾涓嬪彂宸ュ崟鍚�?'-->
+          <!--            @confirm='() => handleOrderIssue(record)'-->
+          <!--          >-->
+          <!--            <a v-if="record.status === '1'">涓嬪彂</a>-->
+          <!--          </a-popconfirm>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '1'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-->
+          <!--            v-if="record.status === '1'"-->
+          <!--            @click='handleEdit(record)'-->
+          <!--          >缂栬緫</a>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '1'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-->
+          <!--            v-if="record.status === '2' "-->
+          <!--            @click='handleOrderExe(record)'-->
+          <!--          >鎵ц</a>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '2'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-->
+          <!--            v-if="record.status === '4'"-->
+          <!--            @click='handleOrderExe(record)'-->
+          <!--          >鏌ョ湅</a>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '4'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-popconfirm-->
+          <!--            title='纭畾鎾ゅ洖宸ュ崟鍚�?'-->
+          <!--            @confirm="() => handleOrderReset(record,'1')"-->
+          <!--          >-->
+          <!--            <a v-if="record.status === '2'">鎾ゅ洖</a>-->
+          <!--          </a-popconfirm>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '2'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-popconfirm-->
+          <!--            title='纭畾鎾ゅ洖宸ュ崟鍚�?'-->
+          <!--            @confirm="() => handleOrderReset(record,'2')"-->
+          <!--          >-->
+          <!--            <a v-if="record.status === '4'">鎾ゅ洖</a>-->
+          <!--          </a-popconfirm>-->
+          <!--          <a-divider-->
+          <!--            v-if="record.status === '4'"-->
+          <!--            type='vertical'-->
+          <!--          />-->
+          <!--          <a-->
+          <!--            v-if="record.status === '4'"-->
+          <!--            @click='handleFinal(record)'-->
+          <!--          >褰曞叆缁撴灉</a>-->
+          <!--          &lt;!&ndash; v-if="record.status === '5'" &ndash;&gt;-->
+          <!--           <a-divider-->
+          <!--             v-if="record.status === '4'"-->
+          <!--             type='vertical'-->
+          <!--           />-->
+          <!--          -->
+          <!--          <a-dropdown>-->
+          <!--             <a @click='handleDetail(record)'>璇︽儏</a>-->
+          <!--            <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a>-->
+          <!--            <a-menu slot='overlay'>-->
+          <!--              <a-menu-item>-->
+          <!--                <a @click='handleDetail(record)'>璇︽儏</a>-->
+          <!--              </a-menu-item>-->
+          <!--              <a-menu-item>-->
+          <!--                <a-popconfirm-->
+          <!--                  title='纭畾鍒犻櫎鍚�?'-->
+          <!--                  @confirm='() => handleDelete(record.id)'-->
+          <!--                >-->
+          <!--                  <a v-if="record.status === '1'">鍒犻櫎</a>-->
+          <!--                </a-popconfirm>-->
+          <!--              </a-menu-item>-->
+          <!--            </a-menu>-->
+          <!--          </a-dropdown>-->
         </span>
 
         <span
-          slot="num"
-          slot-scope="text, record"
+          slot='num'
+          slot-scope='text, record'
         >
           <a
             v-if="record.status === '3' || record.status === '2' "
-            class="lot"
-            @click="handleOrderExe(record)"
-          >{{record.num}}</a>
+            class='lot'
+            @click='handleOrderExe(record)'
+          >{{ record.num }}</a>
 
-          <span v-else>{{record.num}}</span>
+          <span v-else>{{ record.num }}</span>
         </span>
       </a-table>
       <a-tabs
-        defaultActiveKey="1"
+        defaultActiveKey='2'
       >
-        <a-tab-pane
-          key="1"
-          tab="妫�楠岄」"
-        >
-            <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>
-        </a-tab-pane>
+        <!--        <a-tab-pane  -->
+        <!--          key="1"-->
+        <!--          tab="妫�楠岄」"-->
+        <!--        >-->
+        <!--            <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>-->
+        <!--        </a-tab-pane>-->
 
         <a-tab-pane
-          key="2"
-          tab="妫�瀹氭姤鍛�"
+          key='2'
+          tab='妫�瀹氭姤鍛�'
         >
-            <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList"  :calibrationOrderId="mainId"></equipment-calibration-order-report-list>
+          <equipment-calibration-order-report-list ref='EquipmentCalibrationOrderReportList'
+                                                   :calibrationOrderId='mainId'></equipment-calibration-order-report-list>
         </a-tab-pane>
 
       </a-tabs>
     </div>
 
     <equipment-calibration-order-modal
-      ref="modalForm"
-      @ok="modalFormOk"
+      ref='modalForm'
+      @ok='modalFormOk'
     ></equipment-calibration-order-modal>
 
     <equipment-calibration-order-exe-drawer
-      ref="EquipmentCalibrationOrderExeDrawer"
-      @ok="modalFormOk"
+      ref='EquipmentCalibrationOrderExeDrawer'
+      @ok='modalFormOk'
     ></equipment-calibration-order-exe-drawer>
-    <final-modal ref="finalModal"  @ok="modalFormOk"></final-modal>
+    <final-modal ref='finalModal' @ok='modalFormOk'></final-modal>
+
+    <equipment-calibration-order-report-modal
+      ref='equipmentCalibrationOrderReportModal'
+      @ok='modalFormOk'
+    ></equipment-calibration-order-report-modal>
   </a-card>
 </template>
 
@@ -235,9 +254,11 @@
 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 EquipmentCalibrationOrderReportList
+  from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList'
 import FinalModal from './modules/equipmentCalibrationOrder/FinalModal.vue'
-
+import EquipmentCalibrationOrderReportModal
+  from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal'
 
 export default {
   name: 'EquipmentCalibrationOrder',
@@ -247,24 +268,24 @@
     EquipmentCalibrationOrderExeDrawer,
     EquipmentPrecisionParametersList,
     EquipmentCalibrationOrderReportList,
+    EquipmentCalibrationOrderReportModal,
     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:{
-      },
+      dictOptions: {},
       /* 鍒嗛〉鍙傛暟 */
       // 琛ㄥご
       columns: [
@@ -273,116 +294,117 @@
           dataIndex: '',
           key: 'rowIndex',
           width: 60,
-          align: "center",
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1;
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
           }
         },
-        {
-          title: '鐘舵��',
-          align: "center",
-          dataIndex: 'status_dictText'
-        },
+
         {
           title: '宸ュ崟鍙�',
-          align: "center",
-          dataIndex: 'num',
+          align: 'center',
+          dataIndex: 'num'
           // scopedSlots: { customRender: 'num' }
         },
         {
           title: '妫�瀹氭柟寮�',
-          align: "center",
-          dataIndex: 'calibrationType_dictText',
+          align: 'center',
+          dataIndex: 'calibrationType_dictText'
         },
         {
           title: '璁惧缂栫爜',
-          align: "center",
-          dataIndex: 'equipmentNum',
+          align: 'center',
+          dataIndex: 'equipmentNum'
         },
         {
           title: '璁惧鍚嶇О',
-          align: "center",
-          dataIndex: 'equipmentName',
+          align: 'center',
+          dataIndex: 'equipmentName'
         },
         {
           title: '鍨嬪彿',
-          align: "center",
-          dataIndex: 'equipmentModel',
+          align: 'center',
+          dataIndex: 'equipmentModel'
         },
         {
           title: '瑙勬牸',
-          align: "center",
-          dataIndex: 'equipmentSpecification',
+          align: 'center',
+          dataIndex: 'equipmentSpecification'
         },
         {
           title: '鍒ゅ畾渚濇嵁',
-          align: "center",
-          dataIndex: 'managementMode_dictText',
+          align: 'center',
+          dataIndex: 'managementMode_dictText'
         },
-
+        {
+          title: '鐘舵��',
+          align: 'center',
+          dataIndex: 'status_dictText'
+        },
         {
           title: '鍒ゅ畾缁撴灉',
-          align: "center",
-          dataIndex: 'calibrationOrderUda6_dictText'
+          align: 'center',
+          dataIndex: 'calibrationResult_dictText'
         },
-        {
-          title: '鍒涘缓浜�',
-          align: "center",
-          dataIndex: 'createBy'
-        },
-        {
-          title: '鍒涘缓鏃ユ湡',
-          align: "center",
-          dataIndex: 'createTime'
-        },
-        {
-          title: '妫�瀹氫汉',
-          align: "center",
-          dataIndex: 'calibrationUserId_dictText'
-        },
+        // {
+        //   title: '鍒涘缓浜�',
+        //   align: 'center',
+        //   dataIndex: 'createBy'
+        // },
+        // {
+        //   title: '鍒涘缓鏃ユ湡',
+        //   align: 'center',
+        //   dataIndex: 'createTime'
+        // },
+        // {
+        //   title: '妫�瀹氫汉',
+        //   align: 'center',
+        //   dataIndex: 'calibrationUserId_dictText'
+        // },
         {
           title: '瀹屾垚鏃堕棿',
-          align: "center",
+          align: 'center',
           dataIndex: 'calibrationTime'
         },
-        {
-          title: '涓嬪彂鏃堕棿',
-          align: "center",
-          dataIndex: 'issueTime'
-        },
+        // {
+        //   title: '涓嬪彂鏃堕棿',
+        //   align: 'center',
+        //   dataIndex: 'issueTime'
+        // },
         {
           title: '鎿嶄綔',
           dataIndex: 'action',
-          align: "center",
-          fixed: "right",
-          width: 300,
+          align: 'center',
+          fixed: 'right',
+          width: 120,
           scopedSlots: { customRender: 'action' }
         }
       ],
       url: {
-        list: "/eam/calibrationOrder/listNew",
-        delete: "/eam/calibrationOrder/delete",
-        edit: "/eam/calibrationOrder/editStatus",
+        list: '/eam/calibrationOrder/listNew',
+        delete: '/eam/calibrationOrder/delete',
+        edit: '/eam/calibrationOrder/editStatus'
       },
-      mainId:'',
+      mainId: ''
     }
   },
 
   computed: {
-    importExcelUrl: function () {
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-    },
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
   },
 
   methods: {
+
     onSelectChange(selectedRowKeys, selectionRows) {
       if (selectedRowKeys.length == 1) {
-        this.mainId = selectedRowKeys[0];
+        this.mainId = selectedRowKeys[0]
       } else {
-        this.mainId = '-1';
+        this.mainId = '-1'
       }
-      this.selectedRowKeys = selectedRowKeys;
-      this.selectionRows = selectionRows;
+      this.selectedRowKeys = selectedRowKeys
+      this.selectionRows = selectionRows
     },
 
     handleOrderExe(record) {
@@ -402,44 +424,50 @@
     },
 
     handleOrderIssue(record) {
-      const that = this;
+      const that = this
       requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => {
         if (res.success) {
-          that.$message.success("宸ュ崟涓嬪彂鎴愬姛锛�")
+          that.$message.success('宸ュ崟涓嬪彂鎴愬姛锛�')
           that.loadData()
         } else {
-          that.$message.warning("宸ュ崟涓嬪彂澶辫触锛�")
+          that.$message.warning('宸ュ崟涓嬪彂澶辫触锛�')
         }
       })
     },
     //鎾ゅ洖
     handleOrderReset(record, status) {
-      const that = this;
+      const that = this
       requestPut(that.url.edit, { id: record.id, status: status }).then((res) => {
         if (res.success) {
-          that.$message.success("宸ュ崟鎾ゅ洖鎴愬姛锛�")
+          that.$message.success('宸ュ崟鎾ゅ洖鎴愬姛锛�')
           that.loadData()
         } else {
-          that.$message.warning("宸ュ崟鎾ゅ洖澶辫触锛�")
+          that.$message.warning('宸ュ崟鎾ゅ洖澶辫触锛�')
         }
       })
     },
     onClearSelected() {
-        this.selectedRowKeys = [];
-        this.selectionRows = [];
-        this.mainId=''
+      this.selectedRowKeys = []
+      this.selectionRows = []
+      this.mainId = ''
     },
     clickThenSelect(record) {
-        return {
-          on: {
-            click: () => {
-              this.onSelectChange(record.id.split(","), [record]);
-            }
+      return {
+        on: {
+          click: () => {
+            this.onSelectChange(record.id.split(','), [record])
           }
         }
+      }
     },
-    handleFinal(record){
-      this.$refs.finalModal.edit(record);
+    // 鐩存帴涓婁紶閴村畾鎶ュ憡
+    handleAddOrderReport: function(record) {
+      this.$refs.equipmentCalibrationOrderReportModal.add(record.id)
+      this.$refs.equipmentCalibrationOrderReportModal.title = '涓婁紶妫�瀹氭姤鍛�'
+      this.$refs.equipmentCalibrationOrderReportModal.disableSubmit = false
+    },
+    handleFinal(record) {
+      this.$refs.finalModal.edit(record)
     }
   }
 }

--
Gitblit v1.9.3