Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 2b9892d8
authored
Jan 03, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
合同模板联调
1 parent
47e82381
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
220 additions
and
29 deletions
src/api/modules/contractManager.js
src/views/ContractManager/addTmpl.vue
src/views/ContractManager/components/changeContractDialog/index.vue
src/views/ContractManager/prodIndex.vue
src/views/claims/ghIndex.vue
src/api/modules/contractManager.js
View file @
2b9892d
import
{
http
}
from
'@/main'
const
CUR_BASE_URL
=
'rop-scrm-equity/router'
const
getBaseContractListApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.contract.base.template.list.page`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//获取产品合同更换模板列表
const
getContractListApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.contract.template.list`
return
http
({
...
...
@@ -51,6 +61,17 @@ const copyTemplateApi = params => {
})
}
//更换产品合同模板
const
copyBaseTemplateApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.contract.base.template.replace`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//批量变更合同模板
const
babchCopyTemplateApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.contract.template.batch.copyTemplate`
...
...
@@ -106,10 +127,12 @@ const exportProdContractApi = params => {
export
default
{
getContractListApi
,
getBaseContractListApi
,
saveContractTemplateApi
,
getContractDetailApi
,
printContractApi
,
copyTemplateApi
,
copyBaseTemplateApi
,
babchCopyTemplateApi
,
babchInitTemplateApi
,
exportContractApi
,
...
...
src/views/ContractManager/addTmpl.vue
View file @
2b9892d
...
...
@@ -37,6 +37,7 @@ const errorTipObj = {
contractIntroduce
:
'合同介绍'
,
relevantDefinition
:
'相关定义'
,
useConditions
:
'使用条件'
,
baseContext
:
'使用条件'
,
serviceScope
:
'服务范围'
,
exclusionLiability
:
'除外责任'
,
serviceData
:
'服务所需资料'
,
...
...
@@ -157,16 +158,41 @@ export default {
this
.
$apis
.
contractManager
.
getContractDetailApi
({
id
:
this
.
routerInfo
.
id
}).
then
(
res
=>
{
if
(
res
&&
res
.
templateConfig
)
{
this
.
placeholderList
=
res
.
placeholderList
this
.
templateType
=
res
.
templateConfig
.
templateType
if
(
res
.
templateConfig
.
templateType
==
1
)
{
this
.
contentList
=
[
{
title
:
'Logo区域'
,
label
:
'Logo图'
,
key
:
'logoUrl'
,
type
:
'img'
},
{
title
:
'合同介绍区域'
,
label
:
'合同介绍:'
,
key
:
'contractIntroduce'
,
type
:
'richText'
},
{
title
:
'使用条件区域'
,
label
:
'使用条件:'
,
key
:
'useConditions'
,
type
:
'richText'
}
]
}
for
(
const
key
in
this
.
contentObj
)
{
if
(
key
!=
'useConditions'
)
{
this
.
contentObj
[
key
]
=
res
.
templateConfig
[
key
]
}
else
{
// 如果是自定义模板类型,使用条件的值取的是baseContext,自动化取useConditions,传参也是
let
useConditions
=
res
.
templateConfig
.
templateType
==
1
?
res
.
templateConfig
.
baseContext
:
res
.
templateConfig
.
useConditions
for
(
var
i
=
0
;
i
<
res
.
placeholderList
.
length
;
i
++
)
{
var
placeholder
=
res
.
placeholderList
[
i
]
let
targetStr
=
`<span data-w-e-type="text" data-key="
${
placeholder
.
key
}
" data-name="
${
placeholder
.
name
}
">
${
placeholder
.
name
}
</span>`
res
.
templateConfig
.
useConditions
=
res
.
templateConfig
.
useConditions
.
replace
(
new
RegExp
(
placeholder
.
key
,
'g'
),
targetStr
)
useConditions
=
useConditions
.
replace
(
new
RegExp
(
placeholder
.
key
,
'g'
),
targetStr
)
}
this
.
contentObj
.
useConditions
=
res
.
templateConfig
.
useConditions
this
.
contentObj
.
useConditions
=
useConditions
}
}
this
.
pdfObj
=
{
...
...
@@ -183,6 +209,14 @@ export default {
let
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
contentObj
)
let
errorTip
=
''
params
.
useConditions
=
params
.
useConditions
?.
replace
(
/<span.*
?
data-w-e-type.*
?
data-key="
(
.*
?)
".*
?
<
\/
span>/g
,
'$1'
)
if
(
this
.
templateType
==
1
)
{
params
=
{
baseContext
:
params
.
useConditions
,
contractTitle
:
params
.
contractTitle
,
contractIntroduce
:
params
.
contractIntroduce
,
logoUrl
:
params
.
logoUrl
}
}
for
(
const
key
in
params
)
{
if
(
key
!=
'id'
&&
!
params
[
key
])
{
if
(
key
==
'electronicSealUrl'
||
key
==
'logoUrl'
)
{
...
...
src/views/ContractManager/components/changeContractDialog/index.vue
View file @
2b9892d
This diff is collapsed.
Click to expand it.
src/views/ContractManager/prodIndex.vue
View file @
2b9892d
...
...
@@ -18,6 +18,8 @@
<span
slot=
"auth-button"
slot-scope=
"row"
:data=
"scope.scope"
>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"handlePdf(row.scope)"
>
打印
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"editContract(row.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"changeTmpl(row.scope)"
>
更换模板
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"initTmpl(row.scope)"
>
初始化模板
</el-button>
</span>
</GLTable>
</div>
...
...
@@ -55,6 +57,14 @@
</div>
</div>
</el-drawer>
<changeContractDialog
v-if=
"changeContractObj.visible"
@
closeDialog=
"closeTmplDialog"
:changeContractObj=
"changeContractObj"
></changeContractDialog>
<GLDialog
:visible
.
sync=
"tipObj.visible"
:close-on-click-modal=
"false"
mode=
"small"
title=
"提示"
@
onOk=
"toInitTmpl"
@
onCancel=
"closeTipDialog"
:before-close=
"closeTipDialog"
>
<div
class=
"tip-body"
>
<i
class=
"el-icon-warning icon"
></i>
<p
class=
"title"
>
是否确认初始化?
</p>
<p
class=
"content"
>
选中的商品合同模板将初始化,读取后台的最新配置
</p>
</div>
</GLDialog>
</div>
</
template
>
...
...
@@ -127,10 +137,12 @@ const PROD_ENUM = {
import
*
as
dayjs
from
'dayjs'
import
utils
from
'../../util/util'
import
pdfDialog
from
'@/views/beforeSale/pdfDialog'
import
changeContractDialog
from
'./components/changeContractDialog'
export
default
{
name
:
'prodIndex'
,
components
:
{
pdfDialog
pdfDialog
,
changeContractDialog
},
data
()
{
return
{
...
...
@@ -287,7 +299,18 @@ export default {
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
changeContractObj
:
{
visible
:
false
,
isBase
:
true
,
skuId
:
''
,
skuPackageCode
:
''
,
baseTemplateId
:
''
},
tipObj
:
{
visible
:
false
,
ids
:
[]
}
}
},
...
...
@@ -309,6 +332,56 @@ export default {
this
.
detailData
.
packageTypeName
=
row
.
packageType
==
1
?
'权益类'
:
'延保类'
this
.
drawer
=
true
},
// 更换模板
changeTmpl
({
skuPackageCode
,
skuId
})
{
this
.
changeContractObj
=
{
visible
:
true
,
isBase
:
true
,
// true产品模板
skuId
,
skuPackageCode
,
baseTemplateId
:
''
}
},
closeTmplDialog
()
{
this
.
changeContractObj
.
visible
=
false
this
.
handleSearch
()
},
initTmpl
(
row
)
{
this
.
tipObj
=
{
visible
:
true
,
ids
:
[
row
.
contractId
]
}
},
toInitTmpl
()
{
const
params
=
{
templateIds
:
this
.
tipObj
.
ids
,
baseFlag
:
1
}
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'Loading'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
this
.
$apis
.
contractManager
.
babchInitTemplateApi
(
params
)
.
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'初始化模板成功'
)
this
.
closeTipDialog
()
}
})
.
finally
(
end
=>
{
loading
.
close
()
})
},
closeTipDialog
()
{
this
.
tipObj
=
{
visible
:
false
,
ids
:
[]
}
this
.
handleSearch
()
},
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
?.
createdDate
?.
length
)
{
...
...
src/views/claims/ghIndex.vue
View file @
2b9892d
...
...
@@ -99,6 +99,14 @@
</div>
</div>
</GLDialog>
<!-- 上传签名授权书 -->
<GLDialog
title=
"提示"
mode=
"small"
okText=
"确认"
cancelText=
"取消"
:visible
.
sync=
"delReasonObj.showDelVisible"
@
onOk=
"confirmDel"
@
onCancel=
"closeDelDialog"
>
<div
class=
"del-reason-body"
>
<div
class=
"label"
>
删除原因:
</div>
<el-input
type=
"text"
v-model=
"delReasonObj.delReason"
:maxlength=
"20"
:show-word-limit=
"true"
size=
"small"
></el-input>
</div>
</GLDialog>
<!-- 跟进人配置 -->
<follow-pop
ref=
"followRef"
@
handleClose=
"handleClose"
:isFollowSync=
"isFollowSync"
v-if=
"isFollowSync"
></follow-pop>
</div>
...
...
@@ -184,6 +192,10 @@ const statusList = [
confId
:
28
,
confName
:
'运营经理审核不通过'
},
{
confId
:
29
,
confName
:
'已删除'
}
]
const
describeList
=
[
{
...
...
@@ -216,6 +228,7 @@ const RE_SUMBIT = [2] //重新提交
const
RETURN_IT
=
[
7
,
13
,
28
]
// 撤销
const
UPLOAD_INFO
=
[
11
]
// 上传资料
const
TO_HANDLE
=
[
0
]
// 去处理
const
TO_DEL
=
[
5
]
const
Operations_Mananger
=
[
26
]
// 运营经理审核
export
default
{
name
:
'index'
,
...
...
@@ -224,6 +237,10 @@ export default {
isFollowSync
:
false
,
signImage
:
''
,
showUpload
:
false
,
delReasonObj
:
{
showDelVisible
:
false
,
delReason
:
''
},
tableStatus
,
orderCount
:
{},
buttonList
:
[
...
...
@@ -382,6 +399,22 @@ export default {
listeners
:
{
click
:
row
=>
this
.
handleEdit
(
4
,
row
.
scope
)
}
},
{
type
:
'el-button'
,
name
:
row
=>
{
return
'删除'
},
condition
:
row
=>
{
return
TO_DEL
.
includes
(
row
.
scope
.
status
)
},
attrs
:
{
type
:
'text'
,
fn
:
'删除'
},
listeners
:
{
click
:
row
=>
this
.
handleDel
(
row
.
scope
)
}
}
],
getListApi
:
this
.
$apis
.
claims
.
getGHClaimsListApi
,
...
...
@@ -393,7 +426,7 @@ export default {
status
:
''
,
commitDate
:
''
,
shopDate
:
''
,
merchantUpdatedDate
:
''
,
merchantUpdatedDate
:
''
,
cityMerchantId
:
''
,
provinceMerchantId
:
''
,
merchantId
:
''
...
...
@@ -550,7 +583,7 @@ export default {
prop
:
'merchantUpdatedDate'
,
width
:
180
,
formatter
:
cellValue
=>
{
return
cellValue
.
merchantUpdatedDate
?
cellValue
.
merchantUpdatedDate
:
'-'
return
cellValue
.
merchantUpdatedDate
?
cellValue
.
merchantUpdatedDate
:
'-'
}
},
{
...
...
@@ -724,10 +757,10 @@ export default {
this
.
getFollowPersonList
()
},
mounted
()
{},
beforeDestroy
(){
const
{
pageNum
,
pageSize
}
=
this
.
$refs
?.
equityRef
?.
page
||
{}
const
ghPageInfo
=
{
...
this
.
searchForm
,
pageNum
,
pageSize
}
window
.
sessionStorage
.
setItem
(
'ghPageInfo'
,
JSON
.
stringify
(
ghPageInfo
))
beforeDestroy
()
{
const
{
pageNum
,
pageSize
}
=
this
.
$refs
?.
equityRef
?.
page
||
{}
const
ghPageInfo
=
{
...
this
.
searchForm
,
pageNum
,
pageSize
}
window
.
sessionStorage
.
setItem
(
'ghPageInfo'
,
JSON
.
stringify
(
ghPageInfo
))
},
methods
:
{
getFollowPersonList
()
{
...
...
@@ -746,9 +779,9 @@ export default {
},
batchAudit
()
{
const
data
=
this
.
$refs
.
equityRef
?.
mutiSelectArr
?.[
this
.
tableParams
.
mutiSelectName
]
||
[]
if
(
!
data
?.
length
)
return
this
.
$message
.
error
(
'请选择需要审批的记录'
)
const
_target
=
data
.
find
(
item
=>
item
.
status
!=
12
&
item
.
status
!=
26
)
//批量操作只操作 待审核 和 待运营经理审核
if
(
_target
)
return
this
.
$message
.
error
(
'请选择待审核的记录'
)
if
(
!
data
?.
length
)
return
this
.
$message
.
error
(
'请选择需要审批的记录'
)
const
_target
=
data
.
find
(
item
=>
(
item
.
status
!=
12
)
&
(
item
.
status
!=
26
))
//批量操作只操作 待审核 和 待运营经理审核
if
(
_target
)
return
this
.
$message
.
error
(
'请选择待审核的记录'
)
const
parmas
=
{
idList
:
data
.
map
(
item
=>
item
.
id
)
}
...
...
@@ -758,14 +791,17 @@ export default {
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
this
.
$apis
.
claims
.
batchPassApi
(
parmas
).
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
handleOkFn
()
}
}).
finally
(
end
=>
{
loading
.
close
()
})
this
.
$apis
.
claims
.
batchPassApi
(
parmas
)
.
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
handleOkFn
()
}
})
.
finally
(
end
=>
{
loading
.
close
()
})
},
handleClose
()
{
this
.
isFollowSync
=
false
...
...
@@ -861,6 +897,19 @@ export default {
this
.
orderCount
=
res
})
},
handleDel
(
row
)
{
this
.
delReasonObj
.
showDelVisible
=
true
},
confirmDel
()
{
console
.
log
(
this
.
delReasonObj
)
},
closeDelDialog
()
{
this
.
delReasonObj
=
{
showDelVisible
:
false
,
delReason
:
''
,
id
:
''
}
},
// 1.新增 2.查看 6.重新提交 4.去处理 5.定损审核 7.核赔审核 8.运营经理审核
handleEdit
(
editNo
,
row
)
{
let
urlParam
=
{}
...
...
@@ -897,7 +946,7 @@ export default {
status
:
''
,
commitDate
:
''
,
shopDate
:
''
,
merchantUpdatedDate
:
''
,
merchantUpdatedDate
:
''
,
cityMerchantId
:
''
,
provinceMerchantId
:
''
,
merchantId
:
''
...
...
@@ -907,17 +956,17 @@ export default {
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchParams
=
{
...
this
.
getParams
()
}
const
{
pageNum
,
pageSize
}
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'ghPageInfo'
)
||
'{}'
)
if
(
pageNum
&&
pageSize
)
{
const
{
pageNum
,
pageSize
}
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'ghPageInfo'
)
||
'{}'
)
if
(
pageNum
&&
pageSize
)
{
this
.
searchParams
.
pageNum
=
pageNum
this
.
searchParams
.
pageSize
=
pageSize
}
resolve
()
})
},
setTableFinishFun
(){
const
{
pageNum
,
pageSize
}
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'ghPageInfo'
)
||
'{}'
)
if
(
pageNum
&&
pageSize
)
{
setTableFinishFun
()
{
const
{
pageNum
,
pageSize
}
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'ghPageInfo'
)
||
'{}'
)
if
(
pageNum
&&
pageSize
)
{
this
.
$refs
.
equityRef
.
page
.
pageNum
=
pageNum
this
.
$refs
.
equityRef
.
page
.
pageSize
=
pageSize
this
.
$forceUpdate
()
...
...
@@ -927,10 +976,10 @@ export default {
getParams
()
{
const
sessionInfo
=
window
.
sessionStorage
.
getItem
(
'ghPageInfo'
)
const
searchForm
=
JSON
.
parse
(
sessionInfo
||
'{}'
)
if
(
sessionInfo
)
{
if
(
sessionInfo
)
{
delete
searchForm
.
pageNum
delete
searchForm
.
pageSize
this
.
searchForm
=
{
...
this
.
searchForm
,
...
searchForm
}
this
.
searchForm
=
{
...
this
.
searchForm
,
...
searchForm
}
}
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
Array
.
isArray
(
params
.
commitDate
)
&&
params
.
commitDate
.
length
>
0
)
{
...
...
@@ -1171,4 +1220,16 @@ export default {
//
}
//
}
//
}
.del-reason-body
{
display
:
flex
;
align-items
:
center
;
margin-top
:
12px
;
.label
{
width
:
154px
;
text-align
:
right
;
}
/
deep
/
.el-input
{
width
:
350px
;
}
}
</
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