|
|
|
@ -12,13 +12,13 @@
|
|
|
|
|
<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> -->
|
|
|
|
|
<uni-icons type="scan" size="22" @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)">
|
|
|
|
|
<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>
|
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
|
<u-icon @click="linkdetails(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
|
|
|
|
|
<u-icon @click="linkdetails(item, isorderNo)" name="arrow-right" color="#2979ff" size="28"></u-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item1" style="color: red">设备编码:{{ item.equipmentCode }}</div>
|
|
|
|
|
<div class="item1" style="color: red">设备名称:{{ item.equipmentName }}</div>
|
|
|
|
@ -28,11 +28,11 @@
|
|
|
|
|
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index" @click="linkdetailscheck(item)">
|
|
|
|
|
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index" @click="linkdetailscheck(item, isorderNo)">
|
|
|
|
|
<div class="list-top">
|
|
|
|
|
<div class="name">工单号: {{ item.orderCode }}</div>
|
|
|
|
|
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
|
|
|
|
|
<u-icon @click="linkdetailscheck(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
|
|
|
|
|
<u-icon @click="linkdetailscheck(item, isorderNo)" name="arrow-right" color="#2979ff" size="28"></u-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item1" style="color: red">设备编码:{{ item.equipmentCode }}</div>
|
|
|
|
|
<div class="item1" style="color: red">设备名称:{{ item.equipmentName }}</div>
|
|
|
|
@ -51,6 +51,7 @@ import model from './model';
|
|
|
|
|
import chooseOne from '@/components/choose-one/choose-one.vue';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import model1 from '../../equipment/Repairbx/model';
|
|
|
|
|
const mpaasScanModule: any = uni.requireNativePlugin('Mpaas-Scan-Module');
|
|
|
|
|
// import { session } from '@/store/modules/session';
|
|
|
|
|
//import store from '@/store';
|
|
|
|
|
@Component({
|
|
|
|
@ -109,6 +110,7 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
userinfo: any = null;
|
|
|
|
|
isorderNo: any = null;
|
|
|
|
|
// remove: any = {};
|
|
|
|
|
async onShow() {
|
|
|
|
|
console.log(uni.getStorageSync('userinfo'));
|
|
|
|
@ -123,18 +125,47 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
//await this.model.getpalletLocation();
|
|
|
|
|
//this.remove = this.model.WlList[0];
|
|
|
|
|
}
|
|
|
|
|
// 扫码
|
|
|
|
|
scanCodeOne() {
|
|
|
|
|
// http://lj08.cn/21201501124240221021300171390045
|
|
|
|
|
mpaasScanModule.mpaasScan(
|
|
|
|
|
{
|
|
|
|
|
// 扫码识别类型,参数可多选,qrCode、barCode,
|
|
|
|
|
// 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
|
|
|
|
|
scanType: ['qrCode', 'barCode'],
|
|
|
|
|
// 是否隐藏相册,默认false不隐藏
|
|
|
|
|
hideAlbum: false,
|
|
|
|
|
},
|
|
|
|
|
(ret) => {
|
|
|
|
|
// uni.showModal({
|
|
|
|
|
// title: '扫码结果',
|
|
|
|
|
// // 返回值中,有三个参数 resp_code、resp_message、resp_result
|
|
|
|
|
// // resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
|
|
|
|
// // resp_message 表示返回结果信息
|
|
|
|
|
// // resp_result 表示扫码结果,只有成功才会有返回
|
|
|
|
|
// content: JSON.stringify(ret),
|
|
|
|
|
// showCancel: false,
|
|
|
|
|
// confirmText: '确定',
|
|
|
|
|
// });
|
|
|
|
|
if (ret.resp_message == 'success') {
|
|
|
|
|
this.orderNo = ret.resp_result;
|
|
|
|
|
this.search(this.orderNo);
|
|
|
|
|
} else {
|
|
|
|
|
this.customToast(ret.resp_result);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
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: '当前设备无点检任务',
|
|
|
|
@ -202,7 +233,9 @@ export default class ChangePalletNew extends BasePage {
|
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
|
|
|
|
.single-left {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
.header {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0rpx;
|
|
|
|
|