Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
1bc2b433
Commit
1bc2b433
authored
Dec 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e9cfccfb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
250 additions
and
462 deletions
+250
-462
courseprice-form.vue
src/components/course/courseprice-form.vue
+250
-462
No files found.
src/components/course/courseprice-form.vue
View file @
1bc2b433
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 850px;max-width:950px;"
>
<q-card-section>
<div
class=
"text-h6"
>
设置课程价格
</div>
...
...
@@ -13,336 +7,130 @@
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg text-grey-6"
>
基础价格设置
</div>
<div
class=
"row wrap"
>
<!--
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.courseObj.OriginalPrice"
ref=
"OriginalPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"基础收费"
style=
"display:none;"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'OriginalPrice')"
:rules=
"[val => !!val || '请填写基础收费']"
/>
</div>
-->
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.courseObj.SellPrice"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"直客价"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SellPrice')"
:rules=
"[val => !!val || '请填写直客价']"
/>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.courseObj.SellPrice"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"卖价"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SellPrice')"
:rules=
"[val => !!val || '请填写卖价']"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.courseObj.B2BPrice"
ref=
"B2BPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"同业价"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2BPrice')"
:rules=
"[val => !!val || '请填写同业价']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2BRebateRatio"
ref=
"B2BRebateRatio"
class=
"col-6 q-pr-lg"
label=
"同行返佣比例"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2BRebateRatio')"
suffix=
"%"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2BReNewRatio"
ref=
"B2BReNewRatio"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"一般同行续费返佣比例"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2BReNewRatio')"
suffix=
"%"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.SchoolRebateRatio"
ref=
"SchoolRebateRatio"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"校园同行返佣比例"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SchoolRebateRatio')"
suffix=
"%"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.SchoolReNewRatio"
ref=
"SchoolReNewRatio"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"校园同行续费返佣比例"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SchoolReNewRatio')"
suffix=
"%"
/>
</div>
</div>
<div
class=
"q-pt-none scroll"
style=
"max-height:60hv;display:none;"
>
<div
class=
"text-caption q-mb-lg text-grey-6"
>
优惠
</div>
<table>
<thead>
<tr
style=
"height:60px;"
>
<td
colspan=
"5"
style=
"text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增优惠"
@
click=
"addPrice()"
/>
<tr>
<th>
优惠
</th>
<th>
首次报名优惠
</th>
<th>
续费报名优惠
</th>
</tr>
<tr>
<td>
直客优惠
</td>
<td>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2CRatio"
ref=
"B2CRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2CRatio')"
suffix=
"%"
/>
</td>
<td>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2CReNewRatio"
ref=
"B2CReNewRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2CReNewRatio')"
suffix=
"%"
/>
</td>
</tr>
</table>
<div
class=
"text-caption q-mb-lg text-grey-6"
>
返佣
</div>
<table>
<tr>
<td
style=
"width:200px"
>
优惠类型
<th>
同行
</th>
<th>
首次报名返佣比例
</th>
<th>
续费报名返佣比例
</th>
</tr>
<tr>
<td>
一般同行
</td>
<td
style=
"width:200px"
>
优惠条件
<td>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2BRebateRatio"
ref=
"B2BRebateRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2BRebateRatio')"
suffix=
"%"
/>
</td>
<td
style=
"width:140px"
>
同行返佣
<td>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.B2BReNewRatio"
ref=
"B2BReNewRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'B2BReNewRatio')"
suffix=
"%"
/>
</td>
<td
style=
"width:140px"
>
销售返佣
</tr>
<tr>
<td>
校代
</td>
<td
style=
"width:140px"
>
教育同行返佣
<td>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.SchoolRebateRatio"
ref=
"SchoolRebateRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SchoolRebateRatio')"
suffix=
"%"
/>
</td>
<td>
操作
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.SchoolReNewRatio"
ref=
"SchoolReNewRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'SchoolReNewRatio')"
suffix=
"%"
/>
</td>
</tr>
</thead>
<tbody
v-for=
"(item, index) in priceObj.priceList"
>
<tr>
<td
style=
"height:50px"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"item.PriceDiscountType"
ref=
"PriceDiscountType_Id"
:options=
"priceTypeList"
label=
"优惠类型"
style=
"width:160px"
dense
emit-value
map-options
/>
<td>
转介
</td>
<td>
<!--买送-->
<template
v-if=
"item.PriceDiscountType == 1"
>
<q-input
filled
stack-label
dense
v-model=
"item.BuyNum"
ref=
"BuyNum"
label=
"买"
@
keyup
.
native=
"checkPrice(item, 'BuyNum')"
style=
"width:80px;display:inline-block;"
suffix=
""
/>
<q-input
filled
stack-label
class=
"q-ml-xs"
v-model=
"item.SendNum"
ref=
"SendNum"
dense
label=
"送"
@
keyup
.
native=
"checkPrice(item, 'SendNum')"
style=
"width:80px;display:inline-block;"
suffix=
""
>
</q-input>
</
template
>
<!--刷卡分期-->
<
template
v-else-if=
"item.PriceDiscountType == 5"
>
</
template
>
<
template
v-else
>
<q-input
filled
stack-label
dense
v-model=
"item.PriceMoney"
ref=
"PriceMoney"
label=
"优惠"
@
keyup
.
native=
"checkPrice(item, 'PriceMoney')"
style=
"width:120px"
suffix=
"%"
/>
</
template
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.TransIntroductceRatio"
ref=
"TransIntroductceRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'TransIntroductceRatio')"
suffix=
"%"
/>
</td>
<td>
<q-input
filled
stack-label
dense
v-model=
"item.B2BCommissionMoney"
ref=
"B2BCommissionMoney"
label=
"同行返佣"
@
keyup
.
native=
"checkPrice(item, 'B2BCommissionMoney')"
style=
"width:100px"
>
<
template
v-slot:append
>
<div
class=
"text-dark text-center text-dark cursor-pointer"
style=
"width:30px;margin-right:-12px;height:100%;font-size:14px;border-left:1px solid #ddd;padding-top:15px;"
>
<span>
{{
item
.
B2BCommissionType
==
0
?
'%'
:
'¥'
}}
</span>
<q-menu
auto-close
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"item.B2BCommissionType=0"
>
<q-item-section>
按百分比(%)
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"item.B2BCommissionType=1"
>
<q-item-section>
按固定额度(¥)
</q-item-section>
</q-item>
</q-list>
</q-menu>
</div>
</
template
>
</q-input>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.TransIntroductceReNewRatio"
ref=
"TransIntroductceReNewRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'TransIntroductceReNewRatio')"
suffix=
"%"
/>
</td>
</tr>
<tr>
<td>
<q-input
filled
stack-label
dense
v-model=
"item.SaleCommissionMoney"
ref=
"SaleCommissionMoney"
label=
"销售返佣"
@
keyup
.
native=
"checkPrice(item, 'SaleCommissionMoney')"
class=
"q-pr-none"
style=
"width:100px"
>
<
template
v-slot:append
>
<div
class=
"text-dark text-center text-dark cursor-pointer"
style=
"width:30px;margin-right:-12px;height:100%;font-size:14px;border-left:1px solid #ddd;padding-top:15px;"
>
<span>
{{
item
.
SaleCommissionType
==
0
?
'%'
:
'¥'
}}
</span>
<q-menu
auto-close
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"item.SaleCommissionType=0"
>
<q-item-section>
按百分比(%)
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"item.SaleCommissionType=1"
>
<q-item-section>
按固定额度(¥)
</q-item-section>
</q-item>
</q-list>
</q-menu>
</div>
</
template
>
</q-input>
内推
</td>
<td>
<q-input
filled
stack-label
dense
v-model=
"item.EduCommissionMoney"
ref=
"EduCommissionMoney"
label=
"教育同行"
@
keyup
.
native=
"checkPrice(item, 'EduCommissionMoney')"
class=
"q-pr-none"
style=
"width:100px"
>
<
template
v-slot:append
>
<div
class=
"text-dark text-center text-dark cursor-pointer"
style=
"width:30px;margin-right:-12px;height:100%;font-size:14px;border-left:1px solid #ddd;padding-top:15px;"
>
<span>
{{
item
.
EduCommissionType
==
0
?
'%'
:
'¥'
}}
</span>
<q-menu
auto-close
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"item.EduCommissionType=0"
>
<q-item-section>
按百分比(%)
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"item.EduCommissionType=1"
>
<q-item-section>
按固定额度(¥)
</q-item-section>
</q-item>
</q-list>
</q-menu>
</div>
</
template
>
</q-input>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.InnerRecommendRatio"
ref=
"InnerRecommendRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'InnerRecommendRatio')"
suffix=
"%"
/>
</td>
<td>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
title=
"删除"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
""
@
click=
"delPrice(index)"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"priceObj.courseObj.InnerRecommendReNewRatio"
ref=
"InnerRecommendReNewRatio"
@
keyup
.
native=
"checkPrice(priceObj.courseObj, 'InnerRecommendReNewRatio')"
suffix=
"%"
/>
</td>
</tr>
</tbody>
</table>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeCourseForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeCourseForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
import
{
saveCoursePreferential
,
queryCoursePreferentialList
,
queryCourseInfo
,
queryCoursePreferentialType
}
from
"../../api/course/index"
;
export
default
{
}
from
"../../api/course/index"
;
export
default
{
components
:
{},
props
:
{
saveObj
:
{
...
...
@@ -364,8 +152,8 @@ export default {
B2BPrice
:
0
,
//同业价
B2BRebateRatio
:
0
,
//一般同行返佣比例
SchoolRebateRatio
:
0
,
//校园同行返佣比例
B2BReNewRatio
:
0
,
//一般同行续费返佣比例
SchoolReNewRatio
:
0
//校园同行返佣比例
B2BReNewRatio
:
0
,
//一般同行续费返佣比例
SchoolReNewRatio
:
0
//校园同行返佣比例
},
priceList
:
[]
//价格列表
},
...
...
@@ -466,7 +254,7 @@ export default {
this
.
$refs
.
SellPrice
.
validate
();
this
.
$refs
.
B2BPrice
.
validate
();
if
(
!
this
.
$refs
.
SellPrice
.
hasError
&&
!
this
.
$refs
.
B2BPrice
.
hasError
)
{
if
(
!
this
.
$refs
.
SellPrice
.
hasError
&&
!
this
.
$refs
.
B2BPrice
.
hasError
)
{
this
.
saveCourseLoading
=
true
;
saveCoursePreferential
(
this
.
priceObj
)
.
then
(
res
=>
{
...
...
@@ -487,5 +275,5 @@ export default {
}
}
}
};
};
</
script
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment