From b7e68d833b667aa5d87f58f90ae3c1de063bdfc0 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期五, 08 九月 2023 16:24:33 +0800
Subject: [PATCH] 设备台账 1.ABC标识变更记录功能 2.质保日期变更记录功能 3.质保到期提醒 4.ABC标识与关键设备标识联动 5.设备质保期字段添加

---
 src/views/eam/modules/equipmentNew/EquipmentUpdateWarrantyList.vue |  182 ++++++++
 src/views/eam/modules/equipmentNew/EquipmentModal.vue              |  130 ++++--
 src/views/eam/modules/equipmentNew/EquipmentUpdateABCList.vue      |  169 ++++++++
 src/views/eam/modules/equipmentNew/edit/ABCUpdateEditTable.vue     |  270 ++++++++++++
 src/views/eam/modules/equipmentNew/edit/WarrantyUpdateTable.vue    |  273 +++++++++++++
 src/views/eam/modules/equipmentNew/edit/ABCUpdateEditModel.vue     |   75 +++
 src/views/eam/EquipmentList.vue                                    |   44 +
 src/views/eam/modules/equipmentNew/edit/WarrantyUpdateModel.vue    |   78 +++
 8 files changed, 1,165 insertions(+), 56 deletions(-)

diff --git a/src/views/eam/EquipmentList.vue b/src/views/eam/EquipmentList.vue
index a633527..1ed70db 100644
--- a/src/views/eam/EquipmentList.vue
+++ b/src/views/eam/EquipmentList.vue
@@ -241,8 +241,9 @@
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import"  v-has="'equipmentAccount:add&delete&import&Edit'">瀵煎叆</a-button>
       </a-upload>
+      <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateABC" type="primary" icon="font-colors" v-has="'equipmentAccount:add&delete&import&Edit'">ABC鏍囪瘑鍙樻洿</a-button>
+      <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateWarranty" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">璐ㄤ繚鏈熷彉鏇�</a-button>
     </div>
-
     <!-- table鍖哄煙-begin -->
     <div>
       <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
@@ -260,7 +261,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}"
         :customRow="clickThenSelect"
         @change="handleTableChange">
 
@@ -425,22 +426,30 @@
     <a-tabs defaultActiveKey="1">
       <a-tab-pane tab="宸ヨ壓鍙傛暟" key="1" >
         <EquipmentProcessParametersList 
-        :mainId="equipmentProcessParametersMainId" 
+        :mainId="selectedMainId" 
         :isOpen="isOpenProcess"
         />
       </a-tab-pane>
       <a-tab-pane tab="璁惧绮惧害" key="2" forceRender>
         <EquipmentPrecisionParametersList 
         :isOpen="isOpenPrecision"
-        :mainId="equipmentPrecisionParametersMainId" />
+        :mainId="selectedMainId" />
       </a-tab-pane>
       <a-tab-pane tab="璁惧鏂囨。" key="3" forceRender>
-        <EquipmentDocumentList :mainId="equipmentDocumentMainId" />
+        <EquipmentDocumentList :mainId="selectedMainId" />
+      </a-tab-pane>
+      <a-tab-pane tab="ABC鏍囪瘑鍙樻洿璁板綍" key="4" forceRender>
+        <equipment-update-ABC-list :mainId="selectedMainId" />
+      </a-tab-pane>
+      <a-tab-pane tab="璐ㄤ繚鏈熷彉鏇磋褰�" key="5" forceRender>
+        <equipment-update-warranty-list :mainId="selectedMainId" />
       </a-tab-pane>
     </a-tabs>
     <equipment-modal ref="modalForm" @ok="modalFormOk"></equipment-modal>
     <process-edit-model ref ="processEditModel"></process-edit-model>
     <precision-edit-model ref ="precisionEditModel"></precision-edit-model>
+    <aBC-update-edit-model @ok="modalFormOk" :updateList="selectionRows" ref="updateABC"></aBC-update-edit-model>
+    <warranty-update-model  :updateList="selectionRows"  ref="updateWarranty"></warranty-update-model>
   </a-card>
 </template>
 
@@ -457,7 +466,13 @@
   import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer'
   import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue'
   import ProcessEditModel from './modules/equipmentNew/edit/ProcessEditModel.vue'
-  import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel.vue'
+  import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel'
+  import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList.vue'
+  import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue'
+import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel.vue'
+import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue'
+ 
+
 
  
   export default {
@@ -472,6 +487,10 @@
         JSearchSelectTag,
         ProcessEditModel,
         PrecisionEditModel,
+        EquipmentUpdateABCList ,
+        EquipmentUpdateWarrantyList,
+        ABCUpdateEditModel,
+        WarrantyUpdateModel,
     },
     data () {
       return {
@@ -726,6 +745,7 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
+        mainId:'',
       }
     },
     created() {
@@ -761,16 +781,10 @@
       },
       onSelectChange(selectedRowKeys, selectionRows) {
         if(selectedRowKeys.length==1){
-          this.equipmentProcessParametersMainId = selectionRows[0]['id']
-          this.equipmentDocumentMainId = selectionRows[0]['id']
-          this.equipmentPrecisionParametersMainId = selectionRows[0]['id']
           this.selectedMainId=selectedRowKeys[0]
           this.isOpenProcess = selectionRows[0].processParameters==1;
           this.isOpenPrecision = selectionRows[0].precisionParameters==1;
         }else{
-          this.equipmentProcessParametersMainId =''
-          this.equipmentDocumentMainId = ''
-          this.equipmentPrecisionParametersMainId = ''
           this.selectedMainId=''
         }
         this.selectedRowKeys = selectedRowKeys;
@@ -874,6 +888,12 @@
         }
       })
     },
+    handleUpdateABC(){
+      this.$refs.updateABC.add();
+    },
+    handleUpdateWarranty(){
+      this.$refs.updateWarranty.add();
+    }
 
     }
   }
diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
index 82ac48a..a9b5db4 100644
--- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue
+++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -242,23 +242,6 @@
           >鐘舵�佸強鏍囪瘑</a-divider>
           <a-col :span="6">
             <a-form-model-item
-              label="鍏抽敭璁惧鏍囪瘑"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="specificEquipment"
-            >
-              <j-dict-select-tag
-                allow-clear
-                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
-                :disabled="formDisabled"
-                :triggerChange="true"
-                dictCode="specific_equipment"
-                v-model="model.specificEquipment"
-              />
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item
               label="璁惧鐘舵��"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
@@ -289,6 +272,49 @@
                 dictCode="technology_status"
                 v-model="model.technologyStatus"
               />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勪骇鐘舵��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="propertyStatus"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ祫浜х姸鎬�"
+                :triggerChange="true"
+                dictCode="property_status"
+                v-model="model.propertyStatus"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row v-if="model.propertyStatus=='warranty'">
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >璐ㄤ繚鏃ユ湡</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚寮�濮嬫棩鏈�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyStart"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="model.warrantyStart"></j-date>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚缁撴潫鏃ユ湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyEnd"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -718,7 +744,25 @@
                 placeholder="璇烽�夋嫨ABC鏍囪瘑"
                 :triggerChange="true"
                 dictCode="ABC-standard-result"
+                @change="changeNeedSpecific"
                 v-model="model.equipmentImportanceId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6" v-if="needSpecific">
+            <a-form-model-item
+              label="鍏抽敭璁惧鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="specificEquipment"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="specific_equipment"
+                v-model="model.specificEquipment"
               />
             </a-form-model-item>
           </a-col>
@@ -798,32 +842,6 @@
                 :read-only="true"
                 v-model="model.processParametersTemplateId_dictText"
               />
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row>
-          <a-divider
-            orientation="center"
-            style="font-size: large;font-style: italic;color: #66aeed;"
-          >璐ㄤ繚鏃ユ湡</a-divider>
-          <a-col :span="6">
-            <a-form-model-item
-              label="璐ㄤ繚寮�濮嬫棩鏈�"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="warrantyStart"
-            >
-            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="model.warrantyStart"></j-date>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="6">
-            <a-form-model-item
-              label="璐ㄤ繚缁撴潫鏃ユ湡"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="warrantyEnd"
-            >
-            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -943,7 +961,10 @@
         ],
         warrantyEnd:[
         { required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡!' },
-        ]
+        ],
+        propertyStatus:[
+        { required: true, message: '璇烽�夋嫨璧勪骇鐘舵��!' },
+        ],
       },
       url: {
         add: "/eam/equipment/add",
@@ -951,6 +972,7 @@
         loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
       },
       treeData: [],
+      needSpecific:false,
 
     }
   },
@@ -961,6 +983,7 @@
   },
   methods: {
     add() {
+      this
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -1141,6 +1164,25 @@
       }
       this.model = Object.assign({}, this.model);
 
+    },
+    changeNeedSpecific(val){
+       if(val=='A'){
+          this.needSpecific=true;
+       }else{
+        let that = this;
+        this.$confirm({
+            title: '鎻愮ず',
+            content: '闈濧绫昏澶囷紝鏄惁瑕佹坊鍔犲叧閿澶囨爣璇嗭紒',
+            okText: '纭',
+            cancelText: '鍙栨秷',
+            onOk() {
+              that.needSpecific = true;
+            },
+            onCancel(){
+              that.needSpecific = false;
+            }
+        })
+       }
     }
   },
   computed: {
diff --git a/src/views/eam/modules/equipmentNew/EquipmentUpdateABCList.vue b/src/views/eam/modules/equipmentNew/EquipmentUpdateABCList.vue
new file mode 100644
index 0000000..c2713aa
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/EquipmentUpdateABCList.vue
@@ -0,0 +1,169 @@
+<template>
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <div>
+      <div 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>椤�
+        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            涓嬭浇
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">缂栬緫</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+            <a>鍒犻櫎</a>
+          </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  export default {
+    name: "UpdateABC",
+    mixins:[JeecgListMixin],
+    components: { },
+    props:{
+      mainId:{
+        type:String,
+        default:'',
+        required:false
+      }
+    },
+    watch:{
+      mainId:{
+        immediate: true,
+        handler(val) {
+          if(!this.mainId){
+            this.clearList()
+          }else{
+            this.queryParam['equipmentId'] = val
+            this.queryParam['updateType'] = 'ABC'
+            this.loadData(1);
+
+          }
+        }
+      }
+    },
+    data () {
+      return {
+        description: '鏉愭枡鍑哄簱鍗曠鐞嗛〉闈�',
+        disableMixinCreated:true,
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'ABC鏍囪瘑锛堟棫锛�',
+            align:"center",
+            dataIndex: 'oldAbcTag_dictText',
+            width:300
+          },
+          {
+            title:'ABC鏍囪瘑锛堟柊锛�',
+            align:"center",
+            dataIndex: 'newAbcTag_dictText',
+            width:300
+          },
+          {
+            title:'鍙樻洿鏃ユ湡',
+            align:"center",
+            dataIndex: 'updateDate',
+            width:300
+          },
+          {
+            title:'鍙樻洿浜�',
+            align:"center",
+            dataIndex: 'updatePerson_dictText',
+            width:300
+          },
+          {
+            title:'澶囨敞',
+            align:"center",
+            dataIndex: 'remark',
+            width:300
+          },
+        ],
+        url: {
+          list: "/eam/equipmentUpdateInfo/list",
+        },
+        dictOptions:{
+        }
+      }
+    },
+    created() {
+    },
+    computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+      }
+    },
+    methods: {
+      clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
+      }
+
+    },
+    mounted(){
+      this.$bus.$on('loadData', (data) => {
+            this.loadData();
+      });
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
diff --git a/src/views/eam/modules/equipmentNew/EquipmentUpdateWarrantyList.vue b/src/views/eam/modules/equipmentNew/EquipmentUpdateWarrantyList.vue
new file mode 100644
index 0000000..43669e2
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/EquipmentUpdateWarrantyList.vue
@@ -0,0 +1,182 @@
+<template>
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <div>
+      <div 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>椤�
+        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            涓嬭浇
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">缂栬緫</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+            <a>鍒犻櫎</a>
+          </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "UpdateWarranty",
+    mixins:[JeecgListMixin],
+    components: { },
+    props:{
+      mainId:{
+        type:String,
+        default:'',
+        required:false
+      }
+    },
+    watch:{
+      mainId:{
+        immediate: true,
+        handler(val) {
+          if(!this.mainId){
+            this.clearList()
+          }else{
+            this.queryParam['equipmentId'] = val
+            this.queryParam['updateType'] = 'warranty'
+            this.loadData(1);
+          }
+        }
+      }
+    },
+    data () {
+      return {
+        description: '鏉愭枡鍑哄簱鍗曠鐞嗛〉闈�',
+        disableMixinCreated:true,
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'璐ㄤ繚寮�濮嬫棩鏈燂紙鏃э級',
+            align:"center",
+            dataIndex: 'oldStart',
+            width:200
+          },
+          {
+            title:'璐ㄤ繚缁撴潫鏃ユ湡锛堟棫锛�',
+            align:"center",
+            dataIndex: 'oldEnd',
+            width:200
+          },
+          {
+            title:'璐ㄤ繚寮�濮嬫棩鏈燂紙鏂帮級',
+            align:"center",
+            dataIndex: 'newStart',
+            width:200
+          },
+          {
+            title:'璐ㄤ繚缁撴潫鏃ユ湡锛堟柊锛�',
+            align:"center",
+            dataIndex: 'newEnd',
+            width:200
+          },
+          {
+            title:'鍙樻洿鏃ユ湡',
+            align:"center",
+            dataIndex: 'updateDate',
+            width:200
+          },
+          {
+            title:'鍙樻洿浜�',
+            align:"center",
+            dataIndex: 'updatePerson_dictText',
+            width:200
+          },
+          {
+            title:'澶囨敞',
+            align:"center",
+            dataIndex: 'remark',
+            width:200
+          },
+        ],
+        url: {
+          list: "/eam/equipmentUpdateInfo/list",
+        },
+        dictOptions:{
+        }
+      }
+    },
+    created() {
+    },
+    computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+      }
+    },
+    methods: {
+      clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
+      }
+
+    },
+    mounted(){
+      this.$bus.$on('loadData', (data) => {
+            this.loadData();
+      });
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
diff --git a/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditModel.vue b/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditModel.vue
new file mode 100644
index 0000000..7bfc2f1
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditModel.vue
@@ -0,0 +1,75 @@
+<template>
+  <j-modal
+    :title="'ABC鏍囪瘑鍙樻洿'"
+    :width="1520"
+    :height="600"
+    :visible="visible"
+    :maskClosable="true"
+    :fullscreen="true"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel">
+    <aBC-update-edit-table
+    :updateList="updateList"
+    ref="realForm"
+    @ok="submitCallback"
+    :disabled="disableSubmit"/>
+  </j-modal>
+</template>
+<script>
+import ABCUpdateEditTable from './ABCUpdateEditTable.vue'
+  export default {
+    name: 'ABCUpdateEditModel',
+    components: {
+        ABCUpdateEditTable
+    },
+    props:{
+      updateList:{
+        type:Array,
+        default:[],
+        required:false,
+      }
+    },
+    data() {
+      return {
+        title:'',
+        width:1500,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods:{
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.addBefore();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.handleOk();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.$bus.$emit('loadData')
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditTable.vue b/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditTable.vue
new file mode 100644
index 0000000..a7685a4
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/ABCUpdateEditTable.vue
@@ -0,0 +1,270 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <!-- 涓昏〃鍗曞尯鍩� -->
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+      <!-- 瀛愯〃鍗曞尯鍩� -->
+    <a-tabs v-model="activeKey" @change="handleChangeTabs">
+      <a-tab-pane tab="鍙樻洿璁惧鍒�" :key="refKeys[0]" :forceRender="true">
+        <j-vxe-table
+          keep-source
+          :ref="refKeys[0]"
+          :loading="updateABCEditTable.loading"
+          :columns="updateABCEditTable.columns"
+          :dataSource="updateABCEditTable.dataSource"
+          :maxHeight="600"
+          :disabled="formDisabled"
+          :rowNumber="true"
+          :rowSelection="false"
+          :toolbar="false"
+          bordered
+          :alwaysEdit="true"
+          />
+      </a-tab-pane>
+    </a-tabs>
+  </a-spin>
+</template>
+
+<script>
+
+  import { getAction } from '@/api/manage'
+  import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
+  import { duplicateCheck } from '@/api/api'
+  import { JVXETypes } from '@/components/jeecg/JVxeTable'
+  import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
+  import { validateDuplicateValue } from '@/utils/util'
+  import JFormContainer from '@/components/jeecg/JFormContainer'
+  import dayjs from 'dayjs'
+  export default {
+    name: 'PrecisionEditTable',
+    mixins: [JVxeTableModelMixin],
+    components: {
+      JFormContainer,
+      dayjs
+    },
+    data() {
+      return {
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        model:{
+         },
+        // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
+        addDefaultRowNum: 0,
+        validatorRules: {
+        },
+        refKeys: ['updateABCEditTableList', ],
+        tableKeys:['updateABCEditTableList', ],
+        activeKey: 'updateABCEditTableList',
+        updateABCEditTable: {
+          loading: false,
+          dataSource: [],
+          columns: [
+            {
+              title: 'id',
+              key: 'id',
+               type: JVXETypes.hidden,
+              disabled:true,
+              align:'center',
+            },
+            {
+              title: '缁熶竴缂栫爜',
+              key: 'num',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+              
+            },
+            {
+              title: '璁惧鍚嶇О',
+              key: 'name',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+            },
+            {
+              title: '璁惧鍨嬪彿',
+              key: 'model',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+            },
+            {
+              title: 'ABC鏍囪瘑锛堟棫锛�',
+              key: 'equipmentImportanceId',
+              type: JVXETypes.normal,
+              dictCode: 'ABC-standard-result',
+              options:[],
+              width:"200px",
+              placeholder: '璇烽�夋嫨${title}',
+              align:'center',
+            },
+            {
+              title: 'ABC鏍囪瘑锛堟柊锛�',
+              key: 'newABCTag',
+              type: JVXETypes.select,
+              dictCode: 'ABC-standard-result',
+              options:[],
+              width:"200px",
+              placeholder: '璇烽�夋嫨${title}',
+              align:'center',
+              validateRules: [
+              {
+                required: true, // 蹇呭~
+                message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈�
+              },
+              {
+                handler({ cellValue, row, column }, callback, target) {
+                    if (cellValue==row.equipmentImportanceId) {
+                        callback(false, '${title}涓嶈兘涓庢棫鏁版嵁闆峰悓') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀�
+                    } else {
+                        callback(true) // true = 閫氳繃楠岃瘉
+                    }
+                },
+                message: '${title}榛樿鎻愮ず'
+              }
+              ]
+            },
+            {
+              title: '鍏抽敭璁惧鏍囪瘑',
+              key: 'specificEquipment',
+              type: JVXETypes.select,
+              width:"200px",
+              placeholder: '璇烽�夋嫨${title}',
+              dictCode:'specific_equipment',
+              align:'center',
+              options:[],
+              validateRules: [
+              // {
+              //   required: true, // 蹇呭~
+              //   message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈�
+              // },
+              { handler({ cellValue, row, column }, callback, target) {
+                    if (row.newABCTag=='A'&&(cellValue==null||cellValue==''||cellValue==undefined)) {
+                        callback(false, 'A绫昏澶囧繀椤昏缃叧閿爣璇�') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀�
+                    } else {
+                        callback(true) // true = 閫氳繃楠岃瘉
+                    }
+                },
+                message: '${title}榛樿鎻愮ず'
+              },
+              ]
+            },
+            {
+              title: '澶囨敞',
+              key: 'remark',
+              type: JVXETypes.textarea,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+              validateRules: [
+              ]
+            },
+          ]
+        },
+        url: {
+          // add: "/tooling/toolingMakeAccountMain/add",
+          add: "/eam/equipmentUpdateInfo/updateABC",
+          // queryById: "/tooling/toolingMakeAccountMain/queryById",
+          updateABCEditTableList: {
+            list: '/eam/equipmentPrecisionParameters/list'
+          },
+        }
+      }
+    },
+    props: {
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      updateList:{
+        type:Array,
+        default:[],
+        required:false,
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+    },
+    methods: {
+      addBefore(){
+        this.updateABCEditTable.dataSource = this.updateList;
+      },
+      getAllTable() {
+        let values = this.tableKeys.map(key => getRefPromise(this, key))
+        return Promise.all(values)
+      },
+      /** 璋冪敤瀹宔dit()鏂规硶涔嬪悗浼氳嚜鍔ㄨ皟鐢ㄦ鏂规硶 */
+      editAfter() {
+        this.$nextTick(() => {
+        })
+        // 鍔犺浇瀛愯〃鏁版嵁
+        if (this.model.id) {
+          let params = { equipmentId: this.model.id }
+          this.requestSubTableData(this.url.updateABCEditTableList.list, params, this.updateABCEditTable)
+        }
+      },
+      //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟
+        validateSubForm(allValues){
+            return new Promise((resolve,reject)=>{
+              Promise.all([
+              ]).then(() => {
+                resolve(allValues)
+              }).catch(e => {
+                if (e.error === VALIDATE_FAILED) {
+                  // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab
+                  this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index]
+                } else {
+                  console.error(e)
+                }
+              })
+            })
+        },
+      /** 鏁寸悊鎴恌ormData */
+      classifyIntoFormData(allValues) {
+        let main = Object.assign(this.model, allValues.formValue)
+        return {
+          ...main, // 灞曞紑
+          updateABCEditTableList: allValues.tablesValue[0].tableData,
+        }
+      },
+      validateError(msg){
+        this.$message.error(msg)
+      },
+      changeDate(target){
+        console.log(target)
+        if(target.columnIndex==7){
+             target.row.nextCheckDate=dayjs().add(target.value,'day').format('YYYY-MM-DD')
+        }
+      }
+
+    }
+  }
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateModel.vue b/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateModel.vue
new file mode 100644
index 0000000..9f9c4c0
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateModel.vue
@@ -0,0 +1,78 @@
+<template>
+  <j-modal
+    :title="'璐ㄤ繚鏈熷彉鏇�'"
+    :width="1515"
+    :height="600"
+    :visible="visible"
+    :maskClosable="true"
+    :fullscreen="true"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel">
+    <warranty-update-table
+    :updateList="updateList"
+    ref="realForm"
+    @ok="submitCallback"
+    :disabled="disableSubmit"/>
+  </j-modal>
+</template>
+<script>
+import WarrantyUpdateTable from './WarrantyUpdateTable.vue'
+ 
+  export default {
+    name: 'WarrantyUpdateModel',
+    components: {
+      WarrantyUpdateTable
+    },
+    props:{
+      updateList:{
+        type:Array,
+        default:[],
+        required:false,
+      }
+    },
+    data() {
+      return {
+        title:'',
+        width:1500,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods:{
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.addBefore();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.realForm.warrantyUpdateTable.dataSource=[];
+        
+      },
+      handleOk () {
+        this.$refs.realForm.handleOk();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.$bus.$emit('loadData')
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateTable.vue b/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateTable.vue
new file mode 100644
index 0000000..4760ced
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/WarrantyUpdateTable.vue
@@ -0,0 +1,273 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <!-- 涓昏〃鍗曞尯鍩� -->
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+      <!-- 瀛愯〃鍗曞尯鍩� -->
+    <a-tabs v-model="activeKey" @change="handleChangeTabs">
+      <a-tab-pane tab="鍙樻洿璁惧鍒�" :key="refKeys[0]" :forceRender="true">
+        <j-vxe-table
+          keep-source
+          :ref="refKeys[0]"
+          :loading="warrantyUpdateTable.loading"
+          :columns="warrantyUpdateTable.columns"
+          :dataSource="warrantyUpdateTable.dataSource"
+          :maxHeight="600"
+          :disabled="formDisabled"
+          :rowNumber="true"
+          :rowSelection="false"
+          :toolbar="false"
+          bordered
+          :alwaysEdit="true"
+          />
+      </a-tab-pane>
+    </a-tabs>
+  </a-spin>
+</template>
+
+<script>
+
+  import { getAction } from '@/api/manage'
+  import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
+  import { duplicateCheck } from '@/api/api'
+  import { JVXETypes } from '@/components/jeecg/JVxeTable'
+  import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
+  import { validateDuplicateValue } from '@/utils/util'
+  import JFormContainer from '@/components/jeecg/JFormContainer'
+  import dayjs from 'dayjs'
+  export default {
+    name: 'WarrantyUpdateTable',
+    mixins: [JVxeTableModelMixin],
+    components: {
+      JFormContainer,
+      dayjs
+    },
+    data() {
+      return {
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        model:{
+         },
+        // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
+        addDefaultRowNum: 0,
+        validatorRules: {
+        },
+        refKeys: ['warrantyUpdateTableList', ],
+        tableKeys:['warrantyUpdateTableList', ],
+        activeKey: 'warrantyUpdateTableList',
+        warrantyUpdateTable: {
+          loading: false,
+          dataSource: [],
+          columns: [
+          {
+              title: 'id',
+              key: 'id',
+               type: JVXETypes.hidden,
+              disabled:true,
+              align:'center',
+            },
+            {
+              title: '缁熶竴缂栫爜',
+              key: 'num',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+              
+            },
+            {
+              title: '璁惧鍚嶇О',
+              key: 'name',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+            },
+            {
+              title: '璁惧鍨嬪彿',
+              key: 'model',
+               type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              disabled:true,
+              align:'center',
+              defaultValue:'',
+            },
+            {
+              title: '璐ㄤ繚寮�濮嬫棩鏈燂紙鏃э級',
+              key: 'warrantyStart',
+              type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+            },
+            {
+              title: '璐ㄤ繚寮�濮嬫棩鏈燂紙鏂帮級',
+              key: 'newStart',
+              type: JVXETypes.date,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+              defaultValue:365,
+              validateRules: [
+              {
+                required: true, // 蹇呭~
+                message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈�
+              },
+              { handler({ cellValue, row, column }, callback, target) {
+                    if (cellValue==row.warrantyStart) {
+                        callback(false, '${title}涓嶈兘涓庢棫鏁版嵁闆峰悓') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀�
+                    } else {
+                        callback(true) // true = 閫氳繃楠岃瘉
+                    }
+                },
+                message: '${title}榛樿鎻愮ず'
+              },
+              ]
+            },
+            {
+              title: '璐ㄤ繚缁撴潫鏃ユ湡锛堟棫锛�',
+              key: 'warrantyEnd',
+              type: JVXETypes.normal,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+            },
+            {
+              title: '璐ㄤ繚缁撴潫鏃ユ湡锛堟棫锛�',
+              key: 'newEnd',
+              type: JVXETypes.date,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+              defaultValue:365,
+              validateRules: [
+              {
+                required: true, // 蹇呭~
+                message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈�
+              },
+              { handler({ cellValue, row, column }, callback, target) {
+                    if (cellValue==row.warrantyEnd) {
+                        callback(false, '${title}涓嶈兘璺熸棫鏁版嵁闆峰悓') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀�
+                    } else {
+                        callback(true) // true = 閫氳繃楠岃瘉
+                    }
+                },
+                message: '${title}榛樿鎻愮ず'
+              },
+              ]
+            },
+            {
+              title: '澶囨敞',
+              key: 'remark',
+              type: JVXETypes.textarea,
+              width:"200px",
+              placeholder: '璇疯緭鍏�${title}',
+              align:'center',
+              validateRules: [
+              ]
+            },
+          ]
+        },
+        url: {
+          // add: "/tooling/toolingMakeAccountMain/add",
+          add: "/eam/equipmentUpdateInfo/updateWarranty",
+          // queryById: "/tooling/toolingMakeAccountMain/queryById",
+          warrantyUpdateTableList: {
+            list: '/eam/equipmentPrecisionParameters/list'
+          },
+        }
+      }
+    },
+    props: {
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      updateList:{
+        type:Array,
+        default:[],
+        required:false,
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+    },
+    methods: {
+      addBefore(){
+        this.warrantyUpdateTable.dataSource = this.updateList
+      },
+      getAllTable() {
+        let values = this.tableKeys.map(key => getRefPromise(this, key))
+        return Promise.all(values)
+      },
+      /** 璋冪敤瀹宔dit()鏂规硶涔嬪悗浼氳嚜鍔ㄨ皟鐢ㄦ鏂规硶 */
+      editAfter() {
+        this.$nextTick(() => {
+        })
+        // 鍔犺浇瀛愯〃鏁版嵁
+        if (this.model.id) {
+          let params = { equipmentId: this.model.id }
+          this.requestSubTableData(this.url.warrantyUpdateTableList.list, params, this.warrantyUpdateTable)
+        }
+      },
+      //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟
+        validateSubForm(allValues){
+            return new Promise((resolve,reject)=>{
+              Promise.all([
+              ]).then(() => {
+                resolve(allValues)
+              }).catch(e => {
+                if (e.error === VALIDATE_FAILED) {
+                  // 濡傛灉鏈夋湭閫氳繃琛ㄥ崟楠岃瘉鐨勫瓙琛紝灏辫嚜鍔ㄨ烦杞埌瀹冩墍鍦ㄧ殑tab
+                  this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index]
+                } else {
+                  console.error(e)
+                }
+              })
+            })
+        },
+      /** 鏁寸悊鎴恌ormData */
+      classifyIntoFormData(allValues) {
+        let main = Object.assign(this.model, allValues.formValue)
+        return {
+          ...main, // 灞曞紑
+          warrantyUpdateTableList: allValues.tablesValue[0].tableData,
+        }
+      },
+      validateError(msg){
+        this.$message.error(msg)
+      },
+      changeDate(target){
+        console.log(target)
+        if(target.columnIndex==7){
+             target.row.nextCheckDate=dayjs().add(target.value,'day').format('YYYY-MM-DD')
+        }
+      }
+
+    }
+  }
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file

--
Gitblit v1.9.3