From 28db820caf0ed90f4326d29cb0fa7a19cba92775 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 27 二月 2026 16:33:03 +0800
Subject: [PATCH] 经销商管理

---
 admin/src/components/business/OperaCouponGoodsWindow.vue |   49 ++++++++++++++++++++++---------------------------
 1 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/admin/src/components/business/OperaCouponGoodsWindow.vue b/admin/src/components/business/OperaCouponGoodsWindow.vue
index 3bfdb05..6c14332 100644
--- a/admin/src/components/business/OperaCouponGoodsWindow.vue
+++ b/admin/src/components/business/OperaCouponGoodsWindow.vue
@@ -2,12 +2,13 @@
   <GlobalWindow
     :title="title"
     width="100%"
+    :with-footer="false"
     :visible.sync="visible"
     @confirm="confirm"
   >
-    <TableLayout :permissions="['business:goods:query']">
+    <TableLayout>
       <!-- 鎼滅储琛ㄥ崟 -->
-      <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" style="display: block;" >
+      <el-form ref="searchForm" slot="search-form" id="curSearchForm" :model="searchForm" label-width="100px" style="display: block;" >
         <el-form-item label="" prop="name" label-width="5px" style="display: inline-block;margin-right: 30px;">
           <el-input v-model="searchForm.name" style="width: 150px;" placeholder="鍟嗗搧鍚嶇О" clearable @keypress.enter.native="search"></el-input>
         </el-form-item>
@@ -24,18 +25,19 @@
         <section>
           <el-button type="primary" @click="search">鎼滅储</el-button>
           <el-button @click="reset">閲嶇疆</el-button>
+          <el-button type="primary" style="margin-left: 30px;font-weight: bold"  @click="confirm">纭鍟嗗搧閰嶇疆</el-button>
         </section>
       </el-form>
       <!-- 琛ㄦ牸鍜屽垎椤� -->
       <template v-slot:table-wrap>
-        <div :style="'display: flex;height:'+tabelHeight+'px;'">
+        <div :style="'display: flex;height:'+tableHeight+'px;'">
           <div style="flex: 6;">
             <ul class="toolbar">
               <li><el-button type="primary"  icon="el-icon-plus"  @click="addAll()" :disabled="!(tableData.selectedRows &&  tableData.selectedRows.length)">鎵归噺娣诲姞</el-button></li>
             </ul>
           <el-table
               ref="singleTable"
-              :height="tabelHeight-80"
+              :height="tableHeight-80"
               v-loading="isWorking.search"
               :data="tableData.list"
               stripe
@@ -73,7 +75,7 @@
                 <div style="flex: 6"> <span>宸查�夋嫨<i class="blue" style="margin: 0 10px">{{selectGoods.length||0}}</i>浠跺晢鍝�</span></div>
                 <div style="flex: 1;text-align: right"> <el-button size="mini" type="danger" class="blue" @click="cleanAll">娓呯┖</el-button></div>
               </div>
-              <div :style="`display: flex;flex-direction: column;max-height: ${tabelHeight-80}px;overflow: auto`">
+              <div :style="`display: flex;flex-direction: column;max-height: ${tableHeight-80}px;overflow: auto`">
                 <div  v-for="(item,index) in selectGoods" style="display: flex;margin: 10px 0;" :key="'selGoods'+item.id">
                   <div style="flex: 6">{{item.name}}<br><span class="red">锟{item.skuPrice || 0}}</span></div>
                   <div style="flex: 1;text-align: right;">
@@ -100,31 +102,18 @@
   components: { GlobalWindow, TableLayout, Pagination },
   data () {
     return {
-      activeName: 'first',
       title: '',
       visible: false,
-      tabelHeight: null,
+      selectGoods:[],
       // 鎼滅储
       searchForm: {
-        name: '',
-        categoryId: '',
-        brandId: '',
-        type: '0', // 骞冲彴鍟嗗搧
-        status: '',
-        isrec: '',
-        labels: ''
+        id: '',
+        bindShopId: ''
       },
-      labels: [],
-      serials: [],
-      brands: [],
-      selectGoods: []
+      shops: [],
+      brands:[],
+      labels:[]
     }
-  },
-  mounted() {
-    window.addEventListener('resize', this.handleResize);
-  },
-  beforeDestroy() {
-    window.removeEventListener('resize', this.handleResize);
   },
   created () {
     this.config({
@@ -144,11 +133,17 @@
       .then(res => {
         this.brands = res
       })
+    window.addEventListener('resize', () => {
+      this.handleResize()
+    })
     this.handleResize()
   },
   methods: {
-    handleResize(){
-      this.tabelHeight = window.innerHeight - 300
+    handleResize () {
+      this.tableHeight = window.innerHeight - 260
+      if (document.getElementById('curSearchForm')) {
+        this.tableHeight = this.tableHeight - document.getElementById('curSearchForm').clientHeight
+      }
     },
     checkSelectable (row) {
       return row.tabStatus !== 2
@@ -259,6 +254,6 @@
 <style scoped>
 .table-pagination{
   position: fixed !important;
-  bottom: 50px;
+  bottom: 10px;
 }
 </style>

--
Gitblit v1.9.3