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
f33eb970
Commit
f33eb970
authored
Nov 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4a74ba5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
57 deletions
+70
-57
sale-form.vue
src/components/sale/sale-form.vue
+70
-57
No files found.
src/components/sale/sale-form.vue
View file @
f33eb970
...
...
@@ -38,7 +38,6 @@
line-height
:
120px
;
text-align
:
center
;
}
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
>
...
...
@@ -57,17 +56,10 @@
ref=
"TaskSubTitle"
class=
"col-6 q-pb-lg"
label=
"任务子标题"
:rules=
"[val => !!val || '请输入任务子标题']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.TaskKudo"
ref=
"TaskKudo"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"奖品名称"
:rules=
"[val => !!val || '请输入奖品名称']"
/>
</div>
<div
class=
"col-6"
>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
v-model=
"objOption.TaskStartTime"
class=
"q-pr-lg"
mask=
"date"
>
<q-input
filled
v-model=
"objOption.TaskStartTime"
class=
"q-pr-lg"
mask=
"date"
label=
"开始时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
...
...
@@ -82,7 +74,7 @@
</q-input>
</div>
<div
class=
"col-6"
>
<q-input
filled
v-model=
"objOption.TaskEndTime"
mask=
"date"
>
<q-input
filled
v-model=
"objOption.TaskEndTime"
mask=
"date"
label=
"结束时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy2"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
...
...
@@ -113,6 +105,27 @@
</el-upload>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.TaskKudo"
ref=
"TaskKudo"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"奖品名称"
:rules=
"[val => !!val || '请输入奖品名称']"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
v-model=
"objOption.ExchangeEndTime"
mask=
"date"
label=
"兑换截止日期"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"ExchangeEndTime"
cover
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.ExchangeEndTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"Close"
color=
"primary"
flat
/>
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
style=
"margin-top:20px;"
>
<div
class=
"col-12"
>
奖品图片
</div>
</div>
...
...
@@ -134,7 +147,7 @@
<thead>
<tr
style=
"height:60px;"
>
<td
colspan=
"5"
style=
"text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增
任务"
@
click=
"addCourse
()"
/>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增
子任务"
@
click=
"addSubTask
()"
/>
</td>
</tr>
<tr>
...
...
@@ -158,34 +171,34 @@
<tbody
v-for=
"(sItem, sIndex) in objOption.DetailsList"
:key=
"sIndex"
>
<tr>
<td
style=
"height:50px"
>
<q-select
filled
stack-label
option-value=
"Id"
@
input=
"clearTarget(sItem)"
option-label=
"Name"
v-model=
"sItem.TaskType"
ref=
"PriceDiscountType_Id"
:options=
"taskTypeData"
label=
"任务类型"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
filled
stack-label
option-value=
"Id"
@
input=
"clearTarget(sItem)"
option-label=
"Name"
v-model=
"sItem.TaskType"
ref=
"PriceDiscountType_Id"
:options=
"taskTypeData"
label=
"任务类型"
style=
"width:160px"
dense
emit-value
map-options
/>
</td>
<td>
<q-select
v-if=
"sItem.TaskType==2"
filled
stack-label
option-value=
"Id"
option-label=
"SubjectName"
v-model=
"sItem.TargetIdList"
:options=
"CourseSubjectList"
multiple
use-chips
label=
"所属科目"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
v-if=
"sItem.TaskType==2"
filled
stack-label
option-value=
"Id"
option-label=
"SubjectName"
v-model=
"sItem.TargetIdList"
:options=
"CourseSubjectList"
multiple
use-chips
label=
"所属科目"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
v-if=
"sItem.TaskType==3"
multiple
filled
use-chips
stack-label
v-model=
"sItem.TargetIdList"
option-value=
"CateId"
option-label=
"CateName"
:options=
"TreeCategoryList"
label=
"课程系列"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
v-if=
"sItem.TaskType==4"
multiple
filled
use-chips
stack-label
v-model=
"sItem.TargetIdList"
option-value=
"CourseId"
option-label=
"CourseName"
:options=
"CourseList"
label=
"课程"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
v-if=
"sItem.TaskType==3"
multiple
filled
use-chips
stack-label
v-model=
"sItem.TargetIdList"
option-value=
"CateId"
option-label=
"CateName"
:options=
"TreeCategoryList"
label=
"课程系列"
style=
"width:160px"
dense
emit-value
map-options
/>
<q-select
v-if=
"sItem.TaskType==4"
multiple
filled
use-chips
stack-label
v-model=
"sItem.TargetIdList"
option-value=
"CourseId"
option-label=
"CourseName"
:options=
"CourseList"
label=
"课程"
style=
"width:160px"
dense
emit-value
map-options
/>
</td>
<td>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"sItem.TaskFinishType"
:options=
"finishTypeObj"
label=
"请选择"
style=
"width:160px"
dense
emit-value
map-options
/>
:options=
"finishTypeObj"
label=
"请选择"
style=
"width:160px"
dense
emit-value
map-options
/>
</td>
<td>
<q-input
filled
stack-label
maxlength=
"20"
@
keyup
.
native=
"checkInteger(sItem,'TaskFinishValue')"
dense
v-model=
"sItem.TaskFinishValue"
ref=
"TaskFinishValue"
class=
"q-pr-none"
label=
"任务完成值"
/>
<q-input
filled
stack-label
maxlength=
"20"
@
keyup
.
native=
"checkInteger(sItem,'TaskFinishValue')"
dense
v-model=
"sItem.TaskFinishValue"
ref=
"TaskFinishValue"
class=
"q-pr-none"
label=
"任务完成值"
/>
</td>
<td>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
title=
"删除"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
""
@
click=
"dele
Target
(index)"
/>
class=
"q-mr-xs"
label=
""
@
click=
"dele
SubTask
(index)"
/>
</td>
</tr>
</tbody>
...
...
@@ -248,29 +261,31 @@
TaskDesc
:
''
,
//任务描述
TaskStartTime
:
""
,
//任务开始时间
TaskEndTime
:
""
,
//任务结束时间
DetailsList
:
[]
DetailsList
:
[],
//任务详情
ExchangeEndTime
:
""
,
//兑换截止时间
},
optionTitle
:
''
,
CourseList
:
[],
taskTypeData
:
[],
CourseSubjectList
:
[],
//科目列表
TreeCategoryList
:
[],
//课程分类树形列表
TreeCategoryList
:
[],
//课程分类树形列表
//完成类型
finishTypeObj
:[{
Id
:
1
,
Name
:
'人数'
},{
Id
:
2
,
Name
:
'成交金额'
finishTypeObj
:
[{
Id
:
1
,
Name
:
'人数'
},
{
Id
:
2
,
Name
:
'成交金额'
}]
}
},
created
()
{},
mounted
()
{
created
()
{
this
.
getCourseList
();
this
.
getTaskType
();
this
.
queryCourseSubject
();
this
.
getCategorytree
();
this
.
getCategoryList
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
...
...
@@ -293,6 +308,7 @@
this
.
objOption
.
TaskImageList
=
tempData
.
TaskImageList
;
this
.
objOption
.
TaskKudoImgList
=
tempData
.
TaskKudoImgList
;
this
.
objOption
.
TaskDesc
=
tempData
.
TaskDesc
;
this
.
objOption
.
ExchangeEndTime
=
tempData
.
ExchangeEndTime
;
}
})
this
.
optionTitle
=
"修改客户任务"
...
...
@@ -307,6 +323,7 @@
this
.
objOption
.
TaskStartTime
=
''
;
this
.
objOption
.
TaskEndTime
=
''
;
this
.
objOption
.
DetailsList
=
[];
this
.
objOption
.
ExchangeEndTime
=
""
;
this
.
optionTitle
=
"新增客户任务"
}
},
...
...
@@ -348,16 +365,16 @@
this
.
$emit
(
'close'
);
this
.
persistent
=
false
;
},
//新增
课程
add
Course
()
{
//新增
子任务
add
SubTask
()
{
let
obj
=
{
DetailId
:
0
,
TaskId
:
0
,
TaskType
:
1
,
//默认传1
TargetId
:
1
,
//课程编号
TaskFinishType
:
1
,
TaskFinishValue
:
''
,
TargetIdList
:[]
TaskFinishType
:
1
,
TaskFinishValue
:
''
,
TargetIdList
:
[]
}
this
.
objOption
.
DetailsList
.
push
(
obj
);
},
...
...
@@ -371,8 +388,8 @@
}
})
},
//删除
dele
Target
(
index
)
{
//删除
子任务
dele
SubTask
(
index
)
{
this
.
objOption
.
DetailsList
.
splice
(
index
,
1
);
},
//删除任务图片
...
...
@@ -400,7 +417,7 @@
})
},
//获取任务类型数据下拉
getTaskType
(){
getTaskType
()
{
GetTaskTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
taskTypeData
=
res
.
Data
;
...
...
@@ -415,21 +432,17 @@
}
})
},
getCategorytree
()
{
//获取课程系列
getCategoryList
()
{
var
qMsg
=
{};
GetCourseCategoryList
(
qMsg
).
then
((
res
)
=>
{
this
.
TreeCategoryList
=
res
.
Data
;
});
},
//分类改变
getChild
(
cateObj
,
index
)
{
this
.
objOption
.
DetailsList
[
index
].
TargetIdList
=
cateObj
.
split
(
','
);
},
//清除
clearTarget
(
item
){
item
.
TargetIdList
=
[];
clearTarget
(
item
)
{
item
.
TargetIdList
=
[];
}
},
}
</
script
>
</
script
>
\ No newline at end of file
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