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
5e032047
Commit
5e032047
authored
May 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1c351253
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
63 deletions
+104
-63
editOrder-form.vue
src/components/sale/editOrder-form.vue
+104
-63
No files found.
src/components/sale/editOrder-form.vue
View file @
5e032047
<!--
修改订单
-->
<!--
订单操作
-->
<
template
>
<
template
>
<q-dialog
v-model=
"IsShowEditOrder"
maximized
full-height
seamless
position=
"right"
>
<q-dialog
v-model=
"IsShowEditOrder"
maximized
full-height
seamless
position=
"right"
>
<q-card
style=
"margin-top:61px;width:500px"
class=
"no-border-radius classinfo_Dialog"
>
<q-card
style=
"margin-top:61px;width:500px"
class=
"no-border-radius classinfo_Dialog"
>
<div
class=
"drawerTop"
>
<div
class=
"drawerTop"
>
<div
style=
"display:flex;align-items:center;margin-left:10px;"
>
<div
style=
"display:flex;align-items:center;margin-left:10px;"
>
<span
class=
"drawer_Span"
>
修改订单
</span>
<span
class=
"drawer_Span"
>
{{
OrderMsg
.
OrderId
>
0
?
"修改订单"
:
"立即下单"
}}
</span>
</div>
</div>
</div>
</div>
<div
style=
"padding:20px 15px;"
>
<div
style=
"padding:20px 15px;"
>
...
@@ -12,10 +12,15 @@
...
@@ -12,10 +12,15 @@
@
input=
"peopleNumber"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
@
input=
"peopleNumber"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"UPrice==true?false:true"
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"UPrice==true?false:true"
@
blur=
"priceNumber"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
@
blur=
"priceNumber"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"UPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
<!-- @change="resetSearch"-->
<q-toggle
v-model=
"IsShowUpPrice"
label=
"高于定价收生"
class=
"q-mb-md"
/>
<q-select
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=
"客人来源"
/>
<!--课程订单订单-->
<template
v-if=
"orderType==1||OrderMsg.OrderType==1"
>
<q-select
v-model=
"OrderMsg.HelpEnterId"
:options=
"EmployeeList"
filled
use-input
label=
"协助人员"
<q-select
v-model=
"OrderMsg.HelpEnterId"
:options=
"EmployeeList"
filled
use-input
label=
"协助人员"
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
class=
"col-6 q-pb-lg"
emit-value
map-options
option-label=
"EmployeeName"
option-value=
"Id"
ref=
"EmployeeName"
class=
"col-6 q-pb-lg"
emit-value
@
filter=
"filterFn"
>
map-options
@
filter=
"filterFn"
>
<template
v-slot:no-option
>
<template
v-slot:no-option
>
<q-item>
<q-item>
<q-item-section
class=
"text-grey"
>
<q-item-section
class=
"text-grey"
>
...
@@ -24,18 +29,21 @@
...
@@ -24,18 +29,21 @@
</q-item>
</q-item>
</
template
>
</
template
>
</q-select>
</q-select>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"OrderMsg.OrderSource
"
<q-input
v-if=
"OrderMsg.OrderSource==3"
filled
stack-label
:dense=
"false"
maxlength=
"50
"
:options=
"SourceEnumList"
emit-value
map-options
class=
"q-pb-lg"
label=
"客人来源
"
/>
v-model=
"OrderMsg.GeneralOccupation"
class=
"col-12 q-pb-lg"
label=
"一般同行
"
/>
<q-input
v-if=
"OrderMsg.OrderSource==3"
filled
stack-label
:dense=
"false"
maxlength=
"50"
v-model=
"OrderMsg.GeneralOccupation"
class=
"col-12 q-pb-lg"
label=
"一般同行"
/>
<q-input
v-if=
"OrderMsg.OrderSource==7"
filled
stack-label
:dense=
"false"
maxlength=
"50"
<q-input
v-if=
"OrderMsg.OrderSource==7"
filled
stack-label
:dense=
"false"
maxlength=
"50"
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
stack-label
:dense=
"false"
v-model=
"OrderMsg.LessPrice"
class=
"col-12"
label=
"少价金额"
/>
<q-input
v-if=
"OrderMsg.IsLessPrice==1"
@
keyup
.
native=
"checkPrice(OrderMsg,'LessPrice')"
maxlength=
"10"
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.LessPrice"
class=
"col-12"
label=
"少价金额"
/>
<
template
v-if=
"saveObj.Type==2"
>
</template>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
class=
"q-pb-lg"
option-label=
"Name"
v-model=
"OrderMsg.OrderNature"
<!--留学就业订单-->
:options=
"OrderStatus"
emit-value
map-options
label=
"订单性质"
/>
<
template
v-if=
"orderType==2||OrderMsg.OrderType==2"
>
<q-input
filled
stack-label
:dense=
"false"
maxlength=
"10"
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
class=
"q-pb-lg"
option-label=
"Name"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
:disable=
"OrderMsg.OrderNature==1&&isHaveModify"
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
v-model=
"OrderMsg.OrderNature"
:options=
"OrderStatus"
emit-value
map-options
label=
"订单性质"
/>
<q-input
filled
stack-label
:dense=
"false"
maxlength=
"10"
@
keyup
.
native=
"checkPrice(OrderMsg,'PreferPrice')"
:disable=
"OrderMsg.OrderNature==1&&isHaveModify"
v-model=
"OrderMsg.PreferPrice"
class=
"col-12 q-pb-lg"
label=
"应收"
/>
</
template
>
</
template
>
<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=
"备注"
/>
...
@@ -70,6 +78,11 @@
...
@@ -70,6 +78,11 @@
saveObj
:
{
saveObj
:
{
type
:
Object
,
type
:
Object
,
default
:
null
,
default
:
null
,
},
//订单类型
orderType
:
{
type
:
Number
,
default
:
1
,
}
}
},
},
data
()
{
data
()
{
...
@@ -90,26 +103,27 @@
...
@@ -90,26 +103,27 @@
GeneralOccupation
:
""
,
//一般同行
GeneralOccupation
:
""
,
//一般同行
EduOccupation
:
""
,
//教育同行
EduOccupation
:
""
,
//教育同行
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
LessPrice
:
0
//少价金额
LessPrice
:
0
,
//少价金额
OrderNature
:
1
,
//订单性质
OldPreferPrice
:
0
,
//原实际应收
},
},
UPrice
:
false
,
IsShowUpPrice
:
false
,
//是否显示高于定价
StepPriceList
:
[],
StepPriceList
:
[],
UnitPrice
:
0
,
UnitPrice
:
0
,
SourceEnumList
:
[],
//订单来源
SourceEnumList
:
[],
//订单来源
EmployeeList
:
[],
//员工列表
EmployeeList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工列表
AllemployeeList
:
[],
//所有员工列表
OrderStatus
:[
OrderStatus
:
[{
{
Id
:
1
,
Id
:
1
,
Name
:
'直通车'
Name
:
'直通车'
},
},
{
{
Id
:
2
,
Id
:
2
,
Name
:
'代收代付'
Name
:
'代收代付'
},
},
{
{
Id
:
3
,
Id
:
3
,
Name
:
'返佣'
Name
:
'返佣'
}
}
]
]
...
@@ -132,14 +146,62 @@
...
@@ -132,14 +146,62 @@
}),
}),
created
()
{
created
()
{
this
.
getOrderSEList
();
this
.
getOrderSEList
();
this
.
getEmployee
();
},
},
mounted
()
{
mounted
()
{
if
(
this
.
saveObj
.
OrderId
>
0
){
this
.
initData
()
this
.
getOrderInfo
();
}
this
.
getEmployee
();
},
},
methods
:
{
methods
:
{
initData
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
OrderId
>
0
)
{
getClassOrderInfo
({
OrderId
:
this
.
saveObj
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
OrderMsg
.
ClassId
=
res
.
Data
.
OrderInfo
.
ClassId
;
this
.
OrderMsg
.
GuestNum
=
res
.
Data
.
OrderInfo
.
GuestNum
;
this
.
OrderMsg
.
Unit_Price
=
res
.
Data
.
OrderInfo
.
Unit_Price
;
this
.
OrderMsg
.
PreferPrice
=
res
.
Data
.
OrderInfo
.
PreferPrice
;
this
.
OrderMsg
.
OrderSource
=
res
.
Data
.
OrderInfo
.
OrderSource
;
this
.
OrderMsg
.
SaleRemark
=
res
.
Data
.
OrderInfo
.
SaleRemark
;
this
.
OrderMsg
.
Class_Price
=
res
.
Data
.
OrderInfo
.
Class_Price
;
this
.
OrderMsg
.
OrderId
=
res
.
Data
.
OrderInfo
.
OrderId
;
this
.
OrderMsg
.
OrderType
=
res
.
Data
.
OrderInfo
.
OrderType
;
this
.
OrderMsg
.
SourceId
=
res
.
Data
.
OrderInfo
.
SourceId
;
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
this
.
StepPriceList
=
res
.
Data
.
StepPriceList
;
this
.
IsShowEditOrder
=
true
;
}
})
}
else
{
this
.
OrderMsg
.
SaleRemark
=
''
;
//清空备注
this
.
OrderMsg
.
HelpEnterId
=
0
;
this
.
OrderMsg
.
GeneralOccupation
=
''
;
this
.
OrderMsg
.
EduOccupation
=
''
;
this
.
OrderMsg
.
IsLessPrice
=
0
;
this
.
OrderMsg
.
LessPrice
=
0
;
this
.
OrderMsg
.
OrderNature
=
0
;
this
.
OrderMsg
.
OldPreferPrice
=
0
;
this
.
OrderMsg
.
GuestNum
=
1
;
this
.
OrderMsg
.
OrderType
=
this
.
orderType
;
if
(
this
.
OrderMsg
.
OrderType
==
2
)
{
this
.
OrderMsg
.
OrderNature
=
1
;
}
if
(
this
.
saveObj
)
{
if
(
this
.
saveObj
.
ClassId
)
{
this
.
OrderMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
}
if
(
this
.
saveObj
.
Unit_Price
)
{
this
.
OrderMsg
.
Unit_Price
=
this
.
saveObj
.
Unit_Price
;
this
.
UnitPrice
=
this
.
saveObj
.
Unit_Price
;
}
if
(
this
.
saveObj
.
SourceId
)
{
this
.
OrderMsg
.
SourceId
=
this
.
saveObj
.
SourceId
;
}
}
this
.
IsShowEditOrder
=
true
;
}
},
//筛选员工
//筛选员工
filterFn
(
val
,
update
)
{
filterFn
(
val
,
update
)
{
update
(()
=>
{
update
(()
=>
{
...
@@ -161,8 +223,8 @@
...
@@ -161,8 +223,8 @@
this
.
EmployeeList
=
res
.
Data
;
this
.
EmployeeList
=
res
.
Data
;
this
.
AllemployeeList
=
res
.
Data
;
this
.
AllemployeeList
=
res
.
Data
;
let
obj
=
{
let
obj
=
{
Id
:
0
,
Id
:
0
,
EmployeeName
:
'不限'
EmployeeName
:
'不限'
}
}
this
.
EmployeeList
.
unshift
(
obj
);
this
.
EmployeeList
.
unshift
(
obj
);
this
.
AllemployeeList
.
unshift
(
obj
);
this
.
AllemployeeList
.
unshift
(
obj
);
...
@@ -184,28 +246,7 @@
...
@@ -184,28 +246,7 @@
}
}
})
})
},
},
//获取订单信息
getOrderInfo
()
{
getClassOrderInfo
({
OrderId
:
this
.
saveObj
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
OrderMsg
.
ClassId
=
res
.
Data
.
OrderInfo
.
ClassId
;
this
.
OrderMsg
.
GuestNum
=
res
.
Data
.
OrderInfo
.
GuestNum
;
this
.
OrderMsg
.
Unit_Price
=
res
.
Data
.
OrderInfo
.
Unit_Price
;
this
.
OrderMsg
.
PreferPrice
=
res
.
Data
.
OrderInfo
.
PreferPrice
;
this
.
OrderMsg
.
OrderSource
=
res
.
Data
.
OrderInfo
.
OrderSource
;
this
.
OrderMsg
.
SaleRemark
=
res
.
Data
.
OrderInfo
.
SaleRemark
;
this
.
OrderMsg
.
Class_Price
=
res
.
Data
.
OrderInfo
.
Class_Price
;
this
.
OrderMsg
.
OrderId
=
res
.
Data
.
OrderInfo
.
OrderId
;
this
.
OrderMsg
.
OrderType
=
res
.
Data
.
OrderInfo
.
OrderType
;
this
.
OrderMsg
.
SourceId
=
res
.
Data
.
OrderInfo
.
SourceId
;
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
this
.
StepPriceList
=
res
.
Data
.
StepPriceList
;
this
.
IsShowEditOrder
=
true
;
}
})
},
//人数改变
//人数改变
peopleNumber
(
val
)
{
peopleNumber
(
val
)
{
if
(
val
==
''
)
{
if
(
val
==
''
)
{
...
@@ -270,7 +311,7 @@
...
@@ -270,7 +311,7 @@
},
},
//修改订单
//修改订单
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
;
setClassOrder
(
this
.
OrderMsg
).
then
(
res
=>
{
setClassOrder
(
this
.
OrderMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
...
...
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