Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b65d22f4
authored
Mar 09, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
编辑sop-添加事件
1 parent
58e556d4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
21 deletions
src/components/glsx-combi-form/index.vue
src/views/sop/editSop.vue
src/views/sop/editSop/baseInfo.vue
src/views/sop/editSop/components/selectCustomer.vue
src/views/sop/editSop/editEvent.vue
src/components/glsx-combi-form/index.vue
View file @
b65d22f
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<el-radio-group
v-else-if=
"item.type === 'radio'"
v-model=
"formObj[item.name]"
:disabled=
"item.isDisabled"
@
change=
"item.handleRadioChange"
>
<el-radio-group
v-else-if=
"item.type === 'radio'"
v-model=
"formObj[item.name]"
:disabled=
"item.isDisabled"
@
change=
"item.handleRadioChange"
>
<el-radio
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionId]"
>
{{ subItem[item.optionLabel] }}
</el-radio>
<el-radio
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionId]"
>
{{ subItem[item.optionLabel] }}
</el-radio>
</el-radio-group>
</el-radio-group>
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:
style=
"{ width: item.width || defaultWidth }"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"
pickerOption[item.pickerOptions]"
></el-date-picker>
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:
disabled=
"item.isDisabled"
:value-format=
"item.valueFormat"
:style=
"{ width: item.width || defaultWidth }"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"item.customPickerOptions ||
pickerOption[item.pickerOptions]"
></el-date-picker>
<
template
v-else-if=
"item.type === 'upload'"
>
<
template
v-else-if=
"item.type === 'upload'"
>
<p
class=
"photo-top-tips"
>
{{
item
.
topTips
}}
</p>
<p
class=
"photo-top-tips"
>
{{
item
.
topTips
}}
</p>
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || defaultWidth }">
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || defaultWidth }">
...
...
src/views/sop/editSop.vue
View file @
b65d22f
<
template
>
<
template
>
<div>
<div>
<base-info
v-show=
"activeName == 'baseInfo'"
:routeInfo=
"routeInfo"
></base-info>
<base-info
v-show=
"activeName == 'baseInfo'"
:routeInfo=
"routeInfo"
@
handleTabChange=
"jumpEvent"
></base-info>
<edit-event
v-
show=
"activeName == 'editEvent'
"
></edit-event>
<edit-event
v-
if=
"activeName == 'editEvent'"
:eventObj=
"eventObj"
@
handleTabChange=
"jumpBaseInfo
"
></edit-event>
</div>
</div>
</
template
>
</
template
>
...
@@ -13,11 +13,15 @@ export default {
...
@@ -13,11 +13,15 @@ export default {
data
()
{
data
()
{
return
{
return
{
activeName
:
'
baseInfo
'
,
activeName
:
'
editEvent
'
,
routeInfo
:
{
routeInfo
:
{
// add-新增;edit-编辑;look-查看
// add-新增;edit-编辑;look-查看
addOrEdit
:
'add'
,
addOrEdit
:
'add'
,
id
:
''
id
:
''
},
eventObj
:
{
addOrEdit
:
'add'
,
info
:
{}
}
}
}
}
},
},
...
@@ -31,7 +35,16 @@ export default {
...
@@ -31,7 +35,16 @@ export default {
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
},
},
methods
:
{}
methods
:
{
jumpBaseInfo
(
obj
)
{
this
.
activeName
=
obj
.
activeName
},
jumpEvent
(
obj
)
{
this
.
$set
(
this
.
eventObj
,
'addOrEdit'
,
obj
.
addOrEdit
)
this
.
$set
(
this
.
eventObj
,
'info'
,
obj
.
info
)
this
.
activeName
=
obj
.
activeName
}
}
}
}
</
script
>
</
script
>
...
...
src/views/sop/editSop/baseInfo.vue
View file @
b65d22f
<!-- 编辑sop -->
<!-- 编辑sop -->
<
template
>
<
template
>
<div
class=
"marketing p-t-20 edit-box"
>
<div
class=
"marketing p-t-20 edit-box"
>
<div
class=
"sop-base-info"
v-show=
"activeName == 'baseInfo'"
>
<div
class=
"sop-base-info"
>
<div
class=
"container m-b-20"
>
<div
class=
"container m-b-20"
>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
>
<div
class=
"edit-title flex"
style=
"align-items: center;"
>
<div
class=
"edit-title flex"
style=
"align-items: center;"
>
<p>
营销事件设置
</p>
<p>
营销事件设置
</p>
<el-button
class=
"m-r-20"
:size=
"size"
type=
"primary"
@
click=
"handleEventEdit('add')"
>
添加事件
</el-button>
<el-button
class=
"m-r-20"
:
disabled=
"!editForm.customerList.length"
:
size=
"size"
type=
"primary"
@
click=
"handleEventEdit('add')"
>
添加事件
</el-button>
</div>
</div>
<div
v-show=
"!editForm.eventList.length"
class=
"event-empty"
>
<div
v-show=
"!editForm.eventList.length"
class=
"event-empty"
>
<img
class=
"empty-img"
:src=
"url"
/>
<img
class=
"empty-img"
:src=
"url"
/>
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
<div
v-show=
"editForm.eventList.length"
></div>
<div
v-show=
"editForm.eventList.length"
></div>
</div>
</div>
</div>
</div>
<edit-event
v-show=
"activeName == 'editEvent'"
></edit-event>
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
...
@@ -44,7 +43,6 @@
...
@@ -44,7 +43,6 @@
<
script
>
<
script
>
import
url
from
"@/assets/empty.png"
import
url
from
"@/assets/empty.png"
import
SelectLabel
from
'./components/selectLabel.vue'
import
SelectLabel
from
'./components/selectLabel.vue'
import
editEvent
from
'./editEvent'
export
default
{
export
default
{
name
:
'baseInfo'
,
name
:
'baseInfo'
,
data
()
{
data
()
{
...
@@ -52,7 +50,6 @@ export default {
...
@@ -52,7 +50,6 @@ export default {
size
:
'small'
,
size
:
'small'
,
title
:
'基本信息'
,
title
:
'基本信息'
,
url
:
url
,
url
:
url
,
activeName
:
'baseInfo'
,
// titleObj: {
// titleObj: {
// add: '新增信息',
// add: '新增信息',
// edit: '编辑信息'
// edit: '编辑信息'
...
@@ -106,8 +103,7 @@ export default {
...
@@ -106,8 +103,7 @@ export default {
},
},
components
:
{
components
:
{
SelectLabel
,
SelectLabel
editEvent
},
},
props
:
{
props
:
{
...
@@ -192,7 +188,9 @@ export default {
...
@@ -192,7 +188,9 @@ export default {
},
},
handleEventEdit
(
addOrEdit
,
row
)
{
handleEventEdit
(
addOrEdit
,
row
)
{
this
.
activeName
=
'editEvent'
// console.log(row)
// console.log(this.editForm.sopName)
this
.
$emit
(
'handleTabChange'
,
{
activeName
:
'editEvent'
,
addOrEdit
:
addOrEdit
,
info
:
{
...
row
,
sopName
:
this
.
editForm
.
sopName
}
})
},
},
handleConfirm
()
{
handleConfirm
()
{
...
@@ -222,10 +220,6 @@ export default {
...
@@ -222,10 +220,6 @@ export default {
},
},
handleCancel
()
{
handleCancel
()
{
if
(
this
.
activeName
==
'editEvent'
)
{
this
.
activeName
=
'baseInfo'
return
false
}
if
(
this
.
editStatus
)
{
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
src/views/sop/editSop/components/selectCustomer.vue
View file @
b65d22f
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</div>
</div>
<div
class=
"selected-list"
>
<div
class=
"selected-list"
>
<p
class=
"list-title p-16"
>
已选(
{{
selectedSum
}}
)
</p>
<p
class=
"list-title p-16"
>
已选(
{{
selectedSum
}}
)
</p>
<div
class=
"list-customers"
>
<div
class=
"list-customers"
:style=
"
{ height: heightBox + 'px' }"
>
<el-tag
v-for=
"(item, idx) in selectedCustomerList"
:key=
"idx"
:size=
"size"
type=
"info"
:disable-transitions=
"false"
>
<el-tag
v-for=
"(item, idx) in selectedCustomerList"
:key=
"idx"
:size=
"size"
type=
"info"
:disable-transitions=
"false"
>
<i
class=
"el-icon-user-solid"
></i>
<i
class=
"el-icon-user-solid"
></i>
{{
item
.
customerName
}}
{{
item
.
customerName
}}
...
@@ -37,6 +37,7 @@ export default {
...
@@ -37,6 +37,7 @@ export default {
searchForm
:
{},
searchForm
:
{},
customerList
:
[],
customerList
:
[],
selectedSum
:
0
,
selectedSum
:
0
,
heightBox
:
200
,
// 表格
// 表格
getListApi
:
this
.
$apis
.
sop
.
getCustomerByTagListApi
,
getListApi
:
this
.
$apis
.
sop
.
getCustomerByTagListApi
,
tableParams
:
{
tableParams
:
{
...
@@ -144,7 +145,10 @@ export default {
...
@@ -144,7 +145,10 @@ export default {
}
}
},
},
mounted
()
{
},
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
350
},
methods
:
{
methods
:
{
beforeSearchFn
()
{
beforeSearchFn
()
{
...
@@ -277,8 +281,8 @@ export default {
...
@@ -277,8 +281,8 @@ export default {
border-bottom
:
1px
solid
#f1f1f1
;
border-bottom
:
1px
solid
#f1f1f1
;
}
}
.list-customers
{
.list-customers
{
box-sizing
:
border-box
;
//
box-sizing
:
border-box
;
height
:
61vh
;
//
height
:
61vh
;
padding
:
10px
;
padding
:
10px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
}
...
...
src/views/sop/editSop/editEvent.vue
View file @
b65d22f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment