利润配置

master
zcx 12 months ago
parent ed848edfd9
commit ecc49ec019
  1. 4
      .env.development
  2. 4
      .env.production
  3. 4
      .env.staging
  4. 4
      package.json
  5. BIN
      public/favicon.ico
  6. BIN
      public/favicon1.ico
  7. BIN
      public/logo.png
  8. 8
      src/api/sch/classType.js
  9. BIN
      src/assets/logo/logo.png
  10. BIN
      src/assets/logo/logo1.png
  11. BIN
      src/assets/logo/logo2.png
  12. 2
      src/layout/components/Sidebar/Logo.vue
  13. 2
      src/views/index.vue
  14. 2
      src/views/login.vue
  15. 2
      src/views/register.vue
  16. 155
      src/views/sch/classType/components/ProfitSettingDialog.vue
  17. 155
      src/views/sch/classType/index.vue
  18. 32
      src/views/zs/sign/components/SignFormDialog.vue
  19. 2
      vue.config.js

@ -6,12 +6,12 @@
# @Description:
###
# 页面标题
VUE_APP_TITLE = 莳松管理系统
VUE_APP_TITLE = 寻驾招生管理系统
# 开发环境配置
ENV = 'development'
# 莳松管理系统/开发环境
# 寻驾招生管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
JWL_API = ''

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

@ -1,10 +1,10 @@
# 页面标题
VUE_APP_TITLE = 莳松管理系统
VUE_APP_TITLE = 寻驾招生管理系统
NODE_ENV = production
# 测试环境配置
ENV = 'staging'
# 莳松管理系统/测试环境
# 寻驾招生管理系统/测试环境
VUE_APP_BASE_API = '/stage-api'

@ -1,8 +1,8 @@
{
"name": "river",
"version": "1.0.0",
"description": "莳松管理系统",
"author": "莳松",
"description": "寻驾招生管理系统",
"author": "寻驾招生",
"license": "MIT",
"scripts": {
"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

@ -51,3 +51,11 @@ export function cloneClassType(data) {
data: data
});
}
export function batchUpdateProfit(data) {
return request({
url: '/sch/classType/profit',
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

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

@ -399,7 +399,7 @@ export default {
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin: 26px 0px;
margin-left: 0px;
.card-panel-text {

@ -1,7 +1,7 @@
<template>
<div class="login">
<div class="login-form">
<h3 class="title">莳松管理系统</h3>
<h3 class="title">寻驾招生管理系统</h3>
<el-tabs v-model="activeName" type="card">
<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">

@ -1,7 +1,7 @@
<template>
<div class="register">
<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-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

@ -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-col :span="6">
<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 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>
</el-col>
<el-col :span="18">
<el-row :gutter="20">
<el-form ref="queryForm" :model="queryParams" :inline="true">
<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-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-form-item>
<el-form-item>
<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-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</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: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:add']" type="primary" icon="el-icon-plus"
@click="handleAdd">新增</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>
</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="index" width="50" />
@ -47,6 +58,14 @@
<el-table-column label="报价" prop="currentPrice" 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="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="创建时间" width="160">
<template slot-scope="scope">
@ -55,18 +74,20 @@
</el-table-column>
<el-table-column label="操作" fixed="right" width="130">
<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:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<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:remove']" type="text" icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</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-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-row>
<el-col :span="12">
@ -90,7 +111,8 @@
<el-col :span="12">
<el-form-item label="驾照类型" prop="licenseType">
<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-form-item>
</el-col>
@ -140,11 +162,56 @@
<el-col :span="12">
<el-form-item label="状态" prop="currentPrice">
<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-form-item>
</el-col>
</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-col :span="24">
<el-form-item label="是否克隆到场地" prop="currentPrice">
@ -158,7 +225,8 @@
</el-row> -->
<el-row>
<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-row>
</el-form>
@ -185,6 +253,9 @@
<el-button @click="cloneOpen = false"> </el-button>
</div>
</el-dialog>
<!-- 利润配置表 -->
<ProfitSettingDialog ref="ProfitSettingDialog" @refreshDataList="getPageList" />
</div>
</template>
@ -192,9 +263,13 @@
import { getClassTypeTableList, updateClassType, insertClassType, deleteClassType, cloneClassType } from '@/api/sch/classType';
import { validateMoney } from '@/utils/validate';
import { getMapData } from '@/api/sch/place';
import ProfitSettingDialog from './components/ProfitSettingDialog.vue';
export default {
name: 'Classtype',
components: {
ProfitSettingDialog
},
data() {
return {
searchName: '',
@ -238,7 +313,10 @@ export default {
required: true,
message: '场地不为空',
trigger: 'change'
}
},
min: [{ required: true, message: '上限不能为空', trigger: 'blur' }],
max: [{ required: true, message: '下限不能为空', trigger: 'blur' }],
profit: [{ required: true, message: '利润不能为空', trigger: 'blur' }]
},
schoolOption: [],
placeOption: [],
@ -316,7 +394,7 @@ export default {
//
handleAdd() {
if (this.selectNodes.length < 1) {
this.msgError('请选择左侧驾校或场地');
this.$message.error('请选择左侧驾校或场地');
return;
}
this.resetForm('modalForm');
@ -335,7 +413,10 @@ export default {
orderMinPrice: undefined,
enterMinPrice: undefined,
companyMinPrice: undefined,
employeeMinPrice: undefined
employeeMinPrice: undefined,
profitType: 1,
profitParam: undefined,
profitParamVOList: []
};
if (this.selectNodes.length > 1) {
@ -463,7 +544,39 @@ 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
});
}
}
}
};
</script>

@ -629,15 +629,35 @@ export default {
},
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) {
const minprice = this.classTypeOptions.find(
const classType = this.classTypeOptions.find(
(item) => item.typeId == this.modalForm.signClass
).minPrice;
if (minprice) {
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice);
);
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);
}
});
}
} else {
this.$set(this.modalForm, 'schoolPay', undefined);
}
},
getZhuangDanPeople(clueId) {

@ -7,7 +7,7 @@ function resolve(dir) {
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; // 端口

Loading…
Cancel
Save