Commit 78f2b91c by chenwq

```

feat(contractManager): 添加套餐合同模板批量替换功能

- 新增batchReplaceParentTemplateApi接口用于批量替换套餐合同模板
- 在changeContractDialog组件中添加套餐合同批量处理逻辑
- 在parentIndex页面添加批量更换按钮和相关方法
- 启用表格多选功能以支持批量操作
```
1 parent b8c9b732
...@@ -193,6 +193,18 @@ const initProdPackageApi = params => { ...@@ -193,6 +193,18 @@ const initProdPackageApi = params => {
}) })
} }
// 批量替换套餐合同模板
const batchReplaceParentTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.parent.template.batch.replaceTemplate`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取套餐详情 // 获取套餐详情
const getProdPackageDetailApi = params => { const getProdPackageDetailApi = params => {
params.method = `scrm.api.equity.service.contract.parent.template.detail` params.method = `scrm.api.equity.service.contract.parent.template.detail`
...@@ -245,6 +257,7 @@ export default { ...@@ -245,6 +257,7 @@ export default {
getProdPackageListApi, getProdPackageListApi,
exportProdPackageApi, exportProdPackageApi,
initProdPackageApi, initProdPackageApi,
batchReplaceParentTemplateApi,
getProdPackageDetailApi, getProdPackageDetailApi,
getProdPartListApi, getProdPartListApi,
getSkuCategoryListApi getSkuCategoryListApi
......
...@@ -190,6 +190,11 @@ export default { ...@@ -190,6 +190,11 @@ export default {
//商品合同批量 //商品合同批量
params.targetIds = this.changeContractObj.ids params.targetIds = this.changeContractObj.ids
} }
// 套餐合同批量
if (this.changeContractObj.isParentBatch) {
params.baseFlag = 0
API = 'batchReplaceParentTemplateApi'
}
// 产品合同批量 // 产品合同批量
if (this.changeContractObj.isProdBatch) { if (this.changeContractObj.isProdBatch) {
params.targetIds = this.changeContractObj.ids params.targetIds = this.changeContractObj.ids
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<div class="operate_wrap"> <div class="operate_wrap">
<span class="table_title">合同列表</span> <span class="table_title">合同列表</span>
<div class="operate_btn"> <div class="operate_btn">
<GLButton type="primary" fn="批量更换" plain :size="size" @click="batchChangeTmpl">批量更换</GLButton>
<el-button type="primary" plain :size="size" @click="handleExport">导出</el-button> <el-button type="primary" plain :size="size" @click="handleExport">导出</el-button>
</div> </div>
</div> </div>
...@@ -175,8 +176,8 @@ export default { ...@@ -175,8 +176,8 @@ export default {
getListApi: this.$apis.contractManager.getProdPackageListApi, getListApi: this.$apis.contractManager.getProdPackageListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
// mutiSelectName: 'tmplIndex', mutiSelectName: 'tmplIndex',
// mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
...@@ -241,6 +242,18 @@ export default { ...@@ -241,6 +242,18 @@ export default {
this.changeContractObj.visible = false this.changeContractObj.visible = false
this.handleSearch() this.handleSearch()
}, },
batchChangeTmpl() {
const data = this.$refs.equityRef?.mutiSelectArr?.[this.tableParams.mutiSelectName] || []
const ids = data.map(item => item.id)
if (!ids.length) return this.$message.error('请选择需要替换模板的合同')
this.changeContractObj = {
visible: true,
id: '',
ids,
isParent: true,
isParentBatch: true
}
},
initTmpl(row) { initTmpl(row) {
this.tipObj = { this.tipObj = {
visible: true, visible: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!