Commit 545b0f65 by 杨北旺

完善理赔业务逻辑

1 parent 627da615
<template>
<div class="city-select-components">
<el-cascader ref="cascader" style="width:320px" placeholder="请选择省/请选择市/请选择区" size="small " :options="regionData" v-model="selectedOptions" @change="handleChange"></el-cascader>
<el-cascader :disabled="isDisabled" ref="cascader" style="width:320px" placeholder="请选择省/请选择市/请选择区" size="small " :options="regionData" v-model="selectedOptions" @change="handleChange"></el-cascader>
</div>
</template>
......@@ -14,6 +14,12 @@ export default {
selectedOptions: ''
}
},
props: {
isDisabled: {
type: Boolean,
default: false
}
},
methods: {
handleChange(e) {
let nodesInfo = this.$refs.cascader.getCheckedNodes()[0].pathLabels
......
......@@ -3,7 +3,7 @@
<div class="title">报案信息(客户提交)</div>
<glsxCombiForm class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" formRef="editRefReport" :formObj="editForm" :formData="editFormData">
<template slot="citySelect">
<city-select @onChange="selectAddress"></city-select>
<city-select :isDisabled="pageType == 'add' ? false : true" @onChange="selectAddress"></city-select>
</template>
</glsxCombiForm>
</div>
......@@ -19,16 +19,45 @@ export default {
'city-select': citySelect
},
props: {
editForm: Object
editForm: Object,
pageType: {
type: String,
default: 'add' //add为新增 look为查看加编辑
}
},
data() {
return {
editFormData: [
editFormData: [],
showGh: false
}
},
created() {
this.diffHost()
},
methods: {
selectAddress(e) {
this.editForm.reimbursementAddress = e.label.join('')
},
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
if (href.indexOf('cgacar') != -1) {
this.showGh = true
} else {
this.showGh = false
}
this.diffKeyHandle(this.showGh)
},
// 处理广汇嘀加不同字段显示
diffKeyHandle(showGh) {
const isDisabled = this.pageType == 'add' ? false : true
const dj = [
{
label: '合同号',
name: 'contractNo',
type: 'input',
maxlength: 100
maxlength: 100,
isDisabled
},
{
label: '报案日期',
......@@ -36,7 +65,8 @@ export default {
type: 'datePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions'
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled
},
{
label: '出险日期',
......@@ -44,31 +74,78 @@ export default {
type: 'datePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions'
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled
},
{
label: '出险地点',
name: 'reimbursementAddress',
addHtml: 'citySelect'
addHtml: 'citySelect',
isDisabled
},
{
label: '报案人',
name: 'reportName',
type: 'input',
maxlength: 100
maxlength: 100,
isDisabled
},
{
label: '报案人联系号码',
name: 'reportPhone',
type: 'input',
maxlength: 11
maxlength: 11,
isDisabled
}
]
}
},
methods: {
selectAddress(e) {
this.editForm.reimbursementAddress = e.label.join('')
const gh = [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled
},
{
label: '报案日期',
name: 'reportDate',
type: 'datePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'datePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled
},
{
label: '出险地点',
name: 'reimbursementAddress',
addHtml: 'citySelect',
isDisabled
},
{
label: '报案人',
name: 'reportName',
type: 'input',
maxlength: 100,
isDisabled
},
{
label: '报案人联系号码',
name: 'reportPhone',
type: 'input',
maxlength: 11,
isDisabled
}
]
this.editFormData = showGh ? gh : dj
}
}
}
......
<!-- 权益订单 -->
<template>
<div class="app">
<report :editForm.sync="editForm"></report>
<report :pageType="pageType" :editForm.sync="editForm"></report>
</div>
</template>
<script>
......@@ -20,7 +20,8 @@ export default {
reimbursementAddress: '',
reportName: '',
reportPhone: ''
}
},
pageType: 'add'
}
},
created() {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!