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 71e8f65b
authored
Feb 15, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
定向礼包列表
1 parent
4128198c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
352 additions
and
84 deletions
src/assets/css/public.scss
src/router/routes.js
src/views/giftBag/editGift.vue
src/views/giftBag/giftDetail.vue
src/views/giftBag/giftList.vue
src/views/template/edit.vue
src/assets/css/public.scss
View file @
71e8f65
...
@@ -171,6 +171,10 @@ html {
...
@@ -171,6 +171,10 @@ html {
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.marketing
.m-b-10
{
margin-bottom
:
10px
;
}
.marketing
.m-b-20
{
.marketing
.m-b-20
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
...
...
src/router/routes.js
View file @
71e8f65
...
@@ -218,6 +218,12 @@ const staticRoutes = Object.freeze([{
...
@@ -218,6 +218,12 @@ const staticRoutes = Object.freeze([{
path
:
'/giftBag/giftDetail'
,
path
:
'/giftBag/giftDetail'
,
component
:
resolve
=>
require
([
`@/views/giftBag/giftDetail.vue`
],
resolve
),
component
:
resolve
=>
require
([
`@/views/giftBag/giftDetail.vue`
],
resolve
),
meta
:
{}
meta
:
{}
},
{
name
:
'editGift'
,
path
:
'/giftBag/editGift'
,
component
:
resolve
=>
require
([
`@/views/giftBag/editGift.vue`
],
resolve
),
meta
:
{}
}
}
])
])
export
default
staticRoutes
export
default
staticRoutes
\ No newline at end of file
\ No newline at end of file
src/views/giftBag/editGift.vue
0 → 100644
View file @
71e8f65
<!-- 编辑专区 -->
<
template
>
<div
class=
"edit-gift marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
>
<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>
</div>
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'editGift'
,
data
()
{
return
{
size
:
'small'
,
title
:
'新增信息'
,
titleObj
:
{
add
:
'新增信息'
,
edit
:
'编辑信息'
},
footerLeft
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
routeInfo
:
{
// add-新增;edit-编辑;look-查看
addOrEdit
:
'add'
,
id
:
''
},
editStatus
:
false
,
labelWidth
:
'144px'
,
editForm
:
{
name
:
''
},
editRule
:
{
name
:
[{
required
:
true
,
message
:
'请输入礼包名称'
,
trigger
:
'change'
}]
// zoneImg: [{ required: true, message: '请选择专区图片', trigger: 'change' }]
},
isEdit
:
true
,
editFormData
:
[
{
label
:
'礼包名称'
,
name
:
'name'
,
type
:
'input'
,
maxlength
:
15
},
{
label
:
'备注名称'
,
name
:
'remarkName'
,
type
:
'input'
,
maxlength
:
30
}
// {
// label: '专区图片',
// name: 'zoneImg',
// type: 'upload',
// limitSize: 10,
// maxPhotoNum: 1,
// handleUpload: (e, file, targetItem) => {
// const imgFile = e.target.result
// const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
// this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
// this.editForm[targetItem.name] = res
// this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
// })
// }
// }
]
}
},
watch
:
{
editForm
:
{
handler
(
val
)
{
this
.
editStatus
=
true
},
deep
:
true
}
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
query
console
.
log
(
this
.
routeInfo
.
addOrEdit
)
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
''
},
methods
:
{
getInfo
()
{
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
// this.editForm.name = res.name
// this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
// this.$nextTick(() => {
// this.editStatus = false
// })
// })
},
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
}
params
.
merchantList
=
[]
this
.
editForm
.
merchantList
.
forEach
(
item
=>
{
params
.
merchantList
.
push
({
merchantId
:
item
.
merchantNo
,
merchantName
:
item
.
merchantName
,
merchantAccountLevel
:
item
.
merchantAccountLevel
})
})
// console.log(params)
this
.
$apis
.
zoneList
.
insertZoneApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
}
})
},
cancelJump
()
{
this
.
$router
.
push
({
path
:
'/giftBag/index'
})
},
handleCancel
()
{
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{
})
}
else
{
this
.
cancelJump
()
}
}
}
}
</
script
>
<
style
scoped
>
.marketing.edit-gift
.select-merchant
{
/* width: calc(98% - 140px); */
width
:
98%
;
}
</
style
>
src/views/giftBag/giftDetail.vue
View file @
71e8f65
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
};
}
},
},
mounted
()
{
mounted
()
{
...
@@ -25,5 +25,4 @@ export default {
...
@@ -25,5 +25,4 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/giftBag/giftList.vue
View file @
71e8f65
<!-- 定向礼包-->
<!-- 定向礼包-->
<
template
>
<
template
>
<div
class=
"marketing p-t-20"
>
<div
class=
"marketing p-t-20"
>
<div
class=
"m-b-10"
>
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
@
click=
"handleEdit('add')"
>
新增礼包
</el-button>
<!--
<GLButton
:size=
"size"
type=
"primary"
fn=
"新增礼包"
class=
"el-icon-plus"
@
click=
"handleEdit('add')"
>
新增礼包
</GLButton>
-->
</div>
<div
class=
"list-tips m-b-10"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<span>
定向礼包:将多种券和服务组合成定向礼包,由指定的员工向指定的客户发放,客户需准确输入设定内容才能成功领取。
</span>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<div>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
</span>
</glsx-combi-form>
</div>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"commentRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"giftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<div>
礼包明细
</div>
<div>
{{
scope
.
scope
}}
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
v-if=
"scope.scope.commentStatus == '0'"
type=
"text"
@
click=
"handleRevoke(scope.scope)"
>
发布
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
v-if=
"scope.scope.commentStatus == '1'"
type=
"text"
@
click=
"handleRevoke(scope.scope)"
>
撤回
</el-button>
<!--
<GLButton
type=
"text"
fn=
"删除"
@
click=
"handleDelete(scope.scope)"
>
删除
</GLButton>
-->
<!--
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看
</el-button>
-->
<GLButton
type=
"text"
fn=
"评价详情"
@
click=
"handleDetail(scope.scope)"
>
查看
</GLButton>
<!--
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
-->
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -29,6 +45,7 @@
...
@@ -29,6 +45,7 @@
<
script
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
{
exportFn
}
from
'@/common/constant'
export
default
{
export
default
{
name
:
'giftList'
,
name
:
'giftList'
,
data
()
{
data
()
{
...
@@ -44,27 +61,24 @@ export default {
...
@@ -44,27 +61,24 @@ export default {
// 搜索
// 搜索
searchFormData
:
[
searchFormData
:
[
{
{
label
:
'评价日期'
,
label
:
'礼包名称'
,
name
:
'createDate'
,
name
:
'orderCode'
,
type
:
'datePicker'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
15
,
pickerOptions
:
'beforeRangePickerOptions'
isClear
:
true
},
{
label
:
'评价状态'
,
name
:
'commentStatus'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'commentStatusList'
},
},
{
{
label
:
'
订单编号
'
,
label
:
'
发放员工
'
,
name
:
'orderCode'
,
name
:
'orderCode'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
17
,
isClear
:
true
isClear
:
true
},
{
label
:
'创建时间'
,
name
:
'createDate'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
}
}
],
],
// 表格
// 表格
...
@@ -74,34 +88,50 @@ export default {
...
@@ -74,34 +88,50 @@ export default {
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'订单编号'
,
label
:
''
,
prop
:
''
,
columnattrs
:
{
type
:
'expand'
},
addHtml
:
'giftInfo'
},
{
label
:
'序号'
,
prop
:
'idx'
},
{
label
:
'礼包名称'
,
prop
:
'orderCode'
},
{
label
:
'备注名称'
,
prop
:
'orderCode'
,
prop
:
'orderCode'
,
width
:
'200'
width
:
'200'
},
},
{
{
label
:
'评价日期'
,
label
:
'预估成本/元'
,
prop
:
'createdDate'
,
prop
:
'orderCode'
width
:
'180'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
},
},
{
{
label
:
'
评价状态
'
,
label
:
'
发放员工
'
,
prop
:
'
commentStatus'
,
prop
:
'
orderCode'
line
:
1
,
}
,
formatter
:
cellValue
=>
{
{
return
this
.
baseData
.
commentStatusList
.
find
(
item
=>
item
.
confId
==
cellValue
.
commentStatus
).
confName
label
:
'预估成本/元'
,
}
prop
:
'orderCode'
},
},
{
{
label
:
'评论人'
,
label
:
'赠送原因'
,
prop
:
'customerName'
,
prop
:
'orderCode'
line
:
1
,
},
{
label
:
'创建时间'
,
prop
:
'createdDate'
,
width
:
'180'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
customerName
||
'-'
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
}
},
]
]
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
...
@@ -164,23 +194,38 @@ export default {
...
@@ -164,23 +194,38 @@ export default {
})
})
},
},
// 查看
// 查看
handleDetail
(
row
)
{
//
handleDetail(row) {
this
.
$router
.
push
({
//
this.$router.push({
path
:
'/orderComment/commentDetail'
,
//
path: '/orderComment/commentDetail',
query
:
{
//
query: {
id
:
row
.
id
//
id: row.id
}
//
}
})
//
})
},
//
},
// 发布/撤回
handleExport
()
{
handleRevoke
(
row
)
{
var
params
=
this
.
getParams
()
var
txt
=
row
.
commentStatus
==
'0'
?
'发布'
:
'撤回'
// this.$apis.couponManage.couponExportApi(params).then(res => {
this
.
secondConfirm
(
txt
,
'是否确认'
+
txt
+
'该评论?'
,
'orderComment'
,
'changeCommentStatusApi'
,
{
id
:
row
.
id
,
commentStatus
:
row
.
commentStatus
==
'0'
?
1
:
0
})
// exportFn(res)
// })
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该评论?'
,
'orderComment'
,
'deleteCommentApi'
,
{
id
:
row
.
id
})
// this.secondConfirm('删除', '是否确认删除该评论?', 'orderComment', 'deleteCommentApi', { id: row.id })
},
// add-新增;edit-编辑
handleEdit
(
addOrEdit
,
row
)
{
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var
params
=
{
addOrEdit
:
addOrEdit
,
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增信息'
:
'编辑信息'
)
}
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
this
.
$router
.
push
({
path
:
'/giftBag/editGift'
,
query
:
params
})
},
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
...
@@ -209,12 +254,17 @@ export default {
...
@@ -209,12 +254,17 @@ export default {
}
}
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
var
page
=
this
.
$refs
.
giftListRef
.
page
// 添加序号
this
.
$refs
.
giftListRef
.
data
.
forEach
((
item
,
index
)
=>
{
item
.
idx
=
index
+
(
page
[
this
.
pageConf
.
pageNum
]
-
1
)
*
page
[
this
.
pageConf
.
pageSize
]
+
1
})
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
commentRef
.
data
.
length
?
(
this
.
$refs
.
commentRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
commen
tRef
.
setTableHeightFun
()
this
.
$refs
.
giftListRef
.
data
.
length
?
(
this
.
$refs
.
giftListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
giftLis
tRef
.
setTableHeightFun
()
},
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
commen
tRef
.
refreshTable
()
this
.
$refs
.
giftLis
tRef
.
refreshTable
()
},
},
handleReset
()
{
handleReset
()
{
...
...
src/views/template/edit.vue
View file @
71e8f65
<!-- 编辑
晒单
-->
<!-- 编辑
专区
-->
<
template
>
<
template
>
<div
class=
"edit-
share marketing
"
>
<div
class=
"edit-
gift marketing p-t-20 edit-box
"
>
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container
"
ref=
"editFormRef"
labelWidth=
"14
0px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
></glsx-combi-form>
<glsx-combi-form
class=
"edit-form-container
m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:labelWidth=
"labelWidth"
defaultWidth=
"32
0px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
></glsx-combi-form>
</div>
</div>
<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>
...
@@ -14,23 +14,25 @@
...
@@ -14,23 +14,25 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'edit
Share
'
,
name
:
'edit
Gift
'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
title
:
'新增
晒单
'
,
title
:
'新增
信息
'
,
titleObj
:
{
titleObj
:
{
1
:
'新增晒单
'
,
add
:
'新增信息
'
,
2
:
'编辑晒单
'
edit
:
'编辑信息
'
},
},
footerLeft
:
'0'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
routeInfo
:
{
routeInfo
:
{
//
1-新增;2-编辑;3
-查看
//
add-新增;edit-编辑;look
-查看
addOrEdit
:
1
,
addOrEdit
:
'add'
,
id
:
''
id
:
''
},
},
editStatus
:
false
,
labelWidth
:
'144px'
,
editForm
:
{
editForm
:
{
// 专区类型(1发现频道,2商城专区)
// 专区类型(1发现频道,2商城专区)
zoneType
:
'2'
,
zoneType
:
'2'
,
...
@@ -43,11 +45,11 @@ export default {
...
@@ -43,11 +45,11 @@ export default {
zoneImg
:
[{
required
:
true
,
message
:
'请选择专区图片'
,
trigger
:
'change'
}],
zoneImg
:
[{
required
:
true
,
message
:
'请选择专区图片'
,
trigger
:
'change'
}],
merchantList
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}]
merchantList
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}]
},
},
isEdit
:
true
,
editFormData
:
[
editFormData
:
[
{
{
label
:
'专区名称'
,
label
:
'专区名称'
,
name
:
'zoneName'
,
name
:
'zoneName'
,
width
:
'320px'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
20
maxlength
:
20
},
},
...
@@ -55,7 +57,6 @@ export default {
...
@@ -55,7 +57,6 @@ export default {
label
:
'专区图片'
,
label
:
'专区图片'
,
name
:
'zoneImg'
,
name
:
'zoneImg'
,
type
:
'upload'
,
type
:
'upload'
,
width
:
'320px'
,
limitSize
:
10
,
limitSize
:
10
,
maxPhotoNum
:
1
,
maxPhotoNum
:
1
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
...
@@ -71,12 +72,22 @@ export default {
...
@@ -71,12 +72,22 @@ export default {
}
}
},
},
watch
:
{
editForm
:
{
handler
(
val
)
{
this
.
editStatus
=
true
},
deep
:
true
}
},
mounted
()
{
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
params
this
.
routeInfo
=
this
.
$route
.
query
console
.
log
(
this
.
routeInfo
.
addOrEdit
)
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
''
},
},
methods
:
{
methods
:
{
...
@@ -88,33 +99,67 @@ export default {
...
@@ -88,33 +99,67 @@ export default {
// this.editForm.merchantList.forEach(item => {
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// item.merchantNo = item.merchantId
// })
// })
// this.$nextTick(() => {
// this.editStatus = false
// })
// })
// })
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
}
}
// this.$apis.zoneList.insertZoneApi(params).then(res => {
params
.
merchantList
=
[]
// this.$message({
// 专区类型(1发现频道,2商城专区)
// message: res.code == '0' ? '操作成功' : '操作失败',
params
.
zoneType
=
'2'
// type: res.code == '0' ? 'success' : 'error'
this
.
editForm
.
merchantList
.
forEach
(
item
=>
{
// })
params
.
merchantList
.
push
({
// if (res.code == '0') {
merchantId
:
item
.
merchantNo
,
// this.handleCancel()
merchantName
:
item
.
merchantName
,
// }
merchantAccountLevel
:
item
.
merchantAccountLevel
// })
})
})
// console.log(params)
this
.
$apis
.
zoneList
.
insertZoneApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
}
}
})
})
},
},
handleCancel
()
{
cancelJump
()
{
// this.$router.push({
// this.$router.push({
// path: '/
orderShare
/index'
// path: '/
giftBag
/index'
// })
// })
},
handleCancel
()
{
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{
})
}
else
{
this
.
cancelJump
()
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
.marketing.edit-gift
.select-merchant
{
/* width: calc(98% - 140px); */
width
:
98%
;
}
</
style
>
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