You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

295 lines
8.5 KiB
Vue

<!-- 扫描rfid,选择缓存区根据选择的缓存区查询库位勾选是否取走托盘提交托盘变更信息 -->
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
2 years ago
<u-icon class="icon" name="arrow-left" @click="goback()" />
</view>
2 years ago
<view class="title">维修</view>
<view class="right"></view>
</view>
2 years ago
<u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index">
<div class="list-top">
<div class="name">工单号: {{ item.workCode }}</div>
2 years ago
<div class="tag">{{ item.workStatus == 0 ? '待维修' : item.workStatus == 1 ? '维修完成' : item.workStatus == 2 ? '维修中' : '维修未完成' }}</div>
2 years ago
<u-icon @click="linkdetails(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
</div>
<div class="item1">设备编码: {{ item.equipmentCode }}</div>
<div class="item1">维修负责人: {{ item.workPerson }}</div>
<div class="item1">故障描述: {{ item.workFaultDesc }}</div>
<div class="item1">维修人员: {{ item.workPerson }}</div>
2 years ago
<div class="item1">维修组: {{ item.teamName }}</div>
<div class="item1">维修组人员: {{ item.teamPerson }}</div>
<div class="item1">是否立即维修: {{ item.workDownMachine == 1 ? '是' : '否' }}</div>
2 years ago
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<div class="list-top">
<div class="name">工单号: {{ item.workCode }}</div>
2 years ago
<div class="tag">{{ item.workStatus == 0 ? '待维修' : item.workStatus == 1 ? '维修完成' : item.workStatus == 2 ? '维修中' : '维修未完成' }}</div>
<u-icon @click="linkdetailscheck(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
2 years ago
</div>
<div class="item1">设备编码: {{ item.equipmentCode }}</div>
<div class="item1">维修负责人: {{ item.workPerson }}</div>
<div class="item1">故障描述: {{ item.workFaultDesc }}</div>
<div class="item1">维修人员: {{ item.workPerson }}</div>
2 years ago
<div class="item1">维修组: {{ item.teamName }}</div>
<div class="item1">维修组人员: {{ item.teamPerson }}</div>
<div class="item1">是否立即维修: {{ item.workDownMachine == 1 ? '是' : '否' }}</div>
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
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';
2 years ago
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
chooseOne,
jPicker,
},
})
export default class ChangePalletNew extends BasePage {
model = model;
2 years ago
list: any = [
{
2 years ago
cate_name: '待处理',
2 years ago
},
{
2 years ago
cate_name: '维修记录',
2 years ago
},
];
current: any = 0;
moren = '选择缓存区';
shouciFocus = true;
zaiciFocus = false;
2 years ago
ischecked = false;
switchListText = [
{
title: '是',
value: 0,
},
{
title: '否',
value: 1,
},
];
2 years ago
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
2 years ago
detailsdataceshi: any = [
{
2 years ago
itemq: '维修任务1',
item2: '已维修',
2 years ago
item3: '2023-08-01 - 2023-08-31',
2 years ago
item4: '每月维修',
2 years ago
item5: 'XXXXX',
item6: '未发现异常',
},
{
2 years ago
itemq: '维修任务1',
item2: '已维修',
2 years ago
item3: '2023-08-01 - 2023-08-31',
2 years ago
item4: '每月维修',
2 years ago
item5: 'XXXXX',
item6: '未发现异常',
},
];
userinfo: any = null;
2 years ago
Sparepartlist: any = [];
// remove: any = {};
async onReady() {
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
2 years ago
async onLoad() {
console.log(uni.getStorageSync('userinfo'));
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
let query = {
userId: this.userinfo.userId,
workStatus: '0',
workOutsource: '0',
};
await this.model.getTodayTask(query);
2 years ago
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
}
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
2 years ago
//
async change(index) {
this.current = index;
if (index == 0) {
if (this.userinfo) {
let query = {
userId: this.userinfo.userId,
workStatus: '0',
workOutsource: '0',
};
await this.model.getTodayTask(query);
2 years ago
this.listdata = model.orderNoItemList;
}
} else {
2 years ago
if (this.userinfo) {
let query = {
userId: this.userinfo.userId,
2 years ago
workStatus: '0',
workOutsource: '0',
};
await this.model.getTaskRecord(query);
2 years ago
this.detailsdata = model.getTaskRecordList;
}
}
}
2 years ago
linkdetails(item) {
2 years ago
this.model.rowdatanull();
// this.model.rowdata = []
// item.workStatus == 0 ? '待维修' : item.workStatus == 1 ? '维修完成' : item.workStatus == 2 ? '维修中' : '维修未完成';
if (item.workStatus == 0) {
uni.navigateTo({
url: `/pages/equipment/Repair/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
} else if (item.workStatus == 2 || item.workStatus == 3) {
uni.navigateTo({
url: `/pages/equipment/Repair/repairing?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
}
goback() {
2 years ago
uni.navigateTo({
2 years ago
url: `/pages/equipment/index`,
});
}
2 years ago
linkdetailscheck(item) {
2 years ago
this.model.rowdatanull();
if (item.workStatus == 0) {
uni.navigateTo({
url: `/pages/equipment/Repair/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
} else if (item.workStatus == 2 || item.workStatus == 3) {
uni.navigateTo({
url: `/pages/equipment/Repair/repairing?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
} else {
this.ischecked = true;
item.ischecked = true;
uni.navigateTo({
url: `/pages/equipment/Repair/repairingview?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
2 years ago
.quest {
width: 367px;
border-radius: 5px;
border: rgba(121, 121, 121, 1) solid 1px;
background-color: #f2f2f2;
padding: 7px 8px 7px 12px;
box-sizing: border-box;
text-align: center;
font-size: 18px;
font-weight: 600;
color: black;
}
.list {
margin-top: 15px;
width: 367px;
border-radius: 5px;
border: rgba(121, 121, 121, 1) solid 1px;
background-color: #f2f2f2;
padding: 7px 8px 7px 8px;
box-sizing: border-box;
.list-top {
display: flex;
2 years ago
justify-content: space-between;
position: relative;
height: 24px;
align-items: center;
margin-bottom: 10px;
.name {
font-weight: 600;
font-size: 15px;
}
2 years ago
.tag {
width: 71px;
height: 24px;
border-radius: 5px;
text-align: center;
line-height: 24px;
// box-shadow: 0 1rpx 20rpx 0 #54B0D7;
border: 2px solid #54b0d7;
position: absolute;
right: 18px;
color: #54b0d7;
}
.tag1 {
border: 2px solid #83c874;
color: #83c874;
}
}
2 years ago
.item1 {
margin-bottom: 10px;
white-space: 1px;
}
}
::v-deep .yjy-switch-container .yjy-switch-item {
width: 100%;
}
::v-deep .yjy-switch-container {
width: 50%;
}
}
</style>