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
979e03ac
Commit
979e03ac
authored
Nov 25, 2022
by
柳 佳乐
Browse files
20221125
parent
a0a55082
Changes
42
Show whitespace changes
Inline
Side-by-side
src/views/Spendreimbursement/finance/financeList.vue
View file @
979e03ac
...
@@ -130,11 +130,11 @@
...
@@ -130,11 +130,11 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
label=
"申报总金额"
label=
"申报总金额
(元)
"
prop=
"applyTotalAmountSmall"
prop=
"applyTotalAmountSmall"
>
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"核报总金额"
align=
"center"
>
<el-table-column
label=
"核报总金额
(元)
"
align=
"center"
>
<
template
slot-scope=
"props"
>
<
template
slot-scope=
"props"
>
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
</
template
>
</
template
>
...
@@ -320,10 +320,10 @@
...
@@ -320,10 +320,10 @@
<span>
{{ paramlist.vehicle }}
</span>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"伙食补贴"
>
<el-form-item
label=
"伙食补贴
(元)
"
>
<span>
{{ paramlist.foodAllowance }}
</span>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公杂补贴"
>
<el-form-item
label=
"公杂补贴
(元)
"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"随从人员"
>
<el-form-item
label=
"随从人员"
>
...
@@ -340,19 +340,19 @@
...
@@ -340,19 +340,19 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费"
>
<el-form-item
label=
"火车/汽车/轮船费
(元)
"
>
<span>
{{ paramlist.tripCost }}
</span>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"机票费"
>
<el-form-item
label=
"机票费
(元)
"
>
<span>
{{ paramlist.planeTicket }}
</span>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"汽油费"
>
<el-form-item
label=
"汽油费
(元)
"
>
<span>
{{ paramlist.trafficCost }}
</span>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"住宿费"
>
<el-form-item
label=
"住宿费
(元)
"
>
<span>
{{ paramlist.lodgingCost }}
</span>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"其他费用"
>
<el-form-item
label=
"其他费用
(元)
"
>
<span>
{{ paramlist.otherCost }}
</span>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
>
...
@@ -584,9 +584,11 @@
...
@@ -584,9 +584,11 @@
<
script
>
<
script
>
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
queryBypagefinance
}
from
"
@/api/spendreimbursement
"
;
import
{
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
queryBypagefinance
,
import
{
finApproval
}
from
"
@/api/spendreimbursement
"
;
selectAll
,
finApproval
,
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAllById
,
selectByIdF
,
deleteById
}
from
"
@/api/project
"
;
import
{
selectAllById
,
selectByIdF
,
deleteById
}
from
"
@/api/project
"
;
export
default
{
export
default
{
created
()
{
created
()
{
...
@@ -692,8 +694,7 @@ export default {
...
@@ -692,8 +694,7 @@ export default {
// 展示数据的方法
// 展示数据的方法
getpagelist
(
pager
=
1
)
{
getpagelist
(
pager
=
1
)
{
this
.
queryitem
.
pageNum
=
pager
;
this
.
queryitem
.
pageNum
=
pager
;
queryBypagefinance
(
this
.
queryitem
)
queryBypagefinance
(
this
.
queryitem
).
then
(
async
(
res
)
=>
{
.
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
;
...
@@ -711,11 +712,14 @@ export default {
...
@@ -711,11 +712,14 @@ 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
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
agreeandrefuse
(
data
)
{
agreeandrefuse
(
data
)
{
...
@@ -754,14 +758,12 @@ export default {
...
@@ -754,14 +758,12 @@ export default {
confirmButtonText
:
"
确定
"
,
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
type
:
"
warning
"
,
})
}).
then
(()
=>
{
.
then
(()
=>
{
this
.
agreeOrapproval
.
financeId
=
this
.
$store
.
getters
.
urId
;
this
.
agreeOrapproval
.
financeId
=
this
.
$store
.
getters
.
urId
;
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
)
finApproval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
"
success
"
,
type
:
"
success
"
,
...
@@ -770,18 +772,14 @@ export default {
...
@@ -770,18 +772,14 @@ 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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
操作失败
"
);
});
});
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消操作
"
,
});
});
});
}
}
});
});
...
@@ -802,32 +800,26 @@ export default {
...
@@ -802,32 +800,26 @@ export default {
return
false
;
return
false
;
}
}
},
},
})
}).
then
((
value
)
=>
{
.
then
((
value
)
=>
{
this
.
agreeOrapproval
.
financeId
=
this
.
$store
.
getters
.
urId
;
this
.
agreeOrapproval
.
financeId
=
this
.
$store
.
getters
.
urId
;
this
.
agreeOrapproval
.
finaceRefute
=
value
.
value
;
this
.
agreeOrapproval
.
finaceRefute
=
value
.
value
;
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
)
finApproval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
.
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
操作失败
"
);
});
});
this
.
dialogVisible
=
false
;
this
.
dialogVisible
=
false
;
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
取消操作
"
,
});
});
});
}
}
});
});
...
@@ -864,12 +856,11 @@ export default {
...
@@ -864,12 +856,11 @@ export default {
//查询发票图片
//查询发票图片
Selectinsertlsit
()
{
Selectinsertlsit
()
{
selectAllById
(
this
.
getinvoiveId
)
selectAllById
(
this
.
getinvoiveId
)
.
then
((
res
)
=>
{
.
then
(
async
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
let
fileNamepdf
=
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
console
.
log
(
e
.
filePath
);
let
fileType
=
fileNamepdf
.
substring
(
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
)
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
);
...
@@ -885,7 +876,12 @@ export default {
...
@@ -885,7 +876,12 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -1000,8 +996,7 @@ export default {
...
@@ -1000,8 +996,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
)
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
.
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
)
{
...
@@ -1015,10 +1010,13 @@ export default {
...
@@ -1015,10 +1010,13 @@ 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
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
//下载附件
//下载附件
...
@@ -1035,17 +1033,19 @@ export default {
...
@@ -1035,17 +1033,19 @@ export default {
//刷新附件
//刷新附件
Refresh
()
{
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
selectByIdF
(
this
.
queryDTO
)
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
.
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
...
...
src/views/Spendreimbursement/headman/headmanList.vue
View file @
979e03ac
...
@@ -129,12 +129,12 @@
...
@@ -129,12 +129,12 @@
<el-table-column
label=
"报销项目"
prop=
"projectName"
align=
"center"
>
<el-table-column
label=
"报销项目"
prop=
"projectName"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"申报总金额"
label=
"申报总金额
(元)
"
align=
"center"
align=
"center"
prop=
"applyTotalAmountSmall"
prop=
"applyTotalAmountSmall"
>
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"核报总金额"
>
<el-table-column
align=
"center"
label=
"核报总金额
(元)
"
>
<
template
slot-scope=
"props"
>
<
template
slot-scope=
"props"
>
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
</
template
>
</
template
>
...
@@ -282,10 +282,10 @@
...
@@ -282,10 +282,10 @@
<span>
{{ paramlist.vehicle }}
</span>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"伙食补贴"
>
<el-form-item
label=
"伙食补贴
(元)
"
>
<span>
{{ paramlist.foodAllowance }}
</span>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公杂补贴"
>
<el-form-item
label=
"公杂补贴
(元)
"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"随从人员"
>
<el-form-item
label=
"随从人员"
>
...
@@ -302,19 +302,19 @@
...
@@ -302,19 +302,19 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费"
>
<el-form-item
label=
"火车/汽车/轮船费
(元)
"
>
<span>
{{ paramlist.tripCost }}
</span>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"机票费"
>
<el-form-item
label=
"机票费
(元)
"
>
<span>
{{ paramlist.planeTicket }}
</span>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"汽油费"
>
<el-form-item
label=
"汽油费
(元)
"
>
<span>
{{ paramlist.trafficCost }}
</span>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"住宿费"
>
<el-form-item
label=
"住宿费
(元)
"
>
<span>
{{ paramlist.lodgingCost }}
</span>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"其他费用"
>
<el-form-item
label=
"其他费用
(元)
"
>
<span>
{{ paramlist.otherCost }}
</span>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
>
...
@@ -469,10 +469,8 @@
...
@@ -469,10 +469,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
queryByheadman
}
from
"
@/api/spendreimbursement
"
;
import
{
queryByheadman
,
selectAll
,
Approval
}
from
"
@/api/spendreimbursement
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
import
{
Approval
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAllById
,
selectByIdF
}
from
"
@/api/project
"
;
import
{
selectAllById
,
selectByIdF
}
from
"
@/api/project
"
;
export
default
{
export
default
{
created
()
{
created
()
{
...
@@ -515,7 +513,7 @@ export default {
...
@@ -515,7 +513,7 @@ export default {
companyId
:
null
,
companyId
:
null
,
tripId
:
0
,
tripId
:
0
,
},
},
srcList
:[],
srcList
:
[],
//附件///-------
//附件///-------
//drawer1: false,
//drawer1: false,
...
@@ -559,30 +557,26 @@ export default {
...
@@ -559,30 +557,26 @@ export default {
// 展示数据的方法
// 展示数据的方法
getpagelist
(
pager
=
1
)
{
getpagelist
(
pager
=
1
)
{
this
.
queryitem
.
pageNum
=
pager
;
this
.
queryitem
.
pageNum
=
pager
;
queryByheadman
(
this
.
queryitem
)
queryByheadman
(
this
.
queryitem
).
then
((
res
)
=>
{
.
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
;
res
.
data
.
list
.
forEach
((
item
)
=>
{
res
.
data
.
list
.
forEach
((
item
)
=>
{
selectAll
({
tripId
:
item
.
tripId
})
selectAll
({
tripId
:
item
.
tripId
}).
then
(
async
(
resu
)
=>
{
.
then
((
resu
)
=>
{
if
(
resu
.
success
)
{
if
(
resu
.
success
)
{
item
.
entouragelist
=
resu
.
data
;
item
.
entouragelist
=
resu
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
resu
.
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
)
=>
{
this
.
$message
.
error
(
"
失败
"
);
});
});
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 搜索
// 搜索
...
@@ -609,16 +603,13 @@ export default {
...
@@ -609,16 +603,13 @@ export default {
this
.
$confirm
(
"
是否同意此报销单?, 是否继续?
"
,
"
提示
"
,
{
this
.
$confirm
(
"
是否同意此报销单?, 是否继续?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
type
:
"
warning
"
,
})
}).
then
(()
=>
{
.
then
(()
=>
{
this
.
agreeOrapproval
.
headmanId
=
data
.
userId
;
this
.
agreeOrapproval
.
headmanId
=
data
.
userId
;
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
)
Approval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
"
success
"
,
type
:
"
success
"
,
...
@@ -627,16 +618,13 @@ export default {
...
@@ -627,16 +618,13 @@ 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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
操作失败
"
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消操作
"
,
});
});
});
});
},
},
...
@@ -654,30 +642,24 @@ export default {
...
@@ -654,30 +642,24 @@ export default {
return
false
;
return
false
;
}
}
},
},
})
}).
then
((
value
)
=>
{
.
then
((
value
)
=>
{
this
.
agreeOrapproval
.
headmanId
=
data
.
userId
;
this
.
agreeOrapproval
.
headmanId
=
data
.
userId
;
this
.
agreeOrapproval
.
headmanRefute
=
value
.
value
;
this
.
agreeOrapproval
.
headmanRefute
=
value
.
value
;
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
)
Approval
(
this
.
agreeOrapproval
).
then
(
async
(
res
)
=>
{
.
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
操作失败
"
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
取消操作
"
,
});
});
});
});
},
},
...
@@ -694,15 +676,12 @@ export default {
...
@@ -694,15 +676,12 @@ 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
)
=>
{
let
fileNamepdf
=
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
let
url
=
res
.
data
;
...
@@ -715,12 +694,13 @@ export default {
...
@@ -715,12 +694,13 @@ export default {
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取发票图片失败
"
);
this
.
back
();
});
});
},
},
//时间处理 yyyy-MM-dd hh:mm:ss
//时间处理 yyyy-MM-dd hh:mm:ss
...
@@ -753,8 +733,7 @@ export default {
...
@@ -753,8 +733,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
)
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
.
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
)
{
...
@@ -767,11 +746,14 @@ export default {
...
@@ -767,11 +746,14 @@ export default {
this
.
getshow
=
3
;
this
.
getshow
=
3
;
}
}
}
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
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
//下载附件
//下载附件
...
@@ -788,17 +770,19 @@ export default {
...
@@ -788,17 +770,19 @@ export default {
//刷新附件
//刷新附件
Refresh
()
{
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
selectByIdF
(
this
.
queryDTO
)
selectByIdF
(
this
.
queryDTO
).
then
(
async
(
res
)
=>
{
.
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
//判断图片与pdf显示与隐藏
//判断图片与pdf显示与隐藏
...
...
src/views/Spendreimbursement/spendreimbursementAdd.vue
View file @
979e03ac
...
@@ -3,19 +3,23 @@
...
@@ -3,19 +3,23 @@
ref=
"ruleform"
ref=
"ruleform"
:model=
"spendreimbursementform"
:model=
"spendreimbursementform"
:label-position=
"labelPosition"
:label-position=
"labelPosition"
label-width=
"120px"
:rules=
"rules"
:rules=
"rules"
>
>
<el-main>
<el-main>
<el-row
:gutter=
"20"
>
<!-- 第一个样式 -->
<!-- 第一列表单 -->
<el-descriptions
<el-col
:span=
"6"
>
class=
"contract-description-form"
<div
class=
"grid-content bg-purple"
>
title=
"发票信息"
:column=
"3"
border
>
<el-descriptions-item
labelClassName=
"required"
label=
"报销项目"
>
<!-- projectId -->
<!-- projectId -->
<el-form-item
label=
"报销项目"
prop=
"projectId"
>
<el-form-item
prop=
"projectId"
>
<el-select
<el-select
placeholder=
"请选择"
placeholder=
"请选择"
v-model=
"spendreimbursementform.projectId"
:style=
"
{ width: '100%' }"
v-model.trim="spendreimbursementform.projectId"
>
>
<el-option
<el-option
:label=
"item.projectName"
:label=
"item.projectName"
...
@@ -26,44 +30,66 @@
...
@@ -26,44 +30,66 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- summary -->
<!-- summary -->
<el-form-item
label=
"摘要"
prop=
"summary"
>
<el-descriptions-item
labelClassName=
"required"
label=
"摘要"
>
<el-input
v-model=
"spendreimbursementform.summary"
></el-input>
<el-form-item
prop=
"summary"
>
<el-input
v-model.trim=
"spendreimbursementform.summary"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- enclosureNumber -->
<!-- enclosureNumber -->
<el-form-item
label=
"附件数量"
prop=
"enclosureNumber"
>
<el-descriptions-item
labelClassName=
"required"
label=
"附件数量"
>
<el-form-item
prop=
"enclosureNumber"
>
<el-input
<el-input
v-model.number=
"spendreimbursementform.enclosureNumber"
v-model.number=
"spendreimbursementform.enclosureNumber"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- tripReason -->
<!-- tripReason -->
<el-form-item
label=
"出差缘由"
prop=
"tripReason"
>
<el-descriptions-item
labelClassName=
"required"
label=
"出差理由"
>
<el-input
v-model=
"spendreimbursementform.tripReason"
></el-input>
<el-form-item
prop=
"tripReason"
>
<el-input
v-model.trim=
"spendreimbursementform.tripReason"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- fromPlace -->
<!-- fromPlace -->
<el-form-item
label=
"出发地点"
prop=
"fromPlace"
>
<el-descriptions-item
labelClassName=
"required"
label=
"出发地点"
>
<el-input
v-model=
"spendreimbursementform.fromPlace"
></el-input>
<el-form-item
prop=
"fromPlace"
>
<el-input
v-model.trim=
"spendreimbursementform.fromPlace"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"目的地点"
>
<!-- purposePlace -->
<!-- purposePlace -->
<el-form-item
label=
"目的地点"
prop=
"purposePlace"
>
<el-form-item
prop=
"purposePlace"
>
<el-input
<el-input
v-model=
"spendreimbursementform.purposePlace"
v-model
.trim
=
"spendreimbursementform.purposePlace"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"经过地点"
>
<!-- transitPlace -->
<!-- transitPlace -->
<el-form-item
label=
"经过地点"
prop=
"transitPlace"
>
<el-form-item
prop=
"transitPlace"
>
<el-input
<el-input
v-model=
"spendreimbursementform.transitPlace"
v-model
.trim
=
"spendreimbursementform.transitPlace"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"交通工具"
>
<!-- vehicle -->
<!-- vehicle -->
<el-form-item
label=
"交通工具"
prop=
"vehicle"
>
<el-form-item
prop=
"vehicle"
>
<el-input
v-model=
"spendreimbursementform.vehicle"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.vehicle"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"申请时间"
>
<!-- applyTime -->
<!-- applyTime -->
<el-form-item
label=
"申请时间"
prop=
"applyTime"
required
>
<el-form-item
prop=
"applyTime"
>
<el-date-picker
<el-date-picker
v-model=
"spendreimbursementform.applyTime"
v-model
.trim
=
"spendreimbursementform.applyTime"
type=
"date"
type=
"date"
style=
"width: 90%"
style=
"width: 90%"
@
change=
"formtime3"
@
change=
"formtime3"
...
@@ -71,109 +97,143 @@
...
@@ -71,109 +97,143 @@
>
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</div>
</el-descriptions-item>
</el-col>
<!-- 第二列表单 -->
<el-col
:span=
"6"
>
<div
class=
"grid-content bg-purple"
>
<!-- receiveSubsidy -->
<!-- receiveSubsidy -->
<el-form-item
label=
"是否领取补贴"
>
<el-descriptions-item
labelClassName=
"required"
label=
"是否领取补贴"
>
<el-form-item
prop=
"receiveSubsidy"
>
<el-switch
<el-switch
v-model=
"values"
v-model
.trim
=
"values"
active-color=
"#13ce66"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
inactive-color=
"#ff4949"
@
change=
"changeswitch(values)"
@
change=
"changeswitch(values)"
>
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"伙食补贴(元)"
>
<!-- foodAllowance -->
<!-- foodAllowance -->
<el-form-item
label=
"伙食补贴"
prop=
"foodAllowance"
>
<el-form-item
prop=
"foodAllowance"
>
<el-input
<el-input
v-model=
"spendreimbursementform.foodAllowance"
v-model
.trim
=
"spendreimbursementform.foodAllowance"
: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
labelClassName=
"required"
label=
"公杂补贴(元)"
>
<!-- publicMiscellaneousSubsidy -->
<!-- publicMiscellaneousSubsidy -->
<el-form-item
label=
"公杂补贴"
prop=
"publicMiscellaneousSubsidy"
>
<el-form-item
prop=
"publicMiscellaneousSubsidy"
>
<el-input
<el-input
v-model=
"spendreimbursementform.publicMiscellaneousSubsidy"
v-model
.trim
=
"spendreimbursementform.publicMiscellaneousSubsidy"
: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
labelClassName=
"required"
label=
"火车/汽车/轮船费(元)"
>
<!-- tripCost -->
<!-- tripCost -->
<el-form-item
label=
"火车/汽车/轮船费"
prop=
"tripCost"
>
<el-form-item
prop=
"tripCost"
>
<el-input
v-model=
"spendreimbursementform.tripCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.tripCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"飞机票(元)"
>
<!-- planeTicket -->
<!-- planeTicket -->
<el-form-item
label=
"飞机票"
prop=
"planeTicket"
>
<el-form-item
prop=
"planeTicket"
>
<el-input
v-model=
"spendreimbursementform.planeTicket"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.planeTicket"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"过路过桥汽油费(元)"
>
<!-- trafficCost -->
<!-- trafficCost -->
<el-form-item
label=
"过路过桥汽油费"
prop=
"trafficCost"
>
<el-form-item
prop=
"trafficCost"
>
<el-input
v-model=
"spendreimbursementform.trafficCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.trafficCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"住宿费(元)"
>
<!-- lodgingCost -->
<!-- lodgingCost -->
<el-form-item
label=
"住宿费"
prop=
"lodgingCost"
>
<el-form-item
prop=
"lodgingCost"
>
<el-input
v-model=
"spendreimbursementform.lodgingCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.lodgingCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"保险费(元)"
>
<!-- insuranceCost -->
<!-- insuranceCost -->
<el-form-item
label=
"保险费"
prop=
"insuranceCost"
>
<el-form-item
prop=
"insuranceCost"
>
<el-input
<el-input
v-model=
"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
labelClassName=
"required"
label=
"其他费用(元)"
>
<!-- otherCost -->
<!-- otherCost -->
<el-form-item
label=
"其他费用"
prop=
"otherCost"
>
<el-form-item
prop=
"otherCost"
>
<el-input
v-model=
"spendreimbursementform.otherCost"
></el-input>
</el-form-item>
</div>
</el-col>
<!-- 第三列表单 -->
<el-col
:span=
"6"
>
<div
class=
"grid-content bg-purple"
>
<!-- applyTotalAmountLarge -->
<el-form-item
label=
"申报总金额(大写)"
prop=
"applyTotalAmountLarge"
label-width=
"120"
>
<el-input
<el-input
disabled
v-model.trim=
"spendreimbursementform.otherCost"
v-model=
"
spendreimbursementform
.applyTotalAmountLarge
"
@
change=
"addnum(
spendreimbursementform
)
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<!-- applyTotalAmountSmall -->
</el-descriptions-item>
<el-form-item
label=
"申报总金额(小写)"
<el-descriptions-item
prop=
"applyTotalAmountSmall"
:span=
"1"
label-width=
"120"
labelClassName=
"required"
label=
"申报总金额(小写)(元)"
>
>
<!-- applyTotalAmountSmall -->
<el-form-item
prop=
"applyTotalAmountSmall"
>
<el-input
<el-input
v-model=
"spendreimbursementform.applyTotalAmountSmall"
v-model
.trim
=
"spendreimbursementform.applyTotalAmountSmall"
@
change=
"
@
change=
"
convertCurrency(spendreimbursementform.applyTotalAmountSmall)
convertCurrency(spendreimbursementform.applyTotalAmountSmall)
"
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
</el-descriptions-item>
<el-descriptions-item
:span=
"2"
labelClassName=
"required"
label=
"申报总金额(大写)"
>
<!-- applyTotalAmountLarge -->
<el-form-item
prop=
"applyTotalAmountLarge"
>
<el-input
disabled
v-model.trim=
"spendreimbursementform.applyTotalAmountLarge"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"2"
labelClassName=
"required"
label=
"出差时间"
label=
"出差时间"
prop=
"startTime"
required
:rules=
"[
{
required: true,
message: '请选择日期',
trigger: 'change',
},
]"
>
>
<!-- startTime -->
<el-form-item
prop=
"startTime"
>
<el-date-picker
<el-date-picker
v-model=
"timeSlot"
v-model
.trim
=
"timeSlot"
@
change=
"formtime"
@
change=
"formtime"
type=
"daterange"
type=
"daterange"
range-separator=
"至"
range-separator=
"至"
...
@@ -182,22 +242,17 @@
...
@@ -182,22 +242,17 @@
>
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<!-- nobillExplain -->
</el-descriptions-item>
<el-form-item
label=
"无票据说明"
prop=
"nobillExplain"
>
<el-descriptions-item
labelClassName=
"required"
label=
"发票号码"
>
<el-input
<!-- invoiceIdList -->
type=
"textarea"
<el-form-item
prop=
"invoiceIdList"
>
:rows=
"5"
v-model=
"spendreimbursementform.nobillExplain"
></el-input>
</el-form-item>
<el-form-item
label=
"发票号码"
prop=
"fromList"
>
<el-select
<el-select
v-model=
"spendreimbursementform.
from
List"
v-model
.trim
=
"spendreimbursementform.
invoiceId
List"
multiple
multiple
filterable
filterable
default-first-option
default-first-option
placeholder=
"请选择"
placeholder=
"请选择"
@
change=
"Selectmoney()"
>
>
<el-option
<el-option
v-for=
"item in getinvoivelist"
v-for=
"item in getinvoivelist"
...
@@ -207,24 +262,47 @@
...
@@ -207,24 +262,47 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"随行人员(*名字需要用逗号隔开*)"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model.trim=
"peopleListName"
></el-input>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"备注"
>
<!-- remarks -->
<!-- remarks -->
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-form-item
prop=
"remarks"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
:rows=
"
5
"
:rows=
"
2
"
v-model=
"spendreimbursementform.remarks"
v-model
.trim
=
"spendreimbursementform.remarks"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"无票据说明"
>
<!-- nobillExplain -->
<el-form-item
prop=
"nobillExplain"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model.trim=
"spendreimbursementform.nobillExplain"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"附件上传"
>
<!-- 附件上传 -->
<!-- 附件上传 -->
<el-form-item
label=
"附件上传"
>
<el-form-item>
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
drag
drag
:action=
"action1"
:action=
"action1"
ref=
"enclosureUpload"
ref=
"enclosureUpload"
:data=
"enclosurelist"
:data=
"enclosurelist"
:headers=
"fileUploadHeader"
:auto-upload=
"false"
:auto-upload=
"false"
multiple
multiple
>
>
...
@@ -234,75 +312,8 @@
...
@@ -234,75 +312,8 @@
</div>
</div>
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
</div>
</el-descriptions-item>
</el-col>
</el-descriptions>
<!-- 第四列表单 -->
<el-col
:span=
"6"
>
<div
class=
"grid-content bg-purple"
>
<!-- 其他 -->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-circle-plus"
@
click=
"addBtn1"
>
随行人员
</el-button
>
</el-form-item>
<!-- 对话框1 -->
<el-dialog
title=
"选择随行人员"
:visible.sync=
"dialogFormVisible"
>
<!-- -->
<el-form
:model=
"peopleList"
>
<el-row
v-for=
"(item, index) in peopleList.insertBatch"
:key=
"index"
>
<el-form-item
:label=
"'姓名' + (index + 1)"
:prop=
"'insertBatch.' + index + '.personnelName'"
:rules=
"
{
required: true,
message: '姓名不能为空',
trigger: 'blur',
}"
>
<el-col
:span=
"12"
><div
class=
"grid-content bg-purple-light"
>
<el-input
v-model.trim=
"item.personnelName"
></el-input></div
></el-col>
<el-col
:span=
"3"
><div
class=
"grid-content bg-purple"
>
<el-button
style=
"margin-left: 5px"
@
click.prevent=
"removeDomain(item)"
:disabled=
"
peopleList.insertBatch.length == 1 ? true : false
"
>
删除
</el-button
>
</div></el-col
>
<el-col
:span=
"6"
><div
class=
"grid-content bg-purple-light"
>
<el-button
@
click=
"addDomain"
>
新增人员
</el-button>
</div></el-col
>
</el-form-item>
</el-row>
</el-form>
<!-- -->
<!-- 操作 -->
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogFormVisible = false"
>
确 定
</el-button
>
</div>
</el-dialog>
</div>
</el-col>
</el-row>
</el-main>
</el-main>
<el-footer>
<el-footer>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
...
@@ -313,22 +324,17 @@
...
@@ -313,22 +324,17 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
insert
}
from
"
@/api/spendreimbursement.js
"
;
import
{
import
{
selectTypeitem
}
from
"
@/api/spendreimbursement.js
"
;
insert
,
// selectProjectitem
selectTypeitem
,
import
{
selectProjectitem
}
from
"
@/api/spendreimbursement.js
"
;
selectProjectitem
,
//selectProjectpeople
selectProjectpeople
,
import
{
selectProjectpeople
}
from
"
@/api/spendreimbursement.js
"
;
}
from
"
@/api/spendreimbursement.js
"
;
// insertId
import
{
insertId
}
from
"
@/api/spendreimbursement.js
"
;
import
{
Addinvoice
}
from
"
@/api/spendreimbursement.js
"
;
import
{
selectAllBystatus
}
from
"
@/api/project
"
;
import
{
selectAllBystatus
}
from
"
@/api/project
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
export
default
{
export
default
{
created
()
{
created
()
{
this
.
Typeitem
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
fileUploadHeader
[
"
X-Token
"
]
=
this
.
$store
.
getters
.
token
;
this
.
Projectitem
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
Projectpeople
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
spendreimbursementform
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
action1
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataEnclosures
"
;
this
.
action1
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataEnclosures
"
;
...
@@ -339,6 +345,10 @@ export default {
...
@@ -339,6 +345,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
fileUploadHeader
:
{
"
X-Token
"
:
null
,
},
peopleListName
:
""
,
// 文字对齐方式
// 文字对齐方式
labelPosition
:
"
left
"
,
labelPosition
:
"
left
"
,
// 图片提交地址
// 图片提交地址
...
@@ -356,10 +366,10 @@ export default {
...
@@ -356,10 +366,10 @@ export default {
values
:
false
,
values
:
false
,
timeSlot
:
null
,
timeSlot
:
null
,
userId
:
[],
userId
:
[],
form
:
[],
// 收集的是页面表单的数据
// 收集的是页面表单的数据
spendreimbursementform
:
{
spendreimbursementform
:
{
fromList
:
[],
invoiceIdList
:
[],
//发票信息
tripRersonnel
:
[],
//随行人员
companyId
:
null
,
companyId
:
null
,
summary
:
""
,
summary
:
""
,
enclosureNumber
:
""
,
enclosureNumber
:
""
,
...
@@ -391,28 +401,7 @@ export default {
...
@@ -391,28 +401,7 @@ export default {
days
:
null
,
days
:
null
,
userId
:
null
,
userId
:
null
,
tripStatus
:
0
,
tripStatus
:
0
,
enclosureDescribe
:
"
描述
"
,
//附件描述
enclosureDescribe
:
""
,
//附件描述
},
peopleList
:
{
insertBatch
:
[
{
personnelName
:
null
,
tripId
:
null
,
},
],
},
// 报销类型
Typeitem
:
{
companyId
:
null
,
typeCategory
:
0
,
},
// 项目类型
Projectitem
:
{
companyId
:
null
,
},
// 随从成员
Projectpeople
:
{
companyId
:
null
,
},
},
peopletripid
:
null
,
peopletripid
:
null
,
// 收集报销类型进行展示
// 收集报销类型进行展示
...
@@ -428,9 +417,7 @@ export default {
...
@@ -428,9 +417,7 @@ export default {
// 验证规则
// 验证规则
rules
:
{
rules
:
{
fromList
:
[
invoiceIdList
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
{
required
:
true
,
message
:
"
此项不能为空!
"
,
trigger
:
"
change
"
},
],
summary
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
summary
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
enclosureNumber
:
[
enclosureNumber
:
[
{
required
:
true
,
message
:
"
此项不能为空!
"
},
{
required
:
true
,
message
:
"
此项不能为空!
"
},
...
@@ -480,6 +467,24 @@ export default {
...
@@ -480,6 +467,24 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
// 根据发票号码查询金额
Selectmoney
()
{
let
sum
=
0
;
let
list
=
[];
this
.
spendreimbursementform
.
invoiceIdList
.
forEach
((
item
)
=>
{
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
if
(
item
==
e
.
invoiceId
)
{
list
.
push
({
money
:
e
.
mone
});
}
});
});
list
.
forEach
((
val
)
=>
{
sum
+=
val
.
money
;
});
this
.
spendreimbursementform
.
applyTotalAmountSmall
=
sum
;
this
.
convertCurrency
(
sum
);
return
sum
;
},
//查询发票编号
//查询发票编号
Selectinsertlsit
()
{
Selectinsertlsit
()
{
let
param
=
{
let
param
=
{
...
@@ -489,12 +494,16 @@ export default {
...
@@ -489,12 +494,16 @@ export default {
userId
:
this
.
$store
.
getters
.
info
.
userId
,
userId
:
this
.
$store
.
getters
.
info
.
userId
,
};
};
selectAllBystatus
(
param
)
selectAllBystatus
(
param
)
.
then
((
res
)
=>
{
.
then
(
async
(
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
);
this
.
back
();
if
(
res
.
code
==
4
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -506,44 +515,27 @@ export default {
...
@@ -506,44 +515,27 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
insert
(
this
.
spendreimbursementform
)
// 除发票以外所有的金额
.
then
((
res
)
=>
{
let
sum1
=
this
.
addnum
(
this
.
spendreimbursementform
);
if
(
res
.
success
)
{
// console.log(sum1);
let
tid
=
res
.
data
;
// 申报总金额
let
addpeopleList
=
[];
let
sum2
=
this
.
spendreimbursementform
.
applyTotalAmountSmall
;
let
obj1
=
{};
if
(
sum1
==
sum2
)
{
obj1
.
personnelName
=
this
.
$store
.
getters
.
name
;
// 判断随行人员 是否为空
obj1
.
tripId
=
tid
;
if
(
this
.
peopleListName
==
""
)
{
addpeopleList
[
0
]
=
obj1
;
// 如果为空 就用默认的人员
this
.
peopleList
.
insertBatch
.
forEach
((
e
)
=>
{
this
.
spendreimbursementform
.
tripRersonnel
[
0
]
=
if
(
e
.
personnelName
!=
null
&&
e
.
personnelName
!=
""
)
{
this
.
$store
.
getters
.
name
;
let
obj
=
{};
obj
.
personnelName
=
e
.
personnelName
;
obj
.
tripId
=
res
.
data
;
addpeopleList
.
push
(
obj
);
}
});
// 第二个方法 添加随从人员
insertId
(
addpeopleList
)
.
then
((
result
)
=>
{
if
(
result
.
success
)
{
}
else
{
}
else
{
this
.
$message
.
error
(
result
.
msg
);
this
.
spendreimbursementform
.
tripRersonnel
=
[];
}
let
k
=
this
.
peopleListName
.
split
(
"
,
"
);
})
let
m
=
this
.
$store
.
getters
.
name
;
.
catch
((
error
)
=>
{
k
.
forEach
((
e
)
=>
{
this
.
$message
.
error
(
"
失败
"
);
this
.
spendreimbursementform
.
tripRersonnel
.
push
(
m
,
e
);
});
this
.
spendreimbursementform
.
fromList
.
forEach
((
e
)
=>
{
let
obj
=
{};
obj
.
companyId
=
this
.
$store
.
getters
.
companyId
;
obj
.
status
=
1
;
obj
.
tripId
=
res
.
data
;
obj
.
invoiceId
=
e
;
this
.
form
.
push
(
obj
);
});
});
}
insert
(
this
.
spendreimbursementform
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
// 上传附件
// 上传附件
this
.
enclosurelist
.
Id
=
res
.
data
;
this
.
enclosurelist
.
Id
=
res
.
data
;
this
.
enclosurelist
.
companyId
=
this
.
enclosurelist
.
companyId
=
...
@@ -552,84 +544,77 @@ export default {
...
@@ -552,84 +544,77 @@ export default {
this
.
spendreimbursementform
.
enclosureDescribe
;
this
.
spendreimbursementform
.
enclosureDescribe
;
this
.
enclosurelist
.
userId
=
this
.
spendreimbursementform
.
userId
;
this
.
enclosurelist
.
userId
=
this
.
spendreimbursementform
.
userId
;
this
.
$refs
.
enclosureUpload
.
submit
();
this
.
$refs
.
enclosureUpload
.
submit
();
// 第三个方法 添加发票
Addinvoice
(
this
.
form
)
.
then
((
resu
)
=>
{
if
(
resu
.
success
)
{
this
.
$message
.
success
(
"
添加成功!
"
);
this
.
$message
.
success
(
"
添加成功!
"
);
this
.
back
();
this
.
back
();
}
else
{
}
else
{
this
.
$message
.
error
(
resu
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
失败
"
);
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
warning
(
"
发票金额不同,无法提交
"
);
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
添加失败
"
);
});
}
}
});
});
},
},
addDomain
()
{
this
.
peopleList
.
insertBatch
.
push
({
personnelName
:
""
,
tripId
:
null
,
});
},
//
removeDomain
(
item
)
{
var
index
=
this
.
peopleList
.
insertBatch
.
indexOf
(
item
);
if
(
index
!==
-
1
)
{
this
.
peopleList
.
insertBatch
.
splice
(
index
,
1
);
}
},
// 报销类型
// 报销类型
reimebursementtypeItem
()
{
reimebursementtypeItem
()
{
selectTypeitem
(
this
.
Typeitem
)
const
params
=
{
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectTypeitem
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 项目类型
// 项目类型
reimebursementprojectItem
()
{
reimebursementprojectItem
()
{
selectProjectitem
(
this
.
Projectitem
)
const
params
=
{
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectProjectitem
(
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 查询随从人员
// 查询随从人员
reimebursementprojectpeopleItem
()
{
reimebursementprojectpeopleItem
()
{
selectProjectpeople
(
this
.
Projectpeople
)
const
params
=
{
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
if
(
res
.
code
==
20000
)
{
};
// console.log(res.data);
selectProjectpeople
(
params
).
then
(
async
(
res
)
=>
{
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
)
{
//执行退出功能
await
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 弹窗按钮
// 弹窗按钮
...
@@ -639,7 +624,6 @@ export default {
...
@@ -639,7 +624,6 @@ export default {
},
},
// 开关选项
// 开关选项
changeswitch
(
values
)
{
changeswitch
(
values
)
{
// console.log(values);
if
(
values
==
true
)
{
if
(
values
==
true
)
{
this
.
spendreimbursementform
.
receiveSubsidy
=
1
;
this
.
spendreimbursementform
.
receiveSubsidy
=
1
;
}
else
{
}
else
{
...
@@ -708,6 +692,16 @@ export default {
...
@@ -708,6 +692,16 @@ export default {
resetForm
()
{
resetForm
()
{
this
.
$refs
.
ruleform
.
resetFields
();
this
.
$refs
.
ruleform
.
resetFields
();
},
},
// 删除附件
handleRemove
(
file
)
{
const
index
=
this
.
fileList
.
findIndex
((
item
)
=>
item
.
uid
===
file
.
uid
);
if
(
index
>=
0
)
{
const
deleteFile
=
this
.
fileList
.
splice
(
index
,
1
);
if
(
deleteFile
.
length
)
{
this
.
deleteFiles
.
push
(
deleteFile
[
0
]);
}
}
},
// 大小写
// 大小写
convertCurrency
(
money
)
{
convertCurrency
(
money
)
{
//汉字的数字
//汉字的数字
...
@@ -815,9 +809,56 @@ export default {
...
@@ -815,9 +809,56 @@ export default {
}
}
this
.
spendreimbursementform
.
applyTotalAmountLarge
=
chineseStr
;
this
.
spendreimbursementform
.
applyTotalAmountLarge
=
chineseStr
;
},
},
// 浮点数加法
addnum
(
data
)
{
const
obj
=
{
...
data
};
let
a1
=
parseFloat
(
obj
.
foodAllowance
);
let
a2
=
parseFloat
(
obj
.
publicMiscellaneousSubsidy
);
let
a3
=
parseFloat
(
obj
.
tripCost
);
let
a4
=
parseFloat
(
obj
.
planeTicket
);
let
a5
=
parseFloat
(
obj
.
trafficCost
);
let
a6
=
parseFloat
(
obj
.
lodgingCost
);
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
// console.log(sum);
// 转换大小写
this
.
convertCurrency
(
sum
);
return
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
;
},
},
},
};
};
</
script
>
</
script
>
<
style
>
<
style
rel=
"stylesheet/scss"
scoped
lang=
"scss"
>
.file-list
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
width
:
250px
;
padding
:
0
5px
;
}
.avator
{
width
:
10%
;
font-size
:
32px
;
color
:
#d75b5b
;
}
.file-content
{
width
:
80%
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
padding-left
:
10px
;
}
.file-operate
{
width
:
15%
;
font-size
:
16px
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
span
{
cursor
:
pointer
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/Spendreimbursement/spendreimbursementList.vue
View file @
979e03ac
...
@@ -6,11 +6,11 @@
...
@@ -6,11 +6,11 @@
<el-form-item
label=
"项目名称:"
>
<el-form-item
label=
"项目名称:"
>
<el-input
<el-input
placeholder=
"请输入"
placeholder=
"请输入"
v-model=
"queryitem.projectName"
v-model
.trim
=
"queryitem.projectName"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"审批状态:"
>
<el-form-item
label=
"审批状态:"
>
<el-select
placeholder=
"请选择"
v-model=
"queryitem.tripStatus"
>
<el-select
placeholder=
"请选择"
v-model
.trim
=
"queryitem.tripStatus"
>
<el-option
label=
"待审批"
value=
"0"
></el-option>
<el-option
label=
"待审批"
value=
"0"
></el-option>
<el-option
label=
"小组长通过"
value=
"1"
></el-option>
<el-option
label=
"小组长通过"
value=
"1"
></el-option>
<el-option
label=
"小组长驳回"
value=
"2"
></el-option>
<el-option
label=
"小组长驳回"
value=
"2"
></el-option>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<el-button
<el-button
type=
"success"
type=
"success"
icon=
"el-icon-circle-plus"
icon=
"el-icon-circle-plus"
@
click=
"insertreimebursementItem"
@
click=
"insert
Orupdate
reimebursementItem
()
"
>
申请出差报销
</el-button
>
申请出差报销
</el-button
>
>
</el-form-item>
</el-form-item>
...
@@ -133,11 +133,11 @@
...
@@ -133,11 +133,11 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
label=
"申报总金额"
label=
"申报总金额
(元)
"
prop=
"applyTotalAmountSmall"
prop=
"applyTotalAmountSmall"
>
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"核报总金额"
>
<el-table-column
align=
"center"
label=
"核报总金额
(元)
"
>
<
template
slot-scope=
"props"
>
<
template
slot-scope=
"props"
>
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
{{
props
.
row
.
verifyTotalAmountSmall
||
"
还未核实金额
"
}}
</
template
>
</
template
>
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
align=
"center"
align=
"center"
>
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"发票
图片
"
width=
"120"
>
<el-table-column
align=
"center"
label=
"发票
文件
"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
style=
"margin: 5px"
style=
"margin: 5px"
...
@@ -168,14 +168,6 @@
...
@@ -168,14 +168,6 @@
@
click=
"ReviseImage(scope.row)"
@
click=
"ReviseImage(scope.row)"
>
点击查看
</el-button
>
点击查看
</el-button
>
>
<el-button
style=
"margin: 5px"
size=
"mini"
type=
"success"
@
click=
"updateinvoice()"
v-if=
"scope.row.tripStatus == 0"
>
修改发票
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"下载附件"
width=
"120"
>
<el-table-column
align=
"center"
label=
"下载附件"
width=
"120"
>
...
@@ -217,21 +209,12 @@
...
@@ -217,21 +209,12 @@
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"180"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
style=
"margin: 5px"
size=
"mini"
icon=
"el-icon-user-solid"
type=
"info"
@
click=
"updatebtn(scope.row)"
v-if=
"scope.row.tripStatus == 0"
>
修改随行人员
</el-button
>
<el-button
<el-button
style=
"margin: 5px"
style=
"margin: 5px"
size=
"mini"
size=
"mini"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
type=
"info"
type=
"info"
@
click=
"updatereimbursement
List
(scope.row)"
@
click=
"
insertOr
updatereim
e
bursement
Item
(scope.row)"
v-if=
"scope.row.tripStatus == 0"
v-if=
"scope.row.tripStatus == 0"
>
修改信息
</el-button
>
修改信息
</el-button
>
>
...
@@ -297,7 +280,7 @@
...
@@ -297,7 +280,7 @@
></el-image>
></el-image>
</div>
</div>
<div
v-else
>
<div
v-else
>
<a
class=
"a-style"
@
click=
"Agrt(scope.row)"
>
点击查看文件
</a>
<a
@
click=
"Agrt(scope.row)"
>
点击查看文件
</a>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -358,10 +341,10 @@
...
@@ -358,10 +341,10 @@
<span>
{{ paramlist.vehicle }}
</span>
<span>
{{ paramlist.vehicle }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"伙食补贴"
>
<el-form-item
label=
"伙食补贴
(元)
"
>
<span>
{{ paramlist.foodAllowance }}
</span>
<span>
{{ paramlist.foodAllowance }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公杂补贴"
>
<el-form-item
label=
"公杂补贴
(元)
"
>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
<span>
{{ paramlist.publicMiscellaneousSubsidy }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"随从人员"
>
<el-form-item
label=
"随从人员"
>
...
@@ -378,19 +361,19 @@
...
@@ -378,19 +361,19 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple-light"
>
<div
class=
"grid-content bg-purple-light"
>
<el-form-item
label=
"火车/汽车/轮船费"
>
<el-form-item
label=
"火车/汽车/轮船费
(元)
"
>
<span>
{{ paramlist.tripCost }}
</span>
<span>
{{ paramlist.tripCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"机票费"
>
<el-form-item
label=
"机票费
(元)
"
>
<span>
{{ paramlist.planeTicket }}
</span>
<span>
{{ paramlist.planeTicket }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"汽油费"
>
<el-form-item
label=
"汽油费
(元)
"
>
<span>
{{ paramlist.trafficCost }}
</span>
<span>
{{ paramlist.trafficCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"住宿费"
>
<el-form-item
label=
"住宿费
(元)
"
>
<span>
{{ paramlist.lodgingCost }}
</span>
<span>
{{ paramlist.lodgingCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"其他费用"
>
<el-form-item
label=
"其他费用
(元)
"
>
<span>
{{ paramlist.otherCost }}
</span>
<span>
{{ paramlist.otherCost }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
>
...
@@ -410,118 +393,6 @@
...
@@ -410,118 +393,6 @@
</el-row>
</el-row>
</el-form>
</el-form>
</el-drawer>
</el-drawer>
<!-- 修改发票号码 -->
<div>
<el-drawer
title=
"修改发票号码"
:visible.sync=
"table"
direction=
"rtl"
size=
"40%"
>
<el-button
style=
"margin: 20px"
type=
"success"
icon=
"el-icon-circle-plus"
@
click=
"Selectinvoicelsit()"
>
添加发票号码
</el-button
>
<el-table
border
style=
"width: 100%"
:data=
"invoicelist"
>
<el-table-column
label=
"序号"
width=
"50"
type=
"index"
>
</el-table-column>
<el-table-column
label=
"发票号码"
>
<
template
slot-scope=
"props"
>
{{
props
.
row
.
number
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"props"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
:disabled=
"invoicestatus == true ? true : false"
@
click=
"deleteinvoice(props.row)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</el-drawer>
<!-- 添加发票号码 -->
<el-dialog
title=
"发票号码"
:visible.sync=
"insertvioiceFrom"
>
<el-form
:model=
"invoicelistform"
>
<el-form-item
label=
"发票号码(可多选):"
>
<el-select
v-model=
"invoicelistform.fromList"
multiple
filterable
default-first-option
placeholder=
"请选择"
>
<el-option
v-for=
"item in getinvoivelist"
:key=
"item.invoiceId"
:label=
"item.number"
:value=
"item.invoiceId"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"insertvioiceFrom = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"insertInvoice()"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
<!-- 修改随从人员 -->
<el-dialog
title=
"修改随从人员"
:visible.sync=
"dialogFormVisible"
>
<el-form
:model=
"peopleList"
ref=
"peopleForm"
>
<el-row
v-for=
"(item, index) in peopleList.collectName"
:key=
"item.index"
>
<el-form-item
:label=
"'姓名' + (index + 1)"
:prop=
"'collectName.' + index + '.personnelName'"
:rules=
"{
required: true,
message: '姓名不能为空',
trigger: 'blur',
}"
>
<el-col
:span=
"8"
><div
class=
"grid-content bg-purple-light"
>
<el-input
v-model.trim=
"item.personnelName"
:disabled=
"item.disable"
></el-input></div
></el-col>
<el-col
:span=
"3"
><div
class=
"grid-content bg-purple"
>
<el-button
style=
"margin-left: 5px"
@
click.prevent=
"removeDomain(item)"
:disabled=
"item.disable"
>
删除
</el-button
>
</div></el-col
>
<el-col
:span=
"6"
><div
class=
"grid-content bg-purple-light"
>
<el-button
@
click=
"addDomain"
>
新增人员
</el-button>
</div></el-col
>
</el-form-item>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"updatereimbursementPeople"
>
确 定
</el-button
>
</div>
</el-dialog>
</div>
</div>
<!-- 分页区域 -->
<!-- 分页区域 -->
<div
class=
"block"
>
<div
class=
"block"
>
...
@@ -550,7 +421,6 @@
...
@@ -550,7 +421,6 @@
>
>
<el-card
<el-card
class=
"box-card"
style=
"width: 90%; margin-left: 5%; margin-top: 20px"
style=
"width: 90%; margin-left: 5%; margin-top: 20px"
v-show=
"getshow == 1"
v-show=
"getshow == 1"
>
>
...
@@ -569,7 +439,6 @@
...
@@ -569,7 +439,6 @@
<el-button
<el-button
type=
"primary"
type=
"primary"
icon=
"el-icon-folder-checked"
icon=
"el-icon-folder-checked"
class=
"a-style"
size=
"mini"
size=
"mini"
style=
"font-size: 13px"
style=
"font-size: 13px"
@
click=
"delProject(index)"
@
click=
"delProject(index)"
...
@@ -595,7 +464,6 @@
...
@@ -595,7 +464,6 @@
<el-button
<el-button
type=
"danger"
type=
"danger"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
class=
"a-style"
size=
"mini "
size=
"mini "
style=
"font-size: 13px"
style=
"font-size: 13px"
slot=
"reference"
slot=
"reference"
...
@@ -608,7 +476,6 @@
...
@@ -608,7 +476,6 @@
</el-card>
</el-card>
<!-- 附件上传 -->
<!-- 附件上传 -->
<el-card
<el-card
class=
"box-card"
style=
"width: 90%; margin-left: 5%; margin-top: 20px"
style=
"width: 90%; margin-left: 5%; margin-top: 20px"
v-show=
"getshow == 0"
v-show=
"getshow == 0"
>
>
...
@@ -629,6 +496,7 @@
...
@@ -629,6 +496,7 @@
:on-remove=
"delfile1"
:on-remove=
"delfile1"
:auto-upload=
"false"
:auto-upload=
"false"
:on-change=
"onChangepdf"
:on-change=
"onChangepdf"
:headers=
"fileUploadHeader"
:on-success=
"Refresh"
:on-success=
"Refresh"
:data=
"proutlist1"
:data=
"proutlist1"
multiple
multiple
...
@@ -655,37 +523,29 @@
...
@@ -655,37 +523,29 @@
</div>
</div>
</el-card>
</el-card>
<div
class=
"box-card"
v-show=
"getshow == 3"
></div>
<div
v-show=
"getshow == 3"
></div>
</el-drawer>
</el-drawer>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
queryBypage
}
from
"
@/api/spendreimbursement
"
;
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
selectAll
}
from
"
@/api/spendreimbursement
"
;
import
{
selectAllById
,
selectByIdF
,
deleteById
}
from
"
@/api/project
"
;
import
{
import
{
queryBypage
,
selectAll
,
reimbursementListid
,
reimbursementListid
,
resubmit
,
resubmit
,
Addinvoic
e
,
selectProjectpeopl
e
,
}
from
"
@/api/spendreimbursement
"
;
}
from
"
@/api/spendreimbursement
"
;
// insertId
import
{
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
insertId
}
from
"
@/api/spendreimbursement.js
"
;
import
{
selectAllById
,
selectByIdF
,
deleteById
}
from
"
@/api/project
"
;
import
{
deletBystatus
,
selectAllBystatus
}
from
"
@/api/project
"
;
//selectProjectpeople
import
{
selectProjectpeople
}
from
"
@/api/spendreimbursement.js
"
;
export
default
{
export
default
{
created
()
{
created
()
{
this
.
Projectpeople
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
fileUploadHeader
[
"
X-Token
"
]
=
this
.
$store
.
getters
.
token
;
this
.
getinvoiveId
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
proutlist1
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
proutlist1
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
parm
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
parm
.
companyId
=
this
.
$store
.
getters
.
companyId
;
// 获取 userId
this
.
action1
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataEnclosures
"
;
this
.
queryitem
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
queryDTO
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
action1
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataEnclosures
"
;
//保存附件与下载的接口
this
.
reimebursementprojectpeopleItem
();
this
.
reimebursementprojectpeopleItem
();
this
.
getpagelist
();
this
.
getpagelist
();
},
},
...
@@ -698,7 +558,6 @@ export default {
...
@@ -698,7 +558,6 @@ export default {
tripStatus
:
null
,
tripStatus
:
null
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
userId
:
null
,
},
},
//抽屉
//抽屉
drawer
:
false
,
drawer
:
false
,
...
@@ -709,10 +568,6 @@ export default {
...
@@ -709,10 +568,6 @@ export default {
tableData
:
[],
tableData
:
[],
// 收集随从人员进行展示
// 收集随从人员进行展示
collectProjectpeople
:
[],
collectProjectpeople
:
[],
// 随从成员
Projectpeople
:
{
companyId
:
null
,
},
getinvoivelist
:
[],
getinvoivelist
:
[],
// 发票状态
// 发票状态
invoicestatus
:
false
,
invoicestatus
:
false
,
...
@@ -726,9 +581,11 @@ export default {
...
@@ -726,9 +581,11 @@ export default {
temporaryData
:
{},
temporaryData
:
{},
//查询图片给的值
//查询图片给的值
getinvoiveId
:
{
getinvoiveId
:
{
companyId
:
null
,
tripId
:
0
,
tripId
:
0
,
},
},
fileUploadHeader
:
{
"
X-Token
"
:
null
,
},
//附件///-------
//附件///-------
//drawer1: false,
//drawer1: false,
...
@@ -736,11 +593,6 @@ export default {
...
@@ -736,11 +593,6 @@ export default {
fileList1
:
[],
//合同文件
fileList1
:
[],
//合同文件
disabled2
:
false
,
//隐藏
disabled2
:
false
,
//隐藏
getshow
:
1
,
//判断show的显示与隐藏,
getshow
:
1
,
//判断show的显示与隐藏,
//查询附件
queryDTO
:
{
companyId
:
null
,
tripId
:
null
,
},
queryDTOList
:
[],
//收集附件的数据
queryDTOList
:
[],
//收集附件的数据
//附件抽屉
//附件抽屉
drawer2
:
false
,
drawer2
:
false
,
...
@@ -760,19 +612,15 @@ export default {
...
@@ -760,19 +612,15 @@ export default {
Id
:
null
,
Id
:
null
,
enclosureDescribe
:
""
,
enclosureDescribe
:
""
,
status
:
3
,
//0收入 1支出
status
:
3
,
//0收入 1支出
companyId
:
null
,
userId
:
null
,
userId
:
null
,
companyId
:
null
,
},
},
fileTypepdf
:
false
,
//判断合同文件是否存在
fileTypepdf
:
false
,
//判断合同文件是否存在
fileList1
:
[],
//附件文件
fileList1
:
[],
//附件文件
disabled
:
false
,
//隐藏
disabled
:
false
,
//隐藏
table
:
false
,
table
:
false
,
insertvioiceFrom
:
false
,
invoicelist
:
[],
invoicelist
:
[],
invoicelistform
:
{
fromList
:
[],
//发票号码
},
formtripid
:
null
,
formtripid
:
null
,
srcList
:
[],
srcList
:
[],
parm
:
{
parm
:
{
...
@@ -796,26 +644,25 @@ export default {
...
@@ -796,26 +644,25 @@ export default {
confirmButtonText
:
"
确定
"
,
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
type
:
"
warning
"
,
})
}).
then
(()
=>
{
.
then
(()
=>
{
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
this
.
peopleList
.
collectName
.
splice
(
index
,
1
);
this
.
peopleList
.
collectName
.
splice
(
index
,
1
);
this
.
$message
({
this
.
$message
({
type
:
"
success
"
,
type
:
"
success
"
,
message
:
"
删除成功!
"
,
message
:
"
删除成功!
"
,
});
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
});
});
});
},
},
// 搜索
// 搜索
onSubmit
()
{
onSubmit
()
{
this
.
queryitem
.
pageNum
=
1
;
this
.
getpagelist
();
this
.
getpagelist
();
},
},
// 重置
// 重置
...
@@ -825,233 +672,78 @@ export default {
...
@@ -825,233 +672,78 @@ export default {
tripStatus
:
null
,
tripStatus
:
null
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
userId
:
null
,
userId
:
this
.
$store
.
getters
.
companyId
,
};
};
// 获取 userId
this
.
queryitem
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
getpagelist
();
this
.
getpagelist
();
},
},
// 修改随从人员
// 查询de所有员工
updatereimbursementPeople
()
{
reimebursementprojectpeopleItem
()
{
this
.
$refs
.
peopleForm
.
validate
((
valid
)
=>
{
const
params
=
{
if
(
valid
)
{
let
param
=
[];
this
.
peopleList
.
collectName
.
forEach
((
e
)
=>
{
let
obj
=
{
personnelName
:
e
.
personnelName
,
tripId
:
this
.
temporaryData
.
tripId
,
};
param
.
push
(
obj
);
});
// 第二个方法
insertId
(
param
)
.
then
((
result
)
=>
{
if
(
result
.
success
)
{
this
.
$message
.
success
(
"
修改成功!
"
);
// 刷新页面
this
.
getpagelist
();
// 关闭窗口
this
.
dialogFormVisible
=
false
;
}
else
{
this
.
$message
.
error
(
result
.
msg
);
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
修改失败
"
);
});
}
else
{
console
.
log
(
"
error submit!!
"
);
return
false
;
}
});
},
//查询出要添加的发票编号
Selectinvoicelsit
()
{
this
.
invoicelistform
.
fromList
=
[];
this
.
insertvioiceFrom
=
true
;
let
param
=
{
companyId
:
this
.
$store
.
getters
.
companyId
,
companyId
:
this
.
$store
.
getters
.
companyId
,
status
:
0
,
type
:
2
,
userId
:
this
.
$store
.
getters
.
info
.
userId
,
};
};
selectAllBystatus
(
param
)
selectProjectpeople
(
params
).
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
collectProjectpeople
=
res
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取发票编号失败
"
);
this
.
back
();
});
},
/**
* 第一次 选择两条 this.form.length = 2
* 第二次 不选择 this.form.length = 2
* 第三次 选择两条 this.form.length = 4
*
*/
// 添加发票号码
insertInvoice
()
{
// 第三个方法 添加发票
let
param
=
[]
this
.
invoicelistform
.
fromList
.
forEach
((
e
)
=>
{
let
obj
=
{};
obj
.
companyId
=
this
.
$store
.
getters
.
companyId
;
obj
.
status
=
1
;
obj
.
tripId
=
this
.
formtripid
;
obj
.
invoiceId
=
e
;
param
.
push
(
obj
);
});
if
(
param
.
length
==
0
)
{
this
.
insertvioiceFrom
=
false
;
}
else
{
Addinvoice
(
param
)
.
then
((
resu
)
=>
{
if
(
resu
.
success
)
{
this
.
$message
.
success
(
"
添加成功!
"
);
this
.
insertvioiceFrom
=
false
;
this
.
table
=
false
}
else
{
}
else
{
this
.
$message
.
error
(
resu
.
msg
);
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
失败
"
);
this
.
$message
.
error
(
"
失败
"
);
});
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
},
// 修改发票号码
updateinvoice
()
{
this
.
table
=
true
;
this
.
Selectlsitinvoice
();
},
// 删除发票关系
deleteinvoice
(
data
)
{
let
invoices
=
{
invoiceId
:
data
.
invoiceId
,
tripId
:
data
.
tripId
,
};
this
.
$confirm
(
"
此操作将永久删除该文件, 是否继续?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
})
.
then
(()
=>
{
deletBystatus
(
invoices
)
.
then
((
result
)
=>
{
if
(
result
.
success
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
删除成功!
"
,
});
this
.
table
=
false
// 关闭窗口
}
else
{
this
.
$message
.
error
(
result
.
msg
);
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
删除失败
"
);
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
});
});
});
},
},
// 查询de所有员工
//跳转添加修改的窗口
reimebursementprojectpeopleItem
()
{
insertOrupdatereimebursementItem
(
data
)
{
selectProjectpeople
(
this
.
Projectpeople
)
if
(
data
==
""
||
data
==
undefined
)
{
.
then
((
res
)
=>
{
this
.
$router
.
push
(
"
/spendreimbursementAdd
"
);
if
(
res
.
code
==
20000
)
{
this
.
collectProjectpeople
=
res
.
data
;
}
else
{
}
else
{
this
.
$message
.
error
(
"
失败
"
);
this
.
$router
.
push
({
}
path
:
"
/spendreimbursementListUpdate
"
,
})
query
:
{
.
catch
((
error
)
=>
{
tripid
:
data
.
tripId
,
this
.
$message
.
error
(
"
查询失败
"
);
});
},
},
//添加的方法
});
insertreimebursementItem
()
{
}
this
.
$router
.
push
(
"
/spendreimbursementAdd
"
);
},
},
// 展示数据的方法
// 展示数据的方法
getpagelist
(
pager
=
1
)
{
getpagelist
(
pager
=
1
)
{
this
.
queryitem
.
pageNum
=
pager
;
this
.
queryitem
.
pageNum
=
pager
;
const
params
=
{
...
this
.
queryitem
,
userId
:
this
.
$store
.
getters
.
urId
,
};
//分页查询出差报销记录
//分页查询出差报销记录
queryBypage
(
this
.
queryitem
)
queryBypage
(
params
).
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
list
;
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
//获取随性人员
//获取随性人员
res
.
data
.
list
.
forEach
((
e
)
=>
{
res
.
data
.
list
.
forEach
((
e
)
=>
{
this
.
parm
.
tripId
=
e
.
tripId
;
this
.
parm
.
tripId
=
e
.
tripId
;
this
.
formtripid
=
e
.
tripId
;
this
.
formtripid
=
e
.
tripId
;
selectAll
({
tripId
:
e
.
tripId
})
selectAll
({
tripId
:
e
.
tripId
}).
then
((
resu
)
=>
{
.
then
((
resu
)
=>
{
if
(
resu
.
success
)
{
if
(
resu
.
success
)
{
e
.
entouragelist
=
resu
.
data
;
e
.
entouragelist
=
resu
.
data
;
}
else
{
this
.
$message
.
error
(
resu
.
msg
);
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
失败
"
);
});
});
this
.
tableData
=
res
.
data
.
list
;
}
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
// 跳转修改页面
updatereimbursementList
(
data
)
{
this
.
$router
.
push
({
path
:
"
/spendreimbursementListUpdate
"
,
//query 找到我们需要的字段
query
:
{
tripid
:
data
.
tripId
,
},
});
});
},
// 修改随行人员窗口
updatebtn
(
data
)
{
//去获取随行人员
this
.
temporaryData
=
data
;
this
.
peopleList
.
collectName
=
[];
let
a
=
0
;
data
.
entouragelist
.
forEach
((
e
)
=>
{
let
obj
=
{};
obj
.
personnelName
=
e
.
personnelName
;
obj
.
tripId
=
e
.
tripId
;
if
(
e
.
personnelName
==
this
.
$store
.
getters
.
name
)
{
if
(
a
==
0
)
{
obj
.
disable
=
true
;
a
++
;
}
else
{
}
else
{
obj
.
disable
=
false
;
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
else
{
obj
.
disable
=
false
;
}
}
this
.
peopleList
.
collectName
.
push
(
obj
);
});
});
this
.
dialogFormVisible
=
true
;
},
},
// 查看详情
// 查看详情
getdetails
(
data
)
{
getdetails
(
data
)
{
...
@@ -1060,8 +752,7 @@ export default {
...
@@ -1060,8 +752,7 @@ export default {
},
},
//查询发票编号
//查询发票编号
Selectlsitinvoice
()
{
Selectlsitinvoice
()
{
selectAllById
(
this
.
parm
)
selectAllById
(
this
.
parm
).
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
invoicelist
=
res
.
data
;
this
.
invoicelist
=
res
.
data
;
if
(
this
.
invoicelist
.
length
==
1
)
{
if
(
this
.
invoicelist
.
length
==
1
)
{
...
@@ -1072,26 +763,28 @@ export default {
...
@@ -1072,26 +763,28 @@ export default {
}
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取发票编号失败
"
);
this
.
back
();
});
});
},
},
// 从新提交
// 从新提交
Resubmit
(
data
)
{
Resubmit
(
data
)
{
resubmit
(
data
)
resubmit
(
data
).
then
((
res
)
=>
{
.
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
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
重新提交失败
"
);
});
});
},
},
// 撤回申请
// 撤回申请
...
@@ -1100,8 +793,7 @@ export default {
...
@@ -1100,8 +793,7 @@ export default {
confirmButtonText
:
"
确定
"
,
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
type
:
"
warning
"
,
})
}).
then
(()
=>
{
.
then
(()
=>
{
reimbursementListid
(
data
.
tripId
).
then
((
res
)
=>
{
reimbursementListid
(
data
.
tripId
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
...
@@ -1109,13 +801,14 @@ export default {
...
@@ -1109,13 +801,14 @@ export default {
message
:
"
撤回成功!
"
,
message
:
"
撤回成功!
"
,
});
});
this
.
getpagelist
();
this
.
getpagelist
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
});
});
});
});
},
},
...
@@ -1127,33 +820,33 @@ export default {
...
@@ -1127,33 +820,33 @@ export default {
},
},
//查询发票图片
//查询发票图片
Selectinsertlsit
()
{
Selectinsertlsit
()
{
selectAllById
(
this
.
getinvoiveId
)
const
params
=
{
.
then
((
res
)
=>
{
...
this
.
getinvoiveId
,
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectAllById
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
let
fileNamepdf
=
e
.
filePath
;
let
fileNamepdf
=
e
.
filePath
;
let
fileType
=
fileNamepdf
.
substring
(
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
fileNamepdf
.
lastIndexOf
(
"
.
"
)
);
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
getFileUrl
(
e
.
filePath
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
let
url
=
res
.
data
;
e
.
fileUrl
=
res
.
data
;
e
.
fileUrl
=
url
;
if
(
fileType
!=
"
.pdf
"
)
{
if
(
fileType
!=
"
.pdf
"
)
{
this
.
srcList
.
push
(
url
);
this
.
srcList
.
push
(
res
.
data
);
}
}
}
}
});
});
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取发票图片失败
"
);
this
.
back
();
});
});
},
},
//时间处理
//时间处理
...
@@ -1162,18 +855,19 @@ export default {
...
@@ -1162,18 +855,19 @@ export default {
},
},
///----附件区域
///----附件区域
//查看项目附件.....
//查看项目附件.....
selectImage
(
row
)
{
selectImage
(
row
)
{
this
.
queryDTO
.
tripId
=
row
.
tripId
;
const
params
=
{
companyId
:
this
.
$store
.
getters
.
companyId
,
tripId
:
row
.
tripId
,
};
this
.
proutlist1
.
Id
=
row
.
tripId
;
this
.
proutlist1
.
Id
=
row
.
tripId
;
if
(
row
.
tripStatus
==
2
||
row
.
tripStatus
==
0
)
{
if
(
row
.
tripStatus
==
2
||
row
.
tripStatus
==
0
)
{
this
.
disabled2
=
false
;
this
.
disabled2
=
false
;
}
else
{
}
else
{
this
.
disabled2
=
true
;
this
.
disabled2
=
true
;
}
}
selectByIdF
(
this
.
queryDTO
)
selectByIdF
(
params
).
then
((
res
)
=>
{
.
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
)
{
...
@@ -1187,10 +881,12 @@ export default {
...
@@ -1187,10 +881,12 @@ 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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
//下载附件
//下载附件
...
@@ -1212,8 +908,7 @@ export default {
...
@@ -1212,8 +908,7 @@ export default {
},
},
//删除附件
//删除附件
deleteProject
(
row
)
{
deleteProject
(
row
)
{
deleteById
(
row
)
deleteById
(
row
).
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
selectImage
(
row
);
this
.
selectImage
(
row
);
this
.
$message
({
this
.
$message
({
...
@@ -1221,11 +916,14 @@ export default {
...
@@ -1221,11 +916,14 @@ export default {
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
visible
=
false
;
this
.
visible
=
false
;
console
.
log
(
res
.
msg
);
}
else
{
}
})
.
catch
((
errror
)
=>
{
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
}
`
);
}
}
});
});
},
},
//清除附件文件
//清除附件文件
...
@@ -1238,8 +936,6 @@ export default {
...
@@ -1238,8 +936,6 @@ export default {
determine
()
{
determine
()
{
//判断是否有附件文件
//判断是否有附件文件
if
(
this
.
fileTypepdf
)
{
if
(
this
.
fileTypepdf
)
{
this
.
proutlist1
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
proutlist1
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
$refs
.
upload1
.
submit
();
this
.
$refs
.
upload1
.
submit
();
this
.
getshow
=
1
;
//隐藏与显示
this
.
getshow
=
1
;
//隐藏与显示
this
.
disabled
=
false
;
this
.
disabled
=
false
;
...
@@ -1255,18 +951,22 @@ export default {
...
@@ -1255,18 +951,22 @@ export default {
},
},
//刷新附件
//刷新附件
Refresh
()
{
Refresh
()
{
this
.
queryDTO
.
tripId
=
this
.
proutlist1
.
Id
;
const
params
=
{
selectByIdF
(
this
.
queryDTO
)
tripId
:
this
.
proutlist1
.
Id
,
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectByIdF
(
params
).
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
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取附件文件失败
"
);
});
});
},
},
//附件取消
//附件取消
...
@@ -1274,21 +974,16 @@ export default {
...
@@ -1274,21 +974,16 @@ export default {
if
(
this
.
queryDTOList
.
length
>
0
)
{
if
(
this
.
queryDTOList
.
length
>
0
)
{
this
.
getshow
=
1
;
this
.
getshow
=
1
;
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
backii
();
this
.
delfile1
();
this
.
delfile1
();
}
else
{
}
else
{
this
.
getshow
=
3
;
this
.
getshow
=
3
;
this
.
disabled
=
false
;
this
.
disabled
=
false
;
this
.
backii
();
this
.
delfile1
();
this
.
delfile1
();
}
}
},
},
//附件文件校验
//附件文件校验
onChangepdf
(
file
)
{
onChangepdf
(
file
)
{
console
.
log
(
this
.
proutlist1
);
if
(
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
"
.
"
))
!=
""
)
{
const
fileNamepdf
=
file
.
name
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
!=
""
)
{
this
.
fileTypepdf
=
true
;
this
.
fileTypepdf
=
true
;
}
else
{
}
else
{
this
.
$message
.
warning
(
"
附件只能只能上传文件
"
);
this
.
$message
.
warning
(
"
附件只能只能上传文件
"
);
...
@@ -1301,9 +996,7 @@ export default {
...
@@ -1301,9 +996,7 @@ export default {
if
(
row
.
filePath
==
null
)
{
if
(
row
.
filePath
==
null
)
{
return
false
;
return
false
;
}
else
{
}
else
{
let
fileNamepdf
=
row
.
filePath
;
if
(
row
.
filePath
.
substring
(
row
.
filePath
.
lastIndexOf
(
"
.
"
))
!=
"
.pdf
"
)
{
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
!=
"
.pdf
"
)
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
@@ -1312,15 +1005,13 @@ export default {
...
@@ -1312,15 +1005,13 @@ export default {
},
},
//跳转修改
//跳转修改
Agrt
(
row
)
{
Agrt
(
row
)
{
const
photopath
=
row
.
fileUrl
;
window
.
open
(
row
.
fileUrl
,
"
_blank
"
);
console
.
log
(
photopath
);
window
.
open
(
photopath
,
"
_blank
"
);
},
},
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.total_content
{
.total_content
{
padding
:
0px
15px
;
padding
:
0px
15px
;
}
}
...
...
src/views/Spendreimbursement/spendreimbursementListUpdate.vue
View file @
979e03ac
...
@@ -3,20 +3,24 @@
...
@@ -3,20 +3,24 @@
ref=
"ruleform"
ref=
"ruleform"
:model=
"spendreimbursementform"
:model=
"spendreimbursementform"
:label-position=
"labelPosition"
:label-position=
"labelPosition"
label-width=
"120px"
:rules=
"rules"
:rules=
"rules"
:data=
"spendreimbursementform"
:data=
"spendreimbursementform"
>
>
<el-main>
<el-main>
<el-row
:gutter=
"20"
>
<!-- 第一个样式 -->
<!-- 第一列表单 -->
<el-descriptions
<el-col
:span=
"6"
>
class=
"contract-description-form"
<div
class=
"grid-content bg-purple"
>
title=
"发票信息"
:column=
"3"
border
>
<el-descriptions-item
labelClassName=
"required"
label=
"报销项目"
>
<!-- projectId -->
<!-- projectId -->
<el-form-item
label=
"报销项目"
prop=
"projectId"
>
<el-form-item
prop=
"projectId"
>
<el-select
<el-select
placeholder=
"请选择"
placeholder=
"请选择"
v-model=
"spendreimbursementform.projectId"
:style=
"
{ width: '100%' }"
v-model.trim="spendreimbursementform.projectId"
>
>
<el-option
<el-option
:label=
"item.projectName"
:label=
"item.projectName"
...
@@ -27,45 +31,64 @@
...
@@ -27,45 +31,64 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- summary -->
<!-- summary -->
<el-form-item
label=
"摘要"
prop=
"summary"
>
<el-descriptions-item
labelClassName=
"required"
label=
"摘要"
>
<el-input
v-model=
"spendreimbursementform.summary"
></el-input>
<el-form-item
prop=
"summary"
>
<el-input
v-model.trim=
"spendreimbursementform.summary"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- enclosureNumber -->
<!-- enclosureNumber -->
<el-form-item
label=
"附件数量"
prop=
"enclosureNumber"
>
<el-descriptions-item
labelClassName=
"required"
label=
"附件数量"
>
<el-form-item
prop=
"enclosureNumber"
>
<el-input
<el-input
v-model.number=
"spendreimbursementform.enclosureNumber"
v-model.number=
"spendreimbursementform.enclosureNumber"
value=
""
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- tripReason -->
<!-- tripReason -->
<el-form-item
label=
"出差缘由"
prop=
"tripReason"
>
<el-descriptions-item
labelClassName=
"required"
label=
"出差理由"
>
<el-input
v-model=
"spendreimbursementform.tripReason"
></el-input>
<el-form-item
prop=
"tripReason"
>
<el-input
v-model.trim=
"spendreimbursementform.tripReason"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<!-- fromPlace -->
<!-- fromPlace -->
<el-form-item
label=
"出发地点"
prop=
"fromPlace"
>
<el-descriptions-item
labelClassName=
"required"
label=
"出发地点"
>
<el-input
v-model=
"spendreimbursementform.fromPlace"
></el-input>
<el-form-item
prop=
"fromPlace"
>
<el-input
v-model.trim=
"spendreimbursementform.fromPlace"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"目的地点"
>
<!-- purposePlace -->
<!-- purposePlace -->
<el-form-item
label=
"目的地点"
prop=
"purposePlace"
>
<el-form-item
prop=
"purposePlace"
>
<el-input
<el-input
v-model=
"spendreimbursementform.purposePlace"
v-model
.trim
=
"spendreimbursementform.purposePlace"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"经过地点"
>
<!-- transitPlace -->
<!-- transitPlace -->
<el-form-item
label=
"经过地点"
prop=
"transitPlace"
>
<el-form-item
prop=
"transitPlace"
>
<el-input
<el-input
v-model=
"spendreimbursementform.transitPlace"
v-model
.trim
=
"spendreimbursementform.transitPlace"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"交通工具"
>
<!-- vehicle -->
<!-- vehicle -->
<el-form-item
label=
"交通工具"
prop=
"vehicle"
>
<el-form-item
prop=
"vehicle"
>
<el-input
v-model=
"spendreimbursementform.vehicle"
></el-input>
<el-input
v-model
.trim
=
"spendreimbursementform.vehicle"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"申请时间"
>
<!-- applyTime -->
<!-- applyTime -->
<el-form-item
label=
"申请时间"
prop=
"applyTime"
required
>
<el-form-item
prop=
"applyTime"
>
<el-date-picker
<el-date-picker
v-model=
"spendreimbursementform.applyTime"
v-model
.trim
=
"spendreimbursementform.applyTime"
type=
"date"
type=
"date"
style=
"width: 90%"
style=
"width: 90%"
@
change=
"formtime3"
@
change=
"formtime3"
...
@@ -73,13 +96,10 @@
...
@@ -73,13 +96,10 @@
>
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</div>
</el-descriptions-item>
</el-col>
<!-- 第二列表单 -->
<el-col
:span=
"6"
>
<div
class=
"grid-content bg-purple"
>
<!-- receiveSubsidy -->
<!-- receiveSubsidy -->
<el-form-item
label=
"是否领取补贴"
>
<el-descriptions-item
labelClassName=
"required"
label=
"是否领取补贴"
>
<el-form-item
prop=
"receiveSubsidy"
>
<el-switch
<el-switch
v-model=
"values"
v-model=
"values"
active-color=
"#13ce66"
active-color=
"#13ce66"
...
@@ -88,94 +108,131 @@
...
@@ -88,94 +108,131 @@
>
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"伙食补贴(元)"
>
<!-- foodAllowance -->
<!-- foodAllowance -->
<el-form-item
label=
"伙食补贴"
prop=
"foodAllowance"
>
<el-form-item
prop=
"foodAllowance"
>
<el-input
<el-input
v-model=
"spendreimbursementform.foodAllowance"
v-model
.trim
=
"spendreimbursementform.foodAllowance"
: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
labelClassName=
"required"
label=
"公杂补贴(元)"
>
<!-- publicMiscellaneousSubsidy -->
<!-- publicMiscellaneousSubsidy -->
<el-form-item
label=
"公杂补贴"
prop=
"publicMiscellaneousSubsidy"
>
<el-form-item
prop=
"publicMiscellaneousSubsidy"
>
<el-input
<el-input
v-model=
"spendreimbursementform.publicMiscellaneousSubsidy"
v-model
.trim
=
"spendreimbursementform.publicMiscellaneousSubsidy"
: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
labelClassName=
"required"
label=
"火车/汽车/轮船费(元)"
>
<!-- tripCost -->
<!-- tripCost -->
<el-form-item
label=
"火车/汽车/轮船费"
prop=
"tripCost"
>
<el-form-item
prop=
"tripCost"
>
<el-input
v-model=
"spendreimbursementform.tripCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.tripCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"飞机票(元)"
>
<!-- planeTicket -->
<!-- planeTicket -->
<el-form-item
label=
"飞机票"
prop=
"planeTicket"
>
<el-form-item
prop=
"planeTicket"
>
<el-input
v-model=
"spendreimbursementform.planeTicket"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.planeTicket"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"过路过桥汽油费(元)"
>
<!-- trafficCost -->
<!-- trafficCost -->
<el-form-item
label=
"过路过桥汽油费"
prop=
"trafficCost"
>
<el-form-item
prop=
"trafficCost"
>
<el-input
v-model=
"spendreimbursementform.trafficCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.trafficCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"住宿费(元)"
>
<!-- lodgingCost -->
<!-- lodgingCost -->
<el-form-item
label=
"住宿费"
prop=
"lodgingCost"
>
<el-form-item
prop=
"lodgingCost"
>
<el-input
v-model=
"spendreimbursementform.lodgingCost"
></el-input>
<el-input
v-model.trim=
"spendreimbursementform.lodgingCost"
@
change=
"addnum(spendreimbursementform)"
></el-input>
</el-form-item>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
labelClassName=
"required"
label=
"保险费(元)"
>
<!-- insuranceCost -->
<!-- insuranceCost -->
<el-form-item
label=
"保险费"
prop=
"insuranceCost"
>
<el-form-item
prop=
"insuranceCost"
>
<el-input
<el-input
v-model=
"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
labelClassName=
"required"
label=
"其他费用(元)"
>
<!-- otherCost -->
<!-- otherCost -->
<el-form-item
label=
"其他费用"
prop=
"otherCost"
>
<el-form-item
prop=
"otherCost"
>
<el-input
v-model=
"spendreimbursementform.otherCost"
></el-input>
</el-form-item>
</div>
</el-col>
<!-- 第三列表单 -->
<el-col
:span=
"6"
>
<div
class=
"grid-content bg-purple"
>
<!-- applyTotalAmountLarge -->
<el-form-item
label=
"申报总金额(大写)"
prop=
"applyTotalAmountLarge"
label-width=
"140"
>
<el-input
<el-input
disabled
v-model.trim=
"spendreimbursementform.otherCost"
v-model=
"
spendreimbursementform
.applyTotalAmountLarge
"
@
change=
"addnum(
spendreimbursementform
)
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<!-- applyTotalAmountSmall -->
</el-descriptions-item>
<el-form-item
label=
"申报总金额(小写)"
<el-descriptions-item
prop=
"applyTotalAmountSmall"
:span=
"1"
label-width=
"140"
labelClassName=
"required"
label=
"申报总金额(小写)(元)"
>
>
<!-- applyTotalAmountSmall -->
<el-form-item
prop=
"applyTotalAmountSmall"
>
<el-input
<el-input
v-model=
"spendreimbursementform.applyTotalAmountSmall"
v-model
.trim
=
"spendreimbursementform.applyTotalAmountSmall"
@
change=
"
@
change=
"
convertCurrency(spendreimbursementform.applyTotalAmountSmall)
convertCurrency(spendreimbursementform.applyTotalAmountSmall)
"
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
</el-descriptions-item>
<el-descriptions-item
:span=
"2"
labelClassName=
"required"
label=
"申报总金额(大写)"
>
<!-- applyTotalAmountLarge -->
<el-form-item
prop=
"applyTotalAmountLarge"
>
<el-input
disabled
v-model.trim=
"spendreimbursementform.applyTotalAmountLarge"
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"2"
labelClassName=
"required"
label=
"出差时间"
label=
"出差时间"
prop=
"startTime"
required
:rules=
"[
{
required: true,
message: '请选择日期',
trigger: 'blur',
},
]"
>
>
<!-- startTime -->
<el-form-item
prop=
"startTime"
>
<el-date-picker
<el-date-picker
v-model=
"timeSlot"
v-model
.trim
=
"timeSlot"
@
change=
"formtime"
@
change=
"formtime"
type=
"daterange"
type=
"daterange"
range-separator=
"至"
range-separator=
"至"
...
@@ -184,23 +241,55 @@
...
@@ -184,23 +241,55 @@
>
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<!-- nobillExplain -->
</el-descriptions-item>
<el-form-item
label=
"无票据说明"
prop=
"nobillExplain"
>
<el-descriptions-item
labelClassName=
"required"
label=
"发票号码"
>
<!-- invoiceIdList -->
<el-form-item
prop=
"invoiceIdList"
>
<el-select
v-model=
"spendreimbursementform.invoiceIdList"
multiple
filterable
required
default-first-option
placeholder=
"请选择"
@
change=
"Selectmoney()"
>
<el-option
v-for=
"item in selectgetinvoivelist"
:key=
"item.invoiceId"
:label=
"item.number"
:value=
"item.invoiceId"
></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"随行人员(*名字需要用逗号隔开*)"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"peopleListName"
>
</el-input>
</el-descriptions-item>
<el-descriptions-item
:span=
"3"
label=
"备注"
>
<!-- remarks -->
<el-form-item
prop=
"remarks"
>
<el-input
<el-input
v-model=
"spendreimbursementform.nobillExplain"
type=
"textarea"
:rows=
"2"
v-model.trim=
"spendreimbursementform.remarks"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<!-- remarks -->
</el-descriptions-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-descriptions-item
:span=
"3"
label=
"无票据说明"
>
<!-- nobillExplain -->
<el-form-item
prop=
"nobillExplain"
>
<el-input
<el-input
type=
"textarea"
type=
"textarea"
:rows=
"
5
"
:rows=
"
2
"
v-model=
"spendreimbursementform.
remarks
"
v-model
.trim
=
"spendreimbursementform.
nobillExplain
"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
</div>
</el-descriptions-item>
</el-col>
</el-descriptions>
</el-row>
</el-main>
</el-main>
<el-footer>
<el-footer>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
>
提交
</el-button>
...
@@ -210,32 +299,36 @@
...
@@ -210,32 +299,36 @@
</el-form>
</el-form>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
selectTypeitem
}
from
"
@/api/spendreimbursement.js
"
;
import
{
// selectProjectitem
selectTypeitem
,
import
{
selectProjectitem
}
from
"
@/api/spendreimbursement.js
"
;
selectProjectitem
,
import
{
update
}
from
"
@/api/spendreimbursement.js
"
;
update
,
import
{
selectByTripId
}
from
"
@/api/spendreimbursement.js
"
;
selectByTripId
,
selectAll
,
}
from
"
@/api/spendreimbursement.js
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
money
}
from
"
@/utils/myValidate
"
;
import
{
selectAllBystatus
,
selectAllById
}
from
"
@/api/project
"
;
export
default
{
export
default
{
created
()
{
created
()
{
this
.
triplistfrom
();
this
.
action1
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataEnclosures
"
;
this
.
Typeitem
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
Projectitem
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
Projectpeople
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
spendreimbursementform
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
spendreimbursementform
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
triplistfrom
();
this
.
reimebursementtypeItem
();
this
.
reimebursementtypeItem
();
this
.
reimebursementprojectItem
();
this
.
reimebursementprojectItem
();
this
.
Selectinsertlsit
();
},
},
data
()
{
data
()
{
return
{
return
{
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
// 文字对齐方式
// 文字对齐方式
labelPosition
:
"
left
"
,
labelPosition
:
"
left
"
,
// 收集到的随行人员
peopleListName
:
""
,
values
:
false
,
values
:
false
,
timeSlot
:
[],
timeSlot
:
[],
userId
:
[],
// fromList
: [],
// 收集的是页面表单的数据
// 收集的是页面表单的数据
spendreimbursementform
:
{
spendreimbursementform
:
{
companyId
:
null
,
companyId
:
null
,
...
@@ -269,31 +362,24 @@ export default {
...
@@ -269,31 +362,24 @@ export default {
days
:
null
,
days
:
null
,
userId
:
null
,
userId
:
null
,
tripStatus
:
0
,
tripStatus
:
0
,
enclosureDescribe
:
""
,
invoiceIdList
:
[],
//发票信息
tripRersonnel
:
[],
//随行人员
},
},
peopleId
:
[],
insertBatch
:
[
insertBatch
:
[
{
{
personnelId
:
null
,
personnelId
:
null
,
tripId
:
null
,
tripId
:
null
,
},
},
],
],
// 报销类型
Typeitem
:
{
companyId
:
null
,
typeCategory
:
0
,
},
// 项目类型
Projectitem
:
{
companyId
:
null
,
},
// 随从成员
Projectpeople
:
{
companyId
:
null
,
},
// 收集报销类型进行展示
// 收集报销类型进行展示
collectType
:
[],
collectType
:
[],
// 收集项目名称进行展示时间
// 收集项目名称进行展示时间
collectProject
:
[],
collectProject
:
[],
// 本条数据的发票号码
getinvoivelist
:
[],
// 所有的发票号码
selectgetinvoivelist
:
[],
// 验证规则
// 验证规则
rules
:
{
rules
:
{
summary
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
summary
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
...
@@ -301,6 +387,7 @@ export default {
...
@@ -301,6 +387,7 @@ export default {
{
required
:
true
,
message
:
"
此项不能为空!
"
},
{
required
:
true
,
message
:
"
此项不能为空!
"
},
{
type
:
"
number
"
,
message
:
"
格式不正确!
"
},
{
type
:
"
number
"
,
message
:
"
格式不正确!
"
},
],
],
invoiceIdList
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
tripReason
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
tripReason
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
typeId
:
[
typeId
:
[
{
{
...
@@ -340,7 +427,6 @@ export default {
...
@@ -340,7 +427,6 @@ export default {
],
],
startTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
startTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
endTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
endTime
:
[{
required
:
true
,
message
:
"
此项不能为空!
"
}],
},
},
};
};
},
},
...
@@ -354,78 +440,205 @@ export default {
...
@@ -354,78 +440,205 @@ export default {
triplistfrom
()
{
triplistfrom
()
{
selectByTripId
({
selectByTripId
({
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里的数据放在数组里面)
//获取数据(把data里的数据放在数组里面)
this
.
spendreimbursementform
=
res
.
data
;
//this.spendreimbursementform = res.data;
this
.
spendreimbursementform
=
{
...
res
.
data
,
invoiceIdList
:
[],
//发票信息
tripRersonnel
:
[],
//随行人员
};
// 把获取到的随行人员 存到新对象
selectAll
({
tripId
:
res
.
data
.
tripId
}).
then
((
resu
)
=>
{
if
(
resu
.
success
)
{
let
array
=
[];
resu
.
data
.
forEach
((
e
)
=>
{
let
c
=
e
.
personnelName
;
array
.
push
(
c
);
});
let
d
=
array
.
join
(
"
,
"
);
this
.
peopleListName
=
d
;
}
else
{
this
.
$message
.
error
(
res
.
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
)
{
this
.
values
=
true
;
this
.
values
=
true
;
}
else
{
}
else
{
this
.
values
=
false
;
this
.
values
=
false
;
}
}
this
.
timeSlot
=
[];
this
.
timeSlot
.
push
(
res
.
data
.
startTime
);
this
.
timeSlot
.
push
(
res
.
data
.
startTime
);
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
}
`
);
}
}
});
},
//查询本条数据发票编号
Selectlsitinvoice
()
{
let
param
=
{
tripId
:
this
.
$route
.
query
.
tripid
,
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectAllById
(
param
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
//this.spendreimbursementform.invoiceIdList = [];
res
.
data
.
forEach
((
e
)
=>
{
this
.
selectgetinvoivelist
.
push
(
e
);
this
.
spendreimbursementform
.
invoiceIdList
.
push
(
e
.
invoiceId
);
});
console
.
log
(
this
.
spendreimbursementform
.
invoiceIdList
);
console
.
log
(
this
.
selectgetinvoivelist
);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
});
},
//查询所有未报销的发票编号
Selectinsertlsit
()
{
let
param
=
{
companyId
:
this
.
$store
.
getters
.
companyId
,
status
:
0
,
type
:
2
,
userId
:
this
.
$store
.
getters
.
info
.
userId
,
};
selectAllBystatus
(
param
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
selectgetinvoivelist
=
res
.
data
;
this
.
Selectlsitinvoice
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取失败
"
);
});
});
},
},
// 修改数据的方法
// 修改数据的方法
submitForm
()
{
submitForm
()
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
update
(
this
.
spendreimbursementform
)
// 除发票以外所有的金额
.
then
((
res
)
=>
{
let
sum1
=
this
.
addnum
(
this
.
spendreimbursementform
);
// console.log(sum1);
// 申报总金额
let
sum2
=
this
.
spendreimbursementform
.
applyTotalAmountSmall
;
// console.log(sum2);
// 判断金额是否相等
if
(
sum1
==
sum2
)
{
// 判断随行人员 是否为空
if
(
this
.
peopleListName
==
""
)
{
// 如果为空 就用默认的人员
this
.
spendreimbursementform
.
tripRersonnel
[
0
]
=
this
.
$store
.
getters
.
name
;
}
else
{
this
.
spendreimbursementform
.
tripRersonnel
=
[];
let
k
=
this
.
peopleListName
.
split
(
"
,
"
);
this
.
spendreimbursementform
.
tripRersonnel
=
k
;
// let m = this.$store.getters.name;
// k.forEach((e) => {
// this.spendreimbursementform.tripRersonnel.push(m, e);
// });
}
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
{
this
.
$message
.
error
(
res
.
msg
);
//业务逻辑
if
(
res
.
code
==
4
)
{
//执行退出功能
this
.
$store
.
dispatch
(
"
user/logout
"
);
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
修改失败
"
);
});
});
}
else
{
}
else
{
console
.
log
(
"
error submit!!
"
);
this
.
$message
.
warning
(
"
发票金额不同,无法提交
"
);
return
false
;
}
}
}
});
});
},
},
// 报销类型
// 报销类型
reimebursementtypeItem
()
{
reimebursementtypeItem
()
{
selectTypeitem
(
this
.
Typeitem
)
const
params
=
{
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectTypeitem
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 项目类型
// 项目类型
reimebursementprojectItem
()
{
reimebursementprojectItem
()
{
selectProjectitem
(
this
.
Projectitem
)
const
params
=
{
.
then
((
res
)
=>
{
companyId
:
this
.
$store
.
getters
.
companyId
,
};
selectProjectitem
(
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
}
`
);
}
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
查询失败
"
);
});
});
},
},
// 开关选项
// 开关选项
changeswitch
(
values
)
{
changeswitch
(
values
)
{
// console.log(values);
if
(
values
==
true
)
{
if
(
values
==
true
)
{
this
.
spendreimbursementform
.
receiveSubsidy
=
1
;
this
.
spendreimbursementform
.
receiveSubsidy
=
1
;
}
else
{
}
else
{
...
@@ -491,6 +704,24 @@ export default {
...
@@ -491,6 +704,24 @@ export default {
date
.
getSeconds
()
<
10
?
"
0
"
+
date
.
getSeconds
()
:
date
.
getSeconds
();
date
.
getSeconds
()
<
10
?
"
0
"
+
date
.
getSeconds
()
:
date
.
getSeconds
();
return
Y
+
M
+
D
+
h
+
m
+
s
;
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
},
// 根据发票号码查询金额
Selectmoney
()
{
let
sum
=
0
;
let
list
=
[];
this
.
spendreimbursementform
.
invoiceIdList
.
forEach
((
item
)
=>
{
this
.
selectgetinvoivelist
.
forEach
((
e
)
=>
{
if
(
item
==
e
.
invoiceId
)
{
list
.
push
({
money
:
e
.
mone
});
}
});
});
list
.
forEach
((
val
)
=>
{
sum
+=
val
.
money
;
});
this
.
spendreimbursementform
.
applyTotalAmountSmall
=
sum
;
this
.
convertCurrency
(
sum
);
return
sum
;
},
//重置
//重置
resetForm
()
{
resetForm
()
{
this
.
$refs
.
ruleform
.
resetFields
();
this
.
$refs
.
ruleform
.
resetFields
();
...
@@ -594,6 +825,23 @@ export default {
...
@@ -594,6 +825,23 @@ export default {
}
}
this
.
spendreimbursementform
.
applyTotalAmountLarge
=
chineseStr
;
this
.
spendreimbursementform
.
applyTotalAmountLarge
=
chineseStr
;
},
},
// 浮点数加法
addnum
(
data
)
{
const
obj
=
{
...
data
};
let
a1
=
parseFloat
(
obj
.
foodAllowance
);
let
a2
=
parseFloat
(
obj
.
publicMiscellaneousSubsidy
);
let
a3
=
parseFloat
(
obj
.
tripCost
);
let
a4
=
parseFloat
(
obj
.
planeTicket
);
let
a5
=
parseFloat
(
obj
.
trafficCost
);
let
a6
=
parseFloat
(
obj
.
lodgingCost
);
let
a7
=
parseFloat
(
obj
.
insuranceCost
);
let
a8
=
parseFloat
(
obj
.
otherCost
);
let
sum
=
parseFloat
(
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
).
toFixed
(
2
);
// console.log(sum);
// 转换大小写
this
.
convertCurrency
(
sum
);
return
a1
+
a2
+
a3
+
a4
+
a5
+
a6
+
a7
+
a8
;
},
},
},
};
};
</
script
>
</
script
>
...
...
src/views/assets/administration/administrationUpdate.vue
View file @
979e03ac
...
@@ -173,10 +173,8 @@ export default {
...
@@ -173,10 +173,8 @@ export default {
//返回
//返回
back
()
{
back
()
{
if
(
this
.
attrId
==
0
)
{
if
(
this
.
attrId
==
0
)
{
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
(
"
/assetslist
"
);
this
.
$router
.
push
(
"
/assetslist
"
);
}
else
{
}
else
{
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
(
"
/administrationlsit
"
);
this
.
$router
.
push
(
"
/administrationlsit
"
);
}
}
},
},
...
...
src/views/assets/administration/administrationlist.vue
View file @
979e03ac
...
@@ -35,6 +35,42 @@
...
@@ -35,6 +35,42 @@
:cell-style=
"
{'text-align':'center'}"
:cell-style=
"
{'text-align':'center'}"
:header-cell-style="{'text-align':'center'}"
:header-cell-style="{'text-align':'center'}"
>
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<el-descriptions
class=
"margin-top"
title=
"关于资产"
:column=
"1"
:size=
"medium"
style=
"width:40%; margin:20px 20px"
border
>
<el-descriptions-item
label=
"资产名称:"
:labelStyle=
"
{'width':'120px'}">
<span>
{{
props
.
row
.
fixedName
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"资产详情:"
>
<span>
{{
props
.
row
.
registerRemarks
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"资产使用情况:"
>
<el-button
type=
"primary"
@
click=
"selectFrom(props.row)"
size=
"mini"
icon=
"el-icon-search"
>
查询使用
</el-button>
</el-descriptions-item>
<el-descriptions-item
label=
"资产丢失登记:"
>
<el-button
type=
"danger"
:disabled=
"props.row.fixedState=='2'?true:false"
size=
"mini"
icon=
"el-icon-edit"
@
click=
"open(props.row)"
>
丢失登记
</el-button>
</el-descriptions-item>
</el-descriptions>
</
template
>
</el-table-column>
<el-table-column
label=
"序号"
width=
"50px"
align=
"center"
>
<el-table-column
label=
"序号"
width=
"50px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
{{
...
@@ -59,33 +95,25 @@
...
@@ -59,33 +95,25 @@
>
{{
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"
>
<!--
<el-table-column label="资产使用情况" width="130px">
<template slot-scope="scope">
<template slot-scope="scope">
<el-button
type=
"primary"
@
click=
"selectFrom(scope.row)"
size=
"mini"
>
查询资产使用
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"220px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-button
<el-button
type=
"
danger
"
type="
primary
"
:disabled=
"scope.row.fixedState=='2'?true:false
"
@click="selectFrom(scope.row)
"
size="mini"
size="mini"
@
click=
"open(scope.row)"
icon="el-icon-search"
>
丢失登记
</el-button>
>查询使用</el-button>
</el-col>
</template>
<el-col
:span=
"8"
style=
"margin-left:5px"
>
</el-table-column>-->
<el-table-column
prop=
"prop"
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
style=
"margin-left:40px"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"goUpdate(scope.row)"
@
click=
"goUpdate(scope.row)"
:disabled=
"scope.row.fixedState=='2'?true:false"
:disabled=
"scope.row.fixedState=='2'?true:false"
>
修改资产信息
</el-button>
>
修改资产信息
</el-button>
</el-col>
</el-row>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/assets/administration/administrationselect.vue
View file @
979e03ac
...
@@ -387,7 +387,6 @@ export default {
...
@@ -387,7 +387,6 @@ export default {
},
},
//返回
//返回
back
()
{
back
()
{
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
(
"
/administrationlsit
"
);
this
.
$router
.
push
(
"
/administrationlsit
"
);
},
},
//重置
//重置
...
...
src/views/assets/assetsUpedata.vue
View file @
979e03ac
...
@@ -266,7 +266,6 @@ export default {
...
@@ -266,7 +266,6 @@ export default {
},
},
// 返回
// 返回
back
()
{
back
()
{
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
(
"
/assetslist
"
);
this
.
$router
.
push
(
"
/assetslist
"
);
},
},
//重置
//重置
...
...
src/views/assets/assetslist.vue
View file @
979e03ac
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
>
{{
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
prop=
"prop"
label=
"操作"
>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"140px;"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
...
@@ -74,7 +74,6 @@
...
@@ -74,7 +74,6 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"goUpdate(scope.row)"
@
click=
"goUpdate(scope.row)"
>
修改资产信息
</el-button>
>
修改资产信息
</el-button>
<!--
<el-button
type=
"danger"
size=
"mini"
@
click=
"Updateget(scope.row)"
>
修改管理者
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/assets/assetuse/assetuselist.vue
View file @
979e03ac
src/views/company/addcompany.vue
View file @
979e03ac
...
@@ -166,7 +166,7 @@ export default {
...
@@ -166,7 +166,7 @@ export default {
this
.
company
.
companyCreateTime
=
this
.
timestampToTime
()
this
.
company
.
companyCreateTime
=
this
.
timestampToTime
()
//提交
//提交
register
(
this
.
company
).
then
((
res
)
=>
{
register
(
this
.
company
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
){
if
(
res
.
success
){
this
.
$message
.
success
(
"
添加成功
"
)
this
.
$message
.
success
(
"
添加成功
"
)
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$store
.
dispatch
(
'
tagsView/delView
'
,
this
.
$route
)
this
.
$router
.
push
(
"
/companyList
"
)
this
.
$router
.
push
(
"
/companyList
"
)
...
...
src/views/company/index.vue
View file @
979e03ac
...
@@ -265,7 +265,7 @@ export default {
...
@@ -265,7 +265,7 @@ export default {
if
(
valid
)
{
if
(
valid
)
{
staffpassword
(
this
.
passwordData
)
staffpassword
(
this
.
passwordData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
showClose
:
true
,
showClose
:
true
,
message
:
"
修改密码成功
"
,
message
:
"
修改密码成功
"
,
...
...
src/views/companyFile/companyFileAdd.vue
View file @
979e03ac
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
drag
drag
:headers=
"fileUploadHeader"
ref=
"Upload"
ref=
"Upload"
:action=
"action"
:action=
"action"
:auto-upload=
"false"
:auto-upload=
"false"
...
@@ -78,6 +79,9 @@ export default {
...
@@ -78,6 +79,9 @@ export default {
fileRemarks
:
""
,
//文件备注
fileRemarks
:
""
,
//文件备注
userId
:
null
,
userId
:
null
,
},
},
fileUploadHeader
:
{
"
X-Token
"
:
null
,
},
// 表单验证
// 表单验证
rules
:
{
rules
:
{
companyFileName
:
[
companyFileName
:
[
...
@@ -90,6 +94,7 @@ export default {
...
@@ -90,6 +94,7 @@ export default {
this
.
companylist
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
companylist
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
companylist
.
userId
=
this
.
$store
.
getters
.
info
.
userId
;
this
.
companylist
.
userId
=
this
.
$store
.
getters
.
info
.
userId
;
this
.
action
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/companyFile
"
;
this
.
action
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/companyFile
"
;
this
.
fileUploadHeader
[
"
X-Token
"
]
=
this
.
$store
.
getters
.
token
;
},
},
methods
:
{
methods
:
{
submitForm
()
{
submitForm
()
{
...
...
src/views/companyFile/companyFileList.vue
View file @
979e03ac
...
@@ -76,14 +76,11 @@
...
@@ -76,14 +76,11 @@
>
>
</el-pagination>
</el-pagination>
</div>
</div>
<!-- <div >
</div> -->
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
queryBypage
,
getFileUrl
}
from
"
@/api/companyFile
"
;
import
{
queryBypage
,
getFileUrl
}
from
"
@/api/companyFile
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -116,10 +113,9 @@ export default {
...
@@ -116,10 +113,9 @@ export default {
},
},
//下载
//下载
async
download
(
row
)
{
async
download
(
row
)
{
console
.
log
(
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属性值加上地址,注意,这里是绝对路径,不用加 点.
a
.
target
=
"
_blank
"
;
a
.
target
=
"
_blank
"
;
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
a
.
style
.
display
=
"
none
"
;
// 障眼法藏起来a标签
...
@@ -134,11 +130,23 @@ export default {
...
@@ -134,11 +130,23 @@ 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
);
}
}
...
@@ -157,22 +165,22 @@ export default {
...
@@ -157,22 +165,22 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.el-col
{
.el-col
{
border-radius
:
4px
;
border-radius
:
4px
;
}
}
.bg-purple-dark
{
.bg-purple-dark
{
background
:
#99a9bf
;
background
:
#99a9bf
;
}
}
.bg-purple
{
.bg-purple
{
background
:
#d3dce6
;
background
:
#d3dce6
;
}
}
.bg-purple-light
{
.bg-purple-light
{
background
:
#e5e9f2
;
background
:
#e5e9f2
;
}
}
.grid-content
{
.grid-content
{
border-radius
:
4px
;
border-radius
:
4px
;
min-height
:
36px
;
min-height
:
36px
;
}
}
.container
{
.container
{
padding
:
10px
;
padding
:
10px
;
}
}
...
...
src/views/expense/expenseList/expenseselect.vue
View file @
979e03ac
...
@@ -57,6 +57,44 @@
...
@@ -57,6 +57,44 @@
:cell-style=
"
{ 'text-align': 'center' }"
:cell-style=
"
{ 'text-align': 'center' }"
:header-cell-style="{ 'text-align': 'center' }"
:header-cell-style="{ 'text-align': 'center' }"
>
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<el-descriptions
class=
"margin-top"
title=
"关于发票"
:column=
"1"
:size=
"medium"
style=
"width:60%; margin:20px 20px"
border
>
<el-descriptions-item
label=
"发票代码:"
:labelStyle=
"
{'width':'120px'}">
<span>
{{
props
.
row
.
code
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"发票号码:"
>
<span>
{{
props
.
row
.
number
}}
</span>
</el-descriptions-item>
<el-descriptions-item
label=
"发票状态:"
>
<el-tag
:type=
"props.row.status == '0' ? 'info' : 'warning'"
>
{{
props
.
row
.
status
==
0
?
"
未报销
"
:
"
已报销
"
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item
label=
"发票文件:"
>
<div
v-if=
"formatProtocolType(props.row)"
>
<el-image
style=
"width: 100px; height: 60px"
:src=
"props.row.fileUrl"
:preview-src-list=
"srcList"
></el-image>
</div>
<div
v-else
>
<a
class=
"a-style"
@
click=
"handlePreView(props.row)"
>
点击查看文件
</a>
</div>
</el-descriptions-item>
</el-descriptions>
</
template
>
</el-table-column>
<el-table-column
label=
"序号"
width=
"50"
style
>
<el-table-column
label=
"序号"
width=
"50"
style
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
{{
...
@@ -67,9 +105,9 @@
...
@@ -67,9 +105,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"code"
label=
"发票代码"
></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=
"number"
label=
"发票号码"
></el-table-column>
<el-table-column
prop=
"time"
label=
"发票时间"
:formatter=
"getFroms"
></el-table-column>
<el-table-column
prop=
"time"
label=
"发票时间"
:formatter=
"getFroms"
></el-table-column>
<el-table-column
prop=
"category"
label=
"发票类型"
>
<el-table-column
prop=
"category"
label=
"发票类型"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.category == '0' ? 'info' : 'primary'"
>
<el-tag
:type=
"scope.row.category == '0' ? 'info' : 'primary'"
>
{{
{{
...
@@ -78,7 +116,7 @@
...
@@ -78,7 +116,7 @@
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"type"
label=
"发票类别"
>
<el-table-column
prop=
"type"
label=
"发票类别"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
<el-tag
:type=
"
:type=
"
...
@@ -99,21 +137,7 @@
...
@@ -99,21 +137,7 @@
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"mone"
label=
"发票金额"
></el-table-column>
<el-table-column
prop=
"mone"
label=
"发票金额"
width=
"width"
></el-table-column>
<el-table-column
prop=
"prop"
label=
"发票文件"
width=
"120px"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"formatProtocolType(scope.row)"
>
<el-image
style=
"width: 80px; height: 80px"
:src=
"scope.row.fileUrl"
:preview-src-list=
"srcList"
></el-image>
</div>
<div
v-else
>
<a
class=
"a-style"
@
click=
"handlePreView(scope.row)"
>
点击查看文件
</a>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"发票状态"
width=
"90px"
>
<el-table-column
prop=
"status"
label=
"发票状态"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.status == '0' ? 'info' : 'warning'"
>
<el-tag
:type=
"scope.row.status == '0' ? 'info' : 'warning'"
>
...
@@ -123,7 +147,7 @@
...
@@ -123,7 +147,7 @@
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"操作"
>
<el-table-column
prop=
"prop"
label=
"操作"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<p>
确定要删除当前发票吗
</p>
<p>
确定要删除当前发票吗
</p>
...
@@ -148,8 +172,8 @@
...
@@ -148,8 +172,8 @@
<div
class=
"foot_yi"
>
<div
class=
"foot_yi"
>
<el-pagination
<el-pagination
@
current-change=
"handleCurrentChange"
@
current-change=
"handleCurrentChange"
layout=
"total, prev, pager, next"
:total=
"total"
:total=
"total"
layout=
"total, prev, pager, next"
:current-page.sync=
"invoiceQruey.pageNum"
:current-page.sync=
"invoiceQruey.pageNum"
:page-size=
"invoiceQruey.pageSize"
:page-size=
"invoiceQruey.pageSize"
></el-pagination>
></el-pagination>
...
...
src/views/other/reimbursementPrint1.vue
View file @
979e03ac
...
@@ -230,7 +230,7 @@ export default {
...
@@ -230,7 +230,7 @@ export default {
//获取公司名称
//获取公司名称
getCompany
(){
getCompany
(){
selectById
({
companyId
:
this
.
$store
.
getters
.
companyId
}).
then
((
res
)
=>
{
selectById
({
companyId
:
this
.
$store
.
getters
.
companyId
}).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
){
if
(
res
.
success
){
this
.
company
=
res
.
data
this
.
company
=
res
.
data
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
)
this
.
$message
.
error
(
res
.
data
)
...
...
src/views/other/reimbursementPrint3.vue
View file @
979e03ac
...
@@ -160,7 +160,7 @@ export default {
...
@@ -160,7 +160,7 @@ export default {
//获取公司名称
//获取公司名称
getCompany
(){
getCompany
(){
selectById
({
companyId
:
this
.
$store
.
getters
.
companyId
}).
then
((
res
)
=>
{
selectById
({
companyId
:
this
.
$store
.
getters
.
companyId
}).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
){
if
(
res
.
success
){
this
.
company
=
res
.
data
this
.
company
=
res
.
data
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
)
this
.
$message
.
error
(
res
.
data
)
...
...
src/views/permission/menu.vue
View file @
979e03ac
...
@@ -180,7 +180,7 @@ export default {
...
@@ -180,7 +180,7 @@ export default {
submitMenu
.
meta
.
breadcrumb
=
this
.
convertToNumber
(
submitMenu
.
meta
.
breadcrumb
)
submitMenu
.
meta
.
breadcrumb
=
this
.
convertToNumber
(
submitMenu
.
meta
.
breadcrumb
)
editMenu
(
submitMenu
).
then
((
res
)
=>
{
editMenu
(
submitMenu
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
getMenuData
()
this
.
getMenuData
()
this
.
$message
({
this
.
$message
({
type
:
'
success
'
,
type
:
'
success
'
,
...
@@ -215,7 +215,7 @@ export default {
...
@@ -215,7 +215,7 @@ export default {
submitMenu
.
meta
.
breadcrumb
=
this
.
convertToNumber
(
submitMenu
.
meta
.
breadcrumb
)
submitMenu
.
meta
.
breadcrumb
=
this
.
convertToNumber
(
submitMenu
.
meta
.
breadcrumb
)
addMenu
(
submitMenu
).
then
((
res
)
=>
{
addMenu
(
submitMenu
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
$message
({
this
.
$message
({
type
:
'
success
'
,
type
:
'
success
'
,
message
:
'
添加成功!
'
message
:
'
添加成功!
'
...
...
src/views/permission/role.vue
View file @
979e03ac
...
@@ -120,7 +120,7 @@ export default {
...
@@ -120,7 +120,7 @@ export default {
//获取角色
//获取角色
getRoles
()
{
getRoles
()
{
getRoles
(
this
.
roleQuery
).
then
((
res
)
=>
{
getRoles
(
this
.
roleQuery
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
rolesList
=
res
.
data
.
list
this
.
rolesList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
this
.
total
=
res
.
data
.
total
}
else
{
}
else
{
...
@@ -133,7 +133,7 @@ export default {
...
@@ -133,7 +133,7 @@ export default {
//获取路由
//获取路由
getRoutes
()
{
getRoutes
()
{
getRoutes
().
then
((
res
)
=>
{
getRoutes
().
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
serviceRoutes
=
res
.
data
this
.
serviceRoutes
=
res
.
data
this
.
routes
=
this
.
generateRoutes
(
res
.
data
)
this
.
routes
=
this
.
generateRoutes
(
res
.
data
)
}
}
...
@@ -255,7 +255,7 @@ export default {
...
@@ -255,7 +255,7 @@ export default {
}
}
if
(
isEdit
)
{
// 修改角色
if
(
isEdit
)
{
// 修改角色
updateRole
(
this
.
role
).
then
((
res
)
=>
{
updateRole
(
this
.
role
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
修改成功
"
)
this
.
$message
.
success
(
"
修改成功
"
)
this
.
getRoles
()
this
.
getRoles
()
}
else
{
}
else
{
...
@@ -268,7 +268,7 @@ export default {
...
@@ -268,7 +268,7 @@ export default {
}
else
{
}
else
{
//新增角色
//新增角色
addRole
(
this
.
role
).
then
((
res
)
=>
{
addRole
(
this
.
role
).
then
((
res
)
=>
{
if
(
res
.
status
==
"
success
"
)
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
"
添加成功
"
)
this
.
$message
.
success
(
"
添加成功
"
)
this
.
getRoles
()
this
.
getRoles
()
}
else
{
}
else
{
...
...
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