利润配置
@@ -6,12 +6,12 @@
|
|||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 莳松管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 莳松管理系统/开发环境
|
# 寻驾招生管理系统/开发环境
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
JWL_API = ''
|
JWL_API = ''
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 莳松管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 莳松管理系统/生产环境
|
# 寻驾招生管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/duima'
|
VUE_APP_BASE_API = '/duima'
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 莳松管理系统
|
VUE_APP_TITLE = 寻驾招生管理系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
# 测试环境配置
|
# 测试环境配置
|
||||||
ENV = 'staging'
|
ENV = 'staging'
|
||||||
|
|
||||||
# 莳松管理系统/测试环境
|
# 寻驾招生管理系统/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "river",
|
"name": "river",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "莳松管理系统",
|
"description": "寻驾招生管理系统",
|
||||||
"author": "莳松",
|
"author": "寻驾招生",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 137 KiB |
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 106 KiB |
@@ -51,3 +51,11 @@ export function cloneClassType(data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function batchUpdateProfit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/sch/classType/profit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -27,7 +27,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '莳松管理系统',
|
title: '寻驾招生管理系统',
|
||||||
logo: logoImg
|
logo: logoImg
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ export default {
|
|||||||
.card-panel-description {
|
.card-panel-description {
|
||||||
float: right;
|
float: right;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 26px;
|
margin: 26px 0px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
|
||||||
.card-panel-text {
|
.card-panel-text {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
<h3 class="title">莳松管理系统</h3>
|
<h3 class="title">寻驾招生管理系统</h3>
|
||||||
<el-tabs v-model="activeName" type="card">
|
<el-tabs v-model="activeName" type="card">
|
||||||
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
||||||
<wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
<wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">莳松管理系统</h3>
|
<h3 class="title">寻驾招生管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
|
|||||||
155
src/views/sch/classType/components/ProfitSettingDialog.vue
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="利润配置" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px"
|
||||||
|
@close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top">
|
||||||
|
<el-form-item label="利润类型" prop="profitType">
|
||||||
|
<el-radio-group v-model="dialogForm.profitType" @change="profitTypeChange">
|
||||||
|
<el-radio :label="1">底价</el-radio>
|
||||||
|
<el-radio :label="2">比例</el-radio>
|
||||||
|
<el-radio :label="3">固定</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润参数" prop="profitParam">
|
||||||
|
<el-input v-show="dialogForm.profitType != 3" v-model="dialogForm.profitParam" maxlength="100"
|
||||||
|
placeholder="请输入" clearable />
|
||||||
|
<div v-show="dialogForm.profitType == 3" style="text-align: center;">
|
||||||
|
<el-table :data="dialogForm.profitParamVOList" stripe border>
|
||||||
|
<el-table-column label="下限" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.min'" :rules="dataRule['min']">
|
||||||
|
<el-input v-model="scope.row.min" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上限" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.max'" :rules="dataRule['max']">
|
||||||
|
<el-input v-model="scope.row.max" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.profit'" :rules="dataRule['profit']">
|
||||||
|
<el-input v-model="scope.row.profit" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleProfitParamDelete(scope.$index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button plain @click="handleAddProfitParam">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible = false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { batchUpdateProfit } from '@/api/sch/classType';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProfitSettingDialog',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
typeIds: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
profitParamVOList: [{
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
profitType: [{ required: true, message: '利润类型不能为空', trigger: 'blur' }],
|
||||||
|
min: [{ required: true, message: '上限不能为空', trigger: 'blur' }],
|
||||||
|
max: [{ required: true, message: '下限不能为空', trigger: 'blur' }],
|
||||||
|
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }]
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.canSubmit = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = { ...this.dialogForm, ...info };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm() {
|
||||||
|
this.dialogForm = {
|
||||||
|
typeIds: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
profitParamVOList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
handleAddProfitParam() {
|
||||||
|
this.dialogForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleProfitParamDelete(index) {
|
||||||
|
console.log(index);
|
||||||
|
this.dialogForm.profitParamVOList.splice(index, 1);
|
||||||
|
},
|
||||||
|
profitTypeChange(type) {
|
||||||
|
if (type == 3) {
|
||||||
|
this.dialogForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$set(this.dialogForm, "profitParamVOList", []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit() {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.canSubmit = false;
|
||||||
|
// 校验完成,调接口
|
||||||
|
batchUpdateProfit(this.dialogForm)
|
||||||
|
.then((resp) => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
if (resp.code == 200) {
|
||||||
|
this.$message.success('保存成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.canSubmit = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -3,39 +3,50 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-input v-model="searchName" placeholder="请输入驾校名称" clearable prefix-icon="el-icon-search" style="margin-bottom: 20px" />
|
<el-input v-model="searchName" placeholder="请输入驾校名称" clearable prefix-icon="el-icon-search"
|
||||||
|
style="margin-bottom: 20px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container" style="max-height: 700px;overflow-y: auto">
|
<div class="head-container" style="max-height: 700px;overflow-y: auto">
|
||||||
<el-tree ref="tree" :data="schoolOption.filter(item => item.label.includes(searchName))" accordion node-key="id" :default-expanded-keys="selectNodes.map(item => item.id)" @node-click="handleNodeClick" />
|
<el-tree ref="tree" :data="schoolOption.filter(item => item.label.includes(searchName))" accordion node-key="id"
|
||||||
|
:default-expanded-keys="selectNodes.map(item => item.id)" @node-click="handleNodeClick" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="queryParams.typeName" placeholder="请输入班型名称" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.typeName" placeholder="请输入班型名称" clearable style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="queryParams.licenseType" clearable placeholder="选择驾照类型">
|
<el-select v-model="queryParams.licenseType" clearable placeholder="选择驾照类型">
|
||||||
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
|
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="item.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="queryParams.status" placeholder="班型状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="班型状态" clearable>
|
||||||
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus"
|
||||||
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
@click="handleAdd">新增</el-button>
|
||||||
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple" @click="handleClone">克隆</el-button>
|
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple"
|
||||||
|
@click="handleDelete">删除</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple"
|
||||||
|
@click="handleClone">克隆</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:profit']" type="primary" :disabled="multiple"
|
||||||
|
@click="handleProfit()">利润配置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading.tableLoading" :data="tableDataList" stripe border @selection-change="handleSelectionChange">
|
<el-table v-loading="loading.tableLoading" :data="tableDataList" stripe border
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
@@ -47,6 +58,14 @@
|
|||||||
<el-table-column label="报价" prop="currentPrice" width="60" />
|
<el-table-column label="报价" prop="currentPrice" width="60" />
|
||||||
<el-table-column label="底价" prop="minPrice" width="60" />
|
<el-table-column label="底价" prop="minPrice" width="60" />
|
||||||
<el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip />
|
<el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column label="利润类型" prop="profitType" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.profitType == 1">底价</span>
|
||||||
|
<span v-else-if="scope.row.profitType == 2">比例</span>
|
||||||
|
<span v-else>固定</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润参数" prop="profitParamShow" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
|
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
|
||||||
<el-table-column label="创建时间" width="160">
|
<el-table-column label="创建时间" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -55,18 +74,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="130">
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-hasPermi="['sch:classType:edit']" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
<el-button v-hasPermi="['sch:classType:edit']" type="text" icon="el-icon-edit"
|
||||||
<el-button v-hasPermi="['sch:classType:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
@click="handleUpdate(scope.row)">修改</el-button>
|
||||||
|
<el-button v-hasPermi="['sch:classType:remove']" type="text" icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getPageList" />
|
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getPageList" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-dialog title="班型设置" :visible.sync="modalVisible" width="500px" append-to-body :close-on-click-modal="false">
|
<el-dialog title="班型设置" :visible.sync="modalVisible" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="80px">
|
<el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -90,7 +111,8 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="驾照类型" prop="licenseType">
|
<el-form-item label="驾照类型" prop="licenseType">
|
||||||
<el-select v-model="modalForm.licenseType" placeholder="选择驾照类型">
|
<el-select v-model="modalForm.licenseType" placeholder="选择驾照类型">
|
||||||
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
|
<el-option v-for="item in licenseTypeOption" :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="item.dictValue" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -140,11 +162,56 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态" prop="currentPrice">
|
<el-form-item label="状态" prop="currentPrice">
|
||||||
<el-radio-group v-model="modalForm.status">
|
<el-radio-group v-model="modalForm.status">
|
||||||
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel
|
||||||
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="利润类型" prop="profitType">
|
||||||
|
<el-radio-group v-model="modalForm.profitType" @change="profitTypeChange">
|
||||||
|
<el-radio :label="1">底价</el-radio>
|
||||||
|
<el-radio :label="2">比例</el-radio>
|
||||||
|
<el-radio :label="3">固定</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="利润参数" prop="profitParam">
|
||||||
|
<el-input v-show="modalForm.profitType != 3" v-model="modalForm.profitParam" maxlength="100" placeholder="请输入"
|
||||||
|
clearable />
|
||||||
|
<div v-show="modalForm.profitType == 3" style="text-align: center;">
|
||||||
|
<el-table :data="modalForm.profitParamVOList" stripe border>
|
||||||
|
<el-table-column label="下限">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.min'" :rules="modalRules['min']">
|
||||||
|
<el-input v-model="scope.row.min" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上限">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.max'" :rules="modalRules['max']">
|
||||||
|
<el-input v-model="scope.row.max" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="利润">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-form-item :prop="'profitParamVOList.' + scope.$index + '.profit'" :rules="modalRules['profit']">
|
||||||
|
<el-input v-model="scope.row.profit" placeholder="请输入" clearable type="number" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleProfitParamDelete(scope.$index)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-button plain @click="handleAddProfitParam">新增</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
<!-- <el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="是否克隆到场地" prop="currentPrice">
|
<el-form-item label="是否克隆到场地" prop="currentPrice">
|
||||||
@@ -158,7 +225,8 @@
|
|||||||
</el-row> -->
|
</el-row> -->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="描述" prop="description">
|
<el-form-item label="描述" prop="description">
|
||||||
<el-input v-model="modalForm.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
|
<el-input v-model="modalForm.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
placeholder="请输入描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -185,6 +253,9 @@
|
|||||||
<el-button @click="cloneOpen = false">取 消</el-button>
|
<el-button @click="cloneOpen = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 利润配置表 -->
|
||||||
|
<ProfitSettingDialog ref="ProfitSettingDialog" @refreshDataList="getPageList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -192,9 +263,13 @@
|
|||||||
import { getClassTypeTableList, updateClassType, insertClassType, deleteClassType, cloneClassType } from '@/api/sch/classType';
|
import { getClassTypeTableList, updateClassType, insertClassType, deleteClassType, cloneClassType } from '@/api/sch/classType';
|
||||||
import { validateMoney } from '@/utils/validate';
|
import { validateMoney } from '@/utils/validate';
|
||||||
import { getMapData } from '@/api/sch/place';
|
import { getMapData } from '@/api/sch/place';
|
||||||
|
import ProfitSettingDialog from './components/ProfitSettingDialog.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Classtype',
|
name: 'Classtype',
|
||||||
|
components: {
|
||||||
|
ProfitSettingDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchName: '',
|
searchName: '',
|
||||||
@@ -238,7 +313,10 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
message: '场地不为空',
|
message: '场地不为空',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
},
|
||||||
|
min: [{ required: true, message: '上限不能为空', trigger: 'blur' }],
|
||||||
|
max: [{ required: true, message: '下限不能为空', trigger: 'blur' }],
|
||||||
|
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
schoolOption: [],
|
schoolOption: [],
|
||||||
placeOption: [],
|
placeOption: [],
|
||||||
@@ -316,7 +394,7 @@ export default {
|
|||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
if (this.selectNodes.length < 1) {
|
if (this.selectNodes.length < 1) {
|
||||||
this.msgError('请选择左侧驾校或场地');
|
this.$message.error('请选择左侧驾校或场地');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.resetForm('modalForm');
|
this.resetForm('modalForm');
|
||||||
@@ -335,7 +413,10 @@ export default {
|
|||||||
orderMinPrice: undefined,
|
orderMinPrice: undefined,
|
||||||
enterMinPrice: undefined,
|
enterMinPrice: undefined,
|
||||||
companyMinPrice: undefined,
|
companyMinPrice: undefined,
|
||||||
employeeMinPrice: undefined
|
employeeMinPrice: undefined,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined,
|
||||||
|
profitParamVOList: []
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.selectNodes.length > 1) {
|
if (this.selectNodes.length > 1) {
|
||||||
@@ -463,6 +544,38 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 利润配置
|
||||||
|
handleProfit() {
|
||||||
|
const item = {
|
||||||
|
typeIds: this.ids,
|
||||||
|
profitType: 1,
|
||||||
|
profitParam: undefined
|
||||||
|
};
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ProfitSettingDialog.init(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAddProfitParam() {
|
||||||
|
this.modalForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleProfitParamDelete(index) {
|
||||||
|
console.log(index);
|
||||||
|
this.modalForm.profitParamVOList.splice(index, 1);
|
||||||
|
},
|
||||||
|
profitTypeChange(type) {
|
||||||
|
this.$set(this.modalForm, "profitParamVOList", []);
|
||||||
|
if (type == 3) {
|
||||||
|
this.modalForm.profitParamVOList.push({
|
||||||
|
min: 0,
|
||||||
|
max: undefined,
|
||||||
|
profit: undefined
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -629,15 +629,35 @@ export default {
|
|||||||
},
|
},
|
||||||
priceChange() {
|
priceChange() {
|
||||||
// 计算驾校支付款 报名价格-班型底价
|
// 计算驾校支付款 报名价格-班型底价
|
||||||
if (this.modalForm.signClass && this.modalForm.signPrice) {
|
// if (this.modalForm.signClass && this.modalForm.signPrice) {
|
||||||
const minprice = this.classTypeOptions.find(
|
// const minprice = this.classTypeOptions.find(
|
||||||
(item) => item.typeId == this.modalForm.signClass
|
// (item) => item.typeId == this.modalForm.signClass
|
||||||
).minPrice;
|
// ).minPrice;
|
||||||
if (minprice) {
|
// if (minprice) {
|
||||||
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice);
|
// this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice);
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
|
// this.$set(this.modalForm, 'schoolPay', undefined);
|
||||||
|
// }
|
||||||
this.$set(this.modalForm, 'schoolPay', undefined);
|
this.$set(this.modalForm, 'schoolPay', undefined);
|
||||||
|
if (this.modalForm.signClass && this.modalForm.signPrice) {
|
||||||
|
const classType = this.classTypeOptions.find(
|
||||||
|
(item) => item.typeId == this.modalForm.signClass
|
||||||
|
);
|
||||||
|
if (classType.profitType == 1) {
|
||||||
|
// 底价
|
||||||
|
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - classType.minPrice);
|
||||||
|
} else if (classType.profitType == 2) {
|
||||||
|
// 比例提成
|
||||||
|
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice * Number(classType.profitParam));
|
||||||
|
} else {
|
||||||
|
// 固定值
|
||||||
|
classType.profitParamVOList.forEach(item => {
|
||||||
|
if (item.min <= this.modalForm.signPrice && item.max >= this.modalForm.signPrice) {
|
||||||
|
this.$set(this.modalForm, 'schoolPay', item.profit);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getZhuangDanPeople(clueId) {
|
getZhuangDanPeople(clueId) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function resolve(dir) {
|
|||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || '莳松管理系统'; // 网页标题
|
const name = process.env.VUE_APP_TITLE || '寻驾招生管理系统'; // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80; // 端口
|
const port = process.env.port || process.env.npm_config_port || 80; // 端口
|
||||||
|
|
||||||
|
|||||||