|
@@ -19,16 +19,27 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
- <el-select v-model="queryParams.status" placeholder="状态" clearable style="width: 240px">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.status"
|
|
|
+ placeholder="状态"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
<el-option key="A" label="启用" value="A" />
|
|
|
<el-option key="N" label="禁用" value="N" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">
|
|
|
- 搜索
|
|
|
- </el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -36,9 +47,8 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['store:add']"
|
|
|
+ >新增店铺</el-button
|
|
|
>
|
|
|
- 新增店铺
|
|
|
- </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -56,9 +66,16 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="店铺名称" align="center" prop="name" />
|
|
|
- <el-table-column label="所属商户" align="center" prop="merchantName" width="160">
|
|
|
+ <el-table-column
|
|
|
+ label="所属商户"
|
|
|
+ align="center"
|
|
|
+ prop="merchantName"
|
|
|
+ width="160"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.merchantName ? scope.row.merchantName : '-' }}</span>
|
|
|
+ <span>{{
|
|
|
+ scope.row.merchantName ? scope.row.merchantName : "-"
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="默认店铺" align="center" prop="isDefault">
|
|
@@ -112,18 +129,21 @@
|
|
|
@click="handleQrCode(scope.row)"
|
|
|
>二维码</el-button
|
|
|
> -->
|
|
|
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
v-hasPermi="['store:add']"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
>
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -148,7 +168,11 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="店铺名称" prop="name">
|
|
|
- <el-input v-model="form.name" placeholder="请输入店铺名称" maxlength="30" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.name"
|
|
|
+ placeholder="请输入店铺名称"
|
|
|
+ maxlength="30"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -199,29 +223,59 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
+ <el-form-item label="选择货币" prop="currencyId">
|
|
|
+ <el-select v-model="form.currencyId" placeholder="请选择货币">
|
|
|
+ <el-option
|
|
|
+ v-for="item in currencyOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="联系人姓名" prop="contact">
|
|
|
- <el-input v-model="form.contact" placeholder="请输入联系人姓名" maxlength="30" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.contact"
|
|
|
+ placeholder="请输入联系人姓名"
|
|
|
+ maxlength="30"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="联系人电话" prop="phone">
|
|
|
- <el-input v-model="form.phone" placeholder="请输入联系人电话" maxlength="30" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.phone"
|
|
|
+ placeholder="请输入联系人电话"
|
|
|
+ maxlength="30"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="店铺详细地址" prop="address">
|
|
|
- <el-input v-model="form.address" placeholder="请输入店铺详细地址" maxlength="200" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.address"
|
|
|
+ placeholder="请输入店铺详细地址"
|
|
|
+ maxlength="200"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="营业时间" prop="hours">
|
|
|
- <el-input v-model="form.hours" placeholder="请输入店铺营业时间" maxlength="100" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.hours"
|
|
|
+ placeholder="请输入店铺营业时间"
|
|
|
+ maxlength="100"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -432,16 +486,24 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import FuintQrCode from '@/components/Fuint/QrCode'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import { getStoreList, updateStoreStatus, getStoreInfo, saveStore } from '@/api/store'
|
|
|
+import FuintQrCode from "@/components/Fuint/QrCode";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import {getCurrencyList} from '@/api/currency'
|
|
|
+import {
|
|
|
+ getStoreList,
|
|
|
+ updateStoreStatus,
|
|
|
+ getStoreInfo,
|
|
|
+ saveStore,
|
|
|
+} from "@/api/store";
|
|
|
export default {
|
|
|
- name: 'StoreList',
|
|
|
+ name: "StoreList",
|
|
|
components: {
|
|
|
- FuintQrCode
|
|
|
+ FuintQrCode,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //货币列表
|
|
|
+ currencyOptions:[],
|
|
|
// 二维码
|
|
|
qr: null,
|
|
|
// 二维码对话框
|
|
@@ -449,7 +511,7 @@ export default {
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 标题
|
|
|
- title: '',
|
|
|
+ title: "",
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
// 非多个禁用
|
|
@@ -465,105 +527,118 @@ export default {
|
|
|
// 日期范围
|
|
|
dateRange: [],
|
|
|
// 默认排序
|
|
|
- defaultSort: { prop: 'operTime', order: 'descending' },
|
|
|
+ defaultSort: { prop: "operTime", order: "descending" },
|
|
|
// 表单参数
|
|
|
form: {
|
|
|
- id: '',
|
|
|
- name: '',
|
|
|
- logo: '',
|
|
|
+ id: "",
|
|
|
+ name: "",
|
|
|
+ logo: "",
|
|
|
merchantId: this.$store.getters.merchantId,
|
|
|
- wxMchId: '',
|
|
|
- wxApiV2: '',
|
|
|
- wxCertPath: '',
|
|
|
- alipayAppId: '',
|
|
|
- alipayPrivateKey: '',
|
|
|
- alipayPublicKey: '',
|
|
|
- license: '',
|
|
|
- creditCode: '',
|
|
|
- bankName: '',
|
|
|
- bankCardName: '',
|
|
|
- bankCardNo: '',
|
|
|
- isDefault: 'N',
|
|
|
- status: 'A'
|
|
|
+ wxMchId: "",
|
|
|
+ wxApiV2: "",
|
|
|
+ wxCertPath: "",
|
|
|
+ alipayAppId: "",
|
|
|
+ alipayPrivateKey: "",
|
|
|
+ alipayPublicKey: "",
|
|
|
+ license: "",
|
|
|
+ creditCode: "",
|
|
|
+ bankName: "",
|
|
|
+ bankCardName: "",
|
|
|
+ bankCardNo: "",
|
|
|
+ isDefault: "N",
|
|
|
+ status: "A",
|
|
|
},
|
|
|
// 微信支付证书
|
|
|
- wxCertPath: '',
|
|
|
+ wxCertPath: "",
|
|
|
// 上传地址
|
|
|
- uploadAction: process.env.VUE_APP_SERVER_URL + '/backendApi/file/upload',
|
|
|
+ uploadAction: process.env.VUE_APP_SERVER_URL + "/backendApi/file/upload",
|
|
|
// 隐藏上传
|
|
|
hideUpload: false,
|
|
|
// 上传文件列表
|
|
|
uploadFiles: [],
|
|
|
- uploadHeader: { 'Access-Token': getToken() },
|
|
|
+ uploadHeader: { "Access-Token": getToken() },
|
|
|
merchantOptions: [],
|
|
|
// 图片根目录
|
|
|
- imagePath: '',
|
|
|
+ imagePath: "",
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
|
- name: '',
|
|
|
- status: ''
|
|
|
+ name: "",
|
|
|
+ status: "",
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
name: [
|
|
|
- { required: true, message: '店铺名称不能为空', trigger: 'blur' },
|
|
|
+ { required: true, message: "店铺名称不能为空", trigger: "blur" },
|
|
|
{
|
|
|
min: 2,
|
|
|
max: 30,
|
|
|
- message: '店铺名称长度必须介于 2 和 30 之间',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
+ message: "店铺名称长度必须介于 2 和 30 之间",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ merchantId: [
|
|
|
+ { required: true, message: "所属商户不能为空", trigger: "blur" },
|
|
|
],
|
|
|
- merchantId: [{ required: true, message: '所属商户不能为空', trigger: 'blur' }],
|
|
|
contact: [
|
|
|
- { required: true, message: '联系人姓名不能为空', trigger: 'blur' },
|
|
|
+ { required: true, message: "联系人姓名不能为空", trigger: "blur" },
|
|
|
{
|
|
|
min: 2,
|
|
|
max: 30,
|
|
|
- message: '联系人姓名长度必须介于 2 和 30 之间',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
+ message: "联系人姓名长度必须介于 2 和 30 之间",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
phone: [
|
|
|
- { required: true, message: '联系人电话不能为空', trigger: 'blur' },
|
|
|
+ { required: true, message: "联系人电话不能为空", trigger: "blur" },
|
|
|
{
|
|
|
min: 6,
|
|
|
max: 30,
|
|
|
- message: '联系人电话长度必须介于 6 和 30 之间',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
+ message: "联系人电话长度必须介于 6 和 30 之间",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ currencyId: [
|
|
|
+ { required: true, message: "货币不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询列表
|
|
|
getList() {
|
|
|
- this.loading = true
|
|
|
- getStoreList(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
|
|
- this.list = response.data.paginationResponse.content
|
|
|
- this.total = response.data.paginationResponse.totalElements
|
|
|
- this.merchantOptions = response.data.merchantList
|
|
|
- this.imagePath = response.data.imagePath
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ this.loading = true;
|
|
|
+ getStoreList(this.addDateRange(this.queryParams, this.dateRange)).then(
|
|
|
+ (response) => {
|
|
|
+ this.list = response.data.paginationResponse.content;
|
|
|
+ this.total = response.data.paginationResponse.totalElements;
|
|
|
+ this.merchantOptions = response.data.merchantList;
|
|
|
+ this.imagePath = response.data.imagePath;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ getCurrencyList(this.queryParams).then(
|
|
|
+ (response) => {
|
|
|
+ console.log('res;',response)
|
|
|
+ this.currencyOptions = response.data
|
|
|
+ }
|
|
|
+ );
|
|
|
},
|
|
|
// 搜索按钮操作
|
|
|
handleQuery() {
|
|
|
- this.queryParams.page = 1
|
|
|
- this.getList()
|
|
|
+ this.queryParams.page = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 重置按钮操作
|
|
|
resetQuery() {
|
|
|
- this.dateRange = []
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
|
|
- this.handleQuery()
|
|
|
+ this.dateRange = [];
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
|
|
+ this.handleQuery();
|
|
|
},
|
|
|
// 状态修改
|
|
|
handleStatusChange(row) {
|