@@ -123,15 +135,26 @@ wepy.page({
data: {
orderList: [],
userInfo: {},
- platformOptions: []
+ platformOptions: [],
+ activeTab: 0,
+ activeTitle: '',
+ platform: ''
},
computed: {},
methods: {
item_click(item){
- let data = JSON.stringify(item)
- wx.navigateTo({
- url: '/pages/approvePreview?data=' + encodeURIComponent(data)
- })
+ let data = JSON.parse(JSON.stringify(item))
+ data.activeTitle = this.activeTitle
+ 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.navigateTo({
@@ -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() {
@@ -325,6 +406,7 @@ wepy.page({
let username = arrPara[1]
let plat = arrPara[3]
let requestURL = this.platformOptions.find(v => v.platformNum === plat).platformUrl
+ this.platform = plat.replace('_test', '')
wx.setStorage({
key: 'requestURL',
data: requestURL
@@ -355,7 +437,8 @@ wepy.page({
角色编号:res.data.data.umsUserRoleQueryVo[0].roleNum,
课题组名称:res.data.data.umsUserRoleQueryVo[0].groupName,
课题组编号:res.data.data.umsUserRoleQueryVo[0].groupCode,
- 默认页:'index'
+ 默认页:'index',
+ platform: plat.replace('_test', '')
};
wx.setStorage({
key: 'user_info',
@@ -390,6 +473,7 @@ wepy.page({
key: 'user_info',
success: (res) => {
this.userInfo = JSON.parse(res.data);
+ this.platform = this.userInfo.platform
this.getList()
},
fail: function() {
@@ -471,7 +555,9 @@ header: '~@/components/header',
'van-button': 'module:@vant/weapp/lib/button',
"van-action-sheet": "module:@vant/weapp/lib/action-sheet/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"
}
}
diff --git a/src/pages/sydwApprovePreview.wpy b/src/pages/sydwApprovePreview.wpy
new file mode 100644
index 0000000000000000000000000000000000000000..4c6d96e9e817a4e746a71ee46f08d574d2c7d1c6
--- /dev/null
+++ b/src/pages/sydwApprovePreview.wpy
@@ -0,0 +1,474 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
订单总览
+
+
{{ queryOrder.orderSn }}
+
总金额:{{ queryOrder.amount }}元
+
+
提交人:{{ queryOrder.submitName }}
+
课题组:{{ queryOrder.groupName }}
+
经费卡:{{ queryOrder.fundsCar }}
+
伦理卡号:{{ queryOrder.ethNo }}
+
供应商:{{ queryOrder.supplierName }}
+
+
+
商品明细
+
+
+
+
商品名称:{{ item.name }}
+
单价:{{ item.price }}元
+
+
{{ '品牌: '+ item.brand +';货号:'+ item.goodsNo +';品种:' + item.spec2 }}
+
{{ '规格: '+ item.spec +';等级:'+ item.grade +';年龄:' + item.old }}
+
{{ '体重: '+ item.weight +';性别:'+ item.sex }}
+
+
+
+
+
+ 审批通过
+ 审批拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+{
+navigationBarTextStyle: "white",
+navigationBarBackgroundColor: "#45C9C3",
+navigationBarTitleText: '小树懒捎带',
+usingComponents: {
+"van-card": "module:@vant/weapp/lib/card/index",
+"van-icon": "module:@vant/weapp/lib/icon/index",
+"van-overlay": "module:@vant/weapp/lib/overlay/index",
+"van-cell": "module:@vant/weapp/lib/cell/index",
+"van-cell-group": "module:@vant/weapp/lib/cell-group/index",
+"van-search": "module:@vant/weapp/lib/search/index",
+"van-image": "module:@vant/weapp/lib/image/index",
+"van-dialog": "module:@vant/weapp/lib/dialog/index",
+header: '~@/components/header',
+"van-picker": "module:@vant/weapp/lib/picker/index",
+"van-popup": "module:@vant/weapp/lib/popup/index",
+'van-button': 'module:@vant/weapp/lib/button',
+"van-action-sheet": "module:@vant/weapp/lib/action-sheet/index",
+"van-tabbar": "module:@vant/weapp/lib/tabbar/index",
+"van-tabbar-item": "module:@vant/weapp/lib/tabbar-item/index"
+}
+}
+