文字替换

This commit is contained in:
墨大叔 2024-08-29 15:28:50 +08:00
parent 1ee4de0760
commit 6c4005840d
30 changed files with 385 additions and 166 deletions

View File

@ -25,6 +25,23 @@ export function getConfigKey(configKey) {
})
}
// 根据参数键名查询参数值
export function getConfigKeys(configKeys) {
return request({
url: '/system/config/configKeys/' + configKeys,
method: 'get'
})
}
// 批量更新参数值
export function batchUpdateConfigValue(data) {
return request({
url: '/system/config/batchUpdateValue',
method: 'put',
data
})
}
// 新增参数配置
export function addConfig(data) {
return request({

View File

@ -0,0 +1,45 @@
<template>
<el-dialog :title="title" :visible="show" :width="width">
<config-form ref="form" :keys="keys" @success="cancel" @cancel="cancel"/>
<template #footer>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</template>
</el-dialog>
</template>
<script>
import ConfigForm from '@/components/Business/Config/ConfigForm.vue'
export default {
name: "ConfigDialog",
components: { ConfigForm },
props: {
title: {
type: String,
default: "配置",
},
show: {
type: Boolean,
default: false,
},
width: {
type: String,
default: "500px"
},
keys: {
type: Array,
default: () => {
return []
}
}
},
methods: {
cancel() {
this.$emit("update:show", false);
},
submitForm() {
this.$refs.form.onSubmit();
}
}
}
</script>

View File

@ -0,0 +1,61 @@
<template>
<el-form ref="form" label-width="120px">
<el-form-item v-for="item of list" :label="item.configName" :label-width="`${item.configName.length + 1}em`" :key="item.configId">
<el-input v-model="item.configValue" placeholder="请输入"/>
</el-form-item>
</el-form>
</template>
<script>
import { batchUpdateConfigValue, getConfigKeys } from '@/api/system/config'
export default {
name: 'ConfigForm',
props: {
keys: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
list: [],
loading: false,
}
},
created() {
this.getList()
},
methods: {
getList() {
this.loading = true;
getConfigKeys(this.keys).then(res => {
let data = res.data;
let list = [];
for (let i = 0; i < this.keys.length; i ++) {
let config = data.find(item => item.configKey === this.keys[i]);
if (config != null) {
list.push(config);
}
}
this.list = list;
}).finally(() => {
this.loading = false;
})
},
onSubmit() {
batchUpdateConfigValue(this.list).then(res => {
if (res.code === 200) {
this.$message.success('修改成功')
this.$emit('success');
}
})
},
onCancel() {
this.$emit('cancel');
}
}
}
</script>

View File

@ -5,8 +5,8 @@
<el-dialog :title="title" :visible="show" width="60%" top="2vh" @open="open" @close="close"
:append-to-body="true">
<el-form size="small" :inline="true" label-width="8em" @submit.prevent.native="onSearch">
<el-form-item label="经营场所名称:">
<el-input v-model="searchForm.name" clearable placeholder="请输入经营场所名称" @keyup.native.enter="onSearch"/>
<el-form-item :label="`${FieldName.STORE}名称`">
<el-input v-model="searchForm.name" clearable :placeholder="`请输入${FieldName.STORE}名称`" @keyup.native.enter="onSearch"/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch()" icon="el-icon-search">搜索</el-button>
@ -25,13 +25,13 @@
>
<el-table-column align="center" type="selection" v-if="multiple"></el-table-column>
<el-table-column label="#" type="index" align="center"></el-table-column>
<el-table-column label="经营场所图片" align="center" prop="picture" width="100">
<el-table-column label="图片" align="center" prop="picture" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.picture" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="经营场所名称" align="center" prop="name" width="200"></el-table-column>
<el-table-column label="经营场所地址" align="center">
<el-table-column label="名称" align="center" prop="name" width="200"></el-table-column>
<el-table-column label="地址" align="center">
<template slot-scope="d">
{{d.row.province}}{{d.row.city}}{{d.row.county}}{{d.row.address}}
</template>
@ -53,7 +53,7 @@
import {clone} from "@/utils";
import { listStore } from '@/api/ss/store'
import { mapGetters } from 'vuex'
import { UserType } from '@/utils/constants'
import { FieldName, UserType } from '@/utils/constants'
import { mchListStore } from '@/api/mch/store'
export default {
@ -62,7 +62,7 @@ export default {
//
title: {
type: String,
default: '选择经营场所'
default: `选择${FieldName.STORE}`
},
value: {
type: [String, Number, Array],
@ -100,6 +100,9 @@ export default {
}
},
computed: {
FieldName() {
return FieldName
},
...mapGetters(['userType'])
},
methods: {

View File

@ -43,7 +43,7 @@ import {isDeepEqual} from "@/utils";
import StoreDialog from '@/components/Business/Store/StoreDialog.vue'
import { listStoreByIds } from '@/api/ss/store'
import { mapGetters } from 'vuex'
import { UserType } from '@/utils/constants'
import { FieldName, UserType } from '@/utils/constants'
import { mchListStoreByIds } from '@/api/mch/store'
export default {
@ -53,11 +53,11 @@ export default {
//
title: {
type: String,
default: "选择经营场所"
default: `选择${FieldName.STORE}`
},
placeholder: {
type: String,
default: "点击选择经营场所",
default: `点击选择${FieldName.STORE}`,
},
//
showProp: {

View File

@ -1,6 +1,14 @@
// 视图
import { exp } from 'qrcode/lib/core/galois-field'
// 字段名称
export const FieldName = {
AGENT: "合作伙伴",
BIZ: "渠道商",
INVESTOR: "创业者",
STORE: "经营场所",
USER: "用户",
}
// 视图
export const views = {
user: 'user', // 用户
device: 'device', // 设备

View File

@ -7,7 +7,7 @@
</div>
<div class="unit"></div>
</div>
<div class="todo-item" @click="$router.push('/mch/mchApply?status=0')">
<div class="todo-item" @click="$router.push('/complaint/mchApply?status=0')">
<div class="label"><svg-icon icon-class="apply"/> 商家合作申请</div>
<div class="value">
<count-to :start-val="0" :end-val="data.mchApplyCount" :duration="3000"/>
@ -15,7 +15,7 @@
<div class="unit"></div>
</div>
<div class="todo-item" @click="$router.push('/mch/storeApply?status=1')">
<div class="label"><svg-icon icon-class="store"/> 经营场所审核</div>
<div class="label"><svg-icon icon-class="store"/> {{FieldName.STORE}}审核</div>
<div class="value">
<count-to :start-val="0" :end-val="data.storeApplyCount" :duration="3000"/>
</div>
@ -48,9 +48,15 @@
<script>
import CountTo from 'vue-count-to'
import { getTodoList } from '@/api/system/dashboard'
import { FieldName } from '../../../utils/constants'
export default {
name: 'TodoList',
computed: {
FieldName() {
return FieldName
}
},
components: {
CountTo
},

View File

@ -18,7 +18,7 @@
</el-popover>
</template>
<el-descriptions-item label="设备名称">{{deviceData.deviceName | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="经营场所名称">
<el-descriptions-item :label="FieldName.STORE">
<store-link :name="deviceData.storeName" :id="deviceData.storeId"/>
</el-descriptions-item>
<el-descriptions-item label="服务费">
@ -139,7 +139,7 @@ import {
import { mapGetters } from 'vuex'
import MchSuit from '@/views/mch/suit/index.vue'
import MchRecharge from '@/views/mch/recharge/index.vue'
import { views } from '@/utils/constants'
import { FieldName, views } from '@/utils/constants'
export default {
name: 'MyDeviceDetail',
@ -173,6 +173,9 @@ export default {
}
},
computed: {
FieldName() {
return FieldName
},
views() {
return views
},

View File

@ -33,10 +33,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="经营场所名称" prop="storeName">
<el-form-item :label="FieldName.STORE" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入经营场所名称"
:placeholder="`请输入${FieldName.STORE}名称`"
clearable
@keyup.enter.native="handleQuery"
/>
@ -84,7 +84,7 @@
<el-table-column label="设备Mac" align="center" prop="mac" min-width="100">
<device-link slot-scope="d" :text="d.row.mac" :id="d.row.deviceId"/>
</el-table-column>
<el-table-column label="所属经营场所" align="center" prop="storeName" >
<el-table-column :label="FieldName.STORE" align="center" prop="storeName" >
<store-link slot-scope="d" :id="d.row.storeId" :name="d.row.storeName"/>
</el-table-column>
<el-table-column label="图片" align="center" prop="picture" width="100">
@ -174,7 +174,7 @@
<form-col :span="span" label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</form-col>
<form-col :span="span" label="所属经营场所" prop="storeId">
<form-col :span="span" :label="FieldName.STORE" prop="storeId">
<store-input v-model="form.storeId" />
</form-col>
<form-col :span="span * 2" label="备注" prop="remark">
@ -250,6 +250,7 @@ import StoreLink from '@/components/Business/Store/StoreLink.vue'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import { $serviceType } from '@/utils/mixins'
import { mchGetDevice, mchListDevice, mchUnbindDevice, mchUpdateDevice } from '@/api/mch/device'
import { FieldName } from '@/utils/constants'
export default {
name: "MyDevice",
@ -316,6 +317,9 @@ export default {
};
},
computed: {
FieldName() {
return FieldName
},
isEdit() {
return this.title === "修改设备";
},

View File

@ -3,7 +3,7 @@
<el-avatar :src="avatar" :size="64" style="margin:2em auto;"/>
<el-row type="flex" style="margin-bottom: 1em">
<el-statistic title="设备数" :value="user.deviceCount" suffix="台"/>
<el-statistic title="经营场所数" :value="user.storeCount" suffix="家"/>
<el-statistic :title="FieldName.STORE" :value="user.storeCount" suffix="家"/>
</el-row>
<el-row type="flex" style="margin-bottom: 1em">
<el-statistic title="总收入" :value="user.totalIncome" :precision="2" suffix="元"/>
@ -36,6 +36,7 @@ import { mapGetters } from 'vuex'
import { appGetUserInfo } from '@/api/app/user'
import { $serviceType, $withdrawServiceType } from '@/utils/mixins'
import LineField from '@/components/LineField/index.vue'
import { FieldName } from '@/utils/constants'
export default {
name: "MchUserProfile",
@ -49,6 +50,9 @@ export default {
}
},
computed: {
FieldName() {
return FieldName
},
...mapGetters(['avatar'])
},
created() {

View File

@ -47,8 +47,8 @@
<el-descriptions title="收款方信息">
<el-descriptions-item label="收款人">{{detail.mchName | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="收款人手机号">{{detail.mchMobile | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="经营场所名称">{{detail.storeName | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="经营场所地址">{{detail.storeAddress | defaultValue}}</el-descriptions-item>
<el-descriptions-item :label="FieldName.STORE">{{detail.storeName | defaultValue}}</el-descriptions-item>
<el-descriptions-item :label="`${FieldName.STORE}地址`">{{detail.storeAddress | defaultValue}}</el-descriptions-item>
</el-descriptions>
</el-card>
@ -74,12 +74,16 @@ import { findLabel } from '@/utils'
import { mchGetBill } from '@/api/mch/bill'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import MchRefund from '@/views/mch/refund/index.vue'
import { FieldName } from '@/utils/constants'
export default {
name: 'MchRechargeDetail',
components: { MchRefund, DeviceLink },
dicts: ['channel_type','sm_transaction_bill_status', 'sm_transaction_bill_device_recharge_status', 'time_unit'],
computed: {
FieldName() {
return FieldName
},
//
suitTimeUnit() {
return (unit) => {

View File

@ -1,15 +1,15 @@
<template>
<div class="app-container" v-loading="loading">
<el-card class="box-card" header="经营场所详情">
<el-card class="box-card" header="详细信息">
<el-row type="flex">
<image-preview :src="store.picture" :width="80" :height="80"/>
<div style="flex: 1;margin-left: 2em">
<el-descriptions :column="3">
<el-descriptions-item label="经营场所名称">{{store.name | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="经营场所类型">
<el-descriptions-item label="名称">{{store.name | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="类型">
<dict-tag :value="store.type" :options="dict.type.ss_store_type" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="经营场所状态">
<el-descriptions-item label="状态">
<dict-tag :value="store.status" :options="dict.type.store_status" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="是否生效">
@ -20,7 +20,7 @@
{{store.businessTimeStart | defaultValue}} {{store.businessTimeEnd | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{store.contactName | defaultValue}}({{store.contactMobile | defaultValue}})</el-descriptions-item>
<el-descriptions-item label="经营场所地址" :span="2">
<el-descriptions-item label="地址" :span="2">
{{store.province}}{{store.city}}{{store.county}}{{store.address}}
</el-descriptions-item>
</el-descriptions>
@ -101,7 +101,7 @@
<el-tab-pane label="订单列表" :lazy="true">
<mch-recharge :query="{storeId: store.storeId}" :view="views.store"/>
</el-tab-pane>
<el-tab-pane label="经营场所变更记录" :lazy="true">
<el-tab-pane label="变更记录" :lazy="true">
<mch-store-apply :query="{storeId: store.storeId}" :view="views.store"/>
</el-tab-pane>
</el-tabs>

View File

@ -1,16 +1,16 @@
<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="name">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入经营场所名称"
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-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @change="handleQuery">
<el-option
v-for="dict in dict.type.store_status"
:key="dict.value"
@ -55,15 +55,15 @@
<el-table v-loading="loading" :data="storeList" @selection-change="handleSelectionChange">
<el-table-column type="index" width="55" align="center" label="#" />
<el-table-column label="经营场所名称" align="center" prop="name" min-width="100">
<el-table-column label="名称" align="center" prop="name" min-width="100">
<store-link slot-scope="d" :id="d.row.storeId" :name="d.row.name"/>
</el-table-column>
<el-table-column label="经营场所类型" align="center" prop="type" width="100">
<el-table-column label="类型" align="center" prop="type" width="100">
<template slot-scope="scope">
<dict-tag :value="scope.row.type" :options="dict.type.ss_store_type"/>
</template>
</el-table-column>
<el-table-column label="经营场所图片" align="center" prop="picture" width="100">
<el-table-column label="图片" align="center" prop="picture" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.picture" :width="50" :height="50"/>
</template>
@ -134,13 +134,13 @@
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row :gutter="8">
<form-col label="经营场所图片" prop="picture" :span="span * 2">
<form-col label="图片" prop="picture" :span="span * 2">
<image-upload v-model="form.picture" :limit="9"/>
</form-col>
<form-col label="经营场所名称" prop="name" :span="span">
<form-col label="名称" prop="name" :span="span">
<el-input v-model="form.name" placeholder="请输入经营场所名称" />
</form-col>
<form-col label="经营场所类型" prop="type" :span="span">
<form-col label="类型" prop="type" :span="span">
<el-select v-model="form.type" placeholder="请选择经营场所类型" style="width: 100%">
<el-option
v-for="opt of dict.type.ss_store_type"
@ -168,7 +168,7 @@
<el-switch v-model="form.show"/>
</form-col>
<form-col label="定位地址" prop="address" :span="span * 2">
<el-input v-model="form.address" placeholder="请输入经营场所地址">
<el-input v-model="form.address" placeholder="请输入地址">
<template #prepend>
<div>
{{form.province}}{{form.city}}{{form.county}}
@ -266,13 +266,13 @@ export default {
{ required: true, message: "用户不能为空", trigger: "change" }
],
name: [
{ required: true, message: "经营场所名称不能为空", trigger: "change" }
{ required: true, message: "名称不能为空", trigger: "change" }
],
address: [
{ required: true, message: "定位地址不能为空", trigger: "change" }
],
type: [
{ required: true, message: "经营场所类型不能为空", trigger: "change" }
{ required: true, message: "类型不能为空", trigger: "change" }
],
businessTimeStart: [
{ required: true, message: "营业时间不允许为空", trigger: "change" }
@ -379,7 +379,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加经营场所列表";
this.title = "添加";
},
handleView(row) {
this.$router.push({
@ -393,7 +393,7 @@ export default {
mchGetStore(storeId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改经营场所列表";
this.title = "修改";
});
},
/** 提交按钮 */
@ -419,7 +419,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
console.log("store", row);
this.$modal.confirm(`是否确认删除经营场所${row.name}`).then(function() {
this.$modal.confirm(`是否确认删除${row.name}`).then(function() {
return mchDelStore(row.storeId);
}).then(() => {
this.getList();

View File

@ -19,8 +19,8 @@
<el-card class="box-card" header="变更字段">
<ul class="list-group list-group-striped" style="margin-top: 0">
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所名称" prop="name" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所图片" prop="picture" >
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="名称" prop="name" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="图片" prop="picture" >
<template #old="{value}">
<image-preview :width="24" :height="24" :src="value"/>
</template>
@ -28,7 +28,7 @@
<image-preview :width="24" :height="24" :src="value"/>
</template>
</change-field>
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所类型" prop="type" >
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="类型" prop="type" >
<template #old="{value}">
<dict-tag :value="value" :options="dict.type.ss_store_type" size="small"/>
</template>

View File

@ -21,10 +21,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="经营场所名称" prop="storeName">
<el-form-item label="名称" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入经营场所名称"
placeholder="请输入名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -215,7 +215,7 @@ export default {
{ required: true, message: "审核类型不能为空", trigger: "change" }
],
storeId: [
{ required: true, message: "经营场所id不能为空", trigger: "blur" }
{ required: true, message: `${FiledName.STORE}不能为空`, trigger: "blur" }
],
createTime: [
{ required: true, message: "提交审核的时间不能为空", trigger: "blur" }

View File

@ -84,6 +84,16 @@
v-hasPermi="['ss:channelWithdraw:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-setting"
size="mini"
@click="handleConfig"
v-hasPermi="['ss:channelWithdraw:config']"
>提现配置</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -212,6 +222,14 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--提现配置对话框-->
<config-dialog
:show.sync="showConfig"
title="提现配置"
:keys="['noverify.withdraw.single', 'daily.withdraw.amount']"
/>
</div>
</template>
@ -219,6 +237,8 @@
import { listChannelWithdraw, getChannelWithdraw, delChannelWithdraw, addChannelWithdraw, updateChannelWithdraw } from "@/api/ss/channelWithdraw";
import { $showColumns, $withdrawServiceType } from '@/utils/mixins'
import { updateBill } from '@/api/system/withdraw'
import ConfigForm from '@/components/Business/Config/ConfigForm.vue'
import ConfigDialog from '@/components/Business/Config/ConfigDialog.vue'
//
const defaultSort = {
@ -228,10 +248,12 @@ const defaultSort = {
export default {
name: "ChannelWithdraw",
components: { ConfigDialog, ConfigForm },
mixins: [$showColumns, $withdrawServiceType],
dicts: ['account_type', 'withdraw_service_type'],
data() {
return {
showConfig: false,
span: 12,
//
columns: [
@ -308,6 +330,9 @@ export default {
this.getList();
},
methods: {
handleConfig() {
this.showConfig = true;
},
onChangeEnabled(row, enabled) {
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
row.enabled = !enabled;

View File

@ -9,10 +9,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="userMobile">
<el-form-item label="推广人" prop="userName">
<el-input
v-model="queryParams.userMobile"
placeholder="请输入创建人手机号"
placeholder="请输入推广人名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -175,8 +175,8 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="投资人" prop="investorId" v-if="form.userType === SmUserType.BUSINESS_PLACE">
<user-input v-model="form.investorId" placeholder="请选择推广经营场所绑定的投资人" :before-open="beforeOpenInvestor" :query="investorQuery" show-type/>
<el-form-item :label="FieldName.INVESTOR" prop="investorId" v-if="form.userType === SmUserType.BUSINESS_PLACE">
<user-input v-model="form.investorId" :placeholder="`请选择推广${FieldName.STORE}绑定的${FieldName.INVESTOR}`" :before-open="beforeOpenInvestor" :query="investorQuery" show-type/>
</el-form-item>
<el-form-item label="分成比例" prop="point">
<el-input-number v-model="form.point" placeholder="请输入分成比例" controls-position="right" :min="0" :max="100" :precision="2" style="width: calc(100% - 1.5em)"/> %
@ -194,7 +194,7 @@
import { listShareCode, getShareCode, delShareCode, addShareCode, updateShareCode } from "@/api/ss/shareCode";
import { $showColumns } from '@/utils/mixins';
import UserInput from '@/components/Business/SmUser/UserInput.vue'
import { SmUserType } from '@/utils/constants'
import { FieldName, SmUserType } from '@/utils/constants'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import { getShareCodeWxUrl } from '@/utils/wx'
import QrCode from '@/components/QrCode/index.vue'
@ -208,6 +208,9 @@ const defaultSort = {
export default {
name: "ShareCode",
computed: {
FieldName() {
return FieldName
},
SmUserType() {
return SmUserType
},
@ -245,11 +248,11 @@ export default {
{key: 'codeId', visible: true, label: '推广码ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'codeNo', visible: true, label: '推广码编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'qrcode', visible: true, label: '二维码', minWidth: null, sortable: false, overflow: false, align: 'center', width: "80"},
{key: 'userId', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "300"},
{key: 'userId', visible: true, label: '推广人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "300"},
{key: 'userType', visible: true, label: '推广角色', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'point', visible: true, label: '分成比例', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'surplusPoint', visible: true, label: '剩余比例', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
{key: 'investorId', visible: false, label: '投资人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'investorId', visible: false, label: FieldName.INVESTOR, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'expireTime', visible: true, label: '过期时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'status', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'useUserMobile', visible: true, label: '使', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
@ -306,7 +309,7 @@ export default {
{ required: true, type: 'number', message: "分成比例不能为空", trigger: "blur" }
],
investorId: [
{ required: true, message: "投资人不能为空", trigger: "change" }
{ required: true, message: `${FieldName.STORE}不能为空`, trigger: "change" }
]
}
};
@ -335,7 +338,7 @@ export default {
}
if (this.form.investorId != null) {
this.form.investorId = null;
this.$message.info("由于更换了创建人,请重新选择投资人")
this.$message.info(`由于更换了推广人,请重新选择${FieldName.INVESTOR}`)
}
},
/** 当排序按钮被点击时触发 **/

View File

@ -1,15 +1,15 @@
<template>
<div class="app-container" v-loading="loading">
<el-card class="box-card" header="经营场所详情">
<el-card class="box-card" header="详细信息">
<el-row type="flex">
<image-preview :src="store.picture" :width="80" :height="80"/>
<div style="flex: 1;margin-left: 2em">
<el-descriptions :column="4">
<el-descriptions-item label="经营场所名称">{{store.name | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="经营场所类型">
<dict-tag :value="store.type" :options="dict.type.ss_store_type" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="经营场所状态">
<el-descriptions-item label="名称">{{store.name | defaultValue}}</el-descriptions-item>
<!-- <el-descriptions-item label="类型">-->
<!-- <dict-tag :value="store.type" :options="dict.type.ss_store_type" size="small"/>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="状态">
<dict-tag :value="store.status" :options="dict.type.store_status" size="small"/>
</el-descriptions-item>
<el-descriptions-item label="是否生效">
@ -19,11 +19,11 @@
<el-descriptions-item label="营业时间">
{{store.businessTimeStart | defaultValue}} {{store.businessTimeEnd | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="所属户">
<el-descriptions-item label="所属户">
<user-link :id="store.userId" :name="store.userName"/>
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{store.contactName | defaultValue}}({{store.contactMobile | defaultValue}})</el-descriptions-item>
<el-descriptions-item label="经营场所地址" :span="2">
<el-descriptions-item label="地址" :span="2">
{{store.province}}{{store.city}}{{store.county}}{{store.address}}
</el-descriptions-item>
</el-descriptions>

View File

@ -9,16 +9,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="场所名称" prop="name">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入经营场所名称"
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-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @change="handleQuery">
<el-option
v-for="dict in dict.type.store_status"
:key="dict.value"
@ -172,7 +172,7 @@
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row :gutter="8">
<form-col label="经营场所图片" prop="picture" :span="span * 2">
<form-col label="图片" prop="picture" :span="span * 2">
<image-upload v-model="form.picture" :limit="9"/>
</form-col>
<form-col label="负责人" prop="userId" :span="span">
@ -182,7 +182,7 @@
<el-switch v-model="form.show"/>
</form-col>
<form-col label="名称" prop="name" :span="span">
<el-input v-model="form.name" placeholder="请输入经营场所名称" />
<el-input v-model="form.name" placeholder="请输入名称" />
</form-col>
<form-col label="营业时间" prop="businessTimeStart" :span="span">
<el-time-picker
@ -199,7 +199,7 @@
</el-time-picker>
</form-col>
<form-col label="定位地址" prop="address" :span="span * 2">
<el-input v-model="form.address" placeholder="请输入经营场所地址">
<el-input v-model="form.address" placeholder="请输入地址">
<template #prepend>
<div>
{{form.province}}{{form.city}}{{form.county}}
@ -297,13 +297,13 @@ export default {
{ required: true, message: "用户不能为空", trigger: "change" }
],
name: [
{ required: true, message: "经营场所名称不能为空", trigger: "change" }
{ required: true, message: "名称不能为空", trigger: "change" }
],
address: [
{ required: true, message: "定位地址不能为空", trigger: "change" }
],
type: [
{ required: true, message: "经营场所类型不能为空", trigger: "change" }
{ required: true, message: "类型不能为空", trigger: "change" }
],
businessTimeStart: [
{ required: true, message: "营业时间不允许为空", trigger: "change" }

View File

@ -4,7 +4,7 @@
<el-col :span="span">
<el-card class="box-card" header="申请信息">
<el-descriptions :column="2">
<el-descriptions-item label="经营场所">
<el-descriptions-item :label="FiledName.STORE">
<store-link :id="detail.storeId" :name="detail.storeName" @click="$emit('click-link')"/>
</el-descriptions-item>
<el-descriptions-item label="申请人">
@ -22,8 +22,8 @@
<el-card class="box-card" header="变更字段">
<ul class="list-group list-group-striped" style="margin-top: 0">
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所名称" prop="name" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所图片" prop="picture" >
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="名称" prop="name" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="图片" prop="picture" >
<template #old="{value}">
<image-preview :width="24" :height="24" :src="value"/>
</template>
@ -31,14 +31,14 @@
<image-preview :width="24" :height="24" :src="value"/>
</template>
</change-field>
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经营场所类型" prop="type" >
<template #old="{value}">
<dict-tag :value="value" :options="dict.type.ss_store_type" size="small"/>
</template>
<template #new="{value}">
<dict-tag :value="value" :options="dict.type.ss_store_type" size="small"/>
</template>
</change-field>
<!-- <change-field :new-data="detail.newData" :old-data="detail.oldData" label="类型" prop="type" >-->
<!-- <template #old="{value}">-->
<!-- <dict-tag :value="value" :options="dict.type.ss_store_type" size="small"/>-->
<!-- </template>-->
<!-- <template #new="{value}">-->
<!-- <dict-tag :value="value" :options="dict.type.ss_store_type" size="small"/>-->
<!-- </template>-->
<!-- </change-field>-->
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="营业时间(起始)" prop="businessTimeStart" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="营业时间(结束)" prop="businessTimeEnd" />
<change-field :new-data="detail.newData" :old-data="detail.oldData" label="经度" prop="lng" />
@ -86,7 +86,7 @@
<script>
import { approvalStoreApply, getStoreApply } from '@/api/ss/storeApply'
import { StoreApplyStatus } from '@/utils/constants'
import { FieldName as FiledName, StoreApplyStatus } from '@/utils/constants'
import ChangeField from '@/views/ss/storeApply/component/ChangeField.vue'
import StoreLink from '@/components/Business/Store/StoreLink.vue'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
@ -114,6 +114,9 @@ export default {
}
},
computed: {
FiledName() {
return FiledName
},
StoreApplyStatus() {
return StoreApplyStatus
},

View File

@ -24,7 +24,7 @@
<el-form-item label="场所名称" prop="storeName">
<el-input
v-model="queryParams.storeName"
placeholder="请输入经营场所名称"
:placeholder="`请输入${FieldName.STORE}名称`"
clearable
@keyup.enter.native="handleQuery"
/>
@ -196,6 +196,7 @@ import { $showColumns } from '@/utils/mixins';
import StoreLink from '@/components/Business/Store/StoreLink.vue'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import StoreApplyDetail from '@/views/ss/storeApply/detail.vue'
import { FieldName } from '@/utils/constants'
//
const defaultSort = {
@ -205,6 +206,11 @@ const defaultSort = {
export default {
name: "StoreApply",
computed: {
FieldName() {
return FieldName
}
},
components: { StoreApplyDetail, UserLink, StoreLink },
mixins: [$showColumns],
dicts: ['store_apply_type', 'store_apply_status'],
@ -223,7 +229,7 @@ export default {
//
columns: [
{key: 'id', visible: true, label: '申请ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "120"},
{key: 'storeName', visible: true, label: '经营场所', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeName', visible: true, label: FieldName.STORE, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'applyType', visible: true, label: '申请类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'status', visible: true, label: '申请状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'userName', visible: true, label: '提交人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
@ -275,7 +281,7 @@ export default {
{ required: true, message: "审核类型不能为空", trigger: "change" }
],
storeId: [
{ required: true, message: "经营场所id不能为空", trigger: "blur" }
{ required: true, message: `${FieldName.STORE}不能为空`, trigger: "blur" }
],
createTime: [
{ required: true, message: "提交审核的时间不能为空", trigger: "blur" }
@ -360,7 +366,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加经营场所审核";
this.title = `添加${FieldName.STORE}审核`;
},
handleView(row) {
this.row = row;
@ -373,7 +379,7 @@ export default {
getStoreApply(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改经营场所审核";
this.title = `修改${FieldName.STORE}审核`;
});
},
/** 提交按钮 */
@ -399,7 +405,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除经营场所审核编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm(`是否确认删除${FieldName.STORE}审核编号为"` + ids + '"的数据项?').then(function() {
return delStoreApply(ids);
}).then(() => {
this.getList();

View File

@ -1,18 +1,18 @@
<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="storeName" v-if="notHasView(views.store)">
<el-form-item label="名称" prop="storeName" v-if="notHasView(views.store)">
<el-input
v-model="queryParams.storeName"
placeholder="请输入经营场所名称"
placeholder="请输入名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投资人" prop="investorMobile" v-if="notHasView(views.user)">
<el-form-item :label="FieldName.INVESTOR" prop="investorMobile" v-if="notHasView(views.user)">
<el-input
v-model="queryParams.investorMobile"
placeholder="请输入投资人手机号"
:placeholder="`请输入${FieldName.INVESTOR}手机号`"
clearable
@keyup.enter.native="handleQuery"
/>
@ -125,14 +125,14 @@
<!-- 添加或修改经营场所投资人关联对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="投资人" prop="investorId">
<el-form-item :label="FieldName.INVESTOR" prop="investorId">
<user-input v-model="form.investorId" :disabled="hasView(views.user)" :query="{type: SmUserType.INVESTOR}"/>
</el-form-item>
<el-form-item label="经营场所" prop="storeId">
<el-form-item :label="FieldName.STORE" prop="storeId">
<store-input v-model="form.storeId" :disabled="hasView(views.store)"/>
</el-form-item>
<el-form-item label="经营场所分成比例" prop="point" label-width="10em">
<el-input-number v-model="form.point" placeholder="请输入经营场所分成比例" :min="0" :max="100" :precision="2" style="width: calc(100% - 1.5em)"/> %
<el-form-item :label="`${FieldName.STORE}分成比例`" prop="point" label-width="10em">
<el-input-number v-model="form.point" :placeholder="`请输入${FieldName.STORE}分成比例`" :min="0" :max="100" :precision="2" style="width: calc(100% - 1.5em)"/> %
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -150,7 +150,7 @@ import UserLink from '@/components/Business/SmUser/UserLink.vue'
import StoreLink from '@/components/Business/Store/StoreLink.vue'
import UserInput from '@/components/Business/SmUser/UserInput.vue'
import StoreInput from '@/components/Business/Store/StoreInput.vue'
import { SmUserType } from '@/utils/constants'
import { FieldName, SmUserType } from '@/utils/constants'
//
const defaultSort = {
@ -161,6 +161,9 @@ const defaultSort = {
export default {
name: "StoreInvestor",
computed: {
FieldName() {
return FieldName
},
SmUserType() {
return SmUserType
}
@ -180,12 +183,12 @@ export default {
//
columns: [
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'bizId', visible: true, label: '业务员', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'bizPoint', visible: true, label: '业务员分成', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'investorId', visible: true, label: '投资人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'investorPoint', visible: true, label: '投资人分成', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeId', visible: true, label: '经营场所', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'point', visible: true, label: '经营场所分成', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'bizId', visible: true, label: FieldName.BIZ, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'bizPoint', visible: true, label: `${FieldName.BIZ}分成`, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'investorId', visible: true, label: FieldName.INVESTOR, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'investorPoint', visible: true, label: `${FieldName.INVESTOR}分成`, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeId', visible: true, label: FieldName.STORE, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'point', visible: true, label: `${FieldName.STORE}分成`, minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
@ -223,13 +226,13 @@ export default {
//
rules: {
storeId: [
{ required: true, message: "经营场所不能为空", trigger: "change" }
{ required: true, message: `${FieldName.STORE}不能为空`, trigger: "change" }
],
investorId: [
{ required: true, message: "投资人不能为空", trigger: "change" }
{ required: true, message: `${FieldName.STORE}不能为空`, trigger: "change" }
],
point: [
{ required: true, message: "经营场所分成比例不能为空", trigger: "blur" }
{ required: true, message: `${FieldName.STORE}分成比例不能为空`, trigger: "blur" }
],
}
};
@ -298,7 +301,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加经营场所投资人关联";
this.title = `添加${FieldName.STORE}${FieldName.INVESTOR}关联`;
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -307,7 +310,7 @@ export default {
getStoreInvestor(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改经营场所投资人关联";
this.title = `修改${FieldName.STORE}${FieldName.INVESTOR}关联`;
});
},
/** 提交按钮 */
@ -333,7 +336,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除经营场所投资人关联编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm(`是否确认删除${FieldName.STORE}${FieldName.INVESTOR}关联编号为"` + ids + '"的数据项?').then(function() {
return delStoreInvestor(ids);
}).then(() => {
this.getList();

View File

@ -108,7 +108,7 @@
<el-table-column label="使用次数" align="center" prop="totalCount">
<template slot-scope="d">{{d.row.totalCount}} </template>
</el-table-column>
<el-table-column label="所属代理商" align="center" prop="agentId" width="120">
<el-table-column :label="`所属${FieldName.AGENT}`" align="center" prop="agentId" width="120">
<user-link slot-scope="d" :id="d.row.agentId" :name="d.row.agentName"/>
</el-table-column>
<el-table-column label="应用场所" align="center" prop="storeList" min-width="200">
@ -153,7 +153,7 @@
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<form-col :span="span" label="所属代理" prop="agentId">
<form-col :span="span" :label="FieldName.AGENT" prop="agentId">
<user-input v-model="form.agentId" :query="{type: SmUserType.SALE}" @change="onChangeAgent"/>
</form-col>
<form-col :span="span" label="套餐名称" prop="name">
@ -236,7 +236,7 @@
<form-col :span="span" label="自定义使用率" prop="usePoint" label-width="7em">
<el-input-number v-model="form.usePoint" placeholder="请输入使用率" :min="0" :max="100" :precision="0" controls-position="right" style="width: calc(100% - 1.5em)"/> %
</form-col>
<form-col :span="span * 2" label="应用经营场所" prop="storeIds" label-width="7em">
<form-col :span="span * 2" :label="`应用${FieldName.STORE}`" prop="storeIds" label-width="7em">
<store-input v-model="form.storeIds" multiple :before-open="beforeOpenStore" :query="storeQuery"/>
</form-col>
</el-row>
@ -257,7 +257,7 @@ import UserLink from '@/components/Business/SmUser/UserLink.vue'
import UserInput from '@/components/Business/SmUser/UserInput.vue'
import { $view } from '@/utils/mixins'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import { SmUserType, SuitFeeMode, SuitFeeType } from '@/utils/constants'
import { FieldName, SmUserType, SuitFeeMode, SuitFeeType } from '@/utils/constants'
import DeptTreeSelect from '@/components/Business/Dept/DeptTreeSelect.vue'
import { mapGetters } from 'vuex'
import StoreInput from '@/components/Business/Store/StoreInput.vue'
@ -267,6 +267,9 @@ export default {
mixins: [$view],
dicts: ['time_unit', 'suit_fee_mode', 'suit_fee_type'],
computed: {
FieldName() {
return FieldName
},
SmUserType() {
return SmUserType
},
@ -360,7 +363,7 @@ export default {
//
rules: {
agentId: [
{ required: true, message: "所属代理不能为空", trigger: "change" }
{ required: true, message: `${FieldName.AGENT}不能为空`, trigger: "change" }
],
name: [
{ required: true, message: "套餐名称不能为空", trigger: "blur" }
@ -394,12 +397,12 @@ export default {
onChangeAgent(user) {
if (this.form.storeIds != null && this.form.storeIds.length > 0) {
this.form.storeIds = [];
this.$message.info("由于更换了代理商,请重新选择应用经营场所")
this.$message.info(`由于更换了${FieldName.AGENT},请重新选择应用${FieldName.STORE}`)
}
},
beforeOpenStore() {
if (this.form.agentId == null) {
this.$message.warning("请先选择代理商")
this.$message.warning(`请先选择${FieldName.AGENT}`)
return false;
}
return true;

View File

@ -23,7 +23,7 @@
<el-card class="box-card">
<el-tabs>
<el-tab-pane label="转账明细" lazy>
<el-tab-pane label="转账明细" lazy v-if="checkPermi(['ss:transferDetail:list'])">
<transfer-detail v-if="detail.batchId != null" :query="{transferId: detail.batchId}" :view="views.transfer"/>
</el-tab-pane>
</el-tabs>
@ -38,6 +38,7 @@
import { getTransfer } from '@/api/ss/transfer'
import TransferDetail from '@/views/ss/transferDetail/index.vue'
import { views } from '@/utils/constants'
import { checkPermi } from '@/utils/permission'
export default {
name: "Transfer/:batchId",
@ -60,6 +61,7 @@ export default {
this.getDetail();
},
methods: {
checkPermi,
getDetail() {
this.loading = true;
getTransfer(this.id).then(res => {

View File

@ -75,22 +75,22 @@
<el-card class="box-card">
<el-row type="flex">
<el-statistic title="代理商">
<el-statistic :title="FieldName.AGENT">
<template #formatter>
<user-link :name="deviceData.agentName" :id="deviceData.agentId" />
</template>
</el-statistic>
<el-statistic title="业务员">
<el-statistic :title="FieldName.BIZ">
<template #formatter>
<user-link :name="deviceData.bizManName" :id="deviceData.bizManId"/>
</template>
</el-statistic>
<el-statistic title="投资人">
<el-statistic :title="FieldName.INVESTOR">
<template #formatter>
<user-link :name="deviceData.userName" :id="deviceData.userId"/>
</template>
</el-statistic>
<el-statistic title="经营场所">
<el-statistic :title="FieldName.STORE">
<template #formatter>
<store-link :name="deviceData.storeName" :id="deviceData.storeId"/>
</template>
@ -176,6 +176,7 @@ import Recharge from '@/views/system/recharge/index.vue'
import { isEmpty } from '@/utils'
import hasPermi from '@/directive/permission/hasPermi'
import { checkPermi } from '@/utils/permission'
import { FieldName } from '@/utils/constants'
export default {
name: 'Device/:deviceId',
@ -211,6 +212,9 @@ export default {
}
},
computed: {
FieldName() {
return FieldName
},
qrCodeText() {
return (device) => {
return getWxIndexUrl({ s: device.deviceNo});

View File

@ -173,16 +173,16 @@
<dict-tag :options="dict.type.sm_device_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="代理商" align="center" prop="agentName" >
<el-table-column :label="FieldName.INVESTOR" align="center" prop="agentName" >
<user-link slot-scope="d" :id="d.row.agentId" :name="d.row.agentName"/>
</el-table-column>
<el-table-column label="业务员" align="center" prop="bizManName" >
<el-table-column :label="FieldName.BIZ" align="center" prop="bizManName" >
<user-link slot-scope="d" :id="d.row.bizManId" :name="d.row.bizManName"/>
</el-table-column>
<el-table-column label="投资人" align="center" prop="userName" >
<el-table-column :label="FieldName.INVESTOR" align="center" prop="userName" >
<user-link slot-scope="d" :id="d.row.userId" :name="d.row.userName"/>
</el-table-column>
<el-table-column label="经营场所" align="center" prop="storeName" >
<el-table-column :label="FieldName.STORE" align="center" prop="storeName" >
<store-link slot-scope="d" :id="d.row.storeId" :name="d.row.storeName"/>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
@ -243,13 +243,13 @@
<form-col :span="span" label="设备名称" prop="deviceName">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</form-col>
<form-col :span="span" label="所属代理商" prop="agentId">
<form-col :span="span" :label="FieldName.AGENT" prop="agentId">
<user-input v-model="form.agentId" :query="{type: SmUserType.SALE}" @change="onChangeSale"/>
</form-col>
<form-col :span="span" label="投资人" prop="userId">
<form-col :span="span" :label="FieldName.INVESTOR" prop="userId">
<user-input v-model="form.userId" :before-open="beforeOpenUser" :query="userQuery" @change="onChangeInvestor"/>
</form-col>
<form-col :span="span" label="经营场所" prop="storeId">
<form-col :span="span" :label="FieldName.STORE" prop="storeId">
<store-input v-model="form.storeId" :before-open="beforeOpenStore" :query="storeQuery"/>
</form-col>
<form-col :span="span" label="尺寸" prop="size">
@ -307,7 +307,7 @@ import UserLink from '@/components/Business/SmUser/UserLink.vue'
import StoreLink from '@/components/Business/Store/StoreLink.vue'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import { $serviceType, $view } from '@/utils/mixins'
import { SmUserType } from '@/utils/constants'
import { FieldName, SmUserType } from '@/utils/constants'
export default {
name: "Device",
@ -383,6 +383,9 @@ export default {
};
},
computed: {
FieldName() {
return FieldName
},
SmUserType() {
return SmUserType
},
@ -421,25 +424,25 @@ export default {
onChangeSale(user) {
if (this.form.userId != null) {
this.form.userId = null;
this.$message.info("由于更改了代理商,请重新选择投资人")
this.$message.info(`由于更改了${FieldName.AGENT},请重新选择${FieldName.INVESTOR}`)
}
},
onChangeInvestor(user) {
if (this.form.storeId != null) {
this.form.storeId = null;
this.$message.info("由于更改了投资人,请重新选择经营场所")
this.$message.info(`由于更改了${FieldName.INVESTOR},请重新选择${FieldName.STORE}`)
}
},
beforeOpenStore() {
if (this.form.userId == null) {
this.$message.warning("请先选择投资人");
this.$message.warning(`请先选择${FieldName.INVESTOR}`);
return false;
}
return true;
},
beforeOpenUser() {
if (this.form.agentId == null) {
this.$message.warning("请先选择所属代理商");
this.$message.warning(`请先选择${FieldName.AGENT}`);
return false;
}
return true;

View File

@ -24,13 +24,13 @@
<el-descriptions-item label="房间号" :span="2">
{{detail.deviceRoom | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="直属代理">
<el-descriptions-item :label="FieldName.AGENT">
<user-link :id="detail.agentId" :name="detail.agentName"/>{{detail.agentMobile}}
</el-descriptions-item>
<el-descriptions-item label="直属业务员">
<el-descriptions-item :label="FieldName.BIZ">
<user-link :id="detail.bizId" :name="detail.bizName"/>{{detail.bizMobile}}
</el-descriptions-item>
<el-descriptions-item label="投资人">
<el-descriptions-item :label="FieldName.INVESTOR">
<user-link :id="detail.investorId" :name="detail.investorName"/>{{detail.investorMobile}}
</el-descriptions-item>
</el-descriptions>
@ -85,7 +85,7 @@ import Refund from '@/views/ss/refund/index.vue'
import { findLabel } from '@/utils'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import { SuitFeeType, views } from '@/utils/constants'
import { FieldName, SuitFeeType, views } from '@/utils/constants'
import PayBill from '@/views/ss/payBill/index.vue'
import StoreLink from '@/components/Business/Store/StoreLink.vue'
import Bonus from '@/views/ss/bonus/index.vue'
@ -96,6 +96,9 @@ export default {
components: { Bonus, StoreLink, PayBill, UserLink, DeviceLink, Refund },
dicts: ['channel_type','sm_transaction_bill_status', 'sm_transaction_bill_device_recharge_status', 'time_unit', 'suit_fee_mode', 'suit_fee_type'],
computed: {
FieldName() {
return FieldName
},
views() {
return views
},

View File

@ -86,16 +86,16 @@
<el-table-column label="设备名称/SN" align="center" prop="deviceName" width="180">
<device-link slot-scope="d" :id="d.row.deviceId" :text="`${d.row.deviceName ? d.row.deviceName : '--'} (${d.row.deviceNo})`"/>
</el-table-column>
<el-table-column label="经营场所" align="center" prop="storeName">
<el-table-column :label="FieldName.STORE" align="center" prop="storeName">
<store-link slot-scope="d" :id="d.row.storeId" :name="d.row.storeName"/>
</el-table-column>
<el-table-column label="投资人" align="center" prop="investorName">
<el-table-column :label="FieldName.INVESTOR" align="center" prop="investorName">
<user-link slot-scope="d" :id="d.row.investorId" :name="d.row.investorName"/>
</el-table-column>
<el-table-column label="直属业务员" align="center" prop="bizName">
<el-table-column :label="FieldName.BIZ" align="center" prop="bizName">
<user-link slot-scope="d" :id="d.row.bizId" :name="d.row.bizName"/>
</el-table-column>
<el-table-column label="直属代理" align="center" prop="agentName">
<el-table-column :label="FieldName.AGENT" align="center" prop="agentName">
<user-link slot-scope="d" :id="d.row.agentId" :name="d.row.agentName"/>
</el-table-column>
<el-table-column label="交易金额" align="center">
@ -222,7 +222,7 @@ import {
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import DeviceLink from '@/components/Business/Device/DeviceLink.vue'
import RechargeLink from '@/components/Business/Transaction/RechargeLink.vue'
import { SuitFeeType } from '@/utils/constants'
import { FieldName, SuitFeeType } from '@/utils/constants'
import { $view } from '@/utils/mixins'
import StoreLink from '@/components/Business/Store/StoreLink.vue'
@ -284,6 +284,9 @@ export default {
};
},
computed: {
FieldName() {
return FieldName
},
canRefresh() {
return (row) => {
return row.status === '1' || row.status === '6';

View File

@ -24,23 +24,23 @@
<el-descriptions-item label="推广人" v-if="![SmUserType.NORMAL, SmUserType.BUSINESS_PLACE].includes(userData.type)">
<user-link :id="userData.referenceId" :name="userData.referenceName"/>
</el-descriptions-item>
<el-descriptions-item label="直属代理" v-if="![SmUserType.NORMAL, SmUserType.BUSINESS_PLACE].includes(userData.type)">
<el-descriptions-item :label="`直属${FieldName.AGENT}`" v-if="![SmUserType.NORMAL, SmUserType.BUSINESS_PLACE].includes(userData.type)">
<user-link :id="userData.agentId" :name="userData.agentName"/>
</el-descriptions-item>
<!-- <el-descriptions-item label="微信OpenId" :span="3">{{userData.wxOpenId | defaultValue}}</el-descriptions-item>-->
<el-descriptions-item label="分成比例" v-if="![SmUserType.BUSINESS_PLACE, SmUserType.NORMAL].includes(userData.type)">
{{userData.point | money | defaultValue}} %
</el-descriptions-item>
<el-descriptions-item label="代理数" v-if="[SmUserType.SALE].includes(userData.type)">
<el-descriptions-item :label="FieldName.AGENT" v-if="[SmUserType.SALE].includes(userData.type)">
{{userData.agentCount | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="业务员数" v-if="[SmUserType.SALE, SmUserType.BIZ].includes(userData.type)">
<el-descriptions-item :label="FieldName.BIZ" v-if="[SmUserType.SALE, SmUserType.BIZ].includes(userData.type)">
{{userData.bizManCount | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="投资人数" v-if="[SmUserType.SALE, SmUserType.BIZ].includes(userData.type)">
<el-descriptions-item :label="FieldName.INVESTOR" v-if="[SmUserType.SALE, SmUserType.BIZ].includes(userData.type)">
{{userData.investorCount | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="经营场所数">
<el-descriptions-item :label="FieldName.STORE">
{{userData.storeCount | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="设备数" v-if="[SmUserType.SALE, SmUserType.BIZ, SmUserType.INVESTOR].includes(userData.type)">
@ -68,13 +68,13 @@
<el-card class="box-card">
<el-tabs>
<template v-if="userData.type === SmUserType.SALE">
<el-tab-pane label="代理商列表" lazy v-if="checkPermi(['system:smUser:agentList'])">
<el-tab-pane :label="`${FieldName.AGENT}列表`" lazy v-if="checkPermi(['system:smUser:agentList'])">
<sm-user :query="{referenceId: userData.userId, type: SmUserType.SALE}"/>
</el-tab-pane>
<el-tab-pane label="业务员列表" lazy v-if="checkPermi(['system:smUser:bizList'])">
<el-tab-pane :label="`${FieldName.BIZ}列表`" lazy v-if="checkPermi(['system:smUser:bizList'])">
<sm-user :query="{referenceId: userData.userId, type: SmUserType.BIZ}"/>
</el-tab-pane>
<el-tab-pane label="投资人列表" lazy v-if="checkPermi(['system:smUser:investorList'])">
<el-tab-pane :label="`${FieldName.INVESTOR}列表`" lazy v-if="checkPermi(['system:smUser:investorList'])">
<sm-user :query="{agentId: userData.userId, type: SmUserType.INVESTOR}"/>
</el-tab-pane>
<el-tab-pane label="合作场所" lazy v-if="checkPermi(['ss:storeInvestor:list'])">
@ -85,10 +85,10 @@
</el-tab-pane>
</template>
<template v-if="userData.type === SmUserType.BIZ">
<el-tab-pane label="业务员列表" lazy v-if="checkPermi(['system:smUser:bizList'])">
<el-tab-pane :label="`${FieldName.BIZ}列表`" lazy v-if="checkPermi(['system:smUser:bizList'])">
<sm-user :query="{referenceId: userData.userId, type: SmUserType.BIZ}"/>
</el-tab-pane>
<el-tab-pane label="投资人列表" lazy v-if="checkPermi(['system:smUser:investorList'])">
<el-tab-pane :label="`${FieldName.INVESTOR}列表`" lazy v-if="checkPermi(['system:smUser:investorList'])">
<sm-user :query="{referenceId: userData.userId, type: SmUserType.INVESTOR}"/>
</el-tab-pane>
<el-tab-pane label="合作场所" lazy v-if="checkPermi(['ss:storeInvestor:list'])">
@ -139,7 +139,7 @@ import Store from '@/views/ss/store/index.vue'
import RecordBalance from '@/views/ss/recordBalance/index.vue'
import Account from '@/views/ss/account/index.vue'
import Suit from '@/views/ss/suit/index.vue'
import { RecordBalanceSubjectType, SmUserType } from '@/utils/constants'
import { FieldName, RecordBalanceSubjectType, SmUserType } from '@/utils/constants'
import Device from '@/views/system/device/index.vue'
import StoreInvestor from '@/views/ss/storeInvestor/index.vue'
import SmUser from '@/views/system/smUser/index.vue'
@ -153,6 +153,9 @@ export default {
components: { UserLink, SmUser, User, StoreInvestor, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
dicts: ['service_type', 'withdraw_service_type', 'user_type'],
computed: {
FieldName() {
return FieldName
},
RecordBalanceSubjectType() {
return RecordBalanceSubjectType
},

View File

@ -25,10 +25,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="直属代理" prop="agentName">
<el-form-item :label="`直属${FieldName.AGENT}`" prop="agentName">
<el-input
v-model="queryParams.agentName"
placeholder="请输入直属代理名称"
:placeholder="`请输入直属${FieldName.AGENT}名称`"
clearable
@keyup.enter.native="handleQuery"
/>
@ -241,7 +241,7 @@ import { $serviceType, $showColumns, $withdrawServiceType } from '@/utils/mixins
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import UserInput from '@/components/Business/SmUser/UserInput.vue'
import DeptTreeSelect from '@/components/Business/Dept/DeptTreeSelect.vue'
import { SmUserType, UserType } from '@/utils/constants'
import { FieldName, SmUserType, UserType } from '@/utils/constants'
import { mapGetters } from 'vuex'
const defaultSort = {
@ -263,6 +263,9 @@ export default {
}
},
computed: {
FieldName() {
return FieldName
},
...mapGetters(['deptId']),
SmUserType() {
return SmUserType
@ -320,9 +323,9 @@ export default {
{key: 'rechargeAmount', visible: true, label: '充值金额', align: 'center', minWidth: null, sortable: true, width: null},
{key: 'withDrawlAmount', visible: true, label: '提现金额', align: 'center', minWidth: null, sortable: true, width: null},
{key: 'balance', visible: true, label: '账户余额', align: 'center', minWidth: null, sortable: true, width: null},
{key: 'agentId', visible: true, label: '直属代理商', align: 'center', minWidth: null, sortable: false, width: null},
{key: 'investorCount', visible: false, label: '投资人数', align: 'center', minWidth: null, sortable: false, width: null},
{key: 'storeCount', visible: false, label: '经营场所数', align: 'center', minWidth: null, sortable: false, width: null},
{key: 'agentId', visible: true, label: `直属${FieldName.AGENT}`, align: 'center', minWidth: null, sortable: false, width: null},
{key: 'investorCount', visible: false, label: `${FieldName.INVESTOR}`, align: 'center', minWidth: null, sortable: false, width: null},
{key: 'storeCount', visible: false, label: `${FieldName.STORE}`, align: 'center', minWidth: null, sortable: false, width: null},
{key: 'deviceCount', visible: false, label: '设备数', align: 'center', minWidth: null, sortable: false, width: null},
{key: 'billCount', visible: false, label: '订单数', align: 'center', minWidth: null, sortable: false, width: null},
{key: 'billAmount', visible: false, label: '订单总额', align: 'center', minWidth: null, sortable: false, width: null},