店铺照片
This commit is contained in:
@@ -22,9 +22,9 @@
|
|||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<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="photoUrl" label="门店照片" align="left">
|
<el-table-column slot="logoFiles" label="门店照片" align="left">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-image class="row-img" :src="row.photoUrl" :preview-src-list="[row.photoUrl]"/>
|
<el-image class="row-img" :src="row.logoFiles[0].accessUrl" :preview-src-list="row.logoFilesUrlList"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column slot="userName" label="微信用户" align="left">
|
<el-table-column slot="userName" label="微信用户" align="left">
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
<template slot-scope="{row}">
|
<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, 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 == 0" @click="examine(row, 0, '确定拒绝该商户审核?')">审核拒绝</el-button>
|
||||||
|
|
||||||
<el-button type="text" v-if="row.status == 1" @click="add(row)">编辑</el-button>
|
<el-button type="text" v-if="row.status == 1" @click="add(row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -46,8 +45,8 @@
|
|||||||
</ai-list>
|
</ai-list>
|
||||||
<ai-dialog title="商户修改" :visible.sync="visible" @onCancel="visible = false; dialogInfo = {}" @onConfirm="addConfirm" width="800px">
|
<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 ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="120px">
|
||||||
<el-form-item label="门店照片" prop="photoList">
|
<el-form-item label="门店照片" prop="logoFiles">
|
||||||
<ai-uploader v-model="dialogInfo.photoList" :instance="instance" :limit="1"></ai-uploader>
|
<ai-uploader v-model="dialogInfo.logoFiles" :instance="instance" :limit="1"></ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商户名称" prop="merchantName">
|
<el-form-item label="商户名称" prop="merchantName">
|
||||||
<el-input placeholder="请输入商户名称" :maxlength="30" show-word-limit v-model="dialogInfo.merchantName"></el-input>
|
<el-input placeholder="请输入商户名称" :maxlength="30" show-word-limit v-model="dialogInfo.merchantName"></el-input>
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
<el-form-item style="width: 100%" label="地理位置" prop="address">
|
<el-form-item style="width: 100%" label="地理位置" prop="address">
|
||||||
<el-button @click="showMap = true">地图标绘</el-button>
|
<el-button @click="showMap = true">地图标绘</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="标绘地址">
|
<el-form-item label="标绘地址">
|
||||||
<el-input v-model="dialogInfo.address" disabled ></el-input>
|
<el-input v-model="dialogInfo.address" disabled ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -116,12 +114,12 @@ export default {
|
|||||||
},
|
},
|
||||||
searchPlace: '',
|
searchPlace: '',
|
||||||
formRules: {
|
formRules: {
|
||||||
photoList: [{required: true, message: '请上传商户图片', trigger: 'blur'}],
|
logoFiles: [{required: true, message: '请上传商户图片', trigger: 'blur'}],
|
||||||
merchantName: [{required: true, message: '请输入商户名称', trigger: 'blur'}],
|
merchantName: [{required: true, message: '请输入商户名称', trigger: 'blur'}],
|
||||||
address: [{required: true, message: '请输入选择地理位置', trigger: 'blur'}],
|
address: [{required: true, message: '请输入选择地理位置', trigger: 'blur'}],
|
||||||
},
|
},
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{slot: 'photoUrl'},
|
{slot: 'logoFiles'},
|
||||||
{prop: 'merchantName', label: '商户名称', width: 120, align: 'center'},
|
{prop: 'merchantName', label: '商户名称', width: 120, align: 'center'},
|
||||||
{prop: 'address', label: '地理位置', align: 'center'},
|
{prop: 'address', label: '地理位置', align: 'center'},
|
||||||
{slot: 'userName'},
|
{slot: 'userName'},
|
||||||
@@ -143,7 +141,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
add(row) {
|
add(row) {
|
||||||
this.dialogInfo = {...row}
|
this.dialogInfo = {...row}
|
||||||
this.dialogInfo.photoList = [{url: row.photoUrl}]
|
// this.dialogInfo.photoList = [{url: row.photoUrl}]
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
selectMap() {
|
selectMap() {
|
||||||
@@ -204,7 +202,7 @@ export default {
|
|||||||
addConfirm() {
|
addConfirm() {
|
||||||
this.$refs.ruleForm.validate((valid) => {
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.dialogInfo.photoUrl = this.dialogInfo.photoList[0].url
|
// this.dialogInfo.photoUrl = this.dialogInfo.photoList[0].url
|
||||||
this.instance.post(`api/appmerchantinfo/addOrUpdate`, {...this.dialogInfo}).then(res => {
|
this.instance.post(`api/appmerchantinfo/addOrUpdate`, {...this.dialogInfo}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success('商户修改成功')
|
this.$message.success('商户修改成功')
|
||||||
@@ -217,7 +215,7 @@ export default {
|
|||||||
},
|
},
|
||||||
examine(row, pass, text) {
|
examine(row, pass, text) {
|
||||||
this.$confirm(text).then(() => {
|
this.$confirm(text).then(() => {
|
||||||
this.instance.post(`api//appmerchantinfo/examine?id=${row.id}&pass=${pass}`).then(res => {
|
this.instance.post(`api/appmerchantinfo/examine?id=${row.id}&pass=${pass}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -233,6 +231,14 @@ export default {
|
|||||||
},
|
},
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
res.data.records.map((item) => {
|
||||||
|
item.logoFilesUrlList = []
|
||||||
|
if(item.logoFiles) {
|
||||||
|
item.logoFiles.map((e) => {
|
||||||
|
item.logoFilesUrlList.push(e.accessUrl)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
this.page.total = res.data.total
|
this.page.total = res.data.total
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user