Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
柳 佳乐
finance
Commits
fdfb3666
Commit
fdfb3666
authored
Nov 17, 2022
by
柳 佳乐
Browse files
20221117
parent
2b231389
Changes
20
Show whitespace changes
Inline
Side-by-side
src/api/companyFile.js
View file @
fdfb3666
...
...
@@ -24,3 +24,11 @@ export function queryBypageByuserId(data) {
data
})
}
//获取在线预览url
export
function
getFileUrl
(
fileName
)
{
return
request
({
url
:
`/file/getFileUrl?fileName=
${
fileName
}
`
,
method
:
'
post
'
})
}
src/utils/myValidate.js
View file @
fdfb3666
...
...
@@ -104,16 +104,26 @@ export function checkPhone(rule, value, callback) {
};
//路径校验
export
function
pathValid
(
rule
,
value
,
callback
)
{
const
RegExp
=
/^
\/
.*/
const
RegExp
=
/^
\/
[\S]
.*/
if
(
!
value
)
{
return
callback
(
new
Error
(
'
路劲不能为空
'
))
}
else
if
(
!
RegExp
.
test
(
value
))
{
callback
(
new
Error
(
"
路径必须已‘/’开头
"
))
callback
(
new
Error
(
"
路径必须已‘/’开头
,且不能由空格
"
))
}
else
{
callback
();
}
}
//路径校验
export
function
pathRedirect
(
rule
,
value
,
callback
)
{
const
RegExp
=
/^
\/[\S]
.*/
if
(
value
)
{
if
(
!
RegExp
.
test
(
value
)){
callback
(
new
Error
(
"
路径必须已‘/’开头,且不能由空格
"
))
}
}
callback
();
}
//定义金额校验
export
function
money
(
rule
,
value
,
callback
)
{
let
RegExp
=
/
(
^
([
-
]?)[
1-9
]([
0-9
]
+
)?(\.[
0-9
]{1,2})?
$
)
|
(
^
([
-
]?)(
0
){1}
$
)
|
(
^
([
-
]?)[
0-9
]\.[
0-9
]([
0-9
])?
$
)
/
;
...
...
src/views/Spendreimbursement/finance/financeList.vue
View file @
fdfb3666
...
...
@@ -16,10 +16,7 @@
></el-input>
</el-form-item>
<el-form-item
label=
"审批状态:"
>
<el-select
placeholder=
"请选择"
v-model=
"queryitem.tripStatus"
>
<el-select
placeholder=
"请选择"
v-model=
"queryitem.tripStatus"
>
<el-option
label=
"待审批"
value=
"0"
></el-option>
<el-option
label=
"小组长通过"
value=
"1"
></el-option>
<el-option
label=
"小组长驳回"
value=
"2"
></el-option>
...
...
@@ -209,7 +206,10 @@
<el-table-column
align=
"center"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.tripStatus == 1"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"agreeandrefuse(scope.row)"
<el-button
type=
"primary"
size=
"mini"
@
click=
"agreeandrefuse(scope.row)"
>
同意或驳回
</el-button
>
</div>
...
...
@@ -253,9 +253,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"fromgetlist(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -583,6 +583,7 @@
<
script
>
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
queryBypagefinance
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
import
{
finApproval
}
from
"
@/api/spendreimbursement
"
;
...
...
@@ -632,6 +633,7 @@ export default {
paramlist
:
{},
financelistData
:
{},
getinvoivelist
:
[],
srcList
:
[],
rules
:
{
verifyTotalAmountLarge
:
[
{
...
...
@@ -866,7 +868,20 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
console
.
log
(
e
.
filePath
);
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
...
...
@@ -1007,9 +1022,9 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
async
delProject
(
row
)
{
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
...
...
@@ -1041,7 +1056,7 @@ export default {
}
else
{
let
fileNamepdf
=
row
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
=
=
"
.pdf
"
)
{
if
(
fileType
!
=
"
.pdf
"
)
{
return
true
;
}
else
{
return
false
;
...
...
@@ -1050,7 +1065,7 @@ export default {
},
//跳转修改
Agrt
(
row
)
{
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
);
},
},
...
...
src/views/Spendreimbursement/headman/headmanList.vue
View file @
fdfb3666
...
...
@@ -16,10 +16,7 @@
></el-input>
</el-form-item>
<el-form-item
label=
"审批状态:"
>
<el-select
placeholder=
"请选择"
v-model=
"queryitem.tripStatus"
>
<el-select
placeholder=
"请选择"
v-model=
"queryitem.tripStatus"
>
<el-option
label=
"待审批"
value=
"0"
></el-option>
<el-option
label=
"小组长通过"
value=
"1"
></el-option>
<el-option
label=
"小组长驳回"
value=
"2"
></el-option>
...
...
@@ -366,9 +363,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"fromgetlist(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -473,6 +470,7 @@
<
script
>
import
{
queryByheadman
}
from
"
@/api/spendreimbursement
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
import
{
Approval
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAllById
,
selectByIdF
}
from
"
@/api/project
"
;
...
...
@@ -517,6 +515,7 @@ export default {
companyId
:
null
,
tripId
:
0
,
},
srcList
:[],
//附件///-------
//drawer1: false,
...
...
@@ -700,7 +699,19 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
...
...
@@ -764,9 +775,9 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
async
delProject
(
row
)
{
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
...
...
@@ -797,7 +808,7 @@ export default {
}
else
{
let
fileNamepdf
=
row
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
=
=
"
.pdf
"
)
{
if
(
fileType
!
=
"
.pdf
"
)
{
return
true
;
}
else
{
return
false
;
...
...
@@ -806,7 +817,7 @@ export default {
},
//跳转修改
Agrt
(
row
)
{
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
);
},
},
...
...
src/views/Spendreimbursement/spendreimbursementAdd.vue
View file @
fdfb3666
...
...
@@ -504,7 +504,6 @@ export default {
},
// 添加数据的方法
submitForm
()
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
insert
(
this
.
spendreimbursementform
)
...
...
@@ -517,7 +516,7 @@ export default {
obj1
.
tripId
=
tid
;
addpeopleList
[
0
]
=
obj1
;
this
.
peopleList
.
insertBatch
.
forEach
((
e
)
=>
{
if
(
e
.
personnelName
!=
null
&&
e
.
personnelName
!=
''
)
{
if
(
e
.
personnelName
!=
null
&&
e
.
personnelName
!=
""
)
{
let
obj
=
{};
obj
.
personnelName
=
e
.
personnelName
;
obj
.
tripId
=
res
.
data
;
...
...
@@ -551,8 +550,7 @@ export default {
this
.
spendreimbursementform
.
companyId
;
this
.
enclosurelist
.
enclosureDescribe
=
this
.
spendreimbursementform
.
enclosureDescribe
;
this
.
enclosurelist
.
userId
=
this
.
spendreimbursementform
.
userId
;
this
.
enclosurelist
.
userId
=
this
.
spendreimbursementform
.
userId
;
this
.
$refs
.
enclosureUpload
.
submit
();
// 第三个方法 添加发票
...
...
@@ -578,7 +576,6 @@ export default {
}
});
},
//
addDomain
()
{
this
.
peopleList
.
insertBatch
.
push
({
personnelName
:
""
,
...
...
src/views/Spendreimbursement/spendreimbursementList.vue
View file @
fdfb3666
...
...
@@ -291,9 +291,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"fromgetlist(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -663,6 +663,7 @@
<
script
>
import
{
queryBypage
}
from
"
@/api/spendreimbursement
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAllById
,
selectByIdF
,
deleteById
}
from
"
@/api/project
"
;
import
{
...
...
@@ -774,7 +775,7 @@ export default {
},
formtripid
:
null
,
form
:
[],
srcList
:
[],
parm
:
{
tripId
:
null
,
companyId
:
null
,
...
...
@@ -1122,9 +1123,20 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
});
// console.log(this.getinvoivelist);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
...
...
@@ -1173,9 +1185,9 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
async
delProject
(
row
)
{
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
...
...
@@ -1235,7 +1247,6 @@ export default {
//刷新附件
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
console
.
log
(
this
.
proutlist1
.
Id
);
selectByIdF
(
this
.
queryDTO
)
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
...
...
@@ -1292,7 +1303,7 @@ export default {
},
//跳转修改
Agrt
(
row
)
{
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
console
.
log
(
photopath
);
window
.
open
(
photopath
,
"
_blank
"
);
},
...
...
src/views/assets/administration/administrationselect.vue
View file @
fdfb3666
...
...
@@ -74,7 +74,7 @@
></el-pagination>
</div>
<!-- 抽屉 -->
<el-drawer
title=
"使用登记"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
>
<el-drawer
title=
"使用登记"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
:before-close=
"handleClose"
>
<div
v-show=
"showid==0"
style=
"width:80%;margin-left:10%;margin-top:60px;"
>
<el-form
:model=
"user"
...
...
@@ -218,10 +218,11 @@ export default {
loading
:
false
,
direction
:
"
rtl
"
,
currentTime
:
new
Date
(),
// 获取当前时间
getid
:
1
,
///抽屉
showid
:
1
,
rules
:
{
userId
:
[{
required
:
true
,
message
:
"
请输入姓名
"
,
trigger
:
"
change
"
}]
userId
:
[{
required
:
true
,
message
:
"
请输入姓名
"
,
trigger
:
"
blur
"
}]
}
};
},
...
...
@@ -246,13 +247,12 @@ export default {
}
})
.
catch
(
e
=>
{
this
.
$
$
message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
e
.
msg
);
});
},
//借用
Uselist1
(
showid
=
0
)
{
this
.
showid
=
showid
;
console
.
log
(
this
.
showid
);
Uselist1
(
showid
=
0
)
{
this
.
showid
=
showid
;
this
.
options
=
[];
this
.
addDTO
=
{
fixedId
:
null
,
//资产ID
...
...
@@ -268,7 +268,6 @@ export default {
},
//归还
Uselist
(
row
)
{
console
.
log
(
row
.
id
);
this
.
drawer
=
true
;
this
.
showid
=
1
;
this
.
addDTOs
=
{
...
...
@@ -344,6 +343,7 @@ export default {
message
:
"
恭喜您借用申请成功
"
,
type
:
"
success
"
});
this
.
drawer
=
false
;
this
.
getList
();
}
else
{
...
...
@@ -372,6 +372,7 @@ export default {
type
:
"
success
"
});
this
.
$refs
.
ruleForm1
.
resetFields
();
this
.
drawer
=
false
;
this
.
getList
();
}
else
{
...
...
@@ -403,6 +404,11 @@ export default {
//搜索
selectgetlist
()
{
this
.
getList
();
},
//关闭
handleClose
(
done
){
this
.
$refs
.
ruleForm1
.
resetFields
();
done
();
}
}
};
...
...
src/views/companyFile/companyFileList.vue
View file @
fdfb3666
...
...
@@ -83,7 +83,7 @@
</template>
<
script
>
import
{
queryBypage
}
from
"
@/api/companyFile
"
;
import
{
queryBypage
,
getFileUrl
}
from
"
@/api/companyFile
"
;
export
default
{
data
()
{
return
{
...
...
@@ -115,10 +115,12 @@ export default {
this
.
getCompanyFileList
();
},
//下载
download
(
row
)
{
async
download
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
companyFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
href
=
(
await
getFileUrl
(
row
.
companyFile
)).
data
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
...
...
src/views/companyFile/selfFileList.vue
View file @
fdfb3666
...
...
@@ -74,7 +74,7 @@
</template>
<
script
>
import
{
queryBypageByuserId
}
from
"
@/api/companyFile
"
;
import
{
queryBypageByuserId
,
getFileUrl
}
from
"
@/api/companyFile
"
;
export
default
{
data
()
{
return
{
...
...
@@ -127,10 +127,12 @@ export default {
this
.
getselFileList
();
},
//下载
download
(
row
)
{
async
download
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
companyFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
href
=
(
await
getFileUrl
(
row
.
companyFile
)).
data
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
...
...
src/views/contract/components/addContract.vue
View file @
fdfb3666
...
...
@@ -399,6 +399,7 @@ export default {
let
url
=
process
.
env
.
VUE_APP_BASE_API
+
filePath
;
downloadPDFFile
(
url
,
name
)
},
handleRemove
(
file
)
{
deleteContract
(
file
).
then
(
res
=>
{
if
(
res
.
success
)
{
...
...
src/views/expense/expenseList.vue
View file @
fdfb3666
...
...
@@ -6,16 +6,10 @@
<el-col
:span=
"30"
>
<el-form
:inline=
"true"
:model=
"invoiceQruey"
>
<el-form-item
label=
"发票号码"
style=
"margin-left"
>
<el-input
v-model=
"invoiceQruey.number"
placeholder=
"发票号码"
></el-input>
<el-input
v-model=
"invoiceQruey.number"
placeholder=
"发票号码"
></el-input>
</el-form-item>
<el-form-item
label=
"发票代码"
>
<el-input
v-model=
"invoiceQruey.code"
placeholder=
"发票代码"
></el-input>
<el-input
v-model=
"invoiceQruey.code"
placeholder=
"发票代码"
></el-input>
</el-form-item>
<el-form-item
label=
"发票类型"
>
<el-select
v-model=
"invoiceQruey.category"
placeholder=
"请选择"
>
...
...
@@ -55,24 +49,15 @@
icon=
"el-icon-search"
style=
"margin: 1px 5px"
@
click=
"selectexpend()"
>
查询
</el-button
>
<el-button
type=
"info"
icon=
"el-icon-refresh-right"
@
click=
"upddlist()"
>
重置
</el-button
>
>
查询
</el-button>
<el-button
type=
"info"
icon=
"el-icon-refresh-right"
@
click=
"upddlist()"
>
重置
</el-button>
<el-button
type=
"success"
icon=
"el-icon-download"
v-if=
"isgetid"
@
click=
"Reimbursement()"
>
添加发票单
</el-button
>
<el-button
type=
"warning"
v-if=
"!isgetid"
@
click=
"Reimbursement()"
>
返回
</el-button
>
>
添加发票单
</el-button>
<el-button
type=
"warning"
v-if=
"!isgetid"
@
click=
"Reimbursement()"
>
返回
</el-button>
</el-col>
</el-row>
</div>
...
...
@@ -95,21 +80,15 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"code"
label=
"发票代码"
></el-table-column>
<el-table-column
prop=
"number"
label=
"发票号码"
width=
"width"
></el-table-column>
<el-table-column
prop=
"time"
label=
"发票时间"
:formatter=
"getFroms"
></el-table-column>
<el-table-column
prop=
"number"
label=
"发票号码"
width=
"width"
></el-table-column>
<el-table-column
prop=
"time"
label=
"发票时间"
:formatter=
"getFroms"
></el-table-column>
<el-table-column
prop=
"category"
label=
"发票类型"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.category == '0' ? 'info' : 'primary'"
>
{{
<el-tag
:type=
"scope.row.category == '0' ? 'info' : 'primary'"
>
{{
scope
.
row
.
category
==
"
0
"
?
"
普票
"
:
"
专票
"
}}
</el-tag>
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
label=
"发票类别"
>
...
...
@@ -122,14 +101,15 @@
? 'danger'
: 'warning'
"
>
{{
>
{{
scope
.
row
.
type
==
"
0
"
?
"
收入
"
:
scope
.
row
.
type
==
"
1
"
?
"
支出
"
:
"
报销
"
}}
</el-tag
>
}}
</el-tag
>
</
template
>
</el-table-column>
<el-table-column
prop=
"mone"
label=
"发票金额"
></el-table-column>
...
...
@@ -138,22 +118,22 @@
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width: 80px; height: 80px"
:src=
"
getimagin(
scope.row
)
"
:src=
"scope.row
.fileUrl
"
:preview-src-list=
"srcList"
></el-image>
</div>
<div
v-else
>
<a
class=
"a-style"
@
click=
"handlePreView(scope.row)"
>
点击查看文件
</a
>
<a
class=
"a-style"
@
click=
"handlePreView(scope.row)"
>
点击查看文件
</a>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"发票状态"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.status == '0' ? 'info' : 'warning'"
>
{{
<el-tag
:type=
"scope.row.status == '0' ? 'info' : 'warning'"
>
{{
scope
.
row
.
status
==
0
?
"
未报销
"
:
"
已报销
"
}}
</el-tag>
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"操作"
>
...
...
@@ -161,15 +141,8 @@
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<p>
确定要删除当前发票吗
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible = false"
>
取消
</el-button
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"YesGet(scope.row)"
>
确定
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"YesGet(scope.row)"
>
确定
</el-button>
</div>
<el-button
type=
"danger"
...
...
@@ -205,7 +178,6 @@
style=
"width: 100%; margin: 30px 0px"
:model=
"addTO"
:rules=
"rules"
ref=
"addTO"
label-width=
"80px"
class=
"demo-ruleForm"
...
...
@@ -258,15 +230,8 @@
<el-input
v-model=
"addTO.mone"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
icon=
"el-icon-folder-checked"
@
click=
"getlistForm()"
>
立即创建
</el-button
>
<el-button
type=
"info"
icon=
"el-icon-refresh"
@
click=
"delectdd"
>
重置信息
</el-button
>
<el-button
type=
"success"
icon=
"el-icon-folder-checked"
@
click=
"getlistForm()"
>
立即创建
</el-button>
<el-button
type=
"info"
icon=
"el-icon-refresh"
@
click=
"delectdd"
>
重置信息
</el-button>
</el-form-item>
</el-form>
</el-col>
...
...
@@ -282,6 +247,7 @@
:on-remove=
"delfile"
:on-success=
"fileSuccess"
:limit=
"1"
:on-error=
"loading==true"
style=
"margin-left: 90px"
>
<el-button
...
...
@@ -289,11 +255,8 @@
size=
"small"
type=
"primary"
style=
"margin-left: 20px; margin-top: 40px"
>
选取文件
</el-button
>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png/pdf文件,且不超过500kb
</div>
>
选取文件
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/png/pdf文件,且不超过500kb
</div>
</el-upload>
</el-col>
</el-row>
...
...
@@ -303,6 +266,7 @@
<
script
>
import
{
insertList
,
queryBypageIncomeAdd
,
deleteexpen
}
from
"
@/api/project
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
money
,
Invoice_code
,
Invoice_No
}
from
"
@/utils/myValidate
"
;
export
default
{
data
()
{
...
...
@@ -317,41 +281,41 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
companyId
:
null
,
userId
:
null
,
userId
:
null
},
categoryOptions
:
[
{
value
:
0
,
category
:
"
普票
"
,
category
:
"
普票
"
},
{
value
:
1
,
category
:
"
专票
"
,
}
,
category
:
"
专票
"
}
],
typeOptions
:
[
{
value
:
0
,
type
:
"
收入
"
,
type
:
"
收入
"
},
{
value
:
1
,
type
:
"
支出
"
,
type
:
"
支出
"
},
{
value
:
2
,
type
:
"
报销
"
,
}
,
type
:
"
报销
"
}
],
statusOptions
:
[
{
value
:
0
,
status
:
"
未报销
"
,
status
:
"
未报销
"
},
{
value
:
1
,
status
:
"
已报销
"
,
}
,
status
:
"
已报销
"
}
],
total
:
0
,
invoicegetList
:
[],
...
...
@@ -366,52 +330,54 @@ export default {
number
:
null
,
status
:
0
,
time
:
null
,
type
:
null
,
type
:
null
},
rules
:
{
time
:
[
{
required
:
true
,
message
:
"
请输入发票时间
"
,
trigger
:
"
change
"
}
,
{
required
:
true
,
message
:
"
请输入发票时间
"
,
trigger
:
"
change
"
}
],
number
:
[
{
required
:
true
,
validator
:
Invoice_No
,
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
code
:
[{
required
:
true
,
validator
:
Invoice_code
,
trigger
:
"
change
"
}],
category
:
[
{
required
:
true
,
message
:
"
请至少选择一个发票类型
"
,
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
type
:
[
{
required
:
true
,
message
:
"
请至少选择一个发票类别
"
,
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
mone
:
[
{
required
:
true
,
validator
:
money
,
trigger
:
"
change
"
,
}
,
]
,
trigger
:
"
change
"
}
]
},
fileList
:
[],
action
:
null
,
action
:
null
,
proutlist
:
{
Id
:
1
,
status
:
0
,
companyId
:
null
},
loading
:
false
loading
:
false
};
},
created
()
{
this
.
proutlist
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
invoiceQruey
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
invoiceQruey
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
action
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/uploadFile
"
;
...
...
@@ -437,30 +403,38 @@ export default {
Reimbursement
()
{
this
.
isgetid
=
!
this
.
isgetid
;
this
.
$refs
.
addTO
.
resetFields
();
this
.
fileList
=
this
.
fileList
.
filter
(
(
item
)
=>
item
.
uid
!==
file
.
uid
);
this
.
fileList
=
this
.
fileList
.
filter
(
item
=>
item
.
uid
!==
file
.
uid
);
},
//发票的分页查询
getincomeSelectlist
()
{
queryBypageIncomeAdd
(
this
.
invoiceQruey
)
.
then
(
(
res
)
=>
{
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
invoicegetList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
this
.
srcList
=
[];
res
.
data
.
list
.
forEach
((
e
)
=>
{
res
.
data
.
list
.
forEach
(
e
=>
{
let
fileNamepdf
=
e
.
filePath
;
console
.
log
(
fileNamepdf
);
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
);
this
.
srcList
.
push
(
url
);
}
}
});
});
this
.
invoicegetList
=
res
.
data
.
list
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
((
error
)
=>
{
.
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
.
error
(
"
查询发票数据失败
"
);
});
},
...
...
@@ -484,11 +458,8 @@ export default {
}
}
},
getimagin
(
row
)
{
return
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
},
//时间处理
getFroms
:
function
(
value
)
{
getFroms
:
function
(
value
)
{
var
dt
=
new
Date
(
value
.
time
);
let
year
=
dt
.
getFullYear
();
let
month
=
dt
.
getMonth
()
+
1
;
...
...
@@ -497,8 +468,7 @@ export default {
},
//点击查看发票
handlePreView
(
row
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
console
.
log
(
photopath
);
const
photopath
=
row
.
fileUrl
;
window
.
open
(
photopath
,
"
_blank
"
);
},
//时间处理 yyyy-MM-dd hh:mm:ss
...
...
@@ -522,15 +492,14 @@ export default {
},
//发票提交页面的提交
getlistForm
()
{
if
(
this
.
fileTypeJpg
==
true
)
{
this
.
$refs
.
addTO
.
validate
(
(
valid
)
=>
{
this
.
$refs
.
addTO
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
this
.
loading
=
true
;
this
.
addTO
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
addTO
.
companyId
=
this
.
$store
.
getters
.
companyId
;
insertList
(
this
.
addTO
)
.
then
(
(
res
)
=>
{
.
then
(
res
=>
{
if
(
res
.
success
)
{
//发票记录添加成功
//提交发票文件
...
...
@@ -538,12 +507,12 @@ export default {
this
.
$refs
.
upload
.
submit
();
this
.
$message
.
success
(
res
.
msg
);
}
else
{
this
.
loading
=
false
this
.
loading
=
false
;
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
(
e
)
=>
{
this
.
loading
=
false
.
catch
(
e
=>
{
this
.
loading
=
false
;
this
.
$message
.
error
(
"
发票添加失败,检测是否重复
"
);
});
}
...
...
@@ -559,7 +528,6 @@ export default {
//校验发票文件格式
onChange
(
file
)
{
const
fileNamepdf
=
file
.
name
;
console
.
log
(
file
.
name
);
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
==
"
.pdf
"
||
fileType
==
"
.png
"
||
fileType
==
"
.jpg
"
)
{
this
.
fileTypeJpg
=
true
;
...
...
@@ -574,12 +542,12 @@ export default {
this
.
fileTypeJpg
=
false
;
},
//文件上传成功
fileSuccess
(
res
){
this
.
loading
=
false
fileSuccess
(
res
)
{
this
.
loading
=
false
;
this
.
isgetid
=
true
;
this
.
getincomeSelectlist
();
}
}
,
}
};
</
script
>
<
style
scoped
>
...
...
src/views/permission/menu.vue
View file @
fdfb3666
...
...
@@ -26,25 +26,25 @@
<el-input
v-model=
"permission.path"
placeholder=
"路由path"
/>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"permission.name"
placeholder=
"路由名称"
/>
<el-input
v-model
.trim
=
"permission.name"
placeholder=
"路由名称"
/>
</el-form-item>
<el-form-item
label=
"路由备注"
>
<el-input
v-model=
"permission.menuExplain"
placeholder=
"路由备注"
/>
<el-input
v-model
.trim
=
"permission.menuExplain"
placeholder=
"路由备注"
/>
</el-form-item>
<el-form-item
label=
"组件名称"
prop=
"component"
>
<el-input
v-model=
"permission.component"
placeholder=
"组件名称"
/>
<el-input
v-model
.trim
=
"permission.component"
placeholder=
"组件名称"
/>
</el-form-item>
<el-form-item
label=
"重定向路径"
>
<el-form-item
label=
"重定向路径"
prop=
"redirect"
>
<el-input
v-model=
"permission.redirect"
placeholder=
"重定向路径"
/>
</el-form-item>
<el-form-item
label=
"主题"
prop=
"meta.title"
>
<el-input
v-model=
"permission.meta.title"
placeholder=
"路由主题"
/>
<el-input
v-model
.trim
=
"permission.meta.title"
placeholder=
"路由主题"
/>
</el-form-item>
<el-form-item
label=
"图标"
>
<el-input
v-model=
"permission.meta.icon"
placeholder=
"路由图标"
/>
<el-input
v-model
.trim
=
"permission.meta.icon"
placeholder=
"路由图标"
/>
</el-form-item>
<el-form-item
label=
"高亮菜单"
>
<el-input
v-model=
"permission.meta.activeMenu"
placeholder=
"高亮菜单"
/>
<el-input
v-model
.trim
=
"permission.meta.activeMenu"
placeholder=
"高亮菜单"
/>
</el-form-item>
<el-checkbox
v-model=
"permission.hidden"
label=
"隐藏"
></el-checkbox>
...
...
@@ -66,7 +66,7 @@
<
script
>
import
{
getMenuTree
,
addMenu
,
editMenu
,
deleteMenu
}
from
'
@/api/menu
'
import
{
deepClone
}
from
'
@/utils
'
import
{
pathValid
}
from
'
@/utils/myValidate
'
import
{
pathValid
,
pathRedirect
}
from
'
@/utils/myValidate
'
let
id
=
1000
;
const
defaultPermisson
=
{
...
...
@@ -102,6 +102,9 @@ export default {
path
:
[{
required
:
true
,
validator
:
pathValid
,
trigger
:
"
blur
"
}],
redirect
:
[{
validator
:
pathRedirect
,
trigger
:
"
blur
"
}],
name
:
[{
required
:
true
,
message
:
"
请输入名称
"
,
trigger
:
"
blur
"
}],
component
:
[{
required
:
true
,
message
:
"
请输入组件名称
"
,
trigger
:
"
blur
"
}],
'
meta.title
'
:
[{
required
:
true
,
message
:
"
请输入主题
"
,
trigger
:
"
blur
"
}]
...
...
src/views/permission/role.vue
View file @
fdfb3666
...
...
@@ -36,7 +36,7 @@
<el-dialog
:visible.sync=
"dialogVisible"
:title=
"dialogType"
>
<el-form
ref=
"form"
:model=
"role"
label-width=
"80px"
label-position=
"left"
:rules=
"rules"
>
<el-form-item
label=
"角色名称"
prop=
"rlName"
>
<el-input
v-model=
"role.rlName"
placeholder=
"角色名称"
/>
<el-input
v-model
.trim
=
"role.rlName"
placeholder=
"角色名称"
/>
</el-form-item>
<el-form-item
label=
"角色描述"
prop=
"rlDesc"
>
<el-input
v-model=
"role.rlDesc"
:autosize=
"{ minRows: 2, maxRows: 4 }"
type=
"textarea"
placeholder=
"角色描述"
/>
...
...
src/views/pettyMoney/addPettyMoneyRecord.vue
View file @
fdfb3666
...
...
@@ -145,6 +145,7 @@ export default {
},
addPettyFile
(
pettyId
)
{
this
.
fileParams
.
Id
=
pettyId
this
.
fileParams
.
companyId
=
this
.
companyId
this
.
uploadChange
&&
this
.
$refs
.
uploadPettyFile
.
submit
()
},
handleDownload
(
file
)
{
...
...
src/views/project/expend/expendList.vue
View file @
fdfb3666
...
...
@@ -147,7 +147,7 @@
<el-popover
placement=
"top"
width=
"160"
v-model=
"index.visible"
>
<p>
确定要删除此条附件吗
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"
scope.row
.visible = false"
>
取消
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"
index
.visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteProject(index)"
>
确定
</el-button>
</div>
<el-button
...
...
@@ -225,8 +225,8 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"
getimagin(
scope.row
)
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row
.fileUrl
"
:preview-src-list=
"srcList"
></el-image>
</div>
...
...
@@ -292,6 +292,7 @@ import {
deletBystatus
,
deleteById
}
from
"
@/api/project
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
export
default
{
data
()
{
return
{
...
...
@@ -465,13 +466,21 @@ export default {
},
//下载附件
delProject
(
row
)
{
getFileUrl
(
row
.
enclosureFile
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
console
.
log
(
url
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
download
=
row
.
enclosureFile
;
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
href
=
url
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
remove
();
// 一次性的,用完就删除a标签
}
else
{
this
.
$message
.
error
(
"
下载失败
"
);
}
});
},
//查询
qurey
()
{
...
...
@@ -500,23 +509,30 @@ export default {
selectAllById
(
this
.
getinvoiveId
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
srcList
=
[];
res
.
data
.
forEach
(
e
=>
{
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
);
this
.
srcList
.
push
(
url
);
}
}
});
});
this
.
getinvoivelist
=
res
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
//this.back();
}
})
.
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
.
error
(
"
获取发票图片失败
"
);
//this.back();
});
...
...
@@ -547,7 +563,7 @@ export default {
},
//点击查看发票
handlePreView
(
row
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
);
},
//查看项目附件.....
...
...
src/views/project/income/incomeList.vue
View file @
fdfb3666
...
...
@@ -146,8 +146,8 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"
getimagin(
scope.row
)
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row
.fileUrl
"
:preview-src-list=
"srcList"
></el-image>
</div>
...
...
@@ -180,7 +180,6 @@
v-model=
"getListincom"
multiple
filterable
default-first-option
style=
"width:100%;"
placeholder=
"请选择要添加的发票编号"
...
...
@@ -310,6 +309,7 @@ import {
deleteById
}
from
"
@/api/project
"
;
import
{
componentMap
}
from
"
../../../router
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
const
InitialData
=
{
incomeBody
:
null
,
...
...
@@ -552,23 +552,31 @@ export default {
selectAllById
(
this
.
getinvoiveId
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
srcList
=
[];
res
.
data
.
forEach
(
e
=>
{
let
fileNamepdf
=
e
.
filePath
;
console
.
log
(
fileNamepdf
);
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
if
(
fileType
==
"
.jpg
"
)
{
this
.
srcList
.
push
(
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
);
getFileUrl
(
e
.
filePath
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
});
this
.
getinvoivelist
=
res
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
}
})
.
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
.
error
(
"
获取发票图片失败
"
);
this
.
back
();
});
...
...
@@ -610,21 +618,29 @@ export default {
},
//点击查看发票
handlePreView
(
row
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
console
.
log
(
photopath
);
const
photopath
=
row
.
fileUrl
;
window
.
open
(
photopath
,
"
_blank
"
);
},
//下载附件
delProject
(
row
)
{
getFileUrl
(
row
.
enclosureFile
).
then
(
res
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
console
.
log
(
url
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
href
=
url
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
remove
();
// 一次性的,用完就删除a标签
}
else
{
this
.
$message
.
error
(
'
下载失败
'
);
}
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
)
})
},
//查询未报销发票
selectGet
()
{
...
...
@@ -805,10 +821,7 @@ export default {
return
false
;
}
}
},
getimagin
(
row
)
{
return
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
},
}
}
};
</
script
>
...
...
src/views/reimbursement/finance/financeList.vue
View file @
fdfb3666
...
...
@@ -385,9 +385,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -529,6 +529,7 @@
</template>
<
script
>
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectByReimbursementId
}
from
"
@/api/reimbursementDetails
"
;
import
{
selectByFinance
,
financeApproval
}
from
"
@/api/reimbursement
"
;
import
{
selectAllById
}
from
"
@/api/project
"
;
...
...
@@ -635,6 +636,7 @@ export default {
fileTypepdf
:
false
,
//判断合同文件是否存在
fileList1
:
[],
//附件文件
disabled
:
false
,
//隐藏
srcList
:
[],
};
},
created
()
{
...
...
@@ -681,7 +683,7 @@ export default {
//查看pdf格式
handlePreView
(
row
)
{
console
.
log
(
row
);
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
);
},
//查看详情
...
...
@@ -895,7 +897,21 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
console
.
log
(
url
);
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
// e.filePath = process.env.VUE_APP_BASE_API + e.filePath;
});
console
.
log
(
this
.
getinvoivelist
);
}
else
{
...
...
@@ -1034,10 +1050,11 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
async
delProject
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//
a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
//
//a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
...
...
src/views/reimbursement/headman/headmanList.vue
View file @
fdfb3666
...
...
@@ -279,9 +279,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -433,6 +433,7 @@
</template>
<
script
>
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectByHeadman
,
headamApproval
}
from
"
@/api/reimbursement
"
;
import
{
selectByReimbursementId
}
from
"
@/api/reimbursementDetails
"
;
import
{
...
...
@@ -528,6 +529,7 @@ export default {
fileTypepdf
:
false
,
//判断合同文件是否存在
fileList1
:
[],
//附件文件
disabled
:
false
,
//隐藏
srcList
:
[],
};
},
created
()
{
...
...
@@ -570,7 +572,7 @@ export default {
},
//获取pdf格式
handlePreView
(
row
){
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
)
},
//查看详情
...
...
@@ -725,7 +727,21 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
console
.
log
(
url
);
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
// e.filePath = process.env.VUE_APP_BASE_API + e.filePath;
});
console
.
log
(
this
.
getinvoivelist
);
}
else
{
...
...
@@ -765,10 +781,12 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
//下载附件
async
delProject
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//
a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
//
//a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
...
...
src/views/reimbursement/reimbursementList.vue
View file @
fdfb3666
...
...
@@ -344,9 +344,9 @@
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width:
10
0px; height:
10
0px"
:src=
"scope.row.file
Path
"
:preview-src-list=
"
[scope.row.filePath]
"
style=
"width:
8
0px; height:
8
0px"
:src=
"scope.row.file
Url
"
:preview-src-list=
"
srcList
"
></el-image>
</div>
<div
v-else
>
...
...
@@ -569,6 +569,7 @@
</template>
<
script
>
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
queryBypage
,
resubmit
,
reimbursementId
}
from
"
@/api/reimbursement
"
;
import
{
selectByReimbursementId
}
from
"
@/api/reimbursementDetails
"
;
import
{
...
...
@@ -677,6 +678,7 @@ export default {
fileTypepdf
:
false
,
//判断合同文件是否存在
fileList1
:
[],
//附件文件
disabled
:
false
,
//隐藏
srcList
:
[],
};
},
created
()
{
...
...
@@ -917,21 +919,37 @@ export default {
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
// console.log("------------")
// console.log(e.filePath)
// console.log("------------")
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
url
;
console
.
log
(
url
);
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
}
}
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
}
})
.
catch
((
e
rror
)
=>
{
.
catch
((
e
)
=>
{
this
.
$message
.
error
(
"
获取发票图片失败
"
);
this
.
back
();
});
},
//pdf,展示
handlePreView
(
row
)
{
const
photopath
=
row
.
file
Path
;
const
photopath
=
row
.
file
Url
;
window
.
open
(
photopath
,
"
_blank
"
);
},
...
...
@@ -974,11 +992,11 @@ export default {
});
},
//下载附件
delProject
(
row
)
{
async
delProject
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
enclosureFile
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
//
a.download = row.enclosureFile; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
a
.
href
=
(
await
getFileUrl
(
row
.
enclosureFile
)).
data
;
//
//a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
...
...
src/views/staff/staffList.vue
View file @
fdfb3666
...
...
@@ -47,7 +47,7 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"userName"
label=
"姓名"
/>
<el-table-column
prop=
"userSex"
label=
"性别"
>
<el-table-column
prop=
"userSex"
label=
"性别"
width=
"50"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
userSex
==
'
0
'
?
'
女
'
:
'
男
'
}}
</
template
>
...
...
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