|
@@ -47,7 +47,10 @@
|
|
|
|
|
|
<view class="item" @click="gotoUrl('pages/projectDepartment/exportProcess/exportProcess')">
|
|
|
<view class="title">
|
|
|
- <u-badge type="error" :count="badgeexportProcess"></u-badge>出库审核
|
|
|
+ 出库审核
|
|
|
+ <u-badge type="error" style=" position: unset; padding: 2px 3px;" :fontSize="36"
|
|
|
+
|
|
|
+ :isCenter="true" :count="badgeGet.outApproveList"></u-badge>
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
审批出库申请单据
|
|
@@ -65,6 +68,7 @@
|
|
|
<view class="item" @click="gotoUrl('pages/projectDepartment/exportApplication/exportApplication')">
|
|
|
<view class="title">
|
|
|
出库申请
|
|
|
+
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
提交出库申请单据
|
|
@@ -77,6 +81,7 @@
|
|
|
<view class="item" @click="gotoUrl('pages/projectDepartment/exportReturn/exportReturn')">
|
|
|
<view class="title">
|
|
|
设备归还
|
|
|
+
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
提交设备归还单据
|
|
@@ -86,17 +91,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
- <view class="item" @click="gotoUrl('pages/otherFunctions/equipmentRetrieval/equipmentRetrieval')">
|
|
|
- <view class="title">
|
|
|
- 设备检索
|
|
|
- </view>
|
|
|
- <view class="hint">
|
|
|
- 库存物品信息检索
|
|
|
- </view>
|
|
|
- <view class="img">
|
|
|
- <img src="@/assets/img/projectGird4.png" alt="">
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+
|
|
|
|
|
|
|
|
|
<template v-if="role('1')">
|
|
@@ -105,6 +100,9 @@
|
|
|
<view class="item" @click="gotoUrl('pages/storeManagement/equipmentDelivery/equipmentDelivery')">
|
|
|
<view class="title">
|
|
|
设备出库
|
|
|
+ <u-badge type="error" style=" position: unset; padding: 2px 3px;" :fontSize="36"
|
|
|
+
|
|
|
+ :isCenter="true" :count="badgeGet.outWaitList"></u-badge>
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
申请物品登记核准出库
|
|
@@ -116,6 +114,9 @@
|
|
|
<view class="item" @click="gotoUrl('pages/storeManagement/equipmentEnter/equipmentEnter')">
|
|
|
<view class="title">
|
|
|
设备入库
|
|
|
+ <u-badge type="error" style=" position: unset; padding: 2px 3px;" :fontSize="36"
|
|
|
+
|
|
|
+ :isCenter="true" :count="badgeGet.inWaitList"></u-badge>
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
申购采购收货入库登记
|
|
@@ -127,6 +128,9 @@
|
|
|
<view class="item" @click="gotoUrl('pages/storeManagement/equipmentInspection/equipmentInspection')" >
|
|
|
<view class="title">
|
|
|
设备巡检
|
|
|
+ <u-badge type="error" style=" position: unset; padding: 2px 3px;" :fontSize="36"
|
|
|
+
|
|
|
+ :isCenter="true" :count="badgeGet.deviceList"></u-badge>
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
当前物品计量库存盘点
|
|
@@ -137,7 +141,17 @@
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
-
|
|
|
+ <view class="item" @click="gotoUrl('pages/otherFunctions/equipmentRetrieval/equipmentRetrieval')">
|
|
|
+ <view class="title">
|
|
|
+ 设备检索
|
|
|
+ </view>
|
|
|
+ <view class="hint">
|
|
|
+ 库存物品信息检索
|
|
|
+ </view>
|
|
|
+ <view class="img">
|
|
|
+ <img src="@/assets/img/projectGird4.png" alt="">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 其他功能 -->
|
|
@@ -179,7 +193,53 @@
|
|
|
badgeexportProcess:0,
|
|
|
userInfo:{
|
|
|
name:""
|
|
|
- }
|
|
|
+ },
|
|
|
+ badgeGet:{
|
|
|
+
|
|
|
+ },
|
|
|
+ badgeList:[
|
|
|
+ {
|
|
|
+ url:"/mobile/out/outApproveList",
|
|
|
+ role:"3",
|
|
|
+ key:"outApproveList",
|
|
|
+ page:{
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 0,
|
|
|
+ status: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url:"/mobile/out/outWaitList",
|
|
|
+ role:"1",
|
|
|
+ key:"outWaitList",
|
|
|
+ page:{
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 0,
|
|
|
+ status: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url:"/mobile/in/inWaitList",
|
|
|
+ role:"1",
|
|
|
+ key:"inWaitList",
|
|
|
+ page:{
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 0,
|
|
|
+ status: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ url:"/mobile/inspection/deviceList",
|
|
|
+ role:"1",
|
|
|
+ key:"deviceList",
|
|
|
+ page:{
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 0,
|
|
|
+ healthStatus: 5,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
@@ -191,7 +251,7 @@
|
|
|
this.getInfo()
|
|
|
},
|
|
|
onReady() {
|
|
|
- console.log("onReady")
|
|
|
+
|
|
|
// #ifdef MP-WEIXIN
|
|
|
wx.getSetting({
|
|
|
success: res => {
|
|
@@ -212,32 +272,61 @@
|
|
|
// #endif
|
|
|
},
|
|
|
onShow(){
|
|
|
- if(this.role("3")){
|
|
|
-
|
|
|
- API.outApproveList({
|
|
|
- pageIndex: 1,
|
|
|
- pageSize: 1,
|
|
|
-
|
|
|
- status: 0,
|
|
|
- }).then((res) => {
|
|
|
-
|
|
|
- this.badgeexportProcess=res.data.recordsTotal
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
+ this.badgeGetMethodApi()
|
|
|
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
+
|
|
|
+ badgeGetMethodApi(){
|
|
|
+ var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
|
|
|
+ var token_tdate=this.carhelp.get("badgeGet_token_tdate");//每60分钟存储一次token
|
|
|
+ if(token_tdate&&token_tdate==tdate){
|
|
|
+ this.badgeGetMethod();
|
|
|
+ this.$forceUpdate()
|
|
|
+ }else{
|
|
|
+
|
|
|
+
|
|
|
+ for(var i in this.badgeList){
|
|
|
+ var obj=this.badgeList[i]
|
|
|
+ console.log(this.role(obj.role),obj.role)
|
|
|
+ if(this.role(obj.role)){
|
|
|
+ this.carhelp.set("badgeGet_token_tdate",tdate);
|
|
|
+ this.urlgetlisg(obj)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ urlgetlisg(obj){
|
|
|
+ API.urlgetlisg(obj.page,obj.url).then((res) => {
|
|
|
+
|
|
|
+ var count=res.data.recordsTotal;
|
|
|
+ this.badgeGet[obj.key]=count;
|
|
|
+ this.carhelp.set("badgeList_"+obj.key,count)
|
|
|
+ this.$forceUpdate()
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ badgeGetMethod(){
|
|
|
+ for(var i in this.badgeList){
|
|
|
+ var obj=this.badgeList[i]
|
|
|
+ this.badgeGet[obj.key]=this.carhelp.get("badgeList_"+obj.key);
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
error(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
role(val){
|
|
|
+
|
|
|
if(this.userInfo.type!=null&&this.userInfo.type!=undefined){
|
|
|
+
|
|
|
var index=this.userInfo.type.split(',').indexOf(val)
|
|
|
+
|
|
|
return index>-1
|
|
|
}else{
|
|
|
return false
|
|
@@ -253,7 +342,7 @@
|
|
|
|
|
|
this.carhelp.setPersonInfo(res.data.regUser );
|
|
|
this.userInfo=this.carhelp.getPersonInfo()
|
|
|
-
|
|
|
+ this.badgeGetMethodApi()
|
|
|
|
|
|
|
|
|
}).catch(error => {
|