|
|
|
@ -9,11 +9,20 @@
|
|
|
|
|
<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>
|
|
|
|
|
<div class="singlebox">
|
|
|
|
|
<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="single-left" style="background-color: #ffffff; margin-top: 10px; display: flex; align-items: center">
|
|
|
|
|
<view style="margin-right: 10px">日期:</view>
|
|
|
|
|
<!-- <u-search style="" placeholder="请选择" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search> -->
|
|
|
|
|
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" :clearable="false" />
|
|
|
|
|
<u-icon name="close-circle-fill" @click="clear" color="rgb(96, 98, 102)" size="28"></u-icon>
|
|
|
|
|
<!-- close-circle -->
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index" @click="linkdetails(item, isorderNo)">
|
|
|
|
|
<div class="list-top">
|
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
@ -56,6 +65,7 @@
|
|
|
|
|
<div class="item1">是否停机保养: {{ item.delFlag == 1 ? '是' : '否' }}</div>
|
|
|
|
|
</view>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
<u-calendar v-model="iscalendar" :mode="mode" @change="changetime"></u-calendar>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
@ -64,6 +74,7 @@ import { BasePage } from '@/components/base/page';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import chooseOne from '@/components/choose-one/choose-one.vue';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
// import { session } from '@/store/modules/session';
|
|
|
|
|
//import store from '@/store';
|
|
|
|
|
@Component({
|
|
|
|
@ -120,27 +131,61 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
item6: '未发现异常',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
createTime: any = null;
|
|
|
|
|
iscalendar = false;
|
|
|
|
|
userinfo: any = null;
|
|
|
|
|
Sparepartlist: any = [];
|
|
|
|
|
// remove: any = {};
|
|
|
|
|
async onReady() {
|
|
|
|
|
this.createTime = moment().format('YYYY-MM-DD');
|
|
|
|
|
//await this.model.getpalletLocation();
|
|
|
|
|
//this.remove = this.model.WlList[0];
|
|
|
|
|
}
|
|
|
|
|
async onShow() {
|
|
|
|
|
console.log(uni.getStorageSync('userinfo'));
|
|
|
|
|
this.createTime = moment().format('YYYY-MM-DD');
|
|
|
|
|
this.userinfo = uni.getStorageSync('userinfo');
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
// let query = {
|
|
|
|
|
// userId: this.userinfo.userId,
|
|
|
|
|
// workStatus: '0',
|
|
|
|
|
// workOutsource: '0',
|
|
|
|
|
// };
|
|
|
|
|
await this.model.getTodayTask(this.userinfo.userName);
|
|
|
|
|
let query = {
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
createTime: this.createTime,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
|
console.log(model.orderNoItemList);
|
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
clear() {
|
|
|
|
|
this.createTime = null;
|
|
|
|
|
}
|
|
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
let query = {
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
createTime: this.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));
|
|
|
|
|
}
|
|
|
|
|
async onLoad() {
|
|
|
|
|
// console.log(uni.getStorageSync('userinfo'));
|
|
|
|
|
}
|
|
|
|
@ -156,22 +201,20 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
this.current = index;
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
// let query = {
|
|
|
|
|
// userId: this.userinfo.userId,
|
|
|
|
|
// workStatus: '0',
|
|
|
|
|
// workOutsource: '0',
|
|
|
|
|
// };
|
|
|
|
|
await this.model.getTodayTask(this.userinfo.userName);
|
|
|
|
|
let query = {
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
createTime: this.createTime,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getTodayTask(query);
|
|
|
|
|
this.listdata = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this.userinfo) {
|
|
|
|
|
// let query = {
|
|
|
|
|
// userId: this.userinfo.userId,
|
|
|
|
|
// workStatus: '0',
|
|
|
|
|
// workOutsource: '0',
|
|
|
|
|
// };
|
|
|
|
|
await this.model.getTaskRecord(this.userinfo.userName);
|
|
|
|
|
let query = {
|
|
|
|
|
userId: this.userinfo.userName,
|
|
|
|
|
createTime: this.createTime,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getTaskRecord(query);
|
|
|
|
|
this.detailsdata = model.getTaskRecordList;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -258,7 +301,19 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
|
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 {
|
|
|
|
|
display: flex;
|
|
|
|
|
.Scan {
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.header {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0rpx;
|
|
|
|
|