Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
1ec7ac34
Commit
1ec7ac34
authored
Nov 13, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
acbb2a60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1237 additions
and
1 deletion
+1237
-1
HuiChaImport.vue
src/pages/financial/HuiChaImport.vue
+574
-0
Manfunds.vue
src/pages/financial/Manfunds.vue
+540
-0
erpindex.js
src/utils/erpindex.js
+123
-1
No files found.
src/pages/financial/HuiChaImport.vue
0 → 100644
View file @
1ec7ac34
<
style
>
@import
"./css/cssReset.css"
;
.currentManage
._vMG_edit
{
overflow
:
auto
;
display
:
none
;
position
:
absolute
;
font-family
:
'PingFangSc-Fine'
;
bottom
:
0
;
left
:
0
;
border-top
:
1px
solid
#d1d1d1
;
background-color
:
#FFFFFF
;
padding
:
10px
;
width
:
100%
;}
.currentManage
._vMG_edit
._tit
{
padding-left
:
10px
;
border-left
:
3px
solid
#E95252
;
font-size
:
16px
;
color
:
#000000
}
.currentManage
._vMG_edit
._tit
span
{
color
:
#666666
;
font-size
:
14px
;}
._edHeight
{
height
:
400px
;}
.edHeight
{
display
:
block
!important
;
height
:
230px
;}
._scrollbar
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;}
._scrollbar
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;}
._scrollbar
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;}
.currentManage
._info_box
ul
{
margin-top
:
15px
}
.currentManage
._info_box
ul
li
{
float
:
left
;
width
:
250px
;}
.currentManage
.po_content
{
border-collapse
:
collapse
;
}
.currentManage
.po_content
{
width
:
100%
;
}
.currentManage
.po_content
tr
:first-child
{
font-size
:
12px
;
color
:
#666666
;
background-color
:
#DCDCDC
;
}
.currentManage
.po_content
tr
th
,
.currentManage
.po_content
tr
td
{
padding
:
10px
20px
;
text-align
:
left
;
}
.currentManage
.po_content
tr
td
{
color
:
#333333
;
font-size
:
14px
;
border
:
1px
solid
#E6E6E6
;
}
.currentManage
.po_content
tr
td
.iconfont
{
font-size
:
14px
;
padding
:
4px
;
}
.RoomMealImport
.query-box
.iconfont
{
cursor
:
pointer
;
background-color
:
#E95252
;
color
:
white
;
width
:
30px
;
height
:
30px
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
30px
;
border-radius
:
50%
;
margin-left
:
10px
;
}
.currentManage
._yuan
{
width
:
12px
;
height
:
12px
;
background
:
rgba
(
233
,
82
,
82
,
1
);
border-radius
:
50%
;
display
:
inline-block
;
}
.currentManage
._yuan._yuan_red
{
background
:
#47BF8C
;
}
.RoomMealImport
.picload
{
width
:
138px
;
height
:
92px
;
border-radius
:
2px
;
cursor
:
pointer
;
margin-bottom
:
10px
;
padding
:
5px
;
margin-right
:
10px
;
position
:
relative
;
}
.RoomMealImport
.picload
.el-upload
{
width
:
138px
;
height
:
92px
;
}
.RoomMealImport
.picload
.el-upload-dragger
{
width
:
100%
;
height
:
100%
;
}
.RoomMealImport
._addUpload_box
>
div
{
float
:
left
;
width
:
138px
;
height
:
92px
;
border
:
1px
dashed
rgba
(
210
,
210
,
210
,
1
);
border-radius
:
2px
;
cursor
:
pointer
;
margin-bottom
:
10px
;
padding
:
5px
;
margin-right
:
10px
;
position
:
relative
;
}
.RoomMealImport
._addUpload_box
.icon-excel
,
.RoomMealImport
._addUpload_box
.icon-pdf
{
text-align
:
center
;
font-size
:
38px
;
color
:
green
;
line-height
:
75px
;
}
.RoomMealImport
._addUpload_box
.icon-guanbi1
{
font-size
:
12px
;
color
:
white
;
display
:
inline-block
;
margin-left
:
15px
;
position
:
absolute
;
right
:
-6px
;
top
:
-9px
;
background-color
:
#f56c6c
;
border-radius
:
50%
;
height
:
20px
;
width
:
20px
;
text-align
:
center
;
line-height
:
20px
;
}
</
style
>
<
template
>
<div
class=
"flexOne currentManage RoomMealImport"
>
<div>
<ul
style=
"margin:10px 0;text-align:right"
>
<li>
<a
class=
"hollowFixedBtn downBtn"
style=
"padding:4px 9px;"
:href=
"downList"
>
导入模板下载
</a>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible=true"
>
导入
</button>
<button
class=
"hollowFixedBtn"
@
click=
"AddR"
>
提交
</button>
<button
class=
"hollowFixedBtn"
@
click=
"Gourl"
>
跳转到我的财务单据
</button>
</li>
</ul>
</div>
<div
class=
"cm_content _scrollbar"
>
<table
class=
"po_content singeRowTable"
style=
"border:1px solid #E6E6E6;"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th>
编号
</th>
<th>
出团公司
</th>
<th>
团号
</th>
<th>
原币金额
</th>
<th>
币种
</th>
<th>
备注
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
:key=
"index"
>
<td>
{{
item
.
ID
}}
</td>
<td>
{{
item
.
BranchName
}}
</td>
<td>
{{
item
.
TCNUM
}}
</td>
<td>
{{
item
.
WBMoney
}}
</td>
<td>
{{
item
.
CurrencyName
}}
</td>
<td>
{{
item
.
Remark
}}
</td>
<!--
<td>
{{
item
.
Money
}}
</td>
-->
<!--
<td>
<span
style=
"cursor: pointer;color:blue;text-decoration:underline"
v-if=
"item.Type==2"
>
认领
</span>
<span
style=
"cursor: pointer;color:red;text-decoration:underline"
@
click=
"Delete(item)"
v-if=
"item.IsDelete==1"
>
删除
</span>
</td>
-->
</tr>
</table>
<div
class=
"noData"
v-if=
"DataList.length==0"
>
{{
$t
(
'system.content_noData'
)
}}
</div>
</div>
<el-dialog
custom-class=
'w700'
title=
"导入"
:visible
.
sync=
"outerVisible"
center
>
<el-upload
:show-file-list=
"false"
style=
"text-align: center;"
drag
class=
"upload-demo"
:action=
"importFileUrl2"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<!--
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传Excel文件
</div>
-->
</el-upload>
</el-dialog>
<el-dialog
width=
"1000px"
title=
"保存"
:visible
.
sync=
"moneyR"
center
>
<el-form
:rules=
"rules"
class=
"Rform"
ref=
"form"
:model=
"form"
label-width=
"110px"
>
<el-row>
<!--
<el-col
:span=
"8"
>
<el-form-item
label=
"导入类型"
>
<el-select
filterable
prop=
"ImportType"
v-model=
'msg.ImportType'
>
<el-option
label=
"房费"
:value=
'1'
></el-option>
<el-option
label=
"餐费"
:value=
'2'
></el-option>
<el-option
label=
"CHI包房"
:value=
'3'
></el-option>
<el-option
label=
"用房手配费"
:value=
'4'
></el-option>
<el-option
label=
"转账手续费"
:value=
'5'
></el-option>
</el-select>
</el-form-item>
</el-col>
-->
<el-col
:span=
"8"
>
<el-form-item
label=
"预计付款日期"
>
<el-date-picker
v-model=
"msg.PayDate"
value-format=
"yyyy-MM-dd"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"付款类型"
>
<el-select
filterable
prop=
"IsPublic"
v-model=
'msg.IsPublic'
>
<el-option
:label=
"$t('fnc.gongzhang')"
:value=
'1'
:key=
'1'
></el-option>
<el-option
:label=
"$t('fnc.sizhang')"
:value=
'0'
:key=
'0'
></el-option>
<el-option
:label=
"$t('fnc.rmbxianjin')"
:value=
'2'
:key=
'2'
></el-option>
<el-option
:label=
"$t('fnc.wbxianjin')"
:value=
'3'
:key=
'3'
></el-option>
<el-option
:label=
"$t('fnc.zjinchi')"
:value=
'4'
:key=
'4'
></el-option>
<el-option
:label=
"$t('fnc.ptxnzhanghu')"
:value=
'5'
:key=
'5'
></el-option>
<el-option
:label=
"$t('fnc.djxnzhanghu')"
:value=
'6'
:key=
'6'
></el-option>
<el-option
:label=
"$t('fnc.szxiangdi')"
:value=
'7'
:key=
'7'
></el-option>
<el-option
label=
"原路退款"
:value=
'8'
:key=
'8'
></el-option>
<el-option
label=
"地接预支款"
:value=
'9'
:key=
'9'
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"客户类型"
>
<el-select
v-if=
"!showDisable"
filterable
v-model=
'msg.ClientType'
@
change=
"financeinfo_post_GetClientAccountList(msg.ClientType)"
>
<el-option
v-for=
'item in ClientTypeList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"客户名称"
>
<el-select
filterable
v-model=
'msg.ClientID'
>
<el-option
v-for=
'item in ClientAccountList'
:label=
'item.Name'
:value=
'item.ID'
:key=
'item.ID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"上传附件"
>
<div
class=
"picload"
>
<el-upload
style=
"width: 138px;height: 92px;"
drag
:http-request=
"uploadFileBtn"
:multiple=
"true"
:show-file-list=
"false"
action=
""
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
<div
class=
"el-upload__text"
>
{{
$t
(
'active.ld_djscwj'
)
}}
</div>
</el-upload>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"16"
style=
"padding-top:5px"
>
<div
class=
"_addUpload_box"
v-for=
"(file,fIndex) in saveMsg"
:key=
"fIndex"
>
<div
v-if=
"file.Type==3"
>
<div
style=
"width:100%;height:100%;overflow: hidden;"
>
<img
style=
"width:100%"
:src=
"file.Url?file.Url:file.Content"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
<div
v-if=
"file.Type==1"
>
<div
class=
"iconfont "
:class=
"file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
<div
v-if=
"file.Type==2"
>
<div
class=
"iconfont icon-excel"
@
click=
"showUpLoadFile(file)"
>
</div>
<span
class=
"iconfont icon-guanbi1"
@
click=
"deleteUploadFile(fIndex)"
></span>
</div>
</div>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"moneyR = false"
>
取 消
</el-button>
<el-button
:loading=
"Btnloading"
size=
"small"
type=
"danger"
@
click=
"RSumbit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
form
:{
ID
:
""
,
FrId
:
''
,
},
moneyR
:
false
,
outerVisible
:
false
,
msg
:{
ImportType
:
''
,
IsPublic
:
""
,
ClientType
:
""
,
ClientID
:
""
,
vorcherInos
:[],
PayDate
:
''
,
},
productionDate
:[],
DataList
:[],
loading
:
false
,
currentPage
:
1
,
total
:
0
,
currencyTypeList
:[],
importFileUrl2
:
""
,
downList
:
""
,
showDisable
:
false
,
ClientAccountList
:[],
ClientTypeList
:[],
saveMsg
:[],
rules
:
{
ImportType
:
[
{
required
:
true
,
message
:
'请选择导入类型'
,
trigger
:
'change'
}
],
IsPublic
:
[
{
required
:
true
,
message
:
'请选择付款类型'
,
trigger
:
'change'
}
],
},
Btnloading
:
false
,
}
},
created
(){
let
userInfo
=
this
.
getLocalStorage
();
this
.
importFileUrl2
=
this
.
domainManager
().
UploadFileUrl
+
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&RB_Group_id=2&Type=8&EmployeeId="
+
userInfo
.
EmployeeId
;
this
.
downList
=
this
.
domainManager
().
LocalTemplateFileDownLoadUrl
+
"/Upload/Template/汇率批量导入模板.xls"
;
},
filters
:{
PNumber
(
val
){
if
(
val
){
return
val
.
substr
(
0
,
4
)
+
"****"
+
val
.
substr
(
-
4
,
4
)
}
},
},
mounted
(){
this
.
GetAccount
();
this
.
financeinfo_post_GetClientTypeList
();
},
methods
:
{
financeinfo_post_GetClientTypeList
(){
// 获取对象类型
this
.
apipost
(
'financeinfo_post_GetClientTypeList'
,{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ClientTypeList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
showUpLoadFile
(
i
){
// 预览上传文件
if
(
i
.
Type
==
3
){
this
.
picObj
.
push
(
i
.
Url
);
this
.
picIsShow
=
true
;
}
else
{
if
(
i
.
Content
.
substring
(
i
.
Content
.
lastIndexOf
(
'.'
)
+
1
,
i
.
Content
.
length
).
toUpperCase
()
==
'PDF'
){
this
.
previewPDF
(
i
.
Url
)
}
else
{
window
.
open
(
"https://view.officeapps.live.com/op/view.aspx?src="
+
i
.
Url
)
}
}
},
deleteUploadFile
(
i
){
// 删除上传文件
this
.
saveMsg
.
splice
(
i
,
1
);
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
10
)
{
this
.
$message
.
warning
(
this
.
$t
(
'tips.wjdxbncgsz'
))
return
}
// 1 文档 2 数据 3 图片
let
typeArr
=
[
{
stringArr
:
'GIF|JPG|JPEG|PNG|BMP'
,
type
:
3
},
{
stringArr
:
'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF'
,
type
:
1
},
]
let
ft
=
file
.
file
.
name
.
substring
(
file
.
file
.
name
.
lastIndexOf
(
'.'
)
+
1
,
file
.
file
.
name
.
length
).
toUpperCase
();
let
fileTypeNumber
=
2
;
let
typeOk
=
false
;
typeArr
.
forEach
(
x
=>
{
if
(
x
.
stringArr
.
indexOf
(
ft
)
!=
'-1'
)
{
fileTypeNumber
=
x
.
type
;
typeOk
=
true
;
}
})
if
(
!
typeOk
)
return
this
.
$message
.
error
(
this
.
$t
(
'tips.qscWEfile'
));
let
newArr
=
[];
newArr
.
push
(
file
.
file
)
let
path
=
"/Upload/Temporary/"
this
.
$message
.
info
(
this
.
$t
(
'tips.shangchuanzhong'
))
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
fileSize
=
file
.
file
.
size
<
1024
?
file
.
file
.
size
:(
file
.
file
.
size
/
1024
).
toFixed
(
0
);
this
.
saveMsg
.
push
({
Content
:
x
.
data
.
FilePath
,
ID
:
0
,
Type
:
fileTypeNumber
,
Url
:
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
,
})
this
.
$message
.
success
(
this
.
$t
(
'tips.scchenggong'
))
},
1
);
},
IsPublicChange
(
val
){
this
.
showDisable
=
false
;
this
.
msg
.
ClientType
=
''
;
this
.
msg
.
ClientID
=
''
;
this
.
msg
.
AccountNumber
=
''
;
this
.
ClientAccountListS
=
[];
if
(
val
==
8
||
val
==
9
){
this
.
showDisable
=
true
;
}
},
financeinfo_post_GetClientAccountList
(
t
,
i
){
//获取付款 对象类型 新增用
let
msg
=
{
ID
:
0
,
Type
:
t
,
ObjID
:
0
,
CardNum
:
''
}
if
(
i
>=
0
){
msg
.
ID
=
i
;
}
else
{
this
.
msg
.
ClientID
=
''
;
this
.
msg
.
AccountNumber
=
''
;
this
.
msg
.
RemitterName
=
''
;
this
.
msg
.
IsLeader
=
1
;
}
this
.
apipost
(
'financeinfo_post_GetClientAccountList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
ClientAccountList
=
[];
if
(
i
){
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
AccountHolder
+
+
`(
${
x
.
AccountAlias
}
)`
,
Nom
:
x
.
CardNum
,
OpenBankName
:
x
.
OpenBankName
,
allName
:
x
.
CardNum
+
" "
+
x
.
OpenBankName
,
ObjID
:
x
.
ObjID
,
}
ClientAccountList
.
push
(
obj
)
})
this
.
ClientAccountListS
=
ClientAccountList
;
}
else
{
data
.
forEach
(
x
=>
{
let
obj
=
{
ID
:
x
.
ID
,
Name
:
x
.
AccountHolder
+
`(
${
x
.
AccountAlias
}
)`
,
Nom
:
x
.
CardNum
,
OpenBankName
:
x
.
OpenBankName
,
ObjID
:
x
.
ObjID
,
}
ClientAccountList
.
push
(
obj
)
})
this
.
ClientAccountList
=
ClientAccountList
;
}
}
},
err
=>
{})
},
GetClientAccountList
(
i
){
//获取客户名称并且根据费用类型和付款对象获取客户账号
this
.
msg
.
AccountNumber
=
''
;
this
.
ClientAccountList
.
forEach
(
x
=>
{
if
(
x
.
ID
==
i
){
this
.
msg
.
RemitterName
=
x
.
Name
;
this
.
financeinfo_post_GetClientAccountList
(
this
.
msg
.
ClientType
,
x
.
ID
);
}
})
},
AddR
(
item
){
this
.
moneyR
=
true
;
},
Delete
(
item
){
var
msg
=
{
ID
:
item
.
ID
}
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'Financial_post_DelFinanceRemittanceClaim'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getList
()
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
null
)
}).
catch
(()
=>
{
});
},
RSumbit
(){
this
.
msg
.
vorcherInos
=
this
.
saveMsg
;
if
(
this
.
msg
.
PayDate
==
""
){
this
.
Error
(
"请选择时间!"
);
return
;
}
if
(
!
this
.
msg
.
RateDiffList
||
this
.
msg
.
RateDiffList
.
length
==
0
){
this
.
Error
(
"请先导入模板!"
);
return
;
}
this
.
Btnloading
=
true
;
this
.
apipost
(
'Financial_post_SetRateDifferenceBetchImport'
,
this
.
msg
,
res
=>
{
this
.
Btnloading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
Success
(
res
.
data
.
message
)
this
.
DataList
=
[];
this
.
initMsg
();
this
.
moneyR
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
initMsg
(){
this
.
saveMsg
=
[];
this
.
msg
=
{
ImportType
:
''
,
IsPublic
:
""
,
ClientType
:
""
,
ClientID
:
""
,
vorcherInos
:[],
PayDate
:
''
,
}
},
Gourl
(){
this
.
$router
.
push
({
name
:
"FinancialDocuments"
,
query
:
{
blank
:
'y'
}
})
},
beforeAvatarUpload
(
file
)
{
return
;
const
isJPG
=
file
.
type
===
"application/x-msdownload"
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
"上传文件只能是 excel 格式!"
);
}
return
isJPG
&&
isLt2M
;
},
//上传
handleAvatarSuccess
(
res
,
file
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
msg
.
RateDiffList
=
res
.
data
;
this
.
DataList
=
res
.
data
;
this
.
outerVisible
=
false
;
}
else
{
this
.
Error
(
res
.
message
);
}
},
GetAccount
(){
this
.
apipost
(
'bankaccount_post_GetList'
,{
TypeId
:
'0'
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
currencyTypeList
=
res
.
data
.
data
;
}
else
{
}
},
err
=>
{})
},
},
}
</
script
>
src/pages/financial/Manfunds.vue
0 → 100644
View file @
1ec7ac34
<
style
scoped
>
@import
"./css/cssReset.css"
;
.currentManage
.addCompany
{
width
:
440px
;}
/* 币种管理 */
.cm_content
{
padding
:
0
;
overflow-x
:
auto
;}
.cmc_item
{
float
:
left
;
width
:
212px
;
height
:
195px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
4px
;
overflow
:
hidden
;
margin-right
:
12px
;
margin-bottom
:
15px
;
border
:
1px
solid
#ebebeb
}
.cmci_top
{
background-color
:
#3AD892
;
padding
:
14px
20px
;
font-size
:
14px
;
color
:
#009251
}
.cmci_top
p
span
:nth-child
(
2
)
{
display
:
inline-block
;
padding
:
2px
5px
;
font-size
:
12px
;
color
:
#FFFFFF
;
background-color
:
#02AE62
;
border-radius
:
4px
;
margin-left
:
5px
;
vertical-align
:
top
;}
.cmci_cen
{
padding
:
14px
20px
;
color
:
#666666
;
font-size
:
12px
}
.cmci_cen
p
{
padding
:
4px
0
;}
.cmci_cen
p
.fr
{
font-weight
:
bold
;
font-family
:
"PingFangSC-fine"
;
color
:
#333333
}
.cmci_cen
p
.icon-shuaxin
{
background-color
:
#E7E7E7
;
color
:
#999999
;
display
:
inline-block
;
margin-left
:
5px
;
border-radius
:
50%
;
font-size
:
12px
;
transform
:
rotate
(
60deg
);
cursor
:
pointer
;
transition
:
all
linear
0.2s
;
width
:
12px
;
height
:
12px
;
line-height
:
12px
;}
.cmci_cen
p
.icon-shuaxin
:hover
{
background-color
:
#E95252
;
color
:
white
;}
.fc_green
{
color
:
#47BF8C
!important
}
.fc_red
{
color
:
#E95252
!important
}
.cmci_bot
{
padding
:
0
20px
20px
20px
;
font-size
:
12px
!important
;
text-align
:
center
}
.cmci_bot
.el-button-group
.el-button
{
padding
:
4px
;}
.cmci_bot
.el-button
{
font-size
:
12px
!important
}
.cmc_item
:hover
{
box-shadow
:
0px
0px
20px
rgba
(
191
,
191
,
191
,
1
);
transition
:
all
linear
0.5s
;}
._benwei
{
background-color
:
#2AAEF2
!important
;
color
:
#0877B0
!important
}
._benweiA
{
background-color
:
#0F80BA
!important
}
._underline
{
text-decoration
:
underline
;
cursor
:
pointer
;}
.currentManage
._vMG_edit
{
overflow
:
auto
;
display
:
none
;
position
:
absolute
;
font-family
:
'PingFangSc-Fine'
;
bottom
:
0
;
left
:
0
;
border-top
:
1px
solid
#d1d1d1
;
background-color
:
#FFFFFF
;
padding
:
10px
;
width
:
100%
;}
.currentManage
._vMG_edit
._tit
{
padding-left
:
10px
;
border-left
:
3px
solid
#E95252
;
font-size
:
16px
;
color
:
#000000
}
.currentManage
._vMG_edit
._tit
span
{
color
:
#666666
;
font-size
:
14px
;}
._edHeight
{
height
:
400px
;}
.edHeight
{
display
:
block
!important
;
height
:
230px
;}
._scrollbar
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;}
._scrollbar
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;}
._scrollbar
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;}
.currentManage
._info_box
ul
{
margin-top
:
15px
}
.currentManage
._info_box
ul
li
{
float
:
left
;
width
:
250px
;}
._max_width
{
max-width
:
100px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
display
:
inline-block
;
vertical-align
:
top
;}
._yingkui
{
height
:
40px
;
line-height
:
40px
;
font-size
:
12px
;
color
:
#666666
}
._tips
{
font-size
:
12px
;
color
:
#666666
;
padding
:
15px
0
}
.currentManage
.po_content
{
border-collapse
:
collapse
;
}
.currentManage
.po_content
{
width
:
100%
;
}
.currentManage
.po_content
tr
:first-child
{
font-size
:
12px
;
color
:
#666666
;
background-color
:
#DCDCDC
;
}
.currentManage
.po_content
tr
th
,
.currentManage
.po_content
tr
td
{
padding
:
10px
20px
;
text-align
:
left
;
}
.currentManage
.po_content
tr
td
{
color
:
#333333
;
font-size
:
14px
;
border
:
1px
solid
#E6E6E6
;
}
.currentManage
.po_content
tr
td
.iconfont
{
font-size
:
14px
;
padding
:
4px
;
}
.currentManage
.query-box
.iconfont
{
cursor
:
pointer
;
background-color
:
#E95252
;
color
:
white
;
width
:
30px
;
height
:
30px
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
30px
;
border-radius
:
50%
;
margin-left
:
10px
;
}
.currentManage
._yuan
{
width
:
12px
;
height
:
12px
;
background
:
rgba
(
233
,
82
,
82
,
1
);
border-radius
:
50%
;
display
:
inline-block
;
}
.currentManage
._yuan._yuan_red
{
background
:
#47BF8C
;
}
._flex_rete
{
cursor
:
pointer
;
}
.display_none
{
opacity
:
0
;
}
._flex_rete
.icon-qiehuan
{
background-color
:
#E5E5E5
;
color
:
white
;
height
:
20px
;
width
:
20px
;
border-radius
:
50%
;
text-align
:
center
;
font-size
:
12px
;
padding
:
0
!important
;
line-height
:
20px
;
float
:
right
;
}
._flex_rete
.icon-qiehuan
:hover
{
background-color
:
rgba
(
233
,
82
,
82
,
1
);
color
:
white
;
}
.Rform
p
{
padding
:
6px
0
;
text-decoration
:
underline
}
.hoverFriD
:hover
{
color
:
red
;
}
.Rform
span
{
display
:
inline-block
;
width
:
80px
;
text-align
:
right
;
}
</
style
>
<
template
>
<div
class=
"flexOne currentManage"
>
<div
class=
"query-box"
>
<ul>
<li>
<span>
<em>
编号
</em>
<el-input
onkeyup=
"value=value.replace(/[^\w\.\/]/ig,'')"
v-model=
"msg.ID"
></el-input>
</span>
</li>
<li>
<span>
<em>
类型
</em>
<el-select
filterable
v-model=
'msg.BankType'
@
change=
"getBank"
>
<el-option
:value=
"0"
label=
"不限"
></el-option>
<el-option
:value=
"1"
label=
"银行"
></el-option>
<el-option
:value=
"2"
label=
"平台"
></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>
银行账户
</em>
<el-select
filterable
v-model=
'msg.BankAccountId'
>
<el-option
key=
"0"
:value=
"0"
label=
"不限"
></el-option>
<el-option
v-for=
"item in currencyTypeList"
:key=
"item.ID"
:value=
"item.ID"
:label=
"item.Alias"
></el-option>
</el-select>
</span>
</li>
<!--
<li>
<span>
<em>
开户名
</em>
<el-input
v-model=
"msg.AccountName"
></el-input>
</span>
</li>
-->
<li>
<span>
<em>
收款金额
</em>
<el-input
style=
"width:100px"
v-model=
"msg.SIncome"
></el-input>
-
<el-input
style=
"width:100px"
v-model=
"msg.EIncome"
></el-input>
</span>
</li>
<li>
<span>
<em>
付款金额
</em>
<el-input
style=
"width:100px"
v-model=
"msg.SRefund"
></el-input>
-
<el-input
style=
"width:100px"
v-model=
"msg.ERefund"
></el-input>
</span>
</li>
<li>
<span>
<em>
对方户名
</em>
<el-input
v-model=
"msg.Remitter"
></el-input>
</span>
</li>
<li>
<span>
<em>
交易时间
</em>
<el-date-picker
class=
"h34"
@
change=
"timeAdd"
v-model=
"productionDate"
type=
"daterange"
value-format=
"yyyy-MM-dd"
:range-separator=
"$t('restaurant.res_To')"
>
</el-date-picker>
</span>
</li>
<li>
<span>
<em>
状态
</em>
<el-select
filterable
v-model=
'msg.Type'
>
<el-option
:value=
"-1"
label=
"不限"
></el-option>
<el-option
:value=
"1"
label=
"已认领"
></el-option>
<el-option
:value=
"2"
label=
"未认领"
></el-option>
</el-select>
</span>
</li>
<li>
<button
class=
"hollowFixedBtn"
@
click=
"getList(),getTongji()"
>
{{
$t
(
'pub.searchBtn'
)
}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible=true"
>
导入
</button>
<a
class=
"hollowFixedBtn downBtn"
style=
"padding:6px 9px;"
:href=
"downList"
>
导入模板下载
</a>
</li>
</ul>
</div>
<div
style=
"margin:15px 0;font-size:14px"
>
<span>
未认总收:
{{
datainfo
.
Income
}}
</span>
<span
style=
"margin:0 15px"
>
审核金额:
{{
datainfo
.
AuditMoney
}}
</span>
<span>
进日报表:
{{
datainfo
.
ReportMoney
}}
</span>
</div>
<div
class=
"cm_content _scrollbar"
>
<table
class=
"po_content singeRowTable"
style=
"border:1px solid #E6E6E6;"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th>
编号
</th>
<th>
类型
</th>
<th>
别名/户名
</th>
<th>
开户行/账号
</th>
<th>
交易时间
</th>
<th>
收
</th>
<th>
支
</th>
<th>
对方户名
</th>
<th>
认领单号
</th>
<th>
认款金额
</th>
<th>
已审核
</th>
<th>
进日报表
</th>
<th>
财务人员
</th>
<th>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
:key=
"index"
>
<td>
{{
item
.
ID
}}
</td>
<td>
<span
v-if=
"item.BankType==1"
>
银行
</span>
<span
v-if=
"item.BankType==2"
>
平台
</span>
</td>
<td>
{{
item
.
Alias
}}
<p>
{{
item
.
AccountName
}}
</p>
</td>
<td>
{{
item
.
OpeningBank
}}
<p>
{{
item
.
BackNo
}}
</p>
</td>
<td>
{{
item
.
TradeDate
}}
</td>
<td>
{{
item
.
Income
}}
</td>
<td>
{{
item
.
Refund
}}
</td>
<td>
{{
item
.
Remitter
}}
</td>
<td>
<span
class=
"hoverFriD"
style=
"cursor: pointer;text-decoration: underline;margin-left:5px"
@
click=
"Gourl(i)"
v-for=
"(i,index) in item.FinanceIdList"
:key=
"index+500"
>
{{
i
}}
</span>
</td>
<td>
{{
item
.
ClaimMoney
}}
</td>
<td>
{{
item
.
AuditMoney
}}
</td>
<td>
{{
item
.
ReportMoney
}}
</td>
<td>
<div>
{{
item
.
UpdateBy
}}
</div>
<div
style=
"font-size:12px;"
>
{{
item
.
UpdateDate
}}
</div>
</td>
<td>
<span
style=
"cursor: pointer;color:blue;text-decoration:underline"
@
click=
"AddR(item)"
v-if=
"item.Type==2"
>
认领
</span>
<!--
<span>
|
</span>
-->
<span
style=
"cursor: pointer;color:red;text-decoration:underline"
@
click=
"Delete(item)"
v-if=
"item.IsDelete==1"
>
删除
</span>
</td>
</tr>
</table>
<div
class=
"noData"
v-if=
"DataList.length==0"
>
{{
$t
(
'system.content_noData'
)
}}
</div>
<div>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
msg.pageSize
:total=
total
>
</el-pagination>
</div>
</div>
<el-dialog
custom-class=
'w700'
title=
"导入"
:visible
.
sync=
"outerVisible"
center
>
<el-upload
style=
"text-align: center;"
drag
class=
"upload-demo"
:action=
"importFileUrl2"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<!--
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传Excel文件
</div>
-->
</el-upload>
</el-dialog>
<el-dialog
custom-class=
'w400'
title=
"认领未认款"
:visible
.
sync=
"moneyR"
center
>
<el-form
class=
"Rform"
ref=
"form"
:model=
"form"
label-width=
"100px"
>
<p><span>
户名:
</span>
{{
form
.
AccountName
}}
</p>
<p><span>
账号:
</span>
{{
form
.
BackNo
}}
</p>
<p><span>
收:
</span>
{{
form
.
Income
}}
</p>
<p><span>
支:
</span>
{{
form
.
Refund
}}
</p>
<el-form-item
label=
"绑定财务单据"
>
<el-input
v-model=
"form.FrId"
class=
"w180"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"moneyR = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"RSumbit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
form
:{
ID
:
""
,
FrId
:
''
,
},
moneyR
:
false
,
outerVisible
:
false
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
StartTime
:
""
,
EndTime
:
""
,
BankAccountId
:
""
,
Remitter
:
""
,
SIncome
:
""
,
EIncome
:
""
,
SRefund
:
""
,
ERefund
:
""
,
AccountName
:
""
,
Type
:
-
1
,
BankType
:
0
,
},
productionDate
:[],
DataList
:[],
loading
:
false
,
currentPage
:
1
,
total
:
0
,
currencyTypeList
:[],
importFileUrl2
:
""
,
downList
:
""
,
TypeList1
:[],
TypeList2
:[],
datainfo
:{},
}
},
created
(){
let
userInfo
=
this
.
getLocalStorage
();
this
.
importFileUrl2
=
this
.
domainManager
().
UploadFileUrl
+
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&RB_Group_id=2&Type=5&EmployeeId="
+
userInfo
.
EmployeeId
;
this
.
downList
=
this
.
domainManager
().
LocalTemplateFileDownLoadUrl
+
"/Upload/Template/未认款导入模板.xls"
;
this
.
GetAccount
();
this
.
GetAccount2
();
this
.
getList
();
this
.
getTongji
();
},
filters
:{
PNumber
(
val
){
if
(
val
){
return
val
.
substr
(
0
,
4
)
+
"****"
+
val
.
substr
(
-
4
,
4
)
}
},
},
mounted
(){
if
(
this
.
$route
.
query
.
StartTime
){
this
.
productionDate
=
[];
this
.
productionDate
[
0
]
=
this
.
$route
.
query
.
StartTime
;
this
.
productionDate
[
1
]
=
this
.
$route
.
query
.
EndTime
;
}
},
methods
:
{
getTongji
(){
this
.
apipost
(
'Financial_get_GetFinanceRemittanceClaimStatistics'
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
datainfo
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
getBank
(
val
){
if
(
val
==
1
){
this
.
currencyTypeList
=
this
.
TypeList1
;
}
if
(
val
==
2
){
this
.
currencyTypeList
=
this
.
TypeList2
;
}
},
checkInt
(
obj
){
},
AddR
(
item
){
this
.
form
.
ID
=
item
.
ID
;
this
.
form
.
AccountName
=
item
.
AccountName
;
this
.
form
.
BackNo
=
item
.
BackNo
;
this
.
form
.
Income
=
item
.
Income
;
this
.
form
.
Refund
=
item
.
Refund
;
this
.
moneyR
=
true
;
},
Delete
(
item
){
var
msg
=
{
ID
:
item
.
ID
}
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apipost
(
'Financial_post_DelFinanceRemittanceClaim'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
)
this
.
getList
()
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
null
)
}).
catch
(()
=>
{
});
},
RSumbit
(){
if
(
this
.
form
.
FrId
==
""
){
this
.
Error
(
"请输入财务单据ID"
);
return
;
}
this
.
apipost
(
'Financial_post_GetFinanceMoney'
,{
FrId
:
this
.
form
.
FrId
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
apipost
(
'Financial_post_SetFinanceRemittanceClaim'
,
this
.
form
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
Success
(
res
.
data
.
message
)
this
.
getList
();
this
.
moneyR
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
}
else
{
this
.
Error
(
res
.
data
.
message
)
}
},
err
=>
{})
},
Gourl
(
i
){
this
.
$router
.
push
({
name
:
"FinancialDocumentsDetail"
,
query
:
{
id
:
i
,
blank
:
'y'
}
})
},
beforeAvatarUpload
(
file
)
{
return
;
const
isJPG
=
file
.
type
===
"application/x-msdownload"
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
"上传文件只能是 excel 格式!"
);
}
return
isJPG
&&
isLt2M
;
},
//上传
handleAvatarSuccess
(
res
,
file
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
Success
(
res
.
message
);
this
.
outerVisible
=
false
;
this
.
getList
();
}
else
{
this
.
Error
(
res
.
message
);
}
},
resetPageIndex
(){
// 重置页码
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
handleCurrentChange
(
val
)
{
//翻页
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
(){
this
.
loading
=
true
;
this
.
apipost
(
'Financial_post_GetFinanceRemittanceClaimPageList'
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
DataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
timeAdd
(){
if
(
!
this
.
productionDate
){
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
return
}
this
.
msg
.
StartTime
=
this
.
productionDate
[
0
];
this
.
msg
.
EndTime
=
this
.
productionDate
[
1
];
},
GetAccount
(){
this
.
apipost
(
'bankaccount_post_GetList'
,{
TypeId
:
'0'
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
TypeList1
=
res
.
data
.
data
;
if
(
this
.
$route
.
query
.
BankType
){
this
.
msg
.
BankType
=
Number
(
this
.
$route
.
query
.
BankType
)
this
.
getBank
(
this
.
msg
.
BankType
)
}
if
(
this
.
$route
.
query
.
BankID
){
this
.
msg
.
BankAccountId
=
Number
(
this
.
$route
.
query
.
BankID
)
}
}
else
{
}
},
err
=>
{})
},
GetAccount2
(){
let
msg
=
{
BackId
:
0
,
TypeId
:
12
,
BranchId
:
-
1
,
Alias
:
''
,
// RB_Branch_Id:this.RB_Branch_Id,
}
this
.
apipost
(
'BankAccount_post_GetPlatformList'
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
this
.
TypeList2
=
data
;
}
},
err
=>
{})
},
},
}
</
script
>
src/utils/erpindex.js
View file @
1ec7ac34
...
...
@@ -6,6 +6,65 @@ export default{
apiurl
:
''
},
install
(
Vue
,
options
){
//消息成功提示
Vue
.
prototype
.
Success
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"success"
});
},
//错误提示
Vue
.
prototype
.
Error
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"error"
});
},
//一般提示
Vue
.
prototype
.
Info
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"info"
});
},
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"warning"
});
},
//Confirm
Vue
.
prototype
.
Confirm
=
function
(
msg
,
callback
)
{
this
.
$confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
if
(
typeof
callback
===
'function'
)
{
callback
();
}
})
.
catch
(()
=>
{
this
.
Info
(
"已取消操作"
);
});
},
Vue
.
prototype
.
random_string
=
function
(
len
)
{
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
maxPos
=
chars
.
length
;
var
pwd
=
''
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
pwd
+=
chars
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
maxPos
));
}
return
pwd
;
},
//ERP本地缓存
Vue
.
prototype
.
md5
=
md5
;
Vue
.
prototype
.
getLocalStorage
=
function
()
{
...
...
@@ -126,7 +185,70 @@ export default{
successCall
(
res
);
}
},
faildCall
)
}
},
Vue
.
prototype
.
uploadFile
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
nameList
.
push
(
this
.
random_string
());
}
var
oss
=
new
OSS
({
region
:
'oss-cn-chengdu'
,
accessKeyId
:
'LTAIwE7l9dImZSa3'
,
accessKeySecret
:
'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI'
,
bucket
:
'vt-im-bucket'
})
let
that
=
this
;
let
checkpoint
=
null
;
let
percentage
=
0
;
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
fileName
=
"/New"
+
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
var
result
=
yield
oss
.
multipartUpload
(
fileName
,
files
[
index
],
{
progress
:
function
*
(
p
)
{},
mime
:
'application/octet-stream'
})
successCall
(
result
);
}
}).
catch
(
function
(
err
)
{
});
}
},
//上传文件到本地服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
,
ocr
)
{
if
(
files
&&
files
.
length
>
0
)
{
let
nameList
=
new
Array
()
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
nameList
.
push
(
this
.
random_string
());
}
let
that
=
this
;
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
var
formData
=
new
FormData
();
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload?filePath="
+
path
+
'&ocr='
+
ocr
;
formData
.
append
(
"myfile"
,
files
[
index
]);
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
successCall
(
res
);
}).
catch
(
function
(
reason
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
that
.
MsgBus
.
$emit
(
'UploadSelfFileErr'
)
});
}
}).
catch
(
function
(
err
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
});
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment