From 8b531e76e1f957d67069aa7ab0e8c5a9a747c06e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 26 一月 2026 09:10:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New

---
 src/views/basicData/product/ProductSelectDialog.vue                       |  113 +++--
 src/views/equipmentManagement/measurementEquipment/components/formDia.vue |    2 
 src/views/inventoryManagement/stockManagement/Qualified.vue               |    2 
 src/views/salesManagement/salesLedger/index.vue                           |  303 ++++++++-------
 src/api/inventoryManagement/stockInventory.js                             |   10 
 src/views/collaborativeApproval/sealManagement/index.vue                  |    2 
 src/views/productionManagement/productStructure/index.vue                 |  168 ++++++--
 src/views/inventoryManagement/dispatchLog/Record.vue                      |    2 
 src/views/productionManagement/productStructure/Detail/index.vue          |  467 ++++++++++++++++--------
 src/views/equipmentManagement/measurementEquipment/index.vue              |    8 
 src/api/productionManagement/productBom.js                                |   10 
 src/views/inventoryManagement/stockManagement/Unqualified.vue             |    2 
 src/views/inventoryManagement/receiptManagement/Record.vue                |    3 
 13 files changed, 678 insertions(+), 414 deletions(-)

diff --git a/src/api/inventoryManagement/stockInventory.js b/src/api/inventoryManagement/stockInventory.js
index 3454ce4..a50194a 100644
--- a/src/api/inventoryManagement/stockInventory.js
+++ b/src/api/inventoryManagement/stockInventory.js
@@ -25,3 +25,13 @@
         data: params,
     });
 };
+
+export const exportStockInventory = (params) => {
+    return request({
+        url: "/stockInventory/exportStockInventory",
+        method: "post",
+        data: params,
+    });
+};
+
+
diff --git a/src/api/productionManagement/productBom.js b/src/api/productionManagement/productBom.js
index 893755b..8132e9c 100644
--- a/src/api/productionManagement/productBom.js
+++ b/src/api/productionManagement/productBom.js
@@ -45,3 +45,13 @@
     params: { productModelId },
   });
 }
+
+// 瀵煎嚭BOM
+export function exportBom(bomId) {
+  return request({
+    url: "/productBom/exportBom",
+    method: "post",
+    params: { bomId },
+    responseType: "blob",
+  });
+}
diff --git a/src/views/basicData/product/ProductSelectDialog.vue b/src/views/basicData/product/ProductSelectDialog.vue
index 246cd88..70dbb16 100644
--- a/src/views/basicData/product/ProductSelectDialog.vue
+++ b/src/views/basicData/product/ProductSelectDialog.vue
@@ -1,28 +1,12 @@
 <template>
-  <el-dialog
-      v-model="visible"
-      title="閫夋嫨浜у搧"
-      width="900px"
-      destroy-on-close
-      :close-on-click-modal="false"
-  >
+  <el-dialog v-model="visible" title="閫夋嫨浜у搧" width="900px" destroy-on-close :close-on-click-modal="false">
     <el-form :inline="true" :model="query" class="mb-2">
       <el-form-item label="浜у搧澶х被">
-        <el-input
-            v-model="query.productName"
-            placeholder="杈撳叆浜у搧澶х被"
-            clearable
-            @keyup.enter="onSearch"
-        />
+        <el-input v-model="query.productName" placeholder="杈撳叆浜у搧澶х被" clearable @keyup.enter="onSearch" />
       </el-form-item>
 
       <el-form-item label="鍨嬪彿鍚嶇О">
-        <el-input
-            v-model="query.model"
-            placeholder="杈撳叆鍨嬪彿鍚嶇О"
-            clearable
-            @keyup.enter="onSearch"
-        />
+        <el-input v-model="query.model" placeholder="杈撳叆鍨嬪彿鍚嶇О" clearable @keyup.enter="onSearch" />
       </el-form-item>
 
       <el-form-item>
@@ -32,32 +16,19 @@
     </el-form>
 
     <!-- 鍒楄〃 -->
-    <el-table
-        v-loading="loading"
-        :data="tableData"
-        height="420"
-        highlight-current-row
-        row-key="id"
-        @selection-change="handleSelectionChange"
-    >
+    <el-table ref="tableRef" v-loading="loading" :data="tableData" height="420" highlight-current-row row-key="id"
+      @selection-change="handleSelectionChange" @select="handleSelect">
       <el-table-column type="selection" width="55" />
-      <el-table-column type="index" label="#" width="60"/>
-      <el-table-column prop="productName" label="浜у搧澶х被" min-width="160"/>
-      <el-table-column prop="model" label="鍨嬪彿鍚嶇О" min-width="200"/>
-      <el-table-column prop="unit" label="鍗曚綅" min-width="160"/>
+      <el-table-column type="index" label="搴忓彿" width="60" />
+      <el-table-column prop="productName" label="浜у搧澶х被" min-width="160" />
+      <el-table-column prop="model" label="鍨嬪彿鍚嶇О" min-width="200" />
+      <el-table-column prop="unit" label="鍗曚綅" min-width="160" />
     </el-table>
 
     <div class="mt-3 flex justify-end">
-      <el-pagination
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          v-model:page-size="page.pageSize"
-          v-model:current-page="page.pageNum"
-          :page-sizes="[10, 20, 50, 100]"
-          @size-change="onPageChange"
-          @current-change="onPageChange"
-      />
+      <el-pagination background layout="total, sizes, prev, pager, next, jumper" :total="total"
+        v-model:page-size="page.pageSize" v-model:current-page="page.pageNum" :page-sizes="[10, 20, 50, 100]"
+        @size-change="onPageChange" @current-change="onPageChange" />
     </div>
 
     <template #footer>
@@ -70,9 +41,9 @@
 </template>
 
 <script setup lang="ts">
-import {computed, onMounted, reactive, ref, watch} from "vue";
-import {ElMessage} from "element-plus";
-import {productModelList} from '@/api/basicData/productModel'
+import { computed, onMounted, reactive, ref, watch, nextTick } from "vue";
+import { ElMessage } from "element-plus";
+import { productModelList } from '@/api/basicData/productModel'
 
 export type ProductRow = {
   id: number;
@@ -83,6 +54,7 @@
 
 const props = defineProps<{
   modelValue: boolean;
+  single?: boolean; // 鏄惁鍙兘閫夋嫨涓�涓紝榛樿false锛堝彲閫夋嫨澶氫釜锛�
 }>();
 
 const emit = defineEmits(['update:modelValue', 'confirm']);
@@ -105,14 +77,48 @@
 const loading = ref(false);
 const tableData = ref<ProductRow[]>([]);
 const total = ref(0);
-const multipleSelection = ref<ProductRow[]>([])
+const multipleSelection = ref<ProductRow[]>([]);
+const tableRef = ref();
 
 function close() {
   visible.value = false;
 }
 
 const handleSelectionChange = (val: ProductRow[]) => {
-  multipleSelection.value = val
+  if (props.single && val.length > 1) {
+    // 濡傛灉闄愬埗涓哄崟涓�夋嫨锛屽彧淇濈暀鏈�鍚庝竴涓�変腑鐨�
+    const lastSelected = val[val.length - 1];
+    multipleSelection.value = [lastSelected];
+    // 娓呯┖琛ㄦ牸閫変腑鐘舵�侊紝鐒跺悗閲嶆柊閫変腑鏈�鍚庝竴涓�
+    nextTick(() => {
+      if (tableRef.value) {
+        tableRef.value.clearSelection();
+        tableRef.value.toggleRowSelection(lastSelected, true);
+      }
+    });
+  } else {
+    multipleSelection.value = val;
+  }
+}
+
+// 澶勭悊鍗曚釜閫夋嫨
+const handleSelect = (selection: ProductRow[], row: ProductRow) => {
+  if (props.single) {
+    // 濡傛灉闄愬埗涓哄崟涓紝娓呯┖鍏朵粬閫夋嫨锛屽彧淇濈暀褰撳墠琛�
+    if (selection.includes(row)) {
+      // 閫変腑褰撳墠琛屾椂锛屾竻绌哄叾浠栭�変腑
+      multipleSelection.value = [row];
+      nextTick(() => {
+        if (tableRef.value) {
+          tableData.value.forEach((item) => {
+            if (item.id !== row.id) {
+              tableRef.value.toggleRowSelection(item, false);
+            }
+          });
+        }
+      });
+    }
+  }
 }
 
 function onSearch() {
@@ -136,7 +142,11 @@
     ElMessage.warning("璇烽�夋嫨涓�鏉′骇鍝�");
     return;
   }
-  emit("confirm", multipleSelection.value);
+  if (props.single && multipleSelection.value.length > 1) {
+    ElMessage.warning("鍙兘閫夋嫨涓�涓骇鍝�");
+    return;
+  }
+  emit("confirm", props.single ? [multipleSelection.value[0]] : multipleSelection.value);
   close();
 }
 
@@ -144,7 +154,7 @@
   loading.value = true;
   try {
     multipleSelection.value = []; // 缈婚〉/鎼滅储鍚庢竻绌洪�夋嫨鏇寸鍚堥鏈�
-    const res = await productModelList({
+    const res: any = await productModelList({
       productName: query.productName.trim(),
       model: query.model.trim(),
       current: page.pageNum,
@@ -157,6 +167,13 @@
   }
 }
 
+// 鐩戝惉寮圭獥鎵撳紑锛岄噸缃�夋嫨
+watch(() => props.modelValue, (visible) => {
+  if (visible) {
+    multipleSelection.value = [];
+  }
+});
+
 onMounted(() => {
   loadData()
 })
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 9f70a55..04ecfc4 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -27,7 +27,7 @@
                   <el-option label="宸叉嫆缁�" value="rejected" />
                 </el-select>
               </el-col>
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-button type="primary" @click="searchSealApplications">鎼滅储</el-button>
                 <el-button @click="resetSealSearch">閲嶇疆</el-button>
                 <el-button @click="handleExport">瀵煎嚭</el-button>
diff --git a/src/views/equipmentManagement/measurementEquipment/components/formDia.vue b/src/views/equipmentManagement/measurementEquipment/components/formDia.vue
index b215df1..9ac5c44 100644
--- a/src/views/equipmentManagement/measurementEquipment/components/formDia.vue
+++ b/src/views/equipmentManagement/measurementEquipment/components/formDia.vue
@@ -27,7 +27,7 @@
 				</el-row>
 				<el-row :gutter="30">
 					<el-col :span="12">
-						<el-form-item label="瀹夎浣嶇疆锛�" prop="installationLocation">
+						<el-form-item label="瀹夎浣嶇疆锛�" prop="instationLocation">
 							<el-input
 								v-model="form.installationLocation"
 								placeholder="璇疯緭鍏�"
diff --git a/src/views/equipmentManagement/measurementEquipment/index.vue b/src/views/equipmentManagement/measurementEquipment/index.vue
index 129f23b..e357fa9 100644
--- a/src/views/equipmentManagement/measurementEquipment/index.vue
+++ b/src/views/equipmentManagement/measurementEquipment/index.vue
@@ -82,14 +82,8 @@
     align:"center"
 	},
 	{
-		label: "閮ㄩ棬",
-		prop: "deptName",
-		width: 130,
-    align:"center"
-	},
-	{
 		label: "瀹夎浣嶇疆",
-		prop: "installationLocation",
+		prop: "instationLocation",
 		width: 150,
     align:"center"
 	},
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 73792da..6fa29c8 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -214,7 +214,7 @@
 		type: "warning",
 	})
 		.then(() => {
-			proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
+			proxy.download("/stockOutRecord/exportStockOutRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍑哄簱鍙拌处.xlsx" : "涓嶅悎鏍煎嚭搴撳彴璐�.xlsx");
 		})
 		.catch(() => {
 			proxy.$modal.msg("宸插彇娑�");
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index a477547..e36c787 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -203,8 +203,7 @@
   })
       .then(() => {
         // 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
-        let exportUrl = "/stockin/export";
-        proxy.download(exportUrl, {}, "鍏ュ簱鍙拌处.xlsx");
+        proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index a701d0b..cfc9ed1 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -135,7 +135,7 @@
     type: 'warning',
   }
   ).then(() => {
-    proxy.download("/stockin/exportCopy", {}, '搴撳瓨淇℃伅.xlsx')
+    proxy.download("/stockInventory/exportStockInventory", {}, '鍚堟牸搴撳瓨淇℃伅.xlsx')
   }).catch(() => {
     proxy.$modal.msg("宸插彇娑�")
   })
diff --git a/src/views/inventoryManagement/stockManagement/Unqualified.vue b/src/views/inventoryManagement/stockManagement/Unqualified.vue
index afc6700..67d5f58 100644
--- a/src/views/inventoryManagement/stockManagement/Unqualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -135,7 +135,7 @@
     type: 'warning',
   }
   ).then(() => {
-    proxy.download("/stockin/exportCopy", {}, '搴撳瓨淇℃伅.xlsx')
+    proxy.download("/stockUninventory/exportStockUninventory", {}, '涓嶅悎鏍煎簱瀛樹俊鎭�.xlsx')
   }).catch(() => {
     proxy.$modal.msg("宸插彇娑�")
   })
diff --git a/src/views/productionManagement/productStructure/Detail/index.vue b/src/views/productionManagement/productStructure/Detail/index.vue
index 20a472b..360a124 100644
--- a/src/views/productionManagement/productStructure/Detail/index.vue
+++ b/src/views/productionManagement/productStructure/Detail/index.vue
@@ -2,133 +2,85 @@
   <div class="app-container">
     <PageHeader content="浜у搧缁撴瀯璇︽儏">
       <template #right-button>
-        <el-button v-if="dataValue.isEdit && !isOrderPage"
-                   type="primary"
-                   @click="addItem">娣诲姞
+        <el-button v-if="!dataValue.isEdit && !isOrderPage" type="primary" @click="dataValue.isEdit = true">缂栬緫
         </el-button>
-        <el-button v-if="!dataValue.isEdit && !isOrderPage"
-                   type="primary"
-                   @click="dataValue.isEdit = true">缂栬緫
+        <el-button v-if="dataValue.isEdit && !isOrderPage" type="primary" @click="cancelEdit">鍙栨秷
         </el-button>
-        <el-button v-if="dataValue.isEdit && !isOrderPage"
-                   type="primary"
-                   @click="cancelEdit">鍙栨秷
-        </el-button>
-        <el-button v-if="!isOrderPage"
-                   type="primary"
-                   :loading="dataValue.loading"
-                   @click="submit"
-                   :disabled="!dataValue.isEdit">纭
+        <el-button v-if="!isOrderPage" type="primary" :loading="dataValue.loading" @click="submit"
+          :disabled="!dataValue.isEdit">纭
         </el-button>
       </template>
     </PageHeader>
-    <el-table
-        :data="tableData"
-        border
-        :preserve-expanded-content="false"
-        :default-expand-all="true"
-        style="width: 100%"
-    >
+    <el-table :data="tableData" border :preserve-expanded-content="false" :default-expand-all="true"
+      style="width: 100%">
       <el-table-column type="expand">
         <template #default="props">
-          <el-form ref="form"
-                   :model="dataValue">
-            <el-table :data="dataValue.dataList"
-                      style="width: 100%">
-              <el-table-column prop="productName"
-                               label="浜у搧"/>
-              <el-table-column prop="model"
-                               label="瑙勬牸">
+          <el-form ref="form" :model="dataValue">
+            <el-table :data="dataValue.dataList" row-key="tempId" default-expand-all
+              :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" style="width: 100%">
+              <el-table-column prop="productName" label="浜у搧" />
+              <el-table-column prop="model" label="瑙勬牸">
                 <template #default="{ row, $index }">
                   <el-form-item v-if="dataValue.isEdit"
-                                :prop="`dataList.${$index}.model`"
-                                :rules="[{ required: true, message: '璇烽�夋嫨瑙勬牸', trigger: ['blur','change'] }]"
-                                style="margin: 0">
-                    <el-select v-model="row.model"
-                               placeholder="璇烽�夋嫨瑙勬牸"
-                               clearable
-                               :disabled="!dataValue.isEdit"
-                               style="width: 100%"
-                               @visible-change="(v) => { if (v) openDialog($index) }">
-                      <el-option v-if="row.model"
-                                 :label="row.model"
-                                 :value="row.model" />
+                    :rules="[{ required: true, message: '璇烽�夋嫨瑙勬牸', trigger: ['blur', 'change'] }]" style="margin: 0">
+                    <el-select v-model="row.model" placeholder="璇烽�夋嫨瑙勬牸" clearable
+                      :disabled="!dataValue.isEdit || dataValue.dataList.some(item => (item as any).tempId === row.tempId)"
+                      style="width: 100%" @visible-change="(v) => { if (v) openDialog(row.tempId) }">
+                      <el-option v-if="row.model" :label="row.model" :value="row.model" />
                     </el-select>
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="processId"
-                               label="娑堣�楀伐搴�">
+              <el-table-column prop="processName" label="娑堣�楀伐搴�">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="`dataList.${$index}.processId`"
-                                :rules="[{ required: true, message: '璇烽�夋嫨娑堣�楀伐搴�', trigger: 'change' }]"
-                                style="margin: 0">
-                    <el-select v-model="row.processId"
-                               placeholder="璇烽�夋嫨"
-                               filterable
-                               clearable
-                               style="width: 100%"
-                               :disabled="!dataValue.isEdit">
-                      <el-option v-for="item in dataValue.processOptions"
-                                 :key="item.id"
-                                 :label="item.name"
-                                 :value="item.id" />
+                  <el-form-item v-if="dataValue.isEdit"
+                    :rules="dataValue.dataList.some(item => (item as any).tempId === row.tempId) ? [] : [{ required: true, message: '璇烽�夋嫨娑堣�楀伐搴�', trigger: 'change' }]"
+                    style="margin: 0">
+                    <el-select v-model="row.processId" placeholder="璇烽�夋嫨" filterable clearable style="width: 100%"
+                      :disabled="!dataValue.isEdit || dataValue.dataList.some(item => (item as any).tempId === row.tempId)">
+                      <el-option v-for="item in dataValue.processOptions" :key="item.id" :label="item.name"
+                        :value="item.id" />
                     </el-select>
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="unitQuantity"
-                               label="鍗曚綅浜у嚭鎵�闇�鏁伴噺">
+              <el-table-column prop="unitQuantity" label="鍗曚綅浜у嚭鎵�闇�鏁伴噺">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="`dataList.${$index}.unitQuantity`"
-                                :rules="[{ required: true, message: '璇疯緭鍏ュ崟浣嶄骇鍑烘墍闇�鏁伴噺', trigger: ['blur','change'] }]"
-                                style="margin: 0">
-                    <el-input-number v-model="row.unitQuantity"
-                                     :min="0"
-                                     :precision="2"
-                                     :step="1"
-                                     controls-position="right"
-                                     style="width: 100%"
-                                     :disabled="!dataValue.isEdit" />
+                  <el-form-item v-if="dataValue.isEdit"
+                    :rules="[{ required: true, message: '璇疯緭鍏ュ崟浣嶄骇鍑烘墍闇�鏁伴噺', trigger: ['blur', 'change'] }]"
+                    style="margin: 0">
+                    <el-input-number v-model="row.unitQuantity" :min="0" :precision="2" :step="1"
+                      controls-position="right" style="width: 100%"
+                      :disabled="!dataValue.isEdit || dataValue.dataList.some(item => (item as any).tempId === row.tempId)" />
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column v-if="isOrderPage"
-                               prop="demandedQuantity"
-                               label="闇�姹傛�婚噺">
+              <el-table-column v-if="isOrderPage" prop="demandedQuantity" label="闇�姹傛�婚噺">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="`dataList.${$index}.demandedQuantity`"
-                                :rules="[{ required: true, message: '璇疯緭鍏ラ渶姹傛�婚噺', trigger: ['blur','change'] }]"
-                                style="margin: 0">
-                    <el-input-number v-model="row.demandedQuantity"
-                                     :min="0"
-                                     :precision="2"
-                                     :step="1"
-                                     controls-position="right"
-                                     style="width: 100%"
-                                     :disabled="!dataValue.isEdit" />
+                  <el-form-item v-if="dataValue.isEdit"
+                    :rules="[{ required: true, message: '璇疯緭鍏ラ渶姹傛�婚噺', trigger: ['blur', 'change'] }]" style="margin: 0">
+                    <el-input-number v-model="row.demandedQuantity" :min="0" :precision="2" :step="1"
+                      controls-position="right" style="width: 100%"
+                      :disabled="!dataValue.isEdit || dataValue.dataList.some(item => (item as any).tempId === row.tempId)" />
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="unit"
-                               label="鍗曚綅">
+              <el-table-column prop="unit" label="鍗曚綅">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="`dataList.${$index}.unit`"
-                                :rules="[{ required: true, message: '璇疯緭鍏ュ崟浣�', trigger: ['blur','change'] }]"
-                                style="margin: 0">
-                    <el-input v-model="row.unit"
-                              placeholder="璇疯緭鍏ュ崟浣�"
-                              clearable
-                              :disabled="!dataValue.isEdit" />
+                  <el-form-item v-if="dataValue.isEdit"
+                    :rules="[{ required: true, message: '璇疯緭鍏ュ崟浣�', trigger: ['blur', 'change'] }]" style="margin: 0">
+                    <el-input v-model="row.unit" placeholder="璇疯緭鍏ュ崟浣�" clearable
+                      :disabled="!dataValue.isEdit || dataValue.dataList.some(item => (item as any).tempId === row.tempId)" />
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column label="鎿嶄綔" fixed="right" width="100">
+              <el-table-column label="鎿嶄綔" fixed="right" width="200">
                 <template #default="{ row, $index }">
-                  <el-button v-if="dataValue.isEdit"
-                             type="danger"
-                             text
-                             @click="dataValue.dataList.splice($index, 1)">鍒犻櫎
+                  <el-button
+                    v-if="dataValue.isEdit && !dataValue.dataList.some(item => (item as any).tempId === row.tempId)"
+                    type="danger" text @click="removeItem(row.tempId)">鍒犻櫎
+                  </el-button>
+                  <el-button v-if="dataValue.isEdit" type="primary" text @click="addItem2(row.tempId)">娣诲姞
                   </el-button>
                 </template>
               </el-table-column>
@@ -140,10 +92,8 @@
       <el-table-column label="浜у搧鍚嶇О" prop="productName" />
       <el-table-column label="瑙勬牸鍨嬪彿" prop="model" />
     </el-table>
-
-    <product-select-dialog v-if="dataValue.showProductDialog"
-                           v-model:model-value="dataValue.showProductDialog"
-                           @confirm="handleProduct" />
+    <product-select-dialog v-if="dataValue.showProductDialog" v-model:model-value="dataValue.showProductDialog"
+      @confirm="handleProduct" />
   </div>
 </template>
 
@@ -160,36 +110,41 @@
 import { listProcessBom } from "@/api/productionManagement/productionOrder.js";
 import { list } from "@/api/productionManagement/productionProcess";
 import { ElMessage } from "element-plus";
-import {useRoute, useRouter} from "vue-router";
+import { useRoute, useRouter } from "vue-router";
 
 defineComponent({
   name: "StructureEdit",
 });
 
 const ProductSelectDialog = defineAsyncComponent(
-    () => import("@/views/basicData/product/ProductSelectDialog.vue")
+  () => import("@/views/basicData/product/ProductSelectDialog.vue")
 );
+const emit = defineEmits(["update:router"]);
 const form = ref();
 
-const route = useRoute()
-const router = useRouter()
+const route = useRoute();
+const router = useRouter();
 const routeId = computed({
   get() {
     return route.query.id;
   },
 
   set(val) {
-    emit('update:router', val)
-  }
+    emit("update:router", val);
+  },
 });
 
 // 浠庤矾鐢卞弬鏁拌幏鍙栦骇鍝佷俊鎭�
-const routeBomNo = computed(() => route.query.bomNo || '');
-const routeProductName = computed(() => route.query.productName || '');
-const routeProductModelName = computed(() => route.query.productModelName || '');
+const routeBomNo = computed(() => route.query.bomNo || "");
+const routeProductName = computed(() => route.query.productName || "");
+const routeProductModelName = computed(
+  () => route.query.productModelName || ""
+);
 const routeOrderId = computed(() => route.query.orderId);
 const pageType = computed(() => route.query.type);
-const isOrderPage = computed(() => pageType.value === 'order' && routeOrderId.value);
+const isOrderPage = computed(
+  () => pageType.value === "order" && routeOrderId.value
+);
 
 const dataValue = reactive({
   dataList: [],
@@ -197,6 +152,7 @@
   processOptions: [],
   showProductDialog: false,
   currentRowIndex: null,
+  currentRowName: null,
   loading: false,
   isEdit: false,
 });
@@ -206,11 +162,12 @@
     productName: "",
     model: "",
     bomNo: "",
-  }
-])
+  },
+]);
 
-const openDialog = index => {
-  dataValue.currentRowIndex = index;
+const openDialog = (tempId: any) => {
+  console.log(tempId, "tempId");
+  dataValue.currentRowName = tempId;
   dataValue.showProductDialog = true;
 };
 
@@ -218,83 +175,275 @@
   if (isOrderPage.value) {
     // 璁㈠崟鎯呭喌锛氫娇鐢ㄨ鍗曠殑浜у搧缁撴瀯鎺ュ彛
     const { data } = await listProcessBom({ orderId: routeOrderId.value });
-    dataValue.dataList = data || [];
+    dataValue.dataList = (data as any) || [];
   } else {
     // 闈炶鍗曟儏鍐碉細浣跨敤鍘熸潵鐨勬帴鍙�
     const { data } = await queryList(routeId.value);
-    dataValue.dataList = data || [];
+    dataValue.dataList = (data as any) || [];
+    // 涓烘墍鏈夐」鍙婂叾瀛愰」璁剧疆name灞炴��
+    const setNameRecursively = (items: any[]) => {
+      items.forEach((item: any) => {
+        item.tempId = item.id;
+        item.processName =
+          dataValue.processOptions.find(option => option.id === item.processId)
+            ?.name || "";
+        if (item.children && item.children.length > 0) {
+          setNameRecursively(item.children);
+        }
+      });
+    };
+    setNameRecursively(dataValue.dataList);
+    console.log(dataValue.dataList, "dataValue.dataList");
   }
 };
 
 const fetchProcessOptions = async () => {
-  const { data } = await list(routeId.value);
-  dataValue.processOptions = data;
+  const { data } = await list();
+  dataValue.processOptions = data as any;
 };
 
-const handleProduct = row => {
+const handleProduct = (row: any) => {
   if (row?.length > 1) {
     ElMessage.error("鍙兘閫夋嫨涓�涓骇鍝�");
   }
-  dataValue.dataList[dataValue.currentRowIndex].productName =
-      row[0].productName;
-  dataValue.dataList[dataValue.currentRowIndex].model = row[0].model;
-  dataValue.dataList[dataValue.currentRowIndex].productModelId = row[0].id;
-  dataValue.dataList[dataValue.currentRowIndex].unit = row[0].unit || "";
+  const productData = row[0];
+
+  //  鏈�澶栧眰缁勪欢涓紝涓庡綋鍓嶄骇鍝佺浉鍚岀殑浜у搧鍙兘鏈変竴涓�
+  const isTopLevel = dataValue.dataList.some(item => (item as any).tempId === dataValue.currentRowName);
+  if (isTopLevel) {
+    if (productData.productName === tableData[0].productName &&
+      productData.model === tableData[0].model) {
+      //  鏌ユ壘鏄惁宸茬粡鏈夊叾浠栭《灞傝宸茬粡鏄繖涓骇鍝�
+      const hasOther = dataValue.dataList.some(item =>
+        (item as any).tempId !== dataValue.currentRowName &&
+        (item as any).productName === tableData[0].productName &&
+        (item as any).model === tableData[0].model
+      );
+      if (hasOther) {
+        ElMessage.warning("鏈�澶栧眰鍜屽綋鍓嶄骇鍝佷竴鏍风殑涓�绾у彧鑳芥湁涓�涓�");
+        return;
+      }
+    }
+  }
+  // dataValue.dataList[dataValue.currentRowIndex].productName =
+  //   row[0].productName;
+  // dataValue.dataList[dataValue.currentRowIndex].model = row[0].model;
+  // dataValue.dataList[dataValue.currentRowIndex].productModelId = row[0].id;
+  // dataValue.dataList[dataValue.currentRowIndex].unit = row[0].unit || "";
+  dataValue.dataList.map(item => {
+    if (item.tempId === dataValue.currentRowName) {
+      item.productName = productData.productName;
+      item.model = productData.model;
+      item.productModelId = productData.id;
+      item.unit = productData.unit || "";
+      return;
+    }
+    childItem(item, dataValue.currentRowName, productData);
+  });
   dataValue.showProductDialog = false;
+};
+const childItem = (item: any, tempId: any, productData: any) => {
+  if (item.tempId === tempId) {
+    item.productName = productData.productName;
+    item.model = productData.model;
+    item.productModelId = productData.id;
+    item.unit = productData.unit || "";
+    return true;
+  }
+  if (item.children && item.children.length > 0) {
+    for (let child of item.children) {
+      if (childItem(child, tempId, productData)) {
+        return true;
+      }
+    }
+  }
+  return false;
+};
+
+// 閫掑綊鏍¢獙鎵�鏈夊眰绾х殑琛ㄥ崟鏁版嵁
+const validateAll = () => {
+  let isValid = true;
+
+  // 鏍¢獙鍑芥暟
+  const validateItem = (item: any, isTopLevel = false) => {
+    // 鏍¢獙褰撳墠椤圭殑蹇呭~瀛楁
+    if (!item.model) {
+      ElMessage.error("璇烽�夋嫨瑙勬牸");
+      isValid = false;
+      return;
+    }
+    if (!isTopLevel && !item.processId) {
+      ElMessage.error("璇烽�夋嫨娑堣�楀伐搴�");
+      isValid = false;
+      return;
+    }
+    if (!item.unitQuantity) {
+      ElMessage.error("璇疯緭鍏ュ崟浣嶄骇鍑烘墍闇�鏁伴噺");
+      isValid = false;
+      return;
+    }
+    if (isOrderPage.value && !item.demandedQuantity) {
+      ElMessage.error("璇疯緭鍏ラ渶姹傛�婚噺");
+      isValid = false;
+      return;
+    }
+    if (!item.unit) {
+      ElMessage.error("璇疯緭鍏ュ崟浣�");
+      isValid = false;
+      return;
+    }
+
+    // 閫掑綊鏍¢獙瀛愰」
+    if (item.children && item.children.length > 0) {
+      item.children.forEach(child => {
+        validateItem(child, false);
+      });
+    }
+  };
+
+  // 閬嶅巻鎵�鏈夐《灞傞」
+  dataValue.dataList.forEach(item => {
+    validateItem(item, true);
+  });
+
+  return isValid;
 };
 
 const submit = () => {
-  form.value
-      .validate(valid => {
-        dataValue.loading = true;
-        if (valid) {
-          add({
-            bomId: routeId.value,
-            productStructureList: dataValue.dataList || [],
-          }).then(res => {
-            router.push({
-              path: '/productionManagement/productionManagement/productStructure/index',
-            })
-            ElMessage.success("淇濆瓨鎴愬姛");
-            dataValue.loading = false;
-          });
-        }
+  dataValue.loading = true;
+
+  // 鍏堣繘琛岃〃鍗曟牎楠�
+  const valid = validateAll();
+  console.log(dataValue.dataList, "dataValue.dataList");
+  if (valid) {
+    add({
+      bomId: routeId.value,
+      children: dataValue.dataList || [],
+    })
+      .then(res => {
+        router.push({
+          path: "/productionManagement/productionManagement/productStructure/index",
+        });
+        ElMessage.success("淇濆瓨鎴愬姛");
+        dataValue.loading = false;
       })
-      .finally(() => {
+      .catch(() => {
         dataValue.loading = false;
       });
+  } else {
+    dataValue.loading = false;
+  }
 };
 
-const addItem = () => {
-  dataValue.dataList.push({
-    productName: "",
-    productId: "",
-    model: undefined,
-    productModelId: undefined,
-    processId: "",
-    unitQuantity: 0,
-    demandedQuantity: 0,
-    unit: "",
+const removeItem = (tempId: string) => {
+  // 鍏堝皾璇曚粠椤跺眰鍒犻櫎
+  const topIndex = dataValue.dataList.findIndex(item => item.tempId === tempId);
+  if (topIndex !== -1) {
+    dataValue.dataList.splice(topIndex, 1);
+    return;
+  }
+
+  // 閫掑綊鍒犻櫎瀛愰」
+  const delchildItem = (items: any[], tempId: any) => {
+    for (let i = 0; i < items.length; i++) {
+      const item = items[i];
+      if (item.tempId === tempId) {
+        items.splice(i, 1);
+        return true;
+      }
+      if (item.children && item.children.length > 0) {
+        if (delchildItem(item.children, tempId)) {
+          return true;
+        }
+      }
+    }
+    return false;
+  };
+
+  dataValue.dataList.forEach(item => {
+    if (item.children && item.children.length > 0) {
+      delchildItem(item.children, tempId);
+    }
   });
+};
+const addItem2 = tempId => {
+  dataValue.dataList.map(item => {
+    if (item.tempId === tempId) {
+      if (!item.children) {
+        item.children = [];
+      }
+      item.children.push({
+        parentId: item.id || "",
+        parentTempId: item.tempId || "",
+        productName: "",
+        productId: "",
+        model: undefined,
+        productModelId: undefined,
+        processId: "",
+        processName: "",
+        unitQuantity: 0,
+        demandedQuantity: 0,
+        unit: "",
+        children: [],
+
+        tempId: new Date().getTime(),
+      });
+      return;
+    }
+    addchildItem(item, tempId);
+  });
+};
+const addchildItem = (item: any, tempId: any) => {
+  if (item.tempId === tempId) {
+    console.log(item, "item");
+    if (!item.children) {
+      item.children = [];
+    }
+    item.children.push({
+      parentId: item.id || "",
+      parentTempId: item.tempId || "",
+      productName: "",
+      productId: "",
+      model: undefined,
+      productModelId: undefined,
+      processId: "",
+      unitQuantity: 0,
+      demandedQuantity: 0,
+      children: [],
+      unit: "",
+      tempId: new Date().getTime(),
+    });
+    return true;
+  }
+  if (item.children && item.children.length > 0) {
+    for (let child of item.children) {
+      if (addchildItem(child, tempId)) {
+        return true;
+      }
+    }
+  }
+  return false;
 };
 
 const cancelEdit = () => {
   dataValue.isEdit = false;
-  dataValue.dataList = dataValue.dataList.filter(item => item.id !== undefined);
+  // dataValue.dataList = dataValue.dataList.filter(item => item.id !== undefined);
+  fetchData();
 };
 
-onMounted(() => {
+onMounted(async () => {
   // 浠庤矾鐢卞弬鏁板洖鏄炬暟鎹�
-  tableData[0].productName = routeProductName.value;
-  tableData[0].model = routeProductModelName.value;
-  tableData[0].bomNo = routeBomNo.value;
-  
+  tableData[0].productName = routeProductName.value as string;
+  tableData[0].model = routeProductModelName.value as string;
+  tableData[0].bomNo = routeBomNo.value as string;
+
   // 璁㈠崟鎯呭喌涓嬬鐢ㄧ紪杈�
   if (isOrderPage.value) {
     dataValue.isEdit = false;
   }
-  
-  fetchData();
-  fetchProcessOptions();
+
+  // 鍏堝姞杞藉伐搴忛�夐」锛屽啀鍔犺浇鏁版嵁锛岀‘淇漞l-select鑳藉姝g‘鍥炴樉
+  await fetchProcessOptions();
+  await fetchData();
 });
 </script>
\ No newline at end of file
diff --git a/src/views/productionManagement/productStructure/index.vue b/src/views/productionManagement/productStructure/index.vue
index d8ce689..ce88565 100644
--- a/src/views/productionManagement/productStructure/index.vue
+++ b/src/views/productionManagement/productStructure/index.vue
@@ -1,42 +1,25 @@
 <template>
   <div class="app-container">
     <div style="text-align: right; margin-bottom: 10px;">
+      <el-button type="info" plain icon="Upload" @click="handleImport">瀵煎叆</el-button>
+      <el-button type="warning" plain icon="Download" @click="handleExport"
+        :disabled="selectedRows.length !== 1">瀵煎嚭</el-button>
       <el-button type="primary" @click="handleAdd">鏂板</el-button>
       <el-button type="danger" plain @click="handleBatchDelete" :disabled="selectedRows.length === 0">鍒犻櫎</el-button>
     </div>
-    <PIMTable
-        rowKey="id"
-        :column="tableColumn"
-        :tableData="tableData"
-        :page="page"
-        :isSelection="true"
-        @selection-change="handleSelectionChange"
-        :tableLoading="tableLoading"
-        @pagination="pagination"
-    >
-      <template #detail="{row}">
-        <el-button
-            type="primary"
-            text
-            @click="showDetail(row)">{{ row.bomNo }}
+    <PIMTable rowKey="id" :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true"
+      @selection-change="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination">
+      <template #detail="{ row }">
+        <el-button type="primary" text @click="showDetail(row)">{{ row.bomNo }}
         </el-button>
       </template>
     </PIMTable>
-    <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :record="currentRow"/>
-    
+    <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :record="currentRow" />
+
     <!-- 鏂板/缂栬緫寮圭獥 -->
-    <el-dialog
-        v-model="dialogVisible"
-        :title="operationType === 'add' ? '鏂板BOM' : '缂栬緫BOM'"
-        width="600px"
-        @close="closeDialog"
-    >
-      <el-form
-          ref="formRef"
-          :model="form"
-          :rules="rules"
-          label-width="120px"
-      >
+    <el-dialog v-model="dialogVisible" :title="operationType === 'add' ? '鏂板BOM' : '缂栬緫BOM'" width="600px"
+      @close="closeDialog">
+      <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="浜у搧鍚嶇О" prop="productModelId">
           <el-button type="primary" @click="showProductSelectDialog = true">
             {{ form.productName || '閫夋嫨浜у搧' }}
@@ -46,13 +29,7 @@
           <el-input v-model="form.version" placeholder="璇疯緭鍏ョ増鏈彿" clearable />
         </el-form-item>
         <el-form-item label="澶囨敞" prop="remark">
-          <el-input
-              v-model="form.remark"
-              type="textarea"
-              :rows="3"
-              placeholder="璇疯緭鍏ュ娉�"
-              clearable
-          />
+          <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="璇疯緭鍏ュ娉�" clearable />
         </el-form-item>
       </el-form>
       <template #footer>
@@ -60,19 +37,37 @@
         <el-button type="primary" @click="handleSubmit">纭畾</el-button>
       </template>
     </el-dialog>
-    
+
     <!-- 浜у搧閫夋嫨寮圭獥 -->
-    <ProductSelectDialog
-        v-model="showProductSelectDialog"
-        @confirm="handleProductSelect"
-        single
-    />
+    <ProductSelectDialog v-model="showProductSelectDialog" @confirm="handleProductSelect" single />
+
+    <!-- BOM瀵煎叆瀵硅瘽妗� -->
+    <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"
+        :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">
+            <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+          </div>
+        </template>
+      </el-upload>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
+          <el-button @click="upload.open = false">鍙� 娑�</el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
 <script setup>
 import { ref, reactive, toRefs, onMounted, getCurrentInstance, defineAsyncComponent } from "vue";
-import { listPage, add, update, batchDelete } from "@/api/productionManagement/productBom.js";
+import { getToken } from "@/utils/auth";
+import { listPage, add, update, batchDelete, exportBom } from "@/api/productionManagement/productBom.js";
 import { useRouter } from 'vue-router'
 import { ElMessageBox } from 'element-plus'
 import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
@@ -92,7 +87,7 @@
   {
     label: "浜у搧鍚嶇О",
     prop: "productName",
-    
+
     minWidth: 160
   },
   {
@@ -145,6 +140,20 @@
 const operationType = ref('add'); // add | edit
 const formRef = ref(null);
 const showProductSelectDialog = ref(false);
+
+//  BOM瀵煎叆鍙傛暟
+const upload = reactive({
+  // 鏄惁鏄剧ず寮瑰嚭灞傦紙BOM瀵煎叆锛�
+  open: false,
+  // 寮瑰嚭灞傛爣棰橈紙BOM瀵煎叆锛�
+  title: "",
+  // 鏄惁绂佺敤涓婁紶
+  isUploading: false,
+  // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+  headers: { Authorization: "Bearer " + getToken() },
+  // 涓婁紶鐨勫湴鍧�
+  url: import.meta.env.VITE_APP_BASE_API + "/productBom/uploadBom"
+});
 
 const page = reactive({
   current: 1,
@@ -246,7 +255,7 @@
           proxy.$modal.msgError('鍒犻櫎澶辫触');
         });
     })
-    .catch(() => {});
+    .catch(() => { });
 };
 
 // 鎵归噺鍒犻櫎
@@ -271,7 +280,7 @@
           proxy.$modal.msgError('鍒犻櫎澶辫触');
         });
     })
-    .catch(() => {});
+    .catch(() => { });
 };
 
 // 浜у搧閫夋嫨
@@ -321,6 +330,73 @@
   formRef.value?.resetFields();
 };
 
+//  瀵煎叆鎸夐挳鎿嶄綔
+const handleImport = () => {
+  upload.title = "BOM瀵煎叆";
+  upload.open = true;
+};
+
+//  鏂囦欢涓婁紶涓鐞�
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+
+//  鏂囦欢涓婁紶鎴愬姛澶勭悊
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  if (response.code === 200) {
+    proxy.$modal.msgSuccess(response.msg || "瀵煎叆鎴愬姛");
+    getList();
+  } else {
+    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "瀵煎叆缁撴灉", { dangerouslyUseHTMLString: true });
+  }
+};
+
+// 鎻愪氦涓婁紶鏂囦欢
+const submitFileForm = () => {
+  proxy.$refs["uploadRef"].submit();
+};
+
+//  瀵煎嚭鎸夐挳鎿嶄綔
+const handleExport = () => {
+  if (selectedRows.value.length !== 1) {
+    proxy.$modal.msgWarning("璇烽�夋嫨涓�鏉℃暟鎹繘琛屽鍑�");
+    return;
+  }
+
+  const bomId = selectedRows.value[0].id;
+  const fileName = `BOM_${selectedRows.value[0].bomNo || bomId}.xlsx`;
+
+  exportBom(bomId).then(res => {
+    // 杩斿洖鐨勬暟鎹槸鍚︿负绌�
+    if (!res) {
+      proxy.$modal.msgError("瀵煎嚭澶辫触锛岃繑鍥炴暟鎹负绌�");
+      return;
+    }
+
+    const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
+    const downloadElement = document.createElement('a');
+    const href = window.URL.createObjectURL(blob);
+
+    downloadElement.style.display = 'none';
+    downloadElement.href = href;
+    downloadElement.download = fileName;
+
+    document.body.appendChild(downloadElement);
+    downloadElement.click();
+
+    document.body.removeChild(downloadElement);
+    window.URL.revokeObjectURL(href);
+
+    proxy.$modal.msgSuccess("瀵煎嚭鎴愬姛");
+  }).catch(err => {
+    console.error("瀵煎嚭寮傚父锛�", err);
+    proxy.$modal.msgError("绯荤粺寮傚父锛屽鍑哄け璐�");
+  });
+};
+
 // 鏌ョ湅璇︽儏
 const showDetail = (row) => {
   router.push({
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index c813ed1..05c6a55 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -1,151 +1,160 @@
 <template>
-	<div class="app-container">
-		<div class="search_form">
-			<el-form :model="searchForm" :inline="true">
-				<el-form-item label="瀹㈡埛鍚嶇О锛�">
-					<el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
-										@change="handleQuery" />
-				</el-form-item>
-				<el-form-item label="閿�鍞悎鍚屽彿锛�">
-					<el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
-										@change="handleQuery" />
-				</el-form-item>
-				<el-form-item label="褰曞叆鏃ユ湡锛�">
-					<el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
-													placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
-				</el-form-item>
-				<el-form-item>
-					<el-button type="primary" @click="handleQuery"> 鎼滅储 </el-button>
-				</el-form-item>
-			</el-form>
-		</div>
-		<div class="table_list">
-			<div class="actions">
-				<div></div>
-				<div>
-					<el-button type="primary" @click="openForm('add')">
-						鏂板鍙拌处
-					</el-button>
-					<el-button @click="handleImport">瀵煎叆</el-button>
-					<el-button @click="handleOut">瀵煎嚭</el-button>
-					<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
-					<el-button type="primary" plain @click="handlePrint">鎵撳嵃</el-button>
-				</div>
-			</div>
-			<el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
-								:expand-row-keys="expandedRowKeys" :row-key="(row) => row.id" show-summary style="width: 100%"
-								:summary-method="summarizeMainTable" @expand-change="expandChange" height="calc(100vh - 21em)">
-				<el-table-column align="center" type="selection" width="55" />
-				<el-table-column type="expand">
-					<template #default="props">
-						<el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable">
-							<el-table-column align="center" label="搴忓彿" type="index" width="60" />
-							<el-table-column label="浜у搧澶х被" prop="productCategory" />
-							<el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" />
-							<el-table-column label="鍗曚綅" prop="unit" />
-							<el-table-column label="鏁伴噺" prop="quantity" />
-							<el-table-column label="绋庣巼(%)" prop="taxRate" />
-							<el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
-							<el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
-							<el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
-							<el-table-column label="浜у搧鐘舵��"
-															 width="100px"
-															 align="center">
-								<template #default="scope">
-									<el-tag v-if="scope.row.approveStatus === 1"
-													type="success">鍏呰冻</el-tag>
-									<el-tag v-else
-													type="danger">涓嶈冻</el-tag>
-								</template>
-							</el-table-column>
-							<el-table-column label="鍙戣揣鐘舵��" prop="shippingStatus" width="140" align="center" show-overflow-tooltip />
-							<el-table-column label="鍙戣揣鏃ユ湡"
-															 minWidth="100px"
-															 align="center">
-								<template #default="scope">
-									<div>
-										<div v-if="scope.row.shippingDate">{{ scope.row.shippingDate }}</div>
-										<el-tag v-else
-														type="info">-</el-tag>
-									</div>
-								</template>
-							</el-table-column>
-							<el-table-column Width="60px"
-															 label="鎿嶄綔"
-															 align="center">
-								<template #default="scope">
-									<el-button
-														 link
-														 type="primary"
-														 size="small"
-														 @click="openDeliveryForm(scope.row)">鍙戣揣</el-button>
-								</template>
-							</el-table-column>
-						</el-table>
-					</template>
-				</el-table-column>
-				<el-table-column align="center" label="搴忓彿" type="index" width="60" />
-				<el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" show-overflow-tooltip />
-				<el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip />
-				<el-table-column label="涓氬姟鍛�" prop="salesman" width="100" show-overflow-tooltip />
-				<el-table-column label="鍚堝悓閲戦(鍏�)" prop="contractAmount" width="220" show-overflow-tooltip
-												 :formatter="formattedNumber" />
-				<el-table-column label="褰曞叆浜�" prop="entryPersonName" width="100" show-overflow-tooltip />
-				<el-table-column label="绛捐鏃ユ湡" prop="executionDate" width="120" show-overflow-tooltip />
-				<el-table-column label="褰曞叆鏃ユ湡" prop="entryDate" width="120" show-overflow-tooltip />
-				<el-table-column fixed="right" label="鎿嶄綔" width="120" align="center">
-					<template #default="scope">
-						<el-button link type="primary" size="small" @click="openForm('edit', scope.row)">缂栬緫</el-button>
-						<el-button link type="primary" size="small" @click="downLoadFile(scope.row)">闄勪欢</el-button>
-					</template>
-				</el-table-column>
-			</el-table>
-			<pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
-									:page="page.current" :limit="page.size" @pagination="paginationChange" />
-		</div>
-		<FormDialog
-			v-model="dialogFormVisible"
-			:title="operationType === 'add' ? '鏂板閿�鍞彴璐﹂〉闈�' : '缂栬緫閿�鍞彴璐﹂〉闈�'"
-			:width="'70%'"
-			:operation-type="operationType"
-			@close="closeDia"
-			@confirm="submitForm"
-			@cancel="closeDia">
-			<el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
-				<el-row v-if="operationType !== 'view'">
-					<el-col :span="24" style="display:flex; justify-content:flex-end; gap:10px; margin-bottom: 6px;">
-						<el-button type="primary" plain @click="openQuotationDialog">浠庡鎵归�氳繃鐨勬姤浠峰崟瀵煎叆</el-button>
-					</el-col>
-				</el-row>
-				<el-row :gutter="30">
-					<el-col :span="12">
-						<el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
-							<el-input v-model="form.salesContractNo" placeholder="鑷姩鐢熸垚" clearable disabled />
-						</el-form-item>
-					</el-col>
-					<el-col :span="12">
-						<el-form-item label="涓氬姟鍛橈細" prop="salesman">
-							<el-select v-model="form.salesman"
-												 filterable
-												 :reserve-keyword="false" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'">
-								<el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
-													 :value="item.nickName" />
-							</el-select>
-						</el-form-item>
-					</el-col>
-				</el-row>
-				<el-row :gutter="30">
-					<el-col :span="12">
-						<el-form-item label="瀹㈡埛鍚嶇О锛�" prop="customerId">
-							<el-select v-model="form.customerId" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'" filterable>
-								<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
-									{{
-										item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
-									}}
-								</el-option>
-							</el-select>
-						</el-form-item>
-					</el-col>
+  <div class="app-container">
+    <div class="search_form">
+      <el-form :model="searchForm" :inline="true">
+        <el-form-item label="瀹㈡埛鍚嶇О锛�">
+          <el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="瀹㈡埛鍚堝悓鍙凤細">
+          <el-input v-model="searchForm.customerContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="閿�鍞悎鍚屽彿锛�">
+          <el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="椤圭洰鍚嶇О锛�">
+          <el-input v-model="searchForm.projectName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+            @change="handleQuery" />
+        </el-form-item>
+        <el-form-item label="褰曞叆鏃ユ湡锛�">
+          <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+            placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="handleQuery"> 鎼滅储 </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table_list">
+      <div class="actions">
+        <div></div>
+        <div>
+          <el-button type="primary" @click="openForm('add')">
+            鏂板鍙拌处
+          </el-button>
+          <el-button @click="handleOut">瀵煎嚭</el-button>
+          <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+          <el-button type="primary" plain @click="handlePrint">鎵撳嵃</el-button>
+        </div>
+      </div>
+      <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
+        :expand-row-keys="expandedRowKeys" :row-key="(row) => row.id" show-summary style="width: 100%"
+        :summary-method="summarizeMainTable" @expand-change="expandChange" height="calc(100vh - 18.5em)">
+        <el-table-column align="center" type="selection" width="55" />
+        <el-table-column type="expand">
+          <template #default="props">
+            <el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable">
+              <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+              <el-table-column label="浜у搧澶х被" prop="productCategory" />
+              <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" />
+              <el-table-column label="鍗曚綅" prop="unit" />
+              <el-table-column label="浜у搧鐘舵��" width="100px" align="center">
+                <template #default="scope">
+                  <el-tag v-if="scope.row.approveStatus === 0" type="info">鏈嚭搴�</el-tag>
+                  <el-tag v-if="scope.row.approveStatus === 1" type="success">宸插嚭搴�</el-tag>
+                  <el-tag v-if="scope.row.approveStatus === 2" type="warning">瀹℃牳涓�</el-tag>
+                  <el-tag v-if="scope.row.approveStatus === 3" type="success">瀹℃牳鎴愬姛</el-tag>
+                  <el-tag v-if="scope.row.approveStatus === 4" type="danger">瀹℃牳澶辫触</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column label="鍙戣揣杞︾墝" minWidth="100px" align="center">
+                <template #default="scope">
+                  <div>
+                    <el-tag type="success" v-if="scope.row.shippingCarNumber">{{ scope.row.shippingCarNumber }}</el-tag>
+                    <el-tag v-else type="info">鏈彂璐�</el-tag>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="鍙戣揣鏃ユ湡" minWidth="100px" align="center">
+                <template #default="scope">
+                  <div>
+                    <div v-if="scope.row.shippingDate">{{ scope.row.shippingDate }}</div>
+                    <el-tag v-else type="info">鏈彂璐�</el-tag>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="鏁伴噺" prop="quantity" />
+              <el-table-column label="绋庣巼(%)" prop="taxRate" />
+              <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
+              <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
+              <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
+            <!--鎿嶄綔-->
+              <el-table-column Width="60px" label="鎿嶄綔" align="center">
+                <template #default="scope">
+                  <el-button :disabled="scope.row.approveStatus!==2 || scope.row.approveStatus!==5" link type="primary" size="small" @click="openDeliveryForm(scope.row)">鍙戣揣</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+        <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="180" show-overflow-tooltip />
+        <el-table-column label="瀹㈡埛鍚堝悓鍙�" prop="customerContractNo" width="180" show-overflow-tooltip />
+        <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" width="300" show-overflow-tooltip />
+        <el-table-column label="涓氬姟鍛�" prop="salesman" width="100" show-overflow-tooltip />
+        <el-table-column label="椤圭洰鍚嶇О" prop="projectName" width="180" show-overflow-tooltip />
+        <el-table-column label="浠樻鏂瑰紡" prop="paymentMethod" show-overflow-tooltip />
+        <el-table-column label="鍚堝悓閲戦(鍏�)" prop="contractAmount" width="220" show-overflow-tooltip
+          :formatter="formattedNumber" />
+        <el-table-column label="褰曞叆浜�" prop="entryPersonName" width="100" show-overflow-tooltip />
+        <el-table-column label="褰曞叆鏃ユ湡" prop="entryDate" width="120" show-overflow-tooltip />
+        <el-table-column label="绛捐鏃ユ湡" prop="executionDate" width="120" show-overflow-tooltip />
+        <el-table-column fixed="right" label="鎿嶄綔" min-width="100" align="center">
+          <template #default="scope">
+            <el-button link type="primary" size="small" @click="openForm('edit', scope.row)">缂栬緫</el-button>
+<!--            <el-button link type="primary" size="small" @click="openForm('view', scope.row)">璇︽儏</el-button>-->
+            <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">闄勪欢</el-button>
+<!--            <el-button link type="primary" size="small" @click="openDeliveryForm(scope.row)">鍙戣揣</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper"
+        :page="page.current" :limit="page.size" @pagination="paginationChange" />
+    </div>
+    <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板閿�鍞彴璐﹂〉闈�' : '缂栬緫閿�鍞彴璐﹂〉闈�'" width="70%"
+      @close="closeDia">
+      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
+              <el-input v-model="form.salesContractNo" placeholder="鑷姩鐢熸垚" clearable disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="涓氬姟鍛橈細" prop="salesman">
+              <el-select v-model="form.salesman" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'">
+                <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
+                  :value="item.nickName" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="瀹㈡埛鍚堝悓鍙凤細" prop="customerContractNo">
+              <el-input v-model="form.customerContractNo" placeholder="璇疯緭鍏�" clearable :disabled="operationType === 'view'"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="瀹㈡埛鍚嶇О锛�" prop="customerId">
+              <el-select v-model="form.customerId" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'">
+                <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
+                  {{
+                    item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
+                  }}
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="30">
+          <el-col :span="12">
+            <el-form-item label="椤圭洰鍚嶇О锛�" prop="projectName">
+              <el-input v-model="form.projectName" placeholder="璇疯緭鍏�" clearable :disabled="operationType === 'view'" />
+            </el-form-item>
+          </el-col>
 					<el-col :span="12">
 						<el-form-item label="绛捐鏃ユ湡锛�" prop="executionDate">
 							<el-date-picker style="width: 100%" v-model="form.executionDate" value-format="YYYY-MM-DD"

--
Gitblit v1.9.3