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
41ab270f
Commit
41ab270f
authored
Mar 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0f87234e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
139 deletions
+137
-139
studyAbroadprice-form.vue
src/components/studyAbroad/studyAbroadprice-form.vue
+135
-137
studyabroad.vue
src/pages/studyAbroad/studyabroad.vue
+2
-2
No files found.
src/components/studyAbroad/studyAbroadprice-form.vue
View file @
41ab270f
...
@@ -8,123 +8,122 @@
...
@@ -8,123 +8,122 @@
<div
class=
"text-caption q-mb-lg text-grey-6"
>
基础价格设置
</div>
<div
class=
"text-caption q-mb-lg text-grey-6"
>
基础价格设置
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.
courseObj.Original
Price"
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.
studyAbroadObj.Suggest
Price"
ref=
"
OriginalPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"
卖价"
ref=
"
SuggestPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"合同建议
卖价"
@
keyup
.
native=
"checkPrice(priceObj.
courseObj, 'OriginalPrice')"
:rules=
"[val => !!val || '请填写基础收费
']"
/>
@
keyup
.
native=
"checkPrice(priceObj.
studyAbroadObj, 'SuggestPrice')"
:rules=
"[val => !!val || '合同建议卖价
']"
/>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.
course
Obj.SellPrice"
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"priceObj.
studyAbroad
Obj.SellPrice"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"
成本
"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"
实际卖价
"
@
keyup
.
native=
"checkPrice(priceObj.
courseObj, 'SellPrice')"
:rules=
"[val => !!val || '请填写
卖价']"
/>
@
keyup
.
native=
"checkPrice(priceObj.
studyAbroadObj, 'SellPrice')"
:rules=
"[val => !!val || '请填写实际
卖价']"
/>
</div>
</div>
</div>
</div>
<div
class=
"q-pt-none scroll"
style=
"max-height:60hv"
>
<div
class=
"q-pt-none scroll"
style=
"max-height:60hv"
>
<table>
<table>
<thead>
<thead>
<tr
style=
"height:60px;"
>
<tr
style=
"height:60px;"
>
<td
colspan=
"5"
style=
"text-align:right;"
>
<td
colspan=
"5"
style=
"text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增优惠"
@
click=
"addPrice()"
/>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增优惠"
@
click=
"addPrice()"
/>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
style=
"width:200px"
>
<td
style=
"width:200px"
>
优惠类型
优惠类型
</td>
</td>
<td
style=
"width:200px"
>
<td
style=
"width:200px"
>
优惠条件
优惠条件
</td>
</td>
<td
style=
"width:140px"
>
<td
style=
"width:140px"
>
同行返佣
同行返佣
</td>
</td>
<td
style=
"width:140px"
>
<td
style=
"width:140px"
>
销售返佣
销售返佣
</td>
</td>
<td>
<td>
操作
操作
</td>
</td>
</tr>
</tr>
</thead>
</thead>
<tbody
v-for=
"(item, index) in priceObj.priceList"
>
<tbody
v-for=
"(item, index) in priceObj.priceList"
>
<tr>
<tr>
<td
style=
"height:50px"
>
<td
style=
"height:50px"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"item.PriceDiscountType"
<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
ref=
"PriceDiscountType_Id"
:options=
"priceTypeList"
label=
"优惠类型"
style=
"width:160px"
dense
emit-value
map-options
/>
emit-value
map-options
/>
</td>
</td>
<td>
<td>
<!--买送-->
<!--买送-->
<template
v-if=
"item.PriceDiscountType == 1"
>
<template
v-if=
"item.PriceDiscountType == 1"
>
<q-input
filled
stack-label
dense
v-model=
"item.BuyNum"
ref=
"BuyNum"
label=
"买"
<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=
""
/>
@
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=
"送"
<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=
""
>
@
keyup
.
native=
"checkPrice(item, 'SendNum')"
style=
"width:80px;display:inline-block;"
suffix=
""
>
</q-input>
</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:165px"
suffix=
"%"
/>
</
template
>
</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
>
</
template
>
<!--刷卡分期-->
</q-input>
<
template
v-else-if=
"item.PriceDiscountType == 5"
>
</
template
>
</td>
<
template
v-else
>
<td>
<q-input
filled
stack-label
dense
v-model=
"item.PriceMoney"
ref=
"PriceMoney"
label=
"优惠"
<q-input
filled
stack-label
dense
v-model=
"item.SaleCommissionMoney"
ref=
"SaleCommissionMoney"
@
keyup
.
native=
"checkPrice(item, 'PriceMoney')"
style=
"width:165px"
suffix=
"%"
/>
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
>
</
template
>
</td>
</q-input>
<td>
</td>
<q-input
filled
stack-label
dense
v-model=
"item.B2BCommissionMoney"
ref=
"B2BCommissionMoney"
<td>
label=
"同行返佣"
@
keyup
.
native=
"checkPrice(item, 'B2BCommissionMoney')"
style=
"width:100px"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
title=
"删除"
color=
"negative"
style=
"font-weight:400"
<
template
v-slot:append
>
class=
"q-mr-xs"
label=
""
@
click=
"delPrice(index)"
/>
<div
class=
"text-dark text-center text-dark cursor-pointer"
</td>
style=
"width:30px;margin-right:-12px;height:100%;font-size:14px;border-left:1px solid #ddd;padding-top:15px;"
>
</tr>
<span>
{{
item
.
B2BCommissionType
==
0
?
'%'
:
'¥'
}}
</span>
</tbody>
<q-menu
auto-close
>
</table>
<q-list>
</div>
<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>
</td>
<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-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
title=
"删除"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
""
@
click=
"delPrice(index)"
/>
</td>
</tr>
</tbody>
</table>
</div>
</q-card-section>
</q-card-section>
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<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=
"取消"
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=
"save
Course
Loading"
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"save
StudyAbroad
Loading"
@
click=
"save
Course
"
/>
@
click=
"save
StudyAbroad
"
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
...
@@ -132,11 +131,13 @@
...
@@ -132,11 +131,13 @@
<
script
>
<
script
>
import
{
import
{
saveCoursePreferential
,
queryCoursePreferentialList
,
queryCourseInfo
,
queryCoursePreferentialType
queryCoursePreferentialType
}
from
"../../api/course/index"
;
}
from
"../../api/course/index"
;
import
{
queryStudyAbroadInfo
,
saveBatchStudyAbroad
,
}
from
"../../api/studyabroad/index"
;
export
default
{
export
default
{
components
:
{},
components
:
{},
props
:
{
props
:
{
...
@@ -149,13 +150,13 @@
...
@@ -149,13 +150,13 @@
return
{
return
{
persistent
:
true
,
persistent
:
true
,
optionTitle
:
""
,
optionTitle
:
""
,
save
Course
Loading
:
false
,
save
StudyAbroad
Loading
:
false
,
//价格对象
//价格对象
priceObj
:
{
priceObj
:
{
studyAbroadObj
:
{
studyAbroadObj
:
{
CourseId
:
0
,
//课程
编号
Id
:
0
,
//留学就业
编号
OriginalPrice
:
0
,
//原
价
SuggestPrice
:
0
,
//建议卖
价
SellPrice
:
0
//
售
价
SellPrice
:
0
//
实际卖
价
},
},
priceList
:
[]
//价格列表
priceList
:
[]
//价格列表
},
},
...
@@ -199,27 +200,24 @@
...
@@ -199,27 +200,24 @@
},
},
//初始化表单
//初始化表单
initObj
()
{
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
CourseId
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
queryCourseInfo
({
queryStudyAbroadInfo
({
CourseId
:
this
.
saveObj
.
CourseId
Id
:
this
.
saveObj
.
Id
,
}).
then
(
res
=>
{
IsGetPrice
:
1
this
.
priceObj
.
courseObj
.
CourseId
=
res
.
Data
.
CourseId
;
this
.
priceObj
.
courseObj
.
OriginalPrice
=
res
.
Data
.
OriginalPrice
;
this
.
priceObj
.
courseObj
.
SellPrice
=
res
.
Data
.
SellPrice
;
});
queryCoursePreferentialList
({
CourseId
:
this
.
saveObj
.
CourseId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
&&
res
.
Data
)
{
this
.
priceObj
.
studyAbroadObj
.
Id
=
res
.
Data
.
Id
;
this
.
priceObj
.
priceList
=
res
.
Data
;
this
.
priceObj
.
studyAbroadObj
.
SuggestPrice
=
res
.
Data
.
SuggestPrice
;
this
.
priceObj
.
studyAbroadObj
.
SellPrice
=
res
.
Data
.
SellPrice
;
if
(
res
.
Data
.
PreferentialList
&&
res
.
Data
.
PreferentialList
.
length
>
0
)
{
this
.
priceObj
.
priceList
=
res
.
Data
.
PreferentialList
;
}
}
});
});
this
.
optionTitle
=
"修改
课程
优惠信息"
;
this
.
optionTitle
=
"修改
留学
优惠信息"
;
}
else
{
}
else
{
this
.
optionTitle
=
"新增
课程
优惠信息"
;
this
.
optionTitle
=
"新增
留学
优惠信息"
;
this
.
priceObj
.
course
Obj
.
CourseId
=
0
;
this
.
priceObj
.
studyAbroad
Obj
.
CourseId
=
0
;
this
.
priceObj
.
courseObj
.
Original
Price
=
0
;
this
.
priceObj
.
studyAbroadObj
.
Suggest
Price
=
0
;
this
.
priceObj
.
course
Obj
.
SellPrice
=
0
;
this
.
priceObj
.
studyAbroad
Obj
.
SellPrice
=
0
;
}
}
},
},
//关闭弹窗
//关闭弹窗
...
@@ -228,8 +226,8 @@
...
@@ -228,8 +226,8 @@
this
.
persistent
=
false
;
this
.
persistent
=
false
;
},
},
//保存菜单
//保存菜单
save
Course
()
{
save
StudyAbroad
()
{
this
.
save
Course
Loading
=
true
;
this
.
save
StudyAbroad
Loading
=
true
;
if
(
this
.
priceObj
.
priceList
&&
this
.
priceObj
.
priceList
.
length
>
0
)
{
if
(
this
.
priceObj
.
priceList
&&
this
.
priceObj
.
priceList
.
length
>
0
)
{
this
.
priceObj
.
priceList
.
forEach
(
item
=>
{
this
.
priceObj
.
priceList
.
forEach
(
item
=>
{
if
(
item
.
BuyNum
==
""
)
{
if
(
item
.
BuyNum
==
""
)
{
...
@@ -249,9 +247,9 @@
...
@@ -249,9 +247,9 @@
}
}
});
});
}
}
save
CoursePreferential
(
this
.
priceObj
)
save
BatchStudyAbroad
(
this
.
priceObj
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
save
Course
Loading
=
false
;
this
.
save
StudyAbroad
Loading
=
false
;
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
color
:
"accent"
,
...
@@ -263,7 +261,7 @@
...
@@ -263,7 +261,7 @@
this
.
closeSaveForm
();
this
.
closeSaveForm
();
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
save
Course
Loading
=
false
;
this
.
save
StudyAbroad
Loading
=
false
;
});
});
}
}
}
}
...
...
src/pages/studyAbroad/studyabroad.vue
View file @
41ab270f
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</q-table>
</q-table>
<studyAbroad-form
v-if=
"isShowStudy"
:save-obj=
"studyObj"
@
close=
"closeStudyForm"
@
success=
"refreshPage"
>
<studyAbroad-form
v-if=
"isShowStudy"
:save-obj=
"studyObj"
@
close=
"closeStudyForm"
@
success=
"refreshPage"
>
</studyAbroad-form>
</studyAbroad-form>
<studyAbroadprice-form
v-if=
"
closeStudyForm
"
:save-obj=
"studyObj"
@
close=
"closeStudyForm"
@
success=
"refreshPage"
>
<studyAbroadprice-form
v-if=
"
isShowStudyPrice
"
:save-obj=
"studyObj"
@
close=
"closeStudyForm"
@
success=
"refreshPage"
>
</studyAbroadprice-form>
</studyAbroadprice-form>
</div>
</div>
</div>
</div>
...
@@ -170,7 +170,6 @@
...
@@ -170,7 +170,6 @@
PageCount
:
0
,
PageCount
:
0
,
isShowStudy
:
false
,
//是否显示留学弹窗
isShowStudy
:
false
,
//是否显示留学弹窗
studyObj
:
{},
//留学对象
studyObj
:
{},
//留学对象
isShowStudyPrice
:
false
,
//是否显示价格设置
isShowStudyPrice
:
false
,
//是否显示价格设置
}
}
},
},
...
@@ -206,6 +205,7 @@
...
@@ -206,6 +205,7 @@
closeStudyForm
()
{
closeStudyForm
()
{
this
.
isShowStudy
=
false
;
this
.
isShowStudy
=
false
;
this
.
isShowStudyPrice
=
false
;
this
.
isShowStudyPrice
=
false
;
this
.
refreshPage
();
},
},
//刷新页面
//刷新页面
refreshPage
()
{
refreshPage
()
{
...
...
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