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 7d7342b1
authored
Mar 13, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
交互优化
1 parent
a70b5861
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
11 deletions
src/views/addCode/index.vue
src/views/addCode/index.vue
View file @
7d7342b
...
...
@@ -46,7 +46,7 @@
</el-popover>
</div>
</div>
<div
class=
"file_name"
v-if=
"
errorFileInfo.fileName"
>
{{
errorFileInfo
.
fileN
ame
}}
</div>
<div
class=
"file_name"
v-if=
"
fileData && fileData.name"
>
{{
fileData
.
n
ame
}}
</div>
</div>
<div
class=
"file_info"
>
<div
class=
"file_num"
>
...
...
@@ -82,6 +82,7 @@
return
{
size
:
'small'
,
exampleImg
,
uploaded
:
false
,
isVisible
:
false
,
requestTip
:
false
,
contractNoStr
:
''
,
...
...
@@ -89,6 +90,7 @@
contractNoList
:
[],
errorNoList
:
[],
errorFileInfo
:{},
fileData
:
{},
getListApi
:
this
.
$apis
.
addCode
.
getcodeList
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageCount'
,
totalCount
:
'total'
},
pageSizes
:
[
5
,
10
,
20
,
30
,
40
],
...
...
@@ -216,6 +218,30 @@
this
.
$refs
.
file
.
value
=
''
return
false
}
this
.
uploaded
=
false
this
.
fileData
=
file
},
handleUploadFile
(){
if
(
!
this
.
fileData
.
size
)
return
this
.
$message
({
message
:
'请上传文件'
,
type
:
'error'
,
customClass
:
'msgHierarchy'
});
if
(
this
.
uploaded
){
if
(
this
.
errorFileInfo
.
effectiveSize
<=
0
){
this
.
$message
({
message
:
'有效合同号为0'
,
type
:
'error'
,
customClass
:
'msgHierarchy'
})
this
.
fileData
=
{}
}
else
{
this
.
clearData
()
}
this
.
uploaded
=
false
return
false
}
const
file
=
this
.
fileData
const
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
event
=>
{
...
...
@@ -233,15 +259,15 @@
this
.
$apis
.
addCode
.
uploadCodeFile
({
file
:
fileUrl
}).
then
(
res
=>
{
loading
.
close
()
if
(
res
?.
batchNo
)
{
res
.
fileName
=
file
?.
name
this
.
errorFileInfo
=
res
this
.
uploaded
=
true
}
this
.
$refs
.
file
.
value
=
''
}).
catch
(
err
=>
{
loading
.
close
()
})
}
},
},
// 下载错误的合同号
handleExport
()
{
const
params
=
{
...
...
@@ -262,6 +288,7 @@
})
},
createCode
()
{
this
.
uploaded
=
false
this
.
isVisible
=
true
},
onOk
(){
...
...
@@ -309,14 +336,7 @@
loading
.
close
()
})
}
else
{
if
(
this
.
errorFileInfo
.
effectiveSize
<=
0
){
return
this
.
$message
({
message
:
'有效合同号为0'
,
type
:
'error'
,
customClass
:
'msgHierarchy'
})
}
this
.
clearData
()
this
.
handleUploadFile
()
}
},
clearData
(){
...
...
@@ -327,6 +347,7 @@
this
.
contractNoList
=
[],
this
.
errorNoList
=
[]
this
.
errorFileInfo
=
{}
this
.
fileData
=
{}
this
.
handleRest
()
},
handleClose
()
{
...
...
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