|
|
|
@ -6,15 +6,24 @@
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="goback()" />
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="goback()" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="title">巡检</view>
|
|
|
|
<view class="title">巡检</view>
|
|
|
|
<view class="right"></view>
|
|
|
|
<view class="right">
|
|
|
|
|
|
|
|
<!-- <u-icon name="setting-fill"> </u-icon> -->
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
|
|
|
|
<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">
|
|
|
|
<div class="singlebox">
|
|
|
|
<!-- <view>扫描设备码:</view> -->
|
|
|
|
<view class="single-left" style="background-color: #ffffff">
|
|
|
|
<u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
|
|
|
|
<!-- <view>扫描设备码:</view> -->
|
|
|
|
<uni-icons type="scan" size="22" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons>
|
|
|
|
<u-search style="" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
|
|
|
|
</view>
|
|
|
|
<uni-icons class="Scan" type="scan" size="22" @click="scanCodeOne" style="color: black; background-color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons>
|
|
|
|
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index" @click="linkdetails(item, isorderNo)">
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- <view class="single-left" style="background-color: #ffffff; margin-top: 10px; display: flex; align-items: center">
|
|
|
|
|
|
|
|
<view style="margin-right: 10px">日期:</view>
|
|
|
|
|
|
|
|
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" />
|
|
|
|
|
|
|
|
<u-icon name="close-circle-fill" @click="clear" color="rgb(96, 98, 102)" size="28"></u-icon>
|
|
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index + 'a'" @click="linkdetails(item, isorderNo)">
|
|
|
|
<div class="list-top">
|
|
|
|
<div class="list-top">
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
@ -28,7 +37,7 @@
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index" @click="linkdetailscheck(item, isorderNo)">
|
|
|
|
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index + 'b'" @click="linkdetailscheck(item, isorderNo)">
|
|
|
|
<div class="list-top">
|
|
|
|
<div class="list-top">
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
@ -42,6 +51,8 @@
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
|
|
|
<Attrssetup sureColor="#ff0000" ref="attrssetup1" showKey="label" valKey="value" />
|
|
|
|
|
|
|
|
<u-calendar v-model="iscalendar" :mode="mode" @change="changetime"></u-calendar>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
<script lang="ts">
|
|
|
|
@ -52,12 +63,15 @@ import chooseOne from '@/components/choose-one/choose-one.vue';
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
import model1 from '../../equipment/Repairbx/model';
|
|
|
|
import model1 from '../../equipment/Repairbx/model';
|
|
|
|
const mpaasScanModule: any = uni.requireNativePlugin('Mpaas-Scan-Module');
|
|
|
|
const mpaasScanModule: any = uni.requireNativePlugin('Mpaas-Scan-Module');
|
|
|
|
|
|
|
|
import Attrssetup from '@/components/attrs-setup/attrs-setup.vue';
|
|
|
|
|
|
|
|
import moment from 'moment';
|
|
|
|
// import { session } from '@/store/modules/session';
|
|
|
|
// import { session } from '@/store/modules/session';
|
|
|
|
//import store from '@/store';
|
|
|
|
//import store from '@/store';
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
chooseOne,
|
|
|
|
chooseOne,
|
|
|
|
jPicker,
|
|
|
|
jPicker,
|
|
|
|
|
|
|
|
Attrssetup,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
export default class ChangePalletNew extends BasePage {
|
|
|
|
export default class ChangePalletNew extends BasePage {
|
|
|
|
@ -76,6 +90,10 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
shouciFocus = true;
|
|
|
|
shouciFocus = true;
|
|
|
|
zaiciFocus = false;
|
|
|
|
zaiciFocus = false;
|
|
|
|
ischecked = false;
|
|
|
|
ischecked = false;
|
|
|
|
|
|
|
|
isattrssetup = false;
|
|
|
|
|
|
|
|
iscalendar = false;
|
|
|
|
|
|
|
|
mode = 'date';
|
|
|
|
|
|
|
|
createTime: any = null;
|
|
|
|
switchListText = [
|
|
|
|
switchListText = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '是',
|
|
|
|
title: '是',
|
|
|
|
@ -91,6 +109,7 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
orderNoItemList: any = {};
|
|
|
|
orderNoItemList: any = {};
|
|
|
|
productCodeList: any = {};
|
|
|
|
productCodeList: any = {};
|
|
|
|
productCodelocList: any = {};
|
|
|
|
productCodelocList: any = {};
|
|
|
|
|
|
|
|
|
|
|
|
detailsdataceshi: any = [
|
|
|
|
detailsdataceshi: any = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
itemq: '巡检任务1',
|
|
|
|
itemq: '巡检任务1',
|
|
|
|
@ -113,15 +132,21 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
isorderNo: any = null;
|
|
|
|
isorderNo: any = null;
|
|
|
|
// remove: any = {};
|
|
|
|
// remove: any = {};
|
|
|
|
async onShow() {
|
|
|
|
async onShow() {
|
|
|
|
|
|
|
|
this.createTime = moment().format('YYYY-MM-DD');
|
|
|
|
console.log(uni.getStorageSync('userinfo'));
|
|
|
|
console.log(uni.getStorageSync('userinfo'));
|
|
|
|
this.userinfo = uni.getStorageSync('userinfo');
|
|
|
|
this.userinfo = uni.getStorageSync('userinfo');
|
|
|
|
if (this.userinfo) {
|
|
|
|
if (this.userinfo) {
|
|
|
|
await this.model.getTodayTask(this.userinfo.userName);
|
|
|
|
let query = {
|
|
|
|
console.log(model.orderNoItemList);
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
|
|
|
// createTime: this.createTime,
|
|
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async onReady() {
|
|
|
|
async onReady() {
|
|
|
|
|
|
|
|
this.createTime = moment().format('YYYY-MM-DD');
|
|
|
|
//await this.model.getpalletLocation();
|
|
|
|
//await this.model.getpalletLocation();
|
|
|
|
//this.remove = this.model.WlList[0];
|
|
|
|
//this.remove = this.model.WlList[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -156,6 +181,9 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
clear() {
|
|
|
|
|
|
|
|
this.createTime = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
async onLoad() {
|
|
|
|
async onLoad() {
|
|
|
|
// console.log(uni.getStorageSync('userinfo'));
|
|
|
|
// console.log(uni.getStorageSync('userinfo'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -181,6 +209,36 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onfocus() {
|
|
|
|
|
|
|
|
this.iscalendar = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async changetime(e) {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
this.createTime = e.result;
|
|
|
|
|
|
|
|
if (this.current == 0) {
|
|
|
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
|
|
|
// createTime: this.createTime,
|
|
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
|
|
|
// createTime: this.createTime,
|
|
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.model.getTaskRecord(query);
|
|
|
|
|
|
|
|
this.detailsdata = model.getTaskRecordList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// this.tagslist = JSON.parse(JSON.stringify(item.babtype));
|
|
|
|
|
|
|
|
// this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
|
|
|
|
|
|
|
|
}
|
|
|
|
// selectItem(e: any) {
|
|
|
|
// selectItem(e: any) {
|
|
|
|
// this.remove = e.pickerName;
|
|
|
|
// this.remove = e.pickerName;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
@ -192,12 +250,22 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
this.current = index;
|
|
|
|
this.current = index;
|
|
|
|
if (index == 0) {
|
|
|
|
if (index == 0) {
|
|
|
|
if (this.userinfo) {
|
|
|
|
if (this.userinfo) {
|
|
|
|
await this.model.getTodayTask(this.userinfo.userName);
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
|
|
|
// createTime: this.createTime,
|
|
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (this.userinfo) {
|
|
|
|
if (this.userinfo) {
|
|
|
|
await this.model.getTaskRecord(this.userinfo.userName);
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
|
|
|
// createTime: this.createTime,
|
|
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.model.getTaskRecord(query);
|
|
|
|
this.detailsdata = model.getTaskRecordList;
|
|
|
|
this.detailsdata = model.getTaskRecordList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -233,8 +301,18 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
min-height: 100%;
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
|
|
.singlebox {
|
|
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
|
|
box-shadow: 0 0 10px 0 rgba(128, 128, 128, 0.2);
|
|
|
|
|
|
|
|
}
|
|
|
|
.single-left {
|
|
|
|
.single-left {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.Scan {
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.header {
|
|
|
|
.header {
|
|
|
|
position: fixed;
|
|
|
|
position: fixed;
|
|
|
|
|