Compare commits

...

4 Commits

Author SHA1 Message Date
4a4ecbc296 11 2024-05-28 13:53:17 +08:00
698a01c275 Merge branch 'qzz' of http://61.174.243.28:15863/tx/bick_back 2024-05-27 13:42:59 +08:00
ecb4cc1757 1. 分账项目 2024-05-27 13:41:11 +08:00
2f83603276 1. 组织架构 2024-05-27 09:47:00 +08:00
5 changed files with 102 additions and 55 deletions

View File

@ -1,16 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="部门名称" prop="deptName">
<el-form-item label="运营商名称" prop="deptName">
<el-input
v-model="queryParams.deptName"
placeholder="请输入部门名称"
placeholder="请输入运营商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="部门状态" clearable>
<el-select v-model="queryParams.status" placeholder="运营商状态" clearable>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
@ -56,7 +56,7 @@
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-table-column prop="deptName" label="运营商名称" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
@ -96,20 +96,20 @@
</el-table-column>
</el-table>
<!-- 添加或修改部门对话框 -->
<!-- 添加或修改运营商对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
<el-form-item label="上级运营商" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级运营商" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
<el-form-item label="运营商名称" label-width="90" prop="deptName">
<el-input v-model="form.deptName" style="width: 67%;" placeholder="请输入运营商名称" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -137,7 +137,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="部门状态">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
@ -148,6 +148,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="绑定运营区" label-width="90">
<el-select style="width: 85%" v-model="form.areaIds" multiple placeholder="请绑定运营区">
<el-option
v-for="item in areaOptions"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -161,6 +175,7 @@
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listArea } from '../../../api/system/area'
export default {
name: "Dept",
@ -174,8 +189,10 @@ export default {
showSearch: true,
//
deptList: [],
//
//
deptOptions: [],
//
areaOptions: [],
//
title: "",
//
@ -194,10 +211,10 @@ export default {
//
rules: {
parentId: [
{ required: true, message: "上级部门不能为空", trigger: "blur" }
{ required: true, message: "上级运营商不能为空", trigger: "blur" }
],
deptName: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
{ required: true, message: "运营商名称不能为空", trigger: "blur" }
],
orderNum: [
{ required: true, message: "显示排序不能为空", trigger: "blur" }
@ -223,7 +240,7 @@ export default {
this.getList();
},
methods: {
/** 查询部门列表 */
/** 查询运营商列表 */
getList() {
this.loading = true;
listDept(this.queryParams).then(response => {
@ -231,7 +248,7 @@ export default {
this.loading = false;
});
},
/** 转换部门数据结构 */
/** 转换运营商数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
@ -277,9 +294,12 @@ export default {
this.form.parentId = row.deptId;
}
this.open = true;
this.title = "添加部门";
this.title = "添加运营商";
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
listArea().then(response => {
this.areaOptions = response.rows;
});
});
},
/** 展开/折叠操作 */
@ -295,8 +315,12 @@ export default {
this.reset();
getDept(row.deptId).then(response => {
this.form = response.data;
this.$set(this.form, "areaIds", response.areaIds);
this.open = true;
this.title = "修改部门";
this.title = "修改运营商";
listArea().then(response => {
this.areaOptions = response.rows;
});
listDeptExcludeChild(row.deptId).then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
if (this.deptOptions.length == 0) {

View File

@ -43,8 +43,8 @@
<el-table-column label="id" align="center" prop="ruleId" />
<el-table-column label="套餐名称" align="center" prop="name" />
<el-table-column label="说明" align="center" prop="instructions" />
<el-table-column label="时间(小时)" align="center" prop="time" />
<el-table-column label="费用(元)" align="center" prop="fee" />
<!-- <el-table-column label="时间(小时)" align="center" prop="time" />
<el-table-column label="费用(元)" align="center" prop="fee" /> -->
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
@ -133,13 +133,13 @@
<el-form-item label="起步价">
<el-row :gutter="10">
<el-col :span="6">
<el-input v-model="startPrice" placeholder="请输入起步价" />
<el-input v-model="startingPrice" placeholder="请输入起步价" />
</el-col>
<el-col :span="2" style="line-height: 32px;">
</el-col>
<el-col :span="6">
<el-input v-model="startTime" placeholder="请输入起步时间" />
<el-input v-model="startingTime" placeholder="请输入起步时间" />
</el-col>
<el-col :span="2" style="line-height: 32px;">
{{ timeUnit }})
@ -149,13 +149,13 @@
<el-form-item label="超出价">
<el-row :gutter="10">
<el-col :span="6">
<el-input v-model="exceedPrice" placeholder="请输入超出价格" />
<el-input v-model="timeoutPrice" placeholder="请输入超出价格" />
</el-col>
<el-col :span="2" style="line-height: 32px;">
/
</el-col>
<el-col :span="6">
<el-input v-model="exceedTime" placeholder="请输入超出时间" />
<el-input v-model="timeoutTime" placeholder="请输入超出时间" />
</el-col>
<el-col :span="4" style="line-height: 32px;">
{{ timeUnit }}超出起步价后
@ -339,10 +339,10 @@ export default {
// chargingCycle: 1, //
// chargingCycleValue: '', //
},
exceedTime: '',
startPrice: '',
startTime: '',
exceedPrice: '',
timeoutTime: '',
startingPrice: '',
startingTime: '',
timeoutPrice: '',
enablelnterval: false,
rule: [{ start: '', end: '', eachUnit: '', fee: '' }],
more: { start: '', end: '9999', eachUnit: '', fee: '' },
@ -452,10 +452,10 @@ export default {
this.enablelnterval = false,
this.more = { start: '', end: '9999', eachUnit: '', fee: '' }
this.rule = [{ start: '', end: '', eachUnit: '', fee: '' }],
this.exceedTime = '',
this.startPrice = '',
this.startTime = '',
this.exceedPrice = '',
this.timeoutTime = '',
this.startingPrice = '',
this.startingTime = '',
this.timeoutPrice = '',
this.resetForm("form")
},
handleQuery() {
@ -481,13 +481,20 @@ export default {
const ruleId = row.ruleId || this.ids;
getFee(ruleId).then(response => {
this.form = response.data;
if(this.form.rentalUnit=='minutes'){
this.timeUnit='分钟'
}else if(this.form.rentalUnit=='hours'){
this.timeUnit='小时'
}else if(this.form.rentalUnit=='day'){
this.timeUnit='天'
}
// delete this.form.ridingRuleJson;
let json = JSON.parse(response.data.ridingRuleJson)
if (this.form.ridingRule == 1) {
this.exceedTime = json.exceedTime
this.startPrice = json.startPrice
this.startTime = json.startTime
this.exceedPrice = json.exceedPrice
this.timeoutTime = json.timeoutTime
this.startingPrice = json.startingPrice
this.startingTime = json.startingTime
this.timeoutPrice = json.timeoutPrice
} else {
this.rule = json.rule.slice(0, -1);
@ -514,10 +521,10 @@ export default {
data.ridingRuleJson.enablelnterval = this.enablelnterval
} else {
data.ridingRuleJson.exceedTime = this.exceedTime
data.ridingRuleJson.startPrice = this.startPrice
data.ridingRuleJson.startTime = this.startTime
data.ridingRuleJson.exceedPrice = this.exceedPrice
data.ridingRuleJson.timeoutTime = this.timeoutTime
data.ridingRuleJson.startingPrice = this.startingPrice
data.ridingRuleJson.startingTime = this.startingTime
data.ridingRuleJson.timeoutPrice = this.timeoutPrice
}
data.ridingRuleJson = JSON.stringify(data.ridingRuleJson);
@ -566,10 +573,10 @@ export default {
this.enablelnterval = false
this.rule = [{ start: '', end: '', eachUnit: '', fee: '' }]
this.exceedTime = ''
this.startPrice = ''
this.startTime = ''
this.exceedPrice = ''
this.timeoutTime = ''
this.startingPrice = ''
this.startingTime = ''
this.timeoutPrice = ''
}
},
}

View File

@ -207,6 +207,18 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="分账项目" prop="dividendItemIds">
<el-checkbox-group v-model="form.dividendItemIds" size="medium">
<el-checkbox
v-for="dict in dict.type.et_dividend_item"
:key="dict.value"
:label="dict.value">
{{dict.label}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="dividendStatus">
<el-radio-group v-model="form.dividendStatus">
@ -244,7 +256,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "User",
dicts: ['et_dividend_status', 'sys_user_sex'],
dicts: ['et_dividend_status', 'sys_user_sex','et_dividend_item'],
components: { Treeselect },
data() {
return {
@ -323,6 +335,9 @@ export default {
{ required: true, message: "分账比例不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '分账比例必须为正整数', trigger: 'blur' }
],
dividendItemIds: [
{ required: true, message: "分账项目不能为空", trigger: "blur" },
],
cooperationTime: [
{ required: true, message: "请选择合作时间", trigger: "blur" }
],
@ -409,6 +424,7 @@ export default {
nickName: undefined,
password: undefined,
phonenumber: undefined,
dividendItemIds: [],
email: undefined,
sex: undefined,
dividendStatus: undefined,

View File

@ -1,12 +1,12 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<!--运营商数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
placeholder="请输入运营商名称"
clearable
size="small"
prefix-icon="el-icon-search"
@ -141,7 +141,7 @@
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="运营商" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope">
@ -212,8 +212,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
<el-form-item label="归属运营商" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属运营商" />
</el-form-item>
</el-col>
</el-row>
@ -368,11 +368,11 @@ export default {
userList: null,
//
title: "",
//
//
deptOptions: undefined,
//
open: false,
//
//
deptName: undefined,
//
initPassword: undefined,
@ -418,7 +418,7 @@ export default {
{ key: 0, label: `用户编号`, visible: true },
{ key: 1, label: `用户名称`, visible: true },
{ key: 2, label: `用户昵称`, visible: true },
{ key: 3, label: `部门`, visible: true },
{ key: 3, label: `运营商`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 5, label: `状态`, visible: true },
{ key: 6, label: `创建时间`, visible: true }
@ -455,7 +455,7 @@ export default {
};
},
watch: {
//
//
deptName(val) {
this.$refs.tree.filter(val);
}
@ -478,7 +478,7 @@ export default {
}
);
},
/** 查询部门下拉树结构 */
/** 查询运营商下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;

View File

@ -549,7 +549,7 @@ export default {
handleBandSysUser(row){
this.reset();
const userId = row.userId || this.ids;
getSysUserList(userId).then(response => {
getSysUserList({"userType":"00"}).then(response => {
this.sysUserOptions = response.rows;
this.form.userId = userId;
this.open2 = true;