Commit cfe70c84 by 张权

自测完成

1 parent 9abb79e8
......@@ -78,7 +78,7 @@ const checkContractNo = params => {
// 校验核赔权益订单合同号
const getDetailByWOCode = params => {
params.method = 'scrm.api.equity.service.claims.detail'
params.method = 'scrm.api.equity.service.claims.create.before.init'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
......
......@@ -15,20 +15,22 @@
<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"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<i v-if="pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</div>
<span v-if="materialForm[item.name].length == 0" class="file_tip">支持扩展名:.rar .zip .doc .docx .pdf .jpg .png .jpeg。</span>
<template v-else>
<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>
<i v-if="pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</div>
</template>
</div>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
......@@ -95,10 +97,10 @@ export default {
},
methods: {
beforeAvatarUpload(e, fieldName) {
console.log(e, fieldName, 456789)
let AllImgExt = '.png|.jpg'
console.log(e)
let AllImgExt = '.png|.jpg|.jpeg'
if (fieldName === 'otherInfo') {
AllImgExt = '.zip|.rar|.png|.jpg|.pdf|.doc|.docx'
AllImgExt = '.zip|.jpeg|.rar|.png|.jpg|.pdf|.doc|.docx'
}
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
......@@ -122,7 +124,6 @@ export default {
}
},
httpRequest({ file: e }, fieldName) {
console.log(e, 456)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
......@@ -155,7 +156,6 @@ export default {
}
},
handleRemove(e, fieldName, isDel) {
console.log(e, fieldName)
if (isDel) {
let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid)
this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
......@@ -328,6 +328,10 @@ export default {
text-align: left;
.el-progress-bar__innerText {
color: #333;
width: 310px;
overflow: hidden;
height: 13px;
text-overflow: ellipsis;
}
}
}
......
......@@ -15,8 +15,7 @@
<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> -->
<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>
......@@ -35,7 +34,7 @@
</div>
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio-group :disabled="pageType == 2" v-model="accountForm.objectType" @change="changeOwner">
<el-radio-group :disabled="pageType == 2" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
......@@ -51,20 +50,6 @@
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
const phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
const bankAccountValid = (rule, value, callback) => {
const strBin = '10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99'
if (!value) {
return callback(new Error('收款账号不能为空'))
} else if (!Number.isInteger(+value)) {
callback(new Error('收款账号必须全为数字'))
} else if (strBin.indexOf(value.substring(0, 2)) === -1) {
callback(new Error('收款账号开头6位不符合规范'))
} else if (value.trim().length < 12 || value.trim().length > 19) {
callback(new Error('收款账号长度必须在12到19之间'))
} else {
callback()
}
}
export default {
name: 'repair',
props: {
......@@ -232,7 +217,6 @@ export default {
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 ==='bankCity')
......@@ -241,37 +225,28 @@ export default {
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){
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 !== '') {
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
checkPlan = parseFloat(checkPlan) + ''
} else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
}
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
// }
// }
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 maxPrice = 2000000
if(parseInt(e.target.value)>maxPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice)
}
}
}
}
</script>
......
......@@ -2,7 +2,7 @@
<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 != 2" style="display:inline-block;" slot="syncBtn">
<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;">同步合同中以下信息,同步后的信息可手动编辑</span>
</div>
......@@ -93,9 +93,7 @@ export default {
},
methods: {
getCityList() {
console.log(111)
this.$apis.claims.getCityList({}).then(res => {
console.log(res, 456)
this.regionData = res
})
},
......@@ -187,7 +185,6 @@ export default {
return
}
let nodesInfo = this.$refs.editFormRefReport.$refs.cascader[0].getCheckedNodes()[0].pathLabels
console.log(cellValue, 888)
}
},
{
......@@ -311,6 +308,11 @@ export default {
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
/deep/ #reportDate,
/deep/ #reimbursementDate {
......
......@@ -187,7 +187,7 @@ export default {
prop: 'approvalAmount',
width: '100',
formatter: cellValue => {
return cellValue.approvalAmount ? (cellValue.approvalAmount / 100).toFixed(2) : '-'
return cellValue.approvalAmount || '-'
}
},
{
......@@ -237,12 +237,8 @@ export default {
// 从域名判断是不是广汇的
diffHost() {
let href = window.location.host
if (href.indexOf('cgacar') != -1) {
this.showGh = true
} else {
this.showGh = false
this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
}
this.showGh = href.indexOf('cgacar') != -1
if (!this.showGh) this.searchFormData[0].placeholder = '请输入客户名 | 合同号 | 报案号'
},
// 1.新增 2.查看 3.重新提交 4.去处理
handleEdit(editNo, row) {
......@@ -255,14 +251,13 @@ export default {
}
if (this.showGh) {
// 广汇的用核销码
urlParam.contractNo = row.writeOffCode
urlParam.contractNo = editNo == 1 ? '' : row.writeOffCode
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp })
},
handleOkFn() {
this.getParams()
console.log(this.searchParams)
this.getTableData()
},
handleRestFn() {
......
......@@ -30,6 +30,7 @@ export default {
},
data() {
return {
permitDraft: false,
routeInfo: null,
isGH: false,
editForm: {
......@@ -93,7 +94,6 @@ export default {
//详情
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]
......@@ -122,7 +122,6 @@ export default {
this.materialForm.otherInfo.push(obj)
}
})
console.log(this.materialForm, 8989)
})
},
// 新增的时候,输入合同号,带出信息
......@@ -135,10 +134,16 @@ export default {
targetAPI = this.$apis.claims.getDetailByWOCode
}
targetAPI(param).then(res => {
console.log(res, 123)
if (res.code == '0') {
const { reporterName, reporterPhone, serviceItemsList, contractNo } = res.data
this.editForm = { ...this.editForm, reporterName, reporterPhone }
this.permitDraft = true
const { serviceItemsList, contractNo } = res.data
for (let key in this.editForm) {
this.editForm[key] = res.data[key] || this.editForm[key]
}
// if (this.routeInfo.isGH) {
// this.accountForm.handlerName = res.data.handlerName
// this.accountForm.handlerPhone = res.data.handlerPhone
// }
this.serviceItemsList = serviceItemsList
this.getAccountInfo(contractNo)
} else {
......@@ -149,10 +154,9 @@ export default {
}
})
},
// 新增的时候,输入合同号。默认收款人的信息
// 点击同步,获取收款人信息
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) {
......@@ -200,6 +204,13 @@ export default {
if (type == 1 && !this.validAccountInfo()) {
return false
}
if (type == 2 && !this.permitDraft) {
this.$message({
message: '请同步信息之后再保存草稿',
type: 'error'
})
return
}
const params = { ...this.editForm, ...this.accountForm }
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : ''
......@@ -231,7 +242,6 @@ export default {
params.id = this.routeInfo.orderId
}
this.$apis.claims.commitClaimsOrder(params).then(res => {
console.log(res)
if (res.code == '0') {
this.$message({
message: type == 1 ? '提交成功' : '保存草稿成功',
......@@ -245,8 +255,6 @@ export default {
})
}
})
console.log(this.editForm, this.accountForm, this.materialForm, this.serviceItemsList, this.totalPrice)
},
handleCancel() {
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!