From 6c61d432fddaa0fad317635bdea39094cde07633 Mon Sep 17 00:00:00 2001
From: bluejay <253316343@qq.com>
Date: 星期五, 11 四月 2025 13:28:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/components/HxlhTable/index.vue             |    1 
 src/views/basicData/ApsResourceGroup/index.vue |  517 ++++++++++++++++++
 src/views/partPlan/index.vue                   |  479 +++++++++++++++-
 src/views/aps/processRoute/index.vue           |  545 +++++++++++++++++++
 src/api/aps/processRoute.js                    |   59 ++
 src/api/partPlan/plan.js                       |   18 
 src/api/basicData/ApsResourceGroup.js          |   59 ++
 7 files changed, 1,628 insertions(+), 50 deletions(-)

diff --git a/src/api/aps/processRoute.js b/src/api/aps/processRoute.js
new file mode 100644
index 0000000..c20baac
--- /dev/null
+++ b/src/api/aps/processRoute.js
@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 鏌ヨ宸ヨ壓璺嚎鍒楄〃
+export function listProcessRoute(query) {
+  return request({
+    url: '/aps/processRoute/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ宸ヨ壓璺嚎璇︾粏
+export function getProcessRoute(id) {
+  return request({
+    url: '/aps/processRoute/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板宸ヨ壓璺嚎
+export function addProcessRoute(data) {
+  return request({
+    url: '/aps/processRoute',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼宸ヨ壓璺嚎
+export function updateProcessRoute(data) {
+  return request({
+    url: '/aps/processRoute',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎宸ヨ壓璺嚎
+export function delProcessRoute(id) {
+  return request({
+    url: '/aps/processRoute/' + id,
+    method: 'delete'
+  })
+}
+// 鏌ヨ涓存椂鍒楄〃
+export function processRouteTempList(query) {
+  return request({
+    url: '/aps/processRouteTemp/list',
+    method: 'get',
+    params: query
+  })
+}
+export function confirmProcessRoute(data) {
+  return request({
+    url: '/aps/processRoute/confirmProcessRoute',
+    method: 'post',
+    data: data
+  })
+}
diff --git a/src/api/basicData/ApsResourceGroup.js b/src/api/basicData/ApsResourceGroup.js
new file mode 100644
index 0000000..21e5260
--- /dev/null
+++ b/src/api/basicData/ApsResourceGroup.js
@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 鏌ヨ璧勬簮缁勫垪琛�
+export function listApsResourceGroup(query) {
+  return request({
+    url: '/aps/apsResourceGroup/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ璧勬簮缁勮缁�
+export function getApsResourceGroup(id) {
+  return request({
+    url: '/aps/apsResourceGroup/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板璧勬簮缁�
+export function addApsResourceGroup(data) {
+  return request({
+    url: '/aps/apsResourceGroup',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼璧勬簮缁�
+export function updateApsResourceGroup(data) {
+  return request({
+    url: '/aps/apsResourceGroup',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎璧勬簮缁�
+export function delApsResourceGroup(id) {
+  return request({
+    url: '/aps/apsResourceGroup/' + id,
+    method: 'delete'
+  })
+}
+// 鏌ヨ涓存椂鍒楄〃
+export function apsResourceGroupTempList(query) {
+  return request({
+    url: '/aps/apsResourceGroupTemp/list',
+    method: 'get',
+    params: query
+  })
+}
+export function confirmApsResourceGroup(data) {
+  return request({
+    url: '/aps/apsResourceGroup/confirmData',
+    method: 'post',
+    data: data
+  })
+}
\ No newline at end of file
diff --git a/src/api/partPlan/plan.js b/src/api/partPlan/plan.js
index 7aff9fc..426cc3b 100644
--- a/src/api/partPlan/plan.js
+++ b/src/api/partPlan/plan.js
@@ -42,3 +42,21 @@
     method: 'delete'
   })
 }
+
+// 鏌ヨ闆朵欢璁″垝绠$悊鍒楄〃
+export function examplePlan(query) {
+  return request({
+    url: '/aps/partPlanTemp/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ闆朵欢璁″垝绠$悊鍒楄〃
+export function confirmPart(data) {
+  return request({
+    url: '/aps/partPlan/confirmPart',
+    method: 'post',
+    data: data
+  })
+}
\ No newline at end of file
diff --git a/src/components/HxlhTable/index.vue b/src/components/HxlhTable/index.vue
index df8e1ef..54ee3f1 100644
--- a/src/components/HxlhTable/index.vue
+++ b/src/components/HxlhTable/index.vue
@@ -11,6 +11,7 @@
             highlight-hover-column
             highlight-hover-row
             resizable
+            size="small"
             :loading="loading"
             :pager-config="tablePage"
             :form-config="tableForm"
diff --git a/src/views/aps/processRoute/index.vue b/src/views/aps/processRoute/index.vue
new file mode 100644
index 0000000..a84a0aa
--- /dev/null
+++ b/src/views/aps/processRoute/index.vue
@@ -0,0 +1,545 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="闆嗘垚鏃ユ湡" style="width: 308px">
+        <el-date-picker
+          v-model="daterangeIntegrationDay"
+          value-format="YYYY-MM-DD HH:mm:ss"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="寮�濮嬫棩鏈�"
+          end-placeholder="缁撴潫鏃ユ湡"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="鏂欏彿" prop="itemNo">
+            <el-input
+              v-model="queryParams.itemNo"
+              placeholder="璇疯緭鍏ユ枡鍙�"
+              clearable
+              @keyup.enter="handleQuery"
+            />
+          </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          @click="handleAdd"
+          v-hasPermi="['aps:processRoute:add']"
+        >鏂板</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="Edit"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['aps:processRoute:edit']"
+        >淇敼</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="Delete"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['aps:processRoute:remove']"
+        >鍒犻櫎</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button 
+          type="info" 
+          plain 
+          icon="Upload" 
+          @click="handleImport" 
+          v-hasPermi="['partPlan:import']"
+          >瀵煎叆</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="Download"
+          @click="handleExport"
+          v-hasPermi="['aps:processRoute:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <HxlhTable
+        style="width: 100%"
+        :columns="columns"
+        :data="processRouteList"
+        :loading="loading"
+        :height="height"
+        @on-checkbox="handleCheckboxChange"
+    >
+    </HxlhTable>
+  <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
+  <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body>
+      <el-row :gutter="10">
+        <el-col>
+          <div style="border-bottom: 1px solid #ccc;" >
+            <p>涓婁紶Excel鏂囦欢锛屽寘鍚伐鑹鸿矾绾夸俊鎭�傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌闆朵欢璁″垝涓��</p>
+          </div>
+        </el-col>
+        <el-col >
+          <div></div>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="10" style="margin-top: 20px;">
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
+            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+            <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+            <template #tip>
+              <div class="el-upload__tip">
+                <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+              </div>
+            </template>
+          </el-upload>
+        </el-col>
+      </el-row>
+      <el-row style="margin-top: 20px;">
+        <el-col>
+          <div>
+            <el-button
+              type="success"
+              plain
+              icon="Check"
+              :disabled="planned"
+              @click="uploadParse"
+              v-hasPermi="['partPlan:edit']"
+            >涓婁紶骞惰В鏋�</el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col style="margin-top: 20px;">
+          <div v-show="isVisible">
+            <el-alert icon="Check" :show-icon="true" title="宸ヨ壓璺嚎鏁版嵁宸叉垚鍔熻В鏋�" type="success" :closable="false"/>
+          </div>
+          <div v-show="isError">
+            <el-alert icon="Close" :show-icon="true" title="宸ヨ壓璺嚎鏁版嵁宸茶В鏋愬け璐�" type="error" :closable="false"/>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row v-show="isVisible">
+        <el-col>
+          <div>
+            <h2>鏁版嵁棰勮</h2>
+          </div>
+          <HxlhTable
+            style="width: 100%"
+            :columns="exampleColumns"
+            :data="exampleList"
+            :loading="loading"
+            :maxHeight="exampleHeight"
+            @on-checkbox="handleCheckboxChange"
+          >
+          </HxlhTable>
+        </el-col>
+        <el-col>
+          <div style="text-align: right;">
+            <h4>鍏变笂浼�<span style="color: blue;">{{ total }}</span>鏉″伐鑹鸿矾绾挎暟鎹�</h4>
+          </div>
+        </el-col>
+      </el-row>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogCancel">鍙� 娑�</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="ProcessRoute">
+import { listProcessRoute, getProcessRoute, delProcessRoute, addProcessRoute, updateProcessRoute,processRouteTempList,confirmProcessRoute } from "@/api/aps/processRoute";
+import HxlhTable from '@/components/HxlhTable'
+import { getToken } from "@/utils/auth";
+import { ref } from "vue";
+import { ElMessage } from 'element-plus'
+const { proxy } = getCurrentInstance();
+
+const processRouteList = ref([]);
+const open = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const title = ref("");
+const daterangeIntegrationDay = ref([]);
+//寮圭獥鐩稿叧
+const height = ref(document.documentElement.clientHeight - 260 + "px;")
+const isVisible = ref(false);
+const isError = ref(false);
+const planned = ref(true);
+const batchNumber = ref(null);
+const exampleHeight = ref("500px");
+const uploadRef = ref();
+const exampleList = ref([]);
+/*** 鐢ㄦ埛瀵煎叆鍙傛暟 */
+const upload = reactive({
+  // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
+  open: false,
+  // 寮瑰嚭灞傛爣棰橈紙鐢ㄦ埛瀵煎叆锛�
+  title: "",
+  // 鏄惁绂佺敤涓婁紶
+  isUploading: false,
+  // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+  updateSupport: 0,
+  // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+  headers: { Authorization: "Bearer " + getToken() },
+  // 涓婁紶鐨勫湴鍧�
+  url: import.meta.env.VITE_APP_BASE_API + "/aps/processRoute/importData"
+});
+// 琛ㄦ牸閰嶇疆-鍒楄〃 
+const columns = ref([
+  { type: 'checkbox', width: 60, align:"center"},
+  { type: 'seq', title: '搴忓彿', width: 60 },
+  {
+    title: '鏂欏彿',
+    field: 'itemNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ崟鍙�',
+    field: 'workOrderNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭搴忓彿',
+    field: 'processNumber',
+    width: 100,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭鍚嶇О',
+    field: 'processName',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
+    field: 'processPlanStartDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+    field: 'processPlanEndDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '鏈紑宸ユ暟閲�',
+    field: 'notStartWorkCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸插畬鎴愭暟閲�',
+    field: 'completedCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '搴熷純鏁伴噺',
+    field: 'discardCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '闆嗘垚鏃ユ湡',
+    field: 'integrationDay',
+    width: 160,
+    align:"center",
+  }
+]);
+// 琛ㄦ牸閰嶇疆-寮圭獥
+const exampleColumns = ref([
+  { type: 'seq', title: '搴忓彿', width: 60 },
+  {
+    title: '鏂欏彿',
+    field: 'itemNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ崟鍙�',
+    field: 'workOrderNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭搴忓彿',
+    field: 'processNumber',
+    width: 100,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭鍚嶇О',
+    field: 'processName',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
+    field: 'processPlanStartDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+    field: 'processPlanEndDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '鏈紑宸ユ暟閲�',
+    field: 'notStartWorkCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸插畬鎴愭暟閲�',
+    field: 'completedCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '搴熷純鏁伴噺',
+    field: 'discardCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '闆嗘垚鏃ユ湡',
+    field: 'integrationDay',
+    width: 160,
+    align:"center",
+  }
+]);
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    itemNo: null,
+    integrationDay: null,
+  },
+  rules: {
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 鏌ヨ宸ヨ壓璺嚎鍒楄〃 */
+function getList() {
+  loading.value = true;
+  queryParams.value.params = {};
+  if (null != daterangeIntegrationDay && '' != daterangeIntegrationDay) {
+    queryParams.value.params["beginIntegrationDay"] = daterangeIntegrationDay.value[0];
+    queryParams.value.params["endIntegrationDay"] = daterangeIntegrationDay.value[1];
+  }
+  listProcessRoute(queryParams.value).then(response => {
+    processRouteList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+
+// 鍙栨秷鎸夐挳
+function cancel() {
+  open.value = false;
+  reset();
+}
+// 澶氶�夋閫変腑鏁版嵁
+const handleCheckboxChange = (data) => {
+  console.log(data);
+};
+// 琛ㄥ崟閲嶇疆
+function reset() {
+  form.value = {
+    id: null,
+    itemNo: null,
+    workOrderNo: null,
+    processNumber: null,
+    processName: null,
+    processPlanStartDay: null,
+    processPlanEndDay: null,
+    notStartWorkCount: null,
+    completedCount: null,
+    discardCount: null,
+    integrationDay: null,
+    plant: null,
+    delFlag: null,
+    createBy: null,
+    createTime: null,
+    updateBy: null,
+    updateTime: null
+  };
+  proxy.resetForm("processRouteRef");
+}
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+function handleQuery() {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+function resetQuery() {
+  daterangeIntegrationDay.value = [];
+  proxy.resetForm("queryRef");
+  handleQuery();
+}
+
+// 澶氶�夋閫変腑鏁版嵁
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+/** 鏂板鎸夐挳鎿嶄綔 */
+function handleAdd() {
+  reset();
+  open.value = true;
+  title.value = "娣诲姞宸ヨ壓璺嚎";
+}
+
+/** 淇敼鎸夐挳鎿嶄綔 */
+function handleUpdate(row) {
+  reset();
+  const _id = row.id || ids.value
+  getProcessRoute(_id).then(response => {
+    form.value = response.data;
+    open.value = true;
+    title.value = "淇敼宸ヨ壓璺嚎";
+  });
+}
+
+/** 鎻愪氦鎸夐挳 */
+function submitForm() {
+  proxy.$refs["processRouteRef"].validate(valid => {
+    if (valid) {
+      if (form.value.id != null) {
+        updateProcessRoute(form.value).then(response => {
+          proxy.$modal.msgSuccess("淇敼鎴愬姛");
+          open.value = false;
+          getList();
+        });
+      } else {
+        addProcessRoute(form.value).then(response => {
+          proxy.$modal.msgSuccess("鏂板鎴愬姛");
+          open.value = false;
+          getList();
+        });
+      }
+    }
+  });
+}
+
+/** 鍒犻櫎鎸夐挳鎿嶄綔 */
+function handleDelete(row) {
+  const _ids = row.id || ids.value;
+  proxy.$modal.confirm('鏄惁纭鍒犻櫎宸ヨ壓璺嚎缂栧彿涓�"' + _ids + '"鐨勬暟鎹」锛�').then(function() {
+    return delProcessRoute(_ids);
+  }).then(() => {
+    getList();
+    proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+  }).catch(() => {});
+}
+/** 瀵煎叆鎸夐挳鎿嶄綔 */
+function handleImport() {
+  upload.title = "宸ヨ壓璺嚎鏁版嵁涓婁紶";
+  upload.open = true;
+};
+/** 瀵煎嚭鎸夐挳鎿嶄綔 */
+function handleExport() {
+  proxy.download('aps/processRoute/export', {
+    ...queryParams.value
+  }, `processRoute_${new Date().getTime()}.xlsx`)
+}
+
+
+/**鏂囦欢涓婁紶涓鐞� */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+
+/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
+const handleFileSuccess = (response, file, fileList) => {
+  if(response.code == '200'){
+    batchNumber.value = response.data;
+    isVisible.value = true;
+    planned.value = false;
+    isError.value = false;
+    getExampleList();
+  }else{
+    isError.value = true;
+    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+  }
+  proxy.$refs["uploadRef"].handleRemove(file);
+  upload.isUploading = false;
+};
+/** 鏌ヨ涓存椂绠$悊鍒楄〃 */
+function getExampleList() {
+  loading.value = true;
+  queryParams.value = {};
+  queryParams.value.batchNumber = batchNumber.value;
+  processRouteTempList(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+/** 涓婁紶骞惰В鏋愭寜閽搷浣� */
+function uploadParse() {
+  queryParams.value.params = {};
+  queryParams.value.params["batchNumber"] = batchNumber.value;
+  confirmProcessRoute(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    loading.value = false;
+    isVisible.value = false;
+    isError.value = false;
+    planned.value = true;
+    upload.open = false;
+    ElMessage({
+      message: '宸ヨ壓璺嚎鏁版嵁宸叉垚鍔熶笂浼犲拰瑙f瀽',
+      type: 'success',
+    })
+    getList();
+  });
+}
+
+/** dialog鍙栨秷 */
+function dialogCancel(){
+  if (uploadRef.value) {
+    uploadRef.value.clearFiles();
+  }
+  isVisible.value = false;
+  isError.value = false;
+  planned.value = true;
+  upload.open = false;
+}
+getList();
+</script>
diff --git a/src/views/basicData/ApsResourceGroup/index.vue b/src/views/basicData/ApsResourceGroup/index.vue
new file mode 100644
index 0000000..6a7cd11
--- /dev/null
+++ b/src/views/basicData/ApsResourceGroup/index.vue
@@ -0,0 +1,517 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="璧勬簮缁�" prop="resourceGroupName">
+        <el-input
+          v-model="queryParams.resourceGroupName"
+          placeholder="璇疯緭鍏ヨ祫婧愮粍鍚嶇О"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鎴鏈哄姞闇�姹傛棩鏈�" style="width: 400px" label-width="150px">
+        <el-date-picker
+          v-model="daterangeRequestDate"
+          value-format="YYYY-MM-DD"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="寮�濮嬫棩鏈�"
+          end-placeholder="缁撴潫鏃ユ湡"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button 
+          type="info" 
+          plain 
+          icon="Upload" 
+          @click="handleImport" 
+          v-hasPermi="['partPlan:import']"
+          >瀵煎叆</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="Download"
+          @click="handleExport"
+          v-hasPermi="['ApsResourceGroup:ApsResourceGroup:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <HxlhTable
+        style="width: 100%"
+        :columns="columns"
+        :data="ApsResourceGroupList"
+        :loading="loading"
+        :height="height"
+        @on-checkbox="handleCheckboxChange"
+    >
+    </HxlhTable>
+  <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
+  <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body>
+      <el-row :gutter="10">
+        <el-col>
+          <div style="border-bottom: 1px solid #ccc;" >
+            <p>涓婁紶Excel鏂囦欢锛屽寘鍚祫婧愭睜淇℃伅銆傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌闆朵欢璁″垝涓��</p>
+          </div>
+        </el-col>
+        <el-col >
+          <div></div>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="10" style="margin-top: 20px;">
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
+            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+            <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+            <template #tip>
+              <div class="el-upload__tip">
+                <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+              </div>
+            </template>
+          </el-upload>
+        </el-col>
+      </el-row>
+      <el-row style="margin-top: 20px;">
+        <el-col>
+          <div>
+            <el-button
+              type="success"
+              plain
+              icon="Check"
+              :disabled="planned"
+              @click="uploadParse"
+              v-hasPermi="['partPlan:edit']"
+            >涓婁紶骞惰В鏋�</el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col style="margin-top: 20px;">
+          <div v-show="isVisible">
+            <el-alert icon="Check" :show-icon="true" title="璧勬簮姹犳暟鎹凡鎴愬姛瑙f瀽" type="success" :closable="false"/>
+          </div>
+          <div v-show="isError">
+            <el-alert icon="Close" :show-icon="true" title="璧勬簮姹犳暟鎹凡瑙f瀽澶辫触" type="error" :closable="false"/>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row v-show="isVisible">
+        <el-col>
+          <div>
+            <h2>鏁版嵁棰勮</h2>
+          </div>
+          <HxlhTable
+            style="width: 100%"
+            :columns="exampleColumns"
+            :data="exampleList"
+            :loading="loading"
+            :maxHeight="exampleHeight"
+            @on-checkbox="handleCheckboxChange"
+          >
+          </HxlhTable>
+        </el-col>
+        <el-col>
+          <div style="text-align: right;">
+            <h4>鍏变笂浼�<span style="color: blue;">{{ total }}</span>鏉¤祫婧愭睜鏁版嵁</h4>
+          </div>
+        </el-col>
+      </el-row>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="dialogCancel">鍙� 娑�</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="ApsResourceGroup">
+import { listApsResourceGroup, getApsResourceGroup, delApsResourceGroup, addApsResourceGroup, updateApsResourceGroup,apsResourceGroupTempList,confirmApsResourceGroup } from "@/api/basicData/ApsResourceGroup";
+import HxlhTable from '@/components/HxlhTable'
+import { getToken } from "@/utils/auth";
+import { ref } from "vue";
+import { ElMessage } from 'element-plus'
+const { proxy } = getCurrentInstance();
+
+const ApsResourceGroupList = ref([]);
+const open = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+const title = ref("");
+const daterangeRequestDate = ref([]);
+//寮圭獥鐩稿叧
+const height = ref(document.documentElement.clientHeight - 260 + "px;")
+const isVisible = ref(false);
+const isError = ref(false);
+const planned = ref(true);
+const batchNumber = ref(null);
+const exampleHeight = ref("500px");
+const uploadRef = ref();
+const exampleList = ref([]);
+/*** 鐢ㄦ埛瀵煎叆鍙傛暟 */
+const upload = reactive({
+  // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
+  open: false,
+  // 寮瑰嚭灞傛爣棰橈紙鐢ㄦ埛瀵煎叆锛�
+  title: "",
+  // 鏄惁绂佺敤涓婁紶
+  isUploading: false,
+  // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+  updateSupport: 0,
+  // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+  headers: { Authorization: "Bearer " + getToken() },
+  // 涓婁紶鐨勫湴鍧�
+  url: import.meta.env.VITE_APP_BASE_API + "/aps/apsResourceGroup/importData"
+});
+// 琛ㄦ牸閰嶇疆-鍒楄〃 
+const columns = ref([
+  { type: 'checkbox', width: 60, align:"center"},
+  { type: 'seq', title: '搴忓彿', width: 60 },
+  {
+    title: '鏂欏彿',
+    field: 'itemNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ崟鍙�',
+    field: 'workOrderNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭搴忓彿',
+    field: 'processNumber',
+    width: 100,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭鍚嶇О',
+    field: 'processName',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
+    field: 'processPlanStartDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+    field: 'processPlanEndDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '鏈紑宸ユ暟閲�',
+    field: 'notStartWorkCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸插畬鎴愭暟閲�',
+    field: 'completedCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '搴熷純鏁伴噺',
+    field: 'discardCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '闆嗘垚鏃ユ湡',
+    field: 'integrationDay',
+    width: 160,
+    align:"center",
+  }
+]);
+// 琛ㄦ牸閰嶇疆-寮圭獥
+const exampleColumns = ref([
+  { type: 'seq', title: '搴忓彿', width: 60 },
+  {
+    title: '鏂欏彿',
+    field: 'itemNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ崟鍙�',
+    field: 'workOrderNo',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭搴忓彿',
+    field: 'processNumber',
+    width: 100,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭鍚嶇О',
+    field: 'processName',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
+    field: 'processPlanStartDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
+    field: 'processPlanEndDay',
+    width: 200,
+    align:"center",
+  },
+  {
+    title: '鏈紑宸ユ暟閲�',
+    field: 'notStartWorkCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '宸插畬鎴愭暟閲�',
+    field: 'completedCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '搴熷純鏁伴噺',
+    field: 'discardCount',
+    width: 150,
+    align:"center",
+  },
+  {
+    title: '闆嗘垚鏃ユ湡',
+    field: 'integrationDay',
+    width: 160,
+    align:"center",
+  }
+]);
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    resourceGroupName: null,
+    devicesQuantity: null,
+    theoryHours: null,
+    restDays: null,
+    theoryCapacity: null,
+    requestDate: null,
+    plant: null
+  },
+  rules: {
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 鏌ヨ璧勬簮缁勫垪琛� */
+function getList() {
+  loading.value = true;
+  queryParams.value.params = {};
+  if (null != daterangeRequestDate && '' != daterangeRequestDate) {
+    queryParams.value.params["beginRequestDate"] = daterangeRequestDate.value[0];
+    queryParams.value.params["endRequestDate"] = daterangeRequestDate.value[1];
+  }
+  listApsResourceGroup(queryParams.value).then(response => {
+    ApsResourceGroupList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+
+// 鍙栨秷鎸夐挳
+function cancel() {
+  open.value = false;
+  reset();
+}
+
+// 琛ㄥ崟閲嶇疆
+function reset() {
+  form.value = {
+    id: null,
+    resourceGroupName: null,
+    devicesQuantity: null,
+    theoryHours: null,
+    restDays: null,
+    theoryCapacity: null,
+    requestDate: null,
+    delFlag: null,
+    createBy: null,
+    createTime: null,
+    updateBy: null,
+    updateTime: null,
+    plant: null
+  };
+  proxy.resetForm("ApsResourceGroupRef");
+}
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+function handleQuery() {
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+function resetQuery() {
+  daterangeRequestDate.value = [];
+  proxy.resetForm("queryRef");
+  handleQuery();
+}
+
+// 澶氶�夋閫変腑鏁版嵁
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+/** 鏂板鎸夐挳鎿嶄綔 */
+function handleAdd() {
+  reset();
+  open.value = true;
+  title.value = "娣诲姞璧勬簮缁�";
+}
+
+/** 淇敼鎸夐挳鎿嶄綔 */
+function handleUpdate(row) {
+  reset();
+  const _id = row.id || ids.value
+  getApsResourceGroup(_id).then(response => {
+    form.value = response.data;
+    open.value = true;
+    title.value = "淇敼璧勬簮缁�";
+  });
+}
+
+/** 鎻愪氦鎸夐挳 */
+function submitForm() {
+  proxy.$refs["ApsResourceGroupRef"].validate(valid => {
+    if (valid) {
+      if (form.value.id != null) {
+        updateApsResourceGroup(form.value).then(response => {
+          proxy.$modal.msgSuccess("淇敼鎴愬姛");
+          open.value = false;
+          getList();
+        });
+      } else {
+        addApsResourceGroup(form.value).then(response => {
+          proxy.$modal.msgSuccess("鏂板鎴愬姛");
+          open.value = false;
+          getList();
+        });
+      }
+    }
+  });
+}
+
+/** 鍒犻櫎鎸夐挳鎿嶄綔 */
+function handleDelete(row) {
+  const _ids = row.id || ids.value;
+  proxy.$modal.confirm('鏄惁纭鍒犻櫎璧勬簮缁勭紪鍙蜂负"' + _ids + '"鐨勬暟鎹」锛�').then(function() {
+    return delApsResourceGroup(_ids);
+  }).then(() => {
+    getList();
+    proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+  }).catch(() => {});
+}
+
+/** 瀵煎叆鎸夐挳鎿嶄綔 */
+function handleImport() {
+  upload.title = "璧勬簮姹犳暟鎹笂浼�";
+  upload.open = true;
+};
+/** 瀵煎嚭鎸夐挳鎿嶄綔 */
+function handleExport() {
+  proxy.download('aps/apsResourceGroup/export', {
+    ...queryParams.value
+  }, `apsResourceGroup_${new Date().getTime()}.xlsx`)
+}
+
+
+/**鏂囦欢涓婁紶涓鐞� */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+
+/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
+const handleFileSuccess = (response, file, fileList) => {
+  if(response.code == '200'){
+    batchNumber.value = response.data;
+    isVisible.value = true;
+    planned.value = false;
+    isError.value = false;
+    getExampleList();
+  }else{
+    isError.value = true;
+    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+  }
+  proxy.$refs["uploadRef"].handleRemove(file);
+  upload.isUploading = false;
+};
+/** 鏌ヨ涓存椂绠$悊鍒楄〃 */
+function getExampleList() {
+  loading.value = true;
+  queryParams.value = {};
+  queryParams.value.batchNumber = batchNumber.value;
+  apsResourceGroupTempList(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+/** 涓婁紶骞惰В鏋愭寜閽搷浣� */
+function uploadParse() {
+  queryParams.value.params = {};
+  queryParams.value.params["batchNumber"] = batchNumber.value;
+  confirmApsResourceGroup(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    loading.value = false;
+    isVisible.value = false;
+    isError.value = false;
+    planned.value = true;
+    upload.open = false;
+    ElMessage({
+      message: '璧勬簮姹犳暟鎹凡鎴愬姛涓婁紶鍜岃В鏋�',
+      type: 'success',
+    })
+    getList();
+  });
+}
+
+/** dialog鍙栨秷 */
+function dialogCancel(){
+  if (uploadRef.value) {
+    uploadRef.value.clearFiles();
+  }
+  isVisible.value = false;
+  isError.value = false;
+  planned.value = true;
+  upload.open = false;
+}
+
+getList();
+</script>
diff --git a/src/views/partPlan/index.vue b/src/views/partPlan/index.vue
index 2b62880..29b1e07 100644
--- a/src/views/partPlan/index.vue
+++ b/src/views/partPlan/index.vue
@@ -1,9 +1,10 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="20">
-      <el-col>
-        <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
-          <el-form-item label="璁″垝寮�宸ユ棩" style="width: 350px">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
+      <el-row :gutter="20">
+        <el-col
+          :span="6">
+          <el-form-item label="璁″垝寮�宸ユ棩" style="width: 100%;">
             <el-date-picker
               v-model="daterangePlanStartDay"
               value-format="YYYY-MM-DD"
@@ -13,7 +14,10 @@
               end-placeholder="缁撴潫鏃ユ湡"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item label="璁″垝瀹屽伐鏃�" style="width: 350px">
+        </el-col>
+        <el-col
+          :span="6">
+          <el-form-item label="璁″垝瀹屽伐鏃�" style="width: 100%;">
             <el-date-picker
               v-model="daterangePlanEndDay"
               value-format="YYYY-MM-DD"
@@ -23,7 +27,10 @@
               end-placeholder="缁撴潫鏃ユ湡"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item label="鍗曟嵁鍙�" prop="documentNumber">
+        </el-col>
+        <el-col
+          :span="6">
+          <el-form-item label="鍗曟嵁鍙�" prop="documentNumber" style="width: 100%;">
             <el-input
               v-model="queryParams.documentNumber"
               placeholder="璇疯緭鍏ュ崟鎹彿"
@@ -31,7 +38,10 @@
               @keyup.enter="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="瀹㈡埛鍚嶇О" prop="customer">
+        </el-col>
+        <el-col
+          :span="6">
+          <el-form-item label="瀹㈡埛鍚嶇О" prop="customer" style="width: 100%;">
             <el-input
               v-model="queryParams.customer"
               placeholder="璇疯緭鍏ュ鎴峰悕绉�"
@@ -39,13 +49,19 @@
               @keyup.enter="handleQuery"
             />
           </el-form-item>
-          <el-form-item>
-            <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button>
-            <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
-          </el-form-item>
-        </el-form>
-      </el-col>
-    </el-row>
+        </el-col>
+        <el-col
+          :span="24"
+          style="text-align: right;">
+            <el-form-item>
+              <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button>
+              <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
+            </el-form-item>
+        </el-col>
+        
+        
+      </el-row>
+    </el-form>
     
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
@@ -100,24 +116,117 @@
     </HxlhTable>
 
     <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
-    <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
-      <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
-        <el-icon class="el-icon--upload"><upload-filled /></el-icon>
-        <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
-        <template #tip>
-          <div class="el-upload__tip text-center">
-            <div class="el-upload__tip">
-              <el-checkbox v-model="upload.updateSupport" />鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
-            </div>
-            <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
-            <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">涓嬭浇妯℃澘</el-link>
+    <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body>
+      <el-row :gutter="10">
+        <el-col>
+          <div style="border-bottom: 1px solid #ccc;" >
+            <p>涓婁紶Excel鏂囦欢锛屽寘鍚浂浠跺伐鍗曚俊鎭�傜郴缁熷皢瑙f瀽鏁版嵁骞朵繚瀛樺埌鏈湴锛岀敤浜庡叧鑱斿埌闆朵欢璁″垝涓��</p>
           </div>
-        </template>
-      </el-upload>
+        </el-col>
+        <el-col >
+          <div></div>
+        </el-col>
+        <!-- <el-col>
+          <div>
+            <h2>Excel妯℃澘</h2>
+            <h4>璇蜂笅杞藉苟浣跨敤姝ゆā鏉垮~鍐欏伐鑹鸿矾绾挎暟鎹�</h4>
+          </div>
+        </el-col> -->
+      </el-row>
+
+      <el-row :gutter="10" style="margin-top: 20px;">
+        <!-- <el-col :span="1.5">
+          <el-button
+            type="primary"
+            plain
+            icon="Download"
+            @click="importTemplate"
+            v-hasPermi="['partPlan:add']"
+          >涓嬭浇Excel妯℃澘</el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button
+            type="success"
+            plain
+            icon="Edit"
+            @click="buildEexample"
+            v-hasPermi="['partPlan:edit']"
+          >鐢熸垚绀轰緥鏁版嵁</el-button>
+        </el-col> -->
+      </el-row>
+      <!-- <el-row>
+        <el-col>
+          <div>
+            <h2>鏂囦欢涓婁紶</h2>
+          </div>
+        </el-col>
+      </el-row> -->
+      <el-row>
+        <el-col>
+          <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="true" drag>
+            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+            <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+            <template #tip>
+              <div class="el-upload__tip">
+                <!-- <div class="el-upload__tip">
+                  <el-checkbox v-model="upload.updateSupport" />鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+                </div> -->
+                <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+                <!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">涓嬭浇妯℃澘</el-link> -->
+              </div>
+            </template>
+          </el-upload>
+        </el-col>
+      </el-row>
+      <el-row style="margin-top: 20px;">
+        <el-col>
+          <div>
+            <el-button
+              type="success"
+              plain
+              icon="Check"
+              :disabled="planned"
+              @click="uploadParse"
+              v-hasPermi="['partPlan:edit']"
+            >涓婁紶骞惰В鏋�</el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col style="margin-top: 20px;">
+          <div v-show="isVisible">
+            <el-alert icon="Check" :show-icon="true" title="闆朵欢宸ュ崟鏁版嵁宸叉垚鍔熻В鏋�" type="success" :closable="false"/>
+          </div>
+          <div v-show="isError">
+            <el-alert icon="Close" :show-icon="true" title="闆朵欢宸ュ崟鏁版嵁宸茶В鏋愬け璐�" type="error" :closable="false"/>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row v-show="isVisible">
+        <el-col>
+          <div>
+            <h2>鏁版嵁棰勮</h2>
+          </div>
+          <HxlhTable
+            style="width: 100%"
+            :columns="exampleColumns"
+            :data="exampleList"
+            :loading="loading"
+            :maxHeight="exampleHeight"
+            @on-checkbox="handleCheckboxChange"
+          >
+          </HxlhTable>
+        </el-col>
+        <el-col>
+          <div style="text-align: right;">
+            <h4>鍏变笂浼�<span style="color: blue;">{{ total }}</span>鏉¢浂浠跺伐鍗曟暟鎹�</h4>
+          </div>
+        </el-col>
+      </el-row>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
-          <el-button @click="upload.open = false">鍙� 娑�</el-button>
+          <!-- <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button> -->
+          <el-button @click="dialogCancel">鍙� 娑�</el-button>
         </div>
       </template>
     </el-dialog>
@@ -125,12 +234,15 @@
 </template>
 
 <script setup name="Plan">
-import { listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/partPlan/plan";
+import { listPlan, examplePlan, confirmPart, addPlan, updatePlan } from "@/api/partPlan/plan";
 import HxlhTable from '@/components/HxlhTable'
 import { getToken } from "@/utils/auth";
+import { ref } from "vue";
+import { ElMessage } from 'element-plus'
 
 const { proxy } = getCurrentInstance();
 
+const exampleList = ref([]);
 const planList = ref([]);
 const loading = ref(true);
 const showSearch = ref(true);
@@ -138,8 +250,13 @@
 const total = ref(0);
 const daterangePlanStartDay = ref([]);
 const daterangePlanEndDay = ref([]);
-const vxeTable = ref(null);
 const height = ref(document.documentElement.clientHeight - 260 + "px;")
+const isVisible = ref(false);
+const isError = ref(false);
+const planned = ref(true);
+const batchNumber = ref(null);
+const exampleHeight = ref("500px");
+const uploadRef = ref();
 
 /*** 鐢ㄦ埛瀵煎叆鍙傛暟 */
 const upload = reactive({
@@ -154,8 +271,193 @@
   // 璁剧疆涓婁紶鐨勮姹傚ご閮�
   headers: { Authorization: "Bearer " + getToken() },
   // 涓婁紶鐨勫湴鍧�
-  url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData"
+  url: import.meta.env.VITE_APP_BASE_API + "/aps/partPlan/importData"
 });
+
+// 琛ㄦ牸閰嶇疆 
+const exampleColumns = ref([
+  { type: 'seq', title: '搴忓彿', width: 60 },
+  {
+    title: '涓昏鍒掑憳',
+    field: 'masterPlanner',
+    width: 100,
+  },
+  {
+    title: '鍛ㄦ棩',
+    field: 'weekDay',
+    width: 100,
+    formatter: (({ cellValue, row, column }) => {
+      if (cellValue) {
+        const weekDay = new Date(cellValue);
+        const year = weekDay.getFullYear();
+        const month = String(weekDay.getMonth() + 1).padStart(2, '0');
+        const day = String(weekDay.getDate()).padStart(2, '0');
+        return `${month}-${day}`;
+      }
+      return '';
+    })
+  },
+  {
+    title: '鍛ㄥ害',
+    field: 'weekCycle',
+    width: 80,
+  },
+  {
+    title: '涓讳欢鏂欏彿',
+    field: 'mainPartNumber',
+    width: 150,
+  },
+  {
+    title: '涓讳欢鍥惧彿',
+    field: 'mainPartDrawingNumber',
+    width: 150,
+  },
+  {
+    title: '瀹㈡埛鍚嶇О',
+    field: 'customer',
+    width: 200,
+  },
+  {
+    title: '涓氬姟绫诲瀷',
+    field: 'businessType',
+    width: 150,
+  },
+  {
+    title: '鍗曟嵁鍙�',
+    field: 'documentNumber',
+    width: 150,
+  },
+  {
+    title: '闇�姹傚垎绫�',
+    field: 'requirementType',
+    width: 150,
+  },
+  {
+    title: '鍗曟嵁鐘舵��',
+    field: 'documentStatus',
+    width: 100,
+  },
+  {
+    title: '鏂欏彿',
+    field: 'itemNumber',
+    width: 150,
+  },
+  {
+    title: '鍥惧彿',
+    field: 'drawingNo',
+    width: 150,
+  },
+  {
+    title: '鐗堟湰鍙�',
+    field: 'versionNumber',
+    width: 100,
+  },
+  {
+    title: '鐢熶骇鏁伴噺',
+    field: 'productionQuantity',
+    width: 100,
+  },
+  {
+    title: '鑹搧鏁伴噺',
+    field: 'goodProductsQuantity',
+    width: 100,
+  },
+  {
+    title: '宸ュ簭鍙�',
+    field: 'processNumber',
+    width: 150,
+  },
+  {
+    title: '宸ヤ綔涓績',
+    field: 'workCenter',
+    width: 150,
+  },
+  {
+    title: '鎵�灞為儴闂�',
+    field: 'department',
+    width: 100,
+  },
+  {
+    title: '璁″垝寮�宸ユ棩',
+    field: 'planStartDay',
+    width: 100,
+  },
+  {
+    title: '璁″垝瀹屽伐鏃�',
+    field: 'planEndDay',
+    width: 100,
+  },
+  {
+    title: '澶囨枡鏂欏彿',
+    field: 'standbyNumber',
+    width: 100,
+  },
+  {
+    title: '澶囨枡鍚嶇О',
+    field: 'standbyName',
+    width: 200,
+  },
+  {
+    title: '澶囨枡搴撳瓨',
+    field: 'standbyStock',
+    width: 100,
+  },
+  {
+    title: '涓嬮亾宸ュ簭鎵�灞為儴闂�',
+    field: 'nextProcessDeparment',
+    width: 150,
+  },
+  {
+    title: '鏄惁鎸傝捣',
+    field: 'isSuspended',
+    width: 100,
+  },
+  {
+    title: '澶栧崗鏍囪瘑',
+    field: 'isOutsourcing',
+    width: 100,
+  },
+  {
+    title: '璐﹀',
+    field: 'account',
+    width: 100,
+  },
+  {
+    title: '涓婇樁鐗╂枡',
+    field: 'advancedMaterials',
+    width: 100,
+  },
+  {
+    title: '涓婇樁鍗曟嵁鍙�',
+    field: 'advancedDocumentNumber',
+    width: 100,
+  },
+  {
+    title: '涓婇樁闇�姹傛棩鏈�',
+    field: 'advancedRequirementDay',
+    width: 150,
+  },
+  {
+    title: '璁″垝榻愬',
+    field: 'isPlanComplete',
+    width: 100,
+  },
+  {
+    title: '搴撳瓨榻愬',
+    field: 'isStockComplete',
+    width: 100,
+  },
+  {
+    title: '鏄惁鏈夋姌杩斿伐搴�',
+    field: 'hasTurnback',
+    width: 150,
+  },
+  {
+    title: '椋庨櫓鏍囪瘑',
+    field: 'hasRisk',
+    width: 100,
+  },
+]);
 
 // 琛ㄦ牸閰嶇疆 
 const columns = ref([
@@ -204,17 +506,17 @@
   {
     title: '涓氬姟绫诲瀷',
     field: 'businessType',
-    width: 100,
+    width: 150,
   },
   {
     title: '鍗曟嵁鍙�',
     field: 'documentNumber',
-    width: 100,
+    width: 150,
   },
   {
     title: '闇�姹傚垎绫�',
     field: 'requirementType',
-    width: 100,
+    width: 150,
   },
   {
     title: '鍗曟嵁鐘舵��',
@@ -224,12 +526,12 @@
   {
     title: '鏂欏彿',
     field: 'itemNumber',
-    width: 100,
+    width: 150,
   },
   {
     title: '鍥惧彿',
     field: 'drawingNo',
-    width: 100,
+    width: 150,
   },
   {
     title: '鐗堟湰鍙�',
@@ -249,12 +551,12 @@
   {
     title: '宸ュ簭鍙�',
     field: 'processNumber',
-    width: 100,
+    width: 150,
   },
   {
     title: '宸ヤ綔涓績',
     field: 'workCenter',
-    width: 100,
+    width: 150,
   },
   {
     title: '鎵�灞為儴闂�',
@@ -279,7 +581,7 @@
   {
     title: '澶囨枡鍚嶇О',
     field: 'standbyName',
-    width: 100,
+    width: 200,
   },
   {
     title: '澶囨枡搴撳瓨',
@@ -289,7 +591,7 @@
   {
     title: '涓嬮亾宸ュ簭鎵�灞為儴闂�',
     field: 'nextProcessDeparment',
-    width: 100,
+    width: 150,
   },
   {
     title: '鏄惁鎸傝捣',
@@ -319,7 +621,7 @@
   {
     title: '涓婇樁闇�姹傛棩鏈�',
     field: 'advancedRequirementDay',
-    width: 100,
+    width: 150,
   },
   {
     title: '璁″垝榻愬',
@@ -334,7 +636,7 @@
   {
     title: '鏄惁鏈夋姌杩斿伐搴�',
     field: 'hasTurnback',
-    width: 100,
+    width: 150,
   },
   {
     title: '椋庨櫓鏍囪瘑',
@@ -345,14 +647,25 @@
 
 const data = reactive({
   queryParams: {
-    pageNum: 1,
-    pageSize: 10,
     documentNumber: null,
     customer: null,
+    batchNumber: null,
   }
 });
 
 const { queryParams } = toRefs(data);
+
+/** 鏌ヨ闆朵欢璁″垝涓存椂绠$悊鍒楄〃 */
+function getExampleList() {
+  loading.value = true;
+  queryParams.value = {};
+  queryParams.value.batchNumber = batchNumber.value;
+  examplePlan(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
 
 /** 鏌ヨ闆朵欢璁″垝绠$悊鍒楄〃 */
 function getList() {
@@ -368,7 +681,6 @@
   }
   listPlan(queryParams.value).then(response => {
     planList.value = response.rows;
-    total.value = response.total;
     loading.value = false;
   });
 }
@@ -393,18 +705,18 @@
 };
 
 /** 鎵归噺淇敼璁″垝寮�宸ユ棩鎸夐挳鎿嶄綔 */
-function plannedStart(row) {
+function plannedStart() {
   
 }
 
 /** 鎵归噺淇敼璁″垝瀹屽伐鏃ユ寜閽搷浣� */
-function plannedEnd(row) {
-  
+function plannedEnd() {
+
 }
 
 /** 瀵煎叆鎸夐挳鎿嶄綔 */
 function handleImport() {
-  upload.title = "瀵煎叆";
+  upload.title = "闆朵欢宸ュ崟鏁版嵁涓婁紶";
   upload.open = true;
 };
 
@@ -415,5 +727,72 @@
   }, `plan_${new Date().getTime()}.xlsx`)
 }
 
+/** 涓嬭浇妯℃澘鎿嶄綔 */
+function importTemplate() {
+  proxy.download("system/user/importTemplate", {
+  }, `user_template_${new Date().getTime()}.xlsx`);
+};
+
+/** buildEexample */
+function buildEexample() {
+  proxy.$refs["uploadRef"].submit();
+};
+
+/**鏂囦欢涓婁紶涓鐞� */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+
+/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
+const handleFileSuccess = (response, file, fileList) => {
+  if(response.code == '200'){
+    batchNumber.value = response.data;
+    isVisible.value = true;
+    planned.value = false;
+    isError.value = false;
+    getExampleList();
+  }else{
+    isError.value = true;
+    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+  }
+  proxy.$refs["uploadRef"].handleRemove(file);
+  upload.isUploading = false;
+};
+
+/** 涓婁紶骞惰В鏋愭寜閽搷浣� */
+function uploadParse() {
+  queryParams.value.params = {};
+  queryParams.value.params["batchNumber"] = batchNumber.value;
+  confirmPart(queryParams.value).then(response => {
+    exampleList.value = response.rows;
+    loading.value = false;
+    isVisible.value = false;
+    isError.value = false;
+    planned.value = true;
+    upload.open = false;
+    ElMessage({
+      message: '闆朵欢宸ュ崟鏁版嵁宸叉垚鍔熶笂浼犲拰瑙f瀽',
+      type: 'success',
+    })
+    getList();
+  });
+}
+
+/** dialog鍙栨秷 */
+function dialogCancel(){
+  if (uploadRef.value) {
+    uploadRef.value.clearFiles();
+  }
+  isVisible.value = false;
+  isError.value = false;
+  planned.value = true;
+  upload.open = false;
+}
+
 getList();
 </script>
+<style lang="css" scoped>
+h4 {
+  font-weight: bold;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3