Commit 9abb79e8 by 张权

滴加完成

1 parent f1cdb325
......@@ -39,7 +39,8 @@ const commitClaimsOrder = params => {
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
data: params,
returnAll: true
})
}
......@@ -96,7 +97,7 @@ const getBankList = params => {
})
}
// 获取开户行和证件类型列表
// 获取省市区
const getCityList = params => {
params.method = 'scrm.api.equity.service.claims.area'
return http({
......@@ -106,4 +107,14 @@ const getCityList = params => {
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList }
// 获取收款账号
const getAccountInfo = params => {
params.method = 'scrm.api.equity.service.claims.merchant.account'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }

7.21 KB | W: | H:

6.25 KB | W: | H:

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

8.24 KB | W: | H:

7.08 KB | W: | H:

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

4.67 KB | W: | H:

4.25 KB | W: | H:

src/assets/images/upload.png
src/assets/images/upload.png
src/assets/images/upload.png
src/assets/images/upload.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -128,12 +128,15 @@ export default {
dialogObj: {
url: '',
uploadType: 'img'
},
regionData: cityList
}
}
},
props: {
regionData: {
type: Array,
default: cityList
},
isBlock: {
type: Boolean,
default: false
......
......@@ -4,7 +4,7 @@
<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 :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[(materialForm[item.name] ? item.limit != materialForm[item.name].length : true) ? '' : 'hidePlusBtn', 'upload-item']" :limit="item.limit" action="#" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<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> -->
......@@ -15,6 +15,7 @@
<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">支持扩展名:.rar .zip .doc .docx .pdf .jpg .png。</span>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress
color="#F5F7FA"
......@@ -26,7 +27,7 @@
"
:percentage="imgItem.progress"
></el-progress>
<i class="el-icon-delete del-img"></i>
<i v-if="pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</div>
</div>
</el-upload>
......@@ -82,7 +83,7 @@ export default {
{
label: '发票:',
name: 'billInfo',
limit: 6
limit: 10
},
{
label: '其他:',
......@@ -93,8 +94,12 @@ export default {
}
},
methods: {
beforeAvatarUpload(e) {
let AllImgExt = '.zip|.rar|.png|.jpg'
beforeAvatarUpload(e, fieldName) {
console.log(e, fieldName, 456789)
let AllImgExt = '.png|.jpg'
if (fieldName === 'otherInfo') {
AllImgExt = '.zip|.rar|.png|.jpg|.pdf|.doc|.docx'
}
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
......@@ -106,6 +111,16 @@ export default {
return false
}
},
getFileType(type) {
if (!type) return 'zip'
if (type.indexOf('word') > -1) {
return 'doc'
} else if (type.indexOf('image') > -1) {
return 'image'
} else {
return 'zip'
}
},
httpRequest({ file: e }, fieldName) {
console.log(e, 456)
// // 转码base64
......@@ -116,24 +131,27 @@ export default {
const arrBase64 = imgFile.split(',')
const targetNameList = e.name.split('.')
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
this.materialForm[fieldName].push({ name: e.name, progress: 0 })
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 fileType = e.type.indexOf('image') != -1 ? 'image' : ''
const params = { file: [fileInfo] }
// if (fileType) params.fileType = fileType
console.log(e.type.indexOf('image'), params, 13)
const targetApi = fieldName == 'otherInfo' ? this.$apis.ghBeforeSale.uploadFileApi : this.$apis.ghBeforeSale.uploadImgApi
targetApi(params, res => {
this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2))
}).then(res => {
if (res) {
this.$set(this.materialForm[fieldName][id], 'url', res)
} else {
this.handleRemove(e, fieldName, 1)
const index = this.materialForm[fieldName].findIndex(item => item.name == e.name)
this.materialForm[fieldName].splice(index, 1)
}
})
const paramObj = { file: fileInfo, fileType: fileType }
let param = {}
param.fileList = [paramObj]
this.$apis.common
.uploadFileApi(param, res => {
this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2))
})
.then(res => {
if (res) {
this.$set(this.materialForm[fieldName][id], 'url', res[0])
} else {
this.handleRemove(e, fieldName, 1)
this.materialForm[fieldName].splice(id, 1)
}
})
}
},
handleRemove(e, fieldName, isDel) {
......@@ -142,11 +160,11 @@ export default {
let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid)
this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
} else {
console.log(e, fieldName)
const index = this.materialForm[fieldName].findIndex(item => item.url == e)
setTimeout(() => {
this.materialForm[fieldName].splice(index, 1)
})
//加定时是因为去除element删除有一个闪动
}
},
handlePictureCardPreview(file) {
......@@ -186,12 +204,16 @@ export default {
}
.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 {
......@@ -224,13 +246,17 @@ export default {
}
}
&:nth-child(2) {
margin-left: 20px;
margin-left: 40px;
display: inline-block;
}
&:nth-child(3) {
flex: 1;
margin-bottom: 0;
/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;
......@@ -256,6 +282,11 @@ export default {
border: 1px solid #dcdfe6;
color: #606266;
}
/deep/ .el-button.is-disabled:hover {
color: #c0c4cc;
background: #fff;
border-color: #ebeef5;
}
}
.remark {
left: 50%;
......@@ -268,11 +299,19 @@ export default {
}
.file-box {
margin-top: 12px;
.file_tip {
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;
.del-img {
.del_img {
color: #c6c6c6;
position: absolute;
right: -25px;
top: 50%;
......
......@@ -10,17 +10,20 @@
<div class="type-wrap">
<label class="require" for="">批准金额:</label>
<div class="service-wrap">
<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" @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
<!-- <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> -->
<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" @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
<!-- <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> -->
</div>
</div>
</div>
</template>
<div class="tip" v-else>输入合同号后自动代入</div>
</div>
</div>
<div class="total-price">
<div v-if="serviceItemsList.length > 0" class="total-price">
<label for="">合计:</label>
<span>
定损批准金为
......@@ -33,8 +36,8 @@
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio-group :disabled="pageType == 2" v-model="accountForm.objectType" @change="changeOwner">
<el-radio label="0">店面</el-radio>
<el-radio label="1">其他</el-radio>
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
</div>
<div class="account-info">
......@@ -86,17 +89,18 @@ export default {
type: 'radio',
optionList: [
{
confId:'0',
confId:0,
confName:'对公'
},
{
confId:'1',
confId:1,
confName:'对私'
}
],
optionId: 'confId',
optionLabel: 'confName',
isHide:true,
isClear: true,
isDisabled: this.pageType == 2
},
{
......@@ -106,12 +110,14 @@ export default {
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '账户名称',
name: 'accountName',
type: 'input',
isClear: true,
isDisabled: this.pageType == 2
},
{
......@@ -119,15 +125,17 @@ export default {
name: 'accountNo',
type: 'input',
maxlength:19,
isClear: true,
isDisabled: this.pageType == 2
},
{
label: '收款账号所在省市',
name: 'accountCity',
name: 'bankCity',
type: 'select',
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
......@@ -137,6 +145,7 @@ export default {
optionList: [],
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
},
{
......@@ -174,30 +183,14 @@ export default {
}
],
accountRule: {
branchBankCode: [{ required: true, message: '请输入开户行名称', trigger: 'change' }],
branchBankCode: [{ required: true, message: '请选择开户行名称', trigger: 'change' }],
accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
accountNo: [{ required: true, trigger: 'change',validator: bankAccountValid }],
accountCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
accountNo: [{ required: true, message: '请输入收款账号', 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' }],
// {
// required: true,
// validator: (rule, value, callback) => {
// return value ? callback() : callback(new Error('请输入' + (this.accountForm.payeeIDCardType == 'IDCard' ? '身份证' : '统一社会信息代码')))
// }, trigger: 'change'
// },
// {
// validator: (rule, value, callback) => {
// return (/[a-zA-Z0-9]{18}/).test(value) ? callback() : callback(new Error('请输入18位数字或字母'))
// }, trigger: 'change'
// }
payeePhone: [{ required: true, message: '请输入联系号码', trigger: 'change' },
{
validator: (rule, value, callback) => {
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
}, trigger: 'change'
}],
payeePhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }],
handlerPhone: [
{
required: true,
......@@ -222,13 +215,27 @@ export default {
mounted() {
},
watch:{
'accountForm.objectType':{
handler(newVal,oldVal){
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal==0
if(newVal==0){
this.accountForm.accountType = 0
}
},
immediate:true
}
},
methods:{
getBankList() {
this.$apis.claims.getBankList({}).then(res => {
console.log(res,456)
const branchBankList = this.accountData.find(item => item.name ==='branchBankCode')
branchBankList.optionList = res.branchBank
const accountCityList = this.accountData.find(item => item.name ==='accountCity')
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
......@@ -256,15 +263,15 @@ export default {
}
this.$set(this.serviceItemsList[id], 'approveAmount' , checkPlan)
},
changeOwner(newVal){
const item = this.accountData.find(item => {
return item.name == 'accountType'
})
item.isHide = newVal=='0'
if(newVal=='0'){
this.accountForm.accountType = '0'
}
}
// changeOwner(newVal){
// const item = this.accountData.find(item => {
// return item.name == 'accountType'
// })
// item.isHide = newVal==0
// if(newVal==0){
// this.accountForm.accountType = 0
// }
// }
}
}
</script>
......@@ -315,6 +322,13 @@ export default {
display: flex;
flex-wrap: wrap;
margin-bottom: 6px;
.tip {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
}
label {
width: 115px;
height: 16px;
......@@ -348,7 +362,6 @@ export default {
}
}
.total-price {
margin-bottom: 22px;
margin-left: 115px;
.price {
.sign {
......@@ -359,6 +372,9 @@ export default {
color: #ff6d00;
}
}
.collecter {
margin-top: 22px;
}
/deep/ .account-info {
margin: 10px 0 0 115px;
padding: 20px 10px 0 20px;
......
<template>
<div class="report-components">
<div class="title">报案信息(客户提交)</div>
<glsxCombiForm class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<glsxCombiForm :regionData="regionData" class="edit-form-container " ref="editFormRefReport" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType != 2" style="display:inline-block;" slot="syncBtn">
<el-button style="margin:0 12px;" type="primary" @click="toSearchOrderDetail">同步</el-button>
<span style="font-weight: 400; color:#666;">同步合同中以下信息,同步后的信息可手动编辑</span>
......@@ -29,6 +29,7 @@ export default {
},
data() {
return {
regionData: [],
editFormData: [],
showGh: false,
editRule: {
......@@ -68,10 +69,13 @@ export default {
}
],
reimbursementAddress: [{ required: true, message: '请选择出险地点', trigger: 'change' }],
detailAddress: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
reimbursementAddr: [{ required: true, message: '请输入出险详细地址', trigger: 'change' }]
}
}
},
created() {
this.getCityList()
},
mounted() {
this.diffKeyHandle(this.isGH)
},
......@@ -88,6 +92,13 @@ export default {
}
},
methods: {
getCityList() {
console.log(111)
this.$apis.claims.getCityList({}).then(res => {
console.log(res, 456)
this.regionData = res
})
},
updateTimeLimit(newVal, key) {
let limitTime = ''
// 当不是同一天,时间限制为'00:00:00 - 23:59:59',否则'00:00:00 - endTime'
......@@ -181,7 +192,7 @@ export default {
},
{
label: '出险详细地址',
name: 'detailAddress',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
isClear: true,
......@@ -266,7 +277,7 @@ export default {
},
{
label: '出险详细地址',
name: 'detailAddress',
name: 'reimbursementAddr',
type: 'input',
isDisabled,
isClear: true,
......
......@@ -25,8 +25,8 @@
<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="[2, 3, 4].includes(scope.scope.status)" fn="查看" type="text" @click="handleEdit(2, scope.scope)">查看</GLButton>
<GLButton v-if="[1].includes(scope.scope.status)" fn="重新提交" type="text" @click="handleEdit(3, 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>
......@@ -104,7 +104,7 @@ export default {
{
label: '核销码',
prop: 'writeOffCode',
width: '90px',
width: '90',
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
......@@ -112,7 +112,7 @@ export default {
{
label: '报案号',
prop: 'registNo',
width: '200px',
width: '200',
formatter: cellValue => {
return cellValue.registNo || '-'
}
......@@ -120,7 +120,7 @@ export default {
{
label: '客户名称',
prop: 'merchantName',
width: '160px',
width: '200',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
......@@ -128,7 +128,7 @@ export default {
{
label: '合同号',
prop: 'contractNo',
width: '160px',
width: '200',
formatter: cellValue => {
return cellValue.contractNo || '-'
}
......@@ -136,7 +136,7 @@ export default {
{
label: '价格区间',
prop: 'priceSection',
width: '200px',
width: '100',
formatter: cellValue => {
return cellValue.priceSection || '-'
}
......@@ -144,7 +144,7 @@ export default {
{
label: '门店提交时间',
prop: 'commitTime',
width: '160px',
width: '160',
formatter: cellValue => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
......@@ -152,7 +152,7 @@ export default {
{
label: '提交国任时间',
prop: 'commitGuoRenDate',
width: '200px',
width: '160',
formatter: cellValue => {
return cellValue.commitGuoRenDate ? dayjs(cellValue.commitGuoRenDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
......@@ -160,7 +160,8 @@ export default {
{
label: '服务名称',
prop: 'serviceName',
width: '300px',
width: '300',
line: 1,
formatter: cellValue => {
return cellValue.serviceName || '-'
}
......@@ -168,7 +169,7 @@ export default {
{
label: '服务状态',
prop: 'status',
width: '160px',
width: '120',
formatter: cellValue => {
return statusList.map(item => item.confId).includes(cellValue.status) ? statusList.find(item => item.confId == cellValue.status).confName : '-'
}
......@@ -176,7 +177,7 @@ export default {
{
label: '状态描述',
prop: 'statusDesc',
width: '200px',
width: '200',
formatter: cellValue => {
return cellValue.statusDesc || '-'
}
......@@ -184,7 +185,7 @@ export default {
{
label: '批准金额',
prop: 'approvalAmount',
width: '160px',
width: '100',
formatter: cellValue => {
return cellValue.approvalAmount ? (cellValue.approvalAmount / 100).toFixed(2) : '-'
}
......@@ -192,21 +193,23 @@ export default {
{
label: '支付金额',
prop: 'paymentAmount',
width: '100',
formatter: cellValue => {
return cellValue.paymentAmount ? (cellValue.paymentAmount / 100).toFixed(2) : '-'
return cellValue.paymentAmount || '-'
}
},
{
label: '操作人',
prop: 'reporterName',
prop: 'operatorName',
width: '100',
formatter: cellValue => {
return cellValue.reporterName || '-'
return cellValue.operatorName || '-'
}
},
{
label: '操作',
prop: '',
width: '200px',
width: '200',
fixed: 'right',
addHtml: 'table-btns'
}
......@@ -247,7 +250,8 @@ export default {
editNo,
isGH: this.showGh,
// isGH: true,
contractNo: editNo == 1 ? '' : row.contractNo // 嘀加的用合同号
contractNo: editNo == 1 ? '' : row.contractNo, // 嘀加的用合同号
orderId: editNo == 1 ? '' : row.id
}
if (this.showGh) {
// 广汇的用核销码
......
......@@ -6,8 +6,8 @@
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<div class="footer operate-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" 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>
......@@ -20,6 +20,7 @@
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: {
......@@ -39,16 +40,19 @@ export default {
reporterName: '',
reporterPhone: '',
writeOffCode: '',
detailAddress: ''
reimbursementAddr: '',
reimbursementProvinceCode: '',
reimbursementCityCode: '',
reimbursementCountiesCode: ''
},
pageType: 1,
accountForm: {
objectType: '0',
accountType: '0',
objectType: 0,
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
accountCity: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: '',
......@@ -72,6 +76,9 @@ export default {
this.handleFormInfo(urlQuery.contractNo, urlQuery.isGH)
// if(!this.isGH){
// }
if (this.routeInfo.orderId) {
this.getDetailById()
}
},
computed: {
totalPrice() {
......@@ -83,6 +90,42 @@ export default {
},
mounted() {},
methods: {
//详情
getDetailById() {
this.$apis.claims.getClaimsDetail({ id: this.routeInfo.orderId }).then(res => {
console.log(res, 852)
// 以下是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]
}
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)
}
})
console.log(this.materialForm, 8989)
})
},
// 新增的时候,输入合同号,带出信息
toSearchOrderDetail() {
let param = {}
param.contractNo = this.editForm.contractNo
......@@ -94,10 +137,10 @@ export default {
targetAPI(param).then(res => {
console.log(res, 123)
if (res.code == '0') {
const { reporterName, reporterPhone, serviceItemsList } = res.data
const { reporterName, reporterPhone, serviceItemsList, contractNo } = res.data
this.editForm = { ...this.editForm, reporterName, reporterPhone }
console.log(serviceItemsList)
this.serviceItemsList = serviceItemsList
this.getAccountInfo(contractNo)
} else {
this.$message({
message: res.message,
......@@ -106,9 +149,17 @@ export default {
}
})
},
// 处理表单数据
handlerForm() {
console.log(this.editForm)
// 新增的时候,输入合同号。默认收款人的信息
getAccountInfo(contractNo) {
this.$apis.claims.getAccountInfo({ contractNo }).then(res => {
console.log(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 }
})
},
// 根据页面跳转参数处理表单信息-自动填入
// 步骤流程:拿到核销码/合同号后==》请求接口获取该合同号/核销码下对应的套餐,下发数据到维修信息模块,上传资料模块,报案信息模块
......@@ -118,6 +169,7 @@ export default {
}
this.editForm.contractNo = contractNo
},
// 提交的时候校验,滴加不校验经办人信息
validAccountInfo() {
let valid = false
this.$refs.repairRef.$refs.accountRef.$refs.formRef.validate(aValid => {
......@@ -132,16 +184,72 @@ export default {
}
})
})
this.serviceItemsList.forEach(item => {
if (item.approveAmount <= 0) {
this.$message({
message: `请输入${item.serviceItemName}的金额,必须大于0`,
type: 'error'
})
valid = false
}
})
return valid
},
// 提交核赔
confirmSubmit(type) {
if (type == 1 && !this.validAccountInfo()) {
return false
}
const params = { ...this.editForm, ...this.accountForm }
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
}
this.$apis.claims.commitClaimsOrder(params).then(res => {
console.log(res)
if (res.code == '0') {
this.$message({
message: type == 1 ? '提交成功' : '保存草稿成功',
type: 'success'
})
this.handleCancel()
} else {
this.$message({
message: res.message,
type: 'error'
})
}
})
console.log(this.editForm, this.accountForm, this.materialForm, this.serviceItemsList, this.totalPrice)
},
handleCancel() {
this.$router.back()
this.$router.push({ path: '/claims/index' })
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!