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
f4a717da
Commit
f4a717da
authored
Aug 09, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
78774455
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
72 deletions
+92
-72
editOrder-form.vue
src/components/sale/editOrder-form.vue
+71
-54
japaneseTrain.vue
src/pages/sale/japaneseTrain.vue
+21
-18
No files found.
src/components/sale/editOrder-form.vue
View file @
f4a717da
...
...
@@ -22,14 +22,14 @@
</div>
<div
style=
"padding:20px 15px;"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
@
keyup
.
native=
"checkInteger(OrderMsg,'GuestNum')"
v-model=
"OrderMsg.GuestNum"
@
input=
"c
hangePrice(),countPrice()"
class=
"col-12"
label=
"人数
"
:
rules=
"[val => !!val || '请填写人数']"
:
disable=
"modityOrderType==2"
/>
v-model=
"OrderMsg.GuestNum"
@
input=
"c
alcPrice()"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']
"
:disable=
"modityOrderType==2"
/>
<template
v-if=
"isChaBan==1"
>
<q-select
filled
option-value=
"CourseId"
:disable=
"modityOrderType==2"
option-label=
"CourseName"
ref=
"CourseId"
v-model=
"OrderMsg.CourseId"
:options=
"CourseList"
emit-value
map-options
class=
"q-pb-lg"
:rules=
"[val => !!val || '请选择课程']"
label=
"选择课程"
@
input=
"c
hangePrice
"
/>
:rules=
"[val => !!val || '请选择课程']"
label=
"选择课程"
@
input=
"c
alcPrice()
"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.StartClassHours"
:disable=
"modityOrderType==2"
@
keyup
.
native=
"checkInteger(OrderMsg,'StartClassHours')"
ref=
"StartClassHours"
@
input=
"c
ountPrice
"
@
keyup
.
native=
"checkInteger(OrderMsg,'StartClassHours')"
ref=
"StartClassHours"
@
input=
"c
alcPrice()
"
class=
"col-12 q-pb-lg"
label=
"起始课时"
/>
<q-input
filled
v-model=
"OrderMsg.EffectTime"
ref=
"EffectTime"
:rules=
"[val => !!val || '请填生效时间']"
class=
"col-6 q-pb-lg"
:disable=
"modityOrderType==2"
mask=
"date"
label=
"生效时间"
>
...
...
@@ -56,16 +56,16 @@
</template>
<
template
v-if=
"modityOrderType==1"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"c
ountPrice
"
class=
"col-12"
label=
"成交单价"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"c
alcPrice()
"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
</
template
>
<
template
v-if=
"modityOrderType==2"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"true"
@
input=
"c
ountPrice
"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"true"
@
input=
"c
alcPrice()
"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<
template
v-if=
"modityOrderType==3"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"c
ountPrice
"
class=
"col-12"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
input=
"c
alcPrice()
"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
template
>
<q-input
filled
stack-label
:disable=
"modityOrderType!=3"
:dense=
"false"
maxlength=
"10"
...
...
@@ -186,19 +186,14 @@
},
created
()
{
this
.
OrderMsg
.
IsChaBan
=
this
.
isChaBan
;
this
.
initConfig
();
//HK2021-08-06新增
if
(
this
.
saveObj
&&
this
.
saveObj
.
CourseId
)
{
this
.
OrderMsg
.
CourseId
=
this
.
saveObj
.
CourseId
;
}
this
.
getOrderSEList
();
this
.
getEmployee
();
this
.
initConfig
();
this
.
getSelectClass
();
var
localStorageData
=
window
.
localStorage
[
"loginUserInfo"
];
let
ActionMenuList
=
JSON
.
parse
(
localStorageData
).
data
.
ActionMenuList
if
(
ActionMenuList
&&
ActionMenuList
.
length
>
0
)
{
ActionMenuList
.
forEach
(
x
=>
{
if
(
x
.
FunctionCode
==
'E_ModifyStudyOrderPrice'
)
{
}
})
}
},
mounted
()
{
this
.
initData
()
...
...
@@ -207,7 +202,7 @@
},
methods
:
{
//获取
插班报入配置
信息
//获取
班级课程
信息
initConfig
()
{
var
qMsg
=
{
ClassId
:
0
...
...
@@ -224,11 +219,12 @@
if
(
this
.
OrderMsg
&&
this
.
OrderMsg
.
CourseId
)
{
this
.
courseObj
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
}
this
.
calcPrice
();
}
});
},
//
选择课程切换价格
c
hange
Price
()
{
//
计算课程单价和应收金额
c
alc
Price
()
{
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
if
(
temp
)
{
this
.
courseObj
=
temp
;
...
...
@@ -238,9 +234,11 @@
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
this
.
OrderMsg
.
SaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
+
"%"
;
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
this
.
OrderMsg
.
SaleRemark
=
"单人报名优惠"
+
temp
.
CoursePriceList
[
0
].
PriceMoney
;
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
...
...
@@ -253,9 +251,11 @@
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
this
.
OrderMsg
.
SaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
+
"%"
;
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
this
.
OrderMsg
.
SaleRemark
=
"双人报名优惠"
+
temp
.
CoursePriceList
[
1
].
PriceMoney
;
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
...
...
@@ -275,7 +275,29 @@
}
this
.
courseObj
=
{};
}
this
.
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
=
(
unit_price
/
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
);
}
},
initData
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
OrderId
>
0
)
{
...
...
@@ -321,7 +343,6 @@
this
.
OrderMsg
.
OrderNature
=
0
;
this
.
OrderMsg
.
OldPreferPrice
=
0
;
this
.
OrderMsg
.
GuestNum
=
1
;
this
.
OrderMsg
.
CourseId
=
''
;
this
.
OrderMsg
.
StartClassHours
=
0
;
this
.
OrderMsg
.
IsChaBan
=
this
.
isChaBan
;
this
.
OrderMsg
.
EffectTime
=
""
;
...
...
@@ -342,9 +363,15 @@
if
(
this
.
saveObj
.
SourceId
)
{
this
.
OrderMsg
.
SourceId
=
this
.
saveObj
.
SourceId
;
}
if
(
this
.
saveObj
.
CourseId
)
{
this
.
OrderMsg
.
CourseId
=
this
.
saveObj
.
CourseId
;
}
else
{
this
.
OrderMsg
.
CourseId
=
''
;
}
}
this
.
countPrice
();
this
.
IsShowEditOrder
=
true
;
this
.
calcPrice
();
}
},
//筛选员工
...
...
@@ -373,7 +400,7 @@
}
this
.
EmployeeList
.
unshift
(
obj
);
}
})
.
catch
(()
=>
{})
})
},
//关闭弹窗
closeEditOrder
()
{
...
...
@@ -390,42 +417,30 @@
}
})
},
//计算价格
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
()
{
//插班验证课程和生效时间
if
(
this
.
isChaBan
==
1
)
{
this
.
$refs
.
CourseId
.
validate
();
this
.
$refs
.
EffectTime
.
validate
();
if
(
this
.
$refs
.
CourseId
.
hasError
||
this
.
$refs
.
EffectTime
.
hasError
)
{
if
(
this
.
$refs
.
CourseId
.
hasError
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择课程!`
})
return
;
}
if
(
this
.
$refs
.
EffectTime
.
hasError
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择生效时间!`
})
return
;
}
//计算应收价格
}
//插班报名计算应收
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
if
(
!
this
.
courseObj
||
(
this
.
courseObj
&&
!
this
.
courseObj
.
ClassHours
))
{
...
...
@@ -437,7 +452,9 @@
this
.
OrderMsg
.
StartClassHours
)
*
this
.
OrderMsg
.
GuestNum
-
this
.
OrderMsg
.
LessPrice
;
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
);
}
}
else
{
}
//正常报名计算应收
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
;
}
...
...
@@ -461,7 +478,7 @@
message
:
res
.
Message
})
}
})
.
catch
(()
=>
{})
})
},
//获取前置下拉数据
getSelectClass
()
{
...
...
src/pages/sale/japaneseTrain.vue
View file @
f4a717da
...
...
@@ -271,8 +271,6 @@
<div
v-if=
"item.IsCanApply==0"
>
<img
src=
"../../assets/images/administration/bmym.png"
alt=
""
style=
"width: 64px;height: 62px;margin:20px 15px 0 0"
v-if=
"item.SurplusNum==0"
>
<!-- <img src="../../assets/images/administration/guoqi.png" alt="" style="width: 64px;height: 62px"
v-if="getEXPDate(item.EndOrderTime)==true"> -->
</div>
<div>
<q-btn
style=
"margin-top:10px;"
size=
"sm"
color=
"primary"
label=
"订单中心"
@
click=
"goclassorder(item)"
/>
...
...
@@ -301,8 +299,8 @@
</ul>
<div
v-else
style=
"width: 100%;color: #999999;text-align: center;font-size: 15px"
>
暂无数据
</div>
</div>
<editorder-form
v-if=
"isShowEditOrderForm"
:save-obj=
"orderObj"
:orderType=
"1"
:modityOrderType=
"1"
:isChaBan=
"isChaBan"
@
close=
"closeOrderSaveForm"
@
success=
"refreshOrder"
>
<editorder-form
v-if=
"isShowEditOrderForm"
:save-obj=
"orderObj"
:orderType=
"1"
:modityOrderType=
"1"
:isChaBan=
"isChaBan"
@
close=
"closeOrderSaveForm"
@
success=
"refreshOrder"
>
</editorder-form>
</div>
</div>
...
...
@@ -347,7 +345,7 @@
Q_CanApply
:
"0"
,
//是否可以报名 1是
JoinStartTime
:
''
,
//报名截止日期开始
JoinEndTime
:
""
,
//报名截止日期结束
ClassNo
:
''
,
//班号
ClassNo
:
''
,
//班号
},
//关联校区列表
schoolList
:
[],
...
...
@@ -360,6 +358,7 @@
orderObj
:
{
ClassId
:
0
,
Unit_Price
:
0
,
CourseId
:
0
,
},
isChaBan
:
0
,
//是否插班(0-正常报入,1-插班报入)
}
...
...
@@ -369,7 +368,7 @@
this
.
CourseList
();
this
.
GetTeacherList
();
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassName
)
{
this
.
msg
.
ClassName
=
decodeURI
(
this
.
$route
.
query
.
ClassName
)
;
this
.
msg
.
ClassName
=
decodeURI
(
this
.
$route
.
query
.
ClassName
);
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassNo
)
{
this
.
msg
.
ClassNo
=
this
.
$route
.
query
.
ClassNo
;
...
...
@@ -525,7 +524,7 @@
},
//立即报名和插班报名
placeAnorder
(
item
,
type
)
{
if
(
item
.
Teacher_Id
==
0
)
{
if
(
item
.
Teacher_Id
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
...
...
@@ -536,11 +535,12 @@
this
.
isChaBan
=
type
;
this
.
orderObj
.
ClassId
=
item
.
ClassId
;
this
.
orderObj
.
Unit_Price
=
item
.
SellPrice
;
this
.
orderObj
.
CourseId
=
item
.
CouseId
;
this
.
isShowEditOrderForm
=
true
;
},
//跳转到课程大纲
goChapter
(
CouseId
){
this
.
OpenNewUrl
(
'/course/chapter'
,
{
goChapter
(
CouseId
)
{
this
.
OpenNewUrl
(
'/course/chapter'
,
{
CourseId
:
CouseId
});
}
...
...
@@ -684,15 +684,18 @@
border
:
none
!important
;
background
:
transparent
!important
;
}
.japanFeature
{
font-size
:
14px
;
color
:
#111111
;
.japanFeature
{
font-size
:
14px
;
color
:
#111111
;
cursor
:
pointer
;
margin-left
:
-1px
;
margin-left
:
-1px
;
}
.CourseFearure
{
margin
:
10px
;
width
:
500px
;
color
:
#000
;
.CourseFearure
{
margin
:
10px
;
width
:
500px
;
color
:
#000
;
}
</
style
>
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