diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue
index 10c14a7..3a13ace 100644
--- a/pages-home/home/home.vue
+++ b/pages-home/home/home.vue
@@ -24,22 +24,32 @@
- 审批单处理全部
+ 审批单处理全部
已提交
- 4
+ {{ workerNumObj.submitNum }}
未通过
- 1
+ {{ workerNumObj.noAllowNum }}
+
+
+
+
+
- 已通过
- 6
-
+ 待确认领料
+ {{ workerNumObj.waitingReceiveNum }}
+
+
+
+ 待确认退料
+ {{ workerNumObj.waitingBackNum }}
+
@@ -64,7 +74,7 @@
-
@@ -130,6 +140,14 @@ export default {
isTriggered:true,
orderList: [
],
+ //维修工处理配件申请单数量
+ workerNumObj:{
+ submitNum:0,
+ allowNum:0,
+ noAllowNum:0,
+ waitingReceiveNum:0,
+ waitingBackNum:0,
+ },
defaultAvatar: require('@/static/icons/avatar.png')
}
},
@@ -153,6 +171,10 @@ export default {
//直接取缓存中的用户信息
this.userInfo = getUserInfo()
this.onRefresherrefresh()
+ if(this.userInfo.roleCodes.includes('repair_staff')){
+ //维修工
+ this.getWorkerTodo()
+ }
}
},
methods: {
@@ -226,6 +248,20 @@ export default {
console.error(error);
}
},
+ /**
+ * 维修工的角度查提交的配件申请单 待处理数量
+ */
+ getWorkerTodo(){
+ request({
+ url: '/admin-api/repair/tw/getWorkerTodo',
+ method: 'get',
+ }).then((res) => {
+ console.log(res)
+ if (res.code == 200) {
+ this.workerNumObj = res.data
+ }
+ })
+ },
/**
* 查本人待处理工单
*/
@@ -287,7 +323,12 @@ export default {
uni.navigateTo({
url: '/pages/my/myInfo'
})
- }
+ },
+ workerTodo() {
+ uni.navigateTo({
+ url: '/pages-repair/applyList/applyList'
+ })
+ },
}
}
@@ -484,6 +525,7 @@ export default {
.todoListBox {
margin: 40rpx 32rpx;
+ height: calc(100vh - 500rpx);
.title {
margin-bottom: 30rpx;
@@ -507,7 +549,7 @@ export default {
display: flex;
flex-direction: column;
row-gap: 20rpx;
- height: calc(100vh - 500rpx);
+ height: 98%;
}
}
diff --git a/pages-home/static/waitingBackNum.png b/pages-home/static/waitingBackNum.png
new file mode 100644
index 0000000..e7a3225
Binary files /dev/null and b/pages-home/static/waitingBackNum.png differ
diff --git a/pages-home/static/waitingReceiveNum.png b/pages-home/static/waitingReceiveNum.png
new file mode 100644
index 0000000..0e406cd
Binary files /dev/null and b/pages-home/static/waitingReceiveNum.png differ
diff --git a/pages-repair/apply/applyForm.vue b/pages-repair/apply/applyForm.vue
index a69937c..1e78684 100644
--- a/pages-repair/apply/applyForm.vue
+++ b/pages-repair/apply/applyForm.vue
@@ -217,24 +217,49 @@ export default {
no:orderNo,
ticketId:this.ticketId,
type:"01",
- repairId:this.userInfo.nickname,
- repairName:this.userInfo.id,
+ repairId:this.userInfo.id,
+ repairName:this.userInfo.nickname,
+ }
+ if(this.selectedRepairList.length>0){
+ let itemList = []
+ this.selectedRepairList.map((item)=>{
+ itemList.push({
+ waresId:item.id,
+ waresName:item.name,
+ waresCount:item.num,
+ //未领料
+ waresStatus:"02"
+ })
+ })
+ dataObj.items = itemList
+ }else{
+ uni.showToast({
+ title: '请选择配件!',
+ icon: 'none'
+ })
+ return
}
request({
- url: '/admin-api/repair/tw/getAllTypeList',
- method: 'get'
+ url: '/admin-api/repair/tw/newApplyOrder',
+ method: 'POST',
+ data:dataObj
}).then((res) => {
console.log(res)
- if (res.code == 200 && res.data.length>0) {
- res.data.map((item)=>{
- this.tabs.push({
- name:item.name,
- value:item.id
- })
+ if (res.code == 200) {
+ uni.showToast({
+ title: '提交成功!',
+ icon: 'none'
+ })
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 700)
+ }else{
+ uni.showToast({
+ title: '提交失败!',
+ icon: 'none'
})
}
})
- console.log('this.selectedRepairList', this.selectedRepairList)
},
/**
* 切换tab选中
diff --git a/pages-repair/applyList/applyList-back.vue b/pages-repair/applyList/applyList-back.vue
new file mode 100644
index 0000000..9c04fea
--- /dev/null
+++ b/pages-repair/applyList/applyList-back.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-repair/applyList/applyList.vue b/pages-repair/applyList/applyList.vue
index 9c04fea..ca4059f 100644
--- a/pages-repair/applyList/applyList.vue
+++ b/pages-repair/applyList/applyList.vue
@@ -77,6 +77,9 @@
],
};
},
+ onLoad(){
+
+ },
methods:{
changeTabFun(id) {
this.activeKey = id