Commit f1cdb325 by 张权

dev:新增核赔接口联调

1 parent eefaa5bd
...@@ -45,7 +45,7 @@ const commitClaimsOrder = params => { ...@@ -45,7 +45,7 @@ const commitClaimsOrder = params => {
// 获取核赔订单详情 // 获取核赔订单详情
const getClaimsDetail = params => { const getClaimsDetail = params => {
params.method = 'scrm.api.equity.service.claims.detail' params.method = 'scrm.api.equity.service.claims.operate.detail'
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
...@@ -64,4 +64,46 @@ const exportClaimsData = params => { ...@@ -64,4 +64,46 @@ const exportClaimsData = params => {
}) })
} }
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData } // 校验核赔权益订单合同号
const checkContractNo = params => {
params.method = 'scrm.api.equity.service.claims.operate.contract.verify'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
// 校验核赔权益订单合同号
const getDetailByWOCode = params => {
params.method = 'scrm.api.equity.service.claims.detail'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
// 获取开户行和证件类型列表
const getBankList = params => {
params.method = 'scrm.api.equity.service.claims.payee.select'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
// 获取开户行和证件类型列表
const getCityList = params => {
params.method = 'scrm.api.equity.service.claims.area'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
}
export default { getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList }
...@@ -53,4 +53,18 @@ const pictureUpload = params => { ...@@ -53,4 +53,18 @@ const pictureUpload = params => {
}) })
} }
export default { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload } 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'],
onUploadProgress: res => {
callback(res)
}
})
}
export default { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload, uploadFileApi }
This diff could not be displayed because it is too large.
...@@ -118,19 +118,22 @@ export default { ...@@ -118,19 +118,22 @@ export default {
const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1] const fileInfo = targetNameList[targetNameList.length - 1] + '@' + arrBase64[1]
this.materialForm[fieldName].push({ name: e.name, progress: 0 }) this.materialForm[fieldName].push({ name: e.name, progress: 0 })
const id = this.materialForm[fieldName].length - 1 const id = this.materialForm[fieldName].length - 1
this.$apis.ghBeforeSale const fileType = e.type.indexOf('image') != -1 ? 'image' : ''
.uploadImgApi({ file: fileInfo }, res => { const params = { file: [fileInfo] }
this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2)) // if (fileType) params.fileType = fileType
}) console.log(e.type.indexOf('image'), params, 13)
.then(res => { const targetApi = fieldName == 'otherInfo' ? this.$apis.ghBeforeSale.uploadFileApi : this.$apis.ghBeforeSale.uploadImgApi
if (res) { targetApi(params, res => {
this.$set(this.materialForm[fieldName][id], 'url', res) this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2))
} else { }).then(res => {
this.handleRemove(e, fieldName, 1) if (res) {
const index = this.materialForm[fieldName].findIndex(item => item.name == e.name) this.$set(this.materialForm[fieldName][id], 'url', res)
this.materialForm[fieldName].splice(index, 1) } else {
} this.handleRemove(e, fieldName, 1)
}) const index = this.materialForm[fieldName].findIndex(item => item.name == e.name)
this.materialForm[fieldName].splice(index, 1)
}
})
} }
}, },
handleRemove(e, fieldName, isDel) { handleRemove(e, fieldName, isDel) {
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<div class="type-wrap"> <div class="type-wrap">
<label class="require" for="">批准金额:</label> <label class="require" for="">批准金额:</label>
<div class="service-wrap"> <div class="service-wrap">
<div class="service-item" v-for="(item, index) in equityList" :key="item.name"> <div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode">
<p class="name">{{ item.name }}</p> <p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap"> <div class="price-wrap">
<label for="">定损批准金额:</label> <label for="">定损批准金额:</label>
<el-input clearable :disabled="pageType == 2" @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> <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> --> <!-- <el-input @input="validPrice($event, index)" placeholder="请选择定损批准金额" v-model="item.price"></el-input> -->
</div> </div>
</div> </div>
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
</div> </div>
<div class="collecter"> <div class="collecter">
<label class="require" for="">收款对象:</label> <label class="require" for="">收款对象:</label>
<el-radio-group :disabled="pageType == 2" v-model="accountForm.collectOwner" @change="changeOwner"> <el-radio-group :disabled="pageType == 2" v-model="accountForm.objectType" @change="changeOwner">
<el-radio label="business">店面</el-radio> <el-radio label="0">店面</el-radio>
<el-radio label="other">其他</el-radio> <el-radio label="1">其他</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="account-info"> <div class="account-info">
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
name: 'repair', name: 'repair',
props: { props: {
accountForm: Object, accountForm: Object,
equityList: Array, serviceItemsList: Array,
totalPrice:Number, totalPrice:Number,
isGH: Boolean, isGH: Boolean,
pageType: { pageType: {
...@@ -86,11 +86,11 @@ export default { ...@@ -86,11 +86,11 @@ export default {
type: 'radio', type: 'radio',
optionList: [ optionList: [
{ {
confId:'company', confId:'0',
confName:'对公' confName:'对公'
}, },
{ {
confId:'personal', confId:'1',
confName:'对私' confName:'对私'
} }
], ],
...@@ -101,70 +101,47 @@ export default { ...@@ -101,70 +101,47 @@ export default {
}, },
{ {
label: '开户行名称', label: '开户行名称',
name: 'bankName', name: 'branchBankCode',
type: 'select', type: 'select',
optionList: [ optionList: [],
{ optionId: 'code',
confId:'IDCard', optionLabel: 'name',
confName:'身份证'
},
{
confId:'PassCard',
confName:'统一社会信息代码'
},
],
optionId: 'confId',
optionLabel: 'confName',
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '账户名称', label: '账户名称',
name: 'collectName', name: 'accountName',
type: 'input', type: 'input',
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '收款账号', label: '收款账号',
name: 'collectAccount', name: 'accountNo',
type: 'input', type: 'input',
maxlength:19, maxlength:19,
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '收款账号所在省市', label: '收款账号所在省市',
name: 'collectCity', name: 'accountCity',
type: 'cascader', type: 'select',
isClear: true, optionList: [],
handleChange: cellValue => { optionId: 'code',
if (!cellValue || !cellValue.length) { optionLabel: 'name',
return
}
let nodesInfo = this.$refs.accountRef.$refs.cascader[0].getCheckedNodes()[0].pathLabels
this.currentAddress = nodesInfo
},
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '收款人证件类型', label: '收款人证件类型',
name: 'collectCardType', name: 'payeeIDCardType',
type: 'select', type: 'select',
optionList: [ optionList: [],
{ optionId: 'code',
confId:'IDCard', optionLabel: 'name',
confName:'身份证'
},
{
confId:'PassCard',
confName:'统一社会信息代码'
},
],
optionId: 'confId',
optionLabel: 'confName',
isDisabled: this.pageType == 2 isDisabled: this.pageType == 2
}, },
{ {
label: '收款人证件号码', label: '收款人证件号码',
name: 'collectCardNo', name: 'payeeIDCardNo',
type: 'input', type: 'input',
maxlength: 18, maxlength: 18,
isClear: true, isClear: true,
...@@ -172,7 +149,7 @@ export default { ...@@ -172,7 +149,7 @@ export default {
}, },
{ {
label: '收款人联系电话', label: '收款人联系电话',
name: 'collectPhone', name: 'payeePhone',
type: 'input', type: 'input',
maxlength: 11, maxlength: 11,
isClear: true, isClear: true,
...@@ -197,24 +174,25 @@ export default { ...@@ -197,24 +174,25 @@ export default {
} }
], ],
accountRule: { accountRule: {
bankName: [{ required: true, message: '请输入开户行名称', trigger: 'change' }], branchBankCode: [{ required: true, message: '请输入开户行名称', trigger: 'change' }],
collectName: [{ required: true, message: '请输入账户名称', trigger: 'change' }], accountName: [{ required: true, message: '请输入账户名称', trigger: 'change' }],
collectAccount: [{ required: true, trigger: 'change',validator: bankAccountValid }], accountNo: [{ required: true, trigger: 'change',validator: bankAccountValid }],
collectCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }], accountCity: [{ required: true, message: '请选择收款账号所在省市', trigger: 'change' }],
collectCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }], payeeIDCardType: [{ required: true, message: '请选择收款人证件类型', trigger: 'change' }],
handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }], handlerName: [{ required: true, message: '请输入经办人', trigger: 'change' }],
collectCardNo: [{ payeeIDCardNo: [{ required: true, message: '请输入收款人证件号码', trigger: 'change' }],
required: true, // {
validator: (rule, value, callback) => { // required: true,
return value ? callback() : callback(new Error('请输入' + (this.accountForm.collectCardType == 'IDCard' ? '身份证' : '统一社会信息代码'))) // validator: (rule, value, callback) => {
}, trigger: 'change' // 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位数字或字母')) // validator: (rule, value, callback) => {
}, trigger: 'change' // return (/[a-zA-Z0-9]{18}/).test(value) ? callback() : callback(new Error('请输入18位数字或字母'))
}], // }, trigger: 'change'
collectPhone: [{ required: true, message: '请输入联系号码', trigger: 'change' }, // }
payeePhone: [{ required: true, message: '请输入联系号码', trigger: 'change' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码')) return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
...@@ -238,11 +216,37 @@ export default { ...@@ -238,11 +216,37 @@ export default {
}, },
} }
}, },
created(){
this.getBankList()
},
mounted() { mounted() {
}, },
methods:{ 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')
accountCityList.optionList = res.accountCity
const IDCardTypeList = this.accountData.find(item => item.name ==='payeeIDCardType')
IDCardTypeList.optionList = res.cardType
})
},
// arrayToTree(arr){
// if (!Array.isArray(arr) || arr.length < 1) return null;
// const [root] = arr.filter(item => item.parentCode === null);
// const addChildren = (node, dataList) => {
// const children = dataList
// .filter(item => item.parentCode === node.code)
// .map(item => addChildren(item, dataList));
// return { ...node, children };
// };
// return addChildren(root, arr);
// },
validPrice(e,id){ validPrice(e,id){
let checkPlan = '' + this.equityList[id].price let checkPlan = '' + this.serviceItemsList[id].approveAmount
checkPlan = checkPlan.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); checkPlan = checkPlan.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace(/^\./g, '').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
if (checkPlan.indexOf('.') < 0 && checkPlan !== '') { if (checkPlan.indexOf('.') < 0 && checkPlan !== '') {
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 // 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
...@@ -250,15 +254,15 @@ export default { ...@@ -250,15 +254,15 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.equityList[id], 'price' , checkPlan) this.$set(this.serviceItemsList[id], 'approveAmount' , checkPlan)
}, },
changeOwner(newVal){ changeOwner(newVal){
const item = this.accountData.find(item => { const item = this.accountData.find(item => {
return item.name == 'accountType' return item.name == 'accountType'
}) })
item.isHide = newVal=='business' item.isHide = newVal=='0'
if(newVal=='business'){ if(newVal=='0'){
this.accountForm.accountType = 'company' this.accountForm.accountType = '0'
} }
} }
} }
......
...@@ -51,8 +51,8 @@ export default { ...@@ -51,8 +51,8 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
reportName: [{ required: true, message: '请输入报案人', trigger: 'change' }], reporterName: [{ required: true, message: '请输入报案人', trigger: 'change' }],
reportPhone: [ reporterPhone: [
{ {
required: true, required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
}, },
{ {
label: '报案人', label: '报案人',
name: 'reportName', name: 'reporterName',
type: 'input', type: 'input',
maxlength: 100, maxlength: 100,
isDisabled, isDisabled,
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
}, },
{ {
label: '报案人联系号码', label: '报案人联系号码',
name: 'reportPhone', name: 'reporterPhone',
type: 'input', type: 'input',
maxlength: 11, maxlength: 11,
isDisabled, isDisabled,
...@@ -176,6 +176,7 @@ export default { ...@@ -176,6 +176,7 @@ export default {
return return
} }
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
console.log(cellValue, 888)
} }
}, },
{ {
...@@ -235,7 +236,7 @@ export default { ...@@ -235,7 +236,7 @@ export default {
}, },
{ {
label: '报案人', label: '报案人',
name: 'reportName', name: 'reporterName',
type: 'input', type: 'input',
maxlength: 100, maxlength: 100,
isDisabled, isDisabled,
...@@ -243,7 +244,7 @@ export default { ...@@ -243,7 +244,7 @@ export default {
}, },
{ {
label: '报案人联系号码', label: '报案人联系号码',
name: 'reportPhone', name: 'reporterPhone',
type: 'input', type: 'input',
maxlength: 11, maxlength: 11,
isDisabled, isDisabled,
...@@ -276,12 +277,7 @@ export default { ...@@ -276,12 +277,7 @@ export default {
}, },
// 查询订单详情信息(嘀加:合同号,广汇:核销码) // 查询订单详情信息(嘀加:合同号,广汇:核销码)
toSearchOrderDetail() { toSearchOrderDetail() {
let param = {} this.$emit('toSearchOrderDetail')
param.contractNo = this.editForm.contractNo
if (this.isGH) {
param.writeOffCode = this.editForm.writeOffCode
}
console.log(param)
} }
} }
} }
......
<!-- 权益订单 --> <!-- 权益订单 -->
<template> <template>
<div class="app"> <div class="app">
<report ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair ref="repairRef" :isGH="routeInfo.isGH" :pageType="pageType" :equityList.sync="equityList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <repair ref="repairRef" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material> <material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<div class="footer operate-btn"> <div class="footer operate-btn">
<template v-if="pageType != 2"> <template v-if="pageType != 2">
...@@ -36,22 +36,22 @@ export default { ...@@ -36,22 +36,22 @@ export default {
reportDate: '', reportDate: '',
reimbursementDate: '', reimbursementDate: '',
reimbursementAddress: '', reimbursementAddress: '',
reportName: '', reporterName: '',
reportPhone: '', reporterPhone: '',
writeOffCode: '', writeOffCode: '',
detailAddress: '' detailAddress: ''
}, },
pageType: 1, pageType: 1,
accountForm: { accountForm: {
collectOwner: 'business', objectType: '0',
accountType: 'company', accountType: '0',
bankName: '', branchBankCode: '',
collectName: '', accountName: '',
collectAccount: '', accountNo: '',
collectCity: '', accountCity: '',
collectCardType: '', payeeIDCardType: '',
collectCardNo: '', payeeIDCardNo: '',
collectPhone: '', payeePhone: '',
handlerName: '', handlerName: '',
handlerPhone: '' handlerPhone: ''
}, },
...@@ -61,28 +61,7 @@ export default { ...@@ -61,28 +61,7 @@ export default {
billInfo: [], billInfo: [],
otherInfo: [] otherInfo: []
}, },
equityList: [ serviceItemsList: []
{
name: 'huiyuan痊愈',
price: 100
},
{
name: '会员权益',
price: 92
},
{
name: '核赔申请',
price: 65
},
{
name: '定损定损',
price: 63
},
{
name: '定损定损',
price: 63
}
]
} }
}, },
created() { created() {
...@@ -96,14 +75,37 @@ export default { ...@@ -96,14 +75,37 @@ export default {
}, },
computed: { computed: {
totalPrice() { totalPrice() {
let total = this.equityList.reduce(function(prev, cur) { let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + parseInt(cur.price * 100) return prev + parseInt(cur.approveAmount * 100)
}, 0) }, 0)
return total / 100 return total / 100
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
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 => {
console.log(res, 123)
if (res.code == '0') {
const { reporterName, reporterPhone, serviceItemsList } = res.data
this.editForm = { ...this.editForm, reporterName, reporterPhone }
console.log(serviceItemsList)
this.serviceItemsList = serviceItemsList
} else {
this.$message({
message: res.message,
type: 'error'
})
}
})
},
// 处理表单数据 // 处理表单数据
handlerForm() { handlerForm() {
console.log(this.editForm) console.log(this.editForm)
...@@ -136,7 +138,7 @@ export default { ...@@ -136,7 +138,7 @@ export default {
if (type == 1 && !this.validAccountInfo()) { if (type == 1 && !this.validAccountInfo()) {
return false return false
} }
console.log(this.editForm, this.accountForm, this.materialForm, this.equityList, this.totalPrice) console.log(this.editForm, this.accountForm, this.materialForm, this.serviceItemsList, this.totalPrice)
}, },
handleCancel() { handleCancel() {
this.$router.back() this.$router.back()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!