From 8bffc8205125aa66253dd72dc509ba29f242a71b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 14 一月 2026 11:16:50 +0800
Subject: [PATCH] 进销存-升级 1.开票登记、来票登记改成绑定订单,不绑定开票

---
 src/views/basicData/product/index.vue |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index 6d31b8d..3f0921a 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -25,9 +25,7 @@
           :data="list"
           @node-click="handleNodeClick"
           :expand-on-click-node="false"
-          default-expand-all
           :default-expanded-keys="expandedKeys"
-          :draggable="true"
           :filter-node-method="filterNode"
           :props="{ children: 'children', label: 'label' }"
           highlight-current
@@ -40,7 +38,13 @@
         >
           <template #default="{ node, data }">
             <div class="custom-tree-node">
-              <span>{{ node.label }}</span>
+              <span class="tree-node-content">
+                <el-icon class="orange-icon">
+                  <component :is="data.children && data.children.length > 0
+                  ? node.expanded ? 'FolderOpened' : 'Folder' : 'Tickets'" />
+                </el-icon>
+                {{ data.label }}
+              </span>
               <div>
                 <el-button
                   type="primary"
@@ -49,7 +53,7 @@
                 >
                   缂栬緫
                 </el-button>
-                <el-button type="primary" link @click="openProDia('add', data)">
+                <el-button type="primary" link @click="openProDia('add', data)" :disabled="node.level >= 3">
                   娣诲姞浜у搧
                 </el-button>
                 <el-button
@@ -91,10 +95,9 @@
         @selection-change="handleSelectionChange"
         :tableLoading="tableLoading"
         @pagination="pagination"
-        :total="total"
       ></PIMTable>
     </div>
-    <el-dialog v-model="productDia" title="浜у搧" width="400px">
+    <el-dialog v-model="productDia" title="浜у搧" width="400px" @keydown.enter.prevent>
       <el-form
         :model="form"
         label-width="140px"
@@ -109,6 +112,7 @@
                 v-model="form.productName"
                 placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -126,6 +130,7 @@
       title="瑙勬牸鍨嬪彿"
       width="400px"
       @close="closeModelDia"
+      @keydown.enter.prevent
     >
       <el-form
         :model="modelForm"
@@ -141,6 +146,7 @@
                 v-model="modelForm.model"
                 placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -152,6 +158,7 @@
                 v-model="modelForm.unit"
                 placeholder="璇疯緭鍏ュ崟浣�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -221,11 +228,11 @@
 const tableData = ref([]);
 const tableLoading = ref(false);
 const isShowButton = ref(false);
-const total = ref(0);
 const selectedRows = ref([]);
 const page = reactive({
   current: 1,
   size: 10,
+  total: 0,
 });
 const data = reactive({
   form: {
@@ -310,6 +317,7 @@
   proxy.$refs.formRef.resetFields();
   productDia.value = false;
 };
+
 // 鍒犻櫎浜у搧
 const remove = (node, data) => {
   let ids = [];
@@ -382,7 +390,7 @@
   }).then((res) => {
     console.log("res", res);
     tableData.value = res.records;
-    total.value = res.total;
+    page.total = res.total;
     tableLoading.value = false;
   });
 };
@@ -477,4 +485,14 @@
   font-size: 14px;
   padding-right: 8px;
 }
+.tree-node-content {
+  display: flex;
+  align-items: center; /* 鍨傜洿灞呬腑 */
+  height: 100%;
+}
+.orange-icon {
+  color: orange;
+  font-size: 18px;
+  margin-right: 8px; /* 鍥炬爣涓庢枃瀛椾箣闂村姞鐐归棿璺� */
+}
 </style>

--
Gitblit v1.9.3