Commit fc3d5fe2 by 张权

合并代码

2 parents 1222faf9 545b0f65
......@@ -2,9 +2,9 @@ import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLCombiForm from '@/components/GlCombiForm'
import GlSearch from '@/components/GlSearch'
import GlSearchItem from '@/components/GlSearchItem'
// import GLCombiForm from '@/components/GlCombiForm'
// import GlSearch from '@/components/GlSearch'
// import GlSearchItem from '@/components/GlSearchItem'
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -15,9 +15,9 @@ let instance = null
Vue.use(GLTable)
// Vue.use(Table)
// Vue.use(TableColumn)
Vue.use(GLCombiForm)
Vue.use(GlSearch)
Vue.use(GlSearchItem)
// Vue.use(GLCombiForm)
// Vue.use(GlSearch)
// Vue.use(GlSearchItem)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
request.baseURL = 'https://scrm.test.glsx.com.cn'
......
<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>
<script>
import cityList from '../../../common/city'
import cityList from '@/common/city'
export default {
name: '',
data() {
......@@ -14,6 +14,12 @@ export default {
selectedOptions: ''
}
},
props: {
isDisabled: {
type: Boolean,
default: false
}
},
methods: {
handleChange(e) {
let nodesInfo = this.$refs.cascader.getCheckedNodes()[0].pathLabels
......
<template>
<div class="report-components">
<div class="title">上传资料</div>
<glsxCombiForm class="edit-form-container" ref="materialRef" labelWidth="144px" defaultWidth="320px" :formObj="materialForm" :formData="materialData"></glsxCombiForm>
<el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
......@@ -10,7 +15,7 @@ import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: '',
components: {
glsxCombiForm
// glsxCombiForm
},
// props: {
// materialForm: Object
......
......@@ -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>
<repair ref="repairRef" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :materialForm.sync="materialForm"></material>
<el-button type="primary" size="small" @click="validAccountInfo">校验</el-button>
......@@ -28,6 +28,7 @@ export default {
reportName: '',
reportPhone: ''
},
pageType: 'add',
accountForm: {
collectOwner: 'business',
accountType: 'company',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!