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
6139cbe7
Commit
6139cbe7
authored
Dec 11, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单
parent
c8f850ee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
625 additions
and
18 deletions
+625
-18
sale.js
src/api/sale/sale.js
+44
-0
myOrder-form.vue
src/components/sale/myOrder-form.vue
+371
-0
myOrder.vue
src/pages/sale/myOrder.vue
+210
-17
studentList.vue
src/pages/sale/studentList.vue
+0
-1
No files found.
src/api/sale/sale.js
View file @
6139cbe7
...
...
@@ -158,3 +158,47 @@ export function setClassOrderCareOf(data) {
data
})
}
/**
* 订单取消
*
*/
export
function
cancelClassOrder
(
data
)
{
return
request
({
url
:
'/order/CancelClassOrder'
,
method
:
'post'
,
data
})
}
/**
* 获取订单详情
*
*/
export
function
getClassOrderInfo
(
data
)
{
return
request
({
url
:
'/order/GetClassOrderInfo'
,
method
:
'post'
,
data
})
}
/**
* 获取备注列表
*
*/
export
function
getClassOrderRemarkList
(
data
)
{
return
request
({
url
:
'/order/GetClassOrderRemarkList'
,
method
:
'post'
,
data
})
}
/**
* 获取订单操作日志列表
*
*/
export
function
getClassOrderLogList
(
data
)
{
return
request
({
url
:
'/order/GetClassOrderLogList'
,
method
:
'post'
,
data
})
}
src/components/sale/myOrder-form.vue
0 → 100644
View file @
6139cbe7
<
template
>
<q-dialog
v-model=
"dialog"
maximized
full-height
seamless
position=
"right"
>
<q-card
style=
"margin-top:61px;width:900px"
class=
"no-border-radius classinfo_Dialog"
>
<div
class=
"drawerTop row"
>
<div
class=
"drawerTop-d"
>
订
</div>
<div
class=
"drawerTop-t"
>
<span
style=
"font-size: 16px;color: #000000;font-weight: bold"
>
订单编号
</span>
<span
style=
"font-size: 12px;color: #666666"
>
{{
saveObj
.
OrderId
}}
</span>
</div>
<div
style=
"background: rgba(2, 196, 153, 0.2);border-radius: 4px;text-align: center;padding: 2px 13px;margin-left: 30px"
>
<span
style=
"color: #02C499"
>
{{
saveObj
.
OrderStateName
}}
</span>
</div>
</div>
<div
style=
"padding:20px 15px;"
class=
"row wrap q-col-gutter-md"
>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
关联销售:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
EnterName
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
创建时间:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
CreateTime
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
应收总额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
PreferPrice
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
待收金额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
DueInMoney
.
toFixed
(
2
)
}}
</span>
</div>
</div>
<div
style=
"padding: 20px;"
>
<q-tabs
v-model=
"tab"
align=
"left"
class=
"qtabs"
>
<q-tab
name=
"1"
label=
"订单详情"
/>
<q-tab
name=
"2"
label=
"名单"
/>
<q-tab
name=
"3"
label=
"备注"
/>
<q-tab
name=
"4"
label=
"财务单据"
/>
<q-tab
name=
"5"
label=
"日志"
/>
</q-tabs>
<div
v-if=
"tab==1"
>
<div
class=
"col row"
style=
"font-size: 14px;color:#000;align-items: center;margin-top: 20px"
>
<div
style=
"width: 3px;height: 12px;background: #3FC4FF;margin-right: 10px"
></div>
基本信息
</div>
<div
style=
"padding:20px 15px;"
class=
"row wrap q-col-gutter-md"
>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
人数:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
GuestNum
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
班级信息:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
ClassName
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
单价:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
Class_Price
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
成交单价:
</span>
<span
class=
"two-r"
style=
"color: #3FC4FF"
>
{{
saveObj
.
Unit_Price
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
应收金额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
PreferPrice
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
实收金额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
Income
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
优惠金额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
DiscountMoney
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
退款总额:
</span>
<span
class=
"two-r"
>
{{
saveObj
.
Refund
.
toFixed
(
2
)
}}
</span>
</div>
<div
class=
"col-6 row"
>
<span
class=
"two-left"
>
待收总额:
</span>
<span
class=
"two-r"
style=
"color:#2961FE;"
>
{{
saveObj
.
DueInMoney
.
toFixed
(
2
)
}}
</span>
</div>
</div>
</div>
</div>
<div
v-if=
"tab==2"
style=
"padding: 10px 20px"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-Sex=
"props"
>
<q-td
:props=
"props"
>
<span
>
{{
props
.
row
.
Sex
==
1
?
'男'
:
'女'
}}
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-GuestName=
"props"
>
<q-td
:props=
"props"
class=
"row"
style=
"align-items: center"
>
<div
style=
"width: 34px;height: 34px;border-radius: 50%;background: rgba(41, 97, 254, 0.2);text-align: center;line-height: 34px;font-size: 14px;color: #2961FE;margin-right: 5px"
>
{{
props
.
row
.
GuestName
.
slice
(
0
,
1
)
}}
</div>
{{
props
.
row
.
GuestName
}}
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
</div>
<div
v-if=
"tab==3"
style=
"padding: 10px 20px"
>
<div
class=
"row"
style=
"justify-content: flex-end"
>
<div
class=
"row tis"
>
<div
class=
"tis-k"
style=
"background: #2961FE"
></div>
<span>
销售备注
</span>
</div>
<div
class=
"row tis"
>
<div
class=
"tis-k"
style=
"background: #8175FB"
></div>
<span>
教务备注
</span>
</div>
<div
class=
"row tis"
>
<div
class=
"tis-k"
style=
"background: #F28C1D"
></div>
<span>
校长备注
</span>
</div>
<div
class=
"row tis"
>
<div
class=
"tis-k"
style=
"background: #F72E52"
></div>
<span>
总经理备注
</span>
</div>
</div>
<div
class=
"q-px-lg q-pb-md"
>
<q-timeline
color=
"secondary"
>
<q-timeline-entry
v-for=
"(x,j) in data2"
:index=
"j"
:title=
"x.CreateByName"
:subtitle=
"x.CreateTime"
>
<div>
<span>
{{x.Content}}
</span>
</div>
</q-timeline-entry>
</q-timeline>
</div>
</div>
<div
v-if=
"tab==5"
style=
"padding: 10px 20px"
>
<div
class=
"q-px-lg q-pb-md"
>
<q-timeline
color=
"secondary"
>
<q-timeline-entry
v-for=
"(x,j) in data3"
:index=
"j"
:title=
"x.CreateByName"
:subtitle=
"x.CreateTime"
>
<div>
<span>
{{x.LogContent}}
</span>
</div>
</q-timeline-entry>
</q-timeline>
</div>
</div>
</q-card>
<div
class=
"dialog-out-close"
@
click=
"closeSaveForm"
style=
"height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon
name=
"iconfont icon-jujue1"
size=
"26px"
/>
</div>
</q-dialog>
</template>
<
script
>
import
{
getOrderGuestPageList
,
getClassOrderRemarkList
,
//获取备注列表
getClassOrderLogList
,
//获取订单操作日志列表
}
from
'../../api/sale/sale'
export
default
{
name
:
"myOrder-form"
,
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
,
data
:[],
pageCount
:
0
,
}
},
data
(){
return
{
dialog
:
true
,
tab
:
'1'
,
columns
:
[{
name
:
'GuestName'
,
label
:
'名称'
,
// field: 'GuestName',
align
:
'left'
},
{
name
:
'Profession'
,
field
:
'Profession'
,
label
:
'职业'
,
align
:
'left'
,
},
{
name
:
'Sex'
,
label
:
'性别'
,
align
:
'left'
},
{
name
:
'Age'
,
label
:
'年龄'
,
field
:
'Age'
,
align
:
'left'
},
{
name
:
'Mobile'
,
label
:
'电话'
,
field
:
'Mobile'
,
align
:
'left'
},
{
name
:
'Basics'
,
label
:
'日语基础'
,
field
:
'Basics'
,
align
:
'left'
},
{
name
:
'GuestSourceName'
,
label
:
'客户来源'
,
field
:
'GuestSourceName'
,
align
:
'left'
},
{
name
:
'LearningGoalsName'
,
label
:
'学日语目的'
,
field
:
'LearningGoalsName'
,
align
:
'left'
},
],
msg
:{
pageIndex
:
1
,
pageSize
:
12
,
OrderId
:
0
,
ClassId
:
0
,
GuestName
:
''
,
GuestState
:
0
,
},
loading
:
false
,
data2
:[],
pageCount2
:
0
,
msg2
:{
pageIndex
:
1
,
pageSize
:
12
,
OrderId
:
0
,
},
loading2
:
false
,
data3
:[],
pageCount3
:
0
,
msg3
:{
pageIndex
:
1
,
pageSize
:
12
,
SourceId
:
0
,
},
}
},
created
(){
this
.
msg
.
OrderId
=
this
.
saveObj
.
OrderId
;
this
.
msg2
.
OrderId
=
this
.
saveObj
.
OrderId
;
this
.
msg3
.
SourceId
=
this
.
saveObj
.
OrderId
;
this
.
msg
.
ClassId
=
this
.
saveObj
.
ClassId
;
this
.
getRolelist
()
this
.
getRemarkList
()
this
.
OrderLogList
()
},
methods
:{
closeSaveForm
(){
this
.
$emit
(
'close'
)
this
.
dialog
=
false
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getRolelist
()
},
getRolelist
()
{
//名单
this
.
loading
=
true
getOrderGuestPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
getRemarkList
(){
this
.
loading2
=
true
getClassOrderRemarkList
(
this
.
msg2
).
then
(
res
=>
{
this
.
data2
=
res
.
Data
.
PageData
this
.
pageCount2
=
res
.
Data
.
PageCount
;
this
.
data2
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
x
.
color
=
'#2961FE'
}
else
if
(
x
.
Type
==
2
){
x
.
color
=
'#8175FB'
}
else
if
(
x
.
Type
==
3
){
x
.
color
=
'#F28C1D'
}
else
if
(
x
.
Type
==
4
){
x
.
color
=
'#F72E52'
}
})
this
.
loading2
=
false
}).
catch
(()
=>
{
this
.
loading2
=
false
})
},
OrderLogList
(){
getClassOrderLogList
(
this
.
msg3
).
then
(
res
=>
{
this
.
data3
=
res
.
Data
.
PageData
this
.
pageCount3
=
res
.
Data
.
PageCount
;
}).
catch
(()
=>
{
})
}
}
}
</
script
>
<
style
scoped
>
.drawerTop
{
padding
:
10px
20px
;
align-items
:
center
;
}
.drawerTop-d
{
width
:
34px
;
height
:
34px
;
border-radius
:
50%
;
background
:
rgba
(
40
,
96
,
251
,
0.2
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
16px
;
color
:
#2860FB
;
font-weight
:
bold
;
}
.drawerTop-t
{
margin-left
:
10px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.two-left
{
width
:
70px
;
display
:
inline-block
;
font-size
:
12px
;
color
:
#999999
;
}
.two-r
{
font-size
:
12px
;
color
:
#111111
;
}
.qtabs
{
border-bottom
:
1px
solid
#E2E2E2
;
}
.tis
{
align-items
:
center
}
.tis
.tis-k
{
width
:
12px
;
height
:
12px
;
border-radius
:
50%
;
margin-right
:
8px
}
.tis
span
{
font-size
:
14px
;
color
:
#2D2D2D
;
font-weight
:
600
;
margin-right
:
20px
}
</
style
>
src/pages/sale/myOrder.vue
View file @
6139cbe7
...
...
@@ -122,7 +122,7 @@
<tbody
v-for=
"(item,index) in data.List"
:key=
"index"
>
<tr>
<td
:rowspan=
"3"
style=
"text-align: left"
>
<div
style=
"font-size: 18px;color: #2961FE;margin-bottom: 20px;font-weight: bold"
>
{{item.OrderId}}
</div>
<div
style=
"font-size: 18px;color: #2961FE;margin-bottom: 20px;font-weight: bold"
@
click=
"goOrderdetails(item)"
>
{{item.OrderId}}
</div>
<div>
{{item.EnterName}}
</div>
<div
style=
"margin-top: 10px"
>
{{item.CreateTime}}
</div>
<div
style=
"margin-top: 30px;margin-bottom: 10px"
>
班级
</div>
...
...
@@ -130,7 +130,7 @@
</td>
<td
style=
"border:none"
>
{{item.GuestNum}}人
</td>
<td
style=
"border:none"
>
{{item.Class_Price.toFixed(2)}}
</td>
<td
style=
"color:#f5576c;border:none
"
>
{{item.Unit_Price.toFixed(2)}}
</td>
<td
:style=
"{color:item.Class_Price!=item.Unit_Price?'#f5576c':'','border':'none'}
"
>
{{item.Unit_Price.toFixed(2)}}
</td>
<td
style=
"border:none"
>
{{item.PreferPrice.toFixed(2)}}
</td>
<td
style=
"border:none"
>
{{item.Income.toFixed(2)}}
</td>
<td
style=
"color:#f5576c;border:none"
>
{{item.DiscountMoney.toFixed(2)}}
</td>
...
...
@@ -142,7 +142,7 @@
</div>
</td>
<td
style=
"border:none"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"edit(item)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
...
...
@@ -177,7 +177,7 @@
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
>
<q-item-section>
<q-item-section
@
click=
"cancel(item)"
>
<q-item-label>
取消
</q-item-label>
</q-item-section>
</q-item>
...
...
@@ -207,8 +207,8 @@
<div
v-if=
"item.SaleRemark!=null||item.SaleRemark!=''"
>
<div>
{{item.SaleRemark}}
</div>
<div
class=
"remarks-b-b"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
></span>
<q-popup-proxy
v-if=
"item.SaleRemarkList&&item.SaleRemarkList.length>0"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
v-if=
"item.SaleRemarkList&&item.SaleRemarkList.length>0"
></span>
<q-popup-proxy
>
<q-banner>
<div
style=
"width: 500px;"
>
<div>
销售备注
</div>
...
...
@@ -230,8 +230,8 @@
<div
v-if=
"item.TeacherRemark!=null||item.TeacherRemark!=''"
>
<div>
{{item.TeacherRemark}}
</div>
<div
class=
"remarks-b-b"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
></span>
<q-popup-proxy
v-if=
"item.TeacherRemarkList&&item.TeacherRemarkList.length>0"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
v-if=
"item.TeacherRemarkList&&item.TeacherRemarkList.length>0"
></span>
<q-popup-proxy
>
<q-banner>
<div
style=
"width: 500px;"
>
<div>
教务备注
</div>
...
...
@@ -253,8 +253,8 @@
<div
v-if=
"item.RectorRemark!=null ||item.RectorRemark!=''"
>
<div>
{{item.RectorRemark}}
</div>
<div
class=
"remarks-b-b"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
></span>
<q-popup-proxy
v-if=
"item.RectorRemarkList&&item.RectorRemarkList.length>0"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
v-if=
"item.RectorRemarkList&&item.RectorRemarkList.length>0"
></span>
<q-popup-proxy
>
<q-banner>
<div
style=
"width: 500px;"
>
<div>
校长备注
</div>
...
...
@@ -276,8 +276,8 @@
<div
v-if=
"item.DirectorRemark!=null||item.DirectorRemark!=''"
>
<div>
{{item.DirectorRemark}}
</div>
<div
class=
"remarks-b-b"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
></span>
<q-popup-proxy
v-if=
"item.DirectorRemarkList&&item.DirectorRemarkList.length>0"
>
<span
class=
"iconfont icon-xiangxia"
style=
"color: #2961FE;font-size: 10px"
v-if=
"item.DirectorRemarkList&&item.DirectorRemarkList.length>0"
></span>
<q-popup-proxy
>
<q-banner>
<div
style=
"width: 500px;"
>
<div>
总经理备注
</div>
...
...
@@ -344,6 +344,36 @@
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog
v-model=
"dialog"
maximized
full-height
seamless
position=
"right"
>
<q-card
style=
"margin-top:61px;width:500px"
class=
"no-border-radius classinfo_Dialog"
>
<div
class=
"drawerTop"
>
<div
style=
"display:flex;align-items:center;margin:20px 0 0 20px;"
>
<span
class=
"drawer_Span"
>
修改订单
</span>
</div>
</div>
<div
style=
"padding:20px 15px;"
>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"enrollMsg.GuestNum"
type=
"number"
@
input=
"peopleNumber"
class=
"col-12"
label=
"人数"
:rules=
"[val => !!val || '请填写人数']"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"enrollMsg.Unit_Price"
:disable=
"UPrice==true?false:true"
@
blur=
"priceNumber"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
<q-toggle
v-model=
"UPrice"
label=
"高于定价收生"
class=
"q-mb-md"
@
change=
"resetSearch"
/>
<q-select
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"enrollMsg.OrderSource"
:options=
"SourceEnumList"
emit-value
map-options
label=
"客人来源"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"enrollMsg.SaleRemark"
style=
"margin-top: 20px"
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
<div
style=
"margin:30px 10px 0 0;"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"dialog=false"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"saveSatMsg()"
/>
</div>
</div>
</q-card>
<div
class=
"dialog-out-close"
@
click=
"dialog=false"
style=
"height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"
>
<q-icon
name=
"iconfont icon-jujue1"
size=
"26px"
/>
</div>
</q-dialog>
<myOrder-form
v-if=
"isShowmyorderForm"
:save-obj=
"myorderObjOption"
@
close=
"closeMOSaveForm"
></myOrder-form>
</div>
</template>
<
script
>
...
...
@@ -352,6 +382,10 @@
getOrderStateEnumList
,
//订单状态
updateOrderRemark
,
//修改订单备注
setClassOrderCareOf
,
//订单转交
cancelClassOrder
,
//订单取消
getClassOrderInfo
,
//获取订单详情
getOrderSourceEnumList
,
//获取订单来源 枚举
setClassOrder
,
//修改订单
}
from
'../../api/sale/sale'
;
import
{
queryEmployee
...
...
@@ -359,10 +393,11 @@
import
{
queryCourseDropdownList
,
}
from
'../../api/course/index'
import
myOrderForm
from
'../../components/sale/myOrder-form'
export
default
{
components
:
{
myOrderForm
},
data
()
{
return
{
...
...
@@ -400,18 +435,42 @@
model
:
''
,
OrderId
:
0
,
},
saveLoading
:
false
saveLoading
:
false
,
enrollMsg
:{},
SourceEnumList
:[],
StepPriceList
:[],
UPrice
:
false
,
UnitPrice
:
0
,
//用于可以输入单价的验证
isShowmyorderForm
:
false
,
myorderObjOption
:{}
}
},
created
()
{
this
.
getOrderState
();
this
.
CourseList
();
this
.
getOrderSEList
()
},
mounted
()
{
this
.
getList
();
},
methods
:
{
goOrderdetails
(
item
){
this
.
myorderObjOption
=
item
;
this
.
isShowmyorderForm
=
true
;
},
closeMOSaveForm
(){
this
.
isShowmyorderForm
=
false
;
},
getOrderSEList
(){
getOrderSourceEnumList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempArray
=
res
.
Data
;
this
.
SourceEnumList
=
tempArray
;
this
.
enrollMsg
.
OrderSource
=
tempArray
[
0
].
Id
;
}
})
},
//订单状态
getOrderState
()
{
getOrderStateEnumList
({}).
then
(
res
=>
{
...
...
@@ -497,7 +556,7 @@
message
:
''
,
prompt
:
{
model
:
remark
,
type
:
'text'
// optional
type
:
'text
area
'
// optional
},
cancel
:
true
,
persistent
:
true
...
...
@@ -559,8 +618,137 @@
}).
catch
(()
=>
{
})
}
},
cancel
(
item
){
//取消订单
let
that
=
this
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'<span style="color: #f5576c">是否取消此订单</span>'
,
cancel
:
true
,
persistent
:
true
,
html
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
cancelClassOrder
({
OrderId
:
item
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功'
,
position
:
'top'
})
this
.
getList
()
}
})
}).
onCancel
(()
=>
{
});
},
edit
(
item
){
getClassOrderInfo
({
OrderId
:
item
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
enrollMsg
.
ClassId
=
res
.
Data
.
OrderInfo
.
ClassId
;
this
.
enrollMsg
.
GuestNum
=
res
.
Data
.
OrderInfo
.
GuestNum
;
this
.
enrollMsg
.
Unit_Price
=
res
.
Data
.
OrderInfo
.
Unit_Price
;
this
.
enrollMsg
.
PreferPrice
=
res
.
Data
.
OrderInfo
.
PreferPrice
;
this
.
enrollMsg
.
OrderSource
=
res
.
Data
.
OrderInfo
.
OrderSource
;
this
.
enrollMsg
.
SaleRemark
=
res
.
Data
.
OrderInfo
.
SaleRemark
;
this
.
enrollMsg
.
Class_Price
=
res
.
Data
.
OrderInfo
.
Class_Price
;
this
.
UnitPrice
=
this
.
enrollMsg
.
Unit_Price
this
.
StepPriceList
=
res
.
Data
.
StepPriceList
;
this
.
dialog
=
true
}
})
},
priceNumber
(
val
){
//大于的时候赋值
if
(
this
.
enrollMsg
.
Unit_Price
<
this
.
UnitPrice
){
this
.
enrollMsg
.
Unit_Price
=
this
.
UnitPrice
}
},
peopleNumber
(
val
){
if
(
val
==
''
){
this
.
enrollMsg
.
GuestNum
=
1
}
this
.
enrollMsg
.
Unit_Price
=
this
.
countPrice
(
this
.
enrollMsg
.
GuestNum
)
this
.
$forceUpdate
()
this
.
UnitPrice
=
this
.
enrollMsg
.
Unit_Price
},
countPrice
(
num
){
let
array
=
[]
;
if
(
this
.
StepPriceList
&&
this
.
StepPriceList
.
length
){
this
.
StepPriceList
.
forEach
(
x
=>
{
let
obj
=
{
PersionNum
:
x
.
PersionNum
,
PersionPrice
:
x
.
PersionPrice
,
}
array
.
push
(
obj
)
})
let
fz
=
false
let
a
=
0
;
array
.
forEach
(
x
=>
{
if
(
x
.
PersionNum
==
num
){
fz
=
true
;
a
=
x
.
PersionPrice
}
})
if
(
fz
==
false
){
array
.
push
({
PersionNum
:
num
})
array
.
sort
(
this
.
getSortFun
(
'asc'
,
'PersionNum'
));
//升序排序
var
idx
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
){
if
(
array
[
i
].
PersionNum
==
num
){
idx
=
i
;
}
}
idx
=
Math
.
max
(
0
,
idx
-
1
);
if
(
array
[
idx
].
PersionPrice
){
return
array
[
idx
].
PersionPrice
}
else
{
return
this
.
enrollMsg
.
Class_Price
}
}
else
{
return
a
}
}
else
{
return
this
.
enrollMsg
.
Class_Price
}
},
getSortFun
(
order
,
sortBy
){
var
ordAlpah
=
(
order
==
'asc'
)
?
'>'
:
'<'
;
var
sortFun
=
new
Function
(
'a'
,
'b'
,
'return a.'
+
sortBy
+
ordAlpah
+
'b.'
+
sortBy
+
'?1:-1'
);
return
sortFun
;
},
saveSatMsg
(){
//修改订单
this
.
enrollMsg
.
PreferPrice
=
this
.
enrollMsg
.
GuestNum
*
this
.
enrollMsg
.
Unit_Price
setClassOrder
(
this
.
enrollMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'修改成功!'
,
position
:
'top'
})
this
.
getList
()
this
.
dialog
=
false
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
Message
})
}
}).
catch
(()
=>
{
})
}
...
...
@@ -705,9 +893,14 @@
font-size
:
12px
;
color
:
#999999
;
position
:
relative
;
overflow
:
hidden
;
display
:
-webkit-box
;
line-height
:
20px
;
-webkit-line-clamp
:
4
;
-webkit-box-orient
:
vertical
;
}
.myOrder
.remarks-b-b
{
text-align
:
right
;
position
:
absolute
;
right
:
10px
;
bottom
:
1
0px
text-align
:
right
;
position
:
absolute
;
right
:
0px
;
bottom
:
0px
}
</
style
>
src/pages/sale/studentList.vue
View file @
6139cbe7
...
...
@@ -251,7 +251,6 @@
this
.
msg
.
pageIndex
=
val
;
this
.
getRolelist
()
},
//获取菜单分页列表
getRolelist
()
{
this
.
loading
=
true
;
getOrderGuestPageList
(
this
.
msg
).
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