zory 3 minggu lalu
induk
melakukan
0a471691cf

+ 3 - 3
src/api/model/store.js

@@ -17,14 +17,14 @@ export default {
         },
     },
     edit: {
-        url: `${config.API_URL}/shop/edit`,
+        url: `${config.API_URL}/store/edit`,
         name: "-",
         post: async function (data = {}) {
             return await http.post(this.url, data);
         },
     },
     batch: {
-        url: `${config.API_URL}/shop/batch`,
+        url: `${config.API_URL}/store/batch`,
         name: "-",
         post: async function (data = {}) {
             return await http.post(this.url, data);
@@ -38,7 +38,7 @@ export default {
         },
     },
     del: {
-        url: `${config.API_URL}/shop/del`,
+        url: `${config.API_URL}/store/del`,
         name: "-",
         post: async function (data = {}) {
             return await http.post(this.url, data);

+ 6 - 6
src/api/model/user.js

@@ -3,42 +3,42 @@ import http from "@/utils/request";
 
 export default {
     list: {
-        url: `${config.API_URL}/user/list`,
+        url: `${config.API_URL}/store/user/list`,
         name: "-",
         get: async function (params) {
             return await http.get(this.url, params);
         },
     },
     pwd: {
-        url: `${config.API_URL}/user/passwd`,
+        url: `${config.API_URL}/store/user/passwd`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
     batch: {
-        url: `${config.API_URL}/user/batch`,
+        url: `${config.API_URL}/store/user/batch`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
     save: {
-        url: `${config.API_URL}/user/save`,
+        url: `${config.API_URL}/store/user/save`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
     state: {
-        url: `${config.API_URL}/user/state`,
+        url: `${config.API_URL}/store/user/state`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
     del: {
-        url: `${config.API_URL}/user/del`,
+        url: `${config.API_URL}/store/user/del`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);

+ 20 - 62
src/views/manage/components/agent.vue

@@ -13,7 +13,7 @@
                         <el-row :gutter="10">
                             <el-col :span="18" :xs="12">
                                 <el-form-item label=" " prop="name">
-                                    <el-input v-model="searchKey.name" placeholder="请输入代理名称" clearable
+                                    <el-input v-model="searchKey.name" placeholder="请输入名称" clearable
                                         :style="{width: '100%'}"></el-input>
                                 </el-form-item>
                             </el-col>
@@ -32,49 +32,28 @@
                         <el-table-column width="50" fixed="left">
                             <div class="checkbox"></div>
                         </el-table-column>
-                        <el-table-column label="店铺名称" width="200" fixed="left" prop="shop_name"></el-table-column>
-                        <el-table-column label="店铺编码" prop="agent_id" width="200"></el-table-column>
-                        <el-table-column label="营业时间" prop="agent" width="150">
+                        <el-table-column label="店铺名称" width="200" fixed="left" prop="poi_name"></el-table-column>
+                        <el-table-column label="店铺编码" prop="poi_id" width="200"></el-table-column>
+                        <el-table-column label="所属地区" prop="agent" width="200">
                             <template #default="scope">
-                                <span v-if="scope.row.start_at">{{ scope.row.start_at }}-{{ scope.row.end_at }}</span>
+                                <span v-if="scope.row.poi_city">{{ scope.row.poi_city }}</span>
                                 <span class="status-danger" v-else>未设置</span>
                             </template>
                         </el-table-column>
-                        <el-table-column label="到期时间" prop="vip_end" width="180">
+                        <el-table-column label="详细地址" prop="poi_address" width="200">
                             <template #default="scope">
-                                <span v-if="scope.row.vip_end">{{ scope.row.vip_end }}</span>
+                                <span v-if="scope.row.poi_address">{{ scope.row.poi_address }}</span>
                                 <span class="status-danger" v-else>未设置</span>
                             </template>
                         </el-table-column>
-                        <el-table-column label="收费规则" prop="rate_type" width="150">
+                        <el-table-column label="经纬度" prop="poi_address" width="200">
                             <template #default="scope">
-                                <div class="status-success" v-if="scope.row.rate_type==1"><sc-status-indicator type="success"></sc-status-indicator> 收取年费</div>
-                                <div class="status-danger" v-if="scope.row.rate_type==2"><sc-status-indicator type="danger"></sc-status-indicator> 订单金额抽佣</div>
-                                <div class="status-danger" v-if="scope.row.rate_type==0"><sc-status-indicator type="danger"></sc-status-indicator> 未设置</div>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="联系人" prop="shop_contact" width="150">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_contact">{{ scope.row.shop_contact }}</span>
-                                <span class="status-danger" v-else>未设置</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="联系电话" prop="shop_mobile" width="150">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_mobile">{{ scope.row.shop_mobile }}</span>
-                                <span class="status-danger" v-else>未设置</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="店铺地址" prop="shop_address" width="320">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_address">{{ scope.row.shop_address }}</span>
-                                <span class="status-danger" v-else>未设置</span>
+                                <el-link :href="'//uri.amap.com/marker?position='+scope.row.longitude+','+scope.row.latitude+'&name='+scope.row.poi_name+'&src=mypage&coordinate=gaode&callnative=0'" target="_blank">{{ scope.row.longitude }},{{ scope.row.latitude }}</el-link>
                             </template>
                         </el-table-column>
                         <el-table-column label="状态" prop="status" width="120" align="center">
                             <template #default="scope">
-                                <div class="status-success" v-if="scope.row.status==0"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
-                                <div class="status-danger" v-if="scope.row.status==1"><sc-status-indicator type="danger"></sc-status-indicator> 已到期</div>
+                                <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
                                 <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
                             </template>
                         </el-table-column>
@@ -85,49 +64,28 @@
                     <scTable ref="table" :apiObj="list.apiObj" :hideSetting="true" paginationLayout="total, prev, pager, next" :params="searchKey" @selectionChange="selectionChange" row-key="id" @sortChange="sortChange">
                         <el-table-column type="selection" width="50" fixed="left"></el-table-column>
                         
-                        <el-table-column label="店铺名称" width="200" fixed="left" prop="shop_name"></el-table-column>
-                        <el-table-column label="店铺编码" prop="agent_id" width="200"></el-table-column>
-                        <el-table-column label="营业时间" prop="agent" width="150">
+                        <el-table-column label="店铺名称" width="200" fixed="left" prop="poi_name"></el-table-column>
+                        <el-table-column label="店铺编码" prop="poi_id" width="200"></el-table-column>
+                        <el-table-column label="所属地区" prop="agent" width="200">
                             <template #default="scope">
-                                <span v-if="scope.row.start_at">{{ scope.row.start_at }}-{{ scope.row.end_at }}</span>
+                                <span v-if="scope.row.poi_city">{{ scope.row.poi_city }}</span>
                                 <span class="status-danger" v-else>未设置</span>
                             </template>
                         </el-table-column>
-                        <el-table-column label="到期时间" prop="vip_end" width="180">
+                        <el-table-column label="详细地址" prop="poi_address" width="200">
                             <template #default="scope">
-                                <span v-if="scope.row.vip_end">{{ scope.row.vip_end }}</span>
+                                <span v-if="scope.row.poi_address">{{ scope.row.poi_address }}</span>
                                 <span class="status-danger" v-else>未设置</span>
                             </template>
                         </el-table-column>
-                        <el-table-column label="收费规则" prop="rate_type" width="150">
+                        <el-table-column label="经纬度" prop="poi_address" width="200">
                             <template #default="scope">
-                                <div class="status-success" v-if="scope.row.rate_type==1"><sc-status-indicator type="success"></sc-status-indicator> 收取年费</div>
-                                <div class="status-danger" v-if="scope.row.rate_type==2"><sc-status-indicator type="danger"></sc-status-indicator> 订单金额抽佣</div>
-                                <div class="status-danger" v-if="scope.row.rate_type==0"><sc-status-indicator type="danger"></sc-status-indicator> 未设置</div>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="联系人" prop="shop_contact" width="150">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_contact">{{ scope.row.shop_contact }}</span>
-                                <span class="status-danger" v-else>未设置</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="联系电话" prop="shop_mobile" width="150">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_mobile">{{ scope.row.shop_mobile }}</span>
-                                <span class="status-danger" v-else>未设置</span>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="店铺地址" prop="shop_address" width="320">
-                            <template #default="scope">
-                                <span v-if="scope.row.shop_address">{{ scope.row.shop_address }}</span>
-                                <span class="status-danger" v-else>未设置</span>
+                                <el-link :href="'//uri.amap.com/marker?position='+scope.row.longitude+','+scope.row.latitude+'&name='+scope.row.poi_name+'&src=mypage&coordinate=gaode&callnative=0'" target="_blank">{{ scope.row.longitude }},{{ scope.row.latitude }}</el-link>
                             </template>
                         </el-table-column>
                         <el-table-column label="状态" prop="status" width="120" align="center">
                             <template #default="scope">
-                                <div class="status-success" v-if="scope.row.status==0"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
-                                <div class="status-danger" v-if="scope.row.status==1"><sc-status-indicator type="danger"></sc-status-indicator> 已到期</div>
+                                <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
                                 <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
                             </template>
                         </el-table-column>
@@ -158,7 +116,7 @@ export default{
                 edit:"选择店铺"
             },
             list: {
-                apiObj: this.$API.shop.list
+                apiObj: this.$API.store.list
             },
             visible: false,
             isSaveing: false,

+ 42 - 149
src/views/manage/shop/index/components/form.vue

@@ -1,108 +1,34 @@
 <template>
-    <el-drawer :title="titleMap[mode]" :append-to-body="true" v-model="visible" :size="1000" destroy-on-close :close-on-click-modal="false" @closed="$emit('closed')" :with-header="false">
-        <el-container class="flex-column" v-loading="loading">
-            <div class="drawer-detail-main">
-                <div class="drawer-detail-header">
-                    <div class="drawer-detail-header-body">
-                        <div class="drawer-detail-header-left">{{ titleMap[mode] }}</div>
-                        <div class="drawer-detail-header-left">
-                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <el-main>
-                <el-form ref="dialogForm" :model="formData" :rules="rules" label-width="100px" label-position="top">
-                    <fieldset>
-                        <legend><el-tag>店铺信息</el-tag></legend>
-                        <el-row :gutter="15">
-                            <el-col :span="12">
-                                <el-form-item label="店铺名称" prop="shop_name">
-                                    <el-input v-model="formData.shop_name" clearable placeholder="请输入"></el-input>
-                                    <div class="el-form-item-msg"></div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="6">
-                                <el-form-item label="联系人" prop="shop_contact">
-                                    <el-input v-model="formData.shop_contact" clearable placeholder="请输入"></el-input>
-                                    <div class="el-form-item-msg"></div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="6">
-                                <el-form-item label="联系电话" prop="shop_mobile">
-                                    <el-input v-model="formData.shop_mobile" clearable placeholder="请输入"></el-input>
-                                    <div class="el-form-item-msg"></div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="12">
-                                <el-form-item label="营业时间">
-                                    <el-row :gutter="10">
-                                        <el-col :span="11">
-                                            <el-time-select v-model="formData.start_at" start="00:00" step="00:01" end="23:59" placeholder="请选择"  style="width: 100%"/>
-                                        </el-col>
-                                        <el-col :span="2" class="text-center">
-                                            <span class="text-gray-500">-</span>
-                                        </el-col>
-                                        <el-col :span="11">
-                                            <el-time-select v-model="formData.end_at" start="00:00" step="00:01" end="23:59" placeholder="请选择"  style="width: 100%"/>
-                                        </el-col>
-                                    </el-row>
-                                    <div class="el-form-item-msg">营业时间为必选,否则小程序端无法下单</div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="12">
-                                <el-form-item label="提现手续费" prop="cash_rate">
-                                    <el-input v-model="formData.cash_rate" clearable placeholder="请输入">
-                                        <template #append>%</template>
-                                    </el-input>
-                                    <div class="el-form-item-msg">设置为10则为10%,意为每笔提现将收取提现金额的10%作为手续费</div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="24">
-                                <el-form-item label="店铺地址" prop="shop_address">
-                                    <el-input v-model="formData.shop_address" clearable placeholder="请输入"></el-input>
-                                    <div class="el-form-item-msg"></div>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="24">
-                                <el-form-item label="店铺公告" prop="shop_notice">
-                                    <el-input v-model="formData.shop_notice" type="textarea" clearable placeholder="请输入">
-                                        <template #append>%</template>
-                                    </el-input>
-                                    <div class="el-form-item-msg"></div>
-                                </el-form-item>
-                            </el-col>
-                        </el-row>
-                    </fieldset>
-                    <fieldset>
-                        <legend><el-tag>收费规则</el-tag></legend>
-                        <el-form-item label="收费类型" prop="rate_type">
-                            <el-radio-group v-model="formData.rate_type">
-                                <el-radio border :label="1">收取年费</el-radio>
-                                <el-radio border :label="2">订单金额抽佣</el-radio>
-                            </el-radio-group>
-                        </el-form-item>
-                        <el-form-item label="抽佣类型" prop="rate_radio" v-if="formData.rate_type==2">
-                            <el-radio-group v-model="formData.rate_radio">
-                                <el-radio border :label="1">固定金额</el-radio>
-                                <el-radio border :label="2">金额比例</el-radio>
-                            </el-radio-group>
-                        </el-form-item>
-                        <el-form-item label="抽佣比例/金额" prop="rate_money" v-if="formData.rate_type==2">
-                            <el-input v-model="formData.rate_money" clearable placeholder="请输入">
-                                <template #append>{{formData.rate_radio==1?'元':'%'}}</template>
-                            </el-input>
-                            <div class="el-form-item-msg">如果类型为金额比例,比例设置10,则表示抽取每单金额的10%为系统佣金,最多不超过100</div>
-                        </el-form-item>
-                    </fieldset>
-                </el-form>
-            </el-main>
-            <el-footer style="text-align: right;">
-                <el-button @click="visible=false" size="large">取 消</el-button>
-                <el-button v-if="mode!='show'" size="large" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
-            </el-footer>
-        </el-container>
-    </el-drawer>
+    <el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
+        <el-form ref="dialogForm" :model="formData" :rules="rules" label-width="100px" label-position="top">
+            <el-form-item label="店铺名称" prop="poi_name">
+                <el-input v-model="formData.poi_name" disabled readonly clearable placeholder="请输入"></el-input>
+                <div class="el-form-item-msg"></div>
+            </el-form-item>
+            <el-form-item label="营业时间">
+                <el-row :gutter="10">
+                    <el-col :span="11">
+                        <el-time-select v-model="formData.start_at" start="00:00" step="00:01" end="23:59" placeholder="请选择"  style="width: 100%"/>
+                    </el-col>
+                    <el-col :span="2" class="text-center">
+                        <span class="text-gray-500">-</span>
+                    </el-col>
+                    <el-col :span="11">
+                        <el-time-select v-model="formData.end_at" start="00:00" step="00:01" end="23:59" placeholder="请选择"  style="width: 100%"/>
+                    </el-col>
+                </el-row>
+                <div class="el-form-item-msg">营业时间为必选,否则小程序端无法下单</div>
+            </el-form-item>
+            <el-form-item label="到期时间" prop="vip_end">
+                <el-date-picker v-model="formData.vip_end" :style="{width: '100%'}" placeholder="请选择" />
+            </el-form-item>
+        </el-form>
+		<template #footer>
+            <el-button @click="visible=false" size="large">取 消</el-button>
+            <el-button v-if="mode!='show'" size="large" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
+		</template>
+    </el-dialog>
+    
 </template>
 
 <script>
@@ -119,54 +45,14 @@ export default {
             visible:false,
             formData:{},
             rules:{
-                shop_address: [
-                    {required: true, message: '请输入'}
-                ],
-                rate_money: [
-                    {required: true, message: '请输入'}
-                ],
-                rate_radio: [
-                    {required: true, message: '请选择'}
-                ],
-                rate_type: [
-                    {required: true, message: '请选择'}
-                ],
-                shop_name: [
-                    {required: true, message: '请输入'}
-                ],
-                shop_contact: [
-                    {required: true, message: '请输入'}
-                ],
-                shop_mobile: [
-                    {required: true, message: '请输入'}
-                ],
-                shop_address: [
-                    {required: true, message: '请输入'}
-                ],
                 start_at: [
                     {required: true, message: '请选择'}
                 ],
                 end_at: [
                     {required: true, message: '请选择'}
                 ],
-                username: [
-                    {required: true, message: '请输入'}
-                ],
-                cash_rate: [
-                    {required: true, message: '请输入'}
-                ],
-                password: [
-                    {required: true, message: '请输入登录密码'}
-                ],
-                password2: [
-                    {required: true, message: '请再次输入密码'},
-                    {validator: (rule, value, callback) => {
-                        if (value !== this.formData.password) {
-                            callback(new Error('两次输入密码不一致!'));
-                        }else{
-                            callback();
-                        }
-                    }}
+                vip_end: [
+                    {required: true, message: '请选择'}
                 ],
             }
         }
@@ -186,10 +72,13 @@ export default {
             if(!validate){ return false }
             this.isSaveing = true;
             let submitData = JSON.parse(JSON.stringify(this.formData));
+            if (this.formData.vip_end) {
+                submitData.vip_end = this.$TOOL.dateFormat(this.formData.vip_end, "yyyy-MM-dd");
+            }
             if (this.mode == 'add') {
-                var resp = await this.$API.shop.save.post(submitData);
+                var resp = await this.$API.store.save.post(submitData);
             } else {
-                var resp = await this.$API.shop.edit.post(submitData);
+                var resp = await this.$API.store.edit.post(submitData);
             }
             this.isSaveing = false;
             if (resp.code == 0) {
@@ -203,4 +92,8 @@ export default {
         }
     }
 }
-</script>
+</script>
+
+<style>
+.text-center{text-align: center;}
+</style>

+ 6 - 4
src/views/manage/shop/index/components/option.vue

@@ -5,9 +5,9 @@
         </legend>
         <div class="op-header">
             <div class="left-panel">
-                <el-button type="primary" icon="el-icon-plus" @click="table_add()">新增店铺</el-button>
-                <el-button icon="el-icon-document" @click="table_batch_status(0)" :disabled="dataSelect.length>0?false:true">启用</el-button>
-                <el-button type="danger" icon="el-icon-connection" @click="table_sync()">同步POI</el-button>
+                <el-button icon="el-icon-unlock" @click="table_batch_status(1)" :disabled="dataSelect.length>0?false:true">启用</el-button>
+                <el-button icon="el-icon-lock" type="danger" @click="table_batch_status(2)" :disabled="dataSelect.length>0?false:true">禁用</el-button>
+                <el-button type="warning" icon="el-icon-connection" @click="table_sync()">同步POI</el-button>
             </div>
         </div>
     </fieldset>
@@ -48,8 +48,10 @@ export default {
             if (this.dataSelect.length == 0) {
                 return this.$message.error("请选择修改数据")
             }
+            var loading = this.$loading()
             let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
-            var resp = await this.$API.shop.batch.post(submitData);
+            loading.close()
+            var resp = await this.$API.store.batch.post(submitData);
             if (resp.code == 0) {
                 return this.$message.error(resp.msg);
             }

+ 2 - 2
src/views/manage/shop/index/components/search.vue

@@ -14,8 +14,8 @@
                         </el-col>
                         <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
                             <el-select v-model="searchKey.status" clearable placeholder="请选择状态" @change="searchForm" :style="{width: '100%'}" class="diy-select">
-                                <el-option value="1" label="冻结"></el-option>
-                                <el-option value="2" label="正常"></el-option>
+                                <el-option value="1" label="正常"></el-option>
+                                <el-option value="2" label="禁用"></el-option>
                                 <template #prefix>状态</template>
                             </el-select>
                         </el-col>

+ 15 - 28
src/views/manage/shop/index/components/table.vue

@@ -1,61 +1,48 @@
 <template>
     <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
         <el-table-column type="selection" width="50" fixed="left"></el-table-column>
-        <el-table-column label="店铺名称" width="200" fixed="left" prop="shop_name"></el-table-column>
-        <el-table-column label="店铺编码" prop="agent_id" width="200"></el-table-column>
-        <el-table-column label="营业时间" prop="agent" width="150">
-            <template #default="scope">
-                <span v-if="scope.row.start_at">{{ scope.row.start_at }}-{{ scope.row.end_at }}</span>
-                <span class="status-danger" v-else>未设置</span>
-            </template>
-        </el-table-column>
-        <el-table-column label="到期时间" prop="vip_end" width="180">
+        <el-table-column label="店铺名称" width="200" fixed="left" prop="poi_name"></el-table-column>
+        <el-table-column label="店铺编码" prop="poi_id" width="200"></el-table-column>
+        <el-table-column label="到期时间" prop="agent" width="200">
             <template #default="scope">
                 <span v-if="scope.row.vip_end">{{ scope.row.vip_end }}</span>
                 <span class="status-danger" v-else>未设置</span>
             </template>
         </el-table-column>
-        <el-table-column label="收费规则" prop="rate_type" width="150">
+        <el-table-column label="营业时间" prop="agent" width="150">
             <template #default="scope">
-                <div class="status-success" v-if="scope.row.rate_type==1"><sc-status-indicator type="success"></sc-status-indicator> 收取年费</div>
-                <div class="status-danger" v-if="scope.row.rate_type==2"><sc-status-indicator type="danger"></sc-status-indicator> 订单金额抽佣</div>
-                <div class="status-danger" v-if="scope.row.rate_type==0"><sc-status-indicator type="danger"></sc-status-indicator> 未设置</div>
+                <span v-if="scope.row.start_at">{{ scope.row.start_at }}-{{ scope.row.end_at }}</span>
+                <span class="status-danger" v-else>未设置</span>
             </template>
         </el-table-column>
-        <el-table-column label="联系人" prop="shop_contact" width="150">
+        <el-table-column label="所属地区" prop="agent" width="200">
             <template #default="scope">
-                <span v-if="scope.row.shop_contact">{{ scope.row.shop_contact }}</span>
+                <span v-if="scope.row.poi_city">{{ scope.row.poi_city }}</span>
                 <span class="status-danger" v-else>未设置</span>
             </template>
         </el-table-column>
-        <el-table-column label="联系电话" prop="shop_mobile" width="150">
+        <el-table-column label="详细地址" prop="poi_address">
             <template #default="scope">
-                <span v-if="scope.row.shop_mobile">{{ scope.row.shop_mobile }}</span>
+                <span v-if="scope.row.poi_address">{{ scope.row.poi_address }}</span>
                 <span class="status-danger" v-else>未设置</span>
             </template>
         </el-table-column>
-        <el-table-column label="店铺地址" prop="shop_address" width="300">
+        <el-table-column label="经纬度" prop="poi_address">
             <template #default="scope">
-                <span v-if="scope.row.shop_address">{{ scope.row.shop_address }}</span>
-                <span class="status-danger" v-else>未设置</span>
+                <el-link :href="'//uri.amap.com/marker?position='+scope.row.longitude+','+scope.row.latitude+'&name='+scope.row.poi_name+'&src=mypage&coordinate=gaode&callnative=0'" target="_blank">{{ scope.row.longitude }},{{ scope.row.latitude }}</el-link>
             </template>
         </el-table-column>
         <el-table-column label="状态" prop="status" width="120" align="center">
             <template #default="scope">
-                <div class="status-success" v-if="scope.row.status==0"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
-                <div class="status-danger" v-if="scope.row.status==1"><sc-status-indicator type="danger"></sc-status-indicator> 已到期</div>
-                <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 关店</div>
+                <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
+                <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
             </template>
         </el-table-column>
         <el-table-column label="创建时间" prop="create_at" width="180"></el-table-column>
         <el-table-column label="操作" width="140" align="left" fixed="right">
             <template #default="scope">
                 <el-button-group>
-                    <el-button size="small" @click="table_auth(scope.row)">套餐</el-button>
                     <el-button size="small" @click="table_view(scope.row)">编辑</el-button>
-                </el-button-group>
-                <div class="line-5"></div>
-                <el-button-group>
                     <el-button type="danger" size="small" @click="table_del(scope.row)">删除</el-button>
                 </el-button-group>
             </template>
@@ -75,7 +62,7 @@ export default {
     data(){
         return {
             list: {
-                apiObj: this.$API.shop.list
+                apiObj: this.$API.store.list
             },
             dataSelect:[],
             dataSelectFull:[],

+ 13 - 10
src/views/manage/shop/user/components/form.vue

@@ -5,14 +5,15 @@
                 <el-col :span="24">
                     <el-form-item label="帐号类型" prop="type">
                         <el-radio-group v-model="formData.type">
-                            <el-radio border :label="1">管理员</el-radio>
-                            <el-radio border :label="2">店铺帐号</el-radio>
+                            <el-radio-button border :label="1">管理员</el-radio-button>
+                            <el-radio-button border :label="2">店铺帐号</el-radio-button>
+                            <el-radio-button border :label="3">客服账号</el-radio-button>
                         </el-radio-group>
                     </el-form-item>
                 </el-col>
-                <el-col :span="24" v-if="formData.type==2">
-                    <el-form-item label="所属店铺" prop="agent_id">
-                        <el-input v-model="formData.agent_id" placeholder="所属店铺" clearable readonly :style="{ width: '100%' }" @click="selectUser">
+                <el-col :span="24" v-if="formData.type>1">
+                    <el-form-item label="所属店铺" prop="store_name">
+                        <el-input v-model="formData.store_name" placeholder="所属店铺" clearable readonly :style="{ width: '100%' }" @click="selectUser">
                             <template #append>
                                 <el-tooltip
                                     effect="dark"
@@ -39,13 +40,13 @@
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="新的登录密码" prop="password">
-                        <el-input v-model="formData.password" clearable placeholder="请输入"></el-input>
+                        <el-input v-model="formData.password" show-password clearable placeholder="请输入"></el-input>
                         <div class="el-form-item-msg"></div>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="重复登录密码" prop="password2">
-                        <el-input v-model="formData.password2" clearable placeholder="请输入"></el-input>
+                        <el-input v-model="formData.password2" show-password clearable placeholder="请输入"></el-input>
                         <div class="el-form-item-msg"></div>
                     </el-form-item>
                 </el-col>
@@ -98,7 +99,7 @@ export default {
                         }
                     }}
                 ],
-                agent_id: [
+                store_name: [
                     {required: true, message: '请选择'}
                 ],
             }
@@ -106,10 +107,12 @@ export default {
     },
     methods:{
         handleSuccess(data){
-            this.formData.agent_id = data.agent_id;
+            this.formData.store_id = data.poi_id;
+            this.formData.store_name = data.poi_name;
         },
         clearUser(){
-            this.formData.agent_id = "";
+            this.formData.store_id = "";
+            this.formData.store_name = "";
         },
         selectUser(){
             this.$nextTick(() => {

+ 1 - 1
src/views/manage/shop/user/components/table.vue

@@ -53,7 +53,7 @@
             <template #default="scope">
                 <el-button-group>
                     <el-button text type="warning" size="small" @click="table_passwd(scope.row)">修改密码</el-button>
-                    <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
+                    <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)" v-if="scope.row.is_super==0">
                         <template #reference>
                             <el-button text type="danger" size="small">删除</el-button>
                         </template>