|
@@ -1,52 +1,28 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="page">
|
|
<div class="page">
|
|
|
- <el-form :inline="true" :model="formInline" class="demo-form-inline" size="small" label-width="130px"
|
|
|
|
|
- style="text-align:center;">
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="车牌号">
|
|
|
|
|
- <el-input v-model="formInline.licenseNo" placeholder="请输入车牌号" class="widths"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="车架号">
|
|
|
|
|
- <el-input v-model="formInline.frameNo" placeholder="请输入车架号" class="widths"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="订单状态">
|
|
|
|
|
- <el-select v-model="formInline.orderstatus" class="widths">
|
|
|
|
|
- <el-option label="待继续" value="0"></el-option>
|
|
|
|
|
- <el-option label="已核保待缴费" value="5"></el-option>
|
|
|
|
|
- <el-option label="已承保" value="7"></el-option>
|
|
|
|
|
- <el-option label="已关闭" value="99"></el-option>
|
|
|
|
|
-
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-button type="primary" size="small">查询</el-button>
|
|
|
|
|
- <el-button type="danger" size="small" @click="dialogVisible = true">新增</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="6" style="padding: 20px;">
|
|
|
|
|
+ <el-button type="danger" size="small" @click="add()">新增</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
<el-table size="small" :data="pageResult" height="690" border style="width: 100%" v-loading="loading"
|
|
<el-table size="small" :data="pageResult" height="690" border style="width: 100%" v-loading="loading"
|
|
|
highlight-current-row stripe
|
|
highlight-current-row stripe
|
|
|
:header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
|
|
:header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
|
|
|
- <el-table-column prop="companyId" label="ID" width="300" align="center"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="companyId" label="ID" width="200" align="center"></el-table-column>
|
|
|
<el-table-column prop="namesimple" label="保险公司" width="100" align="center"></el-table-column>
|
|
<el-table-column prop="namesimple" label="保险公司" width="100" align="center"></el-table-column>
|
|
|
- <el-table-column prop="url" label="地址" align="center" width="150"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="url" label="地址" align="center" width="300"></el-table-column>
|
|
|
<el-table-column prop="isOpen" label="状态" align="center" width="200">
|
|
<el-table-column prop="isOpen" label="状态" align="center" width="200">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-tag v-if="(scope.row.isOpen == '1')">开启</el-tag>
|
|
<el-tag v-if="(scope.row.isOpen == '1')">开启</el-tag>
|
|
|
<el-tag v-if="(scope.row.isOpen == '0')">关闭</el-tag>
|
|
<el-tag v-if="(scope.row.isOpen == '0')">关闭</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="configure" label="配置参数" align="center" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column label="操作" align="center" min-width="300" fixed="right">
|
|
|
|
|
|
|
+ <el-table-column prop="configure" label="配置参数" align="center" :formatter="configureformatter"></el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="200" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button>
|
|
<el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
- <el-button size="mini" type="text" @click="empowerBtn(scope.$index, scope.row)">授权</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" type="text" style="color: #f78989;"
|
|
|
|
|
+ @click="empowerBtn(scope.$index, scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -57,8 +33,8 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
|
|
layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
<el-dialog title="续保配置新增" :visible.sync="dialogVisible" width="1000px">
|
|
<el-dialog title="续保配置新增" :visible.sync="dialogVisible" width="1000px">
|
|
|
- <el-form class="demo-ruleForm" :model="attributionform" ref="attributionform" label-width="130px" size="small"
|
|
|
|
|
- style="margin-top:30px;">
|
|
|
|
|
|
|
+ <el-form class="demo-ruleForm wrap-scrollbar scroll-style" :model="attributionform" ref="attributionform"
|
|
|
|
|
+ label-width="130px" size="small" style=" ">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
<el-form-item label="保险公司:">
|
|
<el-form-item label="保险公司:">
|
|
@@ -99,43 +75,29 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
<el-col :span="10">
|
|
|
<el-form-item label="表单类型:">
|
|
<el-form-item label="表单类型:">
|
|
|
- <!-- <el-input v-model="configureitem.type" class="widths1" placeholder="表单类型"></el-input> -->
|
|
|
|
|
<el-radio-group v-model="configureitem.type">
|
|
<el-radio-group v-model="configureitem.type">
|
|
|
- <el-radio label="input"></el-radio>
|
|
|
|
|
|
|
+ <el-radio label="text"></el-radio>
|
|
|
<el-radio label="select"></el-radio>
|
|
<el-radio label="select"></el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="是否可修改:">
|
|
<el-form-item label="是否可修改:">
|
|
|
- <el-switch v-model="updatevalue" @change="(event) => isEditchange(event, configureindex)"
|
|
|
|
|
- class="widths1"></el-switch>
|
|
|
|
|
|
|
+ <el-switch v-model="configureitem.edit"
|
|
|
|
|
+ @change="(event) => isEditchange(event, configureindex)" class="widths1"></el-switch>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="4" v-show="configureindex != 0">
|
|
|
|
|
|
|
+ <el-col :span="4" v-show="configureindex != 0 && show">
|
|
|
<el-button @click.prevent="removeDomain(configureitem)" size="small">删除</el-button>
|
|
<el-button @click.prevent="removeDomain(configureitem)" size="small">删除</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="small" @click="configuration">新增配置</el-button>
|
|
|
|
|
|
|
+ <el-button size="small" @click="configuration" v-if="show">新增配置</el-button>
|
|
|
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
<el-button size="small" type="primary" @click="submitForm('attributionform')">提 交</el-button>
|
|
<el-button size="small" type="primary" @click="submitForm('attributionform')">提 交</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <el-dialog title="归属授权" :visible.sync="empowerdialogVisible" width="50vw">
|
|
|
|
|
- <div style=" padding:20px;max-height: 500px; overflow-y: auto;">
|
|
|
|
|
- <el-input placeholder="输入关键字进行过滤" v-model="filterText" style="margin-bottom:20px;">
|
|
|
|
|
- </el-input>
|
|
|
|
|
- <el-tree class="filter-tree" :data="treedata" accordion :props="defaultProps" show-checkbox node-key="id"
|
|
|
|
|
- :filter-node-method="filterNode" ref="tree" @check="treechange">
|
|
|
|
|
- </el-tree>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button size="mini" @click="empowerdialogVisible = false">取 消</el-button>
|
|
|
|
|
- <el-button size="mini" type="primary" @click="treesubmit()">保 存</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -146,10 +108,7 @@ export default {
|
|
|
updatevalue: false,//修改开关
|
|
updatevalue: false,//修改开关
|
|
|
filterText: '',
|
|
filterText: '',
|
|
|
treedata: [],//树形数据
|
|
treedata: [],//树形数据
|
|
|
- defaultProps: {
|
|
|
|
|
- children: 'children',
|
|
|
|
|
- label: 'name'
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ show: true,
|
|
|
loading: false,//加载效果
|
|
loading: false,//加载效果
|
|
|
dialogVisible: false,//归属信息弹框
|
|
dialogVisible: false,//归属信息弹框
|
|
|
empowerdialogVisible: false,//授权弹框
|
|
empowerdialogVisible: false,//授权弹框
|
|
@@ -163,15 +122,16 @@ export default {
|
|
|
orderstatus: "",//订单状态
|
|
orderstatus: "",//订单状态
|
|
|
monthvalue: "",//日期
|
|
monthvalue: "",//日期
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
attributionform: {
|
|
attributionform: {
|
|
|
configure: [{
|
|
configure: [{
|
|
|
field: "",
|
|
field: "",
|
|
|
- isEdit: 0,
|
|
|
|
|
|
|
+ edit: false,
|
|
|
label: "",
|
|
label: "",
|
|
|
type: "",
|
|
type: "",
|
|
|
value: "",
|
|
value: "",
|
|
|
}],
|
|
}],
|
|
|
- insCompanyId: "",//保险公司id
|
|
|
|
|
|
|
+ companyId: "",//保险公司id
|
|
|
isOpen: 0,//是/否开启
|
|
isOpen: 0,//是/否开启
|
|
|
namesimple: "",//保险公司简称
|
|
namesimple: "",//保险公司简称
|
|
|
url: "",//续保请求url
|
|
url: "",//续保请求url
|
|
@@ -189,23 +149,15 @@ export default {
|
|
|
},
|
|
},
|
|
|
companyselect: [],
|
|
companyselect: [],
|
|
|
configurelist: [],
|
|
configurelist: [],
|
|
|
- treeparams: {
|
|
|
|
|
- deptIds: [],
|
|
|
|
|
- attributionId: "",
|
|
|
|
|
- insCompanyId: "",
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ id: "",
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.$api.insCompany.findPage(this.pageRequest).then((res) => {
|
|
this.$api.insCompany.findPage(this.pageRequest).then((res) => {
|
|
|
this.companyselect = res.data.content;
|
|
this.companyselect = res.data.content;
|
|
|
})
|
|
})
|
|
|
- this.$api.insCompany.queryrenewal(this.pageNum, this.pageSize).then((res) => {
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- if (res.code == '200') {
|
|
|
|
|
- this.pageResult = res.data.content;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.findpage();
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -214,7 +166,37 @@ export default {
|
|
|
this.$refs.tree.filter(val);
|
|
this.$refs.tree.filter(val);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ add() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ configure: [{
|
|
|
|
|
+ field: "",
|
|
|
|
|
+ edit: false,
|
|
|
|
|
+ label: "",
|
|
|
|
|
+ type: "",
|
|
|
|
|
+ value: "",
|
|
|
|
|
+ }],
|
|
|
|
|
+ companyId: "",//保险公司id
|
|
|
|
|
+ isOpen: 0,//是/否开启
|
|
|
|
|
+ namesimple: "",//保险公司简称
|
|
|
|
|
+ url: "",//续保请求url
|
|
|
|
|
+ }
|
|
|
|
|
+ this.attributionform = params;
|
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ //表格参数自定义内容
|
|
|
|
|
+ configureformatter(row) {
|
|
|
|
|
+ let data = JSON.stringify(row.configure)
|
|
|
|
|
+ return data;
|
|
|
|
|
+ },
|
|
|
|
|
+ findpage() {
|
|
|
|
|
+ this.$api.insCompany.queryrenewal(this.pageNum, this.pageSize).then((res) => {
|
|
|
|
|
+ if (res.code == '200') {
|
|
|
|
|
+ this.pageResult = res.data.content;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//删除事件
|
|
//删除事件
|
|
|
removeDomain(item) {
|
|
removeDomain(item) {
|
|
|
var index = this.attributionform.configure.indexOf(item)
|
|
var index = this.attributionform.configure.indexOf(item)
|
|
@@ -226,11 +208,12 @@ export default {
|
|
|
configuration() {
|
|
configuration() {
|
|
|
this.attributionform.configure.push({
|
|
this.attributionform.configure.push({
|
|
|
field: "",
|
|
field: "",
|
|
|
- isEdit: 0,
|
|
|
|
|
|
|
+ edit: false,
|
|
|
label: "",
|
|
label: "",
|
|
|
type: "",
|
|
type: "",
|
|
|
value: "",
|
|
value: "",
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//开启开关事件
|
|
//开启开关事件
|
|
|
isOpenchange(val) {
|
|
isOpenchange(val) {
|
|
@@ -242,12 +225,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
//修改开关事件
|
|
//修改开关事件
|
|
|
isEditchange(val, id) {
|
|
isEditchange(val, id) {
|
|
|
- if (val) {
|
|
|
|
|
- this.attributionform.configure[id].isEdit = 1;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.attributionform.configure[id].isEdit = 0;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.attributionform.configure[id].edit = val;
|
|
|
},
|
|
},
|
|
|
//获取选中节点
|
|
//获取选中节点
|
|
|
treechange(data, node) {
|
|
treechange(data, node) {
|
|
@@ -265,23 +243,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
//选择保险公司获取归属模板
|
|
//选择保险公司获取归属模板
|
|
|
companyChange(e) {
|
|
companyChange(e) {
|
|
|
- console.log(e)
|
|
|
|
|
- // this.$api.insCompany.attributionTemplate(e).then((res) => {
|
|
|
|
|
- // if (res.data) {
|
|
|
|
|
- // this.configurelist = JSON.parse(res.data.configure);
|
|
|
|
|
- // this.configurelist.map((ele, index) => {
|
|
|
|
|
- // this.attributionform.configure.push({
|
|
|
|
|
- // field: ele.field,
|
|
|
|
|
- // isEdit: ele.isEdit,
|
|
|
|
|
- // label: ele.label,
|
|
|
|
|
- // type: ele.type,
|
|
|
|
|
- // value: "",
|
|
|
|
|
- // });
|
|
|
|
|
- // })
|
|
|
|
|
- // } else {
|
|
|
|
|
- // this.$message({ message: "暂无信息", type: "warning" });
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
},
|
|
},
|
|
|
//提交授权
|
|
//提交授权
|
|
|
treesubmit() {
|
|
treesubmit() {
|
|
@@ -293,36 +254,62 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- this.$message({ message: "未选择归属机构", type: "warning" }); attribution
|
|
|
|
|
|
|
+ this.$message({ message: "未选择归属机构", type: "warning" });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//提交表单
|
|
//提交表单
|
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- console.log(this.attributionform)
|
|
|
|
|
|
|
+ if (this.id) {
|
|
|
|
|
+
|
|
|
|
|
+ this.$api.insCompany.qudaterenewal(this.id, this.attributionform).then(res => {
|
|
|
|
|
+ if (res.code = "200") {
|
|
|
|
|
+ this.$message({ message: "修改成功", type: "success" });
|
|
|
|
|
+ this.findpage();
|
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$api.insCompany.addrenewal(this.attributionform).then(res => {
|
|
|
|
|
+ if (res.code == '200') {
|
|
|
|
|
+ this.$message({ message: "新增成功", type: "success" });
|
|
|
|
|
+ this.findpage();
|
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({ message: res.msg, type: "success" });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- //授权操作
|
|
|
|
|
|
|
+ //删除操作
|
|
|
empowerBtn(index, row) {
|
|
empowerBtn(index, row) {
|
|
|
- this.empowerdialogVisible = true;
|
|
|
|
|
- this.treeparams.attributionId = row.id;
|
|
|
|
|
- this.treeparams.insCompanyId = row.insCompanyId;
|
|
|
|
|
|
|
+ this.$api.insCompany.deleterenewal(row.id).then(res => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ if (res.code == '200') {
|
|
|
|
|
+ this.findpage();
|
|
|
|
|
+ this.$message({ message: res.msg, type: "success" });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//编辑操作
|
|
//编辑操作
|
|
|
CloseEdit(index, row) {
|
|
CloseEdit(index, row) {
|
|
|
- let fileslist = JSON.parse(row.configure);
|
|
|
|
|
- this.attributionform = {
|
|
|
|
|
- configure: fileslist,
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- insCompanyId: row.insCompanyId,
|
|
|
|
|
- password: row.password,
|
|
|
|
|
- username: row.username,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ this.show = false,
|
|
|
|
|
+ this.attributionform = row;
|
|
|
|
|
+ this.id = row.id;
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
|
|
+ if (row.isOpen == 1) {
|
|
|
|
|
+ this.switchvalue = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.switchvalue = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
// 设置每页条数
|
|
// 设置每页条数
|
|
|
applyhandleSizeChange(val) {
|
|
applyhandleSizeChange(val) {
|
|
@@ -342,14 +329,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
-<style>
|
|
|
|
|
-.saomazhifucodeClass .el-dialog__body,
|
|
|
|
|
-.saomazhifucodeClass .el-dialog__header {
|
|
|
|
|
- padding: 0;
|
|
|
|
|
-}
|
|
|
|
|
-</style>
|
|
|
|
|
-<style scoped>
|
|
|
|
|
|
|
+<style scoped >
|
|
|
.widths1 {
|
|
.widths1 {
|
|
|
width: 250px;
|
|
width: 250px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.scroll-style {
|
|
|
|
|
+ margin-top: 30px;
|
|
|
|
|
+ height: 400px;
|
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|