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
098c6731
Commit
098c6731
authored
Nov 01, 2022
by
柳 佳乐
Browse files
fix bugs
parent
b04e0fd0
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
src/views/permission/role.vue
View file @
098c6731
...
...
@@ -155,19 +155,41 @@ export default {
//处理路由数据
generateRoutes
(
routes
,
basePath
=
'
/
'
)
{
const
res
=
[]
for
(
let
route
of
routes
)
{
if
(
route
.
id
!=
1
){
const
data
=
{
path
:
path
.
resolve
(
basePath
,
route
.
path
),
title
:
route
.
meta
&&
(
route
.
menuExplain
?
`
${
route
.
meta
.
title
}
(
${
route
.
menuExplain
}
)`
:
route
.
meta
.
title
),
id
:
route
.
id
}
if
(
route
.
children
.
length
>
0
)
{
data
.
children
=
this
.
generateRoutes
(
route
.
children
,
data
.
path
)
}
res
.
push
(
data
)
console
.
log
(
routes
)
if
(
this
.
$store
.
getters
.
roles
[
0
]
!=
1
){
//不是超管
for
(
let
route
of
routes
)
{
if
(
route
.
id
!=
1
&&
route
.
id
!=
113
){
const
data
=
{
path
:
path
.
resolve
(
basePath
,
route
.
path
),
title
:
route
.
meta
&&
(
route
.
menuExplain
?
`
${
route
.
meta
.
title
}
(
${
route
.
menuExplain
}
)`
:
route
.
meta
.
title
),
id
:
route
.
id
}
if
(
route
.
children
.
length
>
0
)
{
data
.
children
=
this
.
generateRoutes
(
route
.
children
,
data
.
path
)
}
res
.
push
(
data
)
}
}
}
else
{
//是超管
for
(
let
route
of
routes
)
{
const
data
=
{
path
:
path
.
resolve
(
basePath
,
route
.
path
),
title
:
route
.
meta
&&
(
route
.
menuExplain
?
`
${
route
.
meta
.
title
}
(
${
route
.
menuExplain
}
)`
:
route
.
meta
.
title
),
id
:
route
.
id
}
if
(
route
.
children
.
length
>
0
)
{
data
.
children
=
this
.
generateRoutes
(
route
.
children
,
data
.
path
)
}
res
.
push
(
data
)
}
}
}
return
res
},
//新增角色
...
...
src/views/project/expend/expendAdd.vue
View file @
098c6731
<
template
>
<!-- 添加支出区域 -->
<div
class=
"container"
>
<el-row>
<el-col
:xl=
"8"
:lg=
"10"
:md=
"8"
:sm=
"12"
:xs=
"24"
>
...
...
@@ -74,9 +75,27 @@
</el-form-item>
</el-form>
</el-col>
<!-- 合同上传 -->
<el-col
:xl=
"8"
:lg=
"10"
:md=
"8"
:sm=
"12"
:xs=
"24"
class=
"contract"
>
<el-upload
class=
"upload-demo"
ref=
"upload1"
:action=
"action2"
:file-list=
"fileList"
:auto-upload=
"false"
:on-change=
"onChangepdf"
:on-remove=
"delfile1"
:limit=
"1"
:data=
"proutlist1"
>
<el-button
slot=
"trigger"
size=
"small"
type=
"primary"
>
选取文件
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传jpg/pdf文件,且不超过500kb
</div>
</el-upload>
</el-col>
</el-row>
<!-- 报销单 -->
<el-drawer
title=
"发票单列表"
:visible.sync=
"drawer"
size=
"100%"
>
<el-drawer
title=
"发票单列表"
:visible.sync=
"drawer"
size=
"100%"
>
<!-- 表格区域 -->
<div
class=
"drawer"
v-show=
"isgetid==0"
style=
"margin-left:5%"
>
<el-button
type=
"primary"
@
click=
"Reimbursement()"
style=
"margin:20px 0px"
>
添加报销单
</el-button>
...
...
@@ -109,7 +128,7 @@
</el-table-column>
</el-table>
<!-- 分页-->
<el-pagination
<el-pagination
style=
"margin:0px auto"
@
current-change=
"getincomeSelectlist"
layout=
"total, prev, pager, next"
...
...
@@ -167,10 +186,13 @@
class=
"upload-demo"
ref=
"upload"
:file-list=
"fileList"
action=
"
http://192.168.10.109:7080/file/uploadFile
"
:
action=
"
action
"
:auto-upload=
"false"
:data=
"proutlist"
style=
"margin-left:90px;"
:on-change=
"onChange"
:on-remove=
"delfile2"
:limit=
"1"
>
<el-button
slot=
"trigger"
...
...
@@ -200,6 +222,8 @@ import { insert } from "@/api/expend";
export
default
{
data
()
{
return
{
action2
:
null
,
action
:
null
,
expendFrom
:
{
expendBody
:
null
,
expendInformation
:
null
,
...
...
@@ -252,7 +276,8 @@ export default {
number
:
null
,
status
:
0
,
time
:
null
,
type
:
1
type
:
1
,
userId
:
null
},
//表单验证内容
rules
:
{
...
...
@@ -309,6 +334,7 @@ export default {
invoiceListAdd
:
{},
//查询发票编号的数组
getinvoiveId
:
{
userId
:
null
,
companyId
:
null
,
type
:
1
},
...
...
@@ -317,11 +343,19 @@ export default {
//收集数据
newList
:
[],
//保存图片
proutlist
:
{
Id
:
1
,
proutlist
:
{
Id
:
null
,
status
:
1
},
fileList
:[]
//保存合同
proutlist1
:
{
Id
:
null
,
status
:
1
},
fileList
:
[],
fileType
:
null
,
fileTypepdf
:
false
,
backlistid
:
null
};
},
computed
:
{
...
...
@@ -332,8 +366,14 @@ export default {
created
()
{
this
.
expendFrom
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
addTO
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
addTO
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
invoiceList
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
getinvoiveId
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
getinvoiveId
.
userId
=
this
.
$store
.
getters
.
urId
;
this
.
action
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/uploadFile
"
;
this
.
action2
=
process
.
env
.
VUE_APP_BASE_API
+
"
/file/updataContractDocuments
"
;
this
.
backlistid
=
this
.
$route
.
query
.
backlistid
;
this
.
getTypeList
();
this
.
getProject
();
this
.
Selectinsertlsit
();
...
...
@@ -384,29 +424,20 @@ export default {
submitForm
()
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
invoiceListAdd
.
length
<
0
)
{
insert
(
this
.
expendFrom
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
res
.
msg
);
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
({
path
:
"
/expendList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
insert
(
this
.
expendFrom
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
res
.
msg
);
console
.
log
(
this
.
fileTypepdf
);
if
(
this
.
fileTypepdf
)
{
//进行合同的上传
//上传合同
this
.
proutlist1
.
Id
=
res
.
data
;
console
.
log
(
this
.
proutlist1
.
Id
);
this
.
$refs
.
upload1
.
submit
();
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
}
else
{
insert
(
this
.
expendFrom
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
this
.
invoiceListAdd
.
length
>
0
)
{
let
list
=
[];
this
.
invoiceListAdd
.
forEach
(
item
=>
{
list
.
push
({
...
...
@@ -415,32 +446,25 @@ export default {
status
:
1
});
});
updatesubmit
(
list
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
res
.
msg
);
this
.
$store
.
dispatch
(
"
tagsView/delView
"
,
this
.
$route
);
this
.
$router
.
push
({
path
:
"
/expendList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
//上传发票记录
updatesubmit
(
list
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$message
.
success
(
res
.
msg
);
this
.
back
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
});
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
(
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
}
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
}
});
},
...
...
@@ -457,7 +481,7 @@ export default {
path
:
"
/expendList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
,
backlistid
:
this
.
$route
.
query
.
backlistid
backlistid
:
this
.
$route
.
query
.
backlistid
}
});
},
...
...
@@ -498,6 +522,29 @@ export default {
date
.
getSeconds
()
<
10
?
"
0
"
+
date
.
getSeconds
()
:
date
.
getSeconds
();
this
.
addTO
.
time
=
Y
+
M
+
D
+
h
+
m
+
s
;
},
//合同图片
onChangepdf
(
file
)
{
const
fileNamepdf
=
file
.
name
;
let
fileType
=
fileNamepdf
.
substring
(
fileNamepdf
.
lastIndexOf
(
"
.
"
));
if
(
fileType
==
"
.pdf
"
)
{
this
.
fileTypepdf
=
true
;
}
else
{
this
.
$message
.
warning
(
"
合同文件只能是pdf格式文件
"
);
this
.
$resf
.
upload1
.
clearFiles
();
this
.
fileTypepdf
=
false
;
}
console
.
log
(
this
.
fileTypepdf
);
},
//清楚合同文件
delfile1
()
{
this
.
fileTypepdf
=
false
;
},
//清除发片文件
delfile2
()
{
this
.
fileTypeJpg
=
false
;
},
//////发票区域//////
//发票页面的按钮事件
drawerAdd
()
{
this
.
drawer
=
true
;
...
...
@@ -505,7 +552,7 @@ export default {
},
//发票的分页查询
getincomeSelectlist
(
pager
=
1
)
{
this
.
invoiceList
.
pageNum
=
pager
this
.
invoiceList
.
pageNum
=
pager
;
queryBypageIncomeAdd
(
this
.
invoiceList
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
...
...
@@ -540,29 +587,40 @@ export default {
getlistForm
()
{
this
.
$refs
.
addTO
.
validate
(
valid
=>
{
if
(
valid
)
{
insertList
(
this
.
addTO
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
proutlist
.
Id
=
res
.
data
;
//提交图片
this
.
$refs
.
upload
.
submit
();
this
.
$message
.
success
(
res
.
msg
);
this
.
isgetid
=
0
;
this
.
delectdd
()
this
.
getincomeSelectlist
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
if
(
this
.
fileType
===
"
.jpg
"
||
this
.
fileType
===
"
.pdf
"
||
this
.
fileType
===
"
.png
"
)
{
insertList
(
this
.
addTO
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
proutlist
.
Id
=
res
.
data
;
//提交图片
this
.
$refs
.
upload
.
submit
();
this
.
$message
.
success
(
res
.
msg
);
this
.
isgetid
=
0
;
this
.
addTO
.
time
=
""
;
this
.
$refs
.
addTO
.
resetFields
();
this
.
getincomeSelectlist
();
this
.
Selectinsertlsit
();
this
.
getincomeSelectlist
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
"
新建失败
"
);
});
}
else
{
this
.
$message
.
error
(
"
请输入jpg格式的图片或者pdf在或者png的文件
"
);
}
}
});
},
//数据清除
delectdd
()
{
this
.
addTO
=
{
this
.
addTO
=
{
category
:
0
,
code
:
null
,
companyId
:
null
,
...
...
@@ -571,7 +629,7 @@ export default {
status
:
0
,
time
:
null
,
type
:
1
}
}
;
},
//查询发票编号
Selectinsertlsit
()
{
...
...
@@ -588,6 +646,12 @@ export default {
this
.
$message
.
error
(
"
获取发票编号失败
"
);
this
.
back
();
});
},
//给fileType赋值
onChange
(
file
)
{
const
fileName
=
file
.
name
;
this
.
fileType
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"
.
"
));
console
.
log
(
this
.
fileType
);
}
}
};
...
...
@@ -597,4 +661,7 @@ export default {
.container
{
padding
:
10px
;
}
.contract
{
margin
:
20px
50px
;
}
</
style
>
\ No newline at end of file
src/views/project/expend/expendList.vue
View file @
098c6731
...
...
@@ -105,22 +105,20 @@
</div>
<div>
<!--抽屉-->
<el-drawer
title=
"发票详情"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
>
<el-drawer
title=
"发票详情"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
>
<!-- filePath-->
<el-table
:data=
"getinvoivelist"
style=
"width: 100%; text-align: center"
border
>
<el-table-column
type=
"index"
label=
"序号"
width=
"40"
></el-table-column>
<el-table-column
prop=
"prop"
label=
"发票详情"
>
<el-table-column
prop=
"number"
label=
"号码"
width=
"160px"
></el-table-column>
<el-table-column
prop=
"mone"
label=
"金额"
width=
"180"
></el-table-column>
<el-table-column
prop=
"prop"
label=
"查看PDF文件或图片"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"scope.row.filePath"
:preview-src-list=
"[scope.row.filePath]"
></el-image>
<div
v-if=
"scope.row.filePath != null"
>
<a
class=
"a-style"
@
click=
"handlePreView(scope.row)"
>
点击查看图片或文件
</a>
</div>
<div
v-else
>
<p>
无图片或文件
</p>
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -163,7 +161,7 @@ export default {
//图片数组
srcList
:
[],
//返回的标记
backlistid
:
null
backlistid
:
null
};
},
computed
:
{
...
...
@@ -174,7 +172,7 @@ export default {
created
()
{
this
.
getinvoiveId
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
expendQurey
.
projectId
=
this
.
$route
.
query
.
id
;
this
.
backlistid
=
this
.
$route
.
query
.
backlistid
this
.
backlistid
=
this
.
$route
.
query
.
backlistid
;
this
.
getexpend
();
this
.
getTypeList
();
},
...
...
@@ -224,7 +222,7 @@ export default {
path
:
"
/expendAdd
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
,
backlistid
:
this
.
backlistid
backlistid
:
this
.
backlistid
}
});
},
...
...
@@ -295,9 +293,9 @@ export default {
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
(
e
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
});
//
this.getinvoivelist.forEach(e => {
//
e.filePath = process.env.VUE_APP_BASE_API + e.filePath;
//
});
console
.
log
(
this
.
getinvoivelist
);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
...
...
@@ -309,29 +307,35 @@ export default {
this
.
back
();
});
},
back
(){
if
(
this
.
backlistid
==
0
){
this
.
$router
.
push
({
back
()
{
if
(
this
.
backlistid
==
0
)
{
this
.
$router
.
push
({
path
:
"
/projectList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
if
(
this
.
backlistid
==
1
)
{
this
.
$router
.
push
({
}
else
if
(
this
.
backlistid
==
1
)
{
this
.
$router
.
push
({
path
:
"
/beresponsibleforList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
{
this
.
$router
.
push
({
}
else
{
this
.
$router
.
push
({
path
:
"
/participateinList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
},
//点击查看发票
handlePreView
(
row
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
console
.
log
(
photopath
);
window
.
open
(
photopath
,
"
_blank
"
);
}
}
};
...
...
src/views/project/income/incomeAdd.vue
View file @
098c6731
This diff is collapsed.
Click to expand it.
src/views/project/income/incomeList.vue
View file @
098c6731
...
...
@@ -31,7 +31,12 @@
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"qurey()"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"reset()"
>
重置
</el-button>
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"addincome()"
v-if=
"state != 0"
>
新增收入
</el-button>
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"addincome()"
v-if=
"state != 0"
>
新增收入
</el-button>
<el-button
@
click=
"back()"
>
返回
</el-button>
</el-form-item>
</el-form>
...
...
@@ -79,6 +84,11 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"ReviseImage(scope.row)"
>
点击查看
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"prop"
label=
"项目合同"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"mini"
@
click=
"selectImage(scope.row)"
>
点击查看
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"操作人员"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -111,18 +121,20 @@
</div>
<div>
<!--抽屉-->
<el-drawer
title=
"发票详情"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
>
<el-drawer
title=
"发票详情"
:visible.sync=
"drawer"
:direction=
"direction"
size=
"40%"
>
<!-- filePath-->
<el-table
:data=
"getinvoivelist"
style=
"width: 100%; text-align: center"
border
>
<el-table-column
type=
"index"
label=
"序号"
width=
"40"
></el-table-column>
<el-table-column
prop=
"prop"
label=
"发票详情"
>
<el-table-column
prop=
"number"
label=
"号码"
width=
"160px"
></el-table-column>
<el-table-column
prop=
"mone"
label=
"金额"
width=
"180"
></el-table-column>
<el-table-column
prop=
"prop"
label=
"查看PDF文件或图片"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"scope.row.filePath"
:preview-src-list=
"[scope.row.filePath]"
></el-image>
<div
v-if=
"scope.row.filePath != null"
>
<a
class=
"a-style"
@
click=
"handlePreView(scope.row)"
>
点击查看图片或文件
</a>
</div>
<div
v-else
>
<p>
无图片或文件
</p>
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -135,6 +147,7 @@
import
{
selectByProjectId
}
from
"
@/api/imcome
"
;
import
{
selectAll
}
from
"
@/api/type
"
;
import
{
selectAllById
}
from
"
@/api/project
"
;
import
{
Col
}
from
"
element-ui
"
;
const
InitialData
=
{
incomeBody
:
null
,
...
...
@@ -152,7 +165,6 @@ const InitialData = {
export
default
{
data
()
{
return
{
incomeQurey
:
{
projectId
:
null
,
pageNum
:
1
,
...
...
@@ -180,20 +192,19 @@ export default {
//图片的数组
getinvoivelist
:
[],
//图片数组
srcList
:[],
backid
:
null
,
srcList
:
[],
backid
:
null
};
},
computed
:{
state
:
function
(){
return
this
.
$route
.
query
.
state
computed
:
{
state
:
function
()
{
return
this
.
$route
.
query
.
state
;
}
},
created
()
{
this
.
getinvoiveId
.
companyId
=
this
.
$store
.
getters
.
companyId
;
this
.
incomeQurey
.
projectId
=
this
.
$route
.
query
.
id
;
this
.
backid
=
this
.
$route
.
query
.
backid
this
.
backid
=
this
.
$route
.
query
.
backid
;
this
.
getIncome
();
this
.
getTypeList
();
},
...
...
@@ -304,10 +315,24 @@ export default {
path
:
"
/incomeAdd
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
,
backid
:
this
.
backid
backid
:
this
.
backid
}
});
},
//查看项目合同
selectImage
(
row
)
{
if
(
row
.
contractDocuments
!=
null
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
contractDocuments
;
window
.
open
(
photopath
,
"
_blank
"
);
console
.
log
(
photopath
);
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
"
该项目没有添加合同
"
,
type
:
"
warning
"
});
}
},
//查看图片的方法
ReviseImage
(
row
)
{
this
.
drawer
=
true
;
...
...
@@ -321,9 +346,9 @@ export default {
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
getinvoivelist
=
res
.
data
;
this
.
getinvoivelist
.
forEach
(
e
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
})
//
this.getinvoivelist.forEach(e
=>
{
//
e.filePath = process.env.VUE_APP_BASE_API + e.filePath
;
//
})
;
console
.
log
(
this
.
getinvoivelist
);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
...
...
@@ -346,29 +371,35 @@ export default {
});
},
//返回开始
back
(){
if
(
this
.
backid
==
0
){
this
.
$router
.
push
({
back
()
{
if
(
this
.
backid
==
0
)
{
this
.
$router
.
push
({
path
:
"
/projectList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
if
(
this
.
backid
==
1
)
{
this
.
$router
.
push
({
}
else
if
(
this
.
backid
==
1
)
{
this
.
$router
.
push
({
path
:
"
/beresponsibleforList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
else
{
this
.
$router
.
push
({
}
else
{
this
.
$router
.
push
({
path
:
"
/participateinList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
}
});
}
},
//点击查看发票
handlePreView
(
row
)
{
const
photopath
=
process
.
env
.
VUE_APP_BASE_API
+
row
.
filePath
;
console
.
log
(
photopath
);
window
.
open
(
photopath
,
"
_blank
"
);
}
}
};
...
...
src/views/project/member/memberList.vue
View file @
098c6731
...
...
@@ -3,7 +3,7 @@
<div
class=
"header"
>
<el-form
:inline=
"true"
:model=
"memberQurey"
>
<el-form-item>
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"updataMember()"
>
更新
成员
</el-button>
<el-button
type=
"success"
icon=
"el-icon-circle-plus-outline"
@
click=
"updataMember()"
>
更新
{{
staffName
}}
</el-button>
<el-button
@
click=
"back()"
>
返回
</el-button>
</el-form-item>
</el-form>
...
...
@@ -54,15 +54,27 @@ export default {
pageSize
:
10
},
memberList
:
[],
total
:
0
total
:
0
,
staffId
:
null
,
staffName
:
null
};
},
created
()
{
this
.
memberId
=
this
.
$store
.
getters
.
memberId
;
this
.
memberQurey
.
projectId
=
this
.
$route
.
query
.
id
;
this
.
staffId
=
this
.
$route
.
query
.
staffId
;
this
.
getMember
();
this
.
staff
();
},
methods
:
{
//判断staffId分析是负责人还是管理员
staff
(){
if
(
this
.
staffId
==
0
){
this
.
staffName
=
'
负责人
'
}
else
{
this
.
staffName
=
'
成员
'
}
},
//获取员工信息
getMember
()
{
console
.
log
(
selectByProjectId
(
this
.
memberQurey
));
...
...
@@ -102,7 +114,8 @@ export default {
this
.
$router
.
push
({
path
:
"
/memberUpdata
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
id
:
this
.
$route
.
query
.
id
,
staffId
:
this
.
$route
.
query
.
staffId
}
});
}
...
...
src/views/project/member/memberUpdata.vue
View file @
098c6731
...
...
@@ -3,7 +3,7 @@
<el-row>
<el-col
:span=
"22"
>
<el-form
ref=
"form"
:model=
"memberFrom"
label-width=
"120px"
:rules=
"rules"
>
<el-form-item
label=
"
普通成员
"
prop=
"ordinary"
>
<el-form-item
:
label=
"
staffName
"
prop=
"ordinary"
>
<el-checkbox-group
v-model=
"memberFrom.ordinary"
>
<el-checkbox
v-for=
"city in datalist"
:label=
"city.userId"
:key=
"city.userId"
>
{{
...
...
@@ -59,6 +59,9 @@ export default {
//过滤后的新数组
queryList
:
[],
memberId
:
null
,
//判断是否是管理员
staffId
:
null
,
staffName
:
null
};
},
computed
:
{
...
...
@@ -69,16 +72,24 @@ export default {
created
()
{
this
.
memberQurey
.
projectId
=
this
.
$route
.
query
.
id
;
this
.
memberId
=
this
.
$store
.
getters
.
memberId
;
this
.
staffId
=
this
.
$route
.
query
.
staffId
;
//查询员工
//this.getStaffList();
//查询项目的成员信息
this
.
getPeojectMember
();
this
.
getselectlist
();
this
.
staff
();
},
methods
:
{
//判断staffId分析是负责人还是管理员
staff
(){
console
.
log
(
this
.
staffId
);
if
(
this
.
staffId
==
0
){
this
.
staffName
=
'
负责人管理
'
}
else
{
this
.
staffName
=
'
成员管理
'
}
},
getselectlist
()
{
//查询员工,得到初始员工值
secletAllStaff
({
companyId
:
this
.
$store
.
getters
.
companyId
})
...
...
@@ -97,7 +108,7 @@ export default {
list
=
queryList
.
filter
(
a
=>
{
return
a
.
memberPression
==
0
;
});
const
datalistyou
=
list
;
;
const
datalistyou
=
list
;
//将项目负责人与查询员工分离整理
let
datalist1
=
this
.
staffList
.
filter
(
a
=>
!
datalistyou
.
some
(
b
=>
a
.
userId
===
b
.
userId
)
...
...
@@ -211,7 +222,8 @@ export default {
path
:
"
/memberList
"
,
query
:
{
id
:
this
.
$route
.
query
.
id
,
memberId
:
this
.
memberId
memberId
:
this
.
memberId
,
staffId
:
this
.
$route
.
query
.
staffId
}
});
},
...
...
@@ -227,7 +239,7 @@ export default {
memberPression
:
1
});
});
}
else
{
}
else
{
this
.
memberFrom
.
ordinary
.
forEach
(
e
=>
{
member
.
push
({
projectId
:
this
.
projectId
,
...
...
src/views/project/participatein/participateinList.vue
View file @
098c6731
...
...
@@ -40,7 +40,7 @@
</el-table-column>
<el-table-column
prop=
"projectName"
label=
"项目名称"
/>
<el-table-column
prop=
"projectNumber"
label=
"项目编号"
/>
<el-table-column
label=
"项目合同金额"
>
<!--
<el-table-column label="项目合同金额">
<template slot-scope="scope">
<p class="amounttext">{{scope.row.projectAmount}}</p>
</template>
...
...
@@ -75,7 +75,7 @@
<template slot-scope="scope">
<p class="expendtext">{{scope.row.projectExpense}}</p>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"projectStartTime"
label=
"项目开始时间"
...
...
src/views/project/projectList.vue
View file @
098c6731
...
...
@@ -18,7 +18,9 @@
</div>
<div
class=
"conter"
>
<el-table
:data=
"projectList"
style=
"width: 100%; text-align: center"
border
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<el-form
label-position=
"left"
class=
"demo-table-expand"
>
...
...
@@ -31,6 +33,7 @@
</el-form>
</
template
>
</el-table-column>
<el-table-column
label=
"序号"
width=
"50px"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -52,7 +55,7 @@
<p
class=
"incometext"
>
{{
scope
.
row
.
projectIncome
}}
</p>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"200"
>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"success"
@
click=
"showIncome(scope.row)"
>
查看详情
</el-button>
</
template
>
...
...
@@ -205,18 +208,19 @@ export default {
path
:
"
/incomeList
"
,
query
:
{
id
:
data
.
projectId
,
backid
:
0
,
state
:
0
backid
:
0
,
state
:
0
}
});
},
//
成员
管理
//
负责人
管理
member
(
data
)
{
this
.
$store
.
dispatch
(
"
settings/setMemberId
"
,
0
);
this
.
$router
.
push
({
path
:
"
/memberList
"
,
query
:
{
id
:
data
.
projectId
id
:
data
.
projectId
,
staffId
:
0
}
});
},
...
...
@@ -226,8 +230,8 @@ export default {
path
:
"
/expendList
"
,
query
:
{
id
:
data
.
projectId
,
backlistid
:
0
,
state
:
0
backlistid
:
0
,
state
:
0
}
});
}
...
...
src/views/reimbursement/finance/financeList.vue
View file @
098c6731
...
...
@@ -100,11 +100,11 @@
</el-table-column>
<el-table-column
prop=
"userName"
label=
"报销人"
/>
<el-table-column
prop=
"projectName"
label=
"项目"
/>
<el-table-column
prop=
"typeName"
label=
"报销类别"
>
<!--
<el-table-column prop="typeName" label="报销类别">
<template slot-scope="scope">
<el-tag>{{ scope.row.typeName }}</el-tag>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"applyTotalAmountSmall"
label=
"申报总金额"
/>
<el-table-column
label=
"核报总金额"
>
<
template
slot-scope=
"props"
>
...
...
src/views/reimbursement/headman/headmanList.vue
View file @
098c6731
...
...
@@ -101,11 +101,11 @@
</el-table-column>
<el-table-column
prop=
"userName"
label=
"报销人"
/>
<el-table-column
prop=
"projectName"
label=
"项目"
/>
<el-table-column
prop=
"typeName"
label=
"报销类别"
>
<!--
<el-table-column prop="typeName" label="报销类别">
<template slot-scope="scope">
<el-tag>{{ scope.row.typeName }}</el-tag>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"applyTotalAmountSmall"
label=
"申报总金额"
/>
<el-table-column
label=
"核报总金额"
>
<
template
slot-scope=
"props"
>
...
...
src/views/reimbursement/reimbursementAdd.vue
View file @
098c6731
This diff is collapsed.
Click to expand it.
src/views/reimbursement/reimbursementList.vue
View file @
098c6731
...
...
@@ -99,11 +99,11 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"projectName"
label=
"项目"
/>
<el-table-column
prop=
"typeName"
label=
"报销类别"
>
<!--
<el-table-column prop="typeName" label="报销类别">
<template slot-scope="scope">
<el-tag>{{ scope.row.typeName }}</el-tag>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"applyTotalAmountSmall"
label=
"申报总金额"
/>
<el-table-column
label=
"核报总金额"
>
<
template
slot-scope=
"props"
>
...
...
@@ -212,23 +212,21 @@
</
template
>
</el-table-column>
</el-table>
<!-- 查看详情 -->
<el-drawer
title=
"查看详情"
:visible.sync=
"drawer"
:direction=
"direction"
>
<el-form
:inline=
"true"
label-width=
"80px"
>
<el-row>
<el-col
v-for=
"(item, index) in reimbursementDetails.list"
:key=
"index"
:span=
"20"
>
<el-form-item
:label=
"item.name"
>
<el-input
v-model=
"item.money"
disabled=
"disabled"
></el-input>
</el-form-item>
<el-form-item
label=
"说明"
>
<el-input
v-model=
"item.remarks"
disabled=
"disabled"
></el-input>
</el-form-item>
<el-descriptions
:title=
"item.name"
border
:column=
"1"
style=
"margin: 10px 0;"
>
<el-descriptions-item
label=
"金额"
>
{{item.money}}
</el-descriptions-item>
<el-descriptions-item
label=
"备注"
>
{{item.explain}}
</el-descriptions-item>
<el-descriptions-item
label=
"说明"
>
{{item.remarks}}
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-form>
</el-drawer>
<el-drawer
...
...
@@ -333,13 +331,10 @@ export default {
},
//获取申请报销列表
getReimbursement
()
{
// console.log(this.reimbursementQurey);
queryBypage
(
this
.
reimbursementQurey
)
.
then
((
res
)
=>
{
// console.log(res)
if
(
res
.
success
)
{
this
.
reimbursementList
=
res
.
data
.
list
;
// console.log(this.reimbursementList);
this
.
total
=
res
.
data
.
total
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
...
...
@@ -415,7 +410,6 @@ export default {
ReviseImage
(
row
)
{
this
.
invoiceShow
=
true
;
this
.
getinvoiveId
.
reimbursementId
=
row
.
reimbursementId
;
//console.log(process.env.VUE_APP_BASE_API);
this
.
Selectinsertlsit
();
},
//查询发票图片
...
...
@@ -427,7 +421,7 @@ export default {
this
.
getinvoivelist
.
forEach
((
e
)
=>
{
e
.
filePath
=
process
.
env
.
VUE_APP_BASE_API
+
e
.
filePath
;
});
console
.
log
(
this
.
getinvoivelist
);
//
console.log(this.getinvoivelist);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
();
...
...
src/views/reimbursement/reimbursementUpdata.vue
View file @
098c6731
...
...
@@ -25,16 +25,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"报销类别"
prop=
"typeId"
>
<el-select
v-model=
"from.typeId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in typeList"
:key=
"item.typeId"
:label=
"item.typeName"
:value=
"item.typeId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"摘要"
prop=
"summary"
>
<el-input
v-model=
"from.summary"
></el-input>
</el-form-item>
...
...
@@ -48,6 +38,16 @@
<el-form-item
label=
"支付方式"
prop=
"paymentMethod"
>
<el-input
v-model=
"from.paymentMethod"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
v-model=
"textarea"
>
</el-input>
</el-form-item>
<br
/>
<el-form-item>
<el-button
type=
"success"
icon=
"el-icon-upload2"
@
click=
"updateForm()"
>
修改
</el-button>
<el-button
type=
"info"
icon=
"el-icon-refresh-left"
@
click=
"resetForm()"
>
重置信息
</el-button>
...
...
@@ -81,7 +81,7 @@
import
{
selectById
}
from
"
@/api/company
"
;
import
{
selectById
as
reimbursementSelectById
,
update
}
from
"
@/api/reimbursement
"
import
{
money
}
from
"
@/utils/myValidate
"
import
{
selectAll
as
typeSelectAll
}
from
"
@/api/type
"
;
//
import {selectAll as typeSelectAll} from "@/api/type";
import
{
selectAll
as
projectSelectAll
}
from
"
@/api/project
"
;
import
{
selectByReimbursementId
}
from
"
@/api/reimbursementDetails
"
;
import
{
update
as
detailsUpdate
}
from
"
@/api/reimbursementDetails
"
;
...
...
@@ -93,6 +93,7 @@ import {
export
default
{
data
()
{
return
{
textarea
:
""
,
//备注
reimbursementItemData
:
{
list
:
[],
},
...
...
@@ -203,7 +204,7 @@ export default {
this
.
from
.
userName
=
this
.
$store
.
getters
.
info
.
userName
;
this
.
from
.
userPhone
=
this
.
$store
.
getters
.
info
.
userPhone
;
this
.
getFrom
()
this
.
getTypeList
()
//
this.getTypeList()
this
.
getReimbursement
()
this
.
getProject
()
this
.
Selectinsertlsit
()
...
...
@@ -231,26 +232,6 @@ export default {
this
.
$message
.
error
(
"
获取报销项失败
"
);
});
},
//获取公司报销类别
getTypeList
()
{
let
param
=
{
companyId
:
this
.
$store
.
getters
.
companyId
,
// typeCategory: 2,
};
typeSelectAll
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
typeList
=
res
.
data
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
this
.
back
()
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
"
获取类型失败
"
);
this
.
back
()
});
},
//获取报销信息
getFrom
(){
//接收query传给我们的值
...
...
src/views/type/typeAdd.vue
View file @
098c6731
...
...
@@ -80,9 +80,6 @@
},
{
value
:
'
1
'
,
label
:
'
支出类别
'
},{
value
:
"
2
"
,
label
:
"
报销类别
"
,
}]
};
},
...
...
src/views/type/typeList.vue
View file @
098c6731
...
...
@@ -56,9 +56,9 @@
<el-table-column
label=
"类别种类"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.typeCategory == '0' ? 'success' :
scope.row.typeCategory == '1' ? 'danger':'warning
' "
:type=
"scope.row.typeCategory == '0' ? 'success' :
'danger
' "
>
{{
scope
.
row
.
typeCategory
==
'
0
'
?
'
收入类别
'
:
scope
.
row
.
typeCategory
==
'
1
'
?
'
支出类别
'
:
'
报销
类别
'
}}
{{
scope
.
row
.
typeCategory
==
'
0
'
?
'
收入类别
'
:
'
支出
类别
'
}}
</el-tag>
</
template
>
</el-table-column>
...
...
@@ -105,10 +105,6 @@ export default {
value
:
"
1
"
,
label
:
"
支出类别
"
,
},
{
value
:
"
2
"
,
label
:
"
报销类别
"
,
}
],
total
:
0
,
typeList
:[]
...
...
src/views/type/typeUpdata.vue
View file @
098c6731
...
...
@@ -54,10 +54,6 @@ export default {
value
:
"
1
"
,
label
:
"
支出类别
"
,
},
{
value
:
"
2
"
,
label
:
"
报销类别
"
,
}
],
rules
:
{
typeName
:
[
...
...
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