|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="tour-container">
|
|
<view class="tour-container">
|
|
|
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="量具送检工单详情" @clickLeft="back" right-icon="scan" @clickRight="HandlScanCode"></uni-nav-bar>
|
|
|
|
|
|
|
+ <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="量具送检工单详情" @clickLeft="back" @clickRight="HandlScanCode"></uni-nav-bar>
|
|
|
<view class="tour-wrapper">
|
|
<view class="tour-wrapper">
|
|
|
<view class="tour_tally-content">
|
|
<view class="tour_tally-content">
|
|
|
<KdTabs v-model="active" @change="handleTabChange" :list="['基本信息', '量具送检设备']" />
|
|
<KdTabs v-model="active" @change="handleTabChange" :list="['基本信息', '量具送检设备']" />
|
|
@@ -57,7 +57,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="kd-equipment" v-show="active === 1">
|
|
<view class="kd-equipment" v-show="active === 1">
|
|
|
<view class="kd-type-box">
|
|
<view class="kd-type-box">
|
|
|
- <text :class="{ 'type—active': typeActive === index }" v-for="(item, index) in equpStatus" :key="index" @click="typeChange(index)">{{ item.name }}</text>
|
|
|
|
|
|
|
+ <view :class="{ 'type—active': typeActive === index }" v-for="(item, index) in equpStatus" :key="index" @click="typeChange(index)">
|
|
|
|
|
+ {{ item.name }}
|
|
|
|
|
+ <text v-if="item.count > 0" class="count">{{ item.count }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="kd-list-container">
|
|
<view class="kd-list-container">
|
|
|
<u-list @scrolltolower="scrolltolower">
|
|
<u-list @scrolltolower="scrolltolower">
|
|
@@ -84,7 +87,7 @@
|
|
|
<text class="kd-label">执行结果</text>
|
|
<text class="kd-label">执行结果</text>
|
|
|
<text class="status-box text-warning" v-if="item.executeStatus === 0">待检</text>
|
|
<text class="status-box text-warning" v-if="item.executeStatus === 0">待检</text>
|
|
|
<text class="status-box text-primary" v-else-if="item.executeStatus === 1">已检</text>
|
|
<text class="status-box text-primary" v-else-if="item.executeStatus === 1">已检</text>
|
|
|
- <text class="status-box text-danger" v-else-if="item.executeStatus === 2">缺陷</text>
|
|
|
|
|
|
|
+ <text class="status-box text-danger" v-else-if="item.executeStatus === 2">异常</text>
|
|
|
<text class="status-box text-primary" v-else-if="item.executeStatus === 3">已报修</text>
|
|
<text class="status-box text-primary" v-else-if="item.executeStatus === 3">已报修</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -127,7 +130,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { getWorkOrderDetail, getDeviceList, startExecuting, signingWork } from '@/api/myTicket/index.js'
|
|
|
|
|
|
|
+ import { getWorkOrderDetail, getDeviceList, startExecuting, signingWork, devicestatistics } from '@/api/myTicket/index.js'
|
|
|
import { get, post, postJ } from '@/utils/api.js'
|
|
import { get, post, postJ } from '@/utils/api.js'
|
|
|
import Assign from '@/components/Assign.vue'
|
|
import Assign from '@/components/Assign.vue'
|
|
|
import CellInfo from '@/components/CellInfo.vue'
|
|
import CellInfo from '@/components/CellInfo.vue'
|
|
@@ -175,7 +178,7 @@
|
|
|
value: 1
|
|
value: 1
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: '缺陷',
|
|
|
|
|
|
|
+ name: '异常',
|
|
|
value: 2
|
|
value: 2
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
@@ -218,6 +221,7 @@
|
|
|
onShow() {
|
|
onShow() {
|
|
|
console.log('onShow--------')
|
|
console.log('onShow--------')
|
|
|
this.getInfo()
|
|
this.getInfo()
|
|
|
|
|
+ this.getCount()
|
|
|
if (this.chooseTab) {
|
|
if (this.chooseTab) {
|
|
|
this.active = 1
|
|
this.active = 1
|
|
|
this.typeChange(2)
|
|
this.typeChange(2)
|
|
@@ -237,6 +241,22 @@
|
|
|
uni.$off('scancodedate')
|
|
uni.$off('scancodedate')
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getCount() {
|
|
|
|
|
+ devicestatistics({ planId: this.planId }).then(data => {
|
|
|
|
|
+ this.equpStatus = this.equpStatus.map(item => {
|
|
|
|
|
+ switch (item.name) {
|
|
|
|
|
+ case '全部':
|
|
|
|
|
+ return { ...item, count: data.total }
|
|
|
|
|
+ case '待检':
|
|
|
|
|
+ return { ...item, count: data.isInspectedNum }
|
|
|
|
|
+ case '已检':
|
|
|
|
|
+ return { ...item, count: data.checkedNum }
|
|
|
|
|
+ case '异常':
|
|
|
|
|
+ return { ...item, count: data.abnormalNum }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// 扫码枪扫码
|
|
// 扫码枪扫码
|
|
|
cbScancodedate(data) {
|
|
cbScancodedate(data) {
|
|
|
this.Scancodedate(data.code)
|
|
this.Scancodedate(data.code)
|
|
@@ -672,15 +692,29 @@
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
padding: 26rpx 0;
|
|
padding: 26rpx 0;
|
|
|
|
|
|
|
|
- text {
|
|
|
|
|
|
|
+ view {
|
|
|
|
|
+ position: relative;
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
width: 120rpx;
|
|
width: 120rpx;
|
|
|
padding: 4rpx 0;
|
|
padding: 4rpx 0;
|
|
|
- color: #333;
|
|
|
|
|
- margin: 0 8rpx;
|
|
|
|
|
|
|
+ color: #747474;
|
|
|
|
|
+ margin: 0 20rpx;
|
|
|
|
|
+ background-color: rgba(215, 215, 215, 0.5);
|
|
|
|
|
|
|
|
&.type—active {
|
|
&.type—active {
|
|
|
- background-color: rgba(215, 215, 215, 1);
|
|
|
|
|
|
|
+ background-color: #1e7f35;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .count {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -9px;
|
|
|
|
|
+ right: -9px;
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ height: 18px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ background-color: red;
|
|
|
|
|
+ color: #fff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|