前端相关界面完善 新增APP设备录入功能
This commit is contained in:
parent
f1e1078c21
commit
1091eebec7
|
@ -9,7 +9,7 @@
|
|||
|
||||
<user-dialog
|
||||
:show.sync="showDialog"
|
||||
@confirm="handleConfirm"
|
||||
@select="handleConfirm"
|
||||
:selectedIds="value"
|
||||
:multiple="multiple"
|
||||
:query="query"
|
||||
|
@ -63,6 +63,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleConfirm(selection) {
|
||||
console.log(selection)
|
||||
let value = null;
|
||||
let text = null;
|
||||
if (this.multiple) {
|
||||
|
@ -80,6 +81,7 @@ export default {
|
|||
this.$emit('input', value);
|
||||
this.$emit('update:text', text);
|
||||
this.$emit('confirm', selection);
|
||||
this.showDialog = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<image-preview :src="booth.picture" :width="80" :height="80"/>
|
||||
<div style="flex: 1;margin-left: 2em">
|
||||
<el-descriptions :column="3">
|
||||
<el-descriptions-item label="卡座编号">{{booth.boothNo | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="卡座名称">{{booth.boothName | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="卡座位置"><store-link :id="booth.storeId" :name="booth.storeName"/>/{{booth.partName | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="商户名称">{{booth.userName | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属商户"><user-link :id="booth.mchId" :text="booth.mchName"/></el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{booth.createTime | defaultValue}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="text-align: right; margin-top: 10px;">
|
||||
|
@ -54,6 +54,7 @@ import {listDevice} from "@/api/bst/device";
|
|||
import DeviceSelectDialog from "@/views/bst/device/components/DeviceSelectDialog.vue";
|
||||
import device from "@/views/bst/device/index.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
import UserLink from "@/views/system/user/UserLink.vue";
|
||||
|
||||
|
||||
export default {
|
||||
|
@ -66,7 +67,7 @@ export default {
|
|||
return views
|
||||
}
|
||||
},
|
||||
components: {StoreLink, DeviceSelectDialog, ChangeRecord, Order, Device, PlaceSearchMap },
|
||||
components: {UserLink, StoreLink, DeviceSelectDialog, ChangeRecord, Order, Device, PlaceSearchMap },
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
|
|
32
src/views/bst/booth/components/BoothLink.vue
Normal file
32
src/views/bst/booth/components/BoothLink.vue
Normal file
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<base-link :id="id" :text="text" :size="size" @click="handleClick" :permissions="['bst:booth:query']"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseLink from "@/components/BaseLink/index.vue";
|
||||
export default {
|
||||
name: 'BoothLink',
|
||||
components: {BaseLink},
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "small"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
if (this.id != null && this.checkPermi(['bst:booth:query'])) {
|
||||
this.$router.push(`/view/booth/${this.id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -6,7 +6,7 @@
|
|||
v-model="queryParams.storeName"
|
||||
placeholder="请输入所属店铺"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属分区" prop="partName">
|
||||
|
@ -14,16 +14,15 @@
|
|||
v-model="queryParams.partName"
|
||||
placeholder="请输入所属分区"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="卡座编号" prop="boothNo">
|
||||
<el-form-item label="卡座名称" prop="boothName">
|
||||
<el-input
|
||||
v-model="queryParams.boothNo"
|
||||
placeholder="请输入卡座编号"
|
||||
v-model="queryParams.boothName"
|
||||
placeholder="请输入卡座名称"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
@ -69,25 +68,32 @@
|
|||
|
||||
<el-table v-loading="loading" :data="boothList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="25" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="boothId" width="60"/>
|
||||
<el-table-column label="卡座编号" align="center" prop="boothNo" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.boothNo }}</span>
|
||||
|
||||
<booth-sn
|
||||
:sn="scope.row.boothNo"
|
||||
style="margin-left: 8px; vertical-align: middle"
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-picture"
|
||||
size="mini"
|
||||
class="qrcode-btn"
|
||||
>卡座二维码</el-button>
|
||||
</booth-sn>
|
||||
</template>
|
||||
<el-table-column label="ID" align="center" prop="boothId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.boothId }}</span>
|
||||
<booth-sn
|
||||
:sn="scope.row.boothId"
|
||||
style="margin-left: 8px; vertical-align: middle"
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-picture"
|
||||
size="mini"
|
||||
class="qrcode-btn"
|
||||
>卡座二维码</el-button>
|
||||
</booth-sn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="卡座名称" align="center" prop="boothName">
|
||||
<template slot-scope="{row}">
|
||||
<i class="el-icon-takeaway-box"/>
|
||||
<booth-link
|
||||
:id="row.boothId"
|
||||
:text="row.boothName"
|
||||
size="mini"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所属" align="center" prop="partName" >
|
||||
<template slot-scope="{row}">
|
||||
<div v-if="row.storeName != null">
|
||||
|
@ -114,6 +120,14 @@
|
|||
@click="handleSee(scope.row)"
|
||||
v-has-permi="['bst:booth:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus"
|
||||
type="text"
|
||||
@click="handleBindDevice(scope.row)"
|
||||
:loading="bindLoading">
|
||||
增加设备
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -140,6 +154,13 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<device-select-dialog
|
||||
:visible.sync="deviceDialogVisible"
|
||||
:loading="deviceLoading"
|
||||
:device-list="deviceList"
|
||||
@confirm="handleDeviceConfirm"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改卡座对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
|
@ -161,8 +182,8 @@
|
|||
</template>
|
||||
</el-cascader>
|
||||
</form-col>
|
||||
<form-col :span="span" label="卡座编号" prop="boothNo">
|
||||
<el-input v-model="form.boothNo" placeholder="请输入卡座编号" />
|
||||
<form-col :span="span" label="卡座名称" prop="boothName">
|
||||
<el-input v-model="form.boothName" placeholder="请输入卡座名称" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="卡座图片" prop="picture">
|
||||
<image-upload v-model="form.picture" type="textarea" placeholder="请输入内容" />
|
||||
|
@ -181,7 +202,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listBooth, getBooth, delBooth, addBooth, updateBooth } from "@/api/bst/booth";
|
||||
import {listBooth, getBooth, delBooth, addBooth, updateBooth, bindBooth} from "@/api/bst/booth";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import {listStore} from "@/api/bst/store";
|
||||
|
@ -189,6 +210,9 @@ import {listPart} from "@/api/bst/part";
|
|||
import DeviceSn from "@/views/bst/device/components/DeviceSn.vue";
|
||||
import BoothSn from "@/views/bst/booth/components/BoothSn.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
import BoothLink from "@/views/bst/booth/components/BoothLink.vue";
|
||||
import {listDevice} from "@/api/bst/device";
|
||||
import DeviceSelectDialog from "@/views/bst/device/components/DeviceSelectDialog.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -199,10 +223,16 @@ const defaultSort = {
|
|||
export default {
|
||||
name: "Booth",
|
||||
mixins: [$showColumns],
|
||||
components: {StoreLink, BoothSn, DeviceSn, FormCol},
|
||||
components: {DeviceSelectDialog, BoothLink, StoreLink, BoothSn, DeviceSn, FormCol},
|
||||
data() {
|
||||
return {
|
||||
currentBooth: null, // 当前操作的卡座
|
||||
selectedDevice: null, // 选中的设备
|
||||
bindLoading: false,
|
||||
parentOptions: [], // 父区域树数据
|
||||
deviceDialogVisible: false,
|
||||
deviceList: [],
|
||||
deviceLoading: false,
|
||||
cascaderProps: {
|
||||
value: 'partId',
|
||||
children: 'children',
|
||||
|
@ -272,6 +302,39 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
handleDeviceConfirm(device) {
|
||||
this.selectedDevice = device
|
||||
this.bindDeviceToBooth();
|
||||
},
|
||||
async bindDeviceToBooth() {
|
||||
if (!this.selectedDevice || !this.currentBooth) return;
|
||||
|
||||
try {
|
||||
this.bindLoading = true;
|
||||
await bindBooth(this.selectedDevice,this.currentBooth.boothId);
|
||||
this.$modal.msgSuccess("设备绑定成功");
|
||||
this.deviceDialogVisible = false;
|
||||
this.getList(); // 刷新列表
|
||||
} catch (error) {
|
||||
this.$modal.msgError("设备绑定失败");
|
||||
} finally {
|
||||
this.bindLoading = false;
|
||||
}
|
||||
},
|
||||
|
||||
async handleBindDevice(row) {
|
||||
try {
|
||||
this.currentBooth = row; // 保存当前卡座
|
||||
this.deviceLoading = true;
|
||||
const res = await listDevice({ userId: row.mchId, isUnbound: true });
|
||||
this.deviceList = res.rows;
|
||||
this.deviceDialogVisible = true;
|
||||
} catch (error) {
|
||||
this.$modal.msgError("加载设备失败");
|
||||
} finally {
|
||||
this.deviceLoading = false;
|
||||
}
|
||||
},
|
||||
handleSee(row) {
|
||||
this.$router.push({path: `/view/booth/${row.boothId}`})
|
||||
},
|
||||
|
|
|
@ -1,61 +1,31 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-form-item label="用户名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户id"
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺id" prop="storeId">
|
||||
<el-form-item label="店铺名称" prop="storeId">
|
||||
<el-input
|
||||
v-model="queryParams.storeId"
|
||||
placeholder="请输入店铺id"
|
||||
v-model="queryParams.storeName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动次数" prop="number">
|
||||
<el-input
|
||||
v-model="queryParams.number"
|
||||
placeholder="请输入变动次数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动前次数" prop="beforeNum">
|
||||
<el-input
|
||||
v-model="queryParams.beforeNum"
|
||||
placeholder="请输入变动前次数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动后次数" prop="afterNum">
|
||||
<el-input
|
||||
v-model="queryParams.afterNum"
|
||||
placeholder="请输入变动后次数"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务ID" prop="bstId">
|
||||
<el-input
|
||||
v-model="queryParams.bstId"
|
||||
placeholder="请输入业务ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="原因" prop="reason">
|
||||
<el-input
|
||||
v-model="queryParams.reason"
|
||||
placeholder="请输入原因"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="类型" prop="bstType">
|
||||
<el-select v-model="queryParams.bstType" placeholder="请选择变化类型" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.lighting_num_change_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
@ -122,6 +92,11 @@
|
|||
<user-link :id="d.row.userId" :text="d.row.userName" size="mini"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'bstType'">
|
||||
<div v-if="d.row.bstType != null">
|
||||
<dict-tag :value="d.row.bstType" :options="dict.type.lighting_num_change_type"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'storeName'">
|
||||
<div v-if="d.row.storeName != null">
|
||||
<i class="el-icon-takeaway-box"/>
|
||||
|
@ -180,6 +155,7 @@ const defaultSort = {
|
|||
export default {
|
||||
name: "ChangeRecord",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['lighting_num_change_type'],
|
||||
components: {StoreLink, UserLink, FormCol},
|
||||
props: {
|
||||
query: {
|
||||
|
@ -192,10 +168,11 @@ export default {
|
|||
span: 24,
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'recordId', visible: true, label: '记录', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'recordId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'userName', visible: true, label: '用户名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'storeName', visible: true, label: '店铺名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'number', visible: true, label: '当前次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bstType', visible: true, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'number', visible: true, label: '变动次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'beforeNum', visible: true, label: '变动前次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'reason', visible: true, label: '原因', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'afterNum', visible: true, label: '变动后次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<i class="el-icon-monitor"></i>
|
||||
<div class="device-name">
|
||||
{{ deviceData.deviceName | dv }}
|
||||
<el-link type="primary" icon="el-icon-edit" @click="handleEditDevice"></el-link>
|
||||
<el-link type="primary" v-if="isSysAdmin()" icon="el-icon-edit" @click="handleEditDevice"></el-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -198,8 +198,10 @@
|
|||
</el-descriptions>
|
||||
<template>
|
||||
<el-row type="flex">
|
||||
<el-button size="small" plain icon="el-icon-link" type="danger" @click="handleUnbind" v-if="deviceData.userId != null">解绑商户</el-button>
|
||||
<bind-mch-button v-else :deviceId="deviceData.deviceId" :deviceNo="deviceData.deviceNo" @success="getDevice" style="margin-left: 0.5em"/>
|
||||
<template v-if="isSysAdmin()">
|
||||
<el-button size="small" plain icon="el-icon-link" type="danger" @click="handleUnbind" v-if="deviceData.userId != null">解绑商户</el-button>
|
||||
<bind-mch-button v-else :deviceId="deviceData.deviceId" :deviceNo="deviceData.deviceNo" @success="getDevice" style="margin-left: 0.5em"/>
|
||||
</template>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-card>
|
||||
|
@ -252,6 +254,7 @@ import CommandLog from "@/views/bst/commandLog/index.vue";
|
|||
import BindRecord from "@/views/bst/bindRecord/index.vue";
|
||||
import DeviceEditDialog from "@/views/bst/device/components/DeviceEditDialog.vue";
|
||||
import BindMchButton from "@/views/bst/device/components/BindMchButton.vue";
|
||||
import {isSysAdmin} from "@/utils/permission";
|
||||
|
||||
export default {
|
||||
name: 'DeviceView',
|
||||
|
@ -363,6 +366,7 @@ export default {
|
|||
clearInterval(this.timer);
|
||||
},
|
||||
methods: {
|
||||
isSysAdmin,
|
||||
// 反转设备
|
||||
handleReverse(reverse) {
|
||||
this.$confirm(`是否确认${reverse ? '反转' : '正转'}设备?`, '警告', {
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="SN" prop="deviceNo">
|
||||
<el-input
|
||||
v-model="queryParams.deviceNo"
|
||||
placeholder="请输入设备SN码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Mac号" prop="mac">
|
||||
<el-input
|
||||
v-model="queryParams.mac"
|
||||
|
@ -97,7 +105,12 @@
|
|||
</template>
|
||||
<el-table-column label="设备名称" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deviceName }}</span>
|
||||
<i class="el-icon-s-opportunity"/>
|
||||
<device-link
|
||||
:id="scope.row.deviceId"
|
||||
:text="scope.row.deviceName"
|
||||
size="mini"
|
||||
/>
|
||||
<device-sn
|
||||
:sn="scope.row.deviceNo"
|
||||
style="margin-left: 8px; vertical-align: middle"
|
||||
|
@ -109,6 +122,7 @@
|
|||
class="qrcode-btn"
|
||||
>设备二维码</el-button>
|
||||
</device-sn>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" align="center" prop="modelName" />
|
||||
|
@ -131,7 +145,16 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备所绑用户" align="center" prop="userName" />
|
||||
<el-table-column label="设备所绑用户" align="center" prop="userName" >
|
||||
<template slot-scope="{row}">
|
||||
<i class="el-icon-user"/>
|
||||
<user-link
|
||||
:id="row.userId"
|
||||
:text="row.userName"
|
||||
size="mini"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="归属店铺" align="center" prop="storeName" >
|
||||
<template slot-scope="{row}">
|
||||
<div v-if="row.storeName != null">
|
||||
|
@ -145,7 +168,18 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后在线时间" align="center" prop="lastOnlineTime" />
|
||||
<el-table-column label="卡座编号" align="center" prop="position" />
|
||||
<el-table-column label="卡座名称" align="center" prop="position" >
|
||||
<template slot-scope="{row}">
|
||||
<div v-if="row.position != null">
|
||||
<i class="el-icon-takeaway-box"/>
|
||||
<booth-link
|
||||
:id="row.boothId"
|
||||
:text="row.position"
|
||||
size="mini"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -229,6 +263,9 @@ import StoreLink from "@/views/bst/store/StoreLink.vue";
|
|||
import ChangeStoreDialog from "@/views/bst/device/components/DeviceChangeStoreDialog.vue";
|
||||
import {unbindBooth} from "@/api/bst/booth";
|
||||
import {unbindStore} from "@/api/bst/store";
|
||||
import BoothLink from "@/views/bst/booth/components/BoothLink.vue";
|
||||
import UserLink from "@/views/system/user/UserLink.vue";
|
||||
import DeviceLink from "@/components/Business/Device/DeviceLink.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -246,7 +283,7 @@ export default {
|
|||
default: () => ({})
|
||||
}
|
||||
},
|
||||
components: {ChangeStoreDialog, StoreLink, DeviceEditDialog, DeviceSn, FormCol},
|
||||
components: {DeviceLink, UserLink, BoothLink, ChangeStoreDialog, StoreLink, DeviceEditDialog, DeviceSn, FormCol},
|
||||
data() {
|
||||
return {
|
||||
// 是否展示编辑弹窗
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-form-item label="手机号" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户手机号"
|
||||
clearable
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="nickName">
|
||||
<el-input
|
||||
v-model="queryParams.nickName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺名" prop="storeName">
|
||||
|
@ -14,7 +22,7 @@
|
|||
v-model="queryParams.storeName"
|
||||
placeholder="请输入店铺名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
@ -60,6 +68,7 @@
|
|||
<i class="el-icon-user"/>
|
||||
<user-link :id="d.row.userId" :text="d.row.nickName" size="mini"/>
|
||||
<br/>
|
||||
<i class="el-icon-phone"/>
|
||||
<user-link :id="d.row.userId" :text="d.row.userName" size="mini"/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -82,7 +91,7 @@
|
|||
icon="el-icon-present"
|
||||
size="mini"
|
||||
@click="handleOpenGift(scope.row)"
|
||||
v-has-permi="['bst:lightingNum:give']"
|
||||
v-has-permi="['bst:lightingNum:gift']"
|
||||
>赠送次数</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
|
@ -284,7 +293,7 @@ export default {
|
|||
|
||||
submitGift() {
|
||||
this.$refs.formGift.validate(valid => {
|
||||
if (valid) {giftLightingNum
|
||||
if (valid) {
|
||||
giftLightingNum({
|
||||
userId: this.form.userId,
|
||||
storeId: this.form.storeId,
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<el-form-item label="所属店铺" prop="storeName">
|
||||
<el-input
|
||||
v-model="queryParams.storeName"
|
||||
placeholder="请输入所属域名称"
|
||||
placeholder="请输入所属店铺名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="parentName">
|
||||
<el-input
|
||||
v-model="queryParams.parentName"
|
||||
placeholder="请输入所属域名称"
|
||||
placeholder="请输入所属区域名称(楼层)"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域名称" prop="partName">
|
||||
|
@ -22,7 +22,7 @@
|
|||
v-model="queryParams.partName"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
|
@ -9,14 +9,6 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道单号" prop="channelNo">
|
||||
<el-input
|
||||
v-model="queryParams.channelNo"
|
||||
placeholder="请输入渠道支付单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择支付状态" clearable @change="handleQuery">
|
||||
<el-option
|
||||
|
@ -177,7 +169,6 @@ export default {
|
|||
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
{key: 'description', visible: true, label: '描述', minWidth: "250", sortable: true, overflow: false, align: 'left', width: null},
|
||||
{key: 'no', visible: true, label: '支付单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'channelNo', visible: true, label: '渠道单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'amount', visible: true, label: '金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'refunding', visible: true, label: '退款中', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'refunded', visible: true, label: '已退款', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
v-model="queryParams.storeName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="userName">
|
||||
<el-form-item label="商户名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入联系人"
|
||||
placeholder="请输入商户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
|
@ -22,7 +22,7 @@
|
|||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
|
@ -30,7 +30,7 @@
|
|||
v-model="queryParams.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
@ -148,8 +148,11 @@
|
|||
<form-col :span="span" label="店铺名称" prop="storeName">
|
||||
<el-input v-model="form.storeName" placeholder="请输入店铺名称" />
|
||||
</form-col>
|
||||
<form-col label="所属用户" prop="userId" :span="span">
|
||||
<user-input v-model="form.userId" :text.sync="form.userName" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="联系人" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入联系人" />
|
||||
<el-input v-model="form.userName" placeholder="请输入店铺联系人姓名" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
||||
|
@ -228,6 +231,7 @@ import { $showColumns } from '@/utils/mixins';
|
|||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import PlaceSearchDialog from "@/components/Map/PlaceSearch/PlaceSearchDialog.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
import UserInput from "@/components/Business/User/UserInput.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -244,7 +248,7 @@ export default {
|
|||
default: () => ({})
|
||||
}
|
||||
},
|
||||
components: {StoreLink, PlaceSearchDialog, FormCol},
|
||||
components: {UserInput, StoreLink, PlaceSearchDialog, FormCol},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
|
@ -301,6 +305,9 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userId: [
|
||||
{ required: true, message: "所属用户不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
|
|
|
@ -52,7 +52,16 @@
|
|||
|
||||
<el-table v-loading="loading" :data="suitList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="店铺名称" align="center" prop="storeName"/>
|
||||
<el-table-column label="店铺名称" align="center" prop="storeName">
|
||||
<template slot-scope="{row}">
|
||||
<i class="el-icon-takeaway-box"/>
|
||||
<store-link
|
||||
:id="row.storeId"
|
||||
:name="row.storeName"
|
||||
size="mini"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值金额" align="center" prop="rechargeAmount"/>
|
||||
<el-table-column label="爆灯次数" align="center" prop="lightingNums"/>
|
||||
<el-table-column label="套餐状态" align="center" prop="status">
|
||||
|
@ -158,6 +167,9 @@ import { listSuit, getSuit, delSuit, addSuit, updateSuit } from "@/api/bst/suit"
|
|||
import { $showColumns } from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import {listStore} from "@/api/bst/store";
|
||||
import UserLink from "@/views/system/user/UserLink.vue";
|
||||
import Store from "@/views/bst/store/index.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -175,7 +187,7 @@ export default {
|
|||
default: () => ({})
|
||||
}
|
||||
},
|
||||
components: {FormCol},
|
||||
components: {StoreLink, Store, UserLink, FormCol},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
|
|
Loading…
Reference in New Issue
Block a user