|
|
|
@ -9,6 +9,11 @@
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
|
|
|
|
|
<view class="single-left" style="background-color: #ffffff; margin-top: 10px">
|
|
|
|
|
<!-- <view>扫描设备码:</view> -->
|
|
|
|
|
<u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"></u-search>
|
|
|
|
|
<!-- <uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons> -->
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index" @click="linkdetails(item)">
|
|
|
|
|
<div class="list-top">
|
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
@ -36,6 +41,7 @@
|
|
|
|
|
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
|
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
|
</view>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
@ -120,6 +126,30 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
async onLoad() {
|
|
|
|
|
// console.log(uni.getStorageSync('userinfo'));
|
|
|
|
|
}
|
|
|
|
|
search(value) {
|
|
|
|
|
console.log(value);
|
|
|
|
|
let data = [];
|
|
|
|
|
if (this.current == 0) {
|
|
|
|
|
data = this.listdata.filter((v) => v.equipmentCode == value);
|
|
|
|
|
} else {
|
|
|
|
|
data = this.detailsdata.filter((v) => v.equipmentCode == value);
|
|
|
|
|
}
|
|
|
|
|
console.log(data);
|
|
|
|
|
if (data.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '当前设备无点检任务',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
data[0].orderNoinput = value;
|
|
|
|
|
if (this.current == 0) {
|
|
|
|
|
this.linkdetails(data[0], value);
|
|
|
|
|
} else {
|
|
|
|
|
this.linkdetailscheck(data[0], value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// selectItem(e: any) {
|
|
|
|
|
// this.remove = e.pickerName;
|
|
|
|
|
// }
|
|
|
|
@ -146,22 +176,22 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
url: `/pages/equipment/index`,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
linkdetails(item) {
|
|
|
|
|
linkdetails(item, value) {
|
|
|
|
|
if (this.model1.rowdata) {
|
|
|
|
|
this.model1.rowdatanull();
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
|
|
|
|
|
url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)) + '&equipmentCode=' + value,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
linkdetailscheck(item) {
|
|
|
|
|
linkdetailscheck(item, value) {
|
|
|
|
|
if (this.model1.rowdata) {
|
|
|
|
|
this.model1.rowdatanull();
|
|
|
|
|
}
|
|
|
|
|
this.ischecked = true;
|
|
|
|
|
item.ischecked = true;
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/equipment/Inspection/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)),
|
|
|
|
|
url: `/pages/equipment/Inspection/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)) + '&equipmentCode=' + value,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|