修改分佣页面

This commit is contained in:
axlrose2333 2023-04-10 18:09:02 +08:00
parent ae7e71da1c
commit f55f4fd73f
7 changed files with 66 additions and 41 deletions

16
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "针对 localhost 启动 Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}

View File

@ -26,7 +26,7 @@ const api = {
editAucitonData: data => { // 编辑竞拍
return service({
url: '/auction',
method: 'post',
method: 'put',
data
})
},

View File

@ -128,6 +128,7 @@ async function getSubject(){ // 获取课程分类
// subjectList.value = custom.addTreeFormatSubject(res.data.records,'id')
subjectList_inject.value = custom.addTreeFormatSubject(_.cloneDeep(res.data.records),'name')
subjectList.value = custom.addTreeFormatSubject( _.cloneDeep(res.data.records),'id')
//
}
}
async function uploadAction(file){// oss
@ -288,7 +289,7 @@ function goListFunc() {
<!-- :value="item.name"-->
<!-- />-->
<!-- </el-select>-->
<el-tree-select v-model="form.course_category_id" :data="subjectList" disabled="true" :render-after-expand="false" />
<el-tree-select v-model="form.course_category_id" :data="subjectList" :disabled="true" :render-after-expand="false" />
</el-form-item>
<el-form-item label="封面">
<el-upload

View File

@ -157,7 +157,7 @@ const drawFormRules = ref({
full_member:[{ required: true, message: '请输入满员人数', trigger: 'blur'},
{ type: 'number', message: '请输入正确的格式' }],
end_time:[{ required: true, message: '请输入截止时间', trigger: 'blur' }],
delay_time:[{ required: true, message: '请输入砸蛋时间', trigger: 'blur' }],
// delay_time:[{ required: true, message: '', trigger: 'blur' }],
begin_time:[{ required: true, message: '请输入开始时间', trigger: 'blur' }],
product_cover:[{ required: true, message: '请选择商品封面', trigger: 'blur' }],
egg_quantity:[{ required: true, message: '请输入金蛋数量', trigger: 'blur'},
@ -317,23 +317,22 @@ function getRandomNumber() {
drawForm.value.prize_number = ''
return
}
if(!drawForm.value.delay_time) {
if(!drawForm.value.end_time) {
ElMessage({
type: 'warning',
message: `请先设置砸蛋时间`,
message: `请先设置截止时间`,
})
drawForm.value.prize_number = ''
return
}
let rand_num = Math.random()
let rand_res = 1
if(!rand_num){
rand_num = 1
}
rand_res = Math.ceil(rand_num*drawForm.value.full_member)
// console.log(drawForm.value.end_time)
if(drawForm.value.delay_time < (Date.parse(new Date()))) { //
// console.log(rand_res)
if(drawForm.value.end_time < (Date.parse(new Date()))) { //
egg_mask.value = false
}
else{ //
@ -408,11 +407,11 @@ function getRandomNumber() {
{{custom.timestampToDate2(scope.row.end_time)}}
</template>
</el-table-column>
<el-table-column align="center" label="砸蛋日期" min-width="150" >
<template #default="scope">
{{custom.timestampToDate2(scope.row.delay_time)}}
</template>
</el-table-column>
<!-- <el-table-column align="center" label="砸蛋日期" min-width="150" >-->
<!-- <template #default="scope">-->
<!-- {{custom.timestampToDate2(scope.row.delay_time)}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="已参与人数" min-width="150" prop="in_member" />
<el-table-column align="center" label="金蛋数量" min-width="150" prop="egg_quantity" />
@ -535,15 +534,15 @@ function getRandomNumber() {
value-format="x"
/>
</el-form-item>
<el-form-item label="砸蛋日期" prop="delay_time" >
<el-date-picker
v-model="drawForm.delay_time"
type="datetime"
placeholder="砸蛋日期"
format="YYYY-MM-DD HH:mm:ss"
value-format="x"
/>
</el-form-item>
<!-- <el-form-item label="砸蛋日期" prop="delay_time" >-->
<!-- <el-date-picker-->
<!-- v-model="drawForm.delay_time"-->
<!-- type="datetime"-->
<!-- placeholder="砸蛋日期"-->
<!-- format="YYYY-MM-DD HH:mm:ss"-->
<!-- value-format="x"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="金蛋数量" prop="egg_quantity">
<el-input v-model.number="drawForm.egg_quantity" disabled="true" placeholder="请输入金蛋数量" autocomplete="off" />
</el-form-item>

View File

@ -16,17 +16,20 @@ const brokerageFormRules = ref({
exam_assistant: [{ required: true, message: '请输入助教佣金', trigger: 'blur' }],
exam_manage:[{ required: true, message: '请输入主管佣金', trigger: 'blur'},
{ type: 'number', message: '请输入正确的格式',trigger: 'blur' }],
exam_teacher:[{ required: true, message: '请输入教师佣金', trigger: 'blur'},
{ type: 'number', message: '请输入正确的格式',trigger: 'blur' }],
exam_assistant_assistant:[{ required: true, message: '请输入助教推荐助教佣金', trigger: 'blur'},
{ type: 'number', message: '请输入正确的格式' }],
exam_assistant_teacher:[{ required: true, message: '请输入助教推荐老师佣金', trigger: 'blur'},
{ type: 'number', message: '请输入正确的格式' }],
course_assistant:[{ required: true, message: '请输入助教佣金占比', trigger: 'blur' }],
course_manage:[{ required: true, message: '请输入主管佣金占比', trigger: 'blur' }],
course_teacher:[{ required: true, message: '请输入教师佣金占比', trigger: 'blur' }],
course_assistant_assistant:[{ required: true, message: '请输入助教推荐助教佣金占比', trigger: 'blur' }],
course_assistant_teacher:[{ required: true, message: '请输入助教推荐老师佣金占比', trigger: 'blur' }],
})
const brokerageFormRef = ref(null)
const std_percent_arr = ['course_assistant','course_manage','course_assistant_assistant','course_assistant_teacher']
const std_percent_arr = ['course_assistant','course_manage','course_teacher','course_assistant_assistant','course_assistant_teacher']
//
async function getBrokerage() {
const res = await api.getBrokerage()
@ -74,29 +77,35 @@ async function saveData() {
<el-form ref="brokerageFormRef" class="form-box" :model="brokerageForm" :rules="brokerageFormRules" label-width="180px" style="width:50%">
<el-form-item>测试题佣金设置</el-form-item>
<el-form-item label="助教(元/份)" prop="exam_assistant">
<el-input v-model.number="brokerageForm.exam_assistant" placeholder="请输入助教佣金" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.exam_assistant" placeholder="请输入助教佣金" autocomplete="off" />
</el-form-item>
<el-form-item label="主管(元/份)" prop="exam_manage">
<el-input v-model.number="brokerageForm.exam_manage" placeholder="请输入主管佣金" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.exam_manage" placeholder="请输入主管佣金" autocomplete="off" />
</el-form-item>
<el-form-item label="教师(元/份)" prop="exam_teacher">
<el-input type="number" v-model.number="brokerageForm.exam_teacher" placeholder="请输入教师佣金" autocomplete="off" />
</el-form-item>
<el-form-item label="助教推荐助教(元/份)" prop="exam_assistant_assistant">
<el-input v-model.number="brokerageForm.exam_assistant_assistant" placeholder="请输入助教推荐助教佣金" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.exam_assistant_assistant" placeholder="请输入助教推荐助教佣金" autocomplete="off" />
</el-form-item>
<el-form-item label="助教推荐老师(元/份)" prop="exam_assistant_teacher">
<el-input v-model.number="brokerageForm.exam_assistant_teacher" placeholder="请输入助教推荐老师佣金" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.exam_assistant_teacher" placeholder="请输入助教推荐老师佣金" autocomplete="off" />
</el-form-item>
<el-form-item>课程佣金设置</el-form-item>
<el-form-item label="助教(%)" prop="course_assistant">
<el-input v-model.number="brokerageForm.course_assistant" placeholder="请输入助教佣金占比" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.course_assistant" placeholder="请输入助教佣金占比" autocomplete="off" />
</el-form-item>
<el-form-item label="主管(%)" prop="course_manage">
<el-input v-model.number="brokerageForm.course_manage" placeholder="请输入主管佣金占比" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.course_manage" placeholder="请输入主管佣金占比" autocomplete="off" />
</el-form-item>
<el-form-item label="教师(%)" prop="course_teacher">
<el-input type="number" v-model.number="brokerageForm.course_teacher" placeholder="请输入教师佣金占比" autocomplete="off" />
</el-form-item>
<el-form-item label="助教推荐助教(%)" prop="course_assistant_assistant">
<el-input v-model.number="brokerageForm.course_assistant_assistant" placeholder="请输入助教推荐助教佣金占比" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.course_assistant_assistant" placeholder="请输入助教推荐助教佣金占比" autocomplete="off" />
</el-form-item>
<el-form-item label="助教推荐老师(%)" prop="course_assistant_teacher">
<el-input v-model.number="brokerageForm.course_assistant_teacher" placeholder="请输入助教推荐老师佣金占比" autocomplete="off" />
<el-input type="number" v-model.number="brokerageForm.course_assistant_teacher" placeholder="请输入助教推荐老师佣金占比" autocomplete="off" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(brokerageFormRef)">保存</el-button>

View File

@ -149,7 +149,7 @@ const dialogVisible = ref(false)
const mForm = ref({province: 0})
const mFormRef = ref(null)
const mFormRules = ref({
province: [{ required: true, message: '请选择管辖区域', trigger: 'blur' }],
// province: [{ required: true, message: '', trigger: 'blur' }],
user_id: [{ required: true, message: '请选择用户', trigger: 'blur' }]
})
function openDialog() {
@ -204,7 +204,7 @@ async function remoteMethod(query) {
<el-form-item label="主管名称">
<el-input v-model="queryParams.key" placeholder="根据主管名称进行查询" />
</el-form-item>
<el-form-item label="管辖区域">
<!-- <el-form-item label="管辖区域">
<el-select v-model="queryParams.province" clearable placeholder="请选择">
<el-option
v-for="(item,index) in cityList"
@ -213,7 +213,7 @@ async function remoteMethod(query) {
:value="index"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
<el-button size="small" icon="refresh" @click="onReset">重置</el-button>
@ -250,11 +250,11 @@ async function remoteMethod(query) {
</template>
</el-table-column>
<el-table-column align="center" label="手机号" min-width="150" prop="phone" />
<el-table-column align="center" label="负责区域" min-width="150">
<!-- <el-table-column align="center" label="负责区域" min-width="150">
<template #default="scope">
{{scope.row.province>-1?cityList[scope.row.province].province:'无'}}
</template>
</el-table-column>
</el-table-column> -->
<el-table-column align="center" min-width="150" label="域内市场助教" prop="assistant_num" />
<el-table-column align="center" min-width="150" label="域内市场学员" prop="student_num" />
<el-table-column align="center" label="课程订单" prop="course_num" />
@ -300,7 +300,7 @@ async function remoteMethod(query) {
width="30%"
>
<el-form ref="mFormRef" class="form-box" :model="mForm" :rules="mFormRules" label-width="80px">
<el-form-item label="选择区域" prop="province">
<!-- <el-form-item label="选择区域" prop="province">
<el-select v-model="mForm.province" clearable placeholder="请选择">
<el-option
v-for="(item,index) in cityList"
@ -309,7 +309,7 @@ async function remoteMethod(query) {
:value="index"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="用户ID" prop="user_id">
<el-select
v-model="mForm.user_id"

View File

@ -79,7 +79,7 @@ function getStateName(state) {
</script>
<template>
<div>
助教详情
<!-- 助教详情 -->
<!-- 基本信息-->
<div class="gva-search-box">
<div class="baseInfo-box">
@ -100,12 +100,12 @@ function getStateName(state) {
<!-- 详细信息-->
<div class="gva-table-box">
<div class="detail-info-box">
<div class="dib-row">
<!-- <div class="dib-row">
<div class="dib-item">
<div class="di-left">管理区域</div>
<div class="di-right">{{managerInfo.province>-1?cityList[managerInfo.province].province:'无'}}</div>
</div>
</div>
</div> -->
<div class="dib-row">
<div class="dib-item">
<div class="di-left">身份证号码</div>