Commit 2ba162dd by 前端

Merge branch 'master' into 'develop'

Master  ---->   develop

See merge request !8
2 parents 3fabb2d6 afedd65c
......@@ -31,7 +31,7 @@ export default {
}
// #app {
// background: #f4f5fa;
// padding: 0px 20px 20px 40px;
// padding: 0px 20px 20px 20px !important;
// position: absolute;
// box-sizing: border-box;
// width: 100%;
......
import { http } from '@/main'
const defaultPath = 'scrm.api.equity.'
const getWorryBatcnList = params => {
params.method = `${defaultPath}service.cfcb.pagination.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
})
params.method = `${defaultPath}service.cfcb.pagination.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
const addCards = params => {
params.method = `${defaultPath}service.cfcb.create`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll:true
})
params.method = `${defaultPath}service.cfcb.create`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
const downLoads = params => {
params.method = `${defaultPath}service.cfcb.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
})
params.method = `${defaultPath}service.cfcb.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
export default {
getWorryBatcnList,
addCards,
downLoads
getWorryBatcnList,
addCards,
downLoads
}
import { http, http_brand } from '@/main'
const defaultPath = 'scrm.api.equity.service.package.'
const orderPath = 'scrm.api.equity.service.order.'
/*获取核赔列表*/
const getclaimsList = params => {
params.method = 'scrm.api.equity.service.claims.operate.list'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单状态统计
const getclaimsCount = params => {
params.method = 'scrm.api.equity.service.claims.operate.list.count'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//重新提交核赔订单
const resubmitOrder = params => {
params.method = 'scrm.api.equity.service.claims.operate.resubmit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 核赔订单提交或草稿
const commitClaimsOrder = params => {
params.method = 'scrm.api.equity.service.claims.operate.draft.or.commit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取核赔订单详情
const getClaimsDetail = params => {
params.method = 'scrm.api.equity.service.claims.operate.detail'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出核赔列表
const exportClaimsData = params => {
params.method = 'scrm.api.equity.service.claims.operate.list.export'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验核赔权益订单合同号
const checkContractNo = params => {
params.method = 'scrm.api.equity.service.claims.operate.contract.verify'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验核赔权益订单合同号
const getDetailByWOCode = params => {
params.method = 'scrm.api.equity.service.claims.create.before.init'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取开户行和证件类型列表
const getBankList = params => {
params.method = 'scrm.api.equity.service.claims.payee.select'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取省市区
const getCityList = params => {
params.method = 'scrm.api.equity.service.claims.area'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取收款账号
const getAccountInfo = params => {
params.method = 'scrm.api.equity.service.claims.merchant.account'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
......@@ -42,5 +42,30 @@ const getZoneList = params => {
sign: true
})
}
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadFileApi = (params, callback) => {
params.method = 'scrm.api.equity.common.upload.common.multiple'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file'],
returnAll: true,
onUploadProgress: res => {
callback(res)
}
})
}
export { getGoodsList, uploadImg, getMerchantList, getZoneList }
export default { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload, uploadFileApi }
......@@ -269,14 +269,17 @@ const updateOrderApi = params => {
})
}
const uploadImgApi = params => {
const uploadImgApi = (params, callback) => {
params.method = 'scrm.api.equity.common.upload.image'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
noSignAttr: ['file'],
onUploadProgress: res => {
callback(res)
}
})
}
......@@ -304,4 +307,4 @@ const aduitOrderApi = params => {
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi }
\ No newline at end of file
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi }
$theme_color: #5850FF;
$theme_bg_color: #5850FF;
\ No newline at end of file
$theme_color: #5850ff;
$theme_bg_color: #5850ff;
......@@ -7,7 +7,7 @@
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
background-color: rgba(144, 147, 153, 0.3);
}
.h1_title {
......@@ -44,7 +44,7 @@
.h6_title {
font-size: 16px;
font-weight: 500;
color: #3A3A3A;
color: #3a3a3a;
}
.h7_title {
......@@ -56,7 +56,7 @@
.h8_title {
font-size: 24px;
font-weight: 600;
color: #3A3A3A;
color: #3a3a3a;
}
.h9_title {
......@@ -68,7 +68,7 @@
.h10_title {
font-size: 12px;
font-weight: 400;
color: #3A3A3A;
color: #3a3a3a;
}
.h11_title {
......@@ -92,19 +92,19 @@
.h14_title {
font-size: 14px;
font-weight: 400;
color: #37383A;
color: #37383a;
}
.h15_title {
font-size: 14px;
font-weight: 500;
color: #5850FF;
color: #5850ff;
}
.h16_title {
font-size: 12px;
font-weight: 500;
color: #5850FF;
color: #5850ff;
}
.h17_title {
......@@ -162,19 +162,19 @@
}
.equity-wrap .contain {
background: #FFFFFF;
margin: 0 20px 20px 40px;
padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
background: #ffffff;
margin: 0 0 20px 0;
padding: 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
}
.equity-wrap .contain .el-table__empty-text{
.equity-wrap .contain .el-table__empty-text {
display: inline-block;
width: 64px;
height: 41px;
}
.fr-mr0 {
float: right;
margin-right: 0px!important;
float: right;
margin-right: 0px !important;
}
// 单行省略
.ellipsis-1 {
......@@ -184,7 +184,7 @@
-o-text-overflow: ellipsis;
/* for Opera */
}
.mb10{
.mb10 {
margin-bottom: 10px;
}
// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
......@@ -200,7 +200,7 @@
}
.ellipsis-2-text:after {
content: "...";
content: '...';
position: absolute;
bottom: 0;
right: 15px;
......@@ -211,13 +211,13 @@
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(to right, transparent, #fff 55%);
}
.el-scrollbar__bar.is-horizontal{
height: 10px !important;
left: 10px;
.el-scrollbar__bar.is-horizontal {
height: 10px !important;
left: 10px;
}
.base-container-right .el-main-scroll .el-scrollbar__thumb {
background-color: rgba(144, 147, 153, 0.5) !important;
background-color: rgba(144, 147, 153, 0.5) !important;
}
.equity-wrap .el-table .cell {
......@@ -226,8 +226,8 @@
.equity-wrap .table-btns .el-button {
padding: 0 0 0 5px;
margin-left: 5px;
border-left: 1px solid #DCDFE6;
margin-left: 5px;
border-left: 1px solid #dcdfe6;
border-radius: 0;
}
......@@ -252,7 +252,7 @@
height: 64px;
text-align: center;
line-height: 64px;
background: #FFFFFF;
background: #ffffff;
z-index: 999;
}
......@@ -267,7 +267,7 @@
height: 48px;
line-height: 48px;
// color: #0947C6;
border-bottom: 1px solid #E7EAEC;
border-bottom: 1px solid #e7eaec;
// padding-left: 20px;
margin: 0 0;
}
......@@ -280,7 +280,7 @@
width: 4px;
top: 2px;
left: 0;
background-color: #0947C6;
background-color: #0947c6;
}
.equity-wrap .edit-sub-title {
......@@ -291,6 +291,46 @@
margin: 0 0 30px 0;
padding-left: 8px;
}
// .app {
// background: #f4f5fa;
// padding: 0px 0 20px 0;
// position: absolute;
// box-sizing: border-box;
// width: 100%;
// top: 0px;
// left: 0px;
// overflow-y: auto;
// height: 100%;
// }
.el-cascader-menu {
max-height: 250px;
}
.primary_plain_btn {
.el-button--primary.is-plain {
color: #5850ff;
background-color: #fff;
border-color: #5850ff;
}
.el-button--primary.is-plain:hover {
color: #7973ff;
background-color: #fff;
border-color: #7973ff;
}
.el-button--primary.is-plain:active {
color: #3a32e1;
background-color: #fff;
border-color: #3a32e1;
}
}
.el-loading-mask {
.el-loading-spinner {
.el-icon-loading,
.el-loading-text {
color: #5850ff;
}
}
}
// .equity-wrap table {
// width: 98%;
......@@ -318,4 +358,4 @@
// .equity-wrap table td {
// min-width: 50px;
// }
\ No newline at end of file
// }
This diff could not be displayed because it is too large.
import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLCombiForm.install = function(Vue) {
Vue.component(GLCombiForm.name, GLCombiForm)
}
// 默认导出组件
export default GLCombiForm
\ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<!-- 搜索 -->
<template>
<div class="glsx-combi-formwrap">
<div class="glsx-combi-form">
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :style="{ ...item.style }" :prop="item.name">
<GLSearchItem>
<div slot="name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}:
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: '112px', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}:</span>
</span>
<!-- // select 组件 作为label -->
<div v-if="item.type === 'selectInput'" id="selectlabel">
<el-select v-model="searchSelectObj[item.selectName].attr" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</div>
</div>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- 选择-输入框 -->
<el-input class="select-inp" v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false">
<!-- <el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select> -->
</el-input>
<!-- 选择-时间选择框 -->
<!-- <template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
</template> -->
<!-- 双选择框 -->
<!-- <template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
<el-select v-model="searchSelectObj[item.selectName].value" :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label">
<el-option label="全部" value=""></el-option>
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]"></el-option>
</el-select>
</template> -->
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-bind="item.datePickerAttrs ? item.datePickerAttrs : {}" v-on="item.datePickerListeners ? item.datePickerListeners : {}" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
</GLSearchItem>
</el-form-item>
</template>
<slot name="footer"></slot>
</el-form>
</GLSearch>
</div>
</div>
</template>
<script>
import GLSearch from '../../GlSearch'
import GLSearchItem from '../../GlSearchItem'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default {
name: 'GLCombiForm',
data() {
return {
pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions
},
isImgVisible: false,
dialogObj: {
url: '',
uploadType: 'img'
}
}
},
props: {
isBlock: {
type: Boolean,
default: false
},
// defaultWidth: {
// type: String,
// default: '215px'
// },
formRef: {
type: String,
default: 'formRef'
},
isEdit: {
type: Boolean,
default: false
},
// labelWidth: {
// type: Number,
// // 默认是四个字符长度
// default: 56
// },
labelPaddingRight: {
type: Number,
default: 0
},
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
},
hasTitle: {
type: Boolean,
default: true
},
formRules: {
type: Object,
default: () => {}
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
}
},
mounted() {},
components: {
GLSearch,
GLSearchItem
},
methods: {
//gl-search 方法
handleOkFn() {
this.$emit('handleOk')
},
handleRestFn() {
this.$emit('handleRest')
},
// 选择框-添加其他属性
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
}
}
}
</script>
<style lang="scss">
.glsx-combi-formwrap {
/* .glsx-combi-form {
min-width: 922px;
} */
.glsx-combi-form .glsx-combi-form-block {
width: 100%;
}
.glsx-combi-form .isBlock {
display: block !important;
}
/* .glsx-combi-form .el-form-item {
width: 65%;
} */
@media screen and (max-width: 1062px) {
.glsx-combi-form .el-form-item--small {
width: 100%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1062px) and (max-width: 1440px) {
.glsx-combi-form .el-form-item--small {
width: 50%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1440px) and (max-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 33.33%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
@media screen and (min-width: 1720px) {
.glsx-combi-form .el-form-item--small {
width: 25%;
}
.glsx-combi-form .el-form-item--small .el-form-item__content {
width: 100%;
}
.search-list {
width: 100%;
}
}
// .glsx-combi-form .el-form-item--small {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item {
// width: 100%;
// }
// .glsx-combi-form .el-form-item--small .el-form-item__content .search-item .el-input {
// width: 100%;
// }
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px);
} */
.glsx-combi-form .el-col {
margin-bottom: 10px;
}
.glsx-combi-form .el-select {
width: 100%;
}
.glsx-combi-form .item-height {
height: 37px;
}
.glsx-combi-form input::-webkit-outer-spin-button,
.glsx-combi-form input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.glsx-combi-form input[type='number'] {
-moz-appearance: textfield !important;
}
.glsx-combi-form .input-with-select .el-input-group__prepend {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
position: relative;
}
.glsx-combi-form .tips-label {
margin-right: 20px;
}
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
top: 3px;
right: 14px;
margin-right: 4px;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
height: 8px;
top: -8px;
left: 1px;
font-size: 10px;
}
/* .glsx-combi-form .tips {
margin: 0;
} */
.glsx-combi-form .combi-form-label {
display: inline-block;
box-sizing: border-box;
}
/* 图片上传 */
.glsx-combi-form .photo-top-tips {
/* height: 36px; */
margin: 0 0;
color: #999999;
}
.glsx-combi-form .img-w-h {
width: 80px;
height: 80px;
}
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
}
.glsx-combi-form .activity-Input {
position: absolute;
top: 0;
left: 0;
}
.glsx-combi-form .muti-imgs {
display: inline-block;
position: relative;
}
.activity-img .add {
position: absolute;
top: 40%;
font-size: 40px;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
.activity-img .number {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
#selectlabel {
.el-select {
width: 100% !important;
.el-input__inner {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
}
}
.select-inp {
.el-input__inner {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
}
.muti-imgs .img-btns {
display: none;
height: 100%;
position: absolute;
width: 80px;
height: 80px;
left: 0;
top: 0;
z-index: 2;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
.glsx-combi-form .el-icon-delete,
.glsx-combi-form .el-icon-zoom-in {
cursor: pointer;
}
.muti-imgs .img-btns .btn-item {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.muti-imgs .img-btns .btn-item {
display: flex;
width: 70%;
justify-content: space-around;
}
.muti-imgs:hover .img-btns {
display: block;
}
.glsx-combi-form .dialog-img {
width: 100%;
height: 100%;
}
.glsx-combi-form .dialog-look {
text-align: center;
}
.glsx-combi-form .dialog-video {
width: 50%;
height: 50%;
}
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #e8e8ea;
}
}
</style>
import GLSearch from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearch.install = function(Vue) {
Vue.component(GLSearch.name, GLSearch)
}
// 默认导出组件
export default GLSearch
\ No newline at end of file
<!-- <content> -->
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1: true,
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
},
//gl-search 方法
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```vue
<template>
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
</template>
<script>
import {GLSearch, GLSearchItem} from 'glsx-components'
// 全局引入一次css即可
import 'glsx-components/dist/glsx-components.css'
export default {
data() {
return {
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
</script>
```
</div>
<!-- </content> -->
<template>
<div class="gl-search" id="gl-search" :class="{ transTo: !expand }">
<div class="search-list">
<!-- 默认插槽 -->
<slot></slot>
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
</div>
<div class="gl-operate">
<div class="operate">
<el-button size="small" type="primary" @click="handleOk">查询</el-button>
<el-button size="small" @click="handleRest">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i>
</el-button>
<!-- <i class="el-icon-arrow-down expand"></i> -->
<!-- <i class="el-icon-arrow-up"></i> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GLSearch',
props: {},
data() {
return {
// input: '',
expand: false,
itemNum: 0,
time: null,
hasExpand: false
}
},
created() {},
mounted() {
this.getItemNum()
// 判断宽度按,是否显示展开收起
this.getClientWith()
window.addEventListener('resize', this.getClientWith, false)
},
computed: {
classIcon() {
return !this.expand ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
}
},
methods: {
// 展开收起
expandFn() {
this.expand = !this.expand
},
// 获取item 输入框 的个数
getItemNum() {
const items = document.getElementById('gl-search').getElementsByClassName('search-item').length
this.itemNum = items
},
// 判断是否有展开收起标志
ifHasExpand(nowCol) {
if (this.itemNum > nowCol) {
return true
}
return false
},
// 监听函数
getClientWith() {
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
const clientWidth = document.documentElement.clientWidth
// console.log('clientWidth: ', clientWidth)
if (clientWidth <= 800) {
// 1列
this.hasExpand = this.ifHasExpand(1)
} else if (clientWidth <= 1440 && clientWidth > 800) {
// 2列
this.hasExpand = this.ifHasExpand(2)
} else if (clientWidth <= 1720 && clientWidth > 1440) {
// 3列
this.hasExpand = this.ifHasExpand(3)
} else {
// 4列
this.hasExpand = this.ifHasExpand(4)
}
}, 300)
},
handleOk() {
// 点击确定的回调
this.$emit('onOk')
},
handleRest() {
// 点击重置的回调
this.$emit('onRest')
}
},
components: {},
watch: {},
beforeDestroy() {
window.removeEventListener('resize', this.getClientWith, false)
this.time = null
}
}
</script>
<style lang="scss">
.gl-search {
&.transTo {
height: 52px;
}
display: flex;
justify-content: space-between;
overflow: hidden;
// @media screen and (max-width: 1062px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1062px) and (max-width: 1440px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
.search-list {
.search-item {
width: 100%;
}
}
.search-list {
flex: 1;
display: flex;
flex-wrap: wrap;
.search-item {
// flex: 1;
// padding-right: 12px;
margin-bottom: 20px;
min-width: 276px;
display: flex;
align-items: center;
box-sizing: border-box;
.name {
width: 112px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #666;
}
.input {
flex: 1;
// width:100%;
}
.el-input {
width: 100%;
}
.el-select {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
}
.gl-operate {
display: flex;
align-items: flex-end;
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
.expand {
font-size: 14px;
}
.el-button + .el-button {
margin-left: 8px;
}
}
}
}
</style>
import GLSearchItem from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearchItem.install = function(Vue) {
Vue.component(GLSearchItem.name, GLSearchItem)
}
// 默认导出组件
export default GLSearchItem
\ No newline at end of file
<template>
<div :style="{ 'padding-right': spacer + 'px' }" class="search-item">
<div class="name">
<!-- {{ label }} -->
<!-- name 插槽 -->
<slot name="name"></slot>
</div>
<div class="input">
<!-- 默认插槽 -->
<slot></slot>
<!-- <el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input> -->
</div>
</div>
</template>
<script>
export default {
name: 'GLSearchItem',
props: {
// 每个项间隙
spacer: {
type: Number,
default: 12
}
},
data () {
return {}
},
created () {},
mounted () {},
computed: {},
methods: {},
components: {},
watch: {}
}
</script>
......@@ -3,7 +3,7 @@
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px': '30px', ...item.style }" :label="item.label" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......@@ -12,11 +12,11 @@
{{ item.label }}
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? (item.labelWidth + labelPaddingRight) + 'px' : '', 'padding-right': isEdit ? '12px' : (labelPaddingRight + 'px') }">{{ item.label }}</span>
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)" >
<el-input @change="item.inputChange" :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
......@@ -24,7 +24,7 @@
</div>
<!-- 选择-输入框 -->
<el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || labelWidth + 'px' }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</el-input>
......@@ -47,7 +47,7 @@
</template> -->
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
......@@ -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 }">
......@@ -95,6 +96,8 @@
</template>
<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="item.placeholder || '请选择省/请选择市/请选择区'" size="small " :options="regionData" v-model="formObj[item.name]" @change="item.handleChange"></el-cascader>
</el-form-item>
</template>
<slot name="footer"></slot>
......@@ -102,7 +105,7 @@
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible">
<div class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4">
<source :src="dialogObj.url" type="video/mp4" />
</video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</div>
......@@ -112,6 +115,7 @@
<script>
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
import cityList from '../../common/city'
export default {
name: 'glsx-combi-form',
data() {
......@@ -129,6 +133,10 @@ export default {
},
props: {
regionData: {
type: Array,
default: cityList
},
isBlock: {
type: Boolean,
default: false
......@@ -189,6 +197,9 @@ export default {
item.keyFn()
}
},
handleDateChange(value, targetItem) {
targetItem.handleDateChange && targetItem.handleDateChange(value, targetItem)
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
},
......@@ -353,7 +364,7 @@ export default {
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #F7F7F7;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
}
......@@ -433,16 +444,16 @@ export default {
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #E8E8EA;
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
background-color: #e8e8ea;
}
</style>
const staticRoutes = Object.freeze([{
const staticRoutes = Object.freeze([
{
name: 'beforeSale',
path: '/beforeSale/index',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
......@@ -64,7 +65,7 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/beforeSale/serviceSet.vue`], resolve),
meta: {}
},
{
{
name: 'editEquity',
path: '/beforeSale/editEquity',
component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve),
......@@ -76,5 +77,29 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/beforeSale/introduct.vue`], resolve),
meta: {}
},
{
name: 'claims',
path: '/claims/index',
component: resolve => require([`@/views/claims/index.vue`], resolve),
meta: {}
},
{
name: 'order',
path: '/claims/order/:id',
component: resolve => require([`@/views/claims/order.vue`], resolve),
meta: {}
},
{
name: 'ghIndex',
path: '/claims/ghIndex',
component: resolve => require([`@/views/claims/ghIndex.vue`], resolve),
meta: {}
},
{
name: 'ghOrder',
path: '/claims/ghOrder/:id',
component: resolve => require([`@/views/claims/ghOrder.vue`], resolve),
meta: {}
}
])
export default staticRoutes
\ No newline at end of file
export default staticRoutes
......@@ -2,6 +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 { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -12,10 +15,15 @@ let instance = null
Vue.use(GLTable)
// Vue.use(Table)
// Vue.use(TableColumn)
// 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'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
// request.baseURL = 'http://192.168.1.165:7226'
// request_brand.baseURL = 'http://192.168.1.165:7226'
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -25,8 +33,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-ed5f1cfe-aaa2-46fb-b312-6ea45a8c5866-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-ed5f1cfe-aaa2-46fb-b312-6ea45a8c5866-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-9ff7f674-bf61-4ca5-ae43-6c493ac13f31-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-27c02d95-51f9-4576-86a9-70ba0f4d76e4-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '781f08c5-c443-46fd-80e1-f98d94673a73' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
......@@ -51,4 +59,4 @@ function subscribe({ messenger }) {
messenger.subscribe(v => {
// console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
}
......@@ -249,7 +249,6 @@ export default {
<style lang="scss" scoped>
.equity-wrap {
padding-right: 20px;
}
.addGood {
margin-bottom: 20px;
......
<template>
<div class="equity-wrap">
<el-button type="primary" icon="el-icon-plus" size="small" @click="showDialog('add')" style="margin-left: 40px"><span style="margin-left: 5px">新增特别约定</span></el-button>
<el-button type="primary" icon="el-icon-plus" size="small" @click="showDialog('add')"><span style="margin-left: 5px">新增特别约定</span></el-button>
<div class="equity-wrap contain" style="margin-top: 10px">
<el-form :inline="true" label-width="auto" label-position="right" class="selectForm">
<el-row style="align-items: center">
......
<!-- 编辑权益 -->
<template>
<div class="app">
<div class="before-sale edit-equity">
<!-- 车辆信息 -->
<div class="container">
......@@ -213,7 +212,6 @@
<!-- 二维码 -->
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="提单及服务咨询" :codeUrl="qrcodUrl"></qrCode>
</div>
</div>
</template>
<script>
......
<!-- 权益订单列表 -->
<template>
<div class="app">
<div class="before-sale">
<div class="flex m-b-10">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
<!-- <GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton> -->
<!-- <div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> -->
<div class="before-sale">
<div class="flex m-b-10">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
<!-- <GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton> -->
<!-- <div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> -->
</div>
<div class="container">
<div class="find_wrap">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<span slot="footer" class="footer-btns">
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
<div class="container">
<div class="find_wrap">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<span slot="footer" class="footer-btns">
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<div class="table_wrapper">
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> -->
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2].includes(scope.scope.orderStatus)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
</div>
</GLTable>
</div>
<!-- 表格区域 end -->
<div class="table_wrapper">
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> -->
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2].includes(scope.scope.orderStatus)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
</div>
</GLTable>
</div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
<!-- <glsx-dialog title="上传资料" :isVisible.sync="isFileVisible" width="547px" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose">
<!-- 表格区域 end -->
</div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
<!-- <glsx-dialog title="上传资料" :isVisible.sync="isFileVisible" width="547px" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose">
<div style="height: 284px; overflow-y: scroll">
<glsx-combi-form labelWidth="300px" :isBlock="isBlock" ref="uploadFormRef" formRef="uploadChildRef" :formRules="uploadRule" :formObj.sync="uploadForm" :formData="uploadFormData"></glsx-combi-form>
</div>
</glsx-dialog> -->
<el-dialog :visible.sync="isTipVisible" width="400px" class="tips-dialog" top="30%" title="提示">
<div class="f-size">
<i v-show="editNotify.code == '0'" class="el-icon-success"></i>
<i v-show="editNotify.code != '0'" class="el-icon-error"></i>
<span>{{ editNotify.code == '0' ? '操作成功' : editNotify.message }}</span>
</div>
</el-dialog>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="30%" :title="secondObj.title">
<div class="f-size">
<i class="el-icon-warning"></i>
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button :size="size" @click="handleSecondCancel">取 消</el-button>
<el-button :size="size" type="primary" @click="handleSecondConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
<el-dialog :visible.sync="isTipVisible" width="400px" class="tips-dialog" top="30%" title="提示">
<div class="f-size">
<i v-show="editNotify.code == '0'" class="el-icon-success"></i>
<i v-show="editNotify.code != '0'" class="el-icon-error"></i>
<span>{{ editNotify.code == '0' ? '操作成功' : editNotify.message }}</span>
</div>
</el-dialog>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="30%" :title="secondObj.title">
<div class="f-size">
<i class="el-icon-warning"></i>
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button :size="size" @click="handleSecondCancel">取 消</el-button>
<el-button :size="size" type="primary" @click="handleSecondConfirm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -183,7 +181,7 @@ export default {
isClear: true
}
],
searchFormData3: [
searchFormData3: [
{
label: '总部',
name: 'merchantId',
......@@ -198,7 +196,7 @@ export default {
this.searchFormData3[idx].isHide = false
this.searchForm[this.levelToShow['2']] = ''
var tempIdx = ''
for(var i = 3; i <= 4; i++) {
for (var i = 3; i <= 4; i++) {
tempIdx = this.searchFormData3.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData3[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = ''
......@@ -522,7 +520,7 @@ export default {
dqList: [],
pqList: [],
mdList: [],
orderStatusList: [
orderStatusList: [
{
confId: 0,
confName: '待提单'
......@@ -986,7 +984,7 @@ export default {
// margin-top: 10px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
padding: 0 20px 20px;
}
.before-sale .m-b-10 {
......
<template>
<div class="app">
<div class="introduct_container">
<div class="top_play_wrap flex_scb">
<div class="text_wrap">
......@@ -66,7 +65,6 @@
<video v-if="videoShow" width="100%" height="100%" autoplay controls src="https://img02.glsx.com.cn/scrm/video/beforeSale.mp4"></video>
</el-dialog>
</div>
</div>
</template>
<script>
import qrCode from '../../components/qr-code/index.vue'
......@@ -139,7 +137,7 @@ export default {
<style lang="scss" scoped>
.app {
background: #f4f5fa;
padding: 0px 20px 20px 40px;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
width: 100%;
......@@ -332,4 +330,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="report-components">
<div class="title">上传资料</div>
<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 :disabled="pageType == 2" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item']" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :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> -->
<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" :disabled="pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button>
<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'">
<span class="file_tip">支持扩展名:.doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。</span>
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</div>
</template>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</div>
</div>
</template>
<script>
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'
import download from '@/assets/images/download.png'
export default {
name: '',
components: {
// glsxCombiForm
},
props: {
materialForm: Object,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
data() {
return {
progress: 0,
progressName: '',
idCard,
idCardBack,
upload_img,
download,
dialogVisible: false,
// materialForm: {
// idCard: [],
// idCardBack: [],
// billInfo: [],
// otherInfo: []
// },
materialData: [
{
label: '身份证照:',
name: 'idCard',
limit: 1
},
{
name: 'idCardBack',
limit: 1
},
{
label: '发票:',
name: 'billInfo',
limit: 10
},
{
label: '其他:',
name: 'otherInfo',
listType: 'fileList',
limit: 20
}
]
}
},
methods: {
downloadFile(file) {
window.open(file.url)
},
beforeAvatarUpload(e, fieldName) {
console.log(e)
return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg'
if (fieldName === 'otherInfo') {
AllImgExt = '.jpeg|.png|.jpg|.pdf|.doc|.docx'
}
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return reject(false)
}
const size = e.size / 1024 / 1024
let maxSize = 9
let filetype = this.getFileType(e.type)
if (filetype == 'image') {
maxSize = 9
} else {
maxSize = 30
}
if (size > maxSize) {
this.$message.error(`上传文件不可超过${maxSize}M`)
return reject(false)
}
return resolve(true)
})
},
getFileType(type) {
if (!type) return 'doc'
if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'doc'
}
},
httpRequest({ file: e }, fieldName) {
let size = e.size / 1024 / 1024
let loading = null
// 大于2给loading
if (size > 2) {
loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
}
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
const fileType = this.getFileType(e.type)
const fileItem = { name: e.name, progress: 0, fileType: fileType }
if (fieldName === 'idCard') fileItem.name = '&front&_' + e.name
if (fieldName === 'idCardBack') fileItem.name = '&behind&_' + e.name
this.materialForm[fieldName].push(fileItem)
const id = this.materialForm[fieldName].length - 1
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
if (loading != null) {
loading.close()
loading = null
}
let progress = ((res.loaded / res.total) * 100).toFixed(2)
if (progress > 90) {
progress = 90
}
this.$set(this.materialForm[fieldName][id], 'progress', progress)
})
.then(res => {
if (res.code == '0') {
this.$set(this.materialForm[fieldName][id], 'url', res.data[0])
this.$set(this.materialForm[fieldName][id], 'progress', 100)
} else {
// this.materialForm[fieldName] = this.materialForm[fieldName].filter(item => item.url)
// console.log(this.materialForm[fieldName])
this.$set(this.materialForm[fieldName][id], 'progress', 100)
this.materialForm[fieldName].splice(id, 1)
this.$message.error('该文件上传失败')
}
})
}
},
handleRemove(e, fieldName) {
if (e.status == 'ready') return
// let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid)
// this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
const index = this.materialForm[fieldName].findIndex(item => item.url == e)
setTimeout(() => {
this.materialForm[fieldName].splice(index, 1)
})
//加定时是因为去除element删除有一个闪动
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .hidePlusBtn {
.el-upload--picture-card {
display: none;
}
}
// 上传闪屏问题
/deep/.el-upload-list__item.is-ready {
display: none;
}
.report-components {
background: white;
margin: 20px 0 64px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
margin-top: 20px;
}
.material {
padding: 32px 20px;
min-width: 650px;
.material-item {
display: flex;
margin-bottom: 20px;
.upload-item {
position: relative;
}
/deep/ .el-upload-list__item-status-label {
display: none;
}
&:nth-child(-n + 3) {
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 180px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border-radius: 4px;
border: 1px dashed rgba(0, 0, 0, 0.15);
img {
width: 100%;
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;
top: 0;
}
}
&:nth-child(2) {
margin-left: 40px;
display: inline-block;
}
&:nth-child(3) {
flex: 1;
margin-bottom: 0;
.upload-item {
max-width: 650px;
}
/deep/.el-upload-list__item,
/deep/.el-upload--picture-card {
width: 104px;
margin-right: 20px;
margin-bottom: 15px;
p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
&:nth-child(4) {
margin-top: 5px;
.require {
margin-top: 9px;
}
/deep/ .el-upload {
text-align: left;
}
/deep/.el-upload-list--fileList {
display: none;
}
/deep/ .el-button:hover,
.el-button:active,
.el-button:focus {
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
}
/deep/ .el-button.is-disabled:hover {
color: #c0c4cc;
background: #fff;
border-color: #ebeef5;
}
}
.remark {
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
font-size: 14px;
color: #999;
top: 112px;
position: absolute;
}
.file-box {
.file_tip {
margin: 8px 0;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 22px;
}
.bar_outer {
width: 320px;
position: relative;
margin-bottom: 4px;
.download {
width: 20px;
height: 18px;
}
.del_img,
.download {
color: #c6c6c6;
position: absolute;
right: -25px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}
.del_img {
right: -44px;
}
/deep/ .el-progress-bar__outer {
height: 26px !important;
border-radius: 4px;
background-color: transparent !important;
border: 1px solid #f4f6fc;
.el-progress-bar__inner {
border-radius: 4px;
text-align: left;
.el-progress-bar__innerText {
color: #333;
width: 310px;
overflow: hidden;
height: 13px;
text-overflow: ellipsis;
}
}
}
.file-name {
left: 0;
top: 50%;
transform: translateY(-50%);
position: absolute;
}
}
}
.require {
width: 118px;
text-align: right;
display: inline-block;
white-space: nowrap;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
}
}
</style>
<template>
<div>
<div v-if="isGH" class="report-components">
<div class="title">报案信息(店面补充)</div>
<glsx-combi-form class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="144px" defaultWidth="320px" :formObj="accountForm" :formData="handlerForm"></glsx-combi-form>
</div>
<div class="report-components repair-wrap">
<div class="title">维修信息</div>
<div class="repair-body">
<div class="type-wrap">
<label class="require" for="">批准金额:</label>
<div class="service-wrap">
<template v-if="serviceItemsList.length > 0">
<div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode">
<p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap">
<label for="">定损批准金额:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
</template>
<div class="tip" v-else>{{ `同步${isGH ? '核销码' : '合同号'}后自动代入` }}</div>
</div>
</div>
<div v-if="serviceItemsList.length > 0" class="total-price">
<label for="">合计:</label>
<span>
定损批准金为
<span class="price">
<span class="sign">¥</span>
<span>{{ totalPrice }}</span>
</span>
</span>
</div>
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio-group @change="changeObjectType" :disabled="pageType == 2" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
</div>
<div class="account-info">
<glsx-combi-form ref="accountRef" :formRules="accountRule" labelWidth="144px" defaultWidth="320px" :formObj="accountForm" :formData="accountData"></glsx-combi-form>
</div>
</div>
</div>
</div>
</template>
<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}$/
export default {
name: 'repair',
props: {
accountForm: Object,
serviceItemsList: Array,
totalPrice:Number,
isGH: Boolean,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
components: {
glsxCombiForm,
},
data() {
return {
accountData:[
{
label: '账户类型',
name: 'accountType',
type: 'radio',
optionList: [
{
confId:0,
confName:'对公'
},
{
confId:1,
confName:'对私'
}
],
optionId: 'confId',
optionLabel: 'confName',
isHide:true,
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '开户行名称',
name: 'branchBankCode',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
maxlength:60,
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款账号',
name: 'accountNo',
type: 'input',
maxlength:25,
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款账号所在省市',
name: 'bankCity',
type: 'select',
placeholder:'可输入所在市关键词查询',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款人证件类型',
name: 'payeeIDCardType',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款人证件号码',
name: 'payeeIDCardNo',
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款人联系电话',
name: 'payeePhone',
type: 'input',
maxlength: 15,
isClear: true,
isDisabled: this.pageType == 2
},
],
handlerForm: [
{
label: '经办人',
name: 'handlerName',
type: 'input',
isClear: true,
maxlength:100,
isDisabled: this.pageType == 2
},
{
label: '经办人联系号码',
name: 'handlerPhone',
type: 'input',
maxlength: 11,
isClear: true,
isDisabled: this.pageType == 2
}
],
accountRule: {
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
accountNo: [
{
required: true,
validator: (rule, value, callback) => {
let numRef = /^[0-9]{1,25}$/
if (!value) {
callback(new Error('请输入收款账号'))
} else if (numRef.test(value)) {
callback()
} else {
callback(new Error('请输入正确的收款账号'))
}
},
trigger: 'change'
}
],
bankCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
payeeIDCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
payeeIDCardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
payeePhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }],
handlerPhone: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('请输入手机号'))
} else if (phoneReg.test(value)) {
callback()
} else {
callback(new Error('请输入正确的手机号'))
}
},
trigger: 'change'
}
],
},
}
},
created(){
this.getBankList()
this.initSaveObj()
},
mounted() {
},
watch:{
'accountForm.objectType':{
handler(newVal,oldVal){
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal==0
},
immediate:true
}
},
methods:{
initSaveObj(){
const obj = {
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: ''
}
this.saveObj = {...obj}
this.otherSaveObj = {...obj}
},
changeObjectType(newVal){
this.$emit('changeObjectType',newVal)
// const item = this.accountData.find(item => {
// return item.name == 'accountType'
// })
// item.isHide = newVal==0
// const obj = {}
// for(let key in this.saveObj){
// obj[key] = this.accountForm[key]
// }
// if(newVal==0){
// this.accountForm.accountType = 0
// this.saveObj = {...obj}
// this.accountForm = {...this.accountForm,...this.otherSaveObj}
// }else{
// this.otherSaveObj = {...obj}
// this.accountForm = {...this.accountForm,...this.saveObj}
// }
// console.log(this.accountForm)
},
getBankList() {
this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name ==='branchBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name ==='bankCity')
accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name ==='payeeIDCardType')
IDCardTypeList.optionList = res.cardType
})
},
validPrice(e,id){
let checkPlan = '' + this.serviceItemsList[id].approveAmount
checkPlan = checkPlan.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
this.$set(this.serviceItemsList[id], 'approveAmount' , checkPlan)
},
changePrice(e,id){
if(!e.target.value) return;
const len = e.target.value.length
let lastStr = e.target.value.charAt(len-1)
if(lastStr==='.'){
this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1))
}
const minPrice = 1
if(Number(e.target.value)<minPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , 1)
}
const maxPrice = 2000000
if(Number(e.target.value)>maxPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice)
}
}
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
margin-top: 20px;
}
.require {
width: 115px;
text-align: right;
display: inline-block;
white-space: nowrap;
}
.require::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
.repair-wrap {
.repair-body {
padding: 32px 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
.type-wrap {
display: flex;
& > label {
line-height: 20px;
}
.service-wrap {
max-width: 1250px;
display: flex;
flex-wrap: wrap;
.tip {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
}
label {
width: 115px;
height: 16px;
}
.service-item {
width: 264px;
padding: 10px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-right: 20px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
.name {
font-weight: 600;
flex: 1;
margin-bottom: 16px;
}
.price-wrap {
display: flex;
align-items: center;
flex: 1;
label {
white-space: nowrap;
}
/deep/ .el-input__inner {
height: 32px;
}
}
}
}
}
.total-price {
margin-left: 115px;
.price {
.sign {
font-size: 14px;
}
font-size: 20px;
font-weight: 500;
color: #ff6d00;
}
}
.collecter {
margin-top: 22px;
}
/deep/ .account-info {
margin: 10px 0 0 115px;
padding: 20px 10px 0 20px;
background: #f9f9f9;
display: inline-block;
.el-radio {
margin-right: 40px;
}
.el-form-item {
display: block;
}
}
}
}
</style>
<template>
<div class="report-components">
<div class="title">报案信息(客户提交)</div>
<glsxCombiForm :regionData="regionData" class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType == 1" 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;">{{ `同步${isGH ? '核销码关联合同中的' : '合同中'}以下信息,同步后的信息可手动编辑` }}</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: {
glsxCombiForm
},
props: {
editForm: Object,
isGH: Boolean,
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
data() {
return {
regionData: [],
editFormData: [],
showGh: false,
editRule: {
contractNo: [{ required: true, message: '请输入合同号', trigger: 'change' }],
reportDate: [{ 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'
}
],
reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
reporterPhone: [
{
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' }],
reimbursementAddr: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
}
}
},
created() {
this.getCityList()
},
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: {
getCityList() {
this.$apis.claims.getCityList({}).then(res => {
this.regionData = res
})
},
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(new Date(new Date().setHours(new Date().getHours() + 1)), '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
const dj = [
{
label: '合同号',
name: 'contractNo',
type: 'input',
maxlength: 50,
isDisabled: this.pageType != 1,
isClear: true,
suffixSlot: 'syncBtn'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
label: '报案人',
name: 'reporterName',
type: 'input',
maxlength: 100,
isDisabled,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isDisabled,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
maxlength: 200,
isClear: true,
inputType: 'textarea'
}
]
const gh = [
{
label: '核销码',
name: 'writeOffCode',
type: 'input',
maxlength: 8,
isDisabled: this.pageType != 1,
isClear: true,
suffixSlot: 'syncBtn'
},
{
label: '出险日期',
name: 'reimbursementDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reimbursementDate')
}
}
},
{
label: '报案日期',
name: 'reportDate',
type: 'limitDatePicker',
dateType: 'datetime',
isDisabled,
customPickerOptions: {
disabledDate(date) {
return date > new Date()
},
selectableRange: ''
},
focus: e => {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
label: '报案人',
name: 'reporterName',
type: 'input',
maxlength: 100,
isDisabled,
isClear: true
},
{
label: '报案人联系号码',
name: 'reporterPhone',
type: 'input',
maxlength: 11,
isDisabled,
isClear: true
},
{
label: '出险地点',
name: 'reimbursementAddress',
type: 'cascader',
placeholder: '可输入省、市或区关键字搜索',
isDisabled,
isClear: true,
handleChange: cellValue => {
if (!cellValue || !cellValue.length) {
return
}
}
},
{
label: '出险详细地址',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
isClear: true,
maxlength: 200,
inputType: 'textarea'
}
]
this.editFormData = showGh ? gh : dj
},
// 查询订单详情信息(嘀加:合同号,广汇:核销码)
toSearchOrderDetail() {
this.$emit('toSearchOrderDetail')
}
}
}
</script>
<style lang="scss" scoped>
.report-components {
background: white;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
/deep/ #reportDate,
/deep/ #reimbursementDate {
.el-date-editor {
.el-input__inner {
padding-left: 15px;
}
.el-input__prefix {
right: 5px;
text-align: right;
left: unset;
}
}
}
}
</style>
<!-- 权益订单 -->
<template>
<div>
<div class="header_btn_widget flex_sc">
<GLButton size="small" fn="广汇订单详情" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增核赔</GLButton>
</div>
<div class="header_info_widget">
<span class="el-icon-warning"></span>
请注意:订单列表还有
<span class="count_num">{{ orderCount.toBeCommitCount || 0 }}</span>
单待提交国任,
<span class="count_num">{{ orderCount.noPassCount || 0 }}</span>
单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div>
<div class="search_container">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="218px" :formObj="searchForm" :formData="searchFormData">
<div slot="footer" class="footer-btns primary_plain_btn" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button>
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
<el-button size="small" type="primary" @click="exportList" plain>导出excel</el-button>
</div>
</glsx-combi-form>
</div>
<div class="table_widget">
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs'
const statusList = [
{
confId: '',
confName: '全部'
},
{
confId: 0,
confName: '待提交国任'
},
{
confId: 2,
confName: '校验不通过'
},
{
confId: 1,
confName: '待支付'
},
{
confId: 3,
confName: '支付成功'
},
{
confId: 4,
confName: '支付失败'
}
]
export default {
name: 'index',
data() {
return {
orderCount: {},
getListApi: this.$apis.claims.getclaimsList,
sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: {
searchText: '',
status: '',
commitDate: ''
},
searchParams: {},
searchFormData: [
{
name: 'searchText',
type: 'input',
placeholder: '请输入客户名|核销码|合同号|报案号',
isClear: true,
maxlength: 200
// isHide: true
},
{
label: '服务状态',
name: 'status',
type: 'select',
isClear: true,
optionList: statusList,
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '提交国任日期',
name: 'commitDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'writeOffCode',
width: '90',
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
},
{
label: '报案号',
prop: 'registNo',
width: '220',
formatter: cellValue => {
return cellValue.registNo || '-'
}
},
{
label: '客户名称',
prop: 'reporterName',
width: '200',
formatter: cellValue => {
return cellValue.reporterName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '200',
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '价格区间',
prop: 'priceSection',
width: '100',
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '门店提交时间',
prop: 'commitTime',
width: '180',
formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '提交国任时间',
prop: 'commitGuoRenDate',
width: '180',
formatter: cellValue => {
return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '服务名称',
prop: 'serviceName',
width: '300',
line: 1,
formatter: cellValue => {
return cellValue.serviceName || '-'
}
},
{
label: '服务状态',
prop: 'status',
width: '120',
formatter: cellValue => {
if (!cellValue) return '-'
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
}
},
{
label: '状态描述',
prop: 'statusDesc',
width: '200',
formatter: cellValue => {
return cellValue.statusDesc || '-'
}
},
{
label: '批准金额',
prop: 'approvalAmount',
width: '100',
formatter: cellValue => {
return cellValue.approvalAmount || '-'
}
},
{
label: '支付金额',
prop: 'paymentAmount',
width: '100',
formatter: cellValue => {
return cellValue.paymentAmount || '-'
}
},
{
label: '操作人',
prop: 'operatorName',
width: '100',
formatter: cellValue => {
return cellValue.operatorName || '-'
}
},
{
label: '操作',
prop: '',
width: '200',
fixed: 'right',
addHtml: 'table-btns'
}
]
}
}
},
components: {
glsxCombiForm
},
created() {
this.diffHost()
this.getClaimsCount()
},
mounted() {
// this.handleUploadBefore()
},
methods: {
getClaimsCount() {
this.$apis.claims.getclaimsCount({}).then(res => {
this.orderCount = res
})
},
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
this.showGh = true
if (!this.showGh) this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
},
// 1.新增 2.查看 3.重新提交 4.去处理
handleEdit(editNo, row) {
let urlParam = {
editNo,
isGH: this.showGh,
// isGH: true,
contractNo: editNo == 1 ? '' : row.contractNo, // 嘀加的用合同号
orderId: editNo == 1 ? '' : row.id
}
if (this.showGh) {
// 广汇的用核销码
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/ghOrder/' + temp })
},
handleOkFn() {
this.getParams()
this.getTableData()
},
handleRestFn() {
this.searchForm = {
searchText: '',
status: '',
commitDate: ''
}
this.getTableData()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchParams = { ...this.getParams() }
resolve()
})
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (Array.isArray(params.commitDate) && params.commitDate.length > 0) {
params.commitTimeStart = dayjs(params.commitDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.commitTimeEnd = dayjs(params.commitDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.commitDate
return params
},
getTableData() {
this.$refs.equityRef.refreshTable()
},
exportList() {
const parmas = { ...this.getParams() }
this.$apis.claims.exportClaimsData(parmas).then(data => {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
})
}
}
}
</script>
<style lang="scss" scoped>
.header_info_widget {
box-sizing: border-box;
margin: 20px 0;
width: 100%;
height: 40px;
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
background-color: #e6e9ff;
border: 1px solid #5850ff;
padding: 0 16px;
border-radius: 4px;
.el-icon-warning {
font-size: 16px;
color: #5850ff;
margin-right: 8px;
}
.count_num {
font-size: 14px;
color: #5850ff;
letter-spacing: 0;
font-weight: 500;
margin: 0 8px;
}
}
.search_container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 20px 0;
}
.table_widget {
padding: 0px 20px 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
/deep/ .el-form {
.el-form-item {
margin-right: 12px !important;
&:first-child {
.el-input {
width: 312px !important;
}
}
}
}
</style>
<!-- 权益订单 -->
<template>
<div>
<report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<div class="footer operate-btn primary_plain_btn">
<template v-if="pageType != 2">
<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>
</template>
<template v-else>
<el-button size="small" type="primary" @click="handleCancel">返回</el-button>
</template>
</div>
</div>
</template>
<script>
import report from './components/report.vue'
import repair from './components/repair.vue'
import material from './components/material.vue'
import util from '@/util/util'
export default {
name: 'order',
components: {
report,
repair,
material
},
data() {
return {
permitDraft: false,
routeInfo: null,
isGH: false,
editForm: {
contractNo: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddress: '',
reporterName: '',
reporterPhone: '',
writeOffCode: '',
reimbursementAddr: '',
reimbursementProvinceCode: '',
reimbursementCityCode: '',
reimbursementCountiesCode: ''
},
pageType: 1,
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
saveObj: {},
materialForm: {
idCard: [],
idCardBack: [],
billInfo: [],
otherInfo: []
},
serviceItemsList: []
}
},
created() {
this.initSaveObj()
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
this.handleFormInfo(urlQuery.contractNo, urlQuery.isGH)
// if(!this.isGH){
// }
if (this.routeInfo.orderId) {
this.getDetailById()
}
},
computed: {
totalPrice() {
let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + parseInt(cur.approveAmount * 100)
}, 0)
return total / 100
}
},
mounted() {},
methods: {
changeObjectType(newVal) {
if (newVal === 1) {
this.saveObj.objectType = newVal
delete this.saveObj.handlerName
delete this.saveObj.handlerPhone
this.accountForm = { ...this.accountForm, ...this.saveObj }
} else {
this.saveObj = { ...this.accountForm }
this.getAccountInfo(this.editForm.contractNo)
}
},
initSaveObj() {
this.saveObj = { ...this.accountForm }
},
//详情
getDetailById() {
this.$apis.claims.getClaimsDetail({ id: this.routeInfo.orderId }).then(res => {
// 以下是report数据
for (let key in this.editForm) {
this.editForm[key] = res[key]
}
this.editForm.reportDate = res.reporterDate
this.editForm.reimbursementAddress = []
const { reimbursementCityCode, reimbursementCountiesCode, reimbursementProvinceCode, serviceItemsList } = res
this.editForm.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
// 以下是repair数据
for (let key in this.accountForm) {
this.accountForm[key] = res[key]
}
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
this.serviceItemsList = serviceItemsList
// 以下是文件数据
res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100 }
if (item.fileCode == '1') {
if (item.fileName.indexOf('&front&_') === 0) {
this.materialForm.idCard.push(obj)
} else {
this.materialForm.idCardBack.push(obj)
}
} else if (item.fileCode == '31') {
this.materialForm.billInfo.push(obj)
} else if (item.fileCode == '4') {
this.materialForm.otherInfo.push(obj)
}
})
})
},
// 新增的时候,输入合同号,带出信息
toSearchOrderDetail() {
let param = {}
param.contractNo = this.editForm.contractNo
let targetAPI = this.$apis.claims.checkContractNo
if (this.routeInfo.isGH) {
param.writeOffCode = this.editForm.writeOffCode
targetAPI = this.$apis.claims.getDetailByWOCode
}
targetAPI(param).then(res => {
this.permitDraft = true
const { serviceItemsList, contractNo } = res
for (let key in this.editForm) {
this.editForm[key] = res[key] || this.editForm[key]
}
this.serviceItemsList = serviceItemsList
this.getAccountInfo(contractNo)
})
},
// 点击同步,获取收款人信息
getAccountInfo(contractNo) {
if (!contractNo) return
this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
// for (let key in this.accountForm) {
// this.accountForm[key] = result[key] || this.accountForm[key]
// }
this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
})
},
// 根据页面跳转参数处理表单信息-自动填入
// 步骤流程:拿到核销码/合同号后==》请求接口获取该合同号/核销码下对应的套餐,下发数据到维修信息模块,上传资料模块,报案信息模块
handleFormInfo(contractNo, isGH) {
if (isGH) {
this.editForm.writeOffCode = contractNo
}
this.editForm.contractNo = contractNo
},
// 提交的时候校验,滴加不校验经办人信息
validAccountInfo() {
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
})
}
})
})
if (!valid) return valid
let requirePrice = true
this.serviceItemsList.forEach(item => {
if (item.approveAmount > 0) {
requirePrice = false
}
})
if (requirePrice) {
this.$message.error('至少输入一项服务的定损批准金额')
return false
}
let fileTip = false
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !fileTip) {
fileTip = true
}
}
if (fileTip) {
this.$message.error(`请补全资料`)
return false
}
return valid
},
// 提交核赔
confirmSubmit(type) {
if (type == 1 && !this.validAccountInfo()) {
return false
}
let isUpload = false
for (let key in this.materialForm) {
this.materialForm[key].forEach(item => {
if (!item.url) isUpload = true
})
}
if (isUpload) {
this.$message.error(`文件正在上传,请稍后再${type == 1 ? '提交' : '保存草稿'}`)
return false
}
if (!this.routeInfo.orderId && type == 2 && !this.permitDraft) {
this.$message.error('请同步信息之后再保存草稿')
return
}
const params = { ...this.editForm, ...this.accountForm }
if (params.accountType !== 1) {
params.accountType = 0
}
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : ''
params.reportDate = params.reportDate ? util.dateFormat(params.reportDate, 'YYYY-MM-DD HH:mm:ss') : ''
if (params.reimbursementAddress.length == 3) {
params.reimbursementProvinceCode = params.reimbursementAddress[0]
params.reimbursementCityCode = params.reimbursementAddress[1]
params.reimbursementCountiesCode = params.reimbursementAddress[2]
}
params.approveAmounts = ''
let tagetObj = {}
this.serviceItemsList.forEach(item => {
tagetObj[item.serviceItemCode] = item.approveAmount
})
params.approveAmounts = JSON.stringify(tagetObj)
delete params.reimbursementAddress
params.fileList = []
for (let key in this.materialForm) {
this.materialForm[key].forEach((item, index) => {
const obj = {}
obj.fileType = item.fileType
obj.fileUrl = item.url
obj.fileCode = key == 'idCard' || key == 'idCardBack' ? 1 : key == 'billInfo' ? 31 : 4
obj.fileName = item.name
params.fileList.push(obj)
})
}
if (this.routeInfo.orderId) {
params.id = this.routeInfo.orderId
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.claims.commitClaimsOrder(params).then(res => {
loading.close()
if (res) {
this.$message({
message: type == 1 ? '提交成功' : '保存草稿成功',
type: 'success'
})
this.handleCancel()
}
})
},
handleCancel() {
this.$router.push({ path: '/claims/ghIndex' })
}
}
}
</script>
<style lang="scss" scoped>
.footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
}
</style>
<!-- 权益订单 -->
<template>
<div>
<div class="header_btn_widget flex_sc">
<GLButton size="small" fn="订单详情" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增核赔</GLButton>
</div>
<div class="header_info_widget">
<span class="el-icon-warning"></span>
请注意:订单列表还有
<span class="count_num">{{ orderCount.toBeCommitCount || 0 }}</span>
单待提交国任,
<span class="count_num">{{ orderCount.noPassCount || 0 }}</span>
单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div>
<div class="search_container">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="218px" :formObj="searchForm" :formData="searchFormData">
<div slot="footer" class="footer-btns primary_plain_btn" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button>
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
<el-button size="small" type="primary" @click="exportList" plain>导出excel</el-button>
</div>
</glsx-combi-form>
</div>
<div class="table_widget">
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="searchParams" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="batchPageConf">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[0].includes(scope.scope.status)" fn="去处理" type="text" @click="handleEdit(4, scope.scope)">去处理</GLButton>
<GLButton v-if="[1, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[2].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, scope.scope)">重新提交</GLButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import * as dayjs from 'dayjs'
const statusList = [
{
confId: '',
confName: '全部'
},
{
confId: 0,
confName: '待提交国任'
},
{
confId: 2,
confName: '校验不通过'
},
{
confId: 1,
confName: '待支付'
},
{
confId: 3,
confName: '支付成功'
},
{
confId: 4,
confName: '支付失败'
}
]
export default {
name: 'index',
data() {
return {
orderCount: {},
getListApi: this.$apis.claims.getclaimsList,
sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageNum', totalCount: 'total' },
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: {
searchText: '',
status: '',
commitDate: ''
},
searchParams: {},
searchFormData: [
{
name: 'searchText',
type: 'input',
placeholder: '请输入客户名|核销码|合同号|报案号',
isClear: true,
maxlength: 200
// isHide: true
},
{
label: '服务状态',
name: 'status',
type: 'select',
isClear: true,
optionList: statusList,
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '提交国任日期',
name: 'commitDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'writeOffCode',
width: '90',
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
},
{
label: '报案号',
prop: 'registNo',
width: '220',
formatter: cellValue => {
return cellValue.registNo || '-'
}
},
{
label: '客户名称',
prop: 'reporterName',
width: '200',
formatter: cellValue => {
return cellValue.reporterName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '200',
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '价格区间',
prop: 'priceSection',
width: '100',
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '门店提交时间',
prop: 'commitTime',
width: '180',
formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '提交国任时间',
prop: 'commitGuoRenDate',
width: '180',
formatter: cellValue => {
return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '服务名称',
prop: 'serviceName',
width: '300',
line: 1,
formatter: cellValue => {
return cellValue.serviceName || '-'
}
},
{
label: '服务状态',
prop: 'status',
width: '120',
formatter: cellValue => {
if (!cellValue) return '-'
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId === cellValue.status).confName : '-'
}
},
{
label: '状态描述',
prop: 'statusDesc',
width: '200',
formatter: cellValue => {
return cellValue.statusDesc || '-'
}
},
{
label: '批准金额',
prop: 'approvalAmount',
width: '100',
formatter: cellValue => {
return cellValue.approvalAmount || '-'
}
},
{
label: '支付金额',
prop: 'paymentAmount',
width: '100',
formatter: cellValue => {
return cellValue.paymentAmount || '-'
}
},
{
label: '操作人',
prop: 'operatorName',
width: '100',
formatter: cellValue => {
return cellValue.operatorName || '-'
}
},
{
label: '操作',
prop: '',
width: '200',
fixed: 'right',
addHtml: 'table-btns'
}
]
}
}
},
components: {
glsxCombiForm
},
created() {
this.diffHost()
this.getClaimsCount()
},
mounted() {
// this.handleUploadBefore()
},
methods: {
getClaimsCount() {
this.$apis.claims.getclaimsCount({}).then(res => {
this.orderCount = res
})
},
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1
if (!this.showGh) this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
},
// 1.新增 2.查看 3.重新提交 4.去处理
handleEdit(editNo, row) {
let urlParam = {
editNo,
isGH: this.showGh,
// isGH: true,
contractNo: editNo == 1 ? '' : row.contractNo, // 嘀加的用合同号
orderId: editNo == 1 ? '' : row.id
}
if (this.showGh) {
// 广汇的用核销码
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp })
},
handleOkFn() {
this.getParams()
this.getTableData()
},
handleRestFn() {
this.searchForm = {
searchText: '',
status: '',
commitDate: ''
}
this.getTableData()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchParams = { ...this.getParams() }
resolve()
})
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (Array.isArray(params.commitDate) && params.commitDate.length > 0) {
params.commitTimeStart = dayjs(params.commitDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.commitTimeEnd = dayjs(params.commitDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.commitDate
return params
},
getTableData() {
this.$refs.equityRef.refreshTable()
},
exportList() {
const parmas = { ...this.getParams() }
this.$apis.claims.exportClaimsData(parmas).then(data => {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
})
}
}
}
</script>
<style lang="scss" scoped>
.header_info_widget {
box-sizing: border-box;
margin: 20px 0;
width: 100%;
height: 40px;
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
background-color: #e6e9ff;
border: 1px solid #5850ff;
padding: 0 16px;
border-radius: 4px;
.el-icon-warning {
font-size: 16px;
color: #5850ff;
margin-right: 8px;
}
.count_num {
font-size: 14px;
color: #5850ff;
letter-spacing: 0;
font-weight: 500;
margin: 0 8px;
}
}
.search_container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 20px 0;
}
.table_widget {
padding: 0px 20px 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
/deep/ .el-form {
.el-form-item {
margin-right: 12px !important;
&:first-child {
.el-input {
width: 312px !important;
}
}
}
}
</style>
<!-- 权益订单 -->
<template>
<div>
<report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<div class="footer operate-btn primary_plain_btn">
<template v-if="pageType != 2">
<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>
</template>
<template v-else>
<el-button size="small" type="primary" @click="handleCancel">返回</el-button>
</template>
</div>
</div>
</template>
<script>
import report from './components/report.vue'
import repair from './components/repair.vue'
import material from './components/material.vue'
import util from '@/util/util'
export default {
name: 'order',
components: {
report,
repair,
material
},
data() {
return {
permitDraft: false,
routeInfo: null,
isGH: false,
editForm: {
contractNo: '',
reportDate: '',
reimbursementDate: '',
reimbursementAddress: '',
reporterName: '',
reporterPhone: '',
writeOffCode: '',
reimbursementAddr: '',
reimbursementProvinceCode: '',
reimbursementCityCode: '',
reimbursementCountiesCode: ''
},
pageType: 1,
accountForm: {
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
handlerName: '',
handlerPhone: ''
},
saveObj: {},
materialForm: {
idCard: [],
idCardBack: [],
billInfo: [],
otherInfo: []
},
serviceItemsList: []
}
},
created() {
this.initSaveObj()
const urlParam = this.$route.params
const urlQuery = JSON.parse(decodeURIComponent(urlParam.id))
this.pageType = urlQuery.editNo
this.routeInfo = urlQuery
this.handleFormInfo(urlQuery.contractNo, urlQuery.isGH)
// if(!this.isGH){
// }
if (this.routeInfo.orderId) {
this.getDetailById()
}
},
computed: {
totalPrice() {
let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + parseInt(cur.approveAmount * 100)
}, 0)
return total / 100
}
},
mounted() {},
methods: {
changeObjectType(newVal) {
if (newVal === 1) {
this.saveObj.objectType = newVal
delete this.saveObj.handlerName
delete this.saveObj.handlerPhone
this.accountForm = { ...this.accountForm, ...this.saveObj }
} else {
this.saveObj = { ...this.accountForm }
this.getAccountInfo(this.editForm.contractNo)
}
},
initSaveObj() {
this.saveObj = { ...this.accountForm }
},
//详情
getDetailById() {
this.$apis.claims.getClaimsDetail({ id: this.routeInfo.orderId }).then(res => {
// 以下是report数据
for (let key in this.editForm) {
this.editForm[key] = res[key]
}
this.editForm.reportDate = res.reporterDate
this.editForm.reimbursementAddress = []
const { reimbursementCityCode, reimbursementCountiesCode, reimbursementProvinceCode, serviceItemsList } = res
this.editForm.reimbursementAddress.push(reimbursementProvinceCode, reimbursementCityCode, reimbursementCountiesCode)
// 以下是repair数据
for (let key in this.accountForm) {
this.accountForm[key] = res[key]
}
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
this.serviceItemsList = serviceItemsList
// 以下是文件数据
res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100 }
if (item.fileCode == '1') {
if (item.fileName.indexOf('&front&_') === 0) {
this.materialForm.idCard.push(obj)
} else {
this.materialForm.idCardBack.push(obj)
}
} else if (item.fileCode == '31') {
this.materialForm.billInfo.push(obj)
} else if (item.fileCode == '4') {
this.materialForm.otherInfo.push(obj)
}
})
})
},
// 新增的时候,输入合同号,带出信息
toSearchOrderDetail() {
let param = {}
param.contractNo = this.editForm.contractNo
let targetAPI = this.$apis.claims.checkContractNo
if (this.routeInfo.isGH) {
param.writeOffCode = this.editForm.writeOffCode
targetAPI = this.$apis.claims.getDetailByWOCode
}
targetAPI(param).then(res => {
this.permitDraft = true
const { serviceItemsList, contractNo } = res
for (let key in this.editForm) {
this.editForm[key] = res[key] || this.editForm[key]
}
this.serviceItemsList = serviceItemsList
this.getAccountInfo(contractNo)
})
},
// 点击同步,获取收款人信息
getAccountInfo(contractNo) {
if (!contractNo) return
this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
const { accountName, accountCityCode: bankCity, openBankCode: branchBankCode, accountNo, accountType, cardNo: payeeIDCardNo, cardTypeCode: payeeIDCardType, phone: payeePhone } = res || {}
const result = { accountName, bankCity, branchBankCode, accountNo, accountType, payeeIDCardNo, payeeIDCardType, payeePhone }
// for (let key in this.accountForm) {
// this.accountForm[key] = result[key] || this.accountForm[key]
// }
this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
if (this.accountForm.objectType !== 1) this.accountForm.accountType = 0
})
},
// 根据页面跳转参数处理表单信息-自动填入
// 步骤流程:拿到核销码/合同号后==》请求接口获取该合同号/核销码下对应的套餐,下发数据到维修信息模块,上传资料模块,报案信息模块
handleFormInfo(contractNo, isGH) {
if (isGH) {
this.editForm.writeOffCode = contractNo
}
this.editForm.contractNo = contractNo
},
// 提交的时候校验,滴加不校验经办人信息
validAccountInfo() {
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
})
}
})
})
if (!valid) return valid
let requirePrice = true
this.serviceItemsList.forEach(item => {
if (item.approveAmount > 0) {
requirePrice = false
}
})
if (requirePrice) {
this.$message.error('至少输入一项服务的定损批准金额')
return false
}
let fileTip = false
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !fileTip) {
fileTip = true
}
}
if (fileTip) {
this.$message.error(`请补全资料`)
return false
}
return valid
},
// 提交核赔
confirmSubmit(type) {
if (type == 1 && !this.validAccountInfo()) {
return false
}
let isUpload = false
for (let key in this.materialForm) {
this.materialForm[key].forEach(item => {
if (!item.url) isUpload = true
})
}
if (isUpload) {
this.$message.error(`文件正在上传,请稍后再${type == 1 ? '提交' : '保存草稿'}`)
return false
}
if (!this.routeInfo.orderId && type == 2 && !this.permitDraft) {
this.$message.error('请同步信息之后再保存草稿')
return
}
const params = { ...this.editForm, ...this.accountForm }
if (params.accountType !== 1) {
params.accountType = 0
}
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : ''
params.reportDate = params.reportDate ? util.dateFormat(params.reportDate, 'YYYY-MM-DD HH:mm:ss') : ''
if (params.reimbursementAddress.length == 3) {
params.reimbursementProvinceCode = params.reimbursementAddress[0]
params.reimbursementCityCode = params.reimbursementAddress[1]
params.reimbursementCountiesCode = params.reimbursementAddress[2]
}
params.approveAmounts = ''
let tagetObj = {}
this.serviceItemsList.forEach(item => {
tagetObj[item.serviceItemCode] = item.approveAmount
})
params.approveAmounts = JSON.stringify(tagetObj)
delete params.reimbursementAddress
params.fileList = []
for (let key in this.materialForm) {
this.materialForm[key].forEach((item, index) => {
const obj = {}
obj.fileType = item.fileType
obj.fileUrl = item.url
obj.fileCode = key == 'idCard' || key == 'idCardBack' ? 1 : key == 'billInfo' ? 31 : 4
obj.fileName = item.name
params.fileList.push(obj)
})
}
if (this.routeInfo.orderId) {
params.id = this.routeInfo.orderId
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.claims.commitClaimsOrder(params).then(res => {
loading.close()
if (res) {
this.$message({
message: type == 1 ? '提交成功' : '保存草稿成功',
type: 'success'
})
this.handleCancel()
}
})
},
handleCancel() {
this.$router.push({ path: '/claims/index' })
}
}
}
</script>
<style lang="scss" scoped>
.footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
}
</style>
......@@ -483,7 +483,6 @@ export default {
text-align: center;
}
.container {
padding-right: 20px;
padding-bottom: 74px;
}
.allWrap {
......
......@@ -416,7 +416,6 @@ export default {
text-align: center;
}
.container {
padding-right: 20px;
padding-bottom: 74px;
}
.allWrap {
......
......@@ -341,11 +341,9 @@ export default {
<style lang="scss" scoped>
.equity-wrap {
padding-right: 20px;
}
.addGood {
margin-bottom: 10px;
margin-left: 40px;
padding: 8px 16px;
// margin-bottom: 20px;
}
......
......@@ -345,7 +345,6 @@ export default {
}
.addGood {
margin-bottom: 10px;
margin-left: 40px;
padding: 8px 16px;
// margin-bottom: 20px;
}
......
......@@ -419,7 +419,6 @@ export default {
<style lang="scss" scoped>
.equity-wrap {
padding-right: 20px;
}
.addGood {
margin-bottom: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!