Explorar el Código

Merge remote-tracking branch 'origin/master_fhhx_20250718' into master_fhhx_20250718

zyy hace 1 mes
padre
commit
acd4a55303

+ 17 - 16
src/views/company/components/companyProfit.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="order-content">
       <div class="order-status" v-if="profit!=null" >
-          <el-steps  :active="profit.profitStatus==4?profit.profitStatus:profit.profitStatus-1" align-center>
+          <el-steps  :active="getStepActive(profit.profitStatus)" align-center>
             <el-step title="待商务审核"></el-step>
             <el-step title="待财务审核"></el-step>
-            <el-step title="待支付"></el-step>
             <el-step title="已完成"></el-step>
           </el-steps>
       </div>
@@ -23,9 +22,6 @@
         <div class="operate-button-container" >
           <el-button size="mini" @click="handleAudit(2)" v-if="profit.profitStatus==2"  v-hasPermi="['company:companyProfit:audit2']" >财务审核</el-button>
         </div>
-        <div class="operate-button-container" >
-          <el-button size="mini" @click="handleAudit(3)" v-if="profit.profitStatus==3"  v-hasPermi="['company:companyProfit:audit3']" >付款</el-button>
-        </div>
 
       </div>
       <div style="margin-top: 20px"  v-if="profit!=null">
@@ -110,7 +106,7 @@
              <el-radio  :label="0">驳回</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="凭证" prop="profitStatus" v-if="profit.profitStatus==3">
+        <el-form-item label="凭证" prop="imgUrl" v-if="type==2 && form.status==1">
             <el-upload
               v-model="form.imgUrl"
               class="avatar-uploader"
@@ -135,7 +131,7 @@
 </template>
 
 <script>
-import { audit1,audit2,audit3, getCompanyProfit, delCompanyProfit, addCompanyProfit, updateCompanyProfit, exportCompanyProfit } from "@/api/company/companyProfit";
+import { audit1,audit2, getCompanyProfit, delCompanyProfit, addCompanyProfit, updateCompanyProfit, exportCompanyProfit } from "@/api/company/companyProfit";
 
 export default {
   name: "profit",
@@ -167,6 +163,18 @@ export default {
     });
   },
   methods: {
+    // 获取步骤条激活索引
+    getStepActive(profitStatus) {
+      // 状态映射:1=待商务审核(步骤0), 2=待财务审核(步骤1), 4=已完成(步骤2)
+      if (profitStatus == 1) {
+        return 0; // 待商务审核
+      } else if (profitStatus == 2) {
+        return 1; // 待财务审核
+      } else if (profitStatus == 4) {
+        return 3; // 已完成
+      }
+      return 0; // 默认返回第一个步骤
+    },
     handleSuccess(res, file) {
         if(res.code==200){
           this.form.imgUrl=res.url;
@@ -187,6 +195,8 @@ export default {
       this.type=auditType;
       this.open = true;
       this.form.remark = null;
+      this.form.imgUrl = null;
+      this.form.status = 1;
       this.title = "审核提现";
     },
     /** 提交按钮 */
@@ -214,15 +224,6 @@ export default {
               }
             });
           }
-          if(this.type==3){
-            audit3(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("审核成功");
-                this.open = false;
-                this.getData(this.companyName,this.profitId);
-              }
-            });
-          }
 
         }
       });

+ 43 - 7
src/views/live/liveAfteraSales/index.vue

@@ -144,6 +144,7 @@
           v-model="dateRange"
           type="daterange"
           value-format="yyyy-MM-dd"
+          @change="handlePayTimeChange"
           start-placeholder="开始日期"
           end-placeholder="结束日期">
         </el-date-picker>
@@ -291,7 +292,8 @@ export default {
         deliverySn: null,
         deliveryName: null,
         status: null,
-        Status: null,
+        salesStatus: null,            // 售后状态
+        orderStatus: null,            // 订单状态
         isDel: null,
         userId: null,
         consignee: null,
@@ -303,7 +305,7 @@ export default {
         companyUserNickName: null,    // 新增员工姓名
         deliveryStatus: null,         // 物流状态,确认是否接口支持
         createTimeBegin: null,        // 创建时间起
-        createTimeEnd: null,          // 创
+        createTimeEnd: null,          // 创建时间止
         userPhone: null
       },
       // 表单参数
@@ -339,13 +341,24 @@ export default {
     this.getDicts("store_order_delivery_status").then((response) => {
       this.deliveryStatusOptions = response.data;
     });
-    this.getDicts("store_order_status").then((response) => {
+    this.getDicts("sys_live_order_status").then((response) => {
       this.orderStatusOptions = response.data;
     });
 
     this.getList();
   },
   methods: {
+    // 支付时间范围选择变化处理
+    handlePayTimeChange(value) {
+      if (value && value.length === 2) {
+        // 提取日期部分(yyyy-MM-dd),mapper会在SQL中拼接时间部分
+        this.queryParams.beginTime = value[0].substring(0, 10);
+        this.queryParams.endTime = value[1].substring(0, 10);
+      } else {
+        this.queryParams.beginTime = null;
+        this.queryParams.endTime = null;
+      }
+    },
     handleShow(row){
       this.title="售后订单"
       this.open=true;
@@ -356,11 +369,12 @@ export default {
     /** 查询售后记录列表 */
     getList() {
       this.loading = true;
+      // 处理日期范围
+      // const params = this.addDateRange(this.queryParams, this.dateRange);
       listLiveAfterSales(this.queryParams).then(response => {
         this.liveAfterSalesList = response.rows;
         this.total = response.total;
         this.loading = false;
-        delete this.queryParams[this.searchType];
       });
     },
     // 取消按钮
@@ -407,16 +421,33 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      // 处理物流单号搜索
       if(this.searchKey!=='' && this.searchType=='deliverySn'){
-       this.queryParams[this.searchType]=this.searchKey
+        this.queryParams.deliverySn = this.searchKey;
+      } else if(this.searchType=='deliverySn') {
+        this.queryParams.deliverySn = null;
+      }
+      // 处理物流状态搜索
+      if(this.searchType=='deliveryStatus' && this.queryParams.deliveryStatus) {
+        // deliveryStatus已经在queryParams中,不需要额外处理
       }
       this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.searchKey= '';
-      this.queryParams[this.searchType]=null;
+      this.searchKey = '';
+      this.searchType = '';
+      this.dateRange = [];
+      // 重置搜索相关的参数
+      if(this.queryParams.deliverySn) {
+        this.queryParams.deliverySn = null;
+      }
+      if(this.queryParams.deliveryStatus) {
+        this.queryParams.deliveryStatus = null;
+      }
+      this.queryParams.beginTime = null;
+      this.queryParams.endTime = null;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -478,7 +509,12 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+      // 处理日期范围和搜索条件
       const queryParams = this.queryParams;
+      // 确保导出时包含所有搜索条件
+      if(this.searchKey!=='' && this.searchType=='deliverySn'){
+        queryParams.deliverySn = this.searchKey;
+      }
       this.$confirm('是否确认导出所有售后记录数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",

+ 20 - 27
src/views/live/liveConsole/index.vue

@@ -1063,41 +1063,34 @@ export default {
       })
     },
     loadMsgList() {
-      // 直播间消息
+      // 直播间消息 - 只加载最近的30条
       listLiveMsg({
         liveId:this.liveId,
-        pageNum: this.msgParams.pageNum,
-        pageSize: this.msgParams.pageSize
+        pageNum: 1,
+        pageSize: 30
       }).then(response => {
-          let {code, rows,total} = response;
+          let {code, rows} = response;
           if (code === 200) {
-            let totalPage = (total % this.msgParams.pageSize == 0) ? Math.floor(total / this.msgParams.pageSize) : Math.floor(total / this.msgParams.pageSize + 1);
-            rows.forEach(row => {
-              if (!this.msgList.some(m => m.msgId === row.msgId)) {
-
-                let user = this.userList.find(u => u.userId === row.userId)
-                if (user) {
-                  row.msgStatus = user.msgStatus
-                } else {
-                  row.msgStatus = 0
-                }
-
-                this.msgList.push(row)
+            // 清空现有消息列表,只保留最新的30条
+            this.msgList = [];
 
-                // 移动到底部
-                this.$nextTick(() => {
-                  setTimeout(() => {
-                    this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-                  }, 200)
-                })
+            rows.forEach(row => {
+              let user = this.userList.find(u => u.userId === row.userId)
+              if (user) {
+                row.msgStatus = user.msgStatus
+              } else {
+                row.msgStatus = 0
               }
+
+              this.msgList.push(row)
             })
 
-            // 没加载完继续加载
-            if (this.msgParams.pageNum < totalPage) {
-              this.msgParams.pageNum = parseInt(this.msgParams.pageNum) + 1;
-              this.loadMsgList()
-            }
+            // 移动到底部
+            this.$nextTick(() => {
+              setTimeout(() => {
+                this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
+              }, 200)
+            })
 
             // 同步更新消息列表中相同用户的状态
             this.userList.forEach(u => {

+ 19 - 41
src/views/live/liveOrder/index.vue

@@ -168,28 +168,15 @@
     <el-form-item label="支付时间">
       <el-date-picker
         v-model="payTimeRange"
-        type="datetimerange"
+        type="daterange"
         size="small"
         clearable
-        value-format="yyyy-MM-dd HH:mm:ss"
+        value-format="yyyy-MM-dd"
         range-separator="至"
         start-placeholder="开始时间"
         end-placeholder="结束时间"
         @change="handlePayTimeChange"
       />
-    </el-form-item>
-    <el-form-item label="完成时间">
-      <el-date-picker
-        v-model="finishTimeRange"
-        type="datetimerange"
-        size="small"
-        clearable
-        value-format="yyyy-MM-dd HH:mm:ss"
-        range-separator="至"
-        start-placeholder="开始时间"
-        end-placeholder="结束时间"
-        @change="handleFinishTimeChange"
-      />
     </el-form-item>
       </div>
     </el-form>
@@ -321,8 +308,6 @@ export default {
 
       // 支付时间范围选择器绑定的值
       payTimeRange: [],
-      // 完成时间范围选择器绑定的值
-      finishTimeRange: [],
       // 发货时间范围选择器绑定的值
       deliverySendTimeRange: [],
 
@@ -346,8 +331,6 @@ export default {
         // 移除单个时间字段,改为范围字段
         payStartTime: null,
         payEndTime: null,
-        finishTimeStart: null,
-        finishTimeEnd: null,
         status: null,
         companyUserName: null,
       },
@@ -370,7 +353,8 @@ export default {
     });
     this.queryParams.liveId = this.$route.query.liveId
     this.getList();
-    this.getDicts("sys_live_order_status").then(response => {
+    // this.getDicts("sys_live_order_status").then(response => {
+    this.getDicts("sys_order_status").then(response => {
       this.orderStatusOptions = response.data;
     });
     this.getDicts("sys_order_status").then(response => {
@@ -389,31 +373,22 @@ export default {
     // 支付时间范围选择变化处理
     handlePayTimeChange(value) {
       if (value && value.length === 2) {
-        this.queryParams.payStartTime = value[0] + ' 00:00:00';
-        this.queryParams.payEndTime = value[1] + ' 23:59:59';
+        // 提取日期部分(yyyy-MM-dd),mapper会在SQL中拼接时间部分
+        this.queryParams.payStartTime = value[0].substring(0, 10);
+        this.queryParams.payEndTime = value[1].substring(0, 10);
       } else {
         this.queryParams.payStartTime = null;
         this.queryParams.payEndTime = null;
       }
     },
-
-    // 完成时间范围选择变化处理
-    handleFinishTimeChange(value) {
-      if (value && value.length === 2) {
-        this.queryParams.finishTimeStart = value[0] + ' 00:00:00';
-        this.queryParams.finishTimeEnd = value[1] + ' 23:59:59';
-      } else {
-        this.queryParams.finishTimeStart = null;
-        this.queryParams.finishTimeEnd = null;
-      }
-    },
     // 发货时间范围选择变化处理
     handleDeliveryTimeChange(value) {
       if (value && value.length === 2) {
-        this.queryParams.deliverySendTimeStart = value[0] + ' 00:00:00';
-        this.queryParams.deliverySendTimeEnd = value[1] + ' 23:59:59';
+        // 提取日期部分(yyyy-MM-dd),mapper会在SQL中拼接时间部分
+        this.queryParams.deliverySendTimeStart = value[0].substring(0, 10);
+        this.queryParams.deliverySendTimeEnd = value[1].substring(0, 10);
       } else {
-        this.queryParams.eliverySendTimeStart = null;
+        this.queryParams.deliverySendTimeStart = null;
         this.queryParams.deliverySendTimeEnd = null;
       }
     },
@@ -444,7 +419,6 @@ export default {
         this.liveOrderList = response.rows;
         this.total = response.total;
         this.loading = false;
-        delete this.queryParams[this.searchType];
       });
     },
 
@@ -460,8 +434,12 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      // 处理物流信息搜索
       if(this.searchKey!=='' && this.searchType!==''){
-       this.queryParams[this.searchType]=this.searchKey
+        this.queryParams[this.searchType] = this.searchKey;
+      } else if(this.searchType!=='') {
+        // 如果搜索框为空,清空对应的查询参数
+        this.queryParams[this.searchType] = null;
       }
       this.queryParams.pageNum = 1;
       this.getList();
@@ -472,14 +450,14 @@ export default {
       this.resetForm("queryForm");
       // 同时清空范围选择器的值
       this.payTimeRange = [];
-      this.finishTimeRange = [];
+      this.deliverySendTimeRange = [];
       this.searchKey= '';
       this.queryParams[this.searchType]=null;
       // 清空时间范围参数
       this.queryParams.payStartTime = null;
       this.queryParams.payEndTime = null;
-      this.queryParams.finishTimeStart = null;
-      this.queryParams.finishTimeEnd = null;
+      this.queryParams.deliverySendTimeStart = null;
+      this.queryParams.deliverySendTimeEnd = null;
       this.handleQuery();
     },
 

+ 98 - 0
src/views/store/components/productOrder.vue

@@ -235,6 +235,11 @@
             <p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
           </template>
         </el-table-column>
+        <el-table-column label="出库价" width="240" align="center">
+          <template slot-scope="scope">
+            <p>¥{{getOutboundPrice(scope.$index, scope.row).toFixed(2)}}</p>
+          </template>
+        </el-table-column>
         <el-table-column label="规格" width="240" align="center">
           <template slot-scope="scope">
             {{JSON.parse(scope.row.jsonInfo).sku}}
@@ -304,6 +309,22 @@
                 ¥{{order.serviceFee}}
               </span>
           </el-descriptions-item>
+          <el-descriptions-item label="折扣率"  >
+              <span v-if="order!=null && productTotal > 0">
+                {{((order.payPrice / productTotal) * 100).toFixed(2)}}%
+              </span>
+              <span v-else-if="order!=null">
+                0.00%
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="产品合计"  >
+              <span v-if="order!=null && items!=null && items.length > 0">
+                ¥{{productTotal.toFixed(2)}}
+              </span>
+              <span v-else-if="order!=null">
+                ¥0.00
+              </span>
+          </el-descriptions-item>
 
       </el-descriptions>
 
@@ -638,6 +659,29 @@ export default {
       this.scheduleOptions = response.data;
     });
   },
+  computed: {
+    /**
+     * 计算产品合计:每个产品单价*数量之和
+     */
+    productTotal() {
+      if (!this.items || this.items.length === 0) {
+        return 0;
+      }
+      let total = 0;
+      for (let i = 0; i < this.items.length; i++) {
+        const item = this.items[i];
+        try {
+          const jsonInfo = JSON.parse(item.jsonInfo);
+          const price = parseFloat(jsonInfo.price) || 0;
+          const num = parseFloat(item.num) || 0;
+          total += price * num;
+        } catch (e) {
+          console.warn('解析商品信息失败', e);
+        }
+      }
+      return total;
+    }
+  },
   watch: {
     'editDyForm.deliverSn': {
       handler(newValue) {
@@ -904,6 +948,60 @@ export default {
         this.editDyForm.deliverName=null;
       }
     },
+    /**
+     * 计算出库价
+     * @param index 商品索引
+     * @param row 商品行数据
+     * @returns {number} 出库价
+     */
+    getOutboundPrice(index, row) {
+      if (!this.order || !this.items || this.items.length === 0) {
+        return 0;
+      }
+      
+      const jsonInfo = JSON.parse(row.jsonInfo);
+      const price = parseFloat(jsonInfo.price) || 0;
+      const num = parseFloat(row.num) || 0;
+      
+      // 计算折扣率:应付金额 / 产品合计
+      const payPrice = parseFloat(this.order.payPrice) || 0;
+      
+      if (this.productTotal <= 0) {
+        return 0;
+      }
+      
+      const discountRate = payPrice / this.productTotal;
+      
+      // 如果只有一个商品,直接按折扣率计算
+      if (this.items.length === 1) {
+        return price * discountRate;
+      }
+      
+      // 多个商品的情况
+      // 判断是否是最后一个商品
+      const isLastItem = index === this.items.length - 1;
+      
+      if (isLastItem) {
+        // 最后一个商品:出库价 = (应付金额 - 之前所有产品出库价*数量的合计) / 数量
+        let previousTotal = 0;
+        for (let i = 0; i < index; i++) {
+          const prevRow = this.items[i];
+          const prevJsonInfo = JSON.parse(prevRow.jsonInfo);
+          const prevPrice = parseFloat(prevJsonInfo.price) || 0;
+          const prevNum = parseFloat(prevRow.num) || 0;
+          const prevOutboundPrice = prevPrice * discountRate;
+          previousTotal += prevOutboundPrice * prevNum;
+        }
+        
+        if (num > 0) {
+          return (payPrice - previousTotal) / num;
+        }
+        return 0;
+      } else {
+        // 前n-1个商品:出库价 = 单价 * 折扣率
+        return price * discountRate;
+      }
+    },
     getOrder(orderId){
         this.orderId=orderId;
         this.certificates = null;

+ 63 - 4
src/views/store/storeProduct/index.vue

@@ -224,7 +224,18 @@
               <el-input v-model="form.unitName" placeholder="请输入单位名" />
             </el-form-item>
           </el-col>
-
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="税收分类码" prop="taxClassificationCode">
+              <el-input v-model="form.taxClassificationCode" placeholder="请输入税收分类码" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="商品发票名称" prop="invoiceName">
+              <el-input v-model="form.invoiceName" placeholder="请输入商品发票名称" />
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
@@ -318,11 +329,27 @@
                         <div v-else-if="scope.column.property == 'action'" align="center" >
                           <a @click="delAttrTable(scope.$index)" align="center">删除</a>
                         </div>
+                        <div v-else-if="scope.column.property == 'taxRate'" align="center">
+                          <el-input 
+                            v-model="scope.row.taxRate" 
+                            placeholder="请输入税率"
+                            @input="handleTaxRateInput($event, scope.row)"
+                          />
+                        </div>
                         <div v-else align="center">
                           <el-input  v-model="scope.row[scope.column.property]" align="center" />
                         </div>
                       </template>
                     </el-table-column>
+                    <el-table-column prop="taxRate" label="税率" align="center" width="150">
+                      <template slot-scope="scope">
+                        <el-input 
+                          v-model="scope.row.taxRate" 
+                          placeholder="请输入税率"
+                          @input="handleTaxRateInput($event, scope.row)"
+                        />
+                      </template>
+                    </el-table-column>
                   </el-table>
 
                 </el-form-item>
@@ -404,6 +431,15 @@
                     <el-input type="text" v-model="scope.row.brokerageThree"/>
                   </template>
                 </el-table-column>
+                <el-table-column prop="taxRate" label="税率" align="center">
+                  <template slot-scope="scope">
+                    <el-input 
+                      v-model="scope.row.taxRate" 
+                      placeholder="请输入税率"
+                      @input="handleTaxRateInput($event, scope.row)"
+                    />
+                  </template>
+                </el-table-column>
               </el-table>
             </el-form-item>
           </el-col>
@@ -1008,7 +1044,9 @@ export default {
         prescribeName: null,
         isDisplay:"1",
         warehouseCode: null,
-        warehouseId: null
+        warehouseId: null,
+        taxClassificationCode: null,
+        invoiceName: null
       };
       this.resetForm("form");
       this.oneFormValidate = [
@@ -1025,7 +1063,8 @@ export default {
           integral: 0,
           brokerage:0,
           brokerageTwo:0,
-          warehouseCode:null
+          warehouseCode:null,
+          taxRate: null
         }
       ]
       this.attrs=[];
@@ -1104,7 +1143,8 @@ export default {
               volume: 0,
               integral: 0,
               brokerage:0,
-              brokerageTwo:0
+              brokerageTwo:0,
+              taxRate: null
             }
           ]
         }
@@ -1210,6 +1250,25 @@ export default {
         }).then(response => {
           this.download(response.msg);
         }).catch(function() {});
+    },
+    /** 处理税率输入过滤 */
+    handleTaxRateInput(value, row) {
+      // 只保留数字和小数点
+      let filteredValue = value.replace(/[^\d.]/g, '');
+      // 确保只有一个小数点
+      const parts = filteredValue.split('.');
+      if (parts.length > 2) {
+        filteredValue = parts[0] + '.' + parts.slice(1).join('');
+      }
+      // 限制小数点后最多2位
+      if (parts.length === 2 && parts[1].length > 2) {
+        filteredValue = parts[0] + '.' + parts[1].substring(0, 2);
+      }
+      // 限制最大值100
+      if (filteredValue && parseFloat(filteredValue) > 100) {
+        filteredValue = '100';
+      }
+      row.taxRate = filteredValue;
     }
   }
 };

+ 13 - 0
src/views/store/storeProductGroup/index.vue

@@ -237,6 +237,19 @@ export default {
           return;
         }
       }
+      
+      // 如果已有商品,校验仓库代码是否一致
+      if (this.products.length > 0) {
+        const firstWarehouseCode = this.products[0].prodWareHouseCode;
+        const currentWarehouseCode = row.prodWareHouseCode;
+        
+        // 检查仓库代码是否一致
+        if (firstWarehouseCode !== currentWarehouseCode) {
+          this.$message.error(`只能添加仓库代码一致的商品:${firstWarehouseCode || '未知'}`);
+          return;
+        }
+      }
+      
       this.products.push(row);
     },
     handleAddProduct(){

+ 13 - 19
src/views/store/storeProductPackage/index.vue

@@ -505,32 +505,26 @@ export default {
           return;
         }
       }
+      
+      // 如果已有商品,校验仓库代码是否一致
+      if (this.products.length > 0) {
+        const firstWarehouseCode = this.products[0].prodWareHouseCode;
+        const currentWarehouseCode = row.prodWareHouseCode;
+        
+        // 检查仓库代码是否一致
+        if (firstWarehouseCode !== currentWarehouseCode) {
+          this.$message.error(`只能添加仓库代码一致的商品:${firstWarehouseCode || '未知'}`);
+          return;
+        }
+      }
+      
       row.count=1;
       row.money=row.count*row.price;
-      let testProduct = [...this.products,row]
-      if (!this.checkProductsWarehouseCode(testProduct)) {
-        this.$message.error("商品仓库代码不一致,且不能为空");
-        return;
-      }
       this.products.push(row);
       this.compute();
 
       this.$message.success('添加成功!')
     },
-    checkProductsWarehouseCode(products) {
-      const warehouseCodeSet = new Set(products.map(row => row.prodWareHouseCode));
-      // 2. 检查 Set 大小是否为 1
-      if (warehouseCodeSet.size !== 1) {
-        return false;
-      }
-      // 3. 获取 Set 中的唯一元素(因为 Set 大小为 1,所以可以直接获取)
-      const [singleWarehouseCode] = warehouseCodeSet;
-      // 4. 检查唯一元素是否为空
-      if (singleWarehouseCode === null || singleWarehouseCode === undefined || singleWarehouseCode === '') {
-        return false; // 元素为空
-      }
-      return true; // 所有条件都满足
-    },
     handleAddProduct(){
       this.product.open=true;
       // setTimeout(() => {