From 9b46e9e116c0f2a51a496da2fb24502ece01f5cd Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 19 一月 2026 18:12:55 +0800
Subject: [PATCH] 经销商管理

---
 admin/src/components/business/OperaShopInfoWindow.vue |  192 +++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 156 insertions(+), 36 deletions(-)

diff --git a/admin/src/components/business/OperaShopInfoWindow.vue b/admin/src/components/business/OperaShopInfoWindow.vue
index 8e42adc..38cdded 100644
--- a/admin/src/components/business/OperaShopInfoWindow.vue
+++ b/admin/src/components/business/OperaShopInfoWindow.vue
@@ -110,34 +110,68 @@
       </div>
     </template>
     <template v-else-if="activeGroup == 1">
-      <div style="display: block;margin-bottom: 50px;">
-        <div class="header">
-          <div  class="header-b">绉垎鏄庣粏</div>
-          <div  class="header-btn">
-            <el-button style="display: inline" type="primary" @click="changeIntegral">绉垎璋冩暣</el-button>
+      <div style="display: block;">
+        <el-form ref="searchForm1"   :model="searchForm1"    style="display: block;" >
+          <el-form-item label="" prop="code" style="display: inline-block;margin-right: 30px;">
+            <el-input v-model="searchForm1.code" placeholder="璇疯緭鍏ヨ鍗曞彿" @keypress.enter.native="handlePageChange1(1)"></el-input>
+          </el-form-item>
+          <el-form-item label="" prop="goodsName" style="display: inline-block;margin-right: 30px;">
+            <el-input v-model="searchForm1.goodsName" placeholder="璇疯緭鍏ュ晢鍝佸悕绉�/缂栫爜" @keypress.enter.native="handlePageChange1(1)"></el-input>
+          </el-form-item>
+          <el-form-item label="" prop="status" style="display: inline-block;margin-right: 30px;">
+            <!-- 0姝e父 1绂佺敤 -->
+            <el-select     v-model="searchForm1.status"  placeholder="璇烽�夋嫨璁㈠崟鐘舵��"  @change="handlePageChange1(1)"  >
+              <el-option  :key="0" :value="0"  label="寰呮敮浠�"  ></el-option>
+              <el-option   :key="1" :value="1" label="寰呭彂璐�/寰呰嚜鎻�"  ></el-option>
+              <el-option   :key="2" :value="2" label="寰呮敹璐�"  ></el-option>
+              <el-option   :key="3" :value="3" label="浜ゆ槗瀹屾垚"  ></el-option>
+              <el-option   :key="4" :value="4" label="宸插叧闂�"  ></el-option>
+            </el-select>
+          </el-form-item>
+          <div class="date-style" style="display: inline-block;font-size: 14px;margin-right: 20px;">璁㈠崟鏃堕棿锛�
+            <el-form-item label="" prop="starttime" style="display: inline-block" >
+              <el-date-picker
+                  style="width: 160px; "
+                  v-model="searchForm1.starttime"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  format="yyyy-MM-dd HH:mm:ss"
+                  range-separator="鑷�"
+                  placeholder="寮�濮嬫椂闂�"
+              ></el-date-picker>
+            </el-form-item>
+            <el-form-item label="" label-width="10px" prop="endtime" style="display: inline-block"  >
+              <el-date-picker
+                  style="width: 160px; "
+                  v-model="searchForm1.endtime"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  format="yyyy-MM-dd HH:mm:ss"
+                  range-separator="鑷�"
+                  placeholder="鎴鏃堕棿"
+              ></el-date-picker>
+            </el-form-item>
           </div>
-        </div>
+          <section style="display: inline">
+            <el-button type="primary" @click="handlePageChange1(1)">鎼滅储</el-button>
+            <el-button @click="reset1(1)">閲嶇疆</el-button>
+          </section>
+        </el-form>
+      </div>
+      <div style="display: block;margin-bottom: 50px;">
         <TableLayout >
           <!-- 琛ㄦ牸鍜屽垎椤� -->
           <template v-slot:table-wrap>
-            <div >
-              <div style="float: left; margin-bottom: 20px;width:50%;">
-                <div class="info-item">
-                  <div class="info-item-a">鐜版湁绉垎锛�<span>{{info.integral || 0}}</span></div>
-                  <div class="info-item-a">绱绉垎锛�<span>{{info.totalIntegral || 0}}</span></div>
-                </div>
-              </div>
-              <div style="float: right; margin-bottom: 20px;">
-                <el-select  v-model="searchForm2.type"  placeholder="鍏ㄩ儴"  clearable @change="search" style="width: 120px;" >
-                  <el-option  :key="0" :value="0"  label="鑾峰緱"  ></el-option>
-                  <el-option   :key="1" :value="1" label="鎵i櫎"  ></el-option>
-                </el-select>
-                <el-button @click="handlePageChange2(1)" type="鐐瑰嚮鍒锋柊"  icon="el-icon-refresh"  style="margin-left: 10px;" ></el-button>
+            <div style="float: left; margin-bottom: 20px;width:50%;">
+              <div class="info-item">
+                <div class="info-item-a">璁㈠崟鏁帮細<span>{{totalData.orderCount || 0}}</span></div>
+                <div class="info-item-a">鍟嗗搧鏁伴噺锛�<span>{{totalData.goodsNum || 0}}</span></div>
+                <div class="info-item-a">鍟嗗搧鎬讳环锛�<span>锟{totalData.orderMoneyCount || 0}}</span></div>
               </div>
             </div>
             <el-table
                 v-loading="isWorking.search2"
-                :data="tableData2.list"
+                :data="tableData1.list"
                 stripe
                 border
             >
@@ -147,18 +181,37 @@
                   <span v-else class="red">鎵i櫎</span>
                 </template>
               </el-table-column>
-              <el-table-column prop="num" label="鏁伴噺" fixed align="center" min-width="100px">  </el-table-column>
-              <el-table-column prop="totalNum" label="浣欓" fixed align="center" min-width="100px">  </el-table-column>
-              <el-table-column prop="strObjType" label="娑堣垂绫诲瀷" align="center" min-width="100px"></el-table-column>
-              <el-table-column prop="content" label="鏉ユ簮" align="center" min-width="150px" show-overflow-tooltip></el-table-column>
-              <el-table-column prop="remark" label="澶囨敞" align="center" min-width="200px"></el-table-column>
-              <el-table-column prop="orderCode" label="鍏宠仈璁㈠崟" align="center" min-width="150px"></el-table-column>
-              <el-table-column prop="createDate" label="鍙樺姩鏃堕棿" align="center" min-width="200px"></el-table-column>
+              <el-table-column prop="code" label="璁㈠崟缂栧彿" fixed align="center" min-width="100px">  </el-table-column>
+              <el-table-column prop="details" label="鍟嗗搧淇℃伅" fixed align="center" min-width="100px">
+                <template slot-scope="{row}">
+                  <div v-if="row.goodsorderDetailList && row.goodsorderDetailList.length"  >
+                      <div v-for="(item) in row.goodsorderDetailList">銆恵{item.name}}銆戦攢鍞环锛歿{item.price||0}} 鏁伴噺锛歿{item.goodsNum||0}}</div>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="price" label="鍟嗗搧鎬讳环锛堝厓锛�" align="center" min-width="100px">
+                <template slot-scope="{row}">
+                   {{(row.totalPrice || 0) - (row.mailPrice||0)}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="mailPrice" label="杩愯垂(鍏�)" align="center" min-width="100px"></el-table-column>
+              <el-table-column prop="totalPrice" label="璁㈠崟鎬讳环(鍏�)" align="center" min-width="100px"></el-table-column>
+              <el-table-column prop="couponPrice" label="浼樻儬閲戦(鍏�)" align="center" min-width="100px">
+                <template slot-scope="{row}">
+                  {{(row.couponPrice || 0) + (row.integral||0)}}
+                </template>
+              </el-table-column>
+              <el-table-column prop="price" label="瀹炰粯浠锋牸(鍏�)" align="center" min-width="200px"></el-table-column>
+              <el-table-column prop="shopSettlement" label="搴旂粨绠楅噾棰�(鍏�)" align="center" min-width="150px"></el-table-column>
+              <el-table-column prop="orderCode" label="搴旂粨绠楅噾棰�(鍏�)" align="center" min-width="150px"></el-table-column>
+              <el-table-column prop="orderCode" label="杩旂敤鎴风Н鍒�" align="center" min-width="150px"></el-table-column>
+              <el-table-column prop="orderCode" label="杩旂粡閿�鍟嗙Н鍒�" align="center" min-width="150px"></el-table-column>
+              <el-table-column prop="createDate" label="鍒涘缓" align="center" min-width="200px"></el-table-column>
             </el-table>
             <pagination
-                @size-change="handleSizeChange2"
-                @current-change="handlePageChange2"
-                :pagination="tableData2.pagination"
+                @size-change="handleSizeChange1"
+                @current-change="handlePageChange1"
+                :pagination="tableData1.pagination"
             >
             </pagination>
           </template>
@@ -238,6 +291,7 @@
 import { shopDetail as detail } from '@/api/business/shop'
 import { fetchList as actionList } from '@/api/business/userAction'
 import { fetchList as integralList } from '@/api/business/integral'
+import { fetchShopList as orderList } from '@/api/business/goodsorder'
 export default {
   name: 'OperaShopInfoWindow',
   extends: BaseTable,
@@ -251,6 +305,14 @@
       groupList: [{ id: 0, name: '鍩烘湰淇℃伅' }, { id: 1, name: '閿�鍞俊鎭�' }, { id: 2, name: '绉垎淇℃伅' }],
       info: {},
       // 鎼滅储
+      searchForm1: {
+        distributionShopId: '',
+        goodsName: null,
+        code: null,
+        status: null,
+        starttime: null,
+        endtime: null
+      },
       searchForm2: {
         memberId: '',
         userType: 1,
@@ -262,6 +324,21 @@
         search2: false
       },
       tableData0: {
+        // 宸查�変腑鐨勬暟鎹�
+        selectedRows: [],
+        // 鎺掑簭鐨勫瓧娈�
+        sorts: [],
+        // 褰撳墠椤垫暟鎹�
+        list: [],
+        // 鍒嗛〉
+        pagination: {
+          pageIndex: 1,
+          pageSize: 10,
+          total: 0
+        }
+      },
+      totalData: {},
+      tableData1: {
         // 宸查�変腑鐨勬暟鎹�
         selectedRows: [],
         // 鎺掑簭鐨勫瓧娈�
@@ -301,8 +378,15 @@
     })
   },
   methods: {
-    groupClick(item){
+    groupClick (item) {
       this.activeGroup = item.id
+      if (this.activeGroup === 2) {
+        this.handlePageChange2(1)
+      } else if (this.activeGroup === 1) {
+        this.handlePageChange1(1)
+      } else {
+        this.handlePageChange0(1)
+      }
     },
     successBiz () {
       this.handlePageChange2(1)
@@ -329,12 +413,20 @@
       this.visible = true
       this.info = info
       this.activeGroup = 0
+      this.searchForm1.distributionShopId = info.id
       this.searchForm2.memberId = info.id
+      this.tableData0.list = []
+      this.tableData1.list = []
+      this.tableData2.list = []
       if (this.info.imgurl) {
         this.info.imgurlfull = this.info.imgFullUrl + this.info.imgurl
       }
       this.handlePageChange0(1)
-      this.handlePageChange2(1)
+      this.totalData = {}
+    },
+    reset1 () {
+      this.$refs.searchForm1.resetFields()
+      this.handlePageChange1(1)
     },
     handleSizeChange0 (pageSize) {
       this.tableData0.pagination.pageSize = pageSize
@@ -361,17 +453,45 @@
           this.isWorking.search0 = false
         })
     },
+    handleSizeChange1 (pageSize) {
+      this.tableData1.pagination.pageSize = pageSize
+      this.handleSizeChange1()
+    },
+    // 椤电爜鍙樻洿澶勭悊
+    handlePageChange1 (pageIndex) {
+      this.tableData1.pagination.pageIndex = pageIndex || this.tableData1.pagination.pageIndex
+      this.isWorking.search1 = true
+      orderList({
+        page: this.tableData1.pagination.pageIndex,
+        capacity: this.tableData1.pagination.pageSize,
+        model: this.searchForm1, // 閿�鍞ā寮忓彉鏇�
+        sorts: this.tableData1.sorts
+      })
+        .then(data => {
+          this.tableData1.list = data.records
+          this.tableData1.pagination.total = data.total
+          if (this.tableData1.pagination.pageIndex === 1) {
+            this.totalData = data.countData || {}
+          }
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.isWorking.search1 = false
+        })
+    },
     handleSizeChange2 (pageSize) {
-      this.tableData0.pagination.pageSize = pageSize
-      this.search0()
+      this.tableData2.pagination.pageSize = pageSize
+      this.handleSizeChange2()
     },
     // 椤电爜鍙樻洿澶勭悊
     handlePageChange2 (pageIndex) {
       this.tableData2.pagination.pageIndex = pageIndex || this.tableData2.pagination.pageIndex
       this.isWorking.search2 = true
       integralList({
-        page: this.tableData0.pagination.pageIndex,
-        capacity: this.tableData0.pagination.pageSize,
+        page: this.tableData2.pagination.pageIndex,
+        capacity: this.tableData2.pagination.pageSize,
         model: this.searchForm2, // 閿�鍞ā寮忓彉鏇�
         sorts: this.tableData2.sorts
       })

--
Gitblit v1.9.3