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
01e9384f
Commit
01e9384f
authored
Dec 01, 2022
by
柳 佳乐
Browse files
202211201
parent
979e03ac
Changes
51
Show whitespace changes
Inline
Side-by-side
.env.development
View file @
01e9384f
...
@@ -3,7 +3,7 @@ ENV = 'development'
...
@@ -3,7 +3,7 @@ ENV = 'development'
# base api 后端url
# base api 后端url
#VUE_APP_BASE_API = 'http://192.168.10.107:7080'
#VUE_APP_BASE_API = 'http://192.168.10.107:7080'
VUE_APP_BASE_API = 'http://192.168.
1
0.109:11523'
VUE_APP_BASE_API = 'http://192.168.0.109:11523'
#VUE_APP_BASE_API = 'http://www.aishuhong.com:11549/prod-api/'
#VUE_APP_BASE_API = 'http://www.aishuhong.com:11549/prod-api/'
#VUE_APP_BASE_API = 'http://192.168.31.100:7081'
#VUE_APP_BASE_API = 'http://192.168.31.100:7081'
src/api/companyFile.js
View file @
01e9384f
...
@@ -32,3 +32,11 @@ export function getFileUrl(fileName) {
...
@@ -32,3 +32,11 @@ export function getFileUrl(fileName) {
method
:
'
post
'
method
:
'
post
'
})
})
}
}
//删除文件
export
function
delFile
(
data
)
{
return
request
({
url
:
'
/companyFile/delete
'
,
method
:
'
post
'
,
data
})
}
src/utils/download.js
View file @
01e9384f
...
@@ -10,7 +10,6 @@ export const downloadPDFFile = function (url, fileName) {
...
@@ -10,7 +10,6 @@ export const downloadPDFFile = function (url, fileName) {
url
,
url
,
responseType
:
'
blob
'
responseType
:
'
blob
'
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
// console.log('headers', res.headers)
// handle(res.data, fileName)
// handle(res.data, fileName)
if
(
!
res
.
data
)
{
if
(
!
res
.
data
)
{
return
return
...
...
src/utils/myValidate.js
View file @
01e9384f
// 身份证验证
// 身份证验证
export
function
chinaIdentityValid
(
rule
,
value
,
callback
)
{
export
function
chinaIdentityValid
(
rule
,
value
,
callback
)
{
if
(
!
value
)
{
if
(
!
value
)
{
console
.
log
(
"
身份证验证返回
"
)
return
callback
(
new
Error
(
'
员工身份证号不能为空
'
))
return
callback
(
new
Error
(
'
员工身份证号不能为空
'
))
}
}
let
city
=
{
let
city
=
{
...
@@ -68,7 +67,6 @@ export function chinaIdentityValid(rule, value, callback) {
...
@@ -68,7 +67,6 @@ export function chinaIdentityValid(rule, value, callback) {
}
}
}
}
}
}
console
.
log
(
"
身份证验证返回
"
)
callback
()
callback
()
}
}
//银行卡号检测
//银行卡号检测
...
@@ -89,7 +87,6 @@ export function bankAccountValid(rule, value, callback) {
...
@@ -89,7 +87,6 @@ export function bankAccountValid(rule, value, callback) {
// 电话号码验证
// 电话号码验证
export
function
checkPhone
(
rule
,
value
,
callback
)
{
export
function
checkPhone
(
rule
,
value
,
callback
)
{
if
(
!
value
)
{
if
(
!
value
)
{
// console.log(1)
return
callback
(
new
Error
(
'
手机号不能为空
'
));
return
callback
(
new
Error
(
'
手机号不能为空
'
));
}
else
{
}
else
{
const
reg
=
/
(
^1
\d{10}
$
)
|
(
^
[
0-9
]\d{7}
$
)
/
const
reg
=
/
(
^1
\d{10}
$
)
|
(
^
[
0-9
]\d{7}
$
)
/
...
...
src/utils/request.js
View file @
01e9384f
import
axios
from
'
axios
'
import
axios
from
'
axios
'
import
{
MessageBox
,
Message
}
from
'
element-ui
'
import
{
MessageBox
,
Message
}
from
'
element-ui
'
import
store
from
'
@/store
'
import
store
from
'
@/store
'
import
router
from
'
@/router
'
import
{
getToken
}
from
'
@/utils/auth
'
import
{
getToken
}
from
'
@/utils/auth
'
// create an axios instance
// create an axios instance
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// url = base url + request url
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// url = base url + request url
...
@@ -11,6 +15,7 @@ const service = axios.create({
...
@@ -11,6 +15,7 @@ const service = axios.create({
crossDomain
:
true
crossDomain
:
true
})
})
// request interceptor
// request interceptor
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
...
@@ -25,7 +30,6 @@ service.interceptors.request.use(
...
@@ -25,7 +30,6 @@ service.interceptors.request.use(
},
},
error
=>
{
error
=>
{
// do something with request error
// do something with request error
console
.
log
(
error
)
// for debug
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
}
}
)
)
...
@@ -37,18 +41,24 @@ service.interceptors.response.use(
...
@@ -37,18 +41,24 @@ service.interceptors.response.use(
const
res
=
response
.
data
const
res
=
response
.
data
// if the custom code is not 20000, it is judged as an error.
// if the custom code is not 20000, it is judged as an error.
if
(
res
.
code
!==
20000
)
{
if
(
res
.
code
!==
20000
)
{
// Message({
if
(
res
.
code
==
4
){
// message: res.data || 'Error',
store
.
dispatch
(
"
user/logout
"
);
// type: 'error',
window
.
location
.
href
=
"
/
"
;
// duration: 5 * 1000
Message
({
// })
message
:
"
登录失效,请重新登录
"
,
type
:
'
error
'
,
})
}
return
res
return
res
}
else
{
}
else
{
return
res
return
res
}
}
},
},
error
=>
{
error
=>
{
console
.
log
(
'
err
'
+
error
)
// for debug
Message
({
Message
({
message
:
error
.
message
,
message
:
error
.
message
,
type
:
'
error
'
,
type
:
'
error
'
,
...
...
src/views/Spendreimbursement/finance/financeList.vue
View file @
01e9384f
...
@@ -270,14 +270,67 @@
...
@@ -270,14 +270,67 @@
title=
"查看详情"
title=
"查看详情"
:visible.sync=
"drawer"
:visible.sync=
"drawer"
:direction=
"direction"
:direction=
"direction"
size=
"40%"
size=
"45%"
>
<el-form>
<el-descriptions
:column=
"6"
border
title=
"基本信息"
style=
"padding: 20px"
label-class-name=
"my-label"
>
>
<el-form
label-width=
"180px"
>
<el-descriptions-item
label=
"出差理由"
:span=
"6"
>
<el-row>
<span>
{{ paramlist.tripReason }}
</span>
<el-col
:span=
"12"
>
</el-descriptions-item>
<div
class=
"grid-content bg-purple"
>
<el-descriptions-item
label=
"附件数量"
:span=
"3"
>
<el-form-item
label=
"审批状态"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"出发地点"
:span=
"3"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"目的地点"
:span=
"3"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"天数"
:span=
"3"
>
<span>
{{ paramlist.days }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"交通工具"
:span=
"3"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"6"
border
title=
"费用详情"
style=
"padding: 20px"
label-class-name=
"my-label"
>
<el-descriptions-item
label=
"伙食补贴"
:span=
"3"
>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"公杂补贴"
:span=
"3"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"火车/汽车/轮船费(元)"
:span=
"3"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"机票费"
:span=
"3"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"汽油费"
:span=
"3"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"住宿费"
:span=
"3"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"其他费用"
:span=
"3"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"审批状态"
:span=
"3"
>
<el-tag
<el-tag
size=
"mini"
:type=
"
:type=
"
paramlist.tripStatus == 0
paramlist.tripStatus == 0
? 'info'
? 'info'
...
@@ -300,76 +353,25 @@
...
@@ -300,76 +353,25 @@
: "不存在"
: "不存在"
}}
}}
</el-tag>
</el-tag>
</el-form-item>
</el-descriptions-item>
<el-form-item
label=
"附件数量"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-form-item>
<el-form-item
label=
"出差理由"
>
<span>
{{ paramlist.tripReason }}
</span>
</el-form-item>
<el-form-item
label=
"出发地点"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-form-item>
<el-form-item
label=
"目的地点"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-form-item>
<el-form-item
label=
"经过地点"
>
<span>
{{ paramlist.transitPlace }}
</span>
</el-form-item>
<el-form-item
label=
"交通工具"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
<el-form
-item
label=
"
伙食补贴(元)
"
>
<el-descriptions
-item
label=
"
备注"
:span=
"6
"
>
<span>
{{ paramlist.
foodAllowance
}}
</span>
<span>
{{ paramlist.
remarks
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form-item
label=
"公杂补贴(元)
"
>
<el-descriptions-item
label=
"无票据说明"
:span=
"6
"
>
<span>
{{ paramlist.
publicMiscellaneousSubsidy
}}
</span>
<span>
{{ paramlist.
nobillExplain
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form
-item
label=
"随
从
人员"
>
<el-descriptions
-item
label=
"随
行
人员"
:span=
"6"
>
<el-tag
<el-tag
type=
"warning"
type=
"warning"
size=
"m
edium
"
size=
"m
ini
"
v-for=
"item in paramlist.entouragelist"
v-for=
"item in paramlist.entouragelist"
:key=
"item.id"
:key=
"item.id"
style=
"margin: 0px 5px"
style=
"margin: 0px 5px"
>
{{ item.personnelName }}
</el-tag
>
{{ item.personnelName }}
</el-tag
>
>
</el-form-item>
</el-descriptions-item>
</div>
</el-descriptions>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费(元)"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
<el-form-item
label=
"机票费(元)"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
<el-form-item
label=
"汽油费(元)"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
<el-form-item
label=
"住宿费(元)"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
<el-form-item
label=
"其他费用(元)"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
<el-form-item
label=
"备注"
>
<span>
{{ paramlist.remarks }}
</span>
</el-form-item>
<el-form-item
label=
"无票据说明"
>
<span>
{{ paramlist.nobillExplain }}
</span>
</el-form-item>
<el-form-item
label=
"是否领取补贴"
>
<span>
{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}
</span>
</el-form-item>
<el-form-item
label=
"天数"
>
<span>
{{ paramlist.days }}
</span>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</el-form>
</el-drawer>
</el-drawer>
</div>
</div>
...
@@ -694,7 +696,7 @@ export default {
...
@@ -694,7 +696,7 @@ export default {
// 展示数据的方法
// 展示数据的方法
getpagelist
(
pager
=
1
)
{
getpagelist
(
pager
=
1
)
{
this
.
queryitem
.
pageNum
=
pager
;
this
.
queryitem
.
pageNum
=
pager
;
queryBypagefinance
(
this
.
queryitem
).
then
(
async
(
res
)
=>
{
queryBypagefinance
(
this
.
queryitem
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
this
.
tableData
=
res
.
data
.
list
;
this
.
tableData
=
res
.
data
.
list
;
...
@@ -714,11 +716,6 @@ export default {
...
@@ -714,11 +716,6 @@ export default {
}
else
{
}
else
{
//业务逻辑
//业务逻辑
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -763,7 +760,7 @@ export default {
...
@@ -763,7 +760,7 @@ export default {
this
.
agreeOrapproval
.
tripStatus
=
3
;
this
.
agreeOrapproval
.
tripStatus
=
3
;
this
.
agreeOrapproval
.
tripId
=
this
.
financelistData
.
tripId
;
this
.
agreeOrapproval
.
tripId
=
this
.
financelistData
.
tripId
;
this
.
agreeOrapproval
.
financeTime
=
this
.
time
();
this
.
agreeOrapproval
.
financeTime
=
this
.
time
();
finApproval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
finApproval
(
this
.
agreeOrapproval
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
"
success
"
,
type
:
"
success
"
,
...
@@ -772,11 +769,6 @@ export default {
...
@@ -772,11 +769,6 @@ export default {
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
...
@@ -806,17 +798,12 @@ export default {
...
@@ -806,17 +798,12 @@ export default {
this
.
agreeOrapproval
.
tripStatus
=
4
;
this
.
agreeOrapproval
.
tripStatus
=
4
;
this
.
agreeOrapproval
.
tripId
=
this
.
financelistData
.
tripId
;
this
.
agreeOrapproval
.
tripId
=
this
.
financelistData
.
tripId
;
this
.
agreeOrapproval
.
financeTime
=
this
.
time
();
this
.
agreeOrapproval
.
financeTime
=
this
.
time
();
finApproval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
finApproval
(
this
.
agreeOrapproval
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
操作成功
"
);
this
.
$message
.
success
(
"
操作成功
"
);
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
...
@@ -856,7 +843,7 @@ export default {
...
@@ -856,7 +843,7 @@ export default {
//查询发票图片
//查询发票图片
Selectinsertlsit
()
{
Selectinsertlsit
()
{
selectAllById
(
this
.
getinvoiveId
)
selectAllById
(
this
.
getinvoiveId
)
.
then
(
async
(
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
...
@@ -876,12 +863,6 @@ export default {
...
@@ -876,12 +863,6 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -996,7 +977,7 @@ export default {
...
@@ -996,7 +977,7 @@ export default {
selectImage
(
row
)
{
selectImage
(
row
)
{
this
.
queryDTO
.
tripId
=
row
.
tripId
;
this
.
queryDTO
.
tripId
=
row
.
tripId
;
this
.
proutlist1
.
Id
=
row
.
tripId
;
this
.
proutlist1
.
Id
=
row
.
tripId
;
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
selectByIdF
(
this
.
queryDTO
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
queryDTOList
=
res
.
data
;
this
.
queryDTOList
=
res
.
data
;
if
(
this
.
queryDTOList
.
length
>
0
)
{
if
(
this
.
queryDTOList
.
length
>
0
)
{
...
@@ -1010,12 +991,6 @@ export default {
...
@@ -1010,12 +991,6 @@ export default {
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -1033,18 +1008,13 @@ export default {
...
@@ -1033,18 +1008,13 @@ export default {
//刷新附件
//刷新附件
Refresh
()
{
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
selectByIdF
(
this
.
queryDTO
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
queryDTOList
=
res
.
data
;
this
.
queryDTOList
=
res
.
data
;
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
}
else
{
}
else
{
//业务逻辑
//业务逻辑
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -1072,7 +1042,10 @@ export default {
...
@@ -1072,7 +1042,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
>
.my-label
{
width
:
100px
;
}
.container_top
{
.container_top
{
padding
:
15px
;
padding
:
15px
;
}
}
...
...
src/views/Spendreimbursement/headman/headmanList.vue
View file @
01e9384f
...
@@ -232,14 +232,67 @@
...
@@ -232,14 +232,67 @@
title=
"查看详情"
title=
"查看详情"
:visible.sync=
"drawer"
:visible.sync=
"drawer"
:direction=
"direction"
:direction=
"direction"
size=
"40%"
size=
"45%"
>
<el-form>
<el-descriptions
:column=
"6"
border
title=
"基本信息"
style=
"padding: 20px"
label-class-name=
"my-label"
>
>
<el-form
label-width=
"180px"
>
<el-descriptions-item
label=
"出差理由"
:span=
"6"
>
<el-row>
<span>
{{ paramlist.tripReason }}
</span>
<el-col
:span=
"12"
>
</el-descriptions-item>
<div
class=
"grid-content bg-purple"
>
<el-descriptions-item
label=
"附件数量"
:span=
"3"
>
<el-form-item
label=
"审批状态"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"出发地点"
:span=
"3"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"目的地点"
:span=
"3"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"天数"
:span=
"3"
>
<span>
{{ paramlist.days }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"交通工具"
:span=
"3"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"6"
border
title=
"费用详情"
style=
"padding: 20px"
label-class-name=
"my-label"
>
<el-descriptions-item
label=
"伙食补贴"
:span=
"3"
>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"公杂补贴"
:span=
"3"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"火车/汽车/轮船费(元)"
:span=
"3"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"机票费"
:span=
"3"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"汽油费"
:span=
"3"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"住宿费"
:span=
"3"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"其他费用"
:span=
"3"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"审批状态"
:span=
"3"
>
<el-tag
<el-tag
size=
"mini"
:type=
"
:type=
"
paramlist.tripStatus == 0
paramlist.tripStatus == 0
? 'info'
? 'info'
...
@@ -262,76 +315,25 @@
...
@@ -262,76 +315,25 @@
: "不存在"
: "不存在"
}}
}}
</el-tag>
</el-tag>
</el-form-item>
</el-descriptions-item>
<el-form-item
label=
"附件数量"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-form-item>
<el-form-item
label=
"出差理由"
>
<span>
{{ paramlist.tripReason }}
</span>
</el-form-item>
<el-form-item
label=
"出发地点"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-form-item>
<el-form-item
label=
"目的地点"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-form-item>
<el-form-item
label=
"经过地点"
>
<span>
{{ paramlist.transitPlace }}
</span>
</el-form-item>
<el-form-item
label=
"交通工具"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
<el-form
-item
label=
"
伙食补贴(元)
"
>
<el-descriptions
-item
label=
"
备注"
:span=
"6
"
>
<span>
{{ paramlist.
foodAllowance
}}
</span>
<span>
{{ paramlist.
remarks
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form-item
label=
"公杂补贴(元)
"
>
<el-descriptions-item
label=
"无票据说明"
:span=
"6
"
>
<span>
{{ paramlist.
publicMiscellaneousSubsidy
}}
</span>
<span>
{{ paramlist.
nobillExplain
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form
-item
label=
"随
从
人员"
>
<el-descriptions
-item
label=
"随
行
人员"
:span=
"6"
>
<el-tag
<el-tag
type=
"warning"
type=
"warning"
size=
"m
edium
"
size=
"m
ini
"
v-for=
"item in paramlist.entouragelist"
v-for=
"item in paramlist.entouragelist"
:key=
"item.id"
:key=
"item.id"
style=
"margin: 0px 5px"
style=
"margin: 0px 5px"
>
{{ item.personnelName }}
</el-tag
>
{{ item.personnelName }}
</el-tag
>
>
</el-form-item>
</el-descriptions-item>
</div>
</el-descriptions>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费(元)"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
<el-form-item
label=
"机票费(元)"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
<el-form-item
label=
"汽油费(元)"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
<el-form-item
label=
"住宿费(元)"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
<el-form-item
label=
"其他费用(元)"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
<el-form-item
label=
"备注"
>
<span>
{{ paramlist.remarks }}
</span>
</el-form-item>
<el-form-item
label=
"无票据说明"
>
<span>
{{ paramlist.nobillExplain }}
</span>
</el-form-item>
<el-form-item
label=
"是否领取补贴"
>
<span>
{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}
</span>
</el-form-item>
<el-form-item
label=
"天数"
>
<span>
{{ paramlist.days }}
</span>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</el-form>
</el-drawer>
</el-drawer>
</div>
</div>
...
@@ -413,55 +415,6 @@
...
@@ -413,55 +415,6 @@
</div>
</div>
</el-row>
</el-row>
</el-card>
</el-card>
<!-- 附件上传 -->
<!-- <el-card
class="box-card"
style="width: 90%; margin-left: 5%; margin-top: 20px"
v-show="getshow == 0"
>
<div style="width: 60%; margin-left: 30px">
<el-input
type="textarea"
:rows="2"
placeholder="请输入附件详情"
v-model="proutlist1.enclosureDescribe"
style="margin: 20px 0px"
></el-input>
<el-upload
class="upload-demo"
ref="upload1"
drag
:action="action1"
:file-list="fileList1"
:on-remove="delfile1"
:auto-upload="false"
:on-change="onChangepdf"
:on-success="Refresh"
:data="proutlist1"
multiple
style="margin: 20px 0px"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处,或
<em>点击上传附件</em>
</div>
<div class="el-upload__tip" slot="tip">
只能上传文件,且不超过500kb
</div>
</el-upload>
</div>
<div style="margin-left: 75%">
<el-button @click="remove()">取 消</el-button>
<el-button
type="primary"
@click="determine()"
style="margin-top: 20px"
>确 定</el-button
>
</div>
</el-card> -->
<div
class=
"box-card"
v-show=
"getshow == 3"
></div>
<div
class=
"box-card"
v-show=
"getshow == 3"
></div>
</el-drawer>
</el-drawer>
</div>
</div>
...
@@ -562,20 +515,16 @@ export default {
...
@@ -562,20 +515,16 @@ export default {
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
this
.
tableData
=
res
.
data
.
list
;
this
.
tableData
=
res
.
data
.
list
;
res
.
data
.
list
.
forEach
((
item
)
=>
{
res
.
data
.
list
.
forEach
((
item
)
=>
{
selectAll
({
tripId
:
item
.
tripId
}).
then
(
async
(
resu
)
=>
{
selectAll
({
tripId
:
item
.
tripId
}).
then
(
(
resu
)
=>
{
if
(
resu
.
success
)
{
if
(
resu
.
success
)
{
item
.
entouragelist
=
resu
.
data
;
item
.
entouragelist
=
resu
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
resu
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
}
});
});
},
},
...
@@ -609,7 +558,7 @@ export default {
...
@@ -609,7 +558,7 @@ export default {
this
.
agreeOrapproval
.
tripStatus
=
1
;
this
.
agreeOrapproval
.
tripStatus
=
1
;
this
.
agreeOrapproval
.
tripId
=
data
.
tripId
;
this
.
agreeOrapproval
.
tripId
=
data
.
tripId
;
this
.
agreeOrapproval
.
headmanTime
=
this
.
time
();
this
.
agreeOrapproval
.
headmanTime
=
this
.
time
();
Approval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
Approval
(
this
.
agreeOrapproval
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
"
success
"
,
type
:
"
success
"
,
...
@@ -618,12 +567,6 @@ export default {
...
@@ -618,12 +567,6 @@ export default {
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
});
});
...
@@ -648,17 +591,12 @@ export default {
...
@@ -648,17 +591,12 @@ export default {
this
.
agreeOrapproval
.
tripStatus
=
2
;
this
.
agreeOrapproval
.
tripStatus
=
2
;
this
.
agreeOrapproval
.
tripId
=
data
.
tripId
;
this
.
agreeOrapproval
.
tripId
=
data
.
tripId
;
this
.
agreeOrapproval
.
headmanTime
=
this
.
time
();
this
.
agreeOrapproval
.
headmanTime
=
this
.
time
();
Approval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
Approval
(
this
.
agreeOrapproval
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
操作成功
"
);
this
.
$message
.
success
(
"
操作成功
"
);
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
});
});
...
@@ -676,7 +614,7 @@ export default {
...
@@ -676,7 +614,7 @@ export default {
},
},
//查询发票图片
//查询发票图片
Selectinsertlsit
()
{
Selectinsertlsit
()
{
selectAllById
(
this
.
getinvoiveId
).
then
(
async
(
res
)
=>
{
selectAllById
(
this
.
getinvoiveId
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
...
@@ -694,12 +632,6 @@ export default {
...
@@ -694,12 +632,6 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -733,7 +665,7 @@ export default {
...
@@ -733,7 +665,7 @@ export default {
selectImage
(
row
)
{
selectImage
(
row
)
{
this
.
queryDTO
.
tripId
=
row
.
tripId
;
this
.
queryDTO
.
tripId
=
row
.
tripId
;
this
.
proutlist1
.
Id
=
row
.
tripId
;
this
.
proutlist1
.
Id
=
row
.
tripId
;
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
selectByIdF
(
this
.
queryDTO
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
queryDTOList
=
res
.
data
;
this
.
queryDTOList
=
res
.
data
;
if
(
this
.
queryDTOList
.
length
>
0
)
{
if
(
this
.
queryDTOList
.
length
>
0
)
{
...
@@ -748,11 +680,6 @@ export default {
...
@@ -748,11 +680,6 @@ export default {
}
else
{
}
else
{
//业务逻辑
//业务逻辑
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -770,18 +697,12 @@ export default {
...
@@ -770,18 +697,12 @@ export default {
//刷新附件
//刷新附件
Refresh
()
{
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
selectByIdF
(
this
.
queryDTO
).
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
queryDTOList
=
res
.
data
;
this
.
queryDTOList
=
res
.
data
;
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -808,7 +729,10 @@ export default {
...
@@ -808,7 +729,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
>
.my-label
{
width
:
100px
;
}
.container_top
{
.container_top
{
padding
:
15px
;
padding
:
15px
;
}
}
...
...
src/views/Spendreimbursement/spendreimbursementAdd.vue
View file @
01e9384f
...
@@ -13,7 +13,12 @@
...
@@ -13,7 +13,12 @@
:column=
"3"
:column=
"3"
border
border
>
>
<el-descriptions-item
labelClassName=
"required"
label=
"报销项目"
>
<el-descriptions-item
labelClassName=
"required"
label=
"报销项目"
:labelStyle=
"
{ width: '110px', height: '60px' }"
:contentStyle="rowCenter"
>
<!-- projectId -->
<!-- projectId -->
<el-form-item
prop=
"projectId"
>
<el-form-item
prop=
"projectId"
>
<el-select
<el-select
...
@@ -80,9 +85,7 @@
...
@@ -80,9 +85,7 @@
<el-descriptions-item
labelClassName=
"required"
label=
"交通工具"
>
<el-descriptions-item
labelClassName=
"required"
label=
"交通工具"
>
<!-- vehicle -->
<!-- vehicle -->
<el-form-item
prop=
"vehicle"
>
<el-form-item
prop=
"vehicle"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.vehicle"
></el-input>
v-model.trim=
"spendreimbursementform.vehicle"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"申请时间"
>
<el-descriptions-item
labelClassName=
"required"
label=
"申请时间"
>
...
@@ -118,7 +121,6 @@
...
@@ -118,7 +121,6 @@
:disabled=
"
:disabled=
"
spendreimbursementform.receiveSubsidy == 1 ? false : true
spendreimbursementform.receiveSubsidy == 1 ? false : true
"
"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -130,7 +132,6 @@
...
@@ -130,7 +132,6 @@
:disabled=
"
:disabled=
"
spendreimbursementform.receiveSubsidy == 1 ? false : true
spendreimbursementform.receiveSubsidy == 1 ? false : true
"
"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -143,7 +144,6 @@
...
@@ -143,7 +144,6 @@
<el-form-item
prop=
"tripCost"
>
<el-form-item
prop=
"tripCost"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.tripCost"
v-model.trim=
"spendreimbursementform.tripCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -152,7 +152,6 @@
...
@@ -152,7 +152,6 @@
<el-form-item
prop=
"planeTicket"
>
<el-form-item
prop=
"planeTicket"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.planeTicket"
v-model.trim=
"spendreimbursementform.planeTicket"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -164,7 +163,6 @@
...
@@ -164,7 +163,6 @@
<el-form-item
prop=
"trafficCost"
>
<el-form-item
prop=
"trafficCost"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.trafficCost"
v-model.trim=
"spendreimbursementform.trafficCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -173,7 +171,6 @@
...
@@ -173,7 +171,6 @@
<el-form-item
prop=
"lodgingCost"
>
<el-form-item
prop=
"lodgingCost"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.lodgingCost"
v-model.trim=
"spendreimbursementform.lodgingCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -182,7 +179,6 @@
...
@@ -182,7 +179,6 @@
<el-form-item
prop=
"insuranceCost"
>
<el-form-item
prop=
"insuranceCost"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.insuranceCost"
v-model.trim=
"spendreimbursementform.insuranceCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -191,7 +187,6 @@
...
@@ -191,7 +187,6 @@
<el-form-item
prop=
"otherCost"
>
<el-form-item
prop=
"otherCost"
>
<el-input
<el-input
v-model.trim=
"spendreimbursementform.otherCost"
v-model.trim=
"spendreimbursementform.otherCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -217,7 +212,7 @@
...
@@ -217,7 +212,7 @@
label=
"申报总金额(大写)"
label=
"申报总金额(大写)"
>
>
<!-- applyTotalAmountLarge -->
<!-- applyTotalAmountLarge -->
<el-form-item
prop=
"applyTotalAmountLarge"
>
<el-form-item>
<el-input
<el-input
disabled
disabled
v-model.trim=
"spendreimbursementform.applyTotalAmountLarge"
v-model.trim=
"spendreimbursementform.applyTotalAmountLarge"
...
@@ -305,6 +300,8 @@
...
@@ -305,6 +300,8 @@
:headers=
"fileUploadHeader"
:headers=
"fileUploadHeader"
:auto-upload=
"false"
:auto-upload=
"false"
multiple
multiple
:on-remove=
"fileError"
:on-success=
"fileSuccess"
>
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
<div
class=
"el-upload__text"
>
...
@@ -315,7 +312,7 @@
...
@@ -315,7 +312,7 @@
</el-descriptions-item>
</el-descriptions-item>
</el-descriptions>
</el-descriptions>
</el-main>
</el-main>
<el-footer>
<el-footer
style=
"margin: 5 px 2%"
>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
<el-button
@
click=
"resetForm()"
>
重置
</el-button>
<el-button
@
click=
"resetForm()"
>
重置
</el-button>
<el-button
@
click=
"back()"
>
返回
</el-button>
<el-button
@
click=
"back()"
>
返回
</el-button>
...
@@ -327,9 +324,9 @@
...
@@ -327,9 +324,9 @@
import
{
import
{
insert
,
insert
,
selectTypeitem
,
selectTypeitem
,
selectProjectitem
,
selectProjectpeople
,
selectProjectpeople
,
}
from
"
@/api/spendreimbursement.js
"
;
}
from
"
@/api/spendreimbursement.js
"
;
import
{
selectAll
as
projectSelectAll
}
from
"
@/api/project
"
;
import
{
selectAllBystatus
}
from
"
@/api/project
"
;
import
{
selectAllBystatus
}
from
"
@/api/project
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
export
default
{
export
default
{
...
@@ -464,6 +461,9 @@ export default {
...
@@ -464,6 +461,9 @@ export default {
startTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
startTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
endTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
endTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
},
},
rowCenter
:
{
"
text-align
"
:
"
center
"
,
},
};
};
},
},
methods
:
{
methods
:
{
...
@@ -481,10 +481,29 @@ export default {
...
@@ -481,10 +481,29 @@ export default {
list
.
forEach
((
val
)
=>
{
list
.
forEach
((
val
)
=>
{
sum
+=
val
.
money
;
sum
+=
val
.
money
;
});
});
if
(
this
.
spendreimbursementform
.
invoiceIdList
.
length
<
1
)
{
this
.
spendreimbursementform
.
applyTotalAmountLarge
=
null
;
this
.
spendreimbursementform
.
applyTotalAmountSmall
=
0
;
}
else
{
this
.
spendreimbursementform
.
applyTotalAmountSmall
=
sum
;
this
.
spendreimbursementform
.
applyTotalAmountSmall
=
sum
;
}
this
.
convertCurrency
(
sum
);
this
.
convertCurrency
(
sum
);
return
sum
;
return
sum
;
},
},
//上传失败的回调
//上传失败的回调
fileError
(){
this
.
$message
.
error
(
"
附件上传失败
"
);
},
//上传成功
fileSuccess
(
res
){
if
(
res
.
success
){
this
.
$message
.
success
(
res
.
msg
)
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
},
//查询发票编号
//查询发票编号
Selectinsertlsit
()
{
Selectinsertlsit
()
{
let
param
=
{
let
param
=
{
...
@@ -494,16 +513,12 @@ export default {
...
@@ -494,16 +513,12 @@ export default {
userId
:
this
.
$store
.
getters
.
info
.
userId
,
userId
:
this
.
$store
.
getters
.
info
.
userId
,
};
};
selectAllBystatus
(
param
)
selectAllBystatus
(
param
)
.
then
(
async
(
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
this
.
back
();
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -516,10 +531,12 @@ export default {
...
@@ -516,10 +531,12 @@ export default {
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 除发票以外所有的金额
// 除发票以外所有的金额
let
sum1
=
this
.
addnum
(
this
.
spendreimbursementform
);
let
sum1
=
parseFloat
(
this
.
addnum
(
this
.
spendreimbursementform
)
)
;
//
console.log(sum1);
console
.
log
(
sum1
);
// 申报总金额
// 申报总金额
let
sum2
=
this
.
spendreimbursementform
.
applyTotalAmountSmall
;
let
sum2
=
parseFloat
(
this
.
spendreimbursementform
.
applyTotalAmountSmall
);
if
(
sum1
==
sum2
)
{
if
(
sum1
==
sum2
)
{
// 判断随行人员 是否为空
// 判断随行人员 是否为空
if
(
this
.
peopleListName
==
""
)
{
if
(
this
.
peopleListName
==
""
)
{
...
@@ -548,15 +565,10 @@ export default {
...
@@ -548,15 +565,10 @@ export default {
this
.
back
();
this
.
back
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
}
else
{
}
else
{
this
.
$message
.
warning
(
"
发票金额不同
,无法提交
"
);
this
.
$message
.
warning
(
"
申报总金额有误
,无法提交
!
"
);
}
}
}
}
});
});
...
@@ -571,30 +583,19 @@ export default {
...
@@ -571,30 +583,19 @@ export default {
this
.
collectType
=
res
.
data
;
this
.
collectType
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
// 项目类型
// 项目类型
reimebursementprojectItem
()
{
reimebursementprojectItem
()
{
const
params
=
{
const
params
=
{
company
Id
:
this
.
$store
.
getters
.
company
Id
,
user
Id
:
this
.
$store
.
getters
.
info
.
user
Id
};
};
selectProjectitem
(
params
).
then
((
res
)
=>
{
projectSelectAll
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
collectProject
=
res
.
data
;
this
.
collectProject
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -603,17 +604,11 @@ export default {
...
@@ -603,17 +604,11 @@ export default {
const
params
=
{
const
params
=
{
companyId
:
this
.
$store
.
getters
.
companyId
,
companyId
:
this
.
$store
.
getters
.
companyId
,
};
};
selectProjectpeople
(
params
).
then
(
async
(
res
)
=>
{
selectProjectpeople
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
collectProjectpeople
=
res
.
data
;
this
.
collectProjectpeople
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -690,6 +685,7 @@ export default {
...
@@ -690,6 +685,7 @@ export default {
},
},
//重置
//重置
resetForm
()
{
resetForm
()
{
this
.
timeSlot
=
""
;
this
.
$refs
.
ruleform
.
resetFields
();
this
.
$refs
.
ruleform
.
resetFields
();
},
},
// 删除附件
// 删除附件
...
@@ -821,10 +817,7 @@ export default {
...
@@ -821,10 +817,7 @@ export default {
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
// console.log(sum);
return
sum
;
// 转换大小写
this
.
convertCurrency
(
sum
);
return
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
;
},
},
},
},
};
};
...
@@ -861,4 +854,8 @@ export default {
...
@@ -861,4 +854,8 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
.contract-description-form
{
width
:
95%
;
margin
:
20px
2%
;
}
</
style
>
</
style
>
\ No newline at end of file
src/views/Spendreimbursement/spendreimbursementList.vue
View file @
01e9384f
...
@@ -291,14 +291,67 @@
...
@@ -291,14 +291,67 @@
title=
"查看详情"
title=
"查看详情"
:visible.sync=
"drawer"
:visible.sync=
"drawer"
:direction=
"direction"
:direction=
"direction"
size=
"40%"
size=
"45%"
>
<el-form>
<el-descriptions
:column=
"6"
border
title=
"基本信息"
style=
"padding: 20px"
label-class-name=
"my-label"
>
>
<el-form
label-width=
"180px"
>
<el-descriptions-item
label=
"出差理由"
:span=
"6"
>
<el-row>
<span>
{{ paramlist.tripReason }}
</span>
<el-col
:span=
"12"
>
</el-descriptions-item>
<div
class=
"grid-content bg-purple"
>
<el-descriptions-item
label=
"附件数量"
:span=
"3"
>
<el-form-item
label=
"审批状态"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"出发地点"
:span=
"3"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"目的地点"
:span=
"3"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"天数"
:span=
"3"
>
<span>
{{ paramlist.days }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"交通工具"
:span=
"3"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"6"
border
title=
"费用详情"
style=
"padding: 20px"
label-class-name=
"my-label"
>
<el-descriptions-item
label=
"伙食补贴"
:span=
"3"
>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"公杂补贴"
:span=
"3"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"火车/汽车/轮船费(元)"
:span=
"3"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"机票费"
:span=
"3"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"汽油费"
:span=
"3"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"住宿费"
:span=
"3"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"其他费用"
:span=
"3"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"审批状态"
:span=
"3"
>
<el-tag
<el-tag
size=
"mini"
:type=
"
:type=
"
paramlist.tripStatus == 0
paramlist.tripStatus == 0
? 'info'
? 'info'
...
@@ -321,76 +374,25 @@
...
@@ -321,76 +374,25 @@
: "不存在"
: "不存在"
}}
}}
</el-tag>
</el-tag>
</el-form-item>
</el-descriptions-item>
<el-form-item
label=
"附件数量"
>
<span>
{{ paramlist.enclosureNumber }}
</span>
</el-form-item>
<el-form-item
label=
"出差理由"
>
<span>
{{ paramlist.tripReason }}
</span>
</el-form-item>
<el-form-item
label=
"出发地点"
>
<span>
{{ paramlist.fromPlace }}
</span>
</el-form-item>
<el-form-item
label=
"目的地点"
>
<span>
{{ paramlist.purposePlace }}
</span>
</el-form-item>
<el-form-item
label=
"经过地点"
>
<span>
{{ paramlist.transitPlace }}
</span>
</el-form-item>
<el-form-item
label=
"交通工具"
>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
<el-form
-item
label=
"
伙食补贴(元)
"
>
<el-descriptions
-item
label=
"
备注"
:span=
"6
"
>
<span>
{{ paramlist.
foodAllowance
}}
</span>
<span>
{{ paramlist.
remarks
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form-item
label=
"公杂补贴(元)
"
>
<el-descriptions-item
label=
"无票据说明"
:span=
"6
"
>
<span>
{{ paramlist.
publicMiscellaneousSubsidy
}}
</span>
<span>
{{ paramlist.
nobillExplain
}}
</span>
</el-
form
-item>
</el-
descriptions
-item>
<el-form
-item
label=
"随
从
人员"
>
<el-descriptions
-item
label=
"随
行
人员"
:span=
"6"
>
<el-tag
<el-tag
type=
"warning"
type=
"warning"
size=
"m
edium
"
size=
"m
ini
"
v-for=
"item in paramlist.entouragelist"
v-for=
"item in paramlist.entouragelist"
:key=
"item.id"
:key=
"item.id"
style=
"margin: 0px 5px"
style=
"margin: 0px 5px"
>
{{ item.personnelName }}
</el-tag
>
{{ item.personnelName }}
</el-tag
>
>
</el-form-item>
</el-descriptions-item>
</div>
</el-descriptions>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费(元)"
>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
<el-form-item
label=
"机票费(元)"
>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
<el-form-item
label=
"汽油费(元)"
>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
<el-form-item
label=
"住宿费(元)"
>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
<el-form-item
label=
"其他费用(元)"
>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
<el-form-item
label=
"备注"
>
<span>
{{ paramlist.remarks }}
</span>
</el-form-item>
<el-form-item
label=
"无票据说明"
>
<span>
{{ paramlist.nobillExplain }}
</span>
</el-form-item>
<el-form-item
label=
"是否领取补贴"
>
<span>
{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}
</span>
</el-form-item>
<el-form-item
label=
"天数"
>
<span>
{{ paramlist.days }}
</span>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</el-form>
</el-drawer>
</el-drawer>
</div>
</div>
...
@@ -399,6 +401,7 @@
...
@@ -399,6 +401,7 @@
<el-pagination
<el-pagination
layout=
"->, total, prev, pager, next"
layout=
"->, total, prev, pager, next"
:total=
"total"
:total=
"total"
:current-page.sync=
"queryitem.pageNum"
:page-size=
"queryitem.pageSize"
:page-size=
"queryitem.pageSize"
@
current-change=
"getpagelist"
@
current-change=
"getpagelist"
>
>
...
@@ -557,7 +560,7 @@ export default {
...
@@ -557,7 +560,7 @@ export default {
projectName
:
null
,
projectName
:
null
,
tripStatus
:
null
,
tripStatus
:
null
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
5
,
},
},
//抽屉
//抽屉
drawer
:
false
,
drawer
:
false
,
...
@@ -653,11 +656,6 @@ export default {
...
@@ -653,11 +656,6 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -685,12 +683,7 @@ export default {
...
@@ -685,12 +683,7 @@ export default {
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
collectProjectpeople
=
res
.
data
;
this
.
collectProjectpeople
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
"
失败
"
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -727,21 +720,12 @@ export default {
...
@@ -727,21 +720,12 @@ export default {
if
(
resu
.
success
)
{
if
(
resu
.
success
)
{
e
.
entouragelist
=
resu
.
data
;
e
.
entouragelist
=
resu
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
resu
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
});
});
}
else
{
}
else
{
if
(
res
.
code
==
4
)
{
this
.
$message
.
error
(
res
.
msg
);
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -759,15 +743,11 @@ export default {
...
@@ -759,15 +743,11 @@ export default {
this
.
invoicestatus
=
true
;
this
.
invoicestatus
=
true
;
}
else
{
}
else
{
this
.
invoicestatus
=
false
;
this
.
invoicestatus
=
false
;
this
.
back
();
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
this
.
back
();
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -779,11 +759,6 @@ export default {
...
@@ -779,11 +759,6 @@ export default {
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -803,11 +778,6 @@ export default {
...
@@ -803,11 +778,6 @@ export default {
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
});
});
...
@@ -841,11 +811,6 @@ export default {
...
@@ -841,11 +811,6 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -881,11 +846,6 @@ export default {
...
@@ -881,11 +846,6 @@ export default {
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -904,7 +864,7 @@ export default {
...
@@ -904,7 +864,7 @@ export default {
updatecard
()
{
updatecard
()
{
this
.
getshow
=
0
;
this
.
getshow
=
0
;
this
.
disabled
=
true
;
this
.
disabled
=
true
;
this
.
delf
ile
1
();
this
.
clearF
ile
();
},
},
//删除附件
//删除附件
deleteProject
(
row
)
{
deleteProject
(
row
)
{
...
@@ -918,17 +878,16 @@ export default {
...
@@ -918,17 +878,16 @@ export default {
this
.
visible
=
false
;
this
.
visible
=
false
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
//清除附件文件
//清除附件文件
delfile1
(
file
)
{
delfile1
(
file
)
{
this
.
fileList1
=
this
.
fileList1
.
filter
((
item
)
=>
item
.
uid
!==
file
.
uid
);
this
.
$message
.
error
(
"
上传附件失败
"
);
},
//清除附件文件
clearFile
(){
this
.
fileList1
=
[]
this
.
fileTypepdf
=
false
;
this
.
fileTypepdf
=
false
;
this
.
proutlist1
.
enclosureDescribe
=
""
;
this
.
proutlist1
.
enclosureDescribe
=
""
;
},
},
...
@@ -939,18 +898,14 @@ export default {
...
@@ -939,18 +898,14 @@ export default {
this
.
$refs
.
upload1
.
submit
();
this
.
$refs
.
upload1
.
submit
();
this
.
getshow
=
1
;
//隐藏与显示
this
.
getshow
=
1
;
//隐藏与显示
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
$message
({
showClose
:
true
,
message
:
"
上传附件成功
"
,
type
:
"
success
"
,
});
this
.
Refresh
();
}
else
{
}
else
{
this
.
$message
.
error
(
"
请添加附件,在进行提交
"
);
this
.
$message
.
error
(
"
请添加附件,在进行提交
"
);
}
}
},
},
//刷新附件
//刷新附件
Refresh
()
{
Refresh
(
res
)
{
this
.
$message
.
success
(
"
上传附件成功
"
);
if
(
res
.
success
)
{
const
params
=
{
const
params
=
{
tripId
:
this
.
proutlist1
.
Id
,
tripId
:
this
.
proutlist1
.
Id
,
companyId
:
this
.
$store
.
getters
.
companyId
,
companyId
:
this
.
$store
.
getters
.
companyId
,
...
@@ -961,24 +916,22 @@ export default {
...
@@ -961,24 +916,22 @@ export default {
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
this
.
proutlist1
.
enclosureDescribe
=
""
;
//初始化数据
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
},
},
//附件取消
//附件取消
remove
()
{
remove
()
{
if
(
this
.
queryDTOList
.
length
>
0
)
{
if
(
this
.
queryDTOList
.
length
>
0
)
{
this
.
getshow
=
1
;
this
.
getshow
=
1
;
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
delf
ile
1
();
this
.
clearF
ile
();
}
else
{
}
else
{
this
.
getshow
=
3
;
this
.
getshow
=
3
;
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
delf
ile
1
();
this
.
clearF
ile
();
}
}
},
},
//附件文件校验
//附件文件校验
...
@@ -1011,7 +964,10 @@ export default {
...
@@ -1011,7 +964,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
>
.my-label
{
width
:
100px
;
}
.total_content
{
.total_content
{
padding
:
0px
15px
;
padding
:
0px
15px
;
}
}
...
...
src/views/Spendreimbursement/spendreimbursementListUpdate.vue
View file @
01e9384f
...
@@ -442,9 +442,6 @@ export default {
...
@@ -442,9 +442,6 @@ export default {
tripId
:
this
.
$route
.
query
.
tripid
,
tripId
:
this
.
$route
.
query
.
tripid
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
// console.log(res.data);
//获取数据(把data里的数据放在数组里面)
//this.spendreimbursementform = res.data;
this
.
spendreimbursementform
=
{
this
.
spendreimbursementform
=
{
...
res
.
data
,
...
res
.
data
,
invoiceIdList
:
[],
//发票信息
invoiceIdList
:
[],
//发票信息
...
@@ -461,12 +458,7 @@ export default {
...
@@ -461,12 +458,7 @@ export default {
let
d
=
array
.
join
(
"
,
"
);
let
d
=
array
.
join
(
"
,
"
);
this
.
peopleListName
=
d
;
this
.
peopleListName
=
d
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
resu
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
if
(
res
.
data
.
receiveSubsidy
==
1
)
{
if
(
res
.
data
.
receiveSubsidy
==
1
)
{
...
@@ -478,12 +470,6 @@ export default {
...
@@ -478,12 +470,6 @@ export default {
this
.
timeSlot
.
push
(
res
.
data
.
endTime
);
this
.
timeSlot
.
push
(
res
.
data
.
endTime
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -495,22 +481,13 @@ export default {
...
@@ -495,22 +481,13 @@ export default {
};
};
selectAllById
(
param
).
then
((
res
)
=>
{
selectAllById
(
param
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
//this.spendreimbursementform.invoiceIdList = [];
res
.
data
.
forEach
((
e
)
=>
{
res
.
data
.
forEach
((
e
)
=>
{
this
.
selectgetinvoivelist
.
push
(
e
);
this
.
selectgetinvoivelist
.
push
(
e
);
this
.
spendreimbursementform
.
invoiceIdList
.
push
(
e
.
invoiceId
);
this
.
spendreimbursementform
.
invoiceIdList
.
push
(
e
.
invoiceId
);
});
});
console
.
log
(
this
.
spendreimbursementform
.
invoiceIdList
);
console
.
log
(
this
.
selectgetinvoivelist
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
this
.
back
();
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -528,11 +505,6 @@ export default {
...
@@ -528,11 +505,6 @@ export default {
this
.
Selectlsitinvoice
();
this
.
Selectlsitinvoice
();
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -541,11 +513,11 @@ export default {
...
@@ -541,11 +513,11 @@ export default {
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 除发票以外所有的金额
// 除发票以外所有的金额
let
sum1
=
this
.
addnum
(
this
.
spendreimbursementform
);
let
sum1
=
parseFloat
(
this
.
addnum
(
this
.
spendreimbursementform
));
// console.log(sum1);
// 申报总金额
// 申报总金额
let
sum2
=
this
.
spendreimbursementform
.
applyTotalAmountSmall
;
let
sum2
=
parseFloat
(
// console.log(sum2);
this
.
spendreimbursementform
.
applyTotalAmountSmall
);
// 判断金额是否相等
// 判断金额是否相等
if
(
sum1
==
sum2
)
{
if
(
sum1
==
sum2
)
{
// 判断随行人员 是否为空
// 判断随行人员 是否为空
...
@@ -554,47 +526,22 @@ export default {
...
@@ -554,47 +526,22 @@ export default {
this
.
spendreimbursementform
.
tripRersonnel
[
0
]
=
this
.
spendreimbursementform
.
tripRersonnel
[
0
]
=
this
.
$store
.
getters
.
name
;
this
.
$store
.
getters
.
name
;
}
else
{
}
else
{
// 如果不为空 就把文本框里面的内容 提交上去
this
.
spendreimbursementform
.
tripRersonnel
=
[];
this
.
spendreimbursementform
.
tripRersonnel
=
[];
let
k
=
this
.
peopleListName
.
split
(
"
,
"
);
let
k
=
this
.
peopleListName
.
split
(
"
,
"
);
this
.
spendreimbursementform
.
tripRersonnel
=
k
;
this
.
spendreimbursementform
.
tripRersonnel
=
k
;
// let m = this.$store.getters.name;
// k.forEach((e) => {
// this.spendreimbursementform.tripRersonnel.push(m, e);
// });
}
}
// 修改的方法
update
(
this
.
spendreimbursementform
).
then
((
res
)
=>
{
update
(
this
.
spendreimbursementform
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
// let addpeopleList = [];
// let a = this.colleagepeopleList.split(",");
// a.forEach((e) => {
// if (e != null && e != "") {
// addpeopleList.push({
// personnelName: e,
// tripId: res.data,
// });
// }
// });
// // 第二个方法 添加随从人员
// insertId(addpeopleList).then((result) => {
// if (result.success) {
// } else {
// this.$message.error(result.msg);
// }
// });
this
.
$message
.
success
(
"
修改成功!
"
);
this
.
$message
.
success
(
"
修改成功!
"
);
this
.
$router
.
push
(
"
/spendreimbursementList
"
);
this
.
$router
.
push
(
"
/spendreimbursementList
"
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
}
else
{
}
else
{
this
.
$message
.
warning
(
"
发票金额不同
,无法提交
"
);
this
.
$message
.
warning
(
"
申报总金额有误
,无法提交
!
"
);
}
}
}
}
});
});
...
@@ -609,12 +556,6 @@ export default {
...
@@ -609,12 +556,6 @@ export default {
this
.
collectType
=
res
.
data
;
this
.
collectType
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -628,12 +569,6 @@ export default {
...
@@ -628,12 +569,6 @@ export default {
this
.
collectProject
=
res
.
data
;
this
.
collectProject
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
});
},
},
...
@@ -724,6 +659,7 @@ export default {
...
@@ -724,6 +659,7 @@ export default {
},
},
//重置
//重置
resetForm
()
{
resetForm
()
{
this
.
timeSlot
=
[];
this
.
$refs
.
ruleform
.
resetFields
();
this
.
$refs
.
ruleform
.
resetFields
();
},
},
// 大小写
// 大小写
...
@@ -837,10 +773,9 @@ export default {
...
@@ -837,10 +773,9 @@ export default {
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
// console.log(sum);
// 转换大小写
// 转换大小写
this
.
convertCurrency
(
sum
);
this
.
convertCurrency
(
sum
);
return
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
;
return
sum
;
},
},
},
},
};
};
...
...
src/views/assets/administration/administrationUpdate.vue
View file @
01e9384f
...
@@ -210,7 +210,6 @@ export default {
...
@@ -210,7 +210,6 @@ export default {
//负责人添加
//负责人添加
grtselect
()
{
grtselect
()
{
if
(
this
.
options
.
length
>
0
)
{
if
(
this
.
options
.
length
>
0
)
{
console
.
log
(
this
.
user
.
userId
);
this
.
FixedAssetsAddDTO
.
fixedController
=
this
.
user
.
userId
;
this
.
FixedAssetsAddDTO
.
fixedController
=
this
.
user
.
userId
;
}
else
{
}
else
{
this
.
$message
.
error
(
"
没有负责人哦亲
"
);
this
.
$message
.
error
(
"
没有负责人哦亲
"
);
...
...
src/views/assets/administration/administrationlist.vue
View file @
01e9384f
...
@@ -95,16 +95,6 @@
...
@@ -95,16 +95,6 @@
>
{{
scope
.
row
.
fixedState
==
'
0
'
?
'
未使用
'
:
scope
.
row
.
fixedState
==
'
1
'
?
'
已使用
'
:
'
已丢失
'
}}
</el-tag>
>
{{
scope
.
row
.
fixedState
==
'
0
'
?
'
未使用
'
:
scope
.
row
.
fixedState
==
'
1
'
?
'
已使用
'
:
'
已丢失
'
}}
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="资产使用情况" width="130px">
<template slot-scope="scope">
<el-button
type="primary"
@click="selectFrom(scope.row)"
size="mini"
icon="el-icon-search"
>查询使用</el-button>
</template>
</el-table-column>-->
<el-table-column
prop=
"prop"
label=
"操作"
align=
"center"
>
<el-table-column
prop=
"prop"
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
...
@@ -295,11 +285,11 @@ export default {
...
@@ -295,11 +285,11 @@ export default {
message
:
"
丢失备注是成功
"
message
:
"
丢失备注是成功
"
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
"
丢失备注失败
"
);
this
.
$message
.
error
(
res
.
msg
);
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
丢失备注失败
"
);
});
});
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
src/views/assets/administration/administrationselect.vue
View file @
01e9384f
...
@@ -238,7 +238,6 @@ export default {
...
@@ -238,7 +238,6 @@ export default {
},
},
//查询资产使用情况
//查询资产使用情况
getList
()
{
getList
()
{
console
.
log
(
this
.
FixedUseQueryDTO
);
queryByPageByFixedId
(
this
.
FixedUseQueryDTO
)
queryByPageByFixedId
(
this
.
FixedUseQueryDTO
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
...
@@ -247,7 +246,7 @@ export default {
...
@@ -247,7 +246,7 @@ export default {
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
查询使用情况失败
"
);
});
});
},
},
//借用
//借用
...
@@ -351,7 +350,7 @@ export default {
...
@@ -351,7 +350,7 @@ export default {
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
添加借用失败
"
);
});
});
}
}
});
});
...
@@ -361,7 +360,6 @@ export default {
...
@@ -361,7 +360,6 @@ export default {
this
.
timestampToTime
();
this
.
timestampToTime
();
this
.
addDTOs
.
fixedId
=
this
.
FixedUseQueryDTO
.
fixedId
;
this
.
addDTOs
.
fixedId
=
this
.
FixedUseQueryDTO
.
fixedId
;
this
.
addDTOs
.
userId
=
this
.
user
.
userId
;
this
.
addDTOs
.
userId
=
this
.
user
.
userId
;
console
.
log
(
this
.
addDTOs
);
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
returnRegistration
(
this
.
addDTOs
)
returnRegistration
(
this
.
addDTOs
)
...
@@ -380,7 +378,7 @@ export default {
...
@@ -380,7 +378,7 @@ export default {
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
归还失败
"
);
});
});
}
}
});
});
...
...
src/views/assets/assetsUpedata.vue
View file @
01e9384f
...
@@ -169,7 +169,6 @@ export default {
...
@@ -169,7 +169,6 @@ export default {
this
.
FixedAssetsAddDTO
.
fixedController
=
this
.
user
.
userId
;
this
.
FixedAssetsAddDTO
.
fixedController
=
this
.
user
.
userId
;
this
.
falesId
=
true
;
this
.
falesId
=
true
;
this
.
name
=
"
修改负责人
"
;
this
.
name
=
"
修改负责人
"
;
console
.
log
(
this
.
FixedAssetsAddDTO
.
fixedController
);
}
else
{
}
else
{
this
.
$message
.
error
(
"
没有负责人哦亲
"
);
this
.
$message
.
error
(
"
没有负责人哦亲
"
);
}
}
...
@@ -234,7 +233,6 @@ export default {
...
@@ -234,7 +233,6 @@ export default {
//提交
//提交
submitForm
()
{
submitForm
()
{
this
.
timestampToTime
();
this
.
timestampToTime
();
console
.
log
(
this
.
FixedAssetsAddDTO
);
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
FixedAssetsAddDTO
.
fixedController
!=
null
)
{
if
(
this
.
FixedAssetsAddDTO
.
fixedController
!=
null
)
{
...
...
src/views/assets/assetslist.vue
View file @
01e9384f
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
size=
"mini"
size=
"mini"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"goUpdate(scope.row)"
@
click=
"goUpdate(scope.row)"
:disabled=
"scope.row.fixedState=='2'?true:false"
>
修改资产信息
</el-button>
>
修改资产信息
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -132,7 +133,7 @@ export default {
...
@@ -132,7 +133,7 @@ export default {
methods
:
{
methods
:
{
//分页
//分页
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
console
.
log
(
val
);
this
.
queryDTO
.
pageNum
=
val
;
this
.
queryDTO
.
pageNum
=
val
;
this
.
selectAssets
();
this
.
selectAssets
();
},
},
...
...
src/views/assets/assetuse/assetuselist.vue
View file @
01e9384f
...
@@ -135,7 +135,7 @@ export default {
...
@@ -135,7 +135,7 @@ export default {
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$$message
.
error
(
e
.
msg
);
this
.
$$message
.
error
(
"
查询失败
"
);
});
});
}
}
}
}
...
...
src/views/company/addcompany.vue
View file @
01e9384f
...
@@ -171,7 +171,7 @@ export default {
...
@@ -171,7 +171,7 @@ export default {
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
(
"
/companyList
"
)
this
.
$router
.
push
(
"
/companyList
"
)
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
)
this
.
$message
.
error
(
res
.
msg
)
}
}
}).
catch
((
error
)
=>
{
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
添加失败
"
)
this
.
$message
.
error
(
"
添加失败
"
)
...
...
src/views/company/index.vue
View file @
01e9384f
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
</div>
</div>
<!-- 管理员抽屉 -->
<!-- 管理员抽屉 -->
<div>
<div>
<el-drawer
title=
"
我是标题
"
:visible.sync=
"drawer"
:before-close=
"handleClose"
size=
"40%"
>
<el-drawer
title=
"
修改管理员密码
"
:visible.sync=
"drawer"
:before-close=
"handleClose"
size=
"40%"
>
<div
class=
"container"
>
<div
class=
"container"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"个人信息"
name=
"first"
>
<el-tab-pane
label=
"个人信息"
name=
"first"
>
...
@@ -154,7 +154,7 @@ export default {
...
@@ -154,7 +154,7 @@ export default {
total
:
0
,
total
:
0
,
companyList
:
[],
companyList
:
[],
drawer
:
false
,
drawer
:
false
,
userlist
:
[]
,
userlist
:
{}
,
passwordData
:
{
passwordData
:
{
staffPassword
:
null
,
staffPassword
:
null
,
...
@@ -191,11 +191,11 @@ export default {
...
@@ -191,11 +191,11 @@ export default {
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
this
.
companyList
=
res
.
data
.
list
;
this
.
companyList
=
res
.
data
.
list
;
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
);
this
.
$message
.
error
(
res
.
msg
);
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$message
.
error
(
"
查询公司失败
"
)
});
});
},
},
//换页
//换页
...
@@ -227,17 +227,15 @@ export default {
...
@@ -227,17 +227,15 @@ export default {
selectByAdminget
(
row
)
{
selectByAdminget
(
row
)
{
this
.
passReset
();
this
.
passReset
();
this
.
drawer
=
true
;
this
.
drawer
=
true
;
console
.
log
(
row
);
selectByAdministrators
({
companyId
:
row
.
companyId
})
selectByAdministrators
({
companyId
:
row
.
companyId
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
==
20000
)
{
if
(
res
.
success
)
{
this
.
userlist
=
res
.
data
;
this
.
userlist
=
res
.
data
;
this
.
passwordData
.
userId
=
res
.
data
.
userId
;
this
.
passwordData
.
userId
=
res
.
data
.
userId
;
console
.
log
(
this
.
passwordData
.
userId
);
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
查询管理员失败
"
);
});
});
},
},
//关闭抽屉
//关闭抽屉
...
@@ -247,7 +245,6 @@ export default {
...
@@ -247,7 +245,6 @@ export default {
},
},
//切换
//切换
handleClick
(
tab
,
event
)
{
handleClick
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
this
.
userupdata
=
true
;
this
.
userupdata
=
true
;
this
.
passReset
();
this
.
passReset
();
...
@@ -275,7 +272,7 @@ export default {
...
@@ -275,7 +272,7 @@ export default {
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
msg
);
this
.
$message
.
error
(
"
修改密码失败
"
);
});
});
}
}
});
});
...
...
src/views/companyFile/companyFileList.vue
View file @
01e9384f
...
@@ -113,15 +113,25 @@ export default {
...
@@ -113,15 +113,25 @@ export default {
},
},
//下载
//下载
async
download
(
row
)
{
async
download
(
row
)
{
console
.
log
(
row
);
getFileUrl
(
row
.
companyFile
)
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
console
.
log
(
url
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标
签
a
.
href
=
(
await
getFileUrl
(
row
.
companyFile
)).
data
;
a
.
href
=
url
;
// 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
remove
();
// 一次性的,用完就删除a标签
a
.
remove
();
// 一次性的,用完就删除a标签
}
else
{
this
.
$message
.
error
(
"
下载失败
"
);
}
})
.
catch
((
e
)
=>
{
this
.
$message
.
error
(
"
下载失败
"
);
});
},
},
//查询
//查询
querycompanyFile
()
{
querycompanyFile
()
{
...
@@ -130,23 +140,11 @@ export default {
...
@@ -130,23 +140,11 @@ export default {
},
},
//分页查询(查询全公司的)
//分页查询(查询全公司的)
getCompanyFileList
()
{
getCompanyFileList
()
{
// if (this.companyFileQurey.conmpanyFileName != null) {
// this.companyFileQurey.conmpanyFileName =
// this.companyFileQurey.conmpanyFileName
// .replace("%", "\\%")
// .replace("_", "\\_");
// }
queryBypage
(
this
.
companyFileQurey
)
queryBypage
(
this
.
companyFileQurey
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
companyFIleList
=
res
.
data
.
list
;
this
.
companyFIleList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
// if (this.companyFileQurey.conmpanyFileName != null) {
// this.companyFileQurey.conmpanyFileName =
// this.companyFileQurey.conmpanyFileName
// .replace("\\%", "%")
// .replace("\\_", "_");
// }
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
}
}
...
...
src/views/companyFile/selfFileList.vue
View file @
01e9384f
...
@@ -49,11 +49,14 @@
...
@@ -49,11 +49,14 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"submitTime"
label=
"上传时间"
align=
"center"
>
<el-table-column
prop=
"submitTime"
label=
"上传时间"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"1
3
0px"
align=
"center"
>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"1
7
0px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"mini"
@
click=
"download(scope.row)"
<el-button
type=
"success"
size=
"mini"
@
click=
"download(scope.row)"
>
点击下载
</el-button
>
点击下载
</el-button
>
>
<el-button
type=
"danger"
size=
"mini"
@
click=
"del(scope.row)"
>
删除
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -74,7 +77,7 @@
...
@@ -74,7 +77,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
queryBypageByuserId
,
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
queryBypageByuserId
,
getFileUrl
,
delFile
}
from
"
@/api/companyFile
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -128,8 +131,6 @@ export default {
...
@@ -128,8 +131,6 @@ export default {
},
},
//下载
//下载
async
download
(
row
)
{
async
download
(
row
)
{
console
.
log
(
row
);
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
var
a
=
document
.
createElement
(
"
a
"
);
//创建一个
<
a
><
/a>标签
a
.
href
=
(
await
getFileUrl
(
row
.
companyFile
)).
data
a
.
href
=
(
await
getFileUrl
(
row
.
companyFile
)).
data
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
...
@@ -139,6 +140,22 @@ export default {
...
@@ -139,6 +140,22 @@ export default {
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
remove
();
// 一次性的,用完就删除a标签
a
.
remove
();
// 一次性的,用完就删除a标签
},
},
//删除
del
(
row
){
delFile
(
row
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
$message
.
success
(
"
删除成功
"
)
if
(
this
.
selFileList
.
length
==
1
&&
this
.
selFileQurey
.
pageNum
!=
1
){
this
.
selFileQurey
.
pageNum
--
}
this
.
getselFileList
()
}
else
{
this
.
$message
.
error
(
res
.
msg
)
}
}).
catch
(
error
=>
{
this
.
$message
.
error
(
"
删除失败
"
)
})
},
//换页
//换页
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
selFileQurey
.
pageNum
=
val
;
this
.
selFileQurey
.
pageNum
=
val
;
...
...
Prev
1
2
3
Next
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