|
|
@@ -5,6 +5,8 @@
|
|
|
规则详情
|
|
|
</span>
|
|
|
<div>
|
|
|
+ <el-button class="ktbuttonactive" size="small" :style="ktbuttonStyle"
|
|
|
+ @click="copyButton">协议承保规则复制</el-button>
|
|
|
<el-button class="ktbuttonactive" size="small" :style="ktbuttonStyle"
|
|
|
@click="addUnderwritingRule">添加规则</el-button>
|
|
|
<el-button class="ktbuttonactive" size="small" :style="ktbuttonStyle"
|
|
|
@@ -80,6 +82,37 @@
|
|
|
:disabled="true"></Product-Cost-Form>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="协议承保规则复制" :visible.sync="showCopyDialog" width="60%">
|
|
|
+ <div style="padding: 30px;">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="协议选择">
|
|
|
+ <el-select v-model="copyAgreementId" placeholder="请选择" size="small" @change="copyAgreementIdChange" clearable>
|
|
|
+ <el-option v-for="item in allAgreementList" :key="item.value" :label="item.agreementName + '-' + (item.businessDescription || '') + '-' + (item.jobDescription || '')" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table v-if="copyTableDataList.length" :data="copyTableDataList" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
+ <el-table-column prop="validInd" label="是否启用" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.validInd == 1 ? '启用' : '禁用' }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="rulesStartDate" label="规则起期" align="center" />
|
|
|
+ <el-table-column prop="rulesEndDate" label="规则止期" align="center" />
|
|
|
+ <el-table-column prop="ruleDescription" label="规则描述" align="center" />
|
|
|
+ <el-table-column prop="desc" label="规则因子描述" align="center" width="450" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" style="background: #EAEDF1;color: #2D4D89;"
|
|
|
+ @click="showCopyDialog = false">取 消</el-button>
|
|
|
+ <el-button size="small" style="background: #2D4D89;color: #fff;border-color: #2D4D89;" type="primary"
|
|
|
+ @click="subCopyDialog">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -161,6 +194,12 @@ export default {
|
|
|
areanumberplateList: [],
|
|
|
dynamicFormArray: [],
|
|
|
licenseAreaList: [],
|
|
|
+ showCopyDialog: false,
|
|
|
+ allAgreementList: [],
|
|
|
+ copyAgreementId: '',
|
|
|
+ copyTableDataList: [],
|
|
|
+ selectionList: [],
|
|
|
+ carClassList: [],
|
|
|
}
|
|
|
},
|
|
|
// 生命周期函数
|
|
|
@@ -173,10 +212,72 @@ export default {
|
|
|
this.$api.dict.findPage(this.operator).then(res => {
|
|
|
this.operatorlist = res.data.content;
|
|
|
})
|
|
|
+ this.getDicType('trafficManagementVehicleType') // 车辆列表
|
|
|
},
|
|
|
|
|
|
// 方法函数
|
|
|
methods: {
|
|
|
+ getDicType(type) {
|
|
|
+ this.$api.insCompany.dicType(type).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (type == 'trafficManagementVehicleType') {
|
|
|
+ let data = [];
|
|
|
+ res.data.ddList.map(val => {
|
|
|
+ data.push({
|
|
|
+ code: val.dictValue,
|
|
|
+ name: val.dictTag,
|
|
|
+ })
|
|
|
+ return val;
|
|
|
+ })
|
|
|
+ this.carClassList = data;
|
|
|
+ } else {
|
|
|
+ this[type + "options"] = res.data.ddList;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ subCopyDialog() {
|
|
|
+ if (!this.selectionList.length) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let arr = []
|
|
|
+ this.selectionList.forEach((val) => {
|
|
|
+ arr.push(val.id)
|
|
|
+ })
|
|
|
+ let data = {
|
|
|
+ ids: arr,
|
|
|
+ agreementId: this.pageRequest.agreementId,
|
|
|
+ // rulesAttrList: this.dynamicFormArray,
|
|
|
+ }
|
|
|
+ this.$api.insCompany.copyRules(data).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.showCopyDialog = false
|
|
|
+ this.underwritingRulesFindPage()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.selectionList = val
|
|
|
+ },
|
|
|
+ copyAgreementIdChange() {
|
|
|
+ this.$api.insCompany.rulesList({
|
|
|
+ agreementId: this.copyAgreementId
|
|
|
+ }).then((res) => {
|
|
|
+ this.copyTableDataList = res.content || []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 复制按钮
|
|
|
+ copyButton() {
|
|
|
+ this.showCopyDialog = true
|
|
|
+ this.$api.insCompany.newGetAllAgreement({
|
|
|
+ companyCode: this.insuranceCompanyId
|
|
|
+ }).then((res) => {
|
|
|
+ this.allAgreementList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
//承保规则历史记录详情
|
|
|
underwritingRulesHistoryDetails({ row, column }) {
|
|
|
this.$api.insCompany.undwrtRulesHistoryPageDetails(row.batch).then((res) => {
|
|
|
@@ -196,6 +297,9 @@ export default {
|
|
|
if (val.attrCode == 'LicenseArea') {
|
|
|
val.dictLabal = this.licenseAreaList;
|
|
|
}
|
|
|
+ if (val.attrCode == 'CarClass') {
|
|
|
+ val.dictLabal = this.carClassList
|
|
|
+ }
|
|
|
return val;
|
|
|
})
|
|
|
this.$nextTick(() => {
|
|
|
@@ -247,6 +351,9 @@ export default {
|
|
|
if (val.attrCode == 'LicenseArea') {
|
|
|
val.dictLabal = this.licenseAreaList;
|
|
|
}
|
|
|
+ if (val.attrCode == 'CarClass') {
|
|
|
+ val.dictLabal = this.carClassList
|
|
|
+ }
|
|
|
return val;
|
|
|
})
|
|
|
this.$nextTick(() => {
|
|
|
@@ -407,6 +514,12 @@ export default {
|
|
|
if (ele.attrName == '车牌号') {
|
|
|
ele.dictLabal = this.areanumberplateList;
|
|
|
}
|
|
|
+ if (ele.attrCode == 'LicenseArea') {
|
|
|
+ ele.dictLabal = this.licenseAreaList;
|
|
|
+ }
|
|
|
+ if (ele.attrCode == 'CarClass') {
|
|
|
+ ele.dictLabal = this.carClassList
|
|
|
+ }
|
|
|
})
|
|
|
// this.productCostForm.costsAttrLinks = data;
|
|
|
this.dynamicFormArray = data;
|