Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 25ef22dd
authored
Apr 24, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复上传接口进度不正确情况
1 parent
652709e3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
54 deletions
src/components/glsx-combi-form/index.vue
src/views/claims/components/material.vue
src/views/claims/components/repair.vue
src/views/claims/components/report.vue
src/views/claims/ghIndex.vue
src/views/claims/ghOrder.vue
src/views/claims/index.vue
src/views/claims/order.vue
src/components/glsx-combi-form/index.vue
View file @
25ef22d
...
...
@@ -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>
...
...
@@ -97,7 +97,7 @@
<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
? item.placeholder :
'请选择省/请选择市/请选择区'"
size=
"small "
:options=
"regionData"
v-model=
"formObj[item.name]"
@
change=
"item.handleChange"
></el-cascader>
<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>
...
...
src/views/claims/components/material.vue
View file @
25ef22d
...
...
@@ -14,9 +14,9 @@
<el-button
v-if=
"item.name == 'otherInfo'"
slot=
"default"
:disabled=
"pageType == 2"
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"
:style=
"[
{ 'margin-top': materialForm[item.name].length == 0 ? '5px' : '12px' }]"
class="file-box" v-if="item.name == 'otherInfo'">
<span
v-if=
"materialForm[item.name].length == 0"
class=
"file_tip"
>
支持扩展名:.rar .zip .doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。
</span>
<template
v-else
>
<div
slot=
"tip"
class=
"file-box"
v-if=
"item.name == 'otherInfo'"
>
<span
class=
"file_tip"
>
支持扩展名:.rar .zip .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"
...
...
@@ -172,22 +172,28 @@ export default {
const
paramObj
=
{
file
:
fileInfo
,
fileType
:
fileType
}
let
param
=
{}
param
.
fileList
=
[
paramObj
]
this
.
$apis
.
common
.
uploadFileApi
(
param
,
res
=>
{
if
(
loading
!=
null
)
{
loading
.
close
()
loading
=
null
}
this
.
$set
(
this
.
materialForm
[
fieldName
][
id
],
'progress'
,
((
res
.
loaded
/
res
.
total
)
*
100
).
toFixed
(
2
))
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
(
'该文件上传失败'
)
}
})
}
...
...
@@ -337,8 +343,8 @@ export default {
position
:
absolute
;
}
.file-box
{
margin-top
:
12px
;
.file_tip
{
margin
:
8px
0
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
...
...
src/views/claims/components/repair.vue
View file @
25ef22d
...
...
@@ -114,10 +114,11 @@ export default {
isClear
:
true
,
isDisabled
:
this
.
pageType
==
2
},
{
{
label
:
'收款账号所在省市'
,
name
:
'bankCity'
,
type
:
'select'
,
placeholder
:
'可输入所在市关键词查询'
,
optionList
:
[],
optionId
:
'code'
,
optionLabel
:
'name'
,
...
...
src/views/claims/components/report.vue
View file @
25ef22d
...
...
@@ -181,6 +181,7 @@ export default {
label
:
'出险地点'
,
name
:
'reimbursementAddress'
,
type
:
'cascader'
,
placeholder
:
'可输入省、市或区关键字搜索'
,
isDisabled
,
isClear
:
true
,
handleChange
:
cellValue
=>
{
...
...
@@ -268,7 +269,7 @@ export default {
label
:
'出险地点'
,
name
:
'reimbursementAddress'
,
type
:
'cascader'
,
placeholder
:
'
请选择省/市/区
'
,
placeholder
:
'
可输入省、市或区关键字搜索
'
,
isDisabled
,
isClear
:
true
,
handleChange
:
cellValue
=>
{
...
...
src/views/claims/ghIndex.vue
View file @
25ef22d
...
...
@@ -149,7 +149,7 @@ export default {
{
label
:
'门店提交时间'
,
prop
:
'commitTime'
,
width
:
'1
6
0'
,
width
:
'1
8
0'
,
formatter
:
cellValue
=>
{
return
cellValue
.
commitTime
?
dayjs
(
cellValue
.
commitTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
...
...
@@ -157,7 +157,7 @@ export default {
{
label
:
'提交国任时间'
,
prop
:
'commitGuoRenDate'
,
width
:
'1
6
0'
,
width
:
'1
8
0'
,
formatter
:
cellValue
=>
{
return
cellValue
.
commitGuoRenDate
?
dayjs
(
cellValue
.
commitGuoRenDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
...
...
src/views/claims/ghOrder.vue
View file @
25ef22d
...
...
@@ -201,28 +201,18 @@ export default {
}
})
if
(
requirePrice
)
{
this
.
$message
({
message
:
'至少输入一项服务的定损批准金额'
,
type
:
'error'
})
this
.
$message
.
error
(
'至少输入一项服务的定损批准金额'
)
return
false
}
let
tipObj
=
{
isTip
:
false
,
tipMsg
:
''
}
let
fileTip
=
false
for
(
let
key
in
this
.
materialForm
)
{
if
(
this
.
materialForm
[
key
].
length
<
1
&&
!
tipObj
.
isTip
)
{
tipObj
.
isTip
=
true
tipObj
.
tipMsg
=
`请补全资料`
if
(
this
.
materialForm
[
key
].
length
<
1
&&
!
fileTip
)
{
fileTip
=
true
}
}
if
(
tipObj
.
isTip
)
{
this
.
$message
({
message
:
tipObj
.
tipMsg
,
type
:
'error'
})
if
(
fileTip
)
{
this
.
$message
.
error
(
`请补全资料`
)
return
false
}
return
valid
...
...
@@ -232,11 +222,18 @@ export default {
if
(
type
==
1
&&
!
this
.
validAccountInfo
())
{
return
false
}
if
(
!
this
.
routeInfo
.
orderId
&&
type
==
2
&&
!
this
.
permitDraft
)
{
this
.
$message
(
{
message
:
'请同步信息之后再保存草稿'
,
type
:
'error'
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
}
...
...
src/views/claims/index.vue
View file @
25ef22d
...
...
@@ -149,7 +149,7 @@ export default {
{
label
:
'门店提交时间'
,
prop
:
'commitTime'
,
width
:
'1
6
0'
,
width
:
'1
8
0'
,
formatter
:
cellValue
=>
{
return
cellValue
.
commitTime
?
dayjs
(
cellValue
.
commitTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
...
...
@@ -157,7 +157,7 @@ export default {
{
label
:
'提交国任时间'
,
prop
:
'commitGuoRenDate'
,
width
:
'1
6
0'
,
width
:
'1
8
0'
,
formatter
:
cellValue
=>
{
return
cellValue
.
commitGuoRenDate
?
dayjs
(
cellValue
.
commitGuoRenDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'-'
}
...
...
src/views/claims/order.vue
View file @
25ef22d
...
...
@@ -201,28 +201,18 @@ export default {
}
})
if
(
requirePrice
)
{
this
.
$message
({
message
:
'至少输入一项服务的定损批准金额'
,
type
:
'error'
})
this
.
$message
.
error
(
'至少输入一项服务的定损批准金额'
)
return
false
}
let
tipObj
=
{
isTip
:
false
,
tipMsg
:
''
}
let
fileTip
=
false
for
(
let
key
in
this
.
materialForm
)
{
if
(
this
.
materialForm
[
key
].
length
<
1
&&
!
tipObj
.
isTip
)
{
tipObj
.
isTip
=
true
tipObj
.
tipMsg
=
`请补全资料`
if
(
this
.
materialForm
[
key
].
length
<
1
&&
!
fileTip
)
{
fileTip
=
true
}
}
if
(
tipObj
.
isTip
)
{
this
.
$message
({
message
:
tipObj
.
tipMsg
,
type
:
'error'
})
if
(
fileTip
)
{
this
.
$message
.
error
(
`请补全资料`
)
return
false
}
return
valid
...
...
@@ -232,11 +222,18 @@ export default {
if
(
type
==
1
&&
!
this
.
validAccountInfo
())
{
return
false
}
if
(
!
this
.
routeInfo
.
orderId
&&
type
==
2
&&
!
this
.
permitDraft
)
{
this
.
$message
(
{
message
:
'请同步信息之后再保存草稿'
,
type
:
'error'
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
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment