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
ccb5be5a
Commit
ccb5be5a
authored
Jun 11, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d62d22e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
17 deletions
+34
-17
editOrder-form.vue
src/components/sale/editOrder-form.vue
+34
-17
No files found.
src/components/sale/editOrder-form.vue
View file @
ccb5be5a
...
...
@@ -8,6 +8,7 @@
padding
:
5px
10px
;
align-items
:
center
;
}
</
style
>
<!--订单操作-->
...
...
@@ -20,14 +21,15 @@
</div>
</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=
"countPrice"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
@
keyup
.
native=
"checkInteger(OrderMsg,'GuestNum')"
v-model=
"OrderMsg.GuestNum"
@
input=
"countPrice"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
:disable=
"modityOrderType==2"
/>
<template
v-if=
"isChaBan==1"
>
<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=
"选择课程"
<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=
"选择课程"
@
input=
"changePrice"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.StartClassHours"
@
keyup
.
native=
"checkInteger(OrderMsg,'StartClassHours')"
ref=
"StartClassHours"
@
blur=
"countPrice"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.StartClassHours"
@
keyup
.
native=
"checkInteger(OrderMsg,'StartClassHours')"
ref=
"StartClassHours"
@
blur=
"countPrice"
class=
"col-12"
label=
"起始课时"
:rules=
"[val => !!val || '请填起始课时']"
/>
</
template
>
<
template
v-if=
"modityOrderType==1"
>
...
...
@@ -43,10 +45,10 @@
<
template
v-if=
"modityOrderType==3"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
@
blur=
"countPrice"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-input
filled
stack-label
v-if=
"OrderMsg.OrderType==1"
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
</
template
>
<q-input
filled
stack-label
:disable=
"modityOrderType!=3"
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
<q-select
:disable=
"modityOrderType==2"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource"
:options=
"SourceEnumList"
emit-value
map-options
class=
"q-pb-lg"
label=
"客人来源"
/>
...
...
@@ -152,7 +154,7 @@
EmployeeList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工列表
CourseList
:
[],
//课程列表
c
hoiceObj
:{}
c
ourseObj
:
{}
//选择的课程
}
},
created
()
{
...
...
@@ -194,14 +196,14 @@
//选择课程切换价格
changePrice
()
{
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
console
.
log
(
temp
,
'temp'
);
this
.
choiceObj
=
temp
;
if
(
temp
)
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
this
.
courseObj
=
temp
;
}
else
{
this
.
OrderMsg
.
Unit_Price
=
0
;
this
.
UnitPrice
=
0
;
this
.
courseObj
=
{};
}
this
.
countPrice
();
},
...
...
@@ -324,24 +326,39 @@
unit_price
=
Number
(
this
.
OrderMsg
.
Unit_Price
);
}
//计算应收价格
this
.
OrderMsg
.
PreferPrice
=
Number
(
guestNum
*
unit_price
).
toFixed
(
2
);
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
var
newPreferPrice
=
0
;
if
(
this
.
courseObj
)
{
newPreferPrice
=
this
.
courseObj
.
SellPrice
/
this
.
courseObj
.
ClassHours
*
(
this
.
courseObj
.
ClassHours
-
this
.
courseObj
.
StartClassHours
)
}
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
.
OrderMsg
.
OrderType
==
1
)
{
//计算应收价格
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
var
newPreferPrice
=
this
.
courseObj
.
SellPrice
/
this
.
courseObj
.
ClassHours
*
(
this
.
courseObj
.
ClassHours
-
this
.
courseObj
.
StartClassHours
)
-
this
.
OrderMsg
.
LessPrice
;
this
.
OrderMsg
.
PreferPrice
=
Number
(
newPreferPrice
).
toFixed
(
2
);
}
}
else
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
this
.
OrderMsg
.
PreferPrice
=
(
this
.
OrderMsg
.
GuestNum
*
this
.
OrderMsg
.
Unit_Price
)
-
this
.
OrderMsg
.
LessPrice
;
}
}
if
(
this
.
isChaBan
==
1
)
{
if
(
this
.
isChaBan
==
1
)
{
this
.
$refs
.
CourseId
.
validate
();
this
.
$refs
.
StartClassHours
.
validate
();
if
(
this
.
$refs
.
CourseId
.
hasError
||
this
.
$refs
.
StartClassHours
.
hasError
)
{
return
;
if
(
this
.
$refs
.
CourseId
.
hasError
||
this
.
$refs
.
StartClassHours
.
hasError
)
{
return
;
}
}
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