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
beec4997
Commit
beec4997
authored
Aug 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面下修改
parent
d82c242a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
105 deletions
+134
-105
activeOrder-item.vue
src/components/sale/activeOrder-item.vue
+0
-13
editOrder-form.vue
src/components/sale/editOrder-form.vue
+60
-32
exorder-form.vue
src/components/schedul/exorder-form.vue
+74
-60
No files found.
src/components/sale/activeOrder-item.vue
View file @
beec4997
...
@@ -5,14 +5,9 @@
...
@@ -5,14 +5,9 @@
<table
class=
"enrollTotalSearchTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<table
class=
"enrollTotalSearchTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
>
<colgroup>
<colgroup>
<col
width=
"12%"
/>
<col
width=
"12%"
/>
<!--
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
-->
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<!--
<col
width=
"7%"
/>
<col
width=
"6%"
/>
-->
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
...
@@ -23,11 +18,8 @@
...
@@ -23,11 +18,8 @@
<th
width=
"12%"
>
单号
</th>
<th
width=
"12%"
>
单号
</th>
<th
width=
"7%"
>
联系人
</th>
<th
width=
"7%"
>
联系人
</th>
<th
width=
"10%"
>
联系电话
</th>
<th
width=
"10%"
>
联系电话
</th>
<!--
<th
width=
"7%"
>
成交
</th>
-->
<th
width=
"7%"
>
应收总额
</th>
<th
width=
"7%"
>
应收总额
</th>
<th
width=
"7%"
>
实收
</th>
<th
width=
"7%"
>
实收
</th>
<!--
<th
width=
"7%"
>
优惠
</th>
<th
width=
"6%"
>
少价金额
</th>
-->
<th
width=
"7%"
>
退款
</th>
<th
width=
"7%"
>
退款
</th>
<th
width=
"7%"
>
平台税金
</th>
<th
width=
"7%"
>
平台税金
</th>
<th
width=
"7%"
>
待收金额
</th>
<th
width=
"7%"
>
待收金额
</th>
...
@@ -43,11 +35,8 @@
...
@@ -43,11 +35,8 @@
<col
width=
"12%"
/>
<col
width=
"12%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"10%"
/>
<col
width=
"10%"
/>
<!--
<col
width=
"7%"
/>
-->
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<!--
<col
width=
"7%"
/>
<col
width=
"6%"
/>
-->
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
<col
width=
"7%"
/>
...
@@ -73,8 +62,6 @@
...
@@ -73,8 +62,6 @@
<div>
活动结束时间:
</div>
<div>
活动结束时间:
</div>
<div>
{{
item
.
EndTime
}}
</div>
<div>
{{
item
.
EndTime
}}
</div>
<div
v-if=
"item.IsCommission == 2"
style=
"color:#f00;cursor: pointer;text-decoration: underline;"
@
click=
"gourlactive(item)"
>
提成金额:
{{
item
.
CommissionPrice
}}
</div>
<div
v-if=
"item.IsCommission == 2"
style=
"color:#f00;cursor: pointer;text-decoration: underline;"
@
click=
"gourlactive(item)"
>
提成金额:
{{
item
.
CommissionPrice
}}
</div>
<!--
<div
style=
"margin-top: 10px"
>
{{
item
.
CreateTime
}}
</div>
-->
<template
v-if=
"AuthorityObj.isShowName"
>
<template
v-if=
"AuthorityObj.isShowName"
>
<div
style=
"font-weight: bold;color:#2961FE;cursor:pointer;"
@
click=
"getClassInfo(item)"
>
<div
style=
"font-weight: bold;color:#2961FE;cursor:pointer;"
@
click=
"getClassInfo(item)"
>
{{
item
.
ClassName
}}
</div>
{{
item
.
ClassName
}}
</div>
...
...
src/components/sale/editOrder-form.vue
View file @
beec4997
...
@@ -53,16 +53,24 @@
...
@@ -53,16 +53,24 @@
</
template
>
</
template
>
</q-select>
</q-select>
</template>
</template>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Class_Price"
:disable=
"true"
class=
"col-12 q-pb-lg"
label=
"单价(课程售价)"
style=
"display:none;"
/>
<
template
v-if=
"modityOrderType==1"
>
<
template
v-if=
"modityOrderType==1"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"calcPrice()"
class=
"col-12"
label=
"成交单价"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"calcPrice()"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
style=
"display:none;"
/>
</
template
>
</
template
>
<
template
v-if=
"modityOrderType==2"
>
<
template
v-if=
"modityOrderType==2"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"true"
@
input=
"calcPrice()"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"true"
@
input=
"calcPrice()"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
</
template
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerDiscountMoney"
:disable=
"true"
class=
"col-12 q-pb-lg"
label=
"优惠金额(每人)"
:hint=
"'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)"
/>
<
template
v-if=
"modityOrderType==3"
>
<
template
v-if=
"modityOrderType==3"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"calcPrice()"
class=
"col-12"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"calcPrice()"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
...
@@ -90,9 +98,10 @@
...
@@ -90,9 +98,10 @@
maxlength=
"50"
v-model=
"OrderMsg.EduOccupation"
class=
"col-12 q-pb-lg"
label=
"教育同行"
/>
maxlength=
"50"
v-model=
"OrderMsg.EduOccupation"
class=
"col-12 q-pb-lg"
label=
"教育同行"
/>
<q-toggle
:disable=
"(modityOrderType==2)"
v-model=
"OrderMsg.IsLessPrice"
:false-value=
"0"
:true-value=
"1"
<q-toggle
:disable=
"(modityOrderType==2)"
v-model=
"OrderMsg.IsLessPrice"
:false-value=
"0"
:true-value=
"1"
label=
"是否少价"
class=
"q-mb-md"
/>
label=
"是否少价"
class=
"q-mb-md"
/>
<q-input
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.IsLessPrice==1"
<q-input
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.IsLessPrice==1"
@
input=
"calcPrice()"
@
keyup
.
native=
"checkPrice(OrderMsg,'LessPrice')"
maxlength=
"10"
filled
stack-label
:dense=
"false"
@
keyup
.
native=
"checkPrice(OrderMsg,'PerLessMoney')"
maxlength=
"10"
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.LessPrice"
class=
"col-12"
label=
"少价金额"
/>
v-model=
"OrderMsg.PerLessMoney"
class=
"col-12"
label=
"少价金额(每人)"
:hint=
"'总少价金额:'+(OrderMsg.PerLessMoney*OrderMsg.GuestNum)"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
<div
style=
"margin:30px 10px 70px 0;"
>
<div
style=
"margin:30px 10px 70px 0;"
>
...
@@ -154,7 +163,7 @@
...
@@ -154,7 +163,7 @@
PreferPrice
:
0
,
PreferPrice
:
0
,
OrderSource
:
0
,
OrderSource
:
0
,
SaleRemark
:
""
,
SaleRemark
:
""
,
Class_Price
:
0
,
Class_Price
:
0
,
//单价
OrderId
:
0
,
OrderId
:
0
,
OrderType
:
0
,
//订单类型(1-班级课程订单,2-留学就业订单)
OrderType
:
0
,
//订单类型(1-班级课程订单,2-留学就业订单)
SourceId
:
0
,
//来源编号
SourceId
:
0
,
//来源编号
...
@@ -163,6 +172,7 @@
...
@@ -163,6 +172,7 @@
EduOccupation
:
""
,
//教育同行
EduOccupation
:
""
,
//教育同行
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
LessPrice
:
0
,
//少价金额
LessPrice
:
0
,
//少价金额
PerLessMoney
:
0
,
//每人少价金额
OrderNature
:
1
,
//订单性质
OrderNature
:
1
,
//订单性质
OldPreferPrice
:
0
,
//原实际应收
OldPreferPrice
:
0
,
//原实际应收
IsChaBan
:
0
,
//是否插班报入(1-是)
IsChaBan
:
0
,
//是否插班报入(1-是)
...
@@ -171,7 +181,10 @@
...
@@ -171,7 +181,10 @@
EffectTime
:
''
,
//生效时间
EffectTime
:
''
,
//生效时间
UpOrderId
:
0
,
//前置订单编号
UpOrderId
:
0
,
//前置订单编号
JoinType
:
1
,
//订单报入类型
JoinType
:
1
,
//订单报入类型
DiscountMoney
:
0
,
//优惠金额
PerDiscountMoney
:
0
,
//每人优惠金额
},
},
Unit_PriceRemark
:
""
,
//单价规则
IsShowUpPrice
:
false
,
//是否显示高于定价
IsShowUpPrice
:
false
,
//是否显示高于定价
UnitPrice
:
0
,
UnitPrice
:
0
,
SourceEnumList
:
[],
//订单来源
SourceEnumList
:
[],
//订单来源
...
@@ -223,43 +236,46 @@
...
@@ -223,43 +236,46 @@
},
},
//计算课程单价和应收金额
//计算课程单价和应收金额
calcPrice
()
{
calcPrice
()
{
var
guestNum
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
}
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
if
(
temp
)
{
if
(
temp
)
{
this
.
courseObj
=
temp
;
this
.
courseObj
=
temp
;
if
(
this
.
OrderMsg
.
GuestNum
==
1
)
{
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
""
;
//备注
if
(
guestNum
==
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
this
.
OrderMsg
.
SaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
}
else
{
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
tempDiscountMoney
=
item
.
CoursePriceList
[
0
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
;
this
.
OrderMsg
.
SaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
;
}
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
}
}
}
}
if
(
this
.
OrderMsg
.
G
uestNum
>
1
)
{
if
(
g
uestNum
>
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
SaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
}
else
{
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
tempSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
tempDiscountMoney
=
item
.
CoursePriceList
[
1
].
PriceMoney
;
this
.
OrderMsg
.
SaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
}
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
}
}
}
}
//计算每人优惠和总优惠
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
;
this
.
OrderMsg
.
SaleRemark
=
tempSaleRemark
;
}
else
{
}
else
{
if
(
this
.
saveObj
.
ClassId
)
{
if
(
this
.
saveObj
.
ClassId
)
{
this
.
OrderMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
this
.
OrderMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
...
@@ -273,11 +289,15 @@
...
@@ -273,11 +289,15 @@
}
}
this
.
courseObj
=
{};
this
.
courseObj
=
{};
}
}
var
guestNum
=
0
;
var
unit_price
=
0
;
/**计算少价---开始*/
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
var
tempPerLessMoney
=
0
;
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
if
(
this
.
OrderMsg
.
PerLessMoney
&&
this
.
OrderMsg
.
PerLessMoney
>
0
)
{
tempPerLessMoney
=
this
.
OrderMsg
.
PerLessMoney
;
}
}
this
.
OrderMsg
.
LessPrice
=
tempPerLessMoney
*
guestNum
;
/**计算少价----结束*/
var
unit_price
=
0
;
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
}
...
@@ -288,9 +308,9 @@
...
@@ -288,9 +308,9 @@
newPreferPrice
=
(
unit_price
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
newPreferPrice
=
(
unit_price
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
)
*
guestNum
.
OrderMsg
.
StartClassHours
)
*
guestNum
}
}
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
);
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
)
-
this
.
OrderMsg
.
LessPrice
;
}
else
{
}
else
{
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
)
-
this
.
OrderMsg
.
LessPrice
;
}
}
//留学就业订单
//留学就业订单
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
...
@@ -319,6 +339,7 @@
...
@@ -319,6 +339,7 @@
this
.
OrderMsg
.
EduOccupation
=
tempData
.
EduOccupation
;
this
.
OrderMsg
.
EduOccupation
=
tempData
.
EduOccupation
;
this
.
OrderMsg
.
IsLessPrice
=
tempData
.
IsLessPrice
;
this
.
OrderMsg
.
IsLessPrice
=
tempData
.
IsLessPrice
;
this
.
OrderMsg
.
LessPrice
=
tempData
.
LessPrice
;
this
.
OrderMsg
.
LessPrice
=
tempData
.
LessPrice
;
this
.
OrderMsg
.
PerLessMoney
=
tempData
.
PerLessMoney
;
this
.
OrderMsg
.
OrderNature
=
tempData
.
OrderNature
;
this
.
OrderMsg
.
OrderNature
=
tempData
.
OrderNature
;
this
.
OrderMsg
.
OldPreferPrice
=
tempData
.
OldPreferPrice
;
this
.
OrderMsg
.
OldPreferPrice
=
tempData
.
OldPreferPrice
;
this
.
OrderMsg
.
CourseId
=
tempData
.
CourseId
;
this
.
OrderMsg
.
CourseId
=
tempData
.
CourseId
;
...
@@ -327,6 +348,8 @@
...
@@ -327,6 +348,8 @@
this
.
OrderMsg
.
IsChaBan
=
tempData
.
IsChaBan
;
this
.
OrderMsg
.
IsChaBan
=
tempData
.
IsChaBan
;
this
.
OrderMsg
.
EffectTime
=
tempData
.
EffectTime
;
this
.
OrderMsg
.
EffectTime
=
tempData
.
EffectTime
;
this
.
OrderMsg
.
UpOrderId
=
tempData
.
UpOrderId
;
this
.
OrderMsg
.
UpOrderId
=
tempData
.
UpOrderId
;
this
.
OrderMsg
.
DiscountMoney
=
tempData
.
DiscountMoney
;
this
.
OrderMsg
.
PerDiscountMoney
=
tempData
.
PerDiscountMoney
;
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
this
.
IsShowEditOrder
=
true
;
this
.
IsShowEditOrder
=
true
;
}
}
...
@@ -338,6 +361,7 @@
...
@@ -338,6 +361,7 @@
this
.
OrderMsg
.
EduOccupation
=
''
;
this
.
OrderMsg
.
EduOccupation
=
''
;
this
.
OrderMsg
.
IsLessPrice
=
0
;
this
.
OrderMsg
.
IsLessPrice
=
0
;
this
.
OrderMsg
.
LessPrice
=
0
;
this
.
OrderMsg
.
LessPrice
=
0
;
this
.
OrderMsg
.
PerLessMoney
=
0
;
this
.
OrderMsg
.
OrderNature
=
0
;
this
.
OrderMsg
.
OrderNature
=
0
;
this
.
OrderMsg
.
OldPreferPrice
=
0
;
this
.
OrderMsg
.
OldPreferPrice
=
0
;
this
.
OrderMsg
.
GuestNum
=
1
;
this
.
OrderMsg
.
GuestNum
=
1
;
...
@@ -346,6 +370,8 @@
...
@@ -346,6 +370,8 @@
this
.
OrderMsg
.
EffectTime
=
""
;
this
.
OrderMsg
.
EffectTime
=
""
;
this
.
OrderMsg
.
UpOrderId
=
0
;
this
.
OrderMsg
.
UpOrderId
=
0
;
this
.
OrderMsg
.
JoinType
=
1
;
this
.
OrderMsg
.
JoinType
=
1
;
this
.
OrderMsg
.
DiscountMoney
=
0
;
this
.
OrderMsg
.
PerDiscountMoney
=
0
;
this
.
OrderMsg
.
OrderType
=
this
.
orderType
;
this
.
OrderMsg
.
OrderType
=
this
.
orderType
;
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
this
.
OrderMsg
.
OrderNature
=
1
;
this
.
OrderMsg
.
OrderNature
=
1
;
...
@@ -356,6 +382,7 @@
...
@@ -356,6 +382,7 @@
}
}
if
(
this
.
saveObj
.
Unit_Price
)
{
if
(
this
.
saveObj
.
Unit_Price
)
{
this
.
OrderMsg
.
Unit_Price
=
this
.
saveObj
.
Unit_Price
;
this
.
OrderMsg
.
Unit_Price
=
this
.
saveObj
.
Unit_Price
;
this
.
OrderMsg
.
Class_Price
=
this
.
saveObj
.
Unit_Price
;
this
.
UnitPrice
=
this
.
saveObj
.
Unit_Price
;
this
.
UnitPrice
=
this
.
saveObj
.
Unit_Price
;
}
}
if
(
this
.
saveObj
.
SourceId
)
{
if
(
this
.
saveObj
.
SourceId
)
{
...
@@ -438,6 +465,7 @@
...
@@ -438,6 +465,7 @@
return
;
return
;
}
}
}
}
//插班报名计算应收
//插班报名计算应收
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
...
...
src/components/schedul/exorder-form.vue
View file @
beec4997
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
</div>
</div>
<div
style=
"padding:20px 15px;"
>
<div
style=
"padding:20px 15px;"
>
<q-input
filled
stack-label
maxlength=
"100"
:disable=
"true"
:dense=
"false"
<q-input
filled
stack-label
maxlength=
"100"
:disable=
"true"
:dense=
"false"
@
keyup
.
native=
"checkInteger(OrderMsg,'GuestNum')"
v-model=
"OrderMsg.GuestNum"
@
keyup
.
native=
"checkInteger(OrderMsg,'GuestNum')"
v-model=
"OrderMsg.GuestNum"
@
input=
"calcPrice"
@
input=
"changePrice(),countPrice()"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
<q-select
filled
v-model=
"OrderMsg.ClassId"
class=
"q-pb-lg"
ref=
"ClassId"
:options=
"classList"
<q-select
filled
v-model=
"OrderMsg.ClassId"
class=
"q-pb-lg"
ref=
"ClassId"
:options=
"classList"
option-label=
"ClassName"
option-value=
"ClassId"
emit-value
map-options
:rules=
"[val => !!val || '请选择班级']"
option-label=
"ClassName"
option-value=
"ClassId"
emit-value
map-options
:rules=
"[val => !!val || '请选择班级']"
...
@@ -31,11 +31,15 @@
...
@@ -31,11 +31,15 @@
<q-select
filled
option-value=
"CourseId"
option-label=
"CourseName"
ref=
"CourseId"
v-model=
"OrderMsg.CourseId"
<q-select
filled
option-value=
"CourseId"
option-label=
"CourseName"
ref=
"CourseId"
v-model=
"OrderMsg.CourseId"
:options=
"CourseList"
emit-value
map-options
class=
"q-pb-lg"
:rules=
"[val => !!val || '请选择课程']"
label=
"选择课程"
:options=
"CourseList"
emit-value
map-options
class=
"q-pb-lg"
:rules=
"[val => !!val || '请选择课程']"
label=
"选择课程"
@
input=
"c
hange
Price"
/>
@
input=
"c
alc
Price"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"c
ount
Price"
class=
"col-12"
label=
"成交单价"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"c
alc
Price"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerDiscountMoney"
:disable=
"true"
class=
"col-12 q-pb-lg"
label=
"优惠金额(每人)"
:hint=
"'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
style=
"display:none;"
/>
<q-input
filled
stack-label
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
<q-input
filled
stack-label
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
...
@@ -57,8 +61,10 @@
...
@@ -57,8 +61,10 @@
v-model=
"OrderMsg.EduOccupation"
class=
"col-12 q-pb-lg"
label=
"教育同行"
/>
v-model=
"OrderMsg.EduOccupation"
class=
"col-12 q-pb-lg"
label=
"教育同行"
/>
<q-toggle
v-model=
"OrderMsg.IsLessPrice"
:false-value=
"0"
:true-value=
"1"
label=
"是否少价"
class=
"q-mb-md"
/>
<q-toggle
v-model=
"OrderMsg.IsLessPrice"
:false-value=
"0"
:true-value=
"1"
label=
"是否少价"
class=
"q-mb-md"
/>
<q-input
v-if=
"OrderMsg.IsLessPrice==1"
@
keyup
.
native=
"checkPrice(OrderMsg,'LessPrice')"
maxlength=
"10"
filled
<q-input
v-if=
"OrderMsg.IsLessPrice==1"
@
input=
"calcPrice()"
@
keyup
.
native=
"checkPrice(OrderMsg,'PerLessMoney')"
stack-label
:dense=
"false"
v-model=
"OrderMsg.LessPrice"
class=
"col-12"
label=
"少价金额"
/>
maxlength=
"10"
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.PerLessMoney"
class=
"col-12"
label=
"少价金额(每人)"
:hint=
"'总少价金额:'+(OrderMsg.PerLessMoney*OrderMsg.GuestNum)"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
<div
style=
"margin:30px 10px 70px 0;"
>
<div
style=
"margin:30px 10px 70px 0;"
>
...
@@ -120,6 +126,7 @@
...
@@ -120,6 +126,7 @@
EduOccupation
:
""
,
//教育同行
EduOccupation
:
""
,
//教育同行
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
LessPrice
:
0
,
//少价金额
LessPrice
:
0
,
//少价金额
PerLessMoney
:
0
,
//每人少价金额
OrderNature
:
1
,
//订单性质
OrderNature
:
1
,
//订单性质
OldPreferPrice
:
0
,
//原实际应收
OldPreferPrice
:
0
,
//原实际应收
IsChaBan
:
0
,
//是否插班报入(1-是)
IsChaBan
:
0
,
//是否插班报入(1-是)
...
@@ -127,6 +134,9 @@
...
@@ -127,6 +134,9 @@
StartClassHours
:
0
,
//已上课时
StartClassHours
:
0
,
//已上课时
EffectTime
:
''
,
//生效时间
EffectTime
:
''
,
//生效时间
UpOrderId
:
0
,
//前置订单编号
UpOrderId
:
0
,
//前置订单编号
JoinType
:
1
,
//订单报入类型
DiscountMoney
:
0
,
//优惠金额
PerDiscountMoney
:
0
,
//每人优惠金额
},
},
IsShowUpPrice
:
false
,
//是否显示高于定价
IsShowUpPrice
:
false
,
//是否显示高于定价
UnitPrice
:
0
,
UnitPrice
:
0
,
...
@@ -135,14 +145,13 @@
...
@@ -135,14 +145,13 @@
AllemployeeList
:
[],
//所有员工列表
AllemployeeList
:
[],
//所有员工列表
CourseList
:
[],
//课程列表
CourseList
:
[],
//课程列表
courseObj
:
{},
//选择的课程
courseObj
:
{},
//选择的课程
Teacher_Id
:
0
,
Teacher_Id
:
0
,
ClassName
:
''
ClassName
:
''
}
}
},
},
created
()
{
created
()
{
this
.
getOrderSEList
();
this
.
getOrderSEList
();
this
.
getEmployee
();
this
.
getEmployee
();
},
},
mounted
()
{
mounted
()
{
this
.
initData
()
this
.
initData
()
...
@@ -161,7 +170,6 @@
...
@@ -161,7 +170,6 @@
getClassList
(
ClassId
)
{
getClassList
(
ClassId
)
{
this
.
OrderMsg
.
CourseId
=
''
;
this
.
OrderMsg
.
CourseId
=
''
;
this
.
CourseList
=
[];
this
.
CourseList
=
[];
let
val
=
this
.
classList
.
find
(
x
=>
x
.
ClassId
==
ClassId
);
let
val
=
this
.
classList
.
find
(
x
=>
x
.
ClassId
==
ClassId
);
if
(
val
)
{
if
(
val
)
{
this
.
Teacher_Id
=
val
.
Teacher_Id
;
this
.
Teacher_Id
=
val
.
Teacher_Id
;
...
@@ -180,7 +188,8 @@
...
@@ -180,7 +188,8 @@
getClass
()
{
getClass
()
{
getClassDropDownList
({
getClassDropDownList
({
IsAddDefault
:
0
,
IsAddDefault
:
0
,
IsQuerySurplus
:
1
IsQuerySurplus
:
1
,
MoreStatus
:
"1,2"
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
let
tempArray
=
res
.
Data
;
let
tempArray
=
res
.
Data
;
...
@@ -196,46 +205,75 @@
...
@@ -196,46 +205,75 @@
})
})
},
},
//选择课程切换价格
//选择课程切换价格
changePrice
()
{
calcPrice
()
{
var
guestNum
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
}
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
if
(
temp
)
{
if
(
temp
)
{
this
.
courseObj
=
temp
;
this
.
courseObj
=
temp
;
if
(
this
.
OrderMsg
.
GuestNum
==
1
)
{
var
tempDiscountMoney
=
0
;
//优惠金额
var
tempSaleRemark
=
""
;
//备注
if
(
guestNum
==
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
tempDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
tempSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
}
else
{
}
else
{
t
his
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
t
empDiscountMoney
=
item
.
CoursePriceList
[
0
].
PriceMoney
;
t
his
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
t
empSaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
;
}
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
}
}
}
}
if
(
this
.
OrderMsg
.
G
uestNum
>
1
)
{
if
(
g
uestNum
>
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
t
his
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
t
empSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
t
his
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
t
empDiscountMoney
=
(
temp
.
SellPrice
*
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
}
else
{
}
else
{
t
his
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
t
empSaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
t
his
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
t
empDiscountMoney
=
item
.
CoursePriceList
[
1
].
PriceMoney
;
}
}
}
else
{
}
}
//计算每人优惠和总优惠
var
perDiscountMoney
=
Number
(
tempDiscountMoney
).
toFixed
(
2
);
this
.
OrderMsg
.
PerDiscountMoney
=
perDiscountMoney
;
this
.
OrderMsg
.
DiscountMoney
=
perDiscountMoney
*
guestNum
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
this
.
OrderMsg
.
SaleRemark
=
tempSaleRemark
;
}
}
/**计算少价---开始*/
var
tempPerLessMoney
=
0
;
if
(
this
.
OrderMsg
.
PerLessMoney
&&
this
.
OrderMsg
.
PerLessMoney
>
0
)
{
tempPerLessMoney
=
this
.
OrderMsg
.
PerLessMoney
;
}
}
this
.
OrderMsg
.
LessPrice
=
tempPerLessMoney
*
guestNum
;
/**计算少价----结束*/
var
unit_price
=
0
;
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
//计算应收价格
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
}
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
)
-
this
.
OrderMsg
.
LessPrice
;
}
else
{
}
else
{
this
.
OrderMsg
.
Unit_Price
=
0
;
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
)
-
this
.
OrderMsg
.
LessPrice
;
this
.
UnitPrice
=
0
;
}
this
.
courseObj
=
{};
//留学就业订单
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
this
.
OrderMsg
.
OldPreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
}
}
this
.
countPrice
();
},
},
//筛选员工
//筛选员工
filterFn
(
val
,
update
)
{
filterFn
(
val
,
update
)
{
...
@@ -281,36 +319,12 @@
...
@@ -281,36 +319,12 @@
}
}
})
})
},
},
//计算价格
countPrice
()
{
var
guestNum
=
0
;
var
unit_price
=
0
;
if
(
this
.
OrderMsg
.
GuestNum
&&
this
.
OrderMsg
.
GuestNum
>
0
)
{
guestNum
=
Number
(
this
.
OrderMsg
.
GuestNum
);
}
if
(
this
.
OrderMsg
.
Unit_Price
&&
this
.
OrderMsg
.
Unit_Price
>
0
)
{
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
//计算应收价格
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
var
newPreferPrice
=
0
;
if
(
this
.
courseObj
&&
this
.
courseObj
.
CourseId
&&
this
.
courseObj
.
CourseId
>
0
)
{
newPreferPrice
=
(
this
.
UnitPrice
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
)
*
guestNum
}
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
);
}
else
{
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
}
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
this
.
OrderMsg
.
OldPreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
}
},
//修改订单
//修改订单
saveOrderInfo
()
{
saveOrderInfo
()
{
this
.
OrderMsg
.
PreferPrice
=
(
this
.
OrderMsg
.
GuestNum
*
this
.
OrderMsg
.
Unit_Price
)
-
this
.
OrderMsg
.
LessPrice
;
this
.
OrderMsg
.
PreferPrice
=
(
this
.
OrderMsg
.
GuestNum
*
this
.
OrderMsg
.
Unit_Price
)
-
this
.
OrderMsg
.
LessPrice
;
this
.
OrderMsg
.
VisitorReserveId
=
this
.
saveObj
.
Id
;
this
.
OrderMsg
.
VisitorReserveId
=
this
.
saveObj
.
Id
;
if
(
this
.
Teacher_Id
==
0
)
{
if
(
this
.
Teacher_Id
==
0
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
'negative'
,
type
:
'negative'
,
position
:
"top"
,
position
:
"top"
,
...
...
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