|
@@ -13,7 +13,7 @@
|
|
|
:key="index">
|
|
:key="index">
|
|
|
<view @click="handleTabChange(item)" class="badge-c">
|
|
<view @click="handleTabChange(item)" class="badge-c">
|
|
|
{{item.name}}
|
|
{{item.name}}
|
|
|
- <u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
|
|
|
|
|
|
|
+ <u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -27,7 +27,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view v-if="activeType == 'quality'">
|
|
<view v-if="activeType == 'quality'">
|
|
|
- <InspectionWorkList pageName="myList" :way="orderType == 1 ? 'todo' : 'done'" ref="inspectionWorkListRef"></InspectionWorkList>
|
|
|
|
|
|
|
+ <InspectionWorkList pageName="myList" :way="orderType == 1 ? 'todo' : 'done'" ref="inspectionWorkListRef">
|
|
|
|
|
+ </InspectionWorkList>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view v-else class="work-list">
|
|
<view v-else class="work-list">
|
|
@@ -54,8 +55,8 @@
|
|
|
<template v-slot:list>
|
|
<template v-slot:list>
|
|
|
<view class="search_list">
|
|
<view class="search_list">
|
|
|
<u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
|
|
<u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
|
|
|
- <u-form-item v-if="orderType == 1 && statusRange[activeType].length > 0" label="类型:" class="required-form" borderBottom
|
|
|
|
|
- prop="assetType">
|
|
|
|
|
|
|
+ <u-form-item v-if="orderType == 1 && statusRange[activeType].length > 0" label="类型:"
|
|
|
|
|
+ class="required-form" borderBottom prop="assetType">
|
|
|
<u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30"
|
|
<u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30"
|
|
|
@change="statusChange">
|
|
@change="statusChange">
|
|
|
<u-checkbox v-for="(item, index) in statusRange[activeType]"
|
|
<u-checkbox v-for="(item, index) in statusRange[activeType]"
|
|
@@ -81,13 +82,14 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-
|
|
|
|
|
import {
|
|
import {
|
|
|
getByCode
|
|
getByCode
|
|
|
} from '@/api/pda/common.js'
|
|
} from '@/api/pda/common.js'
|
|
|
|
|
|
|
|
- import { workorderMyPage } from '@/api/pda/workOrder'
|
|
|
|
|
-
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ workorderMyPage
|
|
|
|
|
+ } from '@/api/pda/workOrder'
|
|
|
|
|
+
|
|
|
import SearchPopup from '@/pages/pda/components/searchPopup.vue'
|
|
import SearchPopup from '@/pages/pda/components/searchPopup.vue'
|
|
|
import {
|
|
import {
|
|
|
getWorkOrderList,
|
|
getWorkOrderList,
|
|
@@ -118,9 +120,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- clientEnvironmentId:
|
|
|
|
|
- uni.getStorageSync("userInfo") &&
|
|
|
|
|
- uni.getStorageSync("userInfo").clientEnvironmentId,
|
|
|
|
|
|
|
+ clientEnvironmentId: uni.getStorageSync("userInfo") &&uni.getStorageSync("userInfo").clientEnvironmentId,
|
|
|
groupId: null,
|
|
groupId: null,
|
|
|
formData: {},
|
|
formData: {},
|
|
|
orderTitle: '',
|
|
orderTitle: '',
|
|
@@ -168,6 +168,16 @@
|
|
|
value: 0
|
|
value: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '检修',
|
|
|
|
|
+ type: 'service',
|
|
|
|
|
+ workOrderType: 7,
|
|
|
|
|
+ index: 1,
|
|
|
|
|
+ url: `/pages/maintenance/detail/detail?`,
|
|
|
|
|
+ badge: {
|
|
|
|
|
+ value: 0
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// {
|
|
// {
|
|
|
// name: '量具送检工单',
|
|
// name: '量具送检工单',
|
|
|
// type: 'quantity',
|
|
// type: 'quantity',
|
|
@@ -288,6 +298,19 @@
|
|
|
// text: '完成'
|
|
// text: '完成'
|
|
|
// }
|
|
// }
|
|
|
],
|
|
],
|
|
|
|
|
+ service: [{
|
|
|
|
|
+ value: 0,
|
|
|
|
|
+ text: '待接收'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 2,
|
|
|
|
|
+ text: '执行中'
|
|
|
|
|
+ }
|
|
|
|
|
+ // {
|
|
|
|
|
+ // value: 3,
|
|
|
|
|
+ // text: '完成'
|
|
|
|
|
+ // }
|
|
|
|
|
+ ],
|
|
|
patrol: [{
|
|
patrol: [{
|
|
|
value: 0,
|
|
value: 0,
|
|
|
text: '待接收'
|
|
text: '待接收'
|
|
@@ -301,6 +324,7 @@
|
|
|
// text: '完成'
|
|
// text: '完成'
|
|
|
// }
|
|
// }
|
|
|
],
|
|
],
|
|
|
|
|
+
|
|
|
quantity: [{
|
|
quantity: [{
|
|
|
value: 0,
|
|
value: 0,
|
|
|
text: '待接收'
|
|
text: '待接收'
|
|
@@ -354,6 +378,7 @@
|
|
|
quality: [],
|
|
quality: [],
|
|
|
stocktaking: [],
|
|
stocktaking: [],
|
|
|
production: [],
|
|
production: [],
|
|
|
|
|
+ service: [],
|
|
|
},
|
|
},
|
|
|
searchFrom: {
|
|
searchFrom: {
|
|
|
code: '',
|
|
code: '',
|
|
@@ -363,11 +388,22 @@
|
|
|
isInstall: true, // 是否首次进入页面
|
|
isInstall: true, // 是否首次进入页面
|
|
|
orderType: 1,
|
|
orderType: 1,
|
|
|
codeData: [],
|
|
codeData: [],
|
|
|
- groupTabs: [
|
|
|
|
|
- { label: '全部', groupId: null },
|
|
|
|
|
- { label: '5号站', groupId: '2008729845612720129' },
|
|
|
|
|
- { label: '6号站', groupId: '2008729929536548865' },
|
|
|
|
|
- { label: '7号站', groupId: '2008730320160468994' }
|
|
|
|
|
|
|
+ groupTabs: [{
|
|
|
|
|
+ label: '全部',
|
|
|
|
|
+ groupId: null
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '5号站',
|
|
|
|
|
+ groupId: '2008729845612720129'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '6号站',
|
|
|
|
|
+ groupId: '2008729929536548865'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '7号站',
|
|
|
|
|
+ groupId: '2008730320160468994'
|
|
|
|
|
+ }
|
|
|
],
|
|
],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -513,9 +549,9 @@
|
|
|
handleDetail(item) {
|
|
handleDetail(item) {
|
|
|
let url = this.tabList[this.activeIndex]?.url
|
|
let url = this.tabList[this.activeIndex]?.url
|
|
|
if (!url) return
|
|
if (!url) return
|
|
|
- if(this.activeType == 'stocktaking') {
|
|
|
|
|
|
|
+ if (this.activeType == 'stocktaking') {
|
|
|
url += `id=${item.id}&status=${item.status}`
|
|
url += `id=${item.id}&status=${item.status}`
|
|
|
- } else if(this.activeType == 'production') {
|
|
|
|
|
|
|
+ } else if (this.activeType == 'production') {
|
|
|
url += `id=${item.id}&title=${item.taskName}&singleReport=${item.singleReport}`
|
|
url += `id=${item.id}&title=${item.taskName}&singleReport=${item.singleReport}`
|
|
|
} else {
|
|
} else {
|
|
|
// url += `id=${item.id}&workOrderCode=${item.workOrderCode}&BizType=${item.bizType}`
|
|
// url += `id=${item.id}&workOrderCode=${item.workOrderCode}&BizType=${item.bizType}`
|
|
@@ -540,7 +576,7 @@
|
|
|
this.page = 1
|
|
this.page = 1
|
|
|
this.reset()
|
|
this.reset()
|
|
|
this.searchShow = false
|
|
this.searchShow = false
|
|
|
- if(this.activeType == 'quality'){
|
|
|
|
|
|
|
+ if (this.activeType == 'quality') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inspectionWorkListRef.getList()
|
|
this.$refs.inspectionWorkListRef.getList()
|
|
|
})
|
|
})
|
|
@@ -573,6 +609,10 @@
|
|
|
case 'check':
|
|
case 'check':
|
|
|
badgeValue = data.checkNum
|
|
badgeValue = data.checkNum
|
|
|
break
|
|
break
|
|
|
|
|
+ case 'service':
|
|
|
|
|
+ badgeValue = data.serviceNum
|
|
|
|
|
+ break
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
@@ -601,7 +641,7 @@
|
|
|
// })
|
|
// })
|
|
|
},
|
|
},
|
|
|
getList() {
|
|
getList() {
|
|
|
- if(this.activeType == 'quality'){
|
|
|
|
|
|
|
+ if (this.activeType == 'quality') {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
@@ -613,35 +653,35 @@
|
|
|
|
|
|
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
|
|
|
- if(this.activeType == 'production'){
|
|
|
|
|
|
|
+ if (this.activeType == 'production') {
|
|
|
let statusList = []
|
|
let statusList = []
|
|
|
- if(this.orderType == 1){
|
|
|
|
|
|
|
+ if (this.orderType == 1) {
|
|
|
statusList = [4, 5, 7]
|
|
statusList = [4, 5, 7]
|
|
|
} else {
|
|
} else {
|
|
|
statusList = [6, 10]
|
|
statusList = [6, 10]
|
|
|
}
|
|
}
|
|
|
workorderMyPage({
|
|
workorderMyPage({
|
|
|
- pageNum: this.page,
|
|
|
|
|
- size: 10,
|
|
|
|
|
- ...this.searchFrom,
|
|
|
|
|
- statusList: statusList,
|
|
|
|
|
- workCenterIds: userInfo.workCenterIds
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- console.log('workorderMyPage~~~', res)
|
|
|
|
|
-
|
|
|
|
|
- if (res.list?.length > 0) {
|
|
|
|
|
- this.dataList = this.dataList.concat(res.list)
|
|
|
|
|
- isEnd = this.dataList.length >= res.count
|
|
|
|
|
- } else {
|
|
|
|
|
- this.dataList = []
|
|
|
|
|
- }
|
|
|
|
|
- console.log(this.dataList)
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- } else if(this.activeType == 'stocktaking'){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ pageNum: this.page,
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ ...this.searchFrom,
|
|
|
|
|
+ statusList: statusList,
|
|
|
|
|
+ workCenterIds: userInfo.workCenterIds
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ console.log('workorderMyPage~~~', res)
|
|
|
|
|
+
|
|
|
|
|
+ if (res.list?.length > 0) {
|
|
|
|
|
+ this.dataList = this.dataList.concat(res.list)
|
|
|
|
|
+ isEnd = this.dataList.length >= res.count
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.dataList = []
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.dataList)
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ } else if (this.activeType == 'stocktaking') {
|
|
|
|
|
+
|
|
|
getPlanOrderList({
|
|
getPlanOrderList({
|
|
|
pageNum: this.page,
|
|
pageNum: this.page,
|
|
|
size: 10,
|
|
size: 10,
|
|
@@ -669,50 +709,50 @@
|
|
|
size: 10,
|
|
size: 10,
|
|
|
...this.searchFrom,
|
|
...this.searchFrom,
|
|
|
}
|
|
}
|
|
|
- // 维修
|
|
|
|
|
- if (this.tabList[this.activeIndex].workOrderType == 3) {
|
|
|
|
|
- // let userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
- // params.executeUserId = userInfo.userId
|
|
|
|
|
- if (this.orderType == 1) {
|
|
|
|
|
- if (!params.orderStatus.includes(3)) {
|
|
|
|
|
- // params.orderStatus.push(3)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if (this.orderType == 1) {
|
|
|
|
|
- if (params.orderStatus.includes(3)) {
|
|
|
|
|
- let index = params.orderStatus.indexOf(3)
|
|
|
|
|
- params.orderStatus.splice(index, 1)
|
|
|
|
|
|
|
+ // 维修
|
|
|
|
|
+ if (this.tabList[this.activeIndex].workOrderType == 3) {
|
|
|
|
|
+ // let userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
+ // params.executeUserId = userInfo.userId
|
|
|
|
|
+ if (this.orderType == 1) {
|
|
|
|
|
+ if (!params.orderStatus.includes(3)) {
|
|
|
|
|
+ // params.orderStatus.push(3)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- params.orderStatus = [3]
|
|
|
|
|
|
|
+ if (this.orderType == 1) {
|
|
|
|
|
+ if (params.orderStatus.includes(3)) {
|
|
|
|
|
+ let index = params.orderStatus.indexOf(3)
|
|
|
|
|
+ params.orderStatus.splice(index, 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.orderStatus = [3]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(this.activeType == 'patrol' && this.groupId) {
|
|
|
|
|
- params.teamId = this.groupId
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- console.log('params~~~', params);
|
|
|
|
|
- getWorkOrderList(params)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.list?.length > 0 && params.type === this.tabList[this.activeIndex].workOrderType) {
|
|
|
|
|
- // if (params.page === 1) {
|
|
|
|
|
- // this.dataList = []
|
|
|
|
|
- // }
|
|
|
|
|
- // this.dataList.push(...res.data.list.records)
|
|
|
|
|
- this.dataList = this.dataList.concat(res.list)
|
|
|
|
|
- isEnd = this.dataList.length >= res.count
|
|
|
|
|
- } else {
|
|
|
|
|
- this.dataList = []
|
|
|
|
|
- }
|
|
|
|
|
- console.log(this.dataList)
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if ((this.activeType == 'patrol' || this.activeType == 'service') && this.groupId) {
|
|
|
|
|
+ params.teamId = this.groupId
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log('params~~~', params);
|
|
|
|
|
+ getWorkOrderList(params)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.list?.length > 0 && params.type === this.tabList[this.activeIndex].workOrderType) {
|
|
|
|
|
+ // if (params.page === 1) {
|
|
|
|
|
+ // this.dataList = []
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.dataList.push(...res.data.list.records)
|
|
|
|
|
+ this.dataList = this.dataList.concat(res.list)
|
|
|
|
|
+ isEnd = this.dataList.length >= res.count
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.dataList = []
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.dataList)
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|