|
@@ -76,28 +76,28 @@
|
|
|
<el-table-column label="店铺id" align="center" prop="storeId" width="120px"/>
|
|
|
<el-table-column label="店铺名称" align="center" prop="storeName" width="120px"/>
|
|
|
<el-table-column label="店铺LOGO" align="center" prop="logoUrl" width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-popover
|
|
|
- placement="right"
|
|
|
- title=""
|
|
|
- trigger="hover">
|
|
|
- <img slot="reference" :src="scope.row.logoUrl" width="80px">
|
|
|
- <img :src="scope.row.logoUrl" style="max-width: 150px;">
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+ title=""
|
|
|
+ trigger="hover">
|
|
|
+ <img slot="reference" :src="scope.row.logoUrl" width="80px">
|
|
|
+ <img :src="scope.row.logoUrl" style="max-width: 150px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="地址" align="center" prop="address" width="200px"/>
|
|
|
<el-table-column label="店铺电话" align="center" prop="phone" width="120px"/>
|
|
|
<el-table-column label="资质证书" align="center" prop="licenseImages" width="100px">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-popover
|
|
|
- placement="right"
|
|
|
- title=""
|
|
|
- trigger="hover">
|
|
|
- <img slot="reference" :src="scope.row.licenseImages" width="80px">
|
|
|
- <img :src="scope.row.licenseImages" style="max-width: 150px;">
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+ title=""
|
|
|
+ trigger="hover">
|
|
|
+ <img slot="reference" :src="scope.row.licenseImages" width="80px">
|
|
|
+ <img :src="scope.row.licenseImages" style="max-width: 150px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="审核状态" align="center" prop="isAudit">
|
|
|
<template slot-scope="scope">
|
|
@@ -115,21 +115,16 @@
|
|
|
<el-table-column label="累计金额" align="center" prop="totalMoney" />
|
|
|
|
|
|
<el-table-column label="登录帐号" align="center" prop="account" width="150px" />
|
|
|
- <el-table-column label="创建时间" align="center" prop="createTime" width="150px"/>
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" width="150px"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="130px">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.isAudit==0"
|
|
|
+ <el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['his:store:audit']"
|
|
|
- >审核</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- @click="handledetails(scope.row)"
|
|
|
- >详情
|
|
|
+ @click="handledetails(scope.row)"
|
|
|
+ >
|
|
|
+ <span v-if="scope.row.isAudit===0">审核</span>
|
|
|
+ <span v-else>详情</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -144,20 +139,21 @@
|
|
|
/>
|
|
|
|
|
|
|
|
|
- <el-drawer
|
|
|
- :with-header="false"
|
|
|
- size="75%"
|
|
|
- :title="show.title" :visible.sync="show.open">
|
|
|
- <storeDetails ref="Details" />
|
|
|
- </el-drawer>
|
|
|
-
|
|
|
+ <el-drawer
|
|
|
+ :with-header="false"
|
|
|
+ size="75%"
|
|
|
+ :title="show.title" :visible.sync="show.open" >
|
|
|
+ <storeDetails ref="Details" @fresh="getList" @showClose="this.show.open = false"/>
|
|
|
+ </el-drawer>
|
|
|
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { audit,listStore, getStore, delStore, addStore, updateStore, exportStore } from "@/api/hisStore/store";
|
|
|
-import storeDetails from '../../components/his/storeDetails.vue';
|
|
|
+import { audit,listStore, exportStore } from "@/api/hisStore/store";
|
|
|
+import storeDetails from '../components/storeDetails.vue';
|
|
|
import {getCitys} from "@/api/store/city";
|
|
|
export default {
|
|
|
name: "adutstore",
|
|
@@ -165,14 +161,14 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
show:{
|
|
|
- title:"店铺详情",
|
|
|
- open:false,
|
|
|
- },
|
|
|
+ title:"店铺详情",
|
|
|
+ open:false,
|
|
|
+ },
|
|
|
|
|
|
citys:[],
|
|
|
licenseuploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
- uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
- baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
+ uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
|
|
|
+ baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
shippingTypeOptions: [{
|
|
|
"label": "配送",
|
|
|
"value": "1"
|
|
@@ -218,36 +214,38 @@ export default {
|
|
|
isAudit: 0,
|
|
|
account: null,
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
storeName: [
|
|
|
- { required: true, message: "店铺名称不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- logoUrl: [
|
|
|
- { required: true, message: "店铺LOGO不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- cityIds: [
|
|
|
- { required: true, message: "所属城市不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- address: [
|
|
|
- { required: true, message: "地址不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- licenseImages: [
|
|
|
- { required: true, message: "资质证书不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- shippingType: [
|
|
|
- { required: true, message: "配送方式不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- phone: [
|
|
|
- { required: true, message: "店铺电话不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
+ { required: true, message: "店铺名称不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ logoUrl: [
|
|
|
+ { required: true, message: "店铺LOGO不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ cityIds: [
|
|
|
+ { required: true, message: "所属城市不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ address: [
|
|
|
+ { required: true, message: "地址不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ licenseImages: [
|
|
|
+ { required: true, message: "资质证书不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ shippingType: [
|
|
|
+ { required: true, message: "配送方式不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ phone: [
|
|
|
+ { required: true, message: "店铺电话不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getCitys();
|
|
|
+ this.getCitys();
|
|
|
this.getList();
|
|
|
this.getDicts("sys_company_status").then(response => {
|
|
|
this.statusOptions = response.data;
|
|
@@ -257,88 +255,86 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
-
|
|
|
handleUpdate(row){
|
|
|
- var that=this;
|
|
|
- var the=null;
|
|
|
- this.$confirm('是否确认审核?', "审核", {
|
|
|
- distinguishCancelAndClose: true,
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "驳回",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- var data={
|
|
|
+ var that=this;
|
|
|
+ var the=null;
|
|
|
+ this.$confirm('是否确认审核?', "审核", {
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "驳回",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ var data={
|
|
|
storeId:row.storeId,
|
|
|
isAudit:1
|
|
|
- }
|
|
|
- return audit(data);
|
|
|
- }).then(() => {
|
|
|
- this.msgSuccess("操作成功");
|
|
|
- this.getList();
|
|
|
- }).catch(function(action) {
|
|
|
- if (action === 'cancel') {
|
|
|
- var data={
|
|
|
- storeId:row.storeId,
|
|
|
- isAudit:-1
|
|
|
- }
|
|
|
+ }
|
|
|
+ return audit(data);
|
|
|
+ }).then(() => {
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
+ this.getList();
|
|
|
+ }).catch(function(action) {
|
|
|
+ if (action === 'cancel') {
|
|
|
+ var data={
|
|
|
+ storeId:row.storeId,
|
|
|
+ isAudit:-1
|
|
|
+ }
|
|
|
the='cancel';
|
|
|
- return audit(data);
|
|
|
- }
|
|
|
- }).then(() => {
|
|
|
- if(the==='cancel'){
|
|
|
- this.msgSuccess("操作成功");
|
|
|
- this.getList();
|
|
|
- }
|
|
|
+ return audit(data);
|
|
|
+ }
|
|
|
+ }).then(() => {
|
|
|
+ if(the==='cancel'){
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
|
|
|
- });
|
|
|
-},
|
|
|
+ });
|
|
|
+ },
|
|
|
handledetails(row){
|
|
|
- this.show.open=true;
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.Details.getDetails(row.storeId);
|
|
|
- }, 1);
|
|
|
- },
|
|
|
+ this.show.open=true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.Details.getDetails(row.storeId);
|
|
|
+ }, 1);
|
|
|
+ },
|
|
|
|
|
|
handleCityChange(value) {
|
|
|
- var nodes=this.$refs.citySelect.getCheckedNodes();
|
|
|
- this.form.address=nodes[0].pathLabels[0]+nodes[0].pathLabels[1]+nodes[0].pathLabels[2];
|
|
|
- this.form.cityIds=value.toString();
|
|
|
- },
|
|
|
- getCitys(){
|
|
|
- getCitys().then(res => {
|
|
|
- this.loading = false;
|
|
|
- this.citys=res.data;
|
|
|
- })
|
|
|
- },
|
|
|
+ var nodes=this.$refs.citySelect.getCheckedNodes();
|
|
|
+ this.form.address=nodes[0].pathLabels[0]+nodes[0].pathLabels[1]+nodes[0].pathLabels[2];
|
|
|
+ this.form.cityIds=value.toString();
|
|
|
+ },
|
|
|
+ getCitys(){
|
|
|
+ getCitys().then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ this.citys=res.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
licensehandleAvatarSuccess(res, file) {
|
|
|
- if(res.code==200){
|
|
|
- this.form.licenseImages=res.url;
|
|
|
- this.$forceUpdate()
|
|
|
- }
|
|
|
- else{
|
|
|
- this.msgError(res.msg);
|
|
|
- }
|
|
|
+ if(res.code==200){
|
|
|
+ this.form.licenseImages=res.url;
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.msgError(res.msg);
|
|
|
+ }
|
|
|
},
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
- if(res.code==200){
|
|
|
- this.form.logoUrl=res.url;
|
|
|
- this.$forceUpdate()
|
|
|
- }
|
|
|
- else{
|
|
|
- this.msgError(res.msg);
|
|
|
- }
|
|
|
- },
|
|
|
+ if(res.code==200){
|
|
|
+ this.form.logoUrl=res.url;
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.msgError(res.msg);
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeAvatarUpload(file) {
|
|
|
- const isLt1M = file.size / 1024 / 1024 < 1;
|
|
|
- if (!isLt1M) {
|
|
|
- this.$message.error('上传图片大小不能超过 1MB!');
|
|
|
- }
|
|
|
- return isLt1M;
|
|
|
- },
|
|
|
+ const isLt1M = file.size / 1024 / 1024 < 1;
|
|
|
+ if (!isLt1M) {
|
|
|
+ this.$message.error('上传图片大小不能超过 1MB!');
|
|
|
+ }
|
|
|
+ return isLt1M;
|
|
|
+ },
|
|
|
handleClickX(){
|
|
|
- this.getList()
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 查询店铺管理列表 */
|
|
|
getList() {
|
|
@@ -403,39 +399,39 @@ export default {
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有店铺管理数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- return exportStore(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportStore(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => {});
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
|
|
|
- .avatar-uploader .el-upload {
|
|
|
- border: 1px dashed #d9d9d9;
|
|
|
- border-radius: 6px;
|
|
|
- cursor: pointer;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
- .avatar-uploader .el-upload:hover {
|
|
|
- border-color: #409EFF;
|
|
|
- }
|
|
|
+.avatar-uploader .el-upload {
|
|
|
+ border: 1px dashed #d9d9d9;
|
|
|
+ border-radius: 6px;
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.avatar-uploader .el-upload:hover {
|
|
|
+ border-color: #409EFF;
|
|
|
+}
|
|
|
|
|
|
- .avatar-uploader-icon {
|
|
|
- font-size: 28px;
|
|
|
- color: #8c939d;
|
|
|
- width: 150px;
|
|
|
- height: 150px;
|
|
|
- line-height: 150px;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
+.avatar-uploader-icon {
|
|
|
+ font-size: 28px;
|
|
|
+ color: #8c939d;
|
|
|
+ width: 150px;
|
|
|
+ height: 150px;
|
|
|
+ line-height: 150px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
</style>
|