From 02df90072bb95acd4ee02e516d22955dcdab735a Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期二, 02 九月 2025 18:01:03 +0800
Subject: [PATCH] 三级保养工作计划单

---
 src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.vue              |  125 +++++++++++++++
 src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.Style#Drawer.vue |  152 +++++++++++++++++++
 src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue                       |  197 ++++++++++++++++++++++++
 3 files changed, 474 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue b/src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue
new file mode 100644
index 0000000..1560707
--- /dev/null
+++ b/src/views/eam/base/EamThirdMaintenanceWorkPlanSheetList.vue
@@ -0,0 +1,197 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="璁惧缁熶竴缂栧彿">
+              <a-input placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栧彿" v-model="queryParam.equipmentCode"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="璁惧鍚嶇О">
+              <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="queryParam.equipmentName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="璁惧鍨嬪彿">
+              <a-input placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="queryParam.equipmentModel"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="浣跨敤閮ㄩ棬">
+              <a-tree-select v-model="queryParam.factoryOrgCode" style="width: 100%" :tree-data="productionTreeData"
+                             show-search :replaceFields="{key:'orgCode',value:'orgCode'}"
+                             treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储"
+                             :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
+                             allow-clear tree-default-expand-all>
+              </a-tree-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="淇濆吇骞翠唤">
+              <a-input placeholder="璇疯緭鍏ヤ繚鍏诲勾浠�" v-model="queryParam.maintenanceYear"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('鈥滀笁绾т繚鍏诲伐浣滆鍒掑崟')">瀵煎嚭</a-button>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">缂栬緫</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table鍖哄煙-end -->
+
+    <!-- 琛ㄥ崟鍖哄煙 -->
+    <eamThirdMaintenanceWorkPlanSheet-modal ref="modalForm" @ok="modalFormOk"></eamThirdMaintenanceWorkPlanSheet-modal>
+  </a-card>
+</template>
+
+<script>
+  import '@assets/less/TableExpand.less'
+  import EamThirdMaintenanceWorkPlanSheetModal from './modules/EamThirdMaintenanceWorkPlanSheetModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {getAction} from "@api/manage";
+
+  export default {
+    name: "EamThirdMaintenanceWorkPlanSheetList",
+    mixins:[JeecgListMixin],
+    components: {
+      EamThirdMaintenanceWorkPlanSheetModal
+    },
+    data () {
+      return {
+        description: '鈥滀笁绾т繚鍏诲伐浣滆鍒掑崟绠$悊椤甸潰',
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+          {
+            title: '璁惧缁熶竴缂栧彿',
+            align:"center",
+            dataIndex: 'equipmentCode'
+           },
+		   {
+            title: '璁惧鍚嶇О',
+            align:"center",
+            dataIndex: 'equipmentName'
+           },
+		   {
+            title: '浣跨敤閮ㄩ棬',
+            align:"center",
+            dataIndex: 'factoryOrgCode_dictText'
+           },
+		   {
+            title: '璁惧鍨嬪彿',
+            align:"center",
+            dataIndex: 'equipmentModel'
+           },
+		   {
+            title: '淇濆吇鏃ユ湡',
+            align:"center",
+            dataIndex: 'maintenanceDate'
+           },
+		   {
+            title: 'hf缂栫爜',
+            align:"center",
+            dataIndex: 'hfCode'
+           },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/eam/eamThirdMaintenanceWorkPlanSheet/list",
+          delete: "/eam/eamThirdMaintenanceWorkPlanSheet/delete",
+          deleteBatch: "/eam/eamThirdMaintenanceWorkPlanSheet/deleteBatch",
+          exportXlsUrl: "eam/eamThirdMaintenanceWorkPlanSheet/exportXls",
+          importExcelUrl: "eam/eamThirdMaintenanceWorkPlanSheet/importExcel",
+          getProductionTreeList: '/eam/BaseFactory/queryTreeList',
+       },
+        productionTreeData: [],
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    created() {
+      this.getProductionTreeDataByApi()
+    },
+    methods: {
+      // 鑾峰彇浣跨敤閮ㄩ棬鏍�
+      getProductionTreeDataByApi() {
+        getAction(this.url.getProductionTreeList)
+          .then(res => {
+            if (res.success) {
+              this.productionTreeData = res.result
+            } else {
+              this.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
+            }
+          })
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git "a/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.Style\043Drawer.vue" "b/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.Style\043Drawer.vue"
new file mode 100644
index 0000000..7d78032
--- /dev/null
+++ "b/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.Style\043Drawer.vue"
@@ -0,0 +1,152 @@
+<template>
+  <a-drawer
+      :title="title"
+      :width="800"
+      placement="right"
+      :closable="false"
+      @close="close"
+      :visible="visible">
+
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+      
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧id">
+          <a-input placeholder="璇疯緭鍏ヨ澶噄d" v-model="model.equipmentId" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪">
+          <a-input-number v-model="model.delFlag" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentCode" label="璁惧缁熶竴缂栧彿">
+          <a-input placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栧彿" v-model="model.equipmentCode" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentName" label="璁惧鍚嶇О">
+          <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="model.equipmentName" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryOrgCode" label="浣跨敤閮ㄩ棬">
+          <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄩ儴闂�" v-model="model.factoryOrgCode" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentModel" label="璁惧鍨嬪彿">
+          <a-input placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="model.equipmentModel" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="淇濆吇鏃ユ湡">
+          <a-input placeholder="璇疯緭鍏ヤ繚鍏绘棩鏈�" v-model="model.maintenanceDate" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hfCode" label="hf缂栫爜">
+          <a-input placeholder="璇疯緭鍏f缂栫爜" v-model="model.hfCode" />
+        </a-form-model-item>
+		
+      </a-form-model>
+    </a-spin>
+
+    <div class="drawer-bootom-button">
+      <a-button type="primary" @click="handleOk">纭畾</a-button>
+      <a-button type="primary" @click="handleCancel">鍙栨秷</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import moment from "moment"
+
+  export default {
+    name: "EamThirdMaintenanceWorkPlanSheetModal",
+    data () {
+      return {
+        title:"鎿嶄綔",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules:{
+        },
+        url: {
+          add: "/eam/eamThirdMaintenanceWorkPlanSheet/add",
+          edit: "/eam/eamThirdMaintenanceWorkPlanSheet/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        //鍒濆鍖栭粯璁ゅ��
+        this.edit({});
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).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();
+            })
+          }else{
+            return false;
+         }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  /**Button鎸夐挳闂磋窛*/
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+ /**鎶藉眽鎸夐挳鏍峰紡*/
+  .drawer-bootom-button {
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>
\ No newline at end of file
diff --git a/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.vue b/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.vue
new file mode 100644
index 0000000..dd7f5ee
--- /dev/null
+++ b/src/views/eam/base/modules/EamThirdMaintenanceWorkPlanSheetModal.vue
@@ -0,0 +1,125 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentCode" label="璁惧缁熶竴缂栧彿">
+          <a-input placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栧彿" v-model="model.equipmentCode" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentName" label="璁惧鍚嶇О">
+          <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉�" v-model="model.equipmentName" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryOrgCode" label="浣跨敤閮ㄩ棬">
+          <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄩ儴闂�" v-model="model.factoryOrgCode" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentModel" label="璁惧鍨嬪彿">
+          <a-input placeholder="璇疯緭鍏ヨ澶囧瀷鍙�" v-model="model.equipmentModel" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="淇濆吇鏃ユ湡">
+          <a-input placeholder="璇疯緭鍏ヤ繚鍏绘棩鏈�" v-model="model.maintenanceDate" />
+        </a-form-model-item>
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hfCode" label="hf缂栫爜">
+          <a-input placeholder="璇疯緭鍏f缂栫爜" v-model="model.hfCode" />
+        </a-form-model-item>
+
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import moment from "moment"
+
+  export default {
+    name: "EamThirdMaintenanceWorkPlanSheetModal",
+    data () {
+      return {
+        title:"鎿嶄綔",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules:{
+        },
+        url: {
+          add: "/eam/eamThirdMaintenanceWorkPlanSheet/add",
+          edit: "/eam/eamThirdMaintenanceWorkPlanSheet/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        //鍒濆鍖栭粯璁ゅ��
+        this.edit({});
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+         this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).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();
+            })
+          }else{
+             return false;
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>
\ No newline at end of file

--
Gitblit v1.9.3