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
7669b11b
Commit
7669b11b
authored
Jul 01, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b3f66f8b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
982 additions
and
1 deletion
+982
-1
activeOrder-form.vue
src/components/sale/activeOrder-form.vue
+485
-0
activeOrderList.vue
src/pages/sale/activeOrderList.vue
+0
-0
activityList.vue
src/pages/sale/activityList.vue
+491
-0
routes.js
src/router/routes.js
+6
-1
No files found.
src/components/sale/activeOrder-form.vue
0 → 100644
View file @
7669b11b
<
style
>
.editOrderDrawerTop
{
width
:
100%
;
height
:
50px
;
display
:
flex
;
justify-content
:
space-between
;
background-color
:
#f0f5fb
;
padding
:
5px
10px
;
align-items
:
center
;
}
</
style
>
<!--订单操作-->
<
template
>
<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"
>
<div
class=
"editOrderDrawerTop"
>
<div
style=
"display:flex;align-items:center;margin-left:10px;"
>
<span
class=
"drawer_Span"
>
{{
OrderMsg
.
OrderId
>
0
?
"修改订单"
:
"立即下单"
}}
</span>
</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=
"changePrice(),countPrice()"
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=
"changePrice"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.StartClassHours"
:disable=
"modityOrderType==2"
@
keyup
.
native=
"checkInteger(OrderMsg,'StartClassHours')"
ref=
"StartClassHours"
@
input=
"countPrice"
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=
"生效时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"OrderMsg.EffectTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-select
filled
option-value=
"OrderId"
option-label=
"CourseName"
class=
"q-pb-lg"
:disable=
"modityOrderType==2"
v-model=
"OrderMsg.UpOrderId"
:options=
"beforeOrderList"
emit-value
map-options
label=
"前置订单"
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section>
<q-item-label><span
style=
"color:blue"
>
{{
opt
.
OrderId
}}
</span>
{{
opt
.
CourseName
}}
{{
opt
.
ClassName
}}
{{
getStudent
(
opt
.
GuestList
)
}}
</q-item-label>
</q-item-section>
</q-item>
</
template
>
</q-select>
</template>
<
template
v-if=
"modityOrderType==1"
>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.Unit_Price"
:disable=
"IsShowUpPrice==true?false:true"
@
blur=
"countPrice"
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=
"countPrice"
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=
"countPrice"
class=
"col-12"
label=
"成交单价"
:rules=
"[val => !!val || '请填成交单价']"
/>
</
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=
"客人来源"
/>
<q-select
:disable=
"(modityOrderType==2)"
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
@
filter=
"filterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
<q-input
:disable=
"(modityOrderType==2)"
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
:disable=
"(modityOrderType==2)"
v-if=
"OrderMsg.OrderSource==7"
filled
stack-label
:dense=
"false"
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"
label=
"是否少价"
class=
"q-mb-md"
/>
<q-input
:disable=
"(modityOrderType==2)"
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
filled
stack-label
:dense=
"false"
v-model=
"OrderMsg.SaleRemark"
style=
"margin-top: 20px"
type=
"textarea"
class=
"col-12"
label=
"备注"
/>
<div
style=
"margin:30px 10px 70px 0;"
>
<q-btn
class=
"q-mr-md"
label=
"取消"
@
click=
"closeEditOrder"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
label=
"保存"
@
click=
"saveOrderInfo()"
/>
</div>
</div>
</q-card>
<div
class=
"dialog-out-close"
@
click=
"closeEditOrder"
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
{
getClassOrderInfo
,
//获取订单操作日志列表
getOrderSourceEnumList
,
//获取订单来源 枚举
setClassOrder
,
//修改订单
queryChaClassInfo
,
GetSelectClassOrderList
//获取前置下拉
}
from
'../../api/sale/sale'
import
{
queryEmployee
}
from
'../../api/users/user'
;
//获取员工
import
{
mapState
}
from
"vuex"
;
export
default
{
name
:
"editOrder-form"
,
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
,
},
//订单类型
orderType
:
{
type
:
Number
,
default
:
1
,
},
//修改订单类型
modityOrderType
:
{
type
:
Number
,
default
:
0
,
//1-销售修改,2-OP修改,3-总经理修改
},
isChaBan
:
{
type
:
Number
,
default
:
0
,
//1-是插班报入
}
},
data
()
{
return
{
IsShowEditOrder
:
true
,
OrderMsg
:
{
ClassId
:
0
,
//班级编号
GuestNum
:
0
,
//人数
Unit_Price
:
0
,
PreferPrice
:
0
,
OrderSource
:
0
,
SaleRemark
:
""
,
Class_Price
:
0
,
OrderId
:
0
,
OrderType
:
0
,
//订单类型(1-班级课程订单,2-留学就业订单)
SourceId
:
0
,
//来源编号
HelpEnterId
:
0
,
//协助老师编号
GeneralOccupation
:
""
,
//一般同行
EduOccupation
:
""
,
//教育同行
IsLessPrice
:
0
,
//是否少价 0 不少 1 少
LessPrice
:
0
,
//少价金额
OrderNature
:
1
,
//订单性质
OldPreferPrice
:
0
,
//原实际应收
IsChaBan
:
0
,
//是否插班报入(1-是)
CourseId
:
''
,
//课程编号
StartClassHours
:
0
,
//已上课时
EffectTime
:
''
,
//生效时间
UpOrderId
:
0
,
//前置订单编号
},
IsShowUpPrice
:
false
,
//是否显示高于定价
UnitPrice
:
0
,
SourceEnumList
:
[],
//订单来源
EmployeeList
:
[],
//员工列表
AllemployeeList
:
[],
//所有员工列表
CourseList
:
[],
//课程列表
courseObj
:
{},
//选择的课程
beforeOrderList
:
[],
//前置订单数据
}
},
created
()
{
this
.
OrderMsg
.
IsChaBan
=
this
.
isChaBan
;
this
.
initConfig
();
this
.
getOrderSEList
();
this
.
getEmployee
();
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
()
},
watch
:
{
},
methods
:
{
//获取插班报入配置信息
initConfig
()
{
var
qMsg
=
{
ClassId
:
0
};
if
(
this
.
saveObj
.
ClassId
)
{
qMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
}
queryChaClassInfo
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseList
=
res
.
Data
.
otherCourse
;
if
(
this
.
saveObj
&&
this
.
saveObj
.
OrderId
>
0
)
{}
else
{
this
.
OrderMsg
.
StartClassHours
=
res
.
Data
.
finishHours
;
}
if
(
this
.
OrderMsg
&&
this
.
OrderMsg
.
CourseId
)
{
this
.
courseObj
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
}
}
});
},
//选择课程切换价格
changePrice
()
{
let
temp
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
OrderMsg
.
CourseId
);
if
(
temp
)
{
this
.
courseObj
=
temp
;
if
(
this
.
OrderMsg
.
GuestNum
==
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
0
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
0
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
0
].
PriceMoney
;
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
}
}
if
(
this
.
OrderMsg
.
GuestNum
>
1
)
{
if
(
temp
.
CoursePriceList
&&
temp
.
CoursePriceList
.
length
>
0
)
{
if
(
temp
.
CoursePriceList
[
1
].
PriceType
==
0
)
{
let
DisCount
=
(
100
-
temp
.
CoursePriceList
[
1
].
PriceMoney
)
/
100
;
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
*
DisCount
;
this
.
UnitPrice
=
temp
.
SellPrice
*
DisCount
;
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
this
.
UnitPrice
=
temp
.
SellPrice
-
item
.
CoursePriceList
[
1
].
PriceMoney
;
}
}
else
{
this
.
OrderMsg
.
Unit_Price
=
temp
.
SellPrice
;
this
.
UnitPrice
=
temp
.
SellPrice
;
}
}
}
else
{
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
.
courseObj
=
{};
}
this
.
countPrice
();
},
initData
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
OrderId
>
0
)
{
getClassOrderInfo
({
OrderId
:
this
.
saveObj
.
OrderId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempData
=
res
.
Data
.
OrderInfo
;
this
.
OrderMsg
.
ClassId
=
tempData
.
ClassId
;
this
.
OrderMsg
.
GuestNum
=
tempData
.
GuestNum
;
this
.
OrderMsg
.
Unit_Price
=
tempData
.
Unit_Price
;
this
.
OrderMsg
.
PreferPrice
=
tempData
.
PreferPrice
;
this
.
OrderMsg
.
OrderSource
=
tempData
.
OrderSource
;
this
.
OrderMsg
.
SaleRemark
=
tempData
.
SaleRemark
;
this
.
OrderMsg
.
Class_Price
=
tempData
.
Class_Price
;
this
.
OrderMsg
.
OrderId
=
tempData
.
OrderId
;
this
.
OrderMsg
.
OrderType
=
tempData
.
OrderType
;
this
.
OrderMsg
.
SourceId
=
tempData
.
SourceId
;
this
.
OrderMsg
.
HelpEnterId
=
tempData
.
HelpEnterId
;
this
.
OrderMsg
.
GeneralOccupation
=
tempData
.
GeneralOccupation
;
this
.
OrderMsg
.
EduOccupation
=
tempData
.
EduOccupation
;
this
.
OrderMsg
.
IsLessPrice
=
tempData
.
IsLessPrice
;
this
.
OrderMsg
.
LessPrice
=
tempData
.
LessPrice
;
this
.
OrderMsg
.
OrderNature
=
tempData
.
OrderNature
;
this
.
OrderMsg
.
OldPreferPrice
=
tempData
.
OldPreferPrice
;
this
.
OrderMsg
.
CourseId
=
tempData
.
CourseId
;
this
.
OrderMsg
.
StartClassHours
=
tempData
.
StartClassHours
;
this
.
OrderMsg
.
IsChaBan
=
tempData
.
IsChaBan
;
this
.
OrderMsg
.
EffectTime
=
tempData
.
EffectTime
;
this
.
OrderMsg
.
UpOrderId
=
tempData
.
UpOrderId
;
this
.
UnitPrice
=
this
.
OrderMsg
.
Unit_Price
;
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
.
CourseId
=
''
;
this
.
OrderMsg
.
StartClassHours
=
0
;
this
.
OrderMsg
.
IsChaBan
=
this
.
isChaBan
;
this
.
OrderMsg
.
EffectTime
=
""
;
this
.
OrderMsg
.
UpOrderId
=
0
;
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
.
countPrice
();
this
.
IsShowEditOrder
=
true
;
}
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
EmployeeList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllemployeeList
))
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
EmployeeList
=
this
.
AllemployeeList
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
})
},
//获取业务员
getEmployee
()
{
var
qMsg
=
{
Dept_Id
:
0
}
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeList
=
res
.
Data
;
this
.
AllemployeeList
=
res
.
Data
;
let
obj
=
{
Id
:
0
,
EmployeeName
:
'不限'
}
this
.
EmployeeList
.
unshift
(
obj
);
this
.
AllemployeeList
.
unshift
(
obj
);
}
}).
catch
(()
=>
{})
},
//关闭弹窗
closeEditOrder
()
{
this
.
IsShowEditOrder
=
false
;
this
.
$emit
(
'close'
)
},
//获取订单来源
getOrderSEList
()
{
getOrderSourceEnumList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempArray
=
res
.
Data
;
this
.
SourceEnumList
=
tempArray
;
this
.
OrderMsg
.
OrderSource
=
tempArray
[
0
].
Id
;
}
})
},
//计算价格
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
)
{
return
;
}
}
//计算应收价格
if
(
this
.
OrderMsg
.
IsChaBan
==
1
)
{
if
(
this
.
modityOrderType
==
1
||
this
.
modityOrderType
==
2
)
{
var
newPreferPrice
=
(
this
.
UnitPrice
/
this
.
courseObj
.
ClassHours
)
*
(
this
.
courseObj
.
ClassHours
-
this
.
OrderMsg
.
StartClassHours
)
*
this
.
OrderMsg
.
GuestNum
-
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
;
}
}
setClassOrder
(
this
.
OrderMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功!'
,
position
:
'top'
})
//调用父页面成功方法
this
.
$emit
(
'success'
);
this
.
IsShowEditOrder
=
false
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
res
.
Message
})
}
}).
catch
(()
=>
{})
},
//获取前置下拉数据
getSelectClass
()
{
var
qMsg
=
{
ClassId
:
0
};
if
(
this
.
saveObj
.
ClassId
)
{
qMsg
.
ClassId
=
this
.
saveObj
.
ClassId
;
}
GetSelectClassOrderList
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
beforeOrderList
=
res
.
Data
;
}
})
},
getStudent
(
item
)
{
let
str
=
''
if
(
item
&&
item
.
length
>
1
)
{
str
=
item
[
0
].
GuestName
+
'等'
+
item
.
length
+
'人'
;
}
if
(
item
.
length
==
1
)
{
str
=
item
[
0
].
GuestName
;
}
return
str
}
}
}
</
script
>
src/pages/sale/activeOrderList.vue
0 → 100644
View file @
7669b11b
src/pages/sale/activityList.vue
0 → 100644
View file @
7669b11b
<
style
>
li
{
list-style-type
:
none
;
}
.activeType
ul
{
padding
:
0px
;
}
.activeType
li
{
background
:
rgba
(
221
,
222
,
224
,
0.2
);
border-radius
:
4px
;
margin-top
:
15px
;
}
.activeType
li
.dline
{
display
:
table
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.activeType
li
.d1
,
.activeType
li
.d2
,
.activeType
li
.d3
,
.activeType
li
.d4
,
.activeType
li
.d5
{
width
:
18%
;
padding
:
20px
20px
10px
;
}
.activeType
li
.d7
{
flex
:
1
;
width
:
1px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.activeType
li
.d1
.di-title
{
font-size
:
16px
;
color
:
#111111
;
}
.activeType
li
.d1
.di-c
{
font-size
:
14px
;
display
:
flex
;
line-height
:
28px
;
color
:
#111111
;
}
.activeType
li
.d6
{
padding
:
10px
20px
;
width
:
100%
;
height
:
inherit
;
position
:
relative
;
border-top
:
1px
solid
#dddee0
;
}
.activeType
li
.d6
.progress
{
width
:
100%
;
height
:
5px
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.activeType
li
.d2
div
{
margin
:
2px
0
;
font-size
:
14px
;
color
:
#111111
;
}
.activeType
li
.d2-n
{
font-size
:
12px
;
color
:
#999999
;
margin-right
:
20px
;
}
.activeType
li
.d3
.d3-s
{
color
:
var
(
--q-color-negative
);
font-weight
:
bold
;
}
.activeType
li
.d3
div
{
margin
:
2px
0
;
font-size
:
14px
;
}
.activeType
li
.d4
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
li
.d5
div
{
font-size
:
14px
;
color
:
#111111
;
margin
:
2px
0
;
}
.activeType
.myCourseNName
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
color
:
#fff
!important
;
text-align
:
center
;
line-height
:
25px
;
background-color
:
#004d40
;
}
.activeType
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.Sysuser_Date
.el-input
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.Sysuser_Date
.el-input__inner
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.syster_qDropdown
.q-btn__wrapper
{
padding
:
0
3px
;
min-height
:
0
!important
;
}
</
style
>
<
template
>
<!-- 销售=》活动列表 -->
<div
class=
"page-body activeType"
>
<div
class=
"page-search row items-center flex"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.ActivityName"
label=
"活动名称"
@
clear=
"resetSearch"
maxlength=
"20"
/>
</div>
<div
class=
"col-3 Sysuser_Date"
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"msg.SelectStartTimeStr"
type=
"date"
placeholder=
"选择开始日期"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3 Sysuser_Date"
>
<q-field
filled
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"msg.SelectEndTimeStr"
type=
"date"
placeholder=
"选择结束日期"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3 "
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.SelectIsEnd"
class=
"col-6 q-pr-lg q-pr-lg"
:options=
"statusOpts"
emit-value
map-options
label=
"状态"
@
change=
"resetSearch"
/>
</div>
</div>
<!-- <div class="col row wrap q-mr-lg q-col-gutter-md">
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md">
</div> -->
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-tow-column-table sticky-right-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
活动列表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增"
@
click=
"editQuotation(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-activeName=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"display:flex;align-items:center"
>
<div
class=
"app-image"
:style=
"
{backgroundImage:'url(' + props.row.CoverImg + ')',backgroundSize:'cover'}">
</div>
{{
props
.
row
.
ActivityName
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-ActivityTime=
"props"
>
<q-td
:props=
"props"
>
<div>
<div>
活动时间:
</div>
<div>
{{
props
.
row
.
StartTimeStr
}}
~
{{
props
.
row
.
EndTimeStr
}}
</div>
<div>
报名时间:
</div>
<div>
{{
props
.
row
.
SignStartTimeStr
}}
</div>
<div>
{{
props
.
row
.
SignEndTimeStr
}}
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-AgeAndPeopleNum=
"props"
>
<q-td
:props=
"props"
>
<div>
<div>
{{
props
.
row
.
AgeLimit
==
1
?
'不区分年龄'
:
'区分年龄'
}}
</div>
<div
v-if=
"props.row.AgeLimit==0"
>
范围:
{{
props
.
row
.
StartAge
}}
岁~
{{
props
.
row
.
EndAge
}}
岁
</div>
<div>
报名人数
</div>
<div
v-if=
"props.row.Distinguish ==1"
>
总人数:
{{
props
.
row
.
ManNum
}}
人
</div>
<div
v-if=
"props.row.Distinguish ==0"
>
男性:
{{
props
.
row
.
ManNum
}}
人
<span
style=
"margin-left:10px"
>
女性:
{{
props
.
row
.
WoManNum
}}
人
</span>
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-activePrice=
"props"
>
<q-td
:props=
"props"
>
<div>
<div
v-if=
"props.row.IsFree==1"
style=
"color:green;"
>
免费
</div>
<div
v-if=
"props.row.IsFree==2"
style=
"color:red;"
>
现金价格:
{{
props
.
row
.
Price
}}
元
</div>
<!--
<div
v-if=
"props.row.IsFree==2"
style=
"color:red;"
>
现金点数:
{{
props
.
row
.
PointNum
}}
点
</div>
-->
<div>
报名取消确认:
{{
props
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
<div>
内部限制:
{{
props
.
row
.
IsCancelConfirm
==
1
?
'是'
:
'否'
}}
</div>
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-LocationName=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"width:200px;white-space: pre-line;"
>
{{
props
.
row
.
LocationName
}}
</div>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<div>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"订单"
@
click=
''
/>
</div>
</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>
<!-- 新增修改活动类型 -->
<ActiveOrderForm
v-if=
"showForm"
:save-obj=
"orderObj"
:orderType=
"1"
:modityOrderType=
"1"
:isChaBan=
"isChaBan"
@
close=
"closeOrderSaveForm"
@
success=
"refreshOrder"
>
</ActiveOrderForm>
</div>
</template>
<
script
>
import
ActiveOrderForm
from
'../../components/sale/activeOrder-form.vue'
export
default
{
meta
:
{
title
:
"活动列表"
},
components
:
{
ActiveOrderForm
},
data
()
{
return
{
data
:
[],
loading
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
ActivityName
:
''
,
SelectStartTimeStr
:
""
,
SelectEndTimeStr
:
""
,
SelectIsEnd
:
-
1
,
rowsPerPage
:
10
},
pageCount
:
0
,
activityTypeList
:[],
statusOpts
:[
{
label
:
"全部"
,
value
:
-
1
},
{
label
:
"未开始"
,
value
:
0
},
{
label
:
"已结束"
,
value
:
1
},
{
label
:
"进行中"
,
value
:
2
},
],
columns
:
[{
name
:
"Id"
,
label
:
"编号"
,
field
:
"Id"
,
align
:
"left"
,
required
:
true
,
},
{
name
:
"activeName"
,
label
:
"活动名称"
,
align
:
"left"
,
required
:
true
,
},
{
name
:
"ActivityTypeName"
,
label
:
"活动类型"
,
align
:
"left"
,
field
:
"ActivityTypeName"
},
{
name
:
"ActivityTime"
,
label
:
"活动时间"
,
align
:
"left"
},
{
name
:
"AgeAndPeopleNum"
,
label
:
"年龄和报名人数"
,
align
:
"left"
},
{
name
:
"activePrice"
,
label
:
"活动费用"
,
align
:
"left"
},
{
name
:
"LocationName"
,
label
:
"位置"
,
field
:
"LocationName"
,
align
:
"left"
,
style
:
"width:100px"
},
{
name
:
"activeStutes"
,
label
:
"活动状态"
,
field
:
"ActivityStatusStr"
,
align
:
"left"
},
// {
// name: "JoinNum",
// label: "报名人数",
// field:"JoinNum",
// align: "left"
// },
{
name
:
'optioned'
,
label
:
'操作'
,
required
:
true
,
align
:
"left"
}
],
// //报名列表
// dialogTableVisible: false, //是否显示弹窗
// joinData: [], //报名信息
// joinMsg: {
// LinkMan: '',
// EnrollState: 1,
// ActivityId: 0
// },
showForm
:
false
,
typeObj
:{}
}
},
mounted
()
{
this
.
getList
();
this
.
getActiveTypeList
();
},
methods
:
{
// getItem(item) {
// this.joinMsg.ActivityId = item.Id;
// this.getJoinData();
// },
//获取活动类型下拉
getActiveTypeList
(){
this
.
apipostDS
(
"/api/Education/GetCommerceActivityTypeList"
,{},(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
){
this
.
activityTypeList
=
res
.
data
.
data
;
this
.
activityTypeList
.
unshift
({
Id
:
-
1
,
TypeName
:
"不限"
})
}
})
},
getList
(){
this
.
loading
=
true
;
this
.
apipostDS
(
"/api/Education/GetActivityPage"
,
this
.
msg
,(
res
)
=>
{
this
.
loading
=
false
if
(
res
.
data
.
resultCode
===
1
){
this
.
data
=
res
.
data
.
data
.
pageData
;
this
.
pageCount
=
res
.
data
.
data
.
pageCount
;
}
})
},
delActive
(
item
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipostDS
(
"/api/Education/RemoveActivity"
,
{
Id
:
item
.
Id
,
Status
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
})
},
//刷新页面
refreshPage
()
{
this
.
showForm
=
false
;
this
.
getList
();
},
//显示修改
editQuotation
(
item
)
{
this
.
showForm
=
true
;
if
(
item
)
{
this
.
typeObj
=
item
;
}
else
{
this
.
typeObj
=
{};
}
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
//关闭弹窗
closeruleset
()
{
this
.
showForm
=
false
;
},
goUrl
(
url
,
item
,
type
=
0
){
if
(
type
===
1
){
this
.
$router
.
push
({
path
:
url
,
query
:{
name
:
item
.
ActivityName
}
})
}
else
{
this
.
$router
.
push
({
path
:
url
,
query
:{
Id
:
item
.
Id
}
})
}
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
7669b11b
...
...
@@ -258,7 +258,7 @@ const routes = [{
component
:
()
=>
import
(
"pages/financial/saleAchievementsRank.vue"
)
},
{
path
:
"/financial/studentsClassfee"
,
//学生课耗明细列表
component
:
()
=>
...
...
@@ -671,6 +671,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/sale/visitorRegistrat.vue"
)
},
{
path
:
"/sale/activityList"
,
//销售 活动列表
component
:
()
=>
import
(
"pages/sale/activityList.vue"
)
},
{
path
:
"/activity/activeType"
,
//活动 活动类型
component
:
()
=>
...
...
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