Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_OA
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
91isoft_OA
Commits
1a2942ac
Commit
1a2942ac
authored
Mar 12, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口对接
parent
686f7878
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
266 additions
and
43 deletions
+266
-43
approval.js
api/system/approval.js
+9
-0
document.js
api/system/document.js
+17
-0
config.js
config.js
+2
-1
pages.json
pages.json
+5
-0
approval.vue
pages/approval/approval.vue
+11
-4
documentInfo.vue
pages/document/documentInfo.vue
+167
-0
index.vue
pages/document/index.vue
+54
-37
login.vue
pages/login.vue
+1
-1
No files found.
api/system/approval.js
0 → 100644
View file @
1a2942ac
import
request
from
'@/utils/request'
// 审批数据列表获取
export
function
getApproveList
(
type
)
{
return
request
({
url
:
`/wx/sysprocessinstance/listByPageExamine/
${
type
}
`
,
method
:
'get'
,
})
}
api/system/document.js
0 → 100644
View file @
1a2942ac
import
request
from
'@/utils/request'
// 获取单据列表信息
export
function
queryDocumentList
(
params
)
{
return
request
({
url
:
'/wx/sysprocessinstance/listByPage'
,
method
:
'get'
,
params
})
}
// 获取单据详情
export
function
getDocumentDetails
(
businessId
)
{
return
request
({
url
:
`/wx/sysprocessinstance/getDetail/
${
businessId
}
`
,
method
:
'get'
,
})
}
config.js
View file @
1a2942ac
// 应用全局配置
// 应用全局配置
module
.
exports
=
{
module
.
exports
=
{
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
baseUrl
:
'http://49.232.167.247:20014'
,
// 线上
// baseUrl: 'http://49.232.167.247:20014', // 线上
baseUrl
:
'http://192.168.1.12:8001'
,
// 线上
// baseUrl: 'http://localhost:8080',
// baseUrl: 'http://localhost:8080',
// 应用信息
// 应用信息
appInfo
:
{
appInfo
:
{
...
...
pages.json
View file @
1a2942ac
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
"navigationBarTitleText"
:
"单据"
"navigationBarTitleText"
:
"单据"
}
}
},
{
},
{
"path"
:
"pages/document/documentInfo"
,
"style"
:
{
"navigationBarTitleText"
:
"详情"
}
},{
"path"
:
"pages/mine/index"
,
"path"
:
"pages/mine/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"我的"
"navigationBarTitleText"
:
"我的"
...
...
pages/approval/approval.vue
View file @
1a2942ac
...
@@ -9,9 +9,6 @@
...
@@ -9,9 +9,6 @@
<view
v-show=
"current === 1"
class=
"approval_content"
>
<view
v-show=
"current === 1"
class=
"approval_content"
>
<my-approval></my-approval>
<my-approval></my-approval>
</view>
</view>
<!--
<view
v-show=
"current === 2"
class=
"approval_content"
>
-->
<!--
<my-rejected></my-rejected>
-->
<!--
</view>
-->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -23,17 +20,27 @@
...
@@ -23,17 +20,27 @@
import
MyRejected
from
'./myrejected.vue'
import
MyRejected
from
'./myrejected.vue'
import
UniSegmentedControl
import
UniSegmentedControl
from
"../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue"
;
from
"../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue"
;
import
{
getApproveList
}
from
"../../api/system/approval"
;
export
default
{
export
default
{
components
:{
UniSegmentedControl
,
MyApproval
,
MyApply
,
MyRejected
},
components
:{
UniSegmentedControl
,
MyApproval
,
MyApply
,
MyRejected
},
data
()
{
data
()
{
return
{
return
{
current
:
0
,
current
:
1
,
// 0: 待办, 1: 已办
approvalList
:[
'待办'
,
'已办'
]
approvalList
:[
'待办'
,
'已办'
]
}
}
},
},
created
()
{
this
.
getApprovalList
()
},
methods
:
{
methods
:
{
getApprovalList
()
{
getApproveList
(
this
.
current
).
then
(
res
=>
{
})
},
onClickItem
(
e
)
{
onClickItem
(
e
)
{
this
.
current
=
e
.
currentIndex
this
.
current
=
e
.
currentIndex
this
.
getApprovalList
()
}
}
}
}
...
...
pages/document/documentInfo.vue
0 → 100644
View file @
1a2942ac
<
template
>
<view
class=
"container"
>
<uni-card
:is-shadow=
"false"
is-full
>
<text
class=
"uni-h6"
>
{{
classesForm
.
classesName
}}
</text>
</uni-card>
<uni-section
title=
"班次信息"
type=
"line"
>
<view
class=
"example"
style=
"padding: 0 10px"
>
<!-- 展示不同的排列方式 -->
<uni-forms
ref=
"baseForm"
:modelValue=
"classesForm"
label-position=
"left"
label-width=
"120"
>
<uni-forms-item
label=
"部门"
required
>
<uni-data-picker
v-model=
"classesForm.deptId"
:map=
"
{value: 'deptId', text: 'deptName'}" :localdata="deptTree" popup-title="请选择部门" @change="onchange">
</uni-data-picker>
<text
class=
"beforeValue"
>
部门2
</text>
</uni-forms-item>
<uni-forms-item
label=
"产线"
required
>
<uni-data-picker
v-model=
"classesForm.productId"
:map=
"
{value: 'productId', text: 'productName'}" :localdata="productTree" popup-title="请选择产线" @change="onchange">
</uni-data-picker>
<text
class=
"beforeValue"
>
产线2
</text>
</uni-forms-item>
<uni-forms-item
label=
"是否跨天"
required
>
<uni-data-checkbox
v-model=
"classesForm.isTwodays"
style=
"float: right;margin-top: 5px;"
:localdata=
"towDayMap"
></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item
label=
"开始时间"
required
>
<uni-datetime-picker
type=
"date"
:clear-icon=
"false"
v-model=
"classesForm.startDate"
placeholder=
"请选择开始时间"
/>
<text
class=
"beforeValue"
>
2024-03-01
</text>
</uni-forms-item>
<uni-forms-item
label=
"结束时间"
required
>
<uni-datetime-picker
type=
"date"
:clear-icon=
"false"
v-model=
"classesForm.endDate"
placeholder=
"请选择结束时间"
/>
<text
class=
"beforeValue"
>
2024-03-11
</text>
</uni-forms-item>
<uni-forms-item
label=
"权重"
required
>
<uni-easyinput
type=
"number"
disabled
v-model=
"classesForm.weight"
placeholder=
"请输入权重"
/>
<text
class=
"beforeValue"
>
3
</text>
</uni-forms-item>
<uni-forms-item
label=
"版本"
required
>
<uni-easyinput
v-model=
"classesForm.version"
disabled
placeholder=
"请输入版本"
/>
<text
class=
"beforeValue"
>
2
</text>
</uni-forms-item>
</uni-forms>
<button
type=
"primary"
@
click=
"submit('baseForm')"
>
提交
</button>
</view>
</uni-section>
</view>
</
template
>
<
script
>
import
{
getDocumentDetails
}
from
"../../api/system/document"
;
export
default
{
name
:
"ClassesInfo"
,
data
()
{
return
{
businessId
:
''
,
approveHistoryList
:
[],
// 审批历史
createDeptName
:
[],
// 部门名称
flowChatNodeList
:
[],
// 所有节点
newBusinessData
:
[],
// 新表单
oldBusinessData
:
[],
// 旧表单
classesForm
:
{},
deptTree
:
[
{
deptName
:
'部门1'
,
deptId
:
1
},
{
deptName
:
'部门2'
,
deptId
:
2
}
],
productTree
:
[
{
productName
:
'产线1'
,
productId
:
1
},
{
productName
:
'产线2'
,
productId
:
2
}
],
towDayMap
:
[
{
text
:
'是'
,
value
:
'1'
,
},
{
text
:
'否'
,
value
:
'0'
,
}
]
}
},
onLoad
(
options
)
{
this
.
businessId
=
options
.
businessId
this
.
getDetails
()
// 页面启动的生命周期,这里编写页面加载时的逻辑
},
methods
:
{
onchange
()
{
},
/** 获取详情*/
getDetails
()
{
getDocumentDetails
(
this
.
businessId
).
then
(
res
=>
{
this
.
approveHistoryList
=
res
.
data
.
approveHistoryList
// 审批历史
this
.
createDeptName
=
res
.
data
.
createDeptName
// 部门名称
this
.
flowChatNodeList
=
res
.
data
.
flowChatNodeList
// 所有节点
this
.
newBusinessData
=
res
.
data
.
newBusinessData
// 新表单
this
.
oldBusinessData
=
res
.
data
.
oldBusinessData
// 旧表单
})
},
switchChange
(
e
)
{
console
.
log
(
e
)
this
.
classesForm
.
isTwodays
=
e
},
submit
(
ref
)
{
this
.
$refs
[
ref
].
validate
(
res
=>
{
console
.
log
(
this
.
classesForm
)
aeclassesinfoUpdate
(
this
.
classesForm
).
then
(
res
=>
{
uni
.
showToast
({
title
:
`编辑成功`
})
setTimeout
(
_
=>
{
uni
.
navigateBack
()
},
500
)
})
}).
catch
(
err
=>
{
console
.
log
(
'err'
,
err
);
})
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.beforeValue
{
padding-left
:
10px
;
color
:
red
;
}
.example
{
padding
:
15px
;
background-color
:
#fff
;
}
.segmented-control
{
margin-bottom
:
15px
;
}
.button-group
{
margin-top
:
15px
;
display
:
flex
;
justify-content
:
space-around
;
}
.form-item
{
display
:
flex
;
align-items
:
center
;
}
.button
{
display
:
flex
;
align-items
:
center
;
height
:
35px
;
margin-left
:
10px
;
}
</
style
>
pages/document/index.vue
View file @
1a2942ac
<
template
>
<
template
>
<view
class=
"document_module"
>
<view
class=
"document_module"
>
<view
class=
"leave_container"
>
<!--
<view
class=
"leave_container"
>
--
>
<view
class=
"leave_title"
>
<!--
<view
class=
"leave_title"
>
--
>
<text>
单据类型
<text
class=
"red-icon"
>
*
</text></text
>
<!--
<text>
单据类型
<text
class=
"red-icon"
>
*
</text></text>
--
>
<view
class=
"leave_con"
>
<!--
<view
class=
"leave_con"
>
--
>
<uni-combox
:candidates=
"leaveList"
placeholder=
"请选择单据类型"
v-model=
"form.leave_type"
></uni-combox
>
<!--
<uni-combox
:candidates=
"leaveList"
placeholder=
"请选择单据类型"
v-model=
"form.leave_type"
></uni-combox>
--
>
</view
>
<!--
</view>
--
>
</view
>
<!--
</view>
--
>
<view
class=
"leave_title"
>
<!--
<view
class=
"leave_title"
>
--
>
<text>
开始时间
<text
class=
"red-icon"
>
*
</text></text
>
<!--
<text>
开始时间
<text
class=
"red-icon"
>
*
</text></text>
--
>
<view
class=
"leave_con"
>
<!--
<view
class=
"leave_con"
>
--
>
<uni-datetime-picker
type=
"date"
v-model=
"form.start_date"
/
>
<!--
<uni-datetime-picker
type=
"date"
v-model=
"form.start_date"
/>
--
>
</view
>
<!--
</view>
--
>
</view
>
<!--
</view>
--
>
<view
class=
"leave_title"
>
<!--
<view
class=
"leave_title"
>
--
>
<text>
结束时间
<text
class=
"red-icon"
>
*
</text></text
>
<!--
<text>
结束时间
<text
class=
"red-icon"
>
*
</text></text>
--
>
<view
class=
"leave_con"
>
<!--
<view
class=
"leave_con"
>
--
>
<uni-datetime-picker
type=
"date"
v-model=
"form.end_date"
/
>
<!--
<uni-datetime-picker
type=
"date"
v-model=
"form.end_date"
/>
--
>
</view
>
<!--
</view>
--
>
</view
>
<!--
</view>
--
>
<view
class=
"leave_btn"
>
<!--
<view
class=
"leave_btn"
>
--
>
<button
type=
"primary"
@
click=
"submitLeave"
>
搜索
</button
>
<!--
<button
type=
"primary"
@
click=
"submitLeave"
>
搜索
</button>
--
>
</view
>
<!--
</view
>
--
>
</view
>
<!--
</view>
--
>
<uni-swipe-action>
<uni-swipe-action>
<ul>
<ul>
<li
v-for=
"(item,index) in myApprovalList"
:key=
"index"
class=
"my_approval_li"
>
<li
v-for=
"(item,index) in myApprovalList"
:key=
"index"
class=
"my_approval_li"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<uni-swipe-action-item
:right-options=
"options"
@
click=
"bindClick($event,item.eventId)"
@
change=
"swipeChange($event, index)"
>
<view
class=
"my_approval_item"
>
<view
class=
"my_approval_item"
@
click=
"toNav(item.businessId)"
>
<h3
class=
"my_approval_title"
><text>
[
{{
item
.
type
}}
]--
{{
item
.
name
}}
</text>
<text
class=
"approval_title_right"
>
{{
item
.
stateName
}}
</text></h3>
<h3
class=
"my_approval_title"
><text>
[
{{
item
.
businessTypeName
}}
]--
{{
item
.
createUserName
}}
</text>
<text
class=
"approval_info_type"
>
{{
item
.
status
===
'10'
?
'待审批'
:
item
.
status
===
'2'
?
'已审批'
:
item
.
status
===
'5'
?
'驳回'
:
''
}}
</text></h3>
<view
class=
"my_approval_info"
>
<view
class=
"my_approval_info"
>
<text>
{{
item
.
department
}}
</text>
<text
class=
"approval_info_right"
>
{{
item
.
createDate
}}
</text>
<text
class=
"approval_info_right"
>
{{
item
.
time
}}
</text>
</view>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action-item>
...
@@ -44,6 +45,8 @@
...
@@ -44,6 +45,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
queryDocumentList
}
from
"@/api/system/document"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -64,16 +67,7 @@ export default{
...
@@ -64,16 +67,7 @@ export default{
{
value
:
1
,
text
:
"足球"
},
{
value
:
1
,
text
:
"足球"
},
{
value
:
2
,
text
:
"游泳"
},
{
value
:
2
,
text
:
"游泳"
},
],
],
myApprovalList
:[{
myApprovalList
:[],
type
:
"请假"
,
name
:
"张三"
,
reason
:
"家里有事"
,
stateName
:
"待办"
,
state
:
'0'
,
department
:
"研发部"
,
time
:
'2021-10-14'
,
eventId
:
'211'
}],
options
:[
options
:[
{
{
text
:
'撤回'
,
text
:
'撤回'
,
...
@@ -89,7 +83,27 @@ export default{
...
@@ -89,7 +83,27 @@ export default{
]
]
}
}
},
},
created
()
{
this
.
getDocumentList
()
},
methods
:{
methods
:{
/** 详情页跳转*/
toNav
(
id
)
{
uni
.
navigateTo
({
url
:
`documentInfo?businessId=
${
id
}
`
,
success
:(
res
)
=>
{
},
fail
:(
err
)
=>
{
console
.
log
(
err
)
}
});
},
/** 查询单据列表*/
getDocumentList
()
{
queryDocumentList
().
then
(
res
=>
{
this
.
myApprovalList
=
res
.
rows
})
},
bindClick
(
e
,
id
)
{
bindClick
(
e
,
id
)
{
if
(
e
.
content
.
text
===
'撤回'
){
if
(
e
.
content
.
text
===
'撤回'
){
console
.
log
(
'撤回'
)
console
.
log
(
'撤回'
)
...
@@ -154,6 +168,9 @@ export default{
...
@@ -154,6 +168,9 @@ export default{
color
:
#007aff
;
color
:
#007aff
;
}
}
}
}
.approval_info_type
{
padding-left
:
130px
;
}
.my_approval_info
{
.my_approval_info
{
height
:
60rpx
;
height
:
60rpx
;
line-height
:
60rpx
;
line-height
:
60rpx
;
...
...
pages/login.vue
View file @
1a2942ac
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
register
:
false
,
register
:
false
,
globalConfig
:
getApp
().
globalData
.
config
,
globalConfig
:
getApp
().
globalData
.
config
,
loginForm
:
{
loginForm
:
{
username
:
"
admi
n"
,
username
:
"
guanliyua
n"
,
password
:
"123456"
,
password
:
"123456"
,
code
:
""
,
code
:
""
,
uuid
:
''
uuid
:
''
...
...
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