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
450fc143
Commit
450fc143
authored
Dec 15, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ec93274c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
55 deletions
+55
-55
editOrder-form.vue
src/components/sale/editOrder-form.vue
+12
-7
order-form.vue
src/components/school/student/transfer-order/order-form.vue
+43
-48
No files found.
src/components/sale/editOrder-form.vue
View file @
450fc143
...
...
@@ -267,7 +267,10 @@
if
(
this
.
OrderMsg
&&
this
.
OrderMsg
.
CourseId
)
{
this
.
courseObj
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
}
this
.
calcPrice
();
if
(
!
this
.
saveObj
.
OrderId
){
this
.
calcPrice
();
}
}
});
},
...
...
@@ -319,7 +322,8 @@
var
perDiscountMoney
=
Number
(
tempDiscountMoney
).
toFixed
(
2
);
this
.
OrderMsg
.
PerDiscountMoney
=
perDiscountMoney
;
// this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
this
.
OrderMsg
.
DiscountMoney
=
this
.
OrderMsg
.
Class_Price
*
this
.
OrderMsg
.
GuestNum
*
this
.
OrderMsg
.
B2CRatio
//计算每人优惠和总优惠
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
this
.
OrderMsg
.
Unit_Price
=
chaBanPrice
;
...
...
@@ -404,8 +408,8 @@
this
.
OrderMsg
.
UpOrderId
=
tempData
.
UpOrderId
;
this
.
OrderMsg
.
DiscountMoney
=
tempData
.
DiscountMoney
;
this
.
OrderMsg
.
PerDiscountMoney
=
tempData
.
PerDiscountMoney
;
this
.
OrderMsg
.
B2CRatio
=
tempData
.
B2CRatio
>
1
?(
tempData
.
B2CRatio
/
100
):
tempData
.
B2CRatio
;
this
.
OrderMsg
.
B2CReNewRatio
=
tempData
.
B2CReNewRatio
>
1
?(
tempData
.
B2CReNewRatio
/
100
):
tempData
.
B2CReNewRatio
;
this
.
OrderMsg
.
B2CRatio
=
tempData
.
B2CRatio
;
this
.
OrderMsg
.
B2CReNewRatio
=
tempData
.
B2CReNewRatio
;
this
.
OrderMsg
.
CustomerId
=
tempData
.
CustomerId
this
.
OrderMsg
.
CourseConsultantId
=
tempData
.
CourseConsultantId
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
...
...
@@ -458,14 +462,15 @@
this
.
OrderMsg
.
CourseId
=
''
;
}
if
(
this
.
saveObj
.
B2CRatio
){
this
.
OrderMsg
.
B2CRatio
=
this
.
saveObj
.
B2CRatio
>
1
?
this
.
saveObj
.
B2CRatio
/
100
:
this
.
saveObj
.
B2CRatio
;
this
.
OrderMsg
.
B2CRatio
=
this
.
saveObj
.
B2CRatio
}
if
(
this
.
saveObj
.
B2CReNewRatio
){
this
.
OrderMsg
.
B2CReNewRatio
=
this
.
saveObj
.
B2CReNewRatio
>
1
?
this
.
saveObj
.
B2CReNewRatio
/
100
:
this
.
saveObj
.
B2CReNewRatio
;
this
.
OrderMsg
.
B2CReNewRatio
=
this
.
saveObj
.
B2CReNewRatio
}
this
.
OrderMsg
.
SaleRemark
=
`直客首次报名优惠比例
${
this
.
saveObj
.
B2CRatio
}
%`
;
//备注
}
this
.
OrderMsg
.
DiscountMoney
=
this
.
OrderMsg
.
Class_Price
*
this
.
OrderMsg
.
GuestNum
*
(
this
.
OrderMsg
.
B2CRatio
>
1
?
this
.
OrderMsg
.
B2CRatio
/
100
:
this
.
OrderMsg
.
B2CRatio
)
this
.
IsShowEditOrder
=
true
;
this
.
calcPrice
();
}
...
...
src/components/school/student/transfer-order/order-form.vue
View file @
450fc143
...
...
@@ -472,6 +472,7 @@ export default {
},
//计算课程单价和应收金额
calcPrice
()
{
console
.
log
(
"this.OrderMsg"
,
this
.
OrderMsg
)
var
guestNum
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
...
...
@@ -482,7 +483,7 @@ export default {
if
(
temp
)
{
this
.
courseObj
=
temp
;
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
`直客首次报名优惠比例
${
temp
.
B2CRatio
??
0
}
%
`; //备注
//
var tempSaleRemark = `直客首次报名优惠比例${temp.B2CRatio ?? 0}%`; //备注
//插班课时单价
var
classHourPrice
=
temp
.
SellPrice
/
this
.
courseObj
.
ClassHours
;
var
chaBanPrice
=
Number
(
...
...
@@ -525,21 +526,15 @@ export default {
}
var
perDiscountMoney
=
Number
(
tempDiscountMoney
).
toFixed
(
2
);
this
.
OrderMsg
.
PerDiscountMoney
=
perDiscountMoney
;
// this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
// this.OrderMsg.DiscountMoney =
// this.OrderMsg.Class_Price *
// this.OrderMsg.GuestNum *
// this.OrderMsg.B2CRatio;
//计算每人优惠和总优惠
if (this.OrderMsg.IsChaBan == 1) {
this.OrderMsg.Unit_Price = chaBanPrice;
this.UnitPrice = chaBanPrice;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
this.OrderMsg.SaleRemark = tempSaleRemark;
//
if (this.OrderMsg.IsChaBan == 1) {
//
this.OrderMsg.Unit_Price = chaBanPrice;
//
this.UnitPrice = chaBanPrice;
//
} else {
//
this.OrderMsg.Unit_Price = temp.SellPrice;
//
this.UnitPrice = temp.SellPrice;
//
}
//
this.OrderMsg.SaleRemark = tempSaleRemark;
}
else
{
if
(
this
.
saveObj
.
ClassId
)
{
this
.
OrderMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
...
...
@@ -589,6 +584,7 @@ export default {
this
.
OrderMsg
.
GuestNum
=
this
.
stuData
.
StuList
.
length
;
this
.
OrderMsg
.
DiscountMoney
=
0
;
this
.
stuData
.
StuList
.
map
(
e
=>
{
if
(
e
.
IsRenewGuest
==
0
)
{
this
.
OrderMsg
.
DiscountMoney
+=
...
...
@@ -609,8 +605,7 @@ export default {
this
.
OrderMsg
.
OrderNature
=
0
;
this
.
OrderMsg
.
OldPreferPrice
=
0
;
this
.
OrderMsg
.
StartClassHours
=
0
;
this.OrderMsg.IsChaBan = 0
;
this
.
OrderMsg
.
IsChaBan
=
0
;
this
.
OrderMsg
.
EffectTime
=
""
;
this
.
OrderMsg
.
UpOrderId
=
0
;
this
.
OrderMsg
.
JoinType
=
1
;
...
...
@@ -751,38 +746,38 @@ export default {
}
//插班报名计算应收
if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
if (
!this.courseObj ||
(this.courseObj && !this.courseObj.ClassHours)
) {
if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId
);
}
}
//插班课时单价
var classHourPrice =
this.courseObj.SellPrice / this.courseObj.ClassHours;
var chaBanPrice = Number(
classHourPrice *
(this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
).toFixed(2);
var newPreferPrice =
chaBanPrice * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
}
}
//
if (this.OrderMsg.IsChaBan == 1) {
//
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
//
if (
//
!this.courseObj ||
//
(this.courseObj && !this.courseObj.ClassHours)
//
) {
//
if (this.OrderMsg && this.OrderMsg.CourseId) {
//
this.courseObj = this.CourseList.find(
//
x => x.CourseId == this.OrderMsg.CourseId
//
);
//
}
//
}
//
//插班课时单价
//
var classHourPrice =
//
this.courseObj.SellPrice / this.courseObj.ClassHours;
//
var chaBanPrice = Number(
//
classHourPrice *
//
(this.courseObj.ClassHours - this.OrderMsg.StartClassHours)
//
).toFixed(2);
//
var newPreferPrice =
//
chaBanPrice * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
//
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
//
}
//
}
//正常报名计算应收
if (this.OrderMsg.IsChaBan == 0) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
this.OrderMsg.PreferPrice =
this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price -
this.OrderMsg.LessPrice;
}
}
//
if (this.OrderMsg.IsChaBan == 0) {
//
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
//
this.OrderMsg.PreferPrice =
//
this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price -
//
this.OrderMsg.LessPrice;
//
}
//
}
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
this.OrderMsg.CustomerId = this.stuData.CustomerId;
setClassOrder(this.OrderMsg).then(res => {
...
...
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