Commit 80ca1482 by 张权

自测bug修改

1 parent 15bdcba4
...@@ -61,6 +61,7 @@ const uploadFileApi = (params, callback) => { ...@@ -61,6 +61,7 @@ const uploadFileApi = (params, callback) => {
data: params, data: params,
sign: true, sign: true,
noSignAttr: ['file'], noSignAttr: ['file'],
returnAll: true,
onUploadProgress: res => { onUploadProgress: res => {
callback(res) callback(res)
} }
......
...@@ -97,21 +97,23 @@ export default { ...@@ -97,21 +97,23 @@ export default {
}, },
methods: { methods: {
beforeAvatarUpload(e, fieldName) { beforeAvatarUpload(e, fieldName) {
console.log(e) return new Promise((resolve, reject) => {
let AllImgExt = '.png|.jpg|.jpeg' let AllImgExt = '.png|.jpg|.jpeg'
if (fieldName === 'otherInfo') { if (fieldName === 'otherInfo') {
AllImgExt = '.zip|.jpeg|.rar|.png|.jpg|.pdf|.doc|.docx' AllImgExt = '.zip|.jpeg|.rar|.png|.jpg|.pdf|.doc|.docx'
} }
let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase() let extName = e.name.substring(e.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) { if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确') this.$message.error('上传格式不正确')
return false return reject(false)
} }
const size = e.size / 1024 / 1024 const size = e.size / 1024 / 1024
if (size > 9) { if (size > 9) {
this.$message.error('上传文件不可超过9M') this.$message.error('上传文件不可超过9M')
return false return reject(false)
} }
return resolve(true)
})
}, },
getFileType(type) { getFileType(type) {
if (!type) return 'zip' if (!type) return 'zip'
...@@ -146,26 +148,25 @@ export default { ...@@ -146,26 +148,25 @@ export default {
this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2)) this.$set(this.materialForm[fieldName][id], 'progress', ((res.loaded / res.total) * 100).toFixed(2))
}) })
.then(res => { .then(res => {
if (res) { if (res.code == '0') {
this.$set(this.materialForm[fieldName][id], 'url', res[0]) this.$set(this.materialForm[fieldName][id], 'url', res.data[0])
} else { } else {
this.handleRemove(e, fieldName, 1) // this.materialForm[fieldName] = this.materialForm[fieldName].filter(item => item.url)
// console.log(this.materialForm[fieldName])
this.materialForm[fieldName].splice(id, 1) this.materialForm[fieldName].splice(id, 1)
} }
}) })
} }
}, },
handleRemove(e, fieldName, isDel) { handleRemove(e, fieldName) {
if (isDel) { if (e.status == 'ready') return
let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid) // let id = this.$refs[fieldName + 'Ref'][0].uploadFiles.findIndex(item => item.uid === e.uid)
this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1) // this.$refs[fieldName + 'Ref'][0].uploadFiles.splice(id, 1)
} else { const index = this.materialForm[fieldName].findIndex(item => item.url == e)
const index = this.materialForm[fieldName].findIndex(item => item.url == e) setTimeout(() => {
setTimeout(() => { this.materialForm[fieldName].splice(index, 1)
this.materialForm[fieldName].splice(index, 1) })
}) //加定时是因为去除element删除有一个闪动
//加定时是因为去除element删除有一个闪动
}
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url this.dialogImageUrl = file.url
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</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.objectType"> <el-radio-group @change="changeObjectType" :disabled="pageType == 2" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio> <el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio> <el-radio :label="1">其他</el-radio>
</el-radio-group> </el-radio-group>
...@@ -67,6 +67,8 @@ export default { ...@@ -67,6 +67,8 @@ export default {
}, },
data() { data() {
return { return {
saveObj:{},
otherSaveObj:{},
accountData:[ accountData:[
{ {
label: '账户类型', label: '账户类型',
...@@ -196,25 +198,59 @@ export default { ...@@ -196,25 +198,59 @@ export default {
}, },
created(){ created(){
this.getBankList() this.getBankList()
this.initSaveObj()
}, },
mounted() { mounted() {
}, },
watch:{ // watch:{
'accountForm.objectType':{ // 'accountForm.objectType':{
handler(newVal,oldVal){ // handler(newVal,oldVal){
const item = this.accountData.find(item => { // const item = this.accountData.find(item => {
return item.name == 'accountType' // return item.name == 'accountType'
}) // })
item.isHide = newVal==0 // // item.isHide = newVal==0
if(newVal==0){ // if(newVal==0){
this.accountForm.accountType = 0 // this.accountForm.accountType = 0
} // }
}, // },
immediate:true // immediate:true
} // }
}, // },
methods:{ methods:{
initSaveObj(){
const obj = {
accountType: 0,
branchBankCode: '',
accountName: '',
accountNo: '',
bankCity: '',
payeeIDCardType: '',
payeeIDCardNo: '',
payeePhone: ''
}
this.saveObj = {...obj}
this.otherSaveObj = {...obj}
},
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}
}
},
getBankList() { getBankList() {
this.$apis.claims.getBankList({}).then(res => { this.$apis.claims.getBankList({}).then(res => {
const branchBankList = this.accountData.find(item => item.name ==='branchBankCode') const branchBankList = this.accountData.find(item => item.name ==='branchBankCode')
...@@ -242,6 +278,10 @@ export default { ...@@ -242,6 +278,10 @@ export default {
if(lastStr==='.'){ if(lastStr==='.'){
this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1)) this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1))
} }
const minPrice = 1
if(parseInt(e.target.value)<minPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , 1)
}
const maxPrice = 2000000 const maxPrice = 2000000
if(parseInt(e.target.value)>maxPrice){ if(parseInt(e.target.value)>maxPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice) this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
单校验不通过退回处理,为保障客户权益,请尽快处理哦! 单校验不通过退回处理,为保障客户权益,请尽快处理哦!
</div> </div>
<div class="search_container"> <div class="search_container">
<glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="200px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="112px" defaultWidth="218px" :formObj="searchForm" :formData="searchFormData">
<div slot="footer" class="footer-btns" style="float:right;"> <div slot="footer" class="footer-btns" style="float:right;">
<el-button size="small" @click="handleRestFn()">重置</el-button> <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="handleOkFn">查询</el-button>
...@@ -119,10 +119,10 @@ export default { ...@@ -119,10 +119,10 @@ export default {
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'merchantName', prop: 'reporterName',
width: '200', width: '200',
formatter: cellValue => { formatter: cellValue => {
return cellValue.merchantName || '-' return cellValue.reporterName || '-'
} }
}, },
{ {
......
...@@ -163,6 +163,9 @@ export default { ...@@ -163,6 +163,9 @@ export default {
// this.accountForm[key] = result[key] || this.accountForm[key] // this.accountForm[key] = result[key] || this.accountForm[key]
// } // }
this.accountForm = { ...this.accountForm, ...result } this.accountForm = { ...this.accountForm, ...result }
if (this.accountForm.accountType == 1 && this.accountForm.objectType == 0) {
this.accountForm.objectType == 1
}
}) })
}, },
// 根据页面跳转参数处理表单信息-自动填入 // 根据页面跳转参数处理表单信息-自动填入
...@@ -188,15 +191,29 @@ export default { ...@@ -188,15 +191,29 @@ export default {
} }
}) })
}) })
let tipObj = {
isTip: false,
tipMsg: ''
}
this.serviceItemsList.forEach(item => { this.serviceItemsList.forEach(item => {
if (item.approveAmount <= 0) { if (item.approveAmount <= 0 && !tipObj.isTip) {
this.$message({ tipObj.isTip = true
message: `请输入${item.serviceItemName}的金额,必须大于0`, tipObj.tipMsg = `请输入大于等于1的${item.serviceItemName}价格`
type: 'error'
})
valid = false
} }
}) })
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !tipObj.isTip) {
tipObj.isTip = true
tipObj.tipMsg = `请补全资料`
}
}
if (tipObj.isTip) {
this.$message({
message: tipObj.tipMsg,
type: 'error'
})
return false
}
return valid return valid
}, },
// 提交核赔 // 提交核赔
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!