Commit 2d1b70b6 by 张权

逻辑完成

1 parent ca568a50
......@@ -305,6 +305,21 @@
.el-cascader-menu {
max-height: 250px;
}
.el-button--primary.is-plain {
color: #5850ff !important;
background-color: #fff !important;
border-color: #5850ff !important;
}
.el-button--primary.is-plain:hover {
color: #7973ff !important;
background-color: #fff !important;
border-color: #7973ff !important;
}
.el-button--primary.is-plain:active {
color: #3a32e1 !important;
background-color: #fff !important;
border-color: #3a32e1 !important;
}
// .equity-wrap table {
// width: 98%;
......

1.77 KB | W: | H:

7.21 KB | W: | H:

src/assets/images/idCard.png
src/assets/images/idCard.png
src/assets/images/idCard.png
src/assets/images/idCard.png
  • 2-up
  • Swipe
  • Onion skin

2.29 KB | W: | H:

8.24 KB | W: | H:

src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
src/assets/images/idCardBack.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -57,6 +57,7 @@
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" :disabled="item.isDisabled" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
<el-date-picker v-else-if="item.type === 'limitDatePicker'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.selectWidth || defaultWidth }" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]" @change="e => handleDateChange(e, item)" @focus="e => item.focus(e)"></el-date-picker>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
......@@ -96,7 +97,7 @@
<slot :name="item.suffixSlot" :scope="item"></slot>
</template>
<!-- 省市区 -->
<el-cascader v-else-if="item.type === 'cascader'" filterable :disabled="item.isDisabled" ref="cascader" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" placeholder="请选择省/请选择市/请选择区" size="small " :options="regionData" v-model="formObj[item.name]" @change="item.handleChange"></el-cascader>
<el-cascader v-else-if="item.type === 'cascader'" filterable :disabled="item.isDisabled" ref="cascader" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" :placeholder="item.placeholder ? item.placeholder : '请选择省/请选择市/请选择区'" size="small " :options="regionData" v-model="formObj[item.name]" @change="item.handleChange"></el-cascader>
</el-form-item>
</template>
<slot name="footer"></slot>
......@@ -193,6 +194,9 @@ export default {
item.keyFn()
}
},
handleDateChange(value, targetItem) {
targetItem.handleDateChange && targetItem.handleDateChange(value, targetItem)
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
},
......
......@@ -4,14 +4,17 @@
<div class="material">
<div class="material-item" v-for="item in materialData" :key="item.name">
<label :class="{ require: item.label }">{{ item.label }}</label>
<el-upload :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[(materialForm[item.name] ? item.limit != materialForm[item.name].length : true) ? '' : 'hidePlusBtn']" :limit="item.limit" action="#" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<el-upload :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[(materialForm[item.name] ? item.limit != materialForm[item.name].length : true) ? '' : 'hidePlusBtn', 'upload-item']" :limit="item.limit" action="#" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<!-- <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<p>上传图片</p>
</i>
</i> -->
<img v-if="item.name === 'billInfo'" slot="default" :src="upload_img" alt="" />
<img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" />
<img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" />
<el-button v-if="item.name == 'otherInfo'" slot="default" size="small" class="el-icon-plus">上传文件</el-button>
<div class="file-box" v-if="item.name == 'otherInfo'">
<div slot="tip" class="remark" v-if="item.name == 'idCard'">身份证人像面</div>
<div slot="tip" class="remark" v-if="item.name == 'idCardBack'">身份证国徽面</div>
<div slot="tip" class="file-box" v-if="item.name == 'otherInfo'">
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress
color="#F5F7FA"
......@@ -23,7 +26,7 @@
"
:percentage="imgItem.progress"
></el-progress>
<!-- <div class="file-name">name</div> -->
<i class="el-icon-delete del-img"></i>
</div>
</div>
</el-upload>
......@@ -39,27 +42,29 @@
import glsxCombiForm from '@/components/glsx-combi-form'
import idCard from '@/assets/images/idCard.png'
import idCardBack from '@/assets/images/idCardBack.png'
import upload_img from '@/assets/images/upload.png'
export default {
name: '',
components: {
// glsxCombiForm
},
// props: {
// materialForm: Object
// },
props: {
materialForm: Object
},
data() {
return {
progress: 0,
progressName: '',
idCard,
idCardBack,
upload_img,
dialogVisible: false,
materialForm: {
idCard: [],
idCardBack: [],
billInfo: [],
otherInfo: []
},
// materialForm: {
// idCard: [],
// idCardBack: [],
// billInfo: [],
// otherInfo: []
// },
materialData: [
{
label: '身份证照:',
......@@ -73,7 +78,7 @@ export default {
{
label: '发票:',
name: 'billInfo',
limit: 10
limit: 6
},
{
label: '其他:',
......@@ -118,6 +123,8 @@ export default {
this.$set(this.materialForm[fieldName][id], 'url', res)
} else {
this.handleRemove(e, fieldName, 1)
const index = this.materialForm[fieldName].findIndex(item => item.name == e.name)
this.materialForm[fieldName].splice(index, 1)
}
})
}
......@@ -129,13 +136,16 @@ export default {
this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
} else {
console.log(e, fieldName)
const index = this.materialForm[fieldName].findIndex(item => item.url == e)
setTimeout(() => {
this.materialForm[fieldName].splice(index, 1)
})
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
submitUpload() {}
}
}
}
</script>
......@@ -172,6 +182,9 @@ export default {
.material-item {
display: flex;
margin-bottom: 20px;
.upload-item {
position: relative;
}
&:nth-child(-n + 3) {
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
......@@ -185,11 +198,18 @@ export default {
height: 100%;
}
}
// 删除动画
/deep/ .el-upload-list__item {
transition: none;
margin: 0;
}
}
&:nth-child(1) {
display: inline-block;
position: relative;
padding-left: 118px;
margin-bottom: 45px;
height: 104px;
.require {
position: absolute;
left: 0;
......@@ -213,6 +233,9 @@ export default {
}
}
&:nth-child(4) {
.require {
margin-top: 9px;
}
/deep/ .el-upload {
text-align: left;
}
......@@ -220,16 +243,35 @@ export default {
display: none;
}
/deep/ .el-button:hover,
.el-button:active {
.el-button:active,
.el-button:focus {
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
}
}
.remark {
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
font-size: 14px;
color: #999;
top: 112px;
position: absolute;
}
.file-box {
margin-top: 12px;
.bar_outer {
width: 320px;
position: relative;
margin-bottom: 4px;
.del-img {
position: absolute;
right: -25px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
/deep/ .el-progress-bar__outer {
height: 26px !important;
border-radius: 4px;
......
......@@ -46,6 +46,20 @@
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
const bankAccountValid = (rule, value, callback) => {
const strBin = '10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99'
if (!value) {
return callback(new Error('收款账号不能为空'))
} else if (!Number.isInteger(+value)) {
callback(new Error('收款账号必须全为数字'))
} else if (strBin.indexOf(value.substring(0, 2)) === -1) {
callback(new Error('收款账号开头6位不符合规范'))
} else if (value.trim().length < 12 || value.trim().length > 19) {
callback(new Error('收款账号长度必须在12到19之间'))
} else {
callback()
}
}
export default {
name: 'repair',
props: {
......@@ -57,6 +71,17 @@ export default {
components: {
glsxCombiForm,
},
watch:{
'accountForm.collectOwner'(newVal, oldVal){
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal=='business'
if(newVal=='business'){
this.accountForm.accountType = 'company'
}
},
},
data() {
return {
accountData:[
......@@ -75,12 +100,25 @@ export default {
}
],
optionId: 'confId',
optionLabel: 'confName'
optionLabel: 'confName',
isHide:false
},
{
label: '开户行名称',
name: 'bankName',
type: 'input'
type: 'select',
optionList: [
{
confId:'IDCard',
confName:'身份证'
},
{
confId:'PassCard',
confName:'统一社会信息代码'
},
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '账户名称',
......@@ -90,7 +128,8 @@ export default {
{
label: '收款账号',
name: 'collectAccount',
type: 'input'
type: 'input',
maxlength:19
},
{
label: '收款账号所在省市',
......@@ -155,7 +194,7 @@ export default {
accountRule: {
bankName: [{ required: true, message: '请输入开户行名称', trigger: 'change' }],
collectName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
collectAccount: [{ required: true, message: '请输入收款账号', trigger: 'change' }],
collectAccount: [{ required: true, trigger: 'change',validator: bankAccountValid }],
collectCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
collectCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
......@@ -254,7 +293,10 @@ export default {
line-height: 20px;
}
.service-wrap {
max-width: 1250px;
display: flex;
flex-wrap: wrap;
margin-bottom: 6px;
label {
width: 115px;
height: 16px;
......@@ -266,10 +308,12 @@ export default {
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-right: 20px;
margin-bottom: 10px;
display: flex;
flex-direction: column;
.name {
flex: 1;
margin-bottom: 16px;
}
.price-wrap {
display: flex;
......@@ -279,14 +323,14 @@ export default {
white-space: nowrap;
}
/deep/ .el-input__inner {
height: 25px;
height: 32px;
}
}
}
}
}
.total-price {
margin: 16px 0 22px;
margin-bottom: 22px;
margin-left: 115px;
.price {
.sign {
......
<template>
<div class="report-components">
<div class="title">报案信息(客户提交)</div>
<glsxCombiForm class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsxCombiForm>
<glsxCombiForm class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div style="display:inline-block;" slot="syncBtn">
<el-button style="margin:0 12px;" type="primary" @click="toSearchOrderDetail">同步</el-button>
<span style="font-weight: 400; color:#666;">同步合同中以下信息,同步后的信息可手动编辑</span>
</div>
</glsxCombiForm>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
export default {
name: '',
components: {
......@@ -27,17 +34,72 @@ export default {
editRule: {
contractNo: [{ required: true, message: '请输入合同号', trigger: 'change' }],
reportDate: [{ required: true, message: '请选择报案日期', trigger: 'change' }],
reimbursementDate: [{ required: true, message: '请选择出险日期', trigger: 'change' }],
reimbursementDate: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请选择出险日期'))
} else {
if (new Date(value).getTime() > new Date(this.editForm.reportDate).getTime()) {
callback(new Error('出险日期不能大于报案日期'))
} else {
callback()
}
}
},
trigger: 'change'
}
],
reportName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
reportPhone: [{ required: true, message: '请输入报案人联系号码', trigger: 'change' }],
reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }]
reportPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入报案人联系号码'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的联系号码'))
}
},
trigger: 'change'
}
],
reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }],
detailAddress: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
}
}
},
mounted() {
this.diffKeyHandle(this.isGH)
},
watch: {
'editForm.reportDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reportDate')
}
},
'editForm.reimbursementDate'(newVal, oldVal) {
if (newVal) {
this.updateTimeLimit(newVal, 'reimbursementDate')
}
}
},
methods: {
updateTimeLimit(newVal, key) {
let limitTime = ''
// 当不是同一天,时间限制为'00:00:00 - 23:59:59',否则'00:00:00 - endTime'
let endTime = new Date().getTime()
if (util.dateFormat(endTime) === util.dateFormat(new Date(newVal))) {
limitTime = `00:00:00 - ${util.dateFormat(endTime, 'HH:mm:ss')}`
} else {
limitTime = '00:00:00 - 23:59:59'
}
const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
},
// 处理广汇嘀加不同字段显示
diffKeyHandle(showGh) {
const isDisabled = this.pageType == 2 ? true : false
......@@ -49,29 +111,43 @@ export default {
maxlength: 100,
isDisabled,
isClear: true,
inputChange: e => {
this.toSearchOrderDetail(e, showGh)
}
suffixSlot: 'syncBtn'
},
{
label: '报案日期',
name: 'reportDate',
type: 'datePicker',
type: 'limitDatePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled,
isClear: true
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
}
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'datePicker',
type: 'limitDatePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled,
isClear: true
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案人',
......@@ -100,8 +176,15 @@ export default {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.currentAddress = nodesInfo
}
},
{
label: '出险详细地址',
name: 'detailAddress',
type: 'input',
isDisabled,
isClear: true,
inputType: 'textarea'
}
]
const gh = [
......@@ -112,29 +195,43 @@ export default {
maxlength: 8,
isDisabled,
isClear: true,
inputChange: e => {
this.toSearchOrderDetail(e, showGh)
}
suffixSlot: 'syncBtn'
},
{
label: '报案日期',
name: 'reportDate',
type: 'datePicker',
type: 'limitDatePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled,
isClear: true
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
}
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'datePicker',
type: 'limitDatePicker',
dateType: 'datetime',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterTodayRangePickerOptions',
isDisabled,
isClear: true
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案人',
......@@ -164,18 +261,25 @@ export default {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.editForm.reimbursementAddress = nodesInfo.join('')
}
},
{
label: '出险详细地址',
name: 'detailAddress',
type: 'input',
isDisabled,
isClear: true,
inputType: 'textarea'
}
]
this.editFormData = showGh ? gh : dj
},
// 查询订单详情信息(嘀加:合同号,广汇:核销码)
toSearchOrderDetail(value, isGH) {
toSearchOrderDetail() {
let param = {}
param.contractNo = value
if (isGH) {
param.writeOffCode = value
param.contractNo = this.editForm.contractNo
if (this.isGH) {
param.writeOffCode = this.editForm.writeOffCode
}
console.log(param)
}
......@@ -201,5 +305,18 @@ export default {
/deep/ .el-form-item {
display: flex;
}
/deep/ #reportDate,
/deep/ #reimbursementDate {
.el-date-editor {
.el-input__inner {
padding-left: 15px;
}
.el-input__prefix {
right: 5px;
text-align: right;
left: unset;
}
}
}
}
</style>
......@@ -16,7 +16,7 @@
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn" :beforeSearchFn="beforeSearchFn"></GLCombiForm>
</div>
<div class="table_widget">
<el-button style="float:right;margin-bottom:10px;" size="small" type="primary">导出excel</el-button>
<el-button style="float:right;margin-bottom:10px;" size="small" type="primary" plain>导出excel</el-button>
<GLTable ref="equityRef" :tableData="tableData" :tableTotal="tableTotal" :pageSizes="sizeList" :searchForm="searchParams" :tableParams="tableParams" :pageConf="pageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.serviceStatus)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
......
......@@ -5,9 +5,9 @@
<repair ref="repairRef" :isGH="routeInfo.isGH" :equityList.sync="equityList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :materialForm.sync="materialForm"></material>
<div class="footer operate-btn">
<el-button size="small" type="primary">确定</el-button>
<el-button size="small">存草稿</el-button>
<el-button size="small">取消</el-button>
<el-button size="small" type="primary" @click="confirmSubmit(1)">确定</el-button>
<el-button size="small" type="primary" plain @click="confirmSubmit(2)">存草稿</el-button>
<el-button size="small" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
......@@ -33,7 +33,8 @@ export default {
reimbursementAddress: '',
reportName: '',
reportPhone: '',
writeOffCode: ''
writeOffCode: '',
detailAddress: ''
},
pageType: 1,
accountForm: {
......@@ -49,7 +50,12 @@ export default {
handlerName: '',
handlerPhone: ''
},
materialForm: {},
materialForm: {
idCard: [],
idCardBack: [],
billInfo: [],
otherInfo: []
},
equityList: [
{
name: 'huiyuan痊愈',
......@@ -66,6 +72,10 @@ export default {
{
name: '定损定损',
price: 63
},
{
name: '定损定损',
price: 63
}
]
}
......@@ -102,14 +112,29 @@ export default {
this.editForm.contractNo = contractNo
},
validAccountInfo() {
console.log(this.$refs.reportRef)
this.$refs.repairRef.$refs.accountRef.$refs.formRef.validate(valid => {
this.$refs.repairRef.$refs.handlerRef.$refs.formRef.validate(valid => {
this.$refs.reportRef.$refs.editFormRefReport.$refs.formRef.validate(valid => {
console.log(this.editForm, this.accountForm, this.$refs.repairRef.getParams())
})
let valid = false
this.$refs.repairRef.$refs.accountRef.$refs.formRef.validate(aValid => {
this.$refs.reportRef.$refs.editFormRefReport.$refs.formRef.validate(eValid => {
if (aValid && eValid) {
valid = true
}
if (this.routeInfo.isGH) {
this.$refs.repairRef.$refs.handlerRef.$refs.formRef.validate(hValid => {
valid = hValid
})
}
})
})
return valid
},
confirmSubmit(type) {
if (type == 1 && !this.validAccountInfo()) {
return false
}
console.log(this.editForm, this.accountForm, this.materialForm, this.equityList, this.totalPrice)
},
handleCancel() {
this.$router.back()
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!