加盟
This commit is contained in:
parent
c1afcbf2bc
commit
e2faefb449
44
src/api/bst/areaJoin.js
Normal file
44
src/api/bst/areaJoin.js
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询运营加盟列表
|
||||||
|
export function listAreaJoin(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bst/areaJoin/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询运营加盟详细
|
||||||
|
export function getAreaJoin(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bst/areaJoin/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增运营加盟
|
||||||
|
export function addAreaJoin(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bst/areaJoin',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改运营加盟
|
||||||
|
export function updateAreaJoin(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bst/areaJoin',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除运营加盟
|
||||||
|
export function delAreaJoin(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bst/areaJoin/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
1
src/assets/icons/svg/join.svg
Normal file
1
src/assets/icons/svg/join.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg t="1742885360396" class="icon" viewBox="0 0 1027 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6563" width="64" height="64"><path d="M512 378.092308m-216.615385 0a216.615385 216.615385 0 1 0 433.23077 0 216.615385 216.615385 0 1 0-433.23077 0Z" p-id="6564"></path><path d="M681.353846 559.261538s-55.138462 74.830769-169.353846 74.83077-169.353846-74.830769-169.353846-74.83077-55.138462-39.384615-133.907692 39.384616C133.907692 673.476923 133.907692 787.692308 133.907692 787.692308v94.523077c0 94.523077 133.907692 114.215385 133.907693 114.215384h492.307692s133.907692-19.692308 133.907692-114.215384V787.692308s0-114.215385-74.830769-189.046154c-78.769231-78.769231-137.846154-39.384615-137.846154-39.384616z" p-id="6565"></path><path d="M204.8 165.415385m-137.846154 0a137.846154 137.846154 0 1 0 275.692308 0 137.846154 137.846154 0 1 0-275.692308 0Z" p-id="6566"></path><path d="M303.261538 519.876923c-55.138462-55.138462-39.384615-169.353846-39.384615-169.353846s-15.753846 19.692308-55.138461 19.692308c-39.384615 0-94.523077-19.692308-114.215385-39.384616s-19.692308-39.384615-55.138462 0-39.384615 114.215385-39.384615 133.907693c0 0 0 39.384615 19.692308 94.523076s153.6 39.384615 153.6 39.384616c35.446154-98.461538 129.969231-78.769231 129.96923-78.769231z" p-id="6567"></path><path d="M819.2 165.415385m-137.846154 0a137.846154 137.846154 0 1 0 275.692308 0 137.846154 137.846154 0 1 0-275.692308 0Z" p-id="6568"></path><path d="M984.615385 330.830769c-39.384615-39.384615-39.384615-19.692308-55.138462 0-19.692308 19.692308-74.830769 39.384615-114.215385 39.384616s-55.138462-19.692308-55.138461-19.692308 19.692308 114.215385-39.384615 169.353846c0 0 94.523077-19.692308 133.907692 74.830769 0 0 133.907692 19.692308 153.6-39.384615 19.692308-55.138462 19.692308-94.523077 19.692308-94.523077-3.938462-15.753846-3.938462-90.584615-43.323077-129.969231z" p-id="6569"></path></svg>
|
After Width: | Height: | Size: 1.9 KiB |
|
@ -57,6 +57,12 @@ export const AreaSubType = {
|
||||||
NO_RIDE: "3", // 禁行区
|
NO_RIDE: "3", // 禁行区
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 套餐类型
|
||||||
|
export const SuitType = {
|
||||||
|
SHARE: "1", // 共享
|
||||||
|
RENTAL: "2", // 租赁
|
||||||
|
}
|
||||||
|
|
||||||
// 套餐状态
|
// 套餐状态
|
||||||
export const SuitStatus = {
|
export const SuitStatus = {
|
||||||
NORMAL: "0", // 正常
|
NORMAL: "0", // 正常
|
||||||
|
@ -116,3 +122,10 @@ export const DeviceStatus = {
|
||||||
return [this.AVAILABLE, this.TEMP_LOCKED, this.DISPATCHING, this.IN_USE];
|
return [this.AVAILABLE, this.TEMP_LOCKED, this.DISPATCHING, this.IN_USE];
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加盟类型
|
||||||
|
export const AreaJoinType = {
|
||||||
|
JOIN: "1", // 加盟
|
||||||
|
COOPERATE: "2", // 合伙
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<collapse-panel title="基本信息" :value="true">
|
<collapse-panel title="基本信息" :value="true">
|
||||||
<el-row :gutter="gutter">
|
<el-row :gutter="gutter">
|
||||||
<form-col :span="span" label="运营商" prop="userId">
|
<form-col :span="span" label="运营商" prop="userId">
|
||||||
<user-input v-model="form.userId" :text.sync="form.userName" :disabled="!checkRole([RoleKeys.ADMIN, RoleKeys.AGENT])"/>
|
<user-input v-model="form.userId" :text.sync="form.userName" :disabled="!checkPermi(['system:user:list'])"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
<form-col :span="span" label="区域名称" prop="name">
|
<form-col :span="span" label="区域名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入区域名称" />
|
<el-input v-model="form.name" placeholder="请输入区域名称" />
|
||||||
|
|
159
src/views/bst/areaJoin/components/AreaJoinEditDialog.vue
Normal file
159
src/views/bst/areaJoin/components/AreaJoinEditDialog.vue
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@open="handleOpen"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" v-loading="loading">
|
||||||
|
<el-row>
|
||||||
|
<form-col :span="span" label="运营区" prop="areaId">
|
||||||
|
<area-remote-select v-model="form.areaId" :init-options="initAreaOptions" style="width: 100%;" v-if="!loading"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择类型" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.area_join_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="绑定用户" prop="userId" v-has-permi="['system:user:list']">
|
||||||
|
<user-input v-model="form.userId" :text.sync="form.userName" style="width: 100%;"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="分成比例" prop="point">
|
||||||
|
<el-input v-model="form.point" placeholder="请输入分成比例">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" maxlength="30" show-word-limit/>
|
||||||
|
</form-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAreaJoin, addAreaJoin, updateAreaJoin } from "@/api/bst/areaJoin";
|
||||||
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
|
import AreaRemoteSelect from "@/components/Business/Area/AreaRemoteSelect.vue";
|
||||||
|
import { AreaJoinType } from "@/utils/enums";
|
||||||
|
import UserInput from '@/components/Business/User/UserInput.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AreaJoinEditDialog',
|
||||||
|
components: { FormCol, AreaRemoteSelect, UserInput },
|
||||||
|
dicts: ['area_join_type'],
|
||||||
|
props: {
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
initData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
AreaJoinType,
|
||||||
|
span: 24,
|
||||||
|
title: '',
|
||||||
|
form: {},
|
||||||
|
loading: false,
|
||||||
|
rules: {
|
||||||
|
type: [
|
||||||
|
{ required: true, message: "类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
areaId: [
|
||||||
|
{ required: true, message: "运营区不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
point: [
|
||||||
|
{ required: true, message: "分成比例不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dialogVisible: {
|
||||||
|
get() {
|
||||||
|
return this.visible;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit('update:visible', val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initAreaOptions() {
|
||||||
|
return [{id: this.form.areaId, name: this.form.areaName}]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpen() {
|
||||||
|
if (this.id == null) {
|
||||||
|
this.reset();
|
||||||
|
this.title = "添加运营加盟";
|
||||||
|
} else {
|
||||||
|
this.getDetail();
|
||||||
|
this.title = "修改运营加盟";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
type: AreaJoinType.JOIN,
|
||||||
|
areaId: null,
|
||||||
|
userId: null,
|
||||||
|
point: null,
|
||||||
|
createTime: null,
|
||||||
|
remark: null,
|
||||||
|
createId: null,
|
||||||
|
...this.initData
|
||||||
|
};
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.form && this.$refs.form.clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDetail() {
|
||||||
|
this.loading = true;
|
||||||
|
getAreaJoin(this.id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const promise = this.form.id != null ? updateAreaJoin(this.form) : addAreaJoin(this.form);
|
||||||
|
promise.then(response => {
|
||||||
|
this.$modal.msgSuccess(this.form.id != null ? "修改成功" : "新增成功");
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$emit('success');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
284
src/views/bst/areaJoin/index.vue
Normal file
284
src/views/bst/areaJoin/index.vue
Normal file
|
@ -0,0 +1,284 @@
|
||||||
|
<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="areaName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.areaName"
|
||||||
|
placeholder="请输入运营区"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.area_join_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入用户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.remark"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-has-permi="['bst:areaJoin:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-has-permi="['bst:areaJoin:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-has-permi="['bst:areaJoin:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="areaJoinList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<template v-for="column of showColumns">
|
||||||
|
<el-table-column
|
||||||
|
:key="column.key"
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.key"
|
||||||
|
:align="column.align"
|
||||||
|
:min-width="column.minWidth"
|
||||||
|
:sort-orders="orderSorts"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
:show-overflow-tooltip="column.overflow"
|
||||||
|
:width="column.width"
|
||||||
|
>
|
||||||
|
<template slot-scope="d">
|
||||||
|
<template v-if="column.key === 'id'">
|
||||||
|
{{d.row[column.key]}}
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'userName'">
|
||||||
|
{{d.row.userName | dv}}
|
||||||
|
<template v-if="d.row.remark">({{d.row.remark}})</template>
|
||||||
|
<dict-tag :options="dict.type.area_join_type" :value="d.row.type" size="mini"/>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'point'">
|
||||||
|
<span>{{d.row[column.key] | fix2 | dv}} %</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{d.row[column.key]}}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-has-permi="['bst:areaJoin:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-has-permi="['bst:areaJoin:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 引入运营加盟编辑对话框组件 -->
|
||||||
|
<area-join-edit-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:id="editId"
|
||||||
|
:init-data="initData"
|
||||||
|
@success="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listAreaJoin, delAreaJoin } from "@/api/bst/areaJoin";
|
||||||
|
import { $showColumns } from '@/utils/mixins';
|
||||||
|
import AreaJoinEditDialog from './components/AreaJoinEditDialog';
|
||||||
|
|
||||||
|
// 默认排序字段
|
||||||
|
const defaultSort = {
|
||||||
|
prop: "createTime",
|
||||||
|
order: "descending"
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AreaJoin",
|
||||||
|
mixins: [$showColumns],
|
||||||
|
dicts: ['area_join_type'],
|
||||||
|
components: { AreaJoinEditDialog },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 字段列表
|
||||||
|
columns: [
|
||||||
|
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||||
|
{key: 'userName', visible: true, label: '用户', minWidth: null, sortable: true, overflow: false, align: 'left', width: null},
|
||||||
|
{key: 'areaName', 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: 'createName', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
],
|
||||||
|
// 排序方式
|
||||||
|
orderSorts: ['ascending', 'descending', null],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 运营加盟表格数据
|
||||||
|
areaJoinList: [],
|
||||||
|
// 编辑id
|
||||||
|
editId: null,
|
||||||
|
// 初始数据
|
||||||
|
initData: {},
|
||||||
|
// 对话框显示状态
|
||||||
|
dialogVisible: false,
|
||||||
|
defaultSort,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
orderByColumn: defaultSort.prop,
|
||||||
|
isAsc: defaultSort.order,
|
||||||
|
id: null,
|
||||||
|
type: null,
|
||||||
|
areaId: null,
|
||||||
|
userId: null,
|
||||||
|
remark: null,
|
||||||
|
createId: null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 当排序按钮被点击时触发 **/
|
||||||
|
onSortChange(column) {
|
||||||
|
if (column.order == null) {
|
||||||
|
this.queryParams.orderByColumn = defaultSort.prop;
|
||||||
|
this.queryParams.isAsc = defaultSort.order;
|
||||||
|
} else {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 查询运营加盟列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listAreaJoin(this.queryParams).then(response => {
|
||||||
|
this.areaJoinList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.editId = null;
|
||||||
|
this.initData = {};
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.editId = row.id || this.ids;
|
||||||
|
this.initData = {};
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除运营加盟编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delAreaJoin(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('bst/areaJoin/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `areaJoin_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -7,7 +7,7 @@
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@open="handleOpen"
|
@open="handleOpen"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" size="small">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" size="small" v-loading="loading">
|
||||||
<el-row>
|
<el-row>
|
||||||
<form-col :span="span" label="车型名称" prop="name">
|
<form-col :span="span" label="车型名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入车型名称" />
|
<el-input v-model="form.name" placeholder="请输入车型名称" />
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<user-input
|
<user-input
|
||||||
v-model="form.userId"
|
v-model="form.userId"
|
||||||
:text.sync="form.userName"
|
:text.sync="form.userName"
|
||||||
:disabled="!checkRole([RoleKeys.ADMIN])"
|
:disabled="!checkPermi(['system:user:list'])"
|
||||||
@change="handleChangeUser"
|
@change="handleChangeUser"
|
||||||
/>
|
/>
|
||||||
</form-col>
|
</form-col>
|
||||||
|
@ -97,6 +97,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading: false,
|
||||||
RoleKeys,
|
RoleKeys,
|
||||||
span: 24,
|
span: 24,
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -146,14 +147,17 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
suitNames() {
|
suitNames() {
|
||||||
return
|
if (this.form.suitList == null || this.form.suitList.length === 0) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return this.form.suitList.map(item => item.name).join(',');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChangeUser() {
|
handleChangeUser() {
|
||||||
if (this.form.suitIds != null && this.form.suitIds.length > 0) {
|
if (this.form.suitIds != null && this.form.suitIds.length > 0) {
|
||||||
this.form.suitIds = [];
|
this.form.suitIds = [];
|
||||||
this.form.suitNames = null;
|
this.form.suitList = [];
|
||||||
this.$message.warning("由于更换了所属用户,套餐数据已清空");
|
this.$message.warning("由于更换了所属用户,套餐数据已清空");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -199,8 +203,11 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
|
this.loading = true;
|
||||||
getModel(this.id).then(response => {
|
getModel(this.id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="type">
|
<el-form-item label="套餐类型" prop="suitType">
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery">
|
<el-select v-model="queryParams.suitType" placeholder="请选择套餐类型" clearable @change="handleQuery">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.order_type"
|
v-for="dict in dict.type.suit_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
<el-table size="mini" v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<template v-for="column of showColumns">
|
<template v-for="column of showColumns">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -145,21 +145,17 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'suitName'">
|
<template v-else-if="column.key === 'suitName'">
|
||||||
{{d.row.suitName | dv}}<br/>
|
{{d.row.suitName | dv}}<br/>
|
||||||
<dict-tag :options="dict.type.order_type" :value="d.row.type" size="mini"/>
|
<dict-tag :options="dict.type.suit_type" :value="d.row.suitType" size="mini"/>
|
||||||
<dict-tag :options="dict.type.order_status" :value="d.row.status" size="mini" style="margin-left: 4px;"/>
|
<dict-tag :options="dict.type.order_status" :value="d.row.status" size="mini" style="margin-left: 4px;"/>
|
||||||
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.suitRidingRule" size="mini" style="margin-left: 4px;"/>
|
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.suitRidingRule" size="mini" style="margin-left: 4px;"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'returnType'">
|
<template v-else-if="column.key === 'returnType'">
|
||||||
<dict-tag :options="dict.type.order_return_type" :value="d.row[column.key]" size="mini"/>
|
<dict-tag :options="dict.type.order_return_type" :value="d.row.returnType" size="mini"/>
|
||||||
|
<dict-tag :options="dict.type.order_return_mode" :value="d.row.returnMode" size="mini"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'suitRentalUnit'">
|
<template v-else-if="column.key === 'suitRentalUnit'">
|
||||||
<dict-tag :options="dict.type.suit_rental_unit" :value="d.row[column.key]" size="mini"/>
|
<dict-tag :options="dict.type.suit_rental_unit" :value="d.row[column.key]" size="mini"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'suitRidingRule'">
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'returnMode'">
|
|
||||||
<dict-tag :options="dict.type.order_return_mode" :value="d.row[column.key]" size="mini"/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'totalFee'">
|
<template v-else-if="column.key === 'totalFee'">
|
||||||
<div>
|
<div>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
|
@ -167,26 +163,22 @@
|
||||||
<el-col :span="12" v-if="d.row.depositFee != null">押金:{{d.row.depositFee | fix2 | dv}} 元</el-col>
|
<el-col :span="12" v-if="d.row.depositFee != null">押金:{{d.row.depositFee | fix2 | dv}} 元</el-col>
|
||||||
<el-col :span="12" v-if="d.row.ridingFee != null">骑行费:{{d.row.ridingFee | fix2 | dv}} 元</el-col>
|
<el-col :span="12" v-if="d.row.ridingFee != null">骑行费:{{d.row.ridingFee | fix2 | dv}} 元</el-col>
|
||||||
<el-col :span="12" v-if="d.row.payRefunded != null">退款:{{d.row.payRefunded | fix2 | dv}} 元</el-col>
|
<el-col :span="12" v-if="d.row.payRefunded != null">退款:{{d.row.payRefunded | fix2 | dv}} 元</el-col>
|
||||||
|
<el-col :span="12" v-if="d.row.dispatchFee != null">调度费:{{d.row.dispatchFee | fix2 | dv}} 元</el-col>
|
||||||
|
<el-col :span="12" v-if="d.row.manageFee != null">管理费:{{d.row.manageFee | fix2 | dv}} 元</el-col>
|
||||||
|
<el-col :span="12" v-if="d.row.deductionFee != null">车损费:{{d.row.deductionFee | fix2 | dv}} 元</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-popover
|
|
||||||
placement="right"
|
|
||||||
width="400"
|
|
||||||
trigger="hover">
|
|
||||||
<el-row :gutter="8">
|
|
||||||
<el-col :span="12">调度费:{{d.row.dispatchFee | fix2 | dv}} 元</el-col>
|
|
||||||
<el-col :span="12">管理费:{{d.row.manageFee | fix2 | dv}} 元</el-col>
|
|
||||||
<el-col :span="12">车损费:{{d.row.deductionFee | fix2 | dv}} 元</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-button slot="reference" type="text" size="small" >更多费用</el-button>
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'useInfo'">
|
<template v-else-if="column.key === 'useInfo'">
|
||||||
<div v-if="d.row.duration != null">骑行时长:{{d.row.duration | dv}} 秒</div>
|
<div v-if="d.row.duration != null">骑行时长:{{d.row.duration | dv}} 秒</div>
|
||||||
<div v-if="d.row.distance != null">骑行距离:{{d.row.distance | fix2 | dv}} 米</div>
|
<div v-if="d.row.distance != null">骑行距离:{{d.row.distance | fix2 | dv}} 米</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'time'">
|
||||||
|
<div v-if="d.row.createTime != null">创建时间:{{d.row.createTime | dv}}</div>
|
||||||
<div v-if="d.row.startTime != null">开始时间:{{d.row.startTime | dv}}</div>
|
<div v-if="d.row.startTime != null">开始时间:{{d.row.startTime | dv}}</div>
|
||||||
<div v-if="d.row.endTime != null">结束时间:{{d.row.endTime | dv}}</div>
|
<div v-if="d.row.endTime != null">结束时间:{{d.row.endTime | dv}}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="column.key === 'device'">
|
<template v-else-if="column.key === 'device'">
|
||||||
<div v-if="d.row.deviceSn != null">SN:{{d.row.deviceSn | dv}}</div>
|
<div v-if="d.row.deviceSn != null">SN:{{d.row.deviceSn | dv}}</div>
|
||||||
<div v-if="d.row.deviceMac != null">MAC:{{d.row.deviceMac | dv}}</div>
|
<div v-if="d.row.deviceMac != null">MAC:{{d.row.deviceMac | dv}}</div>
|
||||||
|
@ -235,7 +227,7 @@ const defaultSort = {
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
dicts: ['order_status', 'order_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'],
|
dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'],
|
||||||
components: {FormCol},
|
components: {FormCol},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -245,15 +237,14 @@ export default {
|
||||||
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||||
{key: 'no', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'no', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'suitName', visible: true, label: '套餐', minWidth: "200", sortable: true, overflow: false, align: 'left', width: null},
|
{key: 'suitName', visible: true, label: '套餐', minWidth: "200", sortable: true, overflow: false, align: 'left', width: null},
|
||||||
{key: 'device', visible: true, label: '设备详情', minWidth: "150", sortable: false, overflow: false, align: 'left', width: null},
|
{key: 'device', visible: true, label: '设备详情', minWidth: "130", sortable: false, overflow: false, align: 'left', width: null},
|
||||||
{key: 'totalFee', visible: true, label: '费用详情', minWidth: "300", sortable: false, overflow: false, align: 'left', width: null},
|
{key: 'totalFee', visible: true, label: '费用详情', minWidth: "230", sortable: false, overflow: false, align: 'left', width: null},
|
||||||
{key: 'useInfo', visible: true, label: '使用详情', minWidth: "150", sortable: false, overflow: false, align: 'left', width: null},
|
{key: 'useInfo', visible: true, label: '使用详情', minWidth: "130", sortable: false, overflow: false, align: 'left', width: null},
|
||||||
{key: 'createTime', visible: true, label: '时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'time', visible: true, label: '时间', minWidth: "180", sortable: false, overflow: false, align: 'left', width: null},
|
||||||
{key: 'areaName', visible: true, label: '运营区', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'areaName', visible: true, label: '运营区', 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: 'userName', visible: true, label: '用户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'payNo', visible: true, label: '支付单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'payNo', visible: true, label: '支付单', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'returnType', visible: true, label: '还车类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'returnType', visible: true, label: '还车', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||||
{key: 'returnMode', visible: true, label: '还车定位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
|
||||||
{key: 'mark', visible: false, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'mark', visible: false, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
],
|
],
|
||||||
// 排序方式
|
// 排序方式
|
||||||
|
@ -300,32 +291,7 @@ export default {
|
||||||
suitRidingRule: null,
|
suitRidingRule: null,
|
||||||
returnMode: null,
|
returnMode: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
no: [
|
|
||||||
{ required: true, message: "订单号不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
type: [
|
|
||||||
{ required: true, message: "类型不能为空", trigger: "change" }
|
|
||||||
],
|
|
||||||
areaId: [
|
|
||||||
{ required: true, message: "运营区ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
userId: [
|
|
||||||
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
deviceId: [
|
|
||||||
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
suitId: [
|
|
||||||
{ required: true, message: "套餐ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -355,52 +321,6 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
no: null,
|
|
||||||
type: null,
|
|
||||||
areaId: null,
|
|
||||||
userId: null,
|
|
||||||
deviceId: null,
|
|
||||||
deviceMac: null,
|
|
||||||
deviceSn: null,
|
|
||||||
payId: null,
|
|
||||||
totalFee: null,
|
|
||||||
depositFee: null,
|
|
||||||
dispatchFee: null,
|
|
||||||
manageFee: null,
|
|
||||||
ridingFee: null,
|
|
||||||
deductionFee: null,
|
|
||||||
mark: null,
|
|
||||||
duration: null,
|
|
||||||
distance: null,
|
|
||||||
status: null,
|
|
||||||
createTime: null,
|
|
||||||
startTime: null,
|
|
||||||
endTime: null,
|
|
||||||
returnType: null,
|
|
||||||
videoUrl: null,
|
|
||||||
videoTime: null,
|
|
||||||
audioFiles: null,
|
|
||||||
suitId: null,
|
|
||||||
suitFreeRideTime: null,
|
|
||||||
suitRentalUnit: null,
|
|
||||||
suitRidingRule: null,
|
|
||||||
suitStartRule: null,
|
|
||||||
returnMode: null,
|
|
||||||
suitIntervalRule: null,
|
|
||||||
returnLon: null,
|
|
||||||
returnLat: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -417,52 +337,6 @@ export default {
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加订单";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getOrder(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改订单";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateOrder(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addOrder(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除订单编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delOrder(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('bst/order/export', {
|
this.download('bst/order/export', {
|
||||||
|
|
|
@ -9,12 +9,22 @@
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" size="small" v-loading="loading">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px" size="small" v-loading="loading">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<form-col :span="span" label="运营商" prop="userId">
|
<form-col :span="span" label="所属用户" prop="userId">
|
||||||
<user-input v-model="form.userId" :text.sync="form.userName" :disabled="!checkRole([RoleKeys.ADMIN])"/>
|
<user-input v-model="form.userId" :text.sync="form.userName" :disabled="!checkPermi(['system:user:list'])"/>
|
||||||
</form-col>
|
</form-col>
|
||||||
<form-col :span="span" label="套餐名称" prop="name">
|
<form-col :span="span" label="套餐名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入套餐名称" />
|
<el-input v-model="form.name" placeholder="请输入套餐名称" />
|
||||||
</form-col>
|
</form-col>
|
||||||
|
<form-col :span="span" label="套餐类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择套餐类型" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.suit_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</form-col>
|
||||||
<form-col :span="span" label="预存金额" prop="depositAmount">
|
<form-col :span="span" label="预存金额" prop="depositAmount">
|
||||||
<el-input v-model="form.depositAmount" placeholder="请输入预存金额" type="number">
|
<el-input v-model="form.depositAmount" placeholder="请输入预存金额" type="number">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
|
@ -60,6 +70,8 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</form-col>
|
</form-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
<collapse-panel title="计费规则" :value="true">
|
<collapse-panel title="计费规则" :value="true">
|
||||||
<template v-if="form.ridingRule === SuitRidingRule.START && form.startRule">
|
<template v-if="form.ridingRule === SuitRidingRule.START && form.startRule">
|
||||||
在
|
在
|
||||||
|
@ -162,7 +174,7 @@
|
||||||
import { getSuit, addSuit, updateSuit } from "@/api/bst/suit";
|
import { getSuit, addSuit, updateSuit } from "@/api/bst/suit";
|
||||||
import FormCol from "@/components/FormCol/index.vue";
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
import UserInput from '@/components/Business/User/UserInput.vue';
|
import UserInput from '@/components/Business/User/UserInput.vue';
|
||||||
import { SuitRentalUnit, SuitRidingRule, SuitStatus, RoleKeys } from '@/utils/enums';
|
import { SuitRentalUnit, SuitRidingRule, SuitStatus, RoleKeys, SuitType } from '@/utils/enums';
|
||||||
import CollapsePanel from '@/components/CollapsePanel/index.vue';
|
import CollapsePanel from '@/components/CollapsePanel/index.vue';
|
||||||
import { deepClone, dictLabel } from '@/utils';
|
import { deepClone, dictLabel } from '@/utils';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
@ -170,7 +182,7 @@ import { mapGetters } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name: 'SuitEditDialog',
|
name: 'SuitEditDialog',
|
||||||
components: { FormCol, UserInput, CollapsePanel },
|
components: { FormCol, UserInput, CollapsePanel },
|
||||||
dicts: ['suit_status', 'suit_rental_unit', 'suit_riding_rule'],
|
dicts: ['suit_status', 'suit_rental_unit', 'suit_riding_rule', 'suit_type'],
|
||||||
props: {
|
props: {
|
||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -187,6 +199,7 @@ export default {
|
||||||
SuitRidingRule,
|
SuitRidingRule,
|
||||||
SuitStatus,
|
SuitStatus,
|
||||||
RoleKeys,
|
RoleKeys,
|
||||||
|
SuitType,
|
||||||
span: 12,
|
span: 12,
|
||||||
title: '',
|
title: '',
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -308,6 +321,7 @@ export default {
|
||||||
id: null,
|
id: null,
|
||||||
userId: this.userId,
|
userId: this.userId,
|
||||||
name: null,
|
name: null,
|
||||||
|
type: SuitType.SHARE,
|
||||||
status: SuitStatus.NORMAL,
|
status: SuitStatus.NORMAL,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
freeRideTime: null,
|
freeRideTime: null,
|
||||||
|
|
|
@ -27,6 +27,16 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable @change="handleQuery">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.suit_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="计费规则" prop="ridingRule">
|
<el-form-item label="计费规则" prop="ridingRule">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.ridingRule"
|
v-model="queryParams.ridingRule"
|
||||||
|
@ -102,9 +112,10 @@
|
||||||
<template v-if="column.key === 'id'">
|
<template v-if="column.key === 'id'">
|
||||||
{{d.row[column.key]}}
|
{{d.row[column.key]}}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'name'">
|
<template v-else-if="column.key === 'name'">
|
||||||
{{d.row[column.key]}}
|
{{d.row[column.key]}}
|
||||||
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.ridingRule" size="mini"/>
|
<dict-tag :options="dict.type.suit_type" :value="d.row.type" size="mini"/>
|
||||||
|
<dict-tag :options="dict.type.suit_riding_rule" :value="d.row.ridingRule" size="mini" style="margin-left: 4px;"/>
|
||||||
<dict-tag :options="dict.type.suit_status" :value="d.row.status" size="mini" style="margin-left: 4px;"/>
|
<dict-tag :options="dict.type.suit_status" :value="d.row.status" size="mini" style="margin-left: 4px;"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.key === 'rentalUnit'">
|
<template v-else-if="column.key === 'rentalUnit'">
|
||||||
|
@ -165,14 +176,14 @@ import SuitEditDialog from '@/views/bst/suit/components/SuitEditDialog.vue';
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
prop: "createTime",
|
prop: "orderNum",
|
||||||
order: "descending"
|
order: "ascending"
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Suit",
|
name: "Suit",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
dicts: ['suit_status', 'suit_rental_unit', 'suit_riding_rule'],
|
dicts: ['suit_status', 'suit_rental_unit', 'suit_riding_rule', 'suit_type'],
|
||||||
components: { SuitEditDialog },
|
components: { SuitEditDialog },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user