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
eee0645c
Commit
eee0645c
authored
Aug 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
be479f43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
+30
-12
editOrder-form.vue
src/components/sale/editOrder-form.vue
+30
-12
No files found.
src/components/sale/editOrder-form.vue
View file @
eee0645c
...
...
@@ -245,10 +245,18 @@
this
.
courseObj
=
temp
;
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
""
;
//备注
//插班课时单价
var
classHourPrice
=
temp
.
SellPrice
/
this
.
courseObj
.
ClassHours
;
var
chaBanPrice
=
Number
(
classHourPrice
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
))
.
toFixed
(
2
);
if
(
guestNum
==
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
tempDiscountMoney
=
(
chaBanPrice
*
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
}
else
{
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
}
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
}
else
{
tempDiscountMoney
=
item
.
CoursePriceList
[
0
].
PriceMoney
;
...
...
@@ -259,22 +267,29 @@
if
(
guestNum
>
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
tempDiscountMoney
=
(
chaBanPrice
*
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
}
else
{
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
}
}
else
{
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
tempDiscountMoney
=
item
.
CoursePriceList
[
1
].
PriceMoney
;
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
}
}
}
//计算每人优惠和总优惠
var
perDiscountMoney
=
Number
(
tempDiscountMoney
).
toFixed
(
2
);
this
.
OrderMsg
.
PerDiscountMoney
=
perDiscountMoney
;
this
.
OrderMsg
.
DiscountMoney
=
perDiscountMoney
*
guestNum
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
//计算每人优惠和总优惠
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
)
{
...
...
@@ -301,12 +316,12 @@
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
var
str
=
""
//计算应收价格
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
var
newPreferPrice
=
0
;
if
(
this
.
courseObj
&&
this
.
courseObj
.
CourseId
&&
this
.
courseObj
.
CourseId
>
0
)
{
newPreferPrice
=
(
unit_price
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
)
*
guestNum
newPreferPrice
=
chaBanPrice
*
guestNum
;
}
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
)
-
this
.
OrderMsg
.
LessPrice
;
}
else
{
...
...
@@ -474,8 +489,11 @@
this
.
courseObj
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
}
}
var
newPreferPrice
=
(
this
.
UnitPrice
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
)
*
this
.
OrderMsg
.
GuestNum
-
this
.
OrderMsg
.
LessPrice
;
//插班课时单价
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
);
}
}
...
...
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