From 5a07da2b852ff4b73036a364ebd4c8077ab33223 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期四, 28 十二月 2023 11:17:03 +0800
Subject: [PATCH] 提交

---
 src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateTable.vue |  277 +++++++++++++++++++++++
 src/views/eam/EquipmentListOfAll.vue                                |   13 
 src/views/eam/modules/equipmentNew/edit/EquipmentSelectModel.vue    |  320 ++++++++++++++++++++++++++
 src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue       |   16 
 src/views/eam/MalfunctionRepair.vue                                 |    3 
 src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue |   72 ++++++
 6 files changed, 689 insertions(+), 12 deletions(-)

diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue
index db2fdd2..6863712 100644
--- a/src/views/eam/EquipmentListOfAll.vue
+++ b/src/views/eam/EquipmentListOfAll.vue
@@ -258,6 +258,7 @@
       </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>
+      <a-button  @click="handleUpdateKeyEquipment" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">璁剧疆鍏抽敭璁惧鏍囪瘑</a-button>
     </div>
     <!-- table鍖哄煙-begin -->
     <div>
@@ -481,6 +482,7 @@
     <aBC-update-edit-model @ok="modalFormOk" :updateList="selectionRows" ref="updateABC"></aBC-update-edit-model>
     <warranty-update-model  :updateList="selectionRows"  ref="updateWarranty"></warranty-update-model>
     <EquipmentSparePartsModal ref="modalFormSpareParts" @ok="modalFormOk" />
+    <key-equipment-update-model @ok="modalFormOk" :updateList="selectionRows" ref="keyEquipmentUpdate"></key-equipment-update-model>
   </a-card>
 </template>
 
@@ -501,7 +503,7 @@
   import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList'
   import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue'
   import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel'
-  import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue'
+  import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel'
   import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts'
   import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal'
   import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue'
@@ -509,6 +511,8 @@
   import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
   import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
   import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
+import KeyEquipmentUpdateModel from './modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue'
+  
   export default {
     name: "EquipmentList",
     mixins:[JeecgListMixin,mixinDevice],
@@ -532,6 +536,7 @@
         DailyMaintenanceList,
         SecondMaintenanceList,
         ThirdMaintenanceList,
+        KeyEquipmentUpdateModel,
     },
     data () {
       return {
@@ -962,8 +967,10 @@
     },
     handleEditSpareParts(record){
       this.$refs.modalFormSpareParts.edit(record);
-    }
-
+    },
+    handleUpdateKeyEquipment(){
+      this.$refs.keyEquipmentUpdate.add();
+    },
     }
   }
 </script>
diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue
index 058aa14..2d67ed0 100644
--- a/src/views/eam/MalfunctionRepair.vue
+++ b/src/views/eam/MalfunctionRepair.vue
@@ -15,7 +15,7 @@
           >
           <a-form-item label="缁熶竴缂栧彿缇�">
               <a-textarea
-                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤绌烘牸闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
+                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鎹㈣闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
                 v-model="queryParam.nums"
                 :auto-size="{ minRows: 2, maxRows:2 }"
               ></a-textarea>
@@ -195,6 +195,7 @@
         icon="plus"
         v-has="'report:add&edit'"
       >鏂板</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('鏁呴殰鎶ヤ慨')">瀵煎嚭</a-button>
     </div>
 
     <div>
diff --git a/src/views/eam/modules/equipmentNew/edit/EquipmentSelectModel.vue b/src/views/eam/modules/equipmentNew/edit/EquipmentSelectModel.vue
new file mode 100644
index 0000000..a84798f
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/EquipmentSelectModel.vue
@@ -0,0 +1,320 @@
+<template>
+  <!--鏀寔鍏ㄥ睆缂╂斁-->
+  <a-modal
+    :visible="visible"
+    :title="title"
+    switchFullscreen
+    @ok="handleSubmit"
+    @cancel="close"
+    style="top:50px"
+    cancelText="鍏抽棴"
+    :width="1400"
+  >
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <a-form
+          layout="inline"
+          @keyup.enter.native="searchQuery"
+        >
+          <a-row :gutter="24">
+            <a-col
+              :md="8"
+              :sm="6"
+            >
+              <a-form-item label="缁熶竴缂栫爜">
+                <a-input
+                  placeholder="璇疯緭鍏ョ粺涓�缂栫爜"
+                  v-model="queryParam.num"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col
+              :md="8"
+              :sm="6"
+            >
+              <a-form-item label="璁惧鍚嶇О">
+                <a-input
+                  placeholder="璁惧鍚嶇О"
+                  v-model="queryParam.name"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col
+            :md="8"
+            :sm="6"
+          >
+          <a-form-item 
+          label="缁熶竴缂栧彿缇�"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          >
+              <a-textarea
+                placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鎹㈣闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
+                v-model="queryParam.nums"
+                :auto-size="{ minRows: 2, maxRows:2 }"
+              ></a-textarea>
+            </a-form-item>
+          </a-col>
+            <a-col :md="3">
+              <span
+                style="float: left;overflow: hidden;"
+                class="table-page-search-submitButtons"
+              >
+                <a-button
+                  type="primary"
+                  @click="searchQuery"
+                  icon="search"
+                >鏌ヨ</a-button>
+                <a-button
+                  @click="searchReset"
+                  icon="reload"
+                  style="margin-left: 10px"
+                >閲嶇疆</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <a-table
+        ref="table"
+        :scroll="scrollTrigger"
+        size="middle"
+        rowKey="id"
+        bordered
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :rowSelection="rowSelection"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+       <template slot="equipmentPhoto" 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>
+      </a-table>
+    </a-card>
+  </a-modal>
+</template>
+
+<script>
+import { filterObj } from '@/utils/util'
+import { getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+export default {
+  name: 'EquipmentSelectModel',
+  mixins: [JeecgListMixin],
+  components: {},
+  props: {},
+  data() {
+    return {
+      queryParam: {},
+      columns: [
+        {
+          title: '#',
+          dataIndex: 'id',
+          key: 'rowIndex',
+          width: 50,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
+          }
+        },
+        {
+          title: '缁熶竴缂栫爜',
+          align: 'center',
+          dataIndex: 'num',
+          width:200
+        },
+        {
+          title: '璁惧鍚嶇О',
+          align: 'center',
+          dataIndex: 'name',
+          width:200
+        },
+        {
+          title: '璁惧鍨嬪彿',
+          align: 'center',
+          dataIndex: 'model',
+          width:200
+        },
+        {
+          title: '璁惧瑙勬牸',
+          align: 'center',
+          dataIndex: 'specification',
+          width:200
+        },
+        {
+          title: 'ABC鏍囪瘑',
+          align: "center",
+          dataIndex: 'equipmentImportanceId',
+          width:100
+        },
+        {
+          title: '鍏抽敭璁惧鏍囪瘑',
+          align: "center",
+          dataIndex: 'specificEquipment_dictText',
+          width:100
+        },
+        {
+          title: '璁惧鐘舵��',
+          align: 'center',
+          dataIndex: 'equipmentStatus_dictText',
+          width:100
+        },
+        {
+          title: '鎶�鏈姸鎬�',
+          align: 'center',
+          dataIndex: 'technologyStatus_dictText',
+          width:100
+        },
+      ],
+      selectedRowKeys: [],
+      oldSelectRows: [],
+      scrollTrigger: {},
+      dataSource: [],
+      selectionRows: [],
+      title: '閫夋嫨璁惧',
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['5', '10', '30', '50', '100'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      isorter: {
+        column: 'num',
+        order: 'desc'
+      },
+      visible: false,
+      loading: false,
+      url: {
+        list: '/eam/equipment/getEquipmentList'
+      }
+    }
+  },
+  computed: {
+    rowSelection() {
+      return {
+        type: 'checkbox',
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.onSelectChange(selectedRows)
+        },
+        getCheckboxProps: record => ({
+          props: {
+            disabled: record.distable
+          }
+        }),
+        selectedRowKeys: this.selectedRowKeys
+      }
+    }
+  },
+
+  methods: {
+
+    async loadData(arg) {
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      let that = this
+      this.loading = true
+      this.queryParam.equipmentImportanceId = 'A';
+      let params = this.getQueryParams()//鏌ヨ鏉′欢
+      // params.equipmentStatus = '1'
+      await getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          for (let i = 0; i < res.result.records.length; i++) {
+            if (that.oldSelectRows.indexOf(res.result.records[i].id) > -1) {
+              res.result.records[i].distable = true
+            } else {
+              res.result.records[i].distable = false
+            }
+          }
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false
+      })
+    },
+
+    showModals(oldSelectRows) {
+      this.oldSelectRows = oldSelectRows
+      this.visible = true
+      this.loadData(1)
+    },
+    getQueryParams() {
+      let param = Object.assign({}, this.queryParam, this.isorter)
+      param.field = this.getQueryField()
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    //鏌ヨ鏉′欢澶勭悊
+    getQueryField() {
+      let str = 'id,'
+      for (let a = 0; a < this.columns.length; a++) {
+        str += ',' + this.columns[a].dataIndex
+      }
+      return str
+    },
+    searchReset(num) {
+      let that = this
+      this.queryParam = []
+      if (num !== 0) {
+        that.loadData(1)
+      }
+      that.selectborrowIds = []
+    },
+    close() {
+      this.searchReset(0)
+      this.selectedRowKeys = []
+      this.visible = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      //TODO 绛涢��
+
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      this.loadData()
+    },
+    handleSubmit() {
+      this.$emit('selectionRows', this.selectionRows)
+      this.searchReset(0)
+      this.close()
+    },
+    onSelectChange(selectionRows) {
+      this.selectionRows = selectionRows
+    },
+    searchQuery() {
+      this.loadData(1)
+    }
+  }
+}
+</script>
+
+<style scoped>
+.ant-table-tbody .ant-table-row td {
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+#components-layout-demo-custom-trigger .trigger {
+  font-size: 18px;
+  line-height: 64px;
+  padding: 0 24px;
+  cursor: pointer;
+  transition: color 0.3s;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue b/src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue
new file mode 100644
index 0000000..ecb4920
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue
@@ -0,0 +1,72 @@
+<template>
+  <j-modal
+    :title="'璐ㄤ繚鏈熷彉鏇�'"
+    :width="1515"
+    :height="600"
+    :visible="visible"
+    :maskClosable="true"
+    :fullscreen="true"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel">
+    <key-equipment-update-table
+    ref="realForm"
+    @ok="submitCallback"
+    :disabled="disableSubmit"/>
+  </j-modal>
+</template>
+<script>
+import KeyEquipmentUpdateTable from './KeyEquipmentUpdateTable.vue'
+ 
+  export default {
+    name: 'KeyEquipmentUpdateModel',
+    components: {
+      KeyEquipmentUpdateTable
+    },
+    props:{
+    },
+    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/KeyEquipmentUpdateTable.vue b/src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateTable.vue
new file mode 100644
index 0000000..8405142
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/edit/KeyEquipmentUpdateTable.vue
@@ -0,0 +1,277 @@
+<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="keyEquipmentUpdateList.loading"
+          :columns="keyEquipmentUpdateList.columns"
+          :dataSource="keyEquipmentUpdateList.dataSource"
+          :maxHeight="1000"
+          :disabled="formDisabled"
+          :rowNumber="true"
+          :rowSelection="true"
+          :toolbar="true"
+          :alwaysEdit="true"
+          :toolbarConfig="toolbarConfig"
+          >
+              <template slot="toolbarPrefix">
+                <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">閫夋嫨璁惧
+                </a-button>
+              </template>
+        </j-vxe-table>
+      </a-tab-pane>
+    </a-tabs>
+    <equipment-select-model ref="EquipmentSelectModal" @selectionRows="addSelectedEquipments"></equipment-select-model>
+  </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'
+  import EquipmentSelectModel from './EquipmentSelectModel'
+  export default {
+    name: 'KeyEquipmentUpdateTable',
+    mixins: [JVxeTableModelMixin],
+    components: {
+      JFormContainer,
+      dayjs,
+      EquipmentSelectModel
+    },
+    data() {
+      return {
+        toolbarConfig: {
+        // prefix 鍓嶇紑锛泂uffix 鍚庣紑
+        slot: ['prefix', 'suffix'],
+        // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳
+        btn: ['remove', 'clearSelection']
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        model:{
+         },
+        // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
+        addDefaultRowNum: 0,
+        validatorRules: {
+        },
+        refKeys: ['keyEquipmentUpdateTable', ],
+        tableKeys:['keyEquipmentUpdateTable', ],
+        activeKey: 'keyEquipmentUpdateTable',
+        keyEquipmentUpdateList: {
+          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: 'oldSpecificEquipment',
+              type: JVXETypes.select,
+              width:"200px",
+              placeholder: '鏃犳棫鏍囪瘑',
+              align:'center',
+              disabled:true,
+              dictCode:'specific_equipment',
+              options:[],
+            },
+            {
+              title: '鍏抽敭璁惧鏍囪瘑锛堟柊锛�',
+              key: 'specificEquipment',
+              type: JVXETypes.select,
+              width:"200px",
+              dictCode:'specific_equipment',
+              options:[],
+              placeholder: '璇疯緭鍏ユ柊鏍囪瘑',
+              align:'center',
+              defaultValue:365,
+              validateRules: [
+              {
+                required: true, // 蹇呭~
+                message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈�
+              },
+              { handler({ cellValue, row, column }, callback, target) {
+                    if (cellValue==row.oldSpecificEquipment) {
+                        callback(false, '${title}涓嶈兘涓庢棫鏁版嵁闆峰悓') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀�
+                    } else {
+                        callback(true) // true = 閫氳繃楠岃瘉
+                    }
+                },
+                message: '${title}榛樿鎻愮ず'
+              },
+              ]
+            },
+          ]
+        },
+        url: {
+          // add: "/tooling/toolingMakeAccountMain/add",
+          add: "/eam/equipment/updateKeyEquipment",
+          // queryById: "/tooling/toolingMakeAccountMain/queryById",
+          keyEquipmentUpdateList: {
+            list: '/eam/equipment/list'
+          },
+        }
+      }
+    },
+    props: {
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+    },
+    methods: {
+      addBefore(){
+          this.keyEquipmentUpdateList.dataSource=[]
+      },
+      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.keyEquipmentUpdateList.list, params, this.keyEquipmentUpdateList)
+        }
+      },
+      //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟
+        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, // 灞曞紑
+          keyEquipmentUpdateList: 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')
+        }
+      },
+      //閫夋嫨璁惧
+      selectEquipmentList() {
+        let ids = []
+        let tableData = this.$refs.keyEquipmentUpdateTable.getTableData()
+        for (let i = 0; i < tableData.length; i++) {
+          ids.push(tableData[i].equipmentId)
+        }
+        this.$refs.EquipmentSelectModal.showModals(ids)
+        this.$refs.EquipmentSelectModal.title = '閫夋嫨璁惧'
+        this.$refs.EquipmentSelectModal.disableSubmit = false
+      },
+      addSelectedEquipments(data) {
+        let tableData = this.$refs.keyEquipmentUpdateTable.getTableData()
+        // const seletedEquipmentIds = tableData.
+        var tableStr = JSON.stringify(tableData)
+        const addRows = []
+        for (let i = 0; i < data.length; i++) {
+          var equipment = {}
+          if (tableStr.indexOf(data[i].id)==-1) {
+            equipment = {
+              id:data[i].id,
+              equipmentId: data[i].id,
+              num: data[i].num,
+              name: data[i].name,
+              model:data[i].model,
+              oldSpecificEquipment:data[i].specificEquipment,
+            }
+          }
+          addRows.push(equipment)
+        }
+        this.$refs.keyEquipmentUpdateTable.pushRows(addRows)
+      },
+
+    }
+  }
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue
index fd08923..c217ea4 100644
--- a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue
+++ b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue
@@ -195,7 +195,7 @@
                 <a-form-item
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  label="鍏抽敭璁惧?"
+                  label="鍏抽敭璁惧"
                   class="hightColor"
                 >
                   <span
@@ -642,13 +642,13 @@
     //寮�宸�
     handleStart() {
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '缁翠慨宸ュ崟寮�宸�',
         content: '鎻愮ず锛氬紑宸ュ悗鏃犳硶鎾ゅ洖锛岃璋ㄦ厧鎿嶄綔锛�',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.orderStart, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('寮�宸ユ垚鍔�');
@@ -689,13 +689,13 @@
     },
     handleReport() {
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '缁翠慨宸ュ崟鎶ュ伐',
         content: '鎻愮ず锛氭姤宸ュ悗缁翠慨瀹屽伐锛岃璋ㄦ厧鎿嶄綔锛�',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.orderReport, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎶ュ伐鎴愬姛');
@@ -714,13 +714,13 @@
     //鎾ら攢
     handleRevoke() {
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '瀹屽伐鎾ら攢',
         content: '鎻愮ず锛氬畬宸ユ挙閿�鍚庡彲缁х画鎶ュ伐鎿嶄綔锛�',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.orderRevoke, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎾ら攢鎴愬姛');
@@ -737,13 +737,13 @@
     },
     handleSpare(){
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '绛夐噰璐欢',
         content: '鎻愮ず锛氳鎿嶄綔涓嶅彲鎾ら攢锛岀‘璁ゅ紑濮嬬瓑閲囪喘浠�?',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.handleSpare, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎿嶄綔鎴愬姛');
@@ -761,13 +761,13 @@
     },
     handleSpareStop(){
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '鍋滄绛夐噰璐欢',
         content: '鎻愮ず锛氳鎿嶄綔涓嶅彲鎾ら攢锛岀‘璁ゅ仠姝㈢瓑閲囪喘浠�?',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.handleSpareStop, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎿嶄綔鎴愬姛');
@@ -785,13 +785,13 @@
     },
     handlePart(){
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '绛夐噰璐欢',
         content: '鎻愮ず锛氳鎿嶄綔涓嶅彲鎾ら攢锛岀‘璁ょ瓑閲囪喘浠�?',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.handlePart, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎿嶄綔鎴愬姛');
@@ -809,13 +809,13 @@
     },
     handlePartStop(){
       const that = this;
-      that.confirmLoading = true;
       this.$confirm({
         title: '鍋滄绛夐噰璐欢',
         content: '鎻愮ず锛氳鎿嶄綔涓嶅彲鎾ら攢锛岀‘璁ゅ仠姝㈢瓑閲囪喘浠�?',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
+          that.confirmLoading = true;
           putAction(that.url.handlePartStop, that.repairOrder).then(res => {
             if (res.result) {
               that.$message.success('鎿嶄綔鎴愬姛');

--
Gitblit v1.9.3