天府星2.0搞定
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="等级配置" :isShowBottomBorder="false" :isShowArea="false"></ai-title>
|
<ai-title title="等级配置" :isShowBottomBorder="false" :isShowArea="false"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template #content>
|
||||||
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
||||||
:size.sync="page.size" @getList="getList" class="ai-table">
|
:size.sync="page.size" @getList="getList" class="ai-table">
|
||||||
<el-table-column slot="beginIntegral" label="积分范围" align="center">
|
<el-table-column slot="beginIntegral" label="积分范围" align="center">
|
||||||
|
|||||||
267
project/tianfuxing/AppMerchantList/AppMerchantList.vue
Normal file
267
project/tianfuxing/AppMerchantList/AppMerchantList.vue
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AppMerchantList">
|
||||||
|
<ai-list>
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="商户管理" :isShowBottomBorder="false" :isShowArea="false"></ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar>
|
||||||
|
<template #left>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.status"
|
||||||
|
placeholder="选择审核类型"
|
||||||
|
clearable
|
||||||
|
@change="(page.current = 1), getList()"
|
||||||
|
:selectList="dict.getDict('tfx_merchantStatus')"
|
||||||
|
></ai-select>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<el-input v-model="search.merchantName" class="search-input" size="small" placeholder="请输入姓名/手机号" clearable @change="getList" @clear="page.current = 1, (search.merchantName = ''), getList()" suffix-icon="iconfont iconSearch">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
||||||
|
:size.sync="page.size" @getList="getList" class="ai-table">
|
||||||
|
<el-table-column slot="photoUrl" label="门店照片" align="left">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-image class="row-img" :src="row.photoUrl" :preview-src-list="[row.photoUrl]"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="userName" label="微信用户" align="left">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-image class="user-img" :src="row.userAvatarUrl" :preview-src-list="[row.userAvatarUrl]"/>
|
||||||
|
<span class="user-name">{{row.userName}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="option" label="操作" align="center" width="250">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<el-button type="text" v-if="row.status == 0" @click="examine(row, 1, '确定通过该商户审核?')">通过</el-button>
|
||||||
|
<el-button type="text" v-if="row.status == 0" @click="examine(row, 0, '确定拒绝该商户审核?')">拒绝</el-button>
|
||||||
|
|
||||||
|
<el-button type="text" v-if="row.status == 1" @click="add(row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
<ai-dialog title="商户修改" :visible.sync="visible" @onCancel="visible = false; dialogInfo = {}" @onConfirm="addConfirm" width="800px">
|
||||||
|
<el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="120px">
|
||||||
|
<el-form-item label="门店照片" prop="photoList">
|
||||||
|
<ai-uploader v-model="dialogInfo.photoList" :instance="instance" :limit="1"></ai-uploader>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商户名称" prop="merchantName">
|
||||||
|
<el-input placeholder="请输入等级名称" :maxlength="30" show-word-limit v-model="dialogInfo.merchantName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="width: 100%" label="地理位置" prop="address">
|
||||||
|
<el-button @click="showMap = true">地图标绘</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="标绘地址">
|
||||||
|
<el-input v-model="dialogInfo.address" disabled ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog>
|
||||||
|
<ai-dialog title="地图" :visible.sync="showMap" @opened="initMap" width="800px" class="mapDialog" @onConfirm="selectMap">
|
||||||
|
<div id="map"></div>
|
||||||
|
<el-form label-width="80px" style="padding: 10px 20px 0 20px;">
|
||||||
|
<el-row type="flex" justify="space-between">
|
||||||
|
<el-form-item label="经度">
|
||||||
|
<el-input disabled size="small" v-model="placeDetail.lng"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度">
|
||||||
|
<el-input disabled size="small" v-model="placeDetail.lat"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-input id="searchPlaceInput" size="medium" class="searchPlaceInput" clearable v-model="searchPlace" autocomplete="on" @change="placeSearch.search(searchPlace)" placeholder="请输入关键字">
|
||||||
|
<el-button type="primary" slot="append" @click="placeSearch.search(searchPlace)">搜索</el-button>
|
||||||
|
</el-input>
|
||||||
|
<div id="searchPlaceOutput" />
|
||||||
|
</ai-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {mapState} from 'vuex'
|
||||||
|
import AMapLoader from '@amap/amap-jsapi-loader'
|
||||||
|
export default {
|
||||||
|
label: '商户管理',
|
||||||
|
name: 'AppMerchantList',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
permissions: Function,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
page: {
|
||||||
|
size: 10,
|
||||||
|
current: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
merchantName: '',
|
||||||
|
status: ''
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
dialogInfo: {},
|
||||||
|
showMap: false,
|
||||||
|
map: null,
|
||||||
|
placeSearch: null,
|
||||||
|
placeDetail: {
|
||||||
|
lng: '',
|
||||||
|
lat: '',
|
||||||
|
address: ''
|
||||||
|
},
|
||||||
|
searchPlace: '',
|
||||||
|
formRules: {
|
||||||
|
photoList: [{required: true, message: '请上传商户图片', trigger: 'blur'}],
|
||||||
|
merchantName: [{required: true, message: '请输入商户名称', trigger: 'blur'}],
|
||||||
|
address: [{required: true, message: '请输入选择地理位置', trigger: 'blur'}],
|
||||||
|
},
|
||||||
|
colConfigs: [
|
||||||
|
{slot: 'photoUrl'},
|
||||||
|
{prop: 'merchantName', label: '商户名称', width: 120, align: 'center'},
|
||||||
|
{prop: 'address', label: '地理位置', align: 'center'},
|
||||||
|
{slot: 'userName'},
|
||||||
|
// {prop: 'status', label: '状态', align: 'center', dict: 'tfx_merchantStatus'},
|
||||||
|
{slot: 'option'},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$dict.load('tfx_merchantStatus').then(()=> {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add(row) {
|
||||||
|
this.dialogInfo = {...row}
|
||||||
|
this.dialogInfo.photoList = [{url: row.photoUrl}]
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
selectMap() {
|
||||||
|
this.dialogInfo.lng = this.placeDetail.lng
|
||||||
|
this.dialogInfo.lat = this.placeDetail.lat
|
||||||
|
this.dialogInfo.address = this.placeDetail.address
|
||||||
|
this.showMap = false
|
||||||
|
},
|
||||||
|
initMap() {
|
||||||
|
AMapLoader.load({
|
||||||
|
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
||||||
|
version: '2.0',
|
||||||
|
plugins: ['AMap.PlaceSearch', 'AMap.AutoComplete', 'AMap.Geocoder'],
|
||||||
|
}).then((AMap) => {
|
||||||
|
this.map = new AMap.Map('map', {
|
||||||
|
resizeEnable: true,
|
||||||
|
zooms: [6, 20],
|
||||||
|
zoom: 11,
|
||||||
|
})
|
||||||
|
this.placeSearch = new AMap.PlaceSearch({ map: this.map })
|
||||||
|
new AMap.AutoComplete({
|
||||||
|
input: 'searchPlaceInput',
|
||||||
|
output: 'searchPlaceOutput',
|
||||||
|
}).on('select', (e) => {
|
||||||
|
if (e?.poi) {
|
||||||
|
this.placeSearch.setCity(e.poi.adcode)
|
||||||
|
this.movePosition(e.poi.location)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.map.on('click', (e) => {
|
||||||
|
new AMap.Geocoder().getAddress(e.lnglat, (sta, res) => {
|
||||||
|
if (res?.regeocode) {
|
||||||
|
this.placeDetail = {
|
||||||
|
lng: e.lnglat?.lng,
|
||||||
|
lat: e.lnglat?.lat,
|
||||||
|
address: res.regeocode.formattedAddress,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.movePosition(e.lnglat)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
movePosition(center) {
|
||||||
|
if (this.map) {
|
||||||
|
this.map.clearMap()
|
||||||
|
this.map.panTo(center)
|
||||||
|
this.map.add([
|
||||||
|
new AMap.Marker({
|
||||||
|
position: center,
|
||||||
|
clickable: true,
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
this.map.setFitView()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addConfirm() {
|
||||||
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.dialogInfo.photoUrl = this.dialogInfo.photoList[0].url
|
||||||
|
this.instance.post(`api/appmerchantinfo/addOrUpdate`, {...this.dialogInfo}).then(res => {
|
||||||
|
if (res?.code == 0) {
|
||||||
|
this.$message.success('商户修改成功')
|
||||||
|
this.visible = false
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
examine(row, pass, text) {
|
||||||
|
this.$confirm(text).then(() => {
|
||||||
|
this.instance.post(`api//appmerchantinfo/examine?id=${row.id}&pass=${pass}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('审核成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`api/appmerchantinfo/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.page,
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.page.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.AppMerchantList {
|
||||||
|
height: 100%;
|
||||||
|
::v-deep .endIntegral .el-form-item__content {
|
||||||
|
margin-left: 0!important;
|
||||||
|
}
|
||||||
|
.row-img {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
.user-img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.user-name {
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 40px;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,12 +3,6 @@
|
|||||||
<ai-list>
|
<ai-list>
|
||||||
<ai-title slot="title" title="任务审核" isShowBottomBorder />
|
<ai-title slot="title" title="任务审核" isShowBottomBorder />
|
||||||
<template #content>
|
<template #content>
|
||||||
<!-- <ai-search-bar>
|
|
||||||
<template #right>
|
|
||||||
<el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch">
|
|
||||||
</el-input>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar> -->
|
|
||||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"
|
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"
|
||||||
:dict="dict" @sort-change="sortChange">
|
:dict="dict" @sort-change="sortChange">
|
||||||
<el-table-column slot="accessUrl" label="凭证内容" align="left">
|
<el-table-column slot="accessUrl" label="凭证内容" align="left">
|
||||||
@@ -17,9 +11,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||||
<template slot-scope="{ row }" v-if="row.status == 0">
|
<template slot-scope="{ row }">
|
||||||
<el-button type="text" @click="pass(row)">通过</el-button>
|
<el-button type="text" v-if="row.status == 0" @click="pass(row)">通过</el-button>
|
||||||
<el-button type="text" @click="refuse(row)">拒绝</el-button>
|
<el-button type="text" v-if="row.status == 0" @click="refuse(row)">拒绝</el-button>
|
||||||
|
<el-button type="text" v-if="row.status != 0 && row.openStatus != 1" @click="open(row)">展示</el-button>
|
||||||
|
<el-button type="text" v-if="row.status != 0 && row.openStatus == 1" @click="open(row)">取消展示</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -34,6 +30,7 @@
|
|||||||
<el-form-item label="发放积分" prop="integral">
|
<el-form-item label="发放积分" prop="integral">
|
||||||
<el-input v-model.trim="form.integral" placeholder="请输入正数" size="small"></el-input>
|
<el-input v-model.trim="form.integral" placeholder="请输入正数" size="small"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<p><el-checkbox v-model="form.openStatus">同时将随手拍展示到文明广场</el-checkbox></p>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,9 +48,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
search: {
|
|
||||||
title: '',
|
|
||||||
},
|
|
||||||
page: {
|
page: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -101,7 +95,8 @@ export default {
|
|||||||
onConfirm() {
|
onConfirm() {
|
||||||
this.$refs.form.validate((valid)=> {
|
this.$refs.form.validate((valid)=> {
|
||||||
if(valid) {
|
if(valid) {
|
||||||
this.instance.post(`api/appwechatescalation/examine?id=${this.form.id}&pass=1&integral=${this.form.integral}`).then(res => {
|
var openStatus = this.form.openStatus ? 1 : 0
|
||||||
|
this.instance.post(`api/appwechatescalation/examine?id=${this.form.id}&pass=1&integral=${this.form.integral}&openStatus=${openStatus}`).then(res => {
|
||||||
if(res?.code == 0) {
|
if(res?.code == 0) {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
@@ -110,11 +105,19 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
open(row) {
|
||||||
|
this.instance.post(`api//appwechatescalation/openShow?id=${row.id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
pass(row) {
|
pass(row) {
|
||||||
this.dialog = true
|
this.dialog = true
|
||||||
this.form = {...row}
|
this.form = {...row}
|
||||||
|
this.form.openStatus = row.openStatus == 1 ? true : false
|
||||||
},
|
},
|
||||||
refuse(row) {
|
refuse(row) {
|
||||||
this.$confirm('确定拒绝该任务?').then(() => {
|
this.$confirm('确定拒绝该任务?').then(() => {
|
||||||
@@ -130,7 +133,6 @@ export default {
|
|||||||
this.instance.post(`api/appwechatescalation/list`,null,{
|
this.instance.post(`api/appwechatescalation/list`,null,{
|
||||||
params: {
|
params: {
|
||||||
...this.page,
|
...this.page,
|
||||||
...this.search,
|
|
||||||
}
|
}
|
||||||
}).then(res=> {
|
}).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input v-model="search.nickName" class="search-input" size="small" placeholder="请输入姓名" clearable @change="getList" @clear="page.current = 1, (search.nickName = ''), getList()" suffix-icon="iconfont iconSearch">
|
<el-input v-model="search.nickName" class="search-input" size="small" placeholder="请输入姓名/手机号" clearable @change="getList" @clear="page.current = 1, (search.nickName = ''), getList()" suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
|
|||||||
Reference in New Issue
Block a user