From be3ec4c1f11a5e090408fcd6f650557651fcf007 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 13 四月 2026 20:17:16 +0800
Subject: [PATCH] 页面

---
 admin/src/views/business/storeList.vue |  113 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 82 insertions(+), 31 deletions(-)

diff --git a/admin/src/views/business/storeList.vue b/admin/src/views/business/storeList.vue
index 16ccd94..f60485d 100644
--- a/admin/src/views/business/storeList.vue
+++ b/admin/src/views/business/storeList.vue
@@ -1,32 +1,33 @@
 <template>
-  <TableLayout :permissions="['business:store:query']">
+  <TableLayout :permissions="['business:shopInfo:query']">
     <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
       <el-form-item label="闂ㄥ簵鍚嶇О" prop="name">
         <el-input v-model="searchForm.name" clearable placeholder="璇疯緭鍏ラ棬搴楀悕绉�" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="绫诲瀷" prop="type">
-        <el-select v-model="searchForm.type" clearable placeholder="璇烽�夋嫨绫诲瀷" @change="search">
+      <el-form-item label="绫诲瀷" prop="companyType">
+        <el-select v-model="searchForm.companyType" clearable placeholder="璇烽�夋嫨绫诲瀷" @change="search">
           <el-option label="浼佷笟" :value="1"></el-option>
-          <el-option label="涓汉" :value="2"></el-option>
+          <el-option label="涓汉" :value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="闂ㄥ簵鍦板潃" prop="address">
         <el-input v-model="searchForm.address" clearable placeholder="璇疯緭鍏ラ棬搴楀湴鍧�" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="鑱旂郴浜�" prop="contact">
-        <el-input v-model="searchForm.contact" clearable placeholder="璇疯緭鍏ヨ仈绯讳汉" @keypress.enter.native="search"></el-input>
+      <el-form-item label="鑱旂郴浜�" prop="linkName">
+        <el-input v-model="searchForm.linkName" clearable placeholder="璇疯緭鍏ヨ仈绯讳汉" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="鑱旂郴鐢佃瘽" prop="telephone">
-        <el-input v-model="searchForm.telephone" clearable placeholder="璇疯緭鍏ヨ仈绯荤數璇�" @keypress.enter.native="search"></el-input>
+      <el-form-item label="鑱旂郴鐢佃瘽" prop="linkPhone">
+        <el-input v-model="searchForm.linkPhone" clearable placeholder="璇疯緭鍏ヨ仈绯荤數璇�" @keypress.enter.native="search"></el-input>
       </el-form-item>
       <el-form-item label="娉ㄥ唽鏃堕棿" prop="createTime">
-        <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd HH:mm:ss"
-                        range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" />
+        <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd"
+                        range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleDateChange" />
       </el-form-item>
-      <el-form-item label="鐘舵��" prop="status">
-        <el-select v-model="searchForm.status" clearable placeholder="璇烽�夋嫨鐘舵��" @change="search">
-          <el-option label="鍚敤" :value="0"></el-option>
-          <el-option label="绂佺敤" :value="1"></el-option>
+      <el-form-item label="鐘舵��" prop="auditStatus">
+        <el-select v-model="searchForm.auditStatus" clearable placeholder="璇烽�夋嫨鐘舵��" @change="search">
+          <el-option label="寰呭鎵�" :value="0"></el-option>
+          <el-option label="瀹℃壒閫氳繃" :value="1"></el-option>
+          <el-option label="瀹℃壒鏈�氳繃" :value="2"></el-option>
         </el-select>
       </el-form-item>
       <section>
@@ -43,21 +44,31 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column prop="name" label="闂ㄥ簵鍚嶇О" min-width="120px"></el-table-column>
-        <el-table-column prop="type" label="绫诲瀷" min-width="80px">
+        <el-table-column prop="name" label="闂ㄥ簵鍚嶇О" min-width="120px">
           <template slot-scope="{row}">
-            {{row.type == 1 ? '浼佷笟' : '涓汉'}}
+            <span class="link-name" @click="openShopInfo(row)">{{ row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="companyType" label="绫诲瀷" min-width="80px">
+          <template slot-scope="{row}">
+            {{row.companyType == 1 ? '浼佷笟' : '涓汉'}}
           </template>
         </el-table-column>
         <el-table-column prop="address" label="闂ㄥ簵鍦板潃" min-width="200px"></el-table-column>
-        <el-table-column prop="contact" label="鑱旂郴浜�" min-width="100px"></el-table-column>
-        <el-table-column prop="telephone" label="鑱旂郴鐢佃瘽" min-width="120px"></el-table-column>
+        <el-table-column prop="linkName" label="鑱旂郴浜�" min-width="100px"></el-table-column>
+        <el-table-column prop="linkPhone" label="鑱旂郴鐢佃瘽" min-width="120px"></el-table-column>
         <el-table-column prop="createTime" label="娉ㄥ唽鏃ユ湡" min-width="160px"></el-table-column>
         <el-table-column label="璐﹀彿鐘舵��" min-width="100px">
           <template slot-scope="{row}">
             <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
             inactive-color="#ff4949" :active-value="0" :inactive-value="1">
             </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="鎿嶄綔" min-width="150" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="text" @click="handleEdit(row)">缂栬緫</el-button>
+            <el-button type="text" @click="handleResetPwd(row)">閲嶇疆瀵嗙爜</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -68,6 +79,10 @@
       >
       </pagination>
     </template>
+    <!-- 闂ㄥ簵璇︽儏 -->
+    <OperaShopInfoWindow ref="operaShopInfoWindow" />
+    <!-- 缂栬緫闂ㄥ簵 -->
+    <OperaShopEditWindow ref="operaShopEditWindow" @success="search" />
   </TableLayout>
 </template>
 
@@ -75,27 +90,32 @@
 import BaseTable from '@/components/base/BaseTable'
 import TableLayout from '@/layouts/TableLayout'
 import Pagination from '@/components/common/Pagination'
+import OperaShopInfoWindow from '@/components/business/OperaShopInfoWindow'
+import OperaShopEditWindow from '@/components/business/OperaShopEditWindow'
+import { changeStatus, resetPassword } from '@/api/business/shopInfo'
 export default {
   name: 'StoreList',
   extends: BaseTable,
-  components: { TableLayout, Pagination },
+  components: { TableLayout, Pagination, OperaShopInfoWindow, OperaShopEditWindow },
   data () {
     return {
       searchForm: {
         name: '',
-        type: '',
+        companyType: '',
         address: '',
-        contact: '',
-        telephone: '',
+        linkName: '',
+        linkPhone: '',
         createTime: '',
-        status: ''
+        createStartTime: '',
+        createEndTime: '',
+        auditStatus: 3
       }
     }
   },
   created () {
     this.config({
       module: '闂ㄥ簵鍒楄〃',
-      api: '/business/store',
+      api: '/business/shopInfo',
       'field.id': 'id',
       'field.main': 'id'
     })
@@ -105,18 +125,23 @@
     reset () {
       this.searchForm = {
         name: '',
-        type: '',
+        companyType: '',
         address: '',
-        contact: '',
-        telephone: '',
+        linkName: '',
+        linkPhone: '',
         createTime: '',
-        status: ''
+        status: '',
+        auditStatus: 3
       }
       this.search()
     },
+    handleDateChange (val) {
+      this.searchForm.createStartTime = val ? val[0] : ''
+      this.searchForm.createEndTime = val ? val[1] : ''
+    },
     changeStatus (e, row) {
       this.working = true
-      this.api.updateStatus({ id: row.id, status: e })
+      changeStatus({ id: row.id, status: e })
         .then(res => {
           this.$tip.apiSuccess(res || '鎿嶄綔鎴愬姛')
           this.search()
@@ -127,7 +152,33 @@
         .finally(() => {
           this.working = false
         })
+    },
+    openShopInfo (row) {
+      this.$refs.operaShopInfoWindow.open('闂ㄥ簵淇℃伅', row)
+    },
+    handleEdit (row) {
+      this.$refs.operaShopEditWindow.open('缂栬緫闂ㄥ簵', row)
+    },
+    handleResetPwd (row) {
+      this.$confirm('鏄惁纭閲嶇疆闂ㄥ簵瀵嗙爜锛�', '鎻愮ず')
+        .then(() => {
+          resetPassword({ id: row.id })
+            .then(res => {
+              this.$tip.apiSuccess(res || '閲嶇疆瀵嗙爜鎴愬姛')
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+        })
+        .catch(() => {})
     }
   }
 }
-</script>
\ No newline at end of file
+</script>
+<style scoped>
+.link-name {
+  color: #2E68EC;
+  text-decoration: underline;
+  cursor: pointer;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3