Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cg_approveApp_2023
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
cg_approveApp_2023
Commits
ac685ec2
Commit
ac685ec2
authored
Nov 28, 2024
by
heduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(system): 华中阜外审批小程序新增实验动物
parent
a48cc744
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
568 additions
and
8 deletions
+568
-8
src/pages/index.wpy
src/pages/index.wpy
+94
-8
src/pages/sydwApprovePreview.wpy
src/pages/sydwApprovePreview.wpy
+474
-0
No files found.
src/pages/index.wpy
View file @
ac685ec2
...
@@ -63,6 +63,15 @@
...
@@ -63,6 +63,15 @@
box-sizing: border-box;
box-sizing: border-box;
display: flex;flex-direction: row;align-items: center
display: flex;flex-direction: row;align-items: center
}
}
.van-tabs__line {
z-index: 1;
left: 0;
bottom: 15px;
height: 3px;
position: absolute;
border-radius: 3px;
background-color: #409EFF !important;
}
</style>
</style>
<!--<wxs module="m1" lang="babel">-->
<!--<wxs module="m1" lang="babel">-->
...
@@ -81,7 +90,10 @@
...
@@ -81,7 +90,10 @@
<header background="#45C9C2" title_text="待审批列表"/>
<header background="#45C9C2" title_text="待审批列表"/>
<div style="width: 100%;height: 100%;padding: 10rpx;box-sizing: border-box;">
<div style="width: 100%;height: 100%;padding: 10rpx;box-sizing: border-box;">
<van-tabs v-if="platform === 'ckzv' || platform === 'ckzvSydw'" active="{{ activeTab }}" @change="onChange">
<van-tab title="试剂耗材"></van-tab>
<van-tab title="实验动物"></van-tab>
</van-tabs>
<van-empty v-if="orderList.length === 0" description="暂无待审批订单" />
<van-empty v-if="orderList.length === 0" description="暂无待审批订单" />
<div @tap="item_click(item)" v-for="(item,index) in orderList" class="item">
<div @tap="item_click(item)" v-for="(item,index) in orderList" class="item">
...
@@ -123,15 +135,26 @@ wepy.page({
...
@@ -123,15 +135,26 @@ wepy.page({
data: {
data: {
orderList: [],
orderList: [],
userInfo: {},
userInfo: {},
platformOptions: []
platformOptions: [],
activeTab: 0,
activeTitle: '',
platform: ''
},
},
computed: {},
computed: {},
methods: {
methods: {
item_click(item){
item_click(item){
let data = JSON.stringify(item)
let data = JSON.parse(JSON.stringify(item))
wx.navigateTo({
data.activeTitle = this.activeTitle
url: '/pages/approvePreview?data=' + encodeURIComponent(data)
if (this.activeTitle === '试剂耗材') {
})
wx.navigateTo({
url: '/pages/approvePreview?data=' + encodeURIComponent(JSON.stringify(data))
})
} else if (this.activeTitle === '实验动物') {
wx.navigateTo({
url: '/pages/sydwApprovePreview?data=' + encodeURIComponent(JSON.stringify(data))
})
}
// wx.setStorageSync("order", item);
// wx.setStorageSync("order", item);
// wx.navigateTo({
// wx.navigateTo({
...
@@ -233,6 +256,64 @@ wepy.page({
...
@@ -233,6 +256,64 @@ wepy.page({
})
})
}
}
});
});
},
getSydwList() {
wx.getStorage({
key: 'user_info',
success: (res) => {
this.userInfo = JSON.parse(res.data);
wx.showLoading({
title: '加载中'
});
const requestURL = wx.getStorageSync('requestURL')
wx.request({
url: `${requestURL}/approveOpera/listUnApproveAnm`,
method: 'post',
header: {
'Content-Type': 'application/json',
'token': this.userInfo.token
},
data: {
searchText: '',
roleNum: this.userInfo.roleNum
},
success: (res) => {
if (res.data.success) {
this.orderList = res.data.data
} else if(res.statusCode === 401) {
wx.showModal({
title: '提示',
content: '重新扫码登录',
showCancel: false,
success: () => {
}
})
} else {
this.orderList = []
}
wx.hideLoading()
}
});
},
fail: function() {
wx.showModal({
title: '提示',
content: '重新扫码登录',
showCancel: false,
success: () => {
}
})
}
});
},
onChange(event) {
this.activeTitle = event.$wx.detail.title
this.orderList = []
if (event.$wx.detail.title === '试剂耗材') {
this.getList()
} else if (event.$wx.detail.title === '实验动物') {
this.getSydwList()
}
}
}
},
},
onShow() {
onShow() {
...
@@ -325,6 +406,7 @@ wepy.page({
...
@@ -325,6 +406,7 @@ wepy.page({
let username = arrPara[1]
let username = arrPara[1]
let plat = arrPara[3]
let plat = arrPara[3]
let requestURL = this.platformOptions.find(v => v.platformNum === plat).platformUrl
let requestURL = this.platformOptions.find(v => v.platformNum === plat).platformUrl
this.platform = plat.replace('_test', '')
wx.setStorage({
wx.setStorage({
key: 'requestURL',
key: 'requestURL',
data: requestURL
data: requestURL
...
@@ -355,7 +437,8 @@ wepy.page({
...
@@ -355,7 +437,8 @@ wepy.page({
角色编号:res.data.data.umsUserRoleQueryVo[0].roleNum,
角色编号:res.data.data.umsUserRoleQueryVo[0].roleNum,
课题组名称:res.data.data.umsUserRoleQueryVo[0].groupName,
课题组名称:res.data.data.umsUserRoleQueryVo[0].groupName,
课题组编号:res.data.data.umsUserRoleQueryVo[0].groupCode,
课题组编号:res.data.data.umsUserRoleQueryVo[0].groupCode,
默认页:'index'
默认页:'index',
platform: plat.replace('_test', '')
};
};
wx.setStorage({
wx.setStorage({
key: 'user_info',
key: 'user_info',
...
@@ -390,6 +473,7 @@ wepy.page({
...
@@ -390,6 +473,7 @@ wepy.page({
key: 'user_info',
key: 'user_info',
success: (res) => {
success: (res) => {
this.userInfo = JSON.parse(res.data);
this.userInfo = JSON.parse(res.data);
this.platform = this.userInfo.platform
this.getList()
this.getList()
},
},
fail: function() {
fail: function() {
...
@@ -471,7 +555,9 @@ header: '~@/components/header',
...
@@ -471,7 +555,9 @@ header: '~@/components/header',
'van-button': 'module:@vant/weapp/lib/button',
'van-button': 'module:@vant/weapp/lib/button',
"van-action-sheet": "module:@vant/weapp/lib/action-sheet/index",
"van-action-sheet": "module:@vant/weapp/lib/action-sheet/index",
"van-tabbar": "module:@vant/weapp/lib/tabbar/index",
"van-tabbar": "module:@vant/weapp/lib/tabbar/index",
"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index"
"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index",
"van-tabs": "module:@vant/weapp/lib/tabs/index",
"van-tab": "module:@vant/weapp/lib/tab/index"
}
}
}
}
</config>
</config>
src/pages/sydwApprovePreview.wpy
0 → 100644
View file @
ac685ec2
This diff is collapsed.
Click to expand it.
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