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
c829d453
Commit
c829d453
authored
Mar 18, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c0b47847
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
167 additions
and
237 deletions
+167
-237
studyAbroad-form.vue
src/components/studyAbroad/studyAbroad-form.vue
+38
-90
studyabroad.vue
src/pages/studyAbroad/studyabroad.vue
+129
-147
No files found.
src/components/studyAbroad/studyAbroad-form.vue
View file @
c829d453
...
...
@@ -2,36 +2,39 @@
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
objOption
.
Cate
Id
==
0
?
'新增留学'
:
'修改留学'
}}
</div>
<div
class=
"text-h6"
>
{{
objOption
.
Id
==
0
?
'新增留学'
:
'修改留学'
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
留学信息
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.
CateName"
ref=
"Cate
Name"
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.
Name"
ref=
"
Name"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"项目名称"
:rules=
"[val => !!val || '项目名称']"
/>
<q-input
filled
stack-label
maxlength=
"5"
:dense=
"false"
v-model=
"objOption.SortNum"
ref=
"SortNum"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"排序"
@
keyup
.
native=
"checkInteger(objOption,'SortNum')"
/>
<div
class=
"col-12 q-pr-lg q-pb-lg q-pt-lg"
>
<q-toggle
size=
"md"
label=
"状态"
color=
"primary"
:false-value=
"1"
:true-value=
"0"
v-model=
"objOption.Status"
title=
"注意:关闭后,分类将无法正常使用."
/>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.SupplierId"
ref=
"Type"
:options=
"supplierList"
label=
"供应编号"
:dense=
"false"
class=
"col-6 q-pb-lg q-pr-lg"
emit-value
map-options
/>
</div>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.SupplierContract"
ref=
"SupplierContract"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"供应商合同"
:rules=
"[val => !!val || '供应商合同']"
/>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"objOption.CommissionProfits"
ref=
"SupplierContract"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"佣金利润说明"
:rules=
"[val => !!val || '佣金利润说明']"
/>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"立即提交"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"save
Category
"
/>
@
click=
"save
StudyInfo
"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
queryCourseCategoryTree
,
queryCourseCategoryInfo
,
saveCourseCategoryInfo
}
from
'../../api/course/index'
saveStudyAbroad
,
queryStudyAbroadInfo
}
from
'../../api/studyabroad/index'
export
default
{
props
:
{
saveObj
:
{
...
...
@@ -41,64 +44,39 @@
},
data
()
{
return
{
isShow
:
false
,
persistent
:
true
,
objOption
:
{
programName
:
''
,
//项目名称
supplier
:
''
,
//供应商
saleprice
:
''
,
//卖价
profits
:
''
,
//佣金/利润
costof
:
''
,
//直接成本
commission
:
''
,
//同行返佣
salecommission
:
''
,
//销售提成
offer
:
''
,
//报价
Id
:
0
,
Type
:
1
,
//1留学 2就业
Name
:
''
,
//项目名称
SupplierId
:
0
,
//供应商编号
SupplierContract
:
''
,
//供应商合同
CommissionProfits
:
''
,
//佣金利润说明
SellPrice
:
''
,
//卖价
CostPrice
:
''
,
//直接成本价
CostInfo
:
''
,
//成本价包含内容
B2BCommission
:
''
,
//同行返佣
B2BCommissionType
:
0
,
//同行返佣类型
B2BCommissionType
:
''
,
//销售返佣
SaleCommissionType
:
0
,
//销售返佣类型
OfferPrice
:
''
,
//校企报价
OfferCommissionType
:
0
,
//校企报价返佣类型
OfferCommission
:
''
,
//校企返佣金额
Remark
:
''
,
//备注
SaleState
:
0
//销售状态(0-待完善,1-上架审核中,2-上架)
},
optionTitle
:
""
,
//树形课程分类列表
TreeCategoryList
:
[],
saveLoading
:
false
,
chooseCategroyArray
:
[],
supplierList
:[],
//供应商下拉数据
}
},
mounted
()
{
this
.
getCategoryTreeList
();
this
.
initObj
()
},
methods
:
{
//获取树形课程分类列表
getCategoryTreeList
()
{
this
.
TreeCategoryList
=
[];
var
qMsg
=
{}
queryCourseCategoryTree
(
qMsg
).
then
(
res
=>
{
this
.
TreeCategoryList
=
res
.
Data
;
this
.
isShow
=
true
;
})
},
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
CateId
>
0
)
{
queryCourseCategoryInfo
({
CateId
:
this
.
saveObj
.
CateId
}).
then
(
res
=>
{
this
.
objOption
.
CateId
=
res
.
Data
.
CateId
;
this
.
objOption
.
ParentId
=
res
.
Data
.
ParentId
;
this
.
objOption
.
CateName
=
res
.
Data
.
CateName
;
this
.
objOption
.
SortNum
=
res
.
Data
.
SortNum
;
this
.
objOption
.
Status
=
res
.
Data
.
Status
;
if
(
res
.
Data
.
ParentId
&&
res
.
Data
.
ParentId
>
0
)
{
this
.
chooseCategroyArray
.
push
(
res
.
Data
.
ParentId
);
}
})
this
.
optionTitle
=
"修改系列信息"
}
else
{
this
.
optionTitle
=
"新增系列"
this
.
objOption
.
CateId
=
0
;
this
.
objOption
.
ParentId
=
0
;
this
.
objOption
.
CateName
=
""
;
this
.
objOption
.
SortNum
=
0
;
this
.
objOption
.
Status
=
0
;
}
},
//关闭弹窗
closeSaveForm
()
{
...
...
@@ -106,38 +84,8 @@
this
.
persistent
=
false
},
//保存菜单
saveCategory
()
{
var
tempKeys
=
""
;
if
(
this
.
chooseCategroyArray
&&
this
.
chooseCategroyArray
.
length
>
0
)
{
this
.
chooseCategroyArray
.
forEach
(
item
=>
{
this
.
objOption
.
ParentId
=
item
;
})
}
this
.
saveLoading
=
true
saveCourseCategoryInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
},
watch
:
{
chooseCategroyArray
:
function
(
val
,
oldval
)
{
if
(
this
.
chooseCategroyArray
.
length
>
1
)
{
var
end
=
this
.
chooseCategroyArray
[
this
.
chooseCategroyArray
.
length
-
1
];
var
tempArray
=
[];
tempArray
.
push
(
end
);
this
.
chooseCategroyArray
=
tempArray
;
}
saveStudyInfo
()
{
}
}
}
...
...
src/pages/studyAbroad/studyabroad.vue
View file @
c829d453
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
ref=
"filter"
filled
v-model=
"keyWords"
label=
"系列名称"
>
<template
v-slot:append
>
<q-icon
v-if=
"keyWords !== ''"
name=
"clear"
class=
"cursor-pointer"
@
click=
"resetFilter"
/>
</
template
>
</q-input>
</div>
</div>
</div>
<div
class=
"page-content"
>
<!--<div class="q-pa-md q-gutter-sm">
<q-tree v-if="isShow" :nodes="data" node-key="CateId" label-key="CateName" children-key="ChildList"
:filter="keyWords" :filter-method="myFilterMethod" default-expand-all no-results-label="暂无相关数据">
<template v-slot:default-header="prop">
<div class="row items-center">
<div class="text-weight-bold text-primary">{{ prop.node.CateName }}</div>
<template v-if="prop.node.ChildList && prop.node.ChildList.length>0">
<q-btn round icon="add" size="xs" @click="EditCategory(null)" />
</template>
<q-btn round icon="edit" size="xs" @click="EditCategory(prop.node)" />
</div>
</template>
</q-tree>
</div>-->
<q-table
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
separator=
"none"
:data=
"data
List
"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
系列
信息
</div>
<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=
"EditCategor
y(null)"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增
留学"
@
click=
"EditStud
y(null)"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value==1?'negative':'primary'"
:label=
"props.value==0?'正常':'禁用'"
/>
</q-td>
</
template
>
<
template
v-slot:body-cell-CateId=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCategory(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
style=
"font-weight:400;"
label=
"删除"
@
click=
"deleteCategory(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.PageIndex"
color=
"primary"
:max=
"
msg.
PageCount"
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.PageIndex"
color=
"primary"
:max=
"PageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
<
category-form
v-if=
"isShowCategory"
:save-obj=
"categoryObj"
@
close=
"closeCagegor
yForm"
@
success=
"refreshPage"
>
</
category
-form>
<
studyAbroad-form
v-if=
"isShowStudy"
:save-obj=
"studyObj"
@
close=
"closeStud
yForm"
@
success=
"refreshPage"
>
</
studyAbroad
-form>
</div>
</div>
</template>
<
script
>
import
{
query
CourseCategory
Page
}
from
'../../api/
course
/index'
import
categoryForm
from
'../../components/course/category
-form'
query
StudyAbroad
Page
}
from
'../../api/
studyabroad
/index'
import
studyAbroadForm
from
'../../components/studyAbroad/studyAbroad
-form'
export
default
{
meta
:
{
title
:
"
课程系类
"
title
:
"
留学
"
},
components
:
{
category
Form
,
studyAbroad
Form
,
},
data
()
{
return
{
msg
:{
PageIndex
:
1
,
PageSize
:
20
,
PageCount
:
1
},
currentUrl
:
""
,
data
:
[],
keyWords
:
''
,
isShowCategory
:
false
,
isShow
:
false
,
categoryObj
:
{},
Type
:
1
,
//1留学 2就业
pageIndex
:
1
,
pageSize
:
12
},
dataList
:
[],
loading
:
true
,
columns
:
[
{
name
:
'CateName'
,
label
:
'系列名称'
,
field
:
'CateName'
,
name
:
'Name'
,
label
:
'项目名称'
,
field
:
'Name'
,
align
:
'left'
},
{
name
:
'SupplierId'
,
label
:
'供应编号'
,
field
:
'SupplierId'
,
align
:
'left'
},
{
name
:
'SupplierContract'
,
label
:
'供应商合同'
,
field
:
'SupplierContract'
,
align
:
'left'
},
{
name
:
'CommissionProfits'
,
label
:
'佣金利润说明'
,
field
:
'CommissionProfits'
,
align
:
'left'
},
{
name
:
'CourseCount'
,
label
:
'关联课程'
,
align
:
'left'
,
field
:
row
=>
row
.
CourseCount
,
format
:
(
val
,
row
)
=>
`
${
val
}
个课程`
name
:
'SellPrice'
,
label
:
'卖价'
,
field
:
'SellPrice'
,
align
:
'left'
},
{
name
:
'
Status
'
,
label
:
'
状态
'
,
align
:
'left
'
,
field
:
row
=>
row
.
Status
name
:
'
CostPrice
'
,
label
:
'
直接成本价
'
,
field
:
'CostPrice
'
,
align
:
'left'
},
{
name
:
'
UpdateByName
'
,
label
:
'
修改人
'
,
align
:
'left
'
,
field
:
row
=>
row
.
UpdateByName
name
:
'
CostInfo
'
,
label
:
'
成本价包含内容
'
,
field
:
'CostInfo
'
,
align
:
'left'
},
{
name
:
'UpdateTimeStr'
,
label
:
'修改时间'
,
align
:
'left'
,
field
:
row
=>
row
.
UpdateTimeStr
name
:
'B2BCommission'
,
label
:
'同行返佣'
,
field
:
'B2BCommission'
,
align
:
'left'
},
{
name
:
'B2BCommissionType'
,
label
:
'同行返佣类型'
,
field
:
'B2BCommissionType'
,
align
:
'left'
},
{
name
:
'SaleCommission'
,
label
:
'销售返佣'
,
field
:
'SaleCommission'
,
align
:
'left'
},
{
name
:
'SaleCommissionType'
,
label
:
'销售返佣类型'
,
field
:
'SaleCommissionType'
,
align
:
'left'
},
{
name
:
'OfferPrice'
,
label
:
'校企报价'
,
field
:
'OfferPrice'
,
align
:
'left'
},
{
name
:
'OfferCommissionType'
,
label
:
'校企报价返佣类型'
,
field
:
'OfferCommissionType'
,
align
:
'left'
},
{
name
:
'OfferCommission'
,
label
:
'校企返佣金额'
,
field
:
'OfferCommission'
,
align
:
'left'
},
{
name
:
'Remark'
,
label
:
'备注'
,
field
:
'Remark'
,
align
:
'left'
},
{
name
:
'SaleState'
,
label
:
'销售状态'
,
field
:
'SaleState'
,
align
:
'left'
},
{
name
:
'CateId'
,
...
...
@@ -127,85 +146,48 @@
field
:
'CateId'
}
],
PageCount
:
0
,
isShowStudy
:
false
,
studyObj
:{}
}
},
mounted
()
{
this
.
currentUrl
=
this
.
$route
.
path
this
.
getcoursecategorytree
()
this
.
getList
();
},
created
()
{
},
methods
:
{
changePage
(
val
)
{
this
.
msg
.
PageIndex
=
val
;
this
.
getcoursecategorytree
()
},
//删除系列
deleteCategory
(
item
)
{
let
delMsg
=
{
CateId
:
item
.
CateId
,
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该系列?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteCourseCategory
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
getList
()
{
this
.
loading
=
true
;
queryStudyAbroadPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
console
.
log
(
res
,
'数据来了'
);
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
})
}).
onCancel
(()
=>
{
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
//搜索分类
myFilterMethod
(
node
,
filter
)
{
return
node
.
CateName
&&
node
.
CateName
.
indexOf
(
filter
)
>
-
1
;
},
//重置搜索关键词
resetFilter
()
{
this
.
keyWords
=
''
this
.
$refs
.
filter
.
focus
()
},
//刷新页面
refreshPage
()
{
this
.
getcoursecategorytree
();
},
//获取课程分类树形结构
getcoursecategorytree
()
{
this
.
isShow
=
false
;
queryCourseCategoryPage
({
PageSize
:
this
.
msg
.
PageSize
,
PageIndex
:
this
.
msg
.
PageIndex
}).
then
(
res
=>
{
this
.
isShow
=
true
;
this
.
loading
=
false
;
this
.
data
=
res
.
Data
.
PageData
;
this
.
msg
.
PageCount
=
res
.
Data
.
PageCount
})
changePage
(
val
){
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//关闭弹窗
closeStudyForm
()
{
this
.
isShowStudy
=
false
},
//新增修改角色
EditCategory
(
obj
)
{
refreshPage
(){
this
.
getList
();
},
//编辑留学
EditStudy
(
obj
){
if
(
obj
)
{
this
.
categoryObj
=
obj
this
.
studyObj
=
obj
;
}
else
{
this
.
categoryObj
=
null
this
.
studyObj
=
null
;
}
this
.
isShowCategory
=
true
;
},
//关闭弹窗
closeCagegoryForm
()
{
this
.
isShowCategory
=
false
this
.
isShowStudy
=
true
;
}
}
}
...
...
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