Commit c97044d6 by zhangxw

2月份大版本增值优化需求开发

1 parent 6ab781d2
......@@ -8,7 +8,7 @@
<div>
<div class="editor" style="border: 1px solid #ccc;">
<Toolbar v-if="hasTool" style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
<Editor style="min-height: 52px; overflow-y: hidden;" @onChange="onChange" v-model="value" :defaultConfig="editorConfig" :mode="mode" @onCreated="onCreated" />
<Editor style="min-height: 52px; overflow-y: hidden;" @onChange="onChange" @customPaste="customPaste" v-model="value" :defaultConfig="editorConfig" :mode="mode" @onCreated="onCreated" />
</div>
<div class="extend-bar" v-if="operateList && operateList.length">
<el-button v-for="item in operateList" :key="item.key" class="el-icon-circle-plus extend-icon" @click="insertNodeFn(item)">{{ item.name }}</el-button>
......@@ -98,6 +98,12 @@ export default Vue.extend({
onChange(editer) {
this.$emit('change', this.editor.getHtml())
},
// 复制粘贴内容时,自动清除格式
customPaste(editor, event) {
editor.insertText(event.clipboardData.getData('text/plain'))
event.preventDefault()
return false
},
onCreated(editor) {
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
},
......
......@@ -12,10 +12,15 @@
</div>
</div>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :hasNum="false" :expand-row-keys="expandArr">
<span slot="parentSelectSlot" slot-scope="scope">
<el-checkbox v-model="scope.scope.parentSelect" :disabled="parentDisabled(scope.scope)" :indeterminate="isIndeterminate(scope.scope)" @change="handleParentSelection($event, scope.scope)"></el-checkbox>
</span>
<span slot="numberSlot" slot-scope="scope">{{ scope.index + 1 }}</span>
<div class="sub-tabel" slot="labelRelationDetailDTOList" slot-scope="scope" v-if="scope.scope.skuPackageList && scope.scope.skuPackageList.length">
<GLTable ref="sonTableRef" :hasPage="false" :tableData="scope.scope.skuPackageList" :tableParams="sonTableParams" :hasNum="false">
<span slot="selectSlot" slot-scope="row" :data="scope.scope"><el-checkbox @change="$event => handleSelection($event, row.scope)" :value="row.scope.isSelect" :disabled="scope.scope.packageType == 2 || !row.scope.contractId"></el-checkbox></span>
<span slot="selectSlot" slot-scope="row" :data="scope.scope">
<el-checkbox @change="$event => handleSelection($event, row.scope, scope.scope)" v-model="row.scope.isSelect" :disabled="scope.scope.packageType == 2 || !row.scope.contractId"></el-checkbox>
</span>
<span slot="serviceItemSlot" slot-scope="row" :data="scope.scope">{{ scope.scope.packageType == 1 ? row.scope.serviceItems || '--' : '--' }}</span>
<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>
......@@ -227,10 +232,15 @@ export default {
},
{
label: '序号',
width: 80,
width: 50,
addHtml: 'numberSlot'
},
{
label: '',
width: 50,
addHtml: 'parentSelectSlot'
},
{
label: 'ID',
prop: 'spuId',
width: 220
......@@ -294,14 +304,19 @@ export default {
},
{
label: '',
width: 30,
addHtml: 'selectSlot'
width: 50,
formatter: cell => ' '
},
{
label: '',
width: 50,
formatter: cell => ' '
addHtml: 'selectSlot'
},
// {
// label: '',
// width: 50,
// formatter: cell => ' '
// },
{
label: 'ID',
prop: 'skuId',
......@@ -372,7 +387,8 @@ export default {
checkedRow: [],
baseData: {
skuTypeList: []
}
},
parentCheckedRow: []
}
},
......@@ -419,8 +435,10 @@ export default {
},
setTableFinishFun(data) {
data.forEach(ele => {
this.$set(ele, 'parentSelect', false)
if (ele.packageType == 1) {
ele?.skuPackageList?.forEach(item => {
this.$set(item, 'isSelect', false)
// 判断checkedRow中是否包含item 将item的isSelect属性设置为true 翻页时能保留选中状态
this.checkedRow.forEach(cItem => {
if (cItem.contractId && item.contractId == cItem.contractId) {
......@@ -429,6 +447,9 @@ export default {
})
})
}
this.parentCheckedRow?.forEach(val => {
if (val.spuId == ele.spuId) this.$set(ele, 'parentSelect', true)
})
})
},
editCategoryFn(row, basePackageType) {
......@@ -485,14 +506,57 @@ export default {
this.detailData.packageTypeName = row.packageType == 1 ? '权益类' : '延保类'
this.drawer = true
},
// 主产品全选或者不全选样式
isIndeterminate(row) {
let arr = this.$common.utils.deepClone(row?.skuPackageList)
return arr?.filter(item => item.isSelect).length > 0 && !arr?.every(item => item.isSelect)
},
// 主产品是否可选
parentDisabled(row) {
return row?.packageType == 2 || row?.skuPackageList?.every(item => !item.contractId)
},
// 主产品选择
handleParentSelection(e, row) {
if (e) {
row.parentSelect = true
row?.skuPackageList?.forEach(v => {
if (row.packageType != 2 && v.contractId) {
v.isSelect = true
this.checkedRow.push(v)
}
})
this.parentCheckedRow.push({spuId: row?.spuId})
} else {
row.parentSelect = false
row?.skuPackageList?.forEach(v => {
v.isSelect = false
this.checkedRow = this.checkedRow.filter(item => item.contractId !== v.contractId)
})
this.parentCheckedRow = this.parentCheckedRow.filter(item => item.spuId !== row.spuId)
}
},
// 直接获取mutiSelectArr,会获取不到。自定义一个选择框
handleSelection(e, row) {
handleSelection(e, row, scope) {
if (e) {
row.isSelect = true
this.checkedRow.push(row)
} else {
row.isSelect = false
this.checkedRow = this.checkedRow.filter(item => item.contractId !== row.contractId)
}
let flag = false
scope?.skuPackageList?.forEach(v => {
if (scope.packageType != 2 && !v.isSelect) flag = true
})
if (flag) {
scope.parentSelect = false
this.parentCheckedRow = this.parentCheckedRow.filter(item => item.spuId !== scope.spuId)
} else {
scope.parentSelect = true
this.parentCheckedRow.push({spuId: scope?.spuId})
}
},
// 批量变更合同
batchChangeTmpl() {
const data = this.checkedRow || []
......@@ -618,6 +682,7 @@ export default {
handleSearch() {
// 将已选的清除
this.checkedRow = []
this.parentCheckedRow = []
this.$refs.equityRef.refreshTable()
},
......@@ -695,37 +760,37 @@ export default {
.el-table__expand-icon {
width: 14px;
height: 14px;
background: rgba(88, 80, 255, 0.3);
// background: rgba(88, 80, 255, 0.3);
border-radius: 2px;
position: relative;
&.el-table__expand-icon--expanded {
transform: rotate(0deg);
}
&::after {
top: -2px;
left: 0px;
content: '+';
position: absolute;
color: #5850ff;
width: 14px;
height: 14px;
font-size: 14px;
}
i {
display: none;
}
&.el-table__expand-icon--expanded {
&::after {
top: -2px;
left: 0px;
content: '-';
position: absolute;
color: #5850ff;
width: 14px;
height: 14px;
font-size: 14px;
}
}
// &.el-table__expand-icon--expanded {
// transform: rotate(0deg);
// }
// &::after {
// top: -2px;
// left: 0px;
// content: '+';
// position: absolute;
// color: #5850ff;
// width: 14px;
// height: 14px;
// font-size: 14px;
// }
// i {
// display: none;
// }
// &.el-table__expand-icon--expanded {
// &::after {
// top: -2px;
// left: 0px;
// content: '-';
// position: absolute;
// color: #5850ff;
// width: 14px;
// height: 14px;
// font-size: 14px;
// }
// }
}
}
.find_wrap {
......
......@@ -203,6 +203,22 @@ const statusList = [
{
confId: 31,
confName: '已结束案件'
},
{
confId: 36,
confName: '待发送资金'
},
{
confId: 37,
confName: '已发资金'
},
{
confId: 38,
confName: '资金退票'
},
{
confId: 39,
confName: '资金红冲'
}
]
const describeList = [
......@@ -226,8 +242,8 @@ const followList = [
}
]
const tableStatus = ['待提交国任', '待支付', '校验不通过', '支付成功', '支付失败', '待受理', '待定损', '定损不通过', '定损通过', '待主管审核', '主管审核不通过', '待客户签字授权', '待核赔', '核赔不通过', '核赔通过', '', '', '', '', '', '', '', '', '', '', '', '待运营经理审核', '运营经理审核通过', '运营经理审核不通过', '已失效', '已删除', '已结束案件']
const colors = ['#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#FDB757', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', '#2CCA74', '', '', '', '', '', '', '', '', '', '', '', '#FDB757', '#2CCA74', '#EB4E4E', '#999', '#999', '#999']
const tableStatus = ['待提交国任', '待支付', '校验不通过', '支付成功', '支付失败', '待受理', '待定损', '定损不通过', '定损通过', '待主管审核', '主管审核不通过', '待客户签字授权', '待核赔', '核赔不通过', '核赔通过', '', '', '', '', '', '', '', '', '', '', '', '待运营经理审核', '运营经理审核通过', '运营经理审核不通过', '已失效', '已删除', '已结束案件', '', '', '', '', '待发送资金', '已发资金', '资金退票', '资金红冲'] // 36:"待发送资金" 37:"已发资金" 38:"资金退票" 39:"资金红冲"
const colors = ['#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', ' #2CCA74', '#FDB757', '#EB4E4E', '#FDB757', '#FDB757', '#EB4E4E', '#2CCA74', '', '', '', '', '', '', '', '', '', '', '', '#FDB757', '#2CCA74', '#EB4E4E', '#999', '#999', '#999', '', '', '', '', '#FDB757', '#2CCA74', '#C6C6C6', '#EB4E4E']
// 操作对应状态
const WATCH = [5, 7, 13, 8, 9, 10, 11, 12, 14, 1, 3, 4, 26, 27, 28, 29, 30, 31] // 查看
const FOLLOW_HISTORY = [5, 6, 12, 7, 13, 8, 9, 10, 11, 2, 1, 3] //跟进记录和历史赔付
......
......@@ -106,6 +106,22 @@ const statusList = [
{
confId: 34,
confName: '定损通过'
},
{
confId: 36,
confName: '待发送资金'
},
{
confId: 37,
confName: '已发资金'
},
{
confId: 38,
confName: '资金退票'
},
{
confId: 39,
confName: '资金红冲'
}
]
export default {
......@@ -491,6 +507,22 @@ export default {
14: {
name: '核赔通过',
color: '#2CCA74'
},
36: {
name: '待发送资金',
color: '#FDB757'
},
37: {
name: '已发资金',
color: '#2CCA74'
},
38: {
name: '资金退票',
color: '#C6C6C6'
},
39: {
name: '资金红冲',
color: '#EB4E4E'
}
},
isFollowSync: false
......
......@@ -66,7 +66,7 @@
<td class="desc-td" :colspan="tableData.salePeriodData.length * 2 + 5">
<div class="desc">
<label for="">服务条款概述:</label>
<Editor :disabled="disabled" :hasTool="false" :editorOption="overviewOption" v-model="tableData.serviceOverview"></Editor>
<Editor :disabled="disabled" :editorOption="overviewOption" v-model="tableData.serviceOverview"></Editor>
</div>
</td>
</tr>
......@@ -74,7 +74,7 @@
<td class="desc-td" :colspan="tableData.salePeriodData.length * 2 + 5">
<div class="desc">
<label for="">规格详细描述:</label>
<Editor :disabled="disabled" :hasTool="false" :editorOption="DetailOption" v-model="tableData.serviceDetail"></Editor>
<Editor :disabled="disabled" :editorOption="DetailOption" v-model="tableData.serviceDetail"></Editor>
</div>
</td>
</tr>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!