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 +++-----
 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue      |  119 +++---
 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue  |  100 ++---
 src/views/eam/EquipmentMaintenancePlanList.vue                                          |    6 
 src/views/eam/modules/equipmentNew/EquipmentModal.vue                                   |   83 +++-
 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue |   31 +
 src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue    |  162 ++++----
 src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue                          |  370 +++++++++++++++++++++
 8 files changed, 689 insertions(+), 321 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>
diff --git a/src/views/eam/EquipmentMaintenancePlanList.vue b/src/views/eam/EquipmentMaintenancePlanList.vue
index cd119cb..1e32c5e 100644
--- a/src/views/eam/EquipmentMaintenancePlanList.vue
+++ b/src/views/eam/EquipmentMaintenancePlanList.vue
@@ -164,9 +164,6 @@
             title:'鍒涘缓鏃堕棿',
             align:"center",
             dataIndex: 'createTime',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
-            },
             width:200,
           },
           {
@@ -179,9 +176,6 @@
             title:'淇敼鏃堕棿',
             align:"center",
             dataIndex: 'updateTime',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
-            },
             width:200,
           },
           {
diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue
index c5acd18..bf95c23 100644
--- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue
+++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue
@@ -146,7 +146,7 @@
                     <div :key="col.dataIndex">
                       <a-input-number
                         :value="text"
-                        v-if="col.dataIndex == 'calibrationItemResult'"
+                        v-if="col.dataIndex == 'actualValue'"
                         :min="0"
                         :max="20000000"
                         @change="(e)=>handleChange(e, record.key, col, index,record)"
@@ -248,67 +248,40 @@
         sm: { span: 16 },
       },
       columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          align: 'center',
-          width: 60,
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1
-          }
-        },
-        {
-          title: '绮惧害鍙傛暟缂栫爜',
-          align: 'center',
-          dataIndex: 'num',
-        },
-        {
-          title: '绮惧害鍙傛暟鍚嶇О',
-          align: 'center',
-          dataIndex: 'name',
-        },
-        {
-          title: '璁¢噺鍗曚綅',
-          align: 'center',
-          dataIndex: 'unitName',
-        },
-        {
-          title: '涓嬮檺鍊�',
-          align: 'center',
-          dataIndex: 'lowerLimit',
-        },
-        {
-          title: '涓婇檺鍊�',
-          align: 'center',
-          dataIndex: 'upperLimit',
-        },
-        {
-          title: '娴嬪畾鍊�',
-          align: 'center',
-          dataIndex: 'actualValue',
-        },
-        {
-          title: '瀹為檯娴嬪畾鍊�',
-          align: 'center',
-          dataIndex: 'calibrationItemResult',
-          scopedSlots: { customRender: 'calibrationItemResult' },
-          width: 160,
-        },
-        // {
-        //   title: '鍒ゅ畾缁撴灉',
-        //   align: 'center',
-        //   dataIndex: 'judgmentResultName',
-        // class: "notshow"
-        // },
-        {
-          title: '鍒ゅ畾缁撴灉',
-          align: 'center',
-          dataIndex: 'judgmentResult',
-        },
+          {
+            title: '#',
+            dataIndex:'sort',
+            width:100,
+            align:"center",
+          },
+          {
+            title:'妫�楠岄」鐩悕绉�',
+            align:"center",
+            dataIndex: 'name',
+            width:300
+          },
+          {
+            title:'浣嶇疆',
+            align:"center",
+            dataIndex: 'precisionParametersUda1',
+            width:300
+          },
+          {
+            title:'鍏佸樊锛坢m锛�',
+            align:"center",
+            dataIndex: 'tolerance',
+            width:300
+          },
+          {
+            title:'瀹炴祴鍊�',
+            align:"center",
+            dataIndex: 'actualValue',
+            scopedSlots: { customRender: 'actualValue' },
+            width:300
+          },
       ],
       url: {
-        list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList",
+        list: "/eam/calibrationOrder/listByMainId",
         report: "/eam/calibrationOrder/report",
         save: "/eam/calibrationOrderDetail/save",
       },
@@ -482,6 +455,9 @@
           }
 
         }
+        if(column.dataIndex == 'actualValue'){
+          target[column.dataIndex] = value;
+        }
         //鏄剧ず甯﹁繃鏉ョ殑鏁版嵁
         that.dataSource = temp;
       }
@@ -493,8 +469,8 @@
       let formData = Object.assign(this.model);
       for (let i = 0; i < that.dataSource.length; i++) {
         let o = this.dataSource[i]
-        if (o.calibrationItemResult == null || o.calibrationItemResult == '') {
-          that.$message.warning('璇疯緭鍏ユ瀹氱粨鏋滐紒')
+        if (o.actualValue == null || o.actualValue == '') {
+          that.$message.warning('璇疯緭鍏ュ簭鍙蜂负'+o.sort+'妫�楠岄」鐨勫疄娴嬪��')
           that.confirmLoading = false;
           return
         }
diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue
index 426cd9d..f8e7bd6 100644
--- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue
+++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue
@@ -112,6 +112,21 @@
               />
             </a-form-item>
           </a-col>
+          <a-col :span="24">
+            <a-form-item
+              :labelCol="{span:3}"
+              :wrapperCol="{span:21}"
+              label="绮惧害鍙傛暟妯℃澘ID"
+              hidden
+            >
+              <a-textarea
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ョ簿搴﹀弬鏁版ā鏉縄D'"
+                v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]"
+              />
+            </a-form-item>
+          </a-col>
         </a-row>
       </a-form>
     </a-spin>
@@ -121,7 +136,10 @@
       size="middle"
       rowKey='id'
       :columns="columns"
+      :pagination="ipagination"
+      :loading="loading"
       :dataSource="dataSource"
+      @change="handleTableChange"
     >
 
     </a-table>
@@ -154,10 +172,13 @@
 import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
 import Tooltip from 'ant-design-vue/es/tooltip'
 import EquipmentList from './EquipmentList'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
 import Vue from 'vue'
 
 export default {
   name: "EquipmentCalibrationOrderModal",
+  mixins:[JeecgListMixin],
   components: {
     JMultiSelectTag,
     Tooltip,
@@ -166,48 +187,33 @@
   data() {
     return {
       columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          align: 'center',
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1
+          {
+            title: '#',
+            dataIndex:'sort',
+            width:100,
+            align:"center",
           },
-          width: 50,
-        },
-        {
-          title: '绮惧害鍙傛暟缂栫爜',
-          align: 'center',
-          dataIndex: 'num'
-        },
-        {
-          title: '绮惧害鍙傛暟鍚嶇О',
-          align: 'center',
-          dataIndex: 'name'
-        },
-        {
-          title: '鍗曚綅',
-          align: 'center',
-          dataIndex: 'unitName'
-        },
-        {
-          title: '涓嬮檺鍊�',
-          align: 'center',
-          dataIndex: 'lowerLimit'
-        },
-        {
-          title: '涓婇檺鍊�',
-          align: 'center',
-          dataIndex: 'upperLimit'
-        },
-        {
-          title: '瀹為檯娴嬪畾鍊�',
-          align: 'center',
-          dataIndex: 'actualValue',
-        },
+          {
+            title:'妫�楠岄」鐩悕绉�',
+            align:"center",
+            dataIndex: 'precisionParametersName',
+            width:300
+          },
+          {
+            title:'浣嶇疆',
+            align:"center",
+            dataIndex: 'precisionParametersUda1',
+            width:300
+          },
+          {
+            title:'鍏佸樊锛坢m锛�',
+            align:"center",
+            dataIndex: 'tolerance',
+            width:300
+          },
       ],
       title: "鎿嶄綔",
+      precisionParametersTemplateId:'',
       visible: false,
       disableSubmit: false,
       codeDisable: true,
@@ -248,7 +254,7 @@
       url: {
         add: "/eam/calibrationOrder/addNew",
         edit: "/eam/calibrationOrder/editNew",
-        getPrecisionParameterList: "/eam/calibrationOrder/getPrecisionParameterList",
+        list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId",
       },
 
     }
@@ -256,11 +262,9 @@
 
   methods: {
     add() {
-      this.dataSource = []
+      this.precisionParametersTemplateId='-1';
       this.edit({})
-
     },
-
     edit(record) {
       let that = this;
       this.form.resetFields();
@@ -323,18 +327,29 @@
     sendEquipmentRecord(data) {
       this.dataSource = [];
       let record = data.record;
-      this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
-      this.getPrecisionParameterList(record.id);
+      this.form.setFieldsValue({calibrationOrderUda1:record.precisionParametersTemplateId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
+      this.precisionParametersTemplateId = record.precisionParametersTemplateId;
     },
-
-    getPrecisionParameterList(equipmentId) {
-      getAction(this.url.getPrecisionParameterList, { equipmentId: equipmentId }).then((res) => {
-        if (res.success) {
-          this.dataSource = res.result
-        }
-      })
+    clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
     },
   },
+  watch:{
+        precisionParametersTemplateId:{
+        immediate: true,
+        handler(val) {
+          if(!this.precisionParametersTemplateId){
+            this.clearList()
+          }else{
+            this.queryParam['precisionParametersTemplateId'] = val;
+            this.queryParam['delFlag'] = 0;
+            this.loadData(1);
+          }
+        }
+      }
+    },
 }
 </script>
 
diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue
index 9e56e70..35295a1 100644
--- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue
+++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList.vue
@@ -101,6 +101,7 @@
   data() {
     return {
       description: '妫�瀹氭姤鍛�',
+      disableMixinCreated:true,
       columns: [
         {
           title: '#',
@@ -153,19 +154,29 @@
         urlDownload: window._CONFIG['staticDomainURL'],
         download: '/sys/upload/downloadFile',
       },
-      // partRoute: {},
-      // equipmentSelectionRows: [],
-      calibrationOrderId: '',
     }
   },
-
-  watch: {
-    calibrationOrderId() {
-      this.queryParam = {};
-      this.queryParam.calibrationOrderId = this.calibrationOrderId;
-      this.loadData(1);
-    },
+  props:{
+    calibrationOrderId:{
+        type:String,
+        default:'',
+        required:false
+    }
   },
+    watch:{
+      calibrationOrderId:{
+        immediate: true,
+        handler(val) {
+          if(!this.calibrationOrderId){
+            this.clearList()
+          }else{
+            this.queryParam['calibrationOrderId'] = val;
+            this.queryParam['delFlag'] = 0;
+            this.loadData(1);
+          }
+        }
+      }
+    },
   // mounted() {
   //   this.$bus.$on('equipmentSelectionRows', (data) => {
   //     this.equipmentSelectionRows = data
diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
index a7de5e0..3747e9a 100644
--- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
+++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList.vue
@@ -1,16 +1,18 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
     <div>
       <a-table
         ref="table"
-        size="middle"
         bordered
+        size="middle"
         rowKey="id"
         :columns="columns"
         :dataSource="dataSource"
-        :pagination=false
+        :pagination="ipagination"
         :loading="loading"
         @change="handleTableChange"
+        class="j-table-force-nowrap"
+        :scroll="{x:true}"
       >
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
@@ -34,106 +36,98 @@
     Tooltip,
     JEllipsis,
   },
+  props:{
+    calibrationOrderId:{
+        type:String,
+        default:'',
+        required:false
+    }
+  },
+    watch:{
+      calibrationOrderId:{
+        immediate: true,
+        handler(val) {
+          if(!this.calibrationOrderId){
+            this.clearList()
+          }else{
+            this.queryParam['calibrationOrderId'] = val;
+            this.queryParam['delFlag'] = 0;
+            this.loadData(1);
+          }
+        }
+      }
+    },
   data() {
     return {
       description: '绮惧害鍙傛暟',
+      disableMixinCreated:true,
+      ipagination:{
+          current: 1,
+          pageSize: 5,
+          pageSizeOptions: ['5', '10', '50'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+      },
       // 琛ㄥご
       columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          align: "center",
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1;
-          }
-        },
-        {
-          title: '绮惧害鍙傛暟缂栫爜',
-          dataIndex: 'num',
-          align: "center",
-        },
-        {
-          title: '绮惧害鍙傛暟鍚嶇О',
-          dataIndex: 'name',
-          align: "center",
-        },
-        {
-          title: '璁¢噺鍗曚綅',
-          dataIndex: 'unitName',
-          align: "center",
-        },
-        {
-          title: '涓婇檺鍊�',
-          dataIndex: 'upperLimit',
-          align: "center",
-        },
-        {
-          title: '涓嬮檺鍊�',
-          dataIndex: 'lowerLimit',
-          align: "center",
-        },
-        {
-          title: '妫�瀹氱粨鏋�',
-          dataIndex: 'calibrationItemResult',
-          align: "center",
-        },
-        {
-          title: '鍒ゅ畾缁撴灉',
-          dataIndex: 'judgmentResult',
-          align: "center",
-        },
+          {
+            title: '#',
+            dataIndex:'sort',
+            width:100,
+            align:"center",
+          },
+          {
+            title:'妫�楠岄」鐩悕绉�',
+            align:"center",
+            dataIndex: 'name',
+            width:200
+          },
+          {
+            title:'浣嶇疆',
+            align:"center",
+            dataIndex: 'precisionParametersUda1',
+            width:200
+          },
+          {
+            title:'鍏佸樊锛坢m锛�',
+            align:"center",
+            dataIndex: 'tolerance',
+            width:200
+          },
+          {
+            title:'瀹炴祴鍊�',
+            align:"center",
+            dataIndex: 'actualValue',
+            width:200
+          },
       ],
       url: {
-        list: "/eam/calibrationOrderDetail/getCalibrationOrderDetailList",
+        list: "/eam/calibrationOrder/listByMainId",
       },
-      calibrationOrderId: '',
     }
   },
-  watch: {
-    calibrationOrderId() {
-      this.queryParam = {};
-      this.queryParam.calibrationOrderId = this.calibrationOrderId;
-      this.loadData(1);
+  methods: {
+    clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
     },
   },
-  methods: {
-    loadData(arg) {
-      if (!this.url.list) {
-        this.$message.error("璇疯缃畊rl.list灞炴��!")
-        return
+  computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
       }
-      if (arg === 1) {
-        this.ipagination.current = 1;
-      }
-      var params = this.getQueryParams();//鏌ヨ鏉′欢
-      if (this.calibrationOrderId == '') {
-        params.calibrationOrderId = '-1';
-      }
-      this.loading = true;
-      getAction(this.url.list, params).then((res) => {
-        if (res.success) {
-          this.dataSource = res.result.records || res.result;
-          if (res.result.total) {
-            this.ipagination.total = res.result.total;
-          } else {
-            this.ipagination.total = 0;
-          }
-        } else {
-          this.$message.warning(res.message)
-        }
-      }).finally(() => {
-        this.loading = false
-      })
-    },
   },
 }
 </script>
 
 <style scoped>
 @import '~@assets/less/common.less';
-/deep/ .frozenRowClass {
+ .frozenRowClass {
   color: #c9c9c9;
 }
 .success {
diff --git a/src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue b/src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue
new file mode 100644
index 0000000..d97de05
--- /dev/null
+++ b/src/views/eam/modules/equipmentCalibrationOrder/FinalModal.vue
@@ -0,0 +1,370 @@
+<template>
+  <a-modal
+    :title="'褰曞叆缁撴灉'"
+    :width="1250"
+    :visible="visible"
+    :maskClosable="false"
+    @ok="handleOk"
+    cancelText="鍏抽棴"
+    @cancel="handleCancel"
+    :confirmLoading="confirmLoading"
+  >
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item
+              label="宸ュ崟鍙�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-input
+                allow-clear
+                :disabled="codeDisable"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍗曞彿缂栫爜'"
+                v-decorator="['num', validatorRules.num ]"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item
+              label="妫�瀹氭柟寮�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇烽�夋嫨妫�瀹氭柟寮�'"
+                :triggerChange="true"
+                dictCode="calibration_type"
+                v-decorator="['calibrationType', validatorRules.calibrationType]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item
+              label="璁惧"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-input-search
+                :disabled="disableSubmit"
+                placeholder="璇烽�夋嫨璁惧"
+                enter-button
+                @search="onEquipmentList()"
+                :read-only="true"
+                v-decorator="['equipmentName', validatorRules.equipmentName]"
+              />
+            </a-form-item>
+          </a-col>
+
+          <a-col :span="12">
+            <a-form-item
+              label="鍒ゆ柇渚濇嵁"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇烽�夋嫨鍒ゆ柇渚濇嵁'"
+                :triggerChange="true"
+                dictCode="management_mode"
+                v-decorator="['managementMode', validatorRules.managementMode]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row
+          :gutter="24"
+        >
+          <a-col :span="12" hidden>
+            <a-form-item
+              label="璁惧Id"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-input
+                allow-clear
+                :disabled="true"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'"
+                v-decorator="['equipmentId', validatorRules.equipmentId ]"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item
+              label="妫�瀹氱粨鏋�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :placeholder="'璇疯緭鍏ユ瀹氱粨鏋�'"
+                dictCode="technology_status"
+                v-decorator="['calibrationOrderUda6', validatorRules.calibrationOrderUda6]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item
+              :labelCol="{span:3}"
+              :wrapperCol="{span:21}"
+              label="澶囨敞"
+            >
+              <a-textarea
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'"
+                v-decorator="['remark', validatorRules.remark]"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item
+              :labelCol="{span:3}"
+              :wrapperCol="{span:21}"
+              label="绮惧害鍙傛暟妯℃澘ID"
+              hidden
+            >
+              <a-textarea
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ョ簿搴﹀弬鏁版ā鏉縄D'"
+                v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </a-spin>
+    <template slot="footer">
+      <a-button
+        :style="{marginRight: '8px'}"
+        @click="handleCancel()"
+      >
+        鍏抽棴
+      </a-button>
+
+      <a-button
+        @click="handleOk()"
+        type="primary"
+        :loading="confirmLoading"
+      >纭畾</a-button>
+    </template>
+
+    <equipment-list
+      ref="EquipmentList"
+      @sendEquipmentRecord='sendEquipmentRecord'
+    ></equipment-list>
+  </a-modal>
+
+</template>
+
+<script>
+import { getAction, postAction, requestPut } from '@/api/manage'
+import pick from 'lodash.pick'
+import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
+import Tooltip from 'ant-design-vue/es/tooltip'
+import EquipmentList from './EquipmentList'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+import Vue from 'vue'
+
+export default {
+  name: "EquipmentCalibrationOrderModal",
+  mixins:[JeecgListMixin],
+  components: {
+    JMultiSelectTag,
+    Tooltip,
+    EquipmentList
+  },
+  data() {
+    return {
+      columns: [
+          {
+            title: '#',
+            dataIndex:'sort',
+            width:100,
+            align:"center",
+          },
+          {
+            title:'妫�楠岄」鐩悕绉�',
+            align:"center",
+            dataIndex: 'precisionParametersName',
+            width:300
+          },
+          {
+            title:'浣嶇疆',
+            align:"center",
+            dataIndex: 'precisionParametersUda1',
+            width:300
+          },
+          {
+            title:'鍏佸樊锛坢m锛�',
+            align:"center",
+            dataIndex: 'tolerance',
+            width:300
+          },
+      ],
+      title: "鎿嶄綔",
+      precisionParametersTemplateId:'',
+      visible: false,
+      disableSubmit:true,
+      codeDisable: true,
+      dataSource: [],
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 6 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 18 },
+      },
+      confirmLoading: false,
+      form: this.$form.createForm(this),
+      validatorRules: {
+        num: {
+          rules: [
+            { required: true, message: '璇疯緭鍏ュ伐鍗曠紪鐮�!' },
+          ]
+        },
+        calibrationType: {
+          rules: [
+            { required: true, message: '璇烽�夋嫨妫�瀹氭柟寮�!' },
+          ]
+        },
+        managementMode: {
+          rules: [
+            { required: true, message: '璇烽�夋嫨鍒ゅ畾渚濇嵁!' },
+          ]
+        },
+        equipmentName: {
+          rules: [
+            { required: true, message: '璇烽�夋嫨璁惧!' },
+          ]
+        },
+        calibrationOrderUda6: {
+          rules: [
+            { required: true, message: '璇疯緭鍏ユ瀹氱粨鏋�!' },
+          ]
+        },
+      },
+      url: {
+        add: "/eam/calibrationOrder/addNew",
+        edit: "/eam/calibrationOrder/saveFinal",
+        list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId",
+      },
+    }
+  },
+  methods: {
+    add() {
+      this.precisionParametersTemplateId='-1';
+      this.edit({})
+    },
+    edit(record) {
+      let that = this;
+      this.form.resetFields();
+      this.model = Object.assign({}, record);
+      this.visible = true;
+      this.maintenanceCycles = record.maintenanceCycles
+      if (record.precisionParameterList != undefined) {
+        this.dataSource = record.precisionParameterList;
+      }
+      that.$nextTick(() => {
+        that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode'));
+      });
+      if (record.id) {
+        this.codeDisable = true;
+      } else {
+        this.codeDisable = false;
+      }
+    },
+
+    close() {
+      this.$emit('close');
+      this.visible = false;
+    },
+
+    handleCancel() {
+      this.close();
+    },
+
+    handleOk() {
+      const that = this;
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          that.confirmLoading = true;
+          let formData = Object.assign(this.model, values);
+          let obj;
+          if (!this.model.id) {
+            obj = postAction(this.url.add, formData);
+          } else {
+            obj = requestPut(this.url.edit, formData, { id: this.model.id });
+          }
+          obj.then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.$emit('ok');
+            } else {
+              that.$message.warning(res.message);
+            }
+          }).finally(() => {
+            that.confirmLoading = false;
+            that.close();
+          })
+        }
+      })
+    },
+
+    onEquipmentList() {
+      this.$refs.EquipmentList.list();
+      this.$refs.EquipmentList.title = "閫夋嫨璁惧淇℃伅";
+    },
+    sendEquipmentRecord(data) {
+      this.dataSource = [];
+      let record = data.record;
+      this.form.setFieldsValue({calibrationOrderUda1:record.precisionParametersTemplateId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model });
+      this.precisionParametersTemplateId = record.precisionParametersTemplateId;
+    },
+    clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+/deep/ .frozenRowClass {
+  color: #c9c9c9;
+}
+.fontweight {
+  font-weight: bold;
+}
+.ant-btn {
+  padding: 0 10px;
+  margin-left: 3px;
+}
+
+.ant-form-item-control {
+  line-height: 0px;
+}
+
+/** 涓昏〃鍗曡闂磋窛 */
+.ant-form .ant-form-item {
+  margin-bottom: 10px;
+}
+
+/** Tab椤甸潰琛岄棿璺� */
+.ant-tabs-content .ant-form-item {
+  margin-bottom: 0px;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
index a252237..dfa309e 100644
--- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue
+++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -34,6 +34,7 @@
                 :triggerChange="true"
                 :dictCode="'mom_eam_equipment_category,name,id,equipment_category_uda1 = '+'\''+caytegoryParam+'\''"
                 v-model="model.equipmentCategoryId"
+                @change="categoryChange"
               />
             </a-form-model-item>
           </a-col>
@@ -360,23 +361,6 @@
           </a-col>
         </a-row>
         <a-row>
-          <!-- <a-col :span="6">
-            <a-form-model-item
-              label="浜х嚎"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="workCenterId"
-            >
-              <j-dict-select-tag
-                allow-clear
-                :disabled="formDisabled"
-                placeholder="璇烽�夋嫨浜х嚎"
-                :triggerChange="true"
-                dictCode="mom_base_work_center,name,id,del_flag!='1'"
-                v-model="model.workCenterId"
-              />
-            </a-form-model-item>
-          </a-col> -->
           <a-col :span="6">
             <a-form-model-item
               label="璧勪骇鍒堕�犲晢"
@@ -392,6 +376,39 @@
                 dictCode="mom_base_constructor,name,id,status!='0' and del_flag!='1'"
                 v-model="model.constructorId"
               />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鎶�鏈姸鎬侀壌瀹氬懆鏈�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="checkPeriod"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鎶�鏈姸鎬侀壌瀹氬懆鏈� "
+                :triggerChange="true"
+                dictCode="check_period"
+                :disabled="true"
+                v-model="model.checkPeriod"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="涓嬫鎶�鏈壌瀹氭椂闂�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="nextTechnologyStatusQualificationTime"
+            >
+              <j-date
+                :disabled="formDisabled"
+                style="width: 100%;"
+                placeholder="璇烽�夋嫨鏃ユ湡"
+                class="query-group-cust"
+                v-model="model.nextTechnologyStatusQualificationTime"
+              ></j-date>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -897,11 +914,11 @@
       },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 8 },
+        sm: { span: 10 },
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 16 },
+        sm: { span: 14 },
       },
 
       confirmLoading: false,
@@ -978,6 +995,7 @@
         add: "/eam/equipment/add",
         edit: "/eam/equipment/edit",
         loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
+        getCategoryFlag:"/eam/equipmentCategory/queryById"
       },
       treeData: [],
       needSpecific: false,
@@ -1198,6 +1216,33 @@
           }
         })
       }
+      //鏀瑰彉鎶�鏈姸鎬侀壌瀹氬懆鏈�
+      if(this.model.equipmentCategoryId!==null&&this.model.equipmentCategoryId!=''){
+        var value = this.model.equipmentCategoryId;
+        getAction(this.url.getCategoryFlag,{id:value}).then(res=>{
+             if(res.result.equipmentCategoryUda1!=='weldingMachine'&&res.result.equipmentCategoryUda11!=='filesCarousel'&&res.result.equipmentCategoryUda1!=='tester'){
+                if(val==='A'){
+                  this.model.checkPeriod=365*3+'';
+                }
+                if(val==='B'||val==='C'||val==='D'){
+                  this.model.checkPeriod=365*4+'';
+                }
+             }
+             this.model = Object.assign({},this.model);
+        })
+      }
+    },
+    categoryChange(value){
+       getAction(this.url.getCategoryFlag,{id:value}).then(res=>{
+             if(res.result.equipmentCategoryUda1==='weldingMachine'){
+                this.model.checkPeriod=365*3+'';
+             }else if(res.result.equipmentCategoryUda1==='filesCarousel'){
+                this.model.checkPeriod=365*4+'';
+             }else if(res.result.equipmentCategoryUda1==='tester'){
+                this.model.checkPeriod=365*1+'';
+             }
+             this.model = Object.assign({},this.model);
+       })
     }
   },
   computed: {

--
Gitblit v1.9.3