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 98bc5372
authored
Jun 13, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
大版本开发联调
1 parent
9bb36321
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
20 deletions
src/api/modules/contractManager.js
src/views/ContractManager/prodIndex.vue
src/views/serviceConfig/addService.vue
src/api/modules/contractManager.js
View file @
98bc537
...
@@ -125,6 +125,27 @@ const exportProdContractApi = params => {
...
@@ -125,6 +125,27 @@ const exportProdContractApi = params => {
})
})
}
}
//查询产品分类
const
getProdCategoryListApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.base.package.category.list`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// 编辑或者新增分类
const
addCategoryApi
=
params
=>
{
params
.
method
=
`scrm.api.equity.service.base.package.update.category`
return
http
({
url
:
CUR_BASE_URL
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
getContractListApi
,
getContractListApi
,
getBaseContractListApi
,
getBaseContractListApi
,
...
@@ -137,5 +158,7 @@ export default {
...
@@ -137,5 +158,7 @@ export default {
babchInitTemplateApi
,
babchInitTemplateApi
,
exportContractApi
,
exportContractApi
,
getProdContractListApi
,
getProdContractListApi
,
exportProdContractApi
exportProdContractApi
,
getProdCategoryListApi
,
addCategoryApi
}
}
src/views/ContractManager/prodIndex.vue
View file @
98bc537
...
@@ -20,11 +20,13 @@
...
@@ -20,11 +20,13 @@
<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=
"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=
"changeTmpl(row.scope)"
>
更换模板
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"initTmpl(row.scope)"
>
初始化模板
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.packageType == 1"
@
click=
"initTmpl(row.scope)"
>
初始化模板
</el-button>
<el-button
type=
"text"
@
click=
"editCategoryFn(row.scope, 1)"
>
编辑分类
</el-button>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"viewProdDetail(scope.scope)"
>
产品详情
</el-button>
<el-button
type=
"text"
@
click=
"viewProdDetail(scope.scope)"
>
产品详情
</el-button>
<el-button
type=
"text"
@
click=
"editCategoryFn(scope.scope, 0)"
>
编辑分类
</el-button>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -65,6 +67,10 @@
...
@@ -65,6 +67,10 @@
<p
class=
"content"
>
选中的商品合同模板将初始化,读取后台的最新配置
</p>
<p
class=
"content"
>
选中的商品合同模板将初始化,读取后台的最新配置
</p>
</div>
</div>
</GLDialog>
</GLDialog>
<GLDialog
class=
"cate-wrap"
:visible
.
sync=
"categoryObj.visible"
:close-on-click-modal=
"false"
mode=
"mid"
title=
"提示"
@
onOk=
"commitCategoryFn"
@
onCancel=
"closeCategoryDialog"
:before-close=
"closeCategoryDialog"
>
<label
class=
"label"
for=
""
>
产品分类:
</label>
<el-autocomplete
:popper-append-to-body=
"false"
value-key=
"key"
popper-class=
"my-autocomplete"
v-model
.
trim=
"categoryObj.categoryName"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入或选择内容"
></el-autocomplete>
</GLDialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -224,6 +230,10 @@ export default {
...
@@ -224,6 +230,10 @@ export default {
formatter
:
cell
=>
'--'
formatter
:
cell
=>
'--'
},
},
{
{
label
:
'产品类别'
,
prop
:
'spuCategory'
},
{
label
:
'服务项目'
,
label
:
'服务项目'
,
prop
:
'packageName'
prop
:
'packageName'
},
},
...
@@ -275,6 +285,10 @@ export default {
...
@@ -275,6 +285,10 @@ export default {
prop
:
'contractId'
prop
:
'contractId'
},
},
{
{
label
:
'产品类别'
,
prop
:
'skuCategory'
},
{
label
:
'服务项目'
,
label
:
'服务项目'
,
addHtml
:
'serviceItemSlot'
addHtml
:
'serviceItemSlot'
},
},
...
@@ -310,13 +324,73 @@ export default {
...
@@ -310,13 +324,73 @@ export default {
tipObj
:
{
tipObj
:
{
visible
:
false
,
visible
:
false
,
ids
:
[]
ids
:
[]
}
},
categoryObj
:
{
categoryName
:
''
,
basePackageType
:
0
,
baseId
:
''
,
visible
:
false
},
// categoryList: [{ key: 'nihao' }, { key: '你好呀' }]
categoryList
:
[]
}
}
},
},
mounted
()
{},
mounted
()
{
this
.
getProdCategoryList
()
},
methods
:
{
methods
:
{
querySearch
(
queryString
,
cb
)
{
var
restaurants
=
this
.
categoryList
var
results
=
queryString
?
restaurants
.
filter
(
this
.
createFilter
(
queryString
))
:
restaurants
// 调用 callback 返回建议列表的数据
cb
(
results
)
},
createFilter
(
queryString
)
{
return
restaurant
=>
{
return
restaurant
.
key
.
toLowerCase
().
indexOf
(
queryString
.
toLowerCase
())
>
-
1
}
},
getProdCategoryList
()
{
this
.
$apis
.
contractManager
.
getProdCategoryListApi
({}).
then
(
res
=>
{
if
(
res
?.
length
)
{
this
.
categoryList
=
res
.
map
(
item
=>
({
key
:
item
}))
}
})
},
editCategoryFn
(
row
,
basePackageType
)
{
this
.
categoryObj
=
{
categoryName
:
''
,
basePackageType
,
baseId
:
basePackageType
==
1
?
row
.
skuId
:
row
.
spuId
,
visible
:
true
}
},
commitCategoryFn
()
{
const
{
basePackageType
,
categoryName
,
baseId
}
=
this
.
categoryObj
const
params
=
{
basePackageType
,
categoryName
,
baseId
}
this
.
$apis
.
contractManager
.
addCategoryApi
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'编辑成功'
)
this
.
closeCategoryDialog
()
this
.
handleSearch
()
this
.
getProdCategoryList
()
}
})
},
closeCategoryDialog
()
{
this
.
categoryObj
=
{
categoryName
:
''
,
basePackageType
:
0
,
baseId
:
''
,
visible
:
false
}
},
viewProdDetail
(
row
)
{
viewProdDetail
(
row
)
{
this
.
detailData
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
detailData
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
this
.
detailData
.
skuPackageList
.
forEach
(
ele
=>
{
this
.
detailData
.
skuPackageList
.
forEach
(
ele
=>
{
...
@@ -468,6 +542,17 @@ export default {
...
@@ -468,6 +542,17 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.cate-wrap
{
.label
{
display
:
inline-block
;
width
:
154px
;
text-align
:
right
;
}
/
deep
/
.my-autocomplete
,
/
deep
/
.el-input__inner
{
width
:
432px
!important
;
}
}
/
deep
/
.el-table__expanded-cell
{
/
deep
/
.el-table__expanded-cell
{
padding
:
0
;
padding
:
0
;
.el-table__header-wrapper
{
.el-table__header-wrapper
{
...
...
src/views/serviceConfig/addService.vue
View file @
98bc537
...
@@ -435,27 +435,42 @@ export default {
...
@@ -435,27 +435,42 @@ export default {
const
params
=
{
const
params
=
{
serviceCode
:
this
.
routeInfo
.
serviceCode
,
serviceCode
:
this
.
routeInfo
.
serviceCode
,
serviceName
:
this
.
routeInfo
.
serviceName
,
serviceName
:
this
.
routeInfo
.
serviceName
,
gradeList
:
_gradeList
,
gradeList
:
''
,
monthlyInsuranceCost
:
NP
.
times
(
this
.
gradeFormObj
.
monthlyInsuranceCost
||
0
,
100
)
monthlyInsuranceCost
:
NP
.
times
(
this
.
gradeFormObj
.
monthlyInsuranceCost
||
0
,
100
)
}
}
this
.
$apis
.
serviceConfig
.
addGradeApi
(
params
).
then
(
res
=>
{
this
.
splitParam
(
_gradeList
,
params
)
console
.
log
(
res
)
// this.$apis.serviceConfig.addGradeApi(params).then(res => {
if
(
res
)
{
// console.log(res)
this
.
$message
.
success
(
'提交成功'
)
// if (res) {
this
.
jumpListPage
()
// this.$message.success('提交成功')
}
// this.jumpListPage()
// }
// })
},
splitParam
(
list
,
params
)
{
let
promiseList
=
[]
for
(
let
i
=
0
;
i
<
list
.
length
;
i
=
i
+
5
)
{
let
_gradeList
=
list
.
slice
(
i
,
i
+
5
)
let
_params
=
params
_params
.
gradeList
=
_gradeList
promiseList
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$apis
.
serviceConfig
.
addGradeApi
(
_params
)
.
then
(
res
=>
{
resolve
(
res
)
})
.
catch
(
err
=>
{
reject
(
err
)
})
})
)
}
Promise
.
all
(
promiseList
).
then
(
res
=>
{
this
.
$message
.
success
(
'提交成功'
)
this
.
jumpListPage
()
})
})
},
},
// commit() {
// const params = this.getParams()
// this.$apis.serviceConfig.addGradeApi(params).then(res => {
// console.log(res)
// if(res){
// this.$message.success('提交成功')
// this.jumpListPage()
// }
// })
// },
handleAddGrade
()
{
handleAddGrade
()
{
const
_gradeList
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
]
const
_gradeList
=
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
]
if
(
this
.
gradeList
.
length
==
_gradeList
.
length
)
return
this
.
$message
.
error
(
`最多添加
${
_gradeList
.
length
}
个规格`
)
if
(
this
.
gradeList
.
length
==
_gradeList
.
length
)
return
this
.
$message
.
error
(
`最多添加
${
_gradeList
.
length
}
个规格`
)
...
...
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