6 Commits

Author SHA1 Message Date
zcx
f6c6002eda bug 2023-12-11 14:08:14 +08:00
zcx
ecc49ec019 利润配置 2023-12-07 16:20:42 +08:00
zcx
ed848edfd9 邀约 2023-10-19 17:39:12 +08:00
zcx
f8eda78cf7 vip 2023-10-18 17:33:26 +08:00
zcx
6b22078098 驾校二维码 2023-10-17 17:25:49 +08:00
0a771cfa54 Merge pull request '题库加货车' (#15) from dev-qsh into master
Reviewed-on: http://114.55.169.15:3000/qiushanhe/dm-manage-web/pulls/15
2023-10-11 11:51:18 +08:00
25 changed files with 631 additions and 47 deletions

View File

@@ -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 = ''

View File

@@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 莳松管理系统 VUE_APP_TITLE = 寻驾招生管理系统
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 莳松管理系统/生产环境 # 寻驾招生管理系统/生产环境
VUE_APP_BASE_API = '/duima' VUE_APP_BASE_API = '/duima'

View File

@@ -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'

View File

@@ -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",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -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
});
}

View File

@@ -39,5 +39,11 @@ export default {
url: `/sch/school/${id}`, url: `/sch/school/${id}`,
method: 'delete' method: 'delete'
}); });
},
createCode(id){
return request({
url: `/sch/school/create/${id}`,
method: 'post'
});
} }
}; };

39
src/api/vip.js Normal file
View File

@@ -0,0 +1,39 @@
import request from '@/utils/request';
// 查询车型列表
export function getCarList(param) {
return request({
url: '/driver-api/tdSysUserMember/duima/car/list',
method: 'get',
params: param
});
}
// 查询会员列表
export function getMemberList(param) {
return request({
url: '/driver-api/tdSysUserMember/duima/member/list',
method: 'get',
params: param
});
}
// 查询用户会员列表
export function getUserMemberList(param) {
return request({
url: '/driver-api/tdSysUserMember/duima/user/member/list',
method: 'get',
params: param
});
}
//新增会员
export function addUserMember(data) {
return request({
url: '/driver-api/tdSysUserMember/duima/user/member',
method: 'post',
data: data
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/logo/logo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@@ -27,7 +27,7 @@ export default {
}, },
data() { data() {
return { return {
title: '莳松管理系统', title: '寻驾招生管理系统',
logo: logoImg logo: logoImg
}; };
}, },

View File

@@ -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 {

View File

@@ -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">

View File

@@ -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" />

View 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>

View File

@@ -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
});
}
} }
} }
}; };

View File

@@ -22,6 +22,12 @@
<el-table-column label="负责人" prop="leader" /> <el-table-column label="负责人" prop="leader" />
<el-table-column label="联系方式" prop="phone" /> <el-table-column label="联系方式" prop="phone" />
<el-table-column label="备注" prop="remark" /> <el-table-column label="备注" prop="remark" />
<el-table-column label="小程序二维码" prop="jwlCodePath" >
<template slot-scope="scope">
<el-image v-if="scope.row.jwlCodePath != undefined" style="width: 100px; height: 100px" :src="baseUrl + scope.row.jwlCodePath" ></el-image>
<el-button v-else v-hasPermi="['sch:school:create']" type="text" icon="el-icon-edit" @click="handleCreate(scope.row)">生成</el-button>
</template>
</el-table-column>
<el-table-column label="创建时间" width="160"> <el-table-column label="创建时间" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -62,7 +68,8 @@ export default {
loading: { loading: {
tableLoading: false tableLoading: false
}, },
dialogVisible: false dialogVisible: false,
baseUrl: process.env.VUE_APP_BASE_API
}; };
}, },
created() { created() {
@@ -101,6 +108,14 @@ export default {
this.$refs.dialogForm.init(item); this.$refs.dialogForm.init(item);
}); });
}, },
handleCreate(item){
schoolApi.createCode(item.schoolId).then(resp => {
if (resp.code === 200) {
this.getPageList();
this.$modal.msgSuccess('生成成功');
}
})
},
// 删除操作 // 删除操作
handleDelete(item) { handleDelete(item) {
this.$modal this.$modal

View File

@@ -0,0 +1,113 @@
<template>
<el-dialog title="VIP" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="500px" @close="closeDialog">
<div>
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" @keyup.enter.native="dialogFormSubmit()">
<el-row>
<el-col :span="24">
<el-form-item label="手机号" prop="phone">
<el-input v-model="dialogForm.phone" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="车型" prop="carTypeId">
<el-select v-model="dialogForm.carTypeId" clearable placeholder="选择车型">
<el-option v-for="item in carOptions" :key="item.carTypeId" :label="item.carName" :value="item.carTypeId" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="会员" prop="memberId">
<el-select v-model="dialogForm.memberId" clearable placeholder="选择车型">
<el-option v-for="item in memberOptions.filter(item => item.carTypeId === dialogForm.carTypeId)" :key="item.memberId" :label="item.memberName" :value="item.memberId" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</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 { addUserMember, getCarList, getMemberList } from '@/api/vip';
export default {
name:"VipForm",
data() {
return {
visible: false,
canSubmit: true,
dialogForm: {
userId: undefined,
memberId: undefined,
phone: undefined
},
dataRule: {
phone: [{ required: true, message: '手机号不为空', trigger: 'blur' },
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }], carTypeId: [{ required: true, message: '车型不能为空', trigger: 'blur' }],
memberId: [{ required: true, message: '会员不能为空', trigger: 'blur' }]
},
carOptions:[],
memberOptions:[]
};
},
methods: {
init(info = undefined) {
// debugger
this.visible = true;
this.getCarList();
this.getMemberList();
this.$nextTick(() => {
this.resetDialogForm();
// this.$refs['dialogForm'].resetFields();
if (info) {
this.dialogForm = this.deepClone(info);
}
});
},
resetDialogForm() {
this.dialogForm = {
userId: undefined,
memberId: undefined,
phone: undefined
};
},
closeDialog() {
this.$emit('update:dialogVisible', false);
},
// 表单提交
dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
addUserMember(this.dialogForm).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('新增成功');
this.$emit('update');
this.visible = false;
}
});
}
});
},
getCarList(){
getCarList().then(resp => {
this.carOptions = resp.data;
})
},
getMemberList(){
getMemberList().then(resp => {
this.memberOptions = resp.data
})
}
}
};
</script>

96
src/views/vip/index.vue Normal file
View File

@@ -0,0 +1,96 @@
<template>
<div class="app-container" >
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent>
<el-row :gutter="20">
<el-form-item label="手机号">
<el-input v-model="queryParams.phone" placeholder="请输入" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-row>
<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-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" >
<el-table-column type="index" width="55" align="center" />
<el-table-column label="手机号" align="center" prop="phone" min-width="140" />
<el-table-column label="会员名" align="center" prop="memberName" min-width="140"/>
<el-table-column label="车型" align="center" prop="carName" min-width="100" />
<el-table-column label="科目" align="center" prop="subjects" min-width="100"/>
<el-table-column label="开始时间" align="center" prop="startDate" min-width="100"/>
<el-table-column label="结束时间" align="center" prop="endDate" min-width="100"/>
<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-download" @click="handleEdit(scope.row)">编辑</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" /> -->
<VipForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @update="getList" />
</div>
</template>
<script>
import { getUserMemberList } from '@/api/vip';
import VipForm from './components/VipForm.vue'
export default {
name: 'Vip',
components:{
VipForm
},
data() {
return {
// 遮罩层
loading: false,
// 总条数
total: 0,
tableList: [],
// 查询参数
queryParams: {
phone: undefined
},
dialogVisible: false,
dialogAddVisible: false
};
},
created() {
this.getList();
},
methods: {
/** 查询文件列表 */
getList() {
this.loading = true;
getUserMemberList(this.queryParams).then(response => {
this.tableList = response.data;
// this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.question = '';
this.handleQuery();
},
handleAdd(item) {
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.dialogForm.init(item);
});
}
}
};
</script>

View File

@@ -30,6 +30,8 @@
<!-- :disabled="!canSubmit" --> <!-- :disabled="!canSubmit" -->
<el-button class="footer_button" :disabled="!canSubmit" type="primary" @click="clueSubmit"> </el-button> <el-button class="footer_button" :disabled="!canSubmit" type="primary" @click="clueSubmit"> </el-button>
<el-button class="footer_button" @click="toBackClue"> </el-button> <el-button class="footer_button" @click="toBackClue"> </el-button>
<el-button class="footer_button" v-if="!clueForm.state" v-hasPermi="['zs:clue:discard']" type="primary" @click="handleDiscard()">释放</el-button>
</div> </div>
</div> </div>
<el-divider /> <el-divider />
@@ -163,9 +165,9 @@
</template> </template>
<script> <script>
import { getClueInfo, getConsultRecord, addClue, updateClue, } from '@/api/zs/clue' import { getClueInfo, getConsultRecord, addClue, updateClue, discardClue} from '@/api/zs/clue';
import empApi from '@/api/system/employee' import empApi from '@/api/system/employee';
import { getAllPlaces } from '@/api/sch/place' import { getAllPlaces } from '@/api/sch/place';
import PlaceMap from './components/PlaceMap.vue'; import PlaceMap from './components/PlaceMap.vue';
import FollowRecord from './components/FollowRecord.vue'; import FollowRecord from './components/FollowRecord.vue';
@@ -360,7 +362,24 @@ export default {
toBackClue() { toBackClue() {
const obj = { path: "/zs/clue" }; const obj = { path: "/zs/clue" };
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj);
} },
// 释放线索操作
handleDiscard() {
this.$confirm('是否确认释放该条线索(“' + this.clueForm.name + '/' + this.clueForm.phone + '”)到公海?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then((res) => {
discardClue(this.clueForm).then((resp) => {
if (resp && resp.code === 200) {
this.$message.success('释放成功');
this.toBackClue();
}
});
})
.catch(function () { });
},
} }
}; };

View File

@@ -629,15 +629,35 @@ export default {
}, },
priceChange() { priceChange() {
// 计算驾校支付款 报名价格-班型底价 // 计算驾校支付款 报名价格-班型底价
// if (this.modalForm.signClass && this.modalForm.signPrice) {
// const minprice = this.classTypeOptions.find(
// (item) => item.typeId == this.modalForm.signClass
// ).minPrice;
// if (minprice) {
// this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice);
// }
// } else {
// this.$set(this.modalForm, 'schoolPay', undefined);
// }
this.$set(this.modalForm, 'schoolPay', undefined);
if (this.modalForm.signClass && this.modalForm.signPrice) { if (this.modalForm.signClass && this.modalForm.signPrice) {
const minprice = this.classTypeOptions.find( const classType = this.classTypeOptions.find(
(item) => item.typeId == this.modalForm.signClass (item) => item.typeId == this.modalForm.signClass
).minPrice; );
if (minprice) { if (classType.profitType == 1) {
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice); // 底价
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);
}
});
} }
} else {
this.$set(this.modalForm, 'schoolPay', undefined);
} }
}, },
getZhuangDanPeople(clueId) { getZhuangDanPeople(clueId) {

View File

@@ -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; // 端口
@@ -34,8 +34,8 @@ module.exports = {
open: true, open: true,
proxy: { proxy: {
[process.env.VUE_APP_BASE_API + '/driver-api']: { [process.env.VUE_APP_BASE_API + '/driver-api']: {
target: `http://118.31.23.45:8888/driver-api/`, // target: `http://118.31.23.45:8888/driver-api/`,
// target: `http://localhost:8888/driver-api/`, target: `http://localhost:8888/driver-api/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: '' ['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''