修改页面

master
LAPTOP-R6EHHS26\86155 2 years ago
parent 066581b489
commit 56e8fb2d29

@ -12,14 +12,14 @@
<view class="list">
<div class="item-name">
<div class="quest">巡检任务: 巡检任务1</div>
<div class="quest">工单号: {{ detailsinfolist.orderCode }}</div>
<div class="details">
<div>设备编码: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfo.itemq }}</div>
<div>设备编码: {{ detailsinfolist.equipmentCode }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfolist.equipmentName }}</div>
</div>
<div class="details">
<div>车间: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">产线: {{ detailsinfo.itemq }}</div>
<div>车间: {{ detailsinfocontent.planWorkshop }}</div>
<div style="margin-left: 42px">工作中心: {{ detailsinfocontent.workCenterName }}</div>
</div>
</div>
<view class="single-left">
@ -27,25 +27,27 @@
<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="item" v-for="(item, index) in equipmentdata" :key="index">
<div class="item1">检查项: {{ item.item3 }}</div>
<div class="item1">检查方法: {{ item.item4 }}</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="select">
<u-radio-group v-model="item.radiovalue" @change="radioGroupChange(item, item.radiovalue, index)">
<u-radio @change="radioChange" v-for="(n, index) in item.listselect" :key="index" :name="n.name" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
<view class="item" v-show="isaccord" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
</div>
</div>
</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" v-model="item.value" @blur="blur(item, item.value, index)" @change="changeinput(item, item.value, index)" @input="input(item, item.value, index)" type="text" name="" id="" />
单位:mm
<div class="item1 item2" v-if="item1.standardType == 'quantify'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" v-model="item1.detailReach" @blur="blur(item1, item1.detailReach, index, index1)" @change="changeinput(item1, item1.detailReach, index, index1)" @input="input(item1, item1.detailReach, index, index1)" type="text" name="" id="" />
单位:mm
</div>
</div>
</div>
</view>
@ -68,7 +70,7 @@
<!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft()">
<view class="photoList">
<view class="itemBox photoBox" v-for="(img, index) in imgUrlList" :key="index">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index">
<view class="closeBtn" @click="deleteImg(index)">
<image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
</view>
@ -92,6 +94,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 { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -112,66 +115,33 @@ export default class ChangePalletNew extends BasePage {
current: any = 0;
shouciFocus = true;
//
detailsinfo: any = [];
detailsinfolist: any = [];
detailsinfo: any = {};
detailsinfolist: any = {};
detailsinfocontent: any = {};
//
isshow = false;
inputmodal = false;
isvalue = false;
ischecked = false;
radiomodal = false;
//
isaccord = false;
//
equipmentdata: any = [
equipmentdata: any = [];
listselect: any = [
{
itemq: '测试设备1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
value: 55,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
type: 1,
name: '符合标准',
radiovalue: null,
},
{
type: 2,
name: '未达标',
radiovalue: null,
},
],
valuemax: 100,
valuemin: 50,
type: 0,
name: '符合标准',
radiovalue: null,
},
{
type: 1,
name: '未达标',
radiovalue: null,
},
// {
// itemq: '2',
// item2: '',
// item3: '2023-08-01 - 2023-08-31',
// item4: '',
// item5: 'XXXXX',
// item6: '',
// radiovalue: '',
// value: 10,
// imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
// imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
// listselect: [
// {
// name: '',
// },
// {
// name: '',
// },
// ],
// valuemax: 50,
// valuemin: 10,
// },
];
// index equipment
equipmentindex: any = '';
equipmentindex: any = [];
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
@ -181,22 +151,33 @@ export default class ChangePalletNew extends BasePage {
fileList: any = [];
filesArr: any = [];
imgList: any = [];
imgUrlList: any = [];
deleteimgUrlList: any = [];
deleteimgUrlListcope: any = [];
orderNoItemList: any = {};
picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg';
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
//
blur(item, value, index) {
blur(item, value, index, index1) {
console.log(item, value, index, index1);
this.radiomodal = false;
this.inputmodal = false;
console.log(item, value, index);
if (value > item.valuemax || value < item.valuemin) {
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2));
if (value == null) {
this.isvalue == true;
}
if (value > item.detailUpLimit || value < item.detailDownLimit) {
this.equipmentindex = [];
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
this.imgList = JSON.parse(JSON.stringify(item.picturePath));
this.imgList = this.imgList.split(',');
} else {
this.imgList = [];
}
this.inputmodal = true;
this.isshow = true;
this.form = item;
@ -213,24 +194,35 @@ export default class ChangePalletNew extends BasePage {
console.log(e, '11111');
}
// radioradio-group
radioGroupChange(item, value, index) {
console.log(item, value, index);
radioGroupChange(item, value, index, index1) {
console.log(item, value, index, index1);
this.equipmentindex = [];
this.radiomodal = false;
this.inputmodal = false;
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1));
if (value == '未达标') {
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
this.imgList = JSON.parse(JSON.stringify(item.picturePath));
this.imgList = this.imgList.split(',');
} else {
this.imgList = [];
}
if (value == 1) {
this.isshow = true;
this.radiomodal = true;
this.form = item;
}
}
onLoad(options) {
async onLoad(options) {
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
this.detailsinfolist.push(this.detailsinfo);
console.log(this.detailsinfo);
let query = {
orderCode: this.detailsinfo.orderCode,
};
await this.model.getInspectionOrderInfo(query);
this.detailsinfocontent = this.model.OrderInfList;
this.detailsinfolist = this.model.OrderInfList.equ;
}
}
created() {
@ -241,21 +233,40 @@ export default class ChangePalletNew extends BasePage {
}
//
confirm() {
console.log((this as any).uUpload, 'sssss');
console.log((this as any).uUpload, 'sssss', this.equipmentindex);
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]);
if (this.radiomodal) {
this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList;
if (this.imgList.length == 0) {
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null;
} else {
this.imgList = this.imgList.join(',');
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList;
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList);
}
} else if (this.inputmodal) {
this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList;
if (this.imgList.length == 0) {
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null;
} else {
this.imgList = this.imgList.join(',');
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList;
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList);
}
}
}
cancel() {
this.imgUrlList = this.deleteimgUrlList;
this.isshow = false;
if (this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath == null) {
this.imgList = [];
} else {
this.imgList = this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath;
this.imgList = this.imgList.split(',');
}
}
scrollLeft() {
return 222 * (this.imgList.length + 1);
}
showScreenImg(i) {
let list = this.imgUrlList;
let list = this.imgList;
uni.previewImage({
current: i,
urls: list,
@ -263,72 +274,72 @@ export default class ChangePalletNew extends BasePage {
});
}
chooseImg() {
// if(!this.materialObj){
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
// return
// }
// uni.chooseImage({
// count: 9, //9
// // sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'],
// success: (res) => {
// // uni.showLoading();
// //console.log('/////',res);
// let tempFilePaths: any = res.tempFilePaths;
// let imgUrlList: any = res.tempFilePaths;
// tempFilePaths.map((item, index) => {
// uni.uploadFile({
// url: 'http://192.168.202.20:9000/prod-api/file/upload',
// //url: '/dev-api/file/upload',
// fileType: 'image',
// filePath: item,
// header: {
// Authorization: 'Bearer ' + session.user?.access_token,
// // 'cosmo-env-sitecode': this.$store.state.siteCode
// },
// name: 'file',
// // formData: {
// // materialCode: this.materialObj.materialCode,
// // },
// success: (res) => {
// console.log(res);
// uni.hideLoading();
// if (!res.data) {
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// return;
// }
// let data = JSON.parse(res.data);
// console.log('123dddd', data);
// this.imgList = [...this.imgList, data.data.url];
// //this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
// //this.picUrls = this.imgList.join(",");
// //this.picNames = this.imgListName.join(",");
// console.log('this.imgList', this.imgList);
// uni.hideLoading();
// },
// fail: (err) => {
// console.log(err);
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// uni.hideLoading();
// },
// });
// });
// },
// });
uni.chooseImage({
count: 9, //9
// sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'],
success: (res) => {
// uni.showLoading();
//console.log('/////',res);
let tempFilePaths: any = res.tempFilePaths;
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// uni.navigateBack({});
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
tempFilePaths.map((item) => {
uni.uploadFile({
url: '/dev-api/file/upload',
//url: '/dev-api/file/upload',
fileType: 'image',
filePath: item,
header: {
Authorization: 'Bearer ' + session.user?.access_token,
// 'cosmo-env-sitecode': this.$store.state.siteCode
},
name: 'file',
// formData: {
// materialCode: this.materialObj.materialCode,
// },
success: (res) => {
uni.hideLoading();
if (!res.data) {
// this.$refs.toastRef.show({
// type:"error",
// text:res.msg
// })
return;
}
let data = JSON.parse(res.data);
this.imgList = [...this.imgList, data.data.url];
//this.imgListName = [...this.imgListName,data.fileName];
//this.picUrls = this.imgList.join(",");
//this.picNames = this.imgListName.join(",");
uni.hideLoading();
},
fail: (err) => {
console.log(err);
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
uni.hideLoading();
},
});
});
},
});
}
deleteImg(index) {
this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList));
this.imgUrlList.splice(index, 1);
this.imgList = JSON.parse(JSON.stringify(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath));
this.imgList = this.imgList.split(',');
this.imgList.splice(index, 1);
}
scanCodeOne() {
uni.scanCode({
@ -343,16 +354,39 @@ export default class ChangePalletNew extends BasePage {
}
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
this.customToast('请扫码设备编码');
return;
}
// if (this.badMeg == '') {
// this.customToast('');
// return;
if (this.isvalue) {
this.customToast('检查标准不能为空');
return;
}
// this.detailsinfocontent.equ = this.detailsinfolist;
// let query = this.detailsinfocontent;
// await this.model.updateInspectionRecord(query);
// if (this.model.SubmitCode == '200') {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// uni.navigateBack({});
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
// }
}
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
this.isaccord = true;
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: '请扫码正确条码',
});
}
}
}
</script>
@ -445,7 +479,7 @@ export default class ChangePalletNew extends BasePage {
.item1 {
margin-bottom: 3px;
white-space: 1px;
font-size: 17px;
font-size: 15px;
font-weight: 600;
}
.item2 {

@ -11,14 +11,14 @@
<!-- <u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view class="list">
<div class="item-name">
<div class="quest">巡检任务: 巡检任务1</div>
<div class="quest">工单号: {{ detailsinfolist.orderCode }}</div>
<div class="details">
<div>设备编码: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfo.itemq }}</div>
<div>设备编码: {{ detailsinfolist.equipmentCode }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfolist.equipmentName }}</div>
</div>
<div class="details">
<div>车间: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">产线: {{ detailsinfo.itemq }}</div>
<div>车间: {{ detailsinfocontent.planWorkshop }}</div>
<div style="margin-left: 42px">工作中心: {{ detailsinfocontent.workCenterName }}</div>
</div>
</div>
<view class="single-left">
@ -26,25 +26,27 @@
<!-- <u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search" :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="item" v-for="(item, index) in equipmentdata" :key="index">
<div class="item1">检查项: {{ item.item3 }}</div>
<div class="item1">检查方法: {{ item.item4 }}</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="select">
<u-radio-group dis v-model="item.radiovalue" @change="radioGroupChange(item, item.radiovalue, index)">
<u-radio @change="radioChange" v-for="(n, index) in item.listselect" :key="index" :name="n.name" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
<view class="item" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="item1.detailReach == n.type ? false : true">
{{ n.name }}
</u-radio>
</u-radio-group>
</div>
</div>
</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" :disabled="item.isdisabled" v-model="item.value" @blur="blur(item, item.value, index)" @change="changeinput(item, item.value, index)" @input="input(item, item.value, index)" type="text" name="" id="" />
单位:mm
<div class="item1 item2" v-if="item1.standardType == 'quantify'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" :disabled="item1.detailReach == null ? true : true" v-model="item1.detailReach" @blur="blur(item1, item1.detailReach, index, index1)" @change="changeinput(item1, item1.detailReach, index, index1)" @input="input(item1, item1.detailReach, index, index1)" type="text" name="" id="" />
单位:mm
</div>
</div>
</div>
</view>
@ -92,6 +94,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 { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -112,68 +115,32 @@ export default class ChangePalletNew extends BasePage {
current: any = 0;
shouciFocus = true;
//
detailsinfo: any = [];
detailsinfolist: any = [];
detailsinfo: any = {};
detailsinfolist: any = {};
detailsinfocontent: any = {};
//
isshow = false;
inputmodal = false;
ischecked = false;
radiomodal = false;
//
isaccord = false;
//
equipmentdata: any = [
equipmentdata: any = [];
listselect: any = [
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
value: 55,
isdisabled: true,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
name: '符合标准',
disabled: false,
},
{
name: '未达标',
disabled: true,
},
],
valuemax: 100,
valuemin: 50,
type: 0,
name: '符合标准',
radiovalue: null,
},
{
itemq: '巡检任务2',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
isdisabled: true,
value: 10,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
name: '符合标准',
disabled: false,
},
{
name: '未达标',
disabled: true,
},
],
valuemax: 50,
valuemin: 10,
type: 1,
name: '未达标',
radiovalue: null,
},
];
// index equipment
equipmentindex: any = '';
equipmentindex: any = [];
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
@ -186,22 +153,28 @@ export default class ChangePalletNew extends BasePage {
imgUrlList: any = [];
deleteimgUrlList: any = [];
orderNoItemList: any = {};
picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg';
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
//
blur(item, value, index) {
blur(item, value, index, index1) {
this.radiomodal = false;
this.inputmodal = false;
console.log(item, value, index);
if (value > item.valuemax || value < item.valuemin) {
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2));
this.inputmodal = true;
this.isshow = true;
this.form = item;
if (value > item.detailUpLimit || value < item.detailDownLimit) {
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
item.picturePath = item.picturePath.split(',');
this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
} else {
this.imgUrlList = [];
}
// this.inputmodal = true;
// this.isshow = true;
// this.form = item;
}
}
changeinput(e) {
@ -215,24 +188,33 @@ export default class ChangePalletNew extends BasePage {
console.log(e, '11111');
}
// radioradio-group
radioGroupChange(item, value, index) {
console.log(item, value, index);
radioGroupChange(item, value, index, index1) {
this.radiomodal = false;
this.inputmodal = false;
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1));
if (value == '未达标') {
this.isshow = true;
this.radiomodal = true;
this.form = item;
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
item.picturePath = item.picturePath.split(',');
this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
} else {
this.imgUrlList = [];
}
// if (value == 1) {
// this.isshow = true;
// this.radiomodal = true;
// this.form = item;
// }
}
onLoad(options) {
async onLoad(options) {
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
this.ischecked = this.detailsinfo.ischecked;
console.log(this.detailsinfo);
let query = {
orderCode: this.detailsinfo.orderCode,
};
await this.model.getInspectionOrderInfo(query);
this.detailsinfocontent = this.model.OrderInfList;
this.detailsinfolist = this.model.OrderInfList.equ;
}
}
created() {
@ -243,11 +225,14 @@ export default class ChangePalletNew extends BasePage {
}
//
confirm() {
console.log((this as any).uUpload, 'sssss');
console.log((this as any).uUpload, 'sssss', this.equipmentindex);
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]);
if (this.radiomodal) {
this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList;
this.imgUrlList = this.imgUrlList.join();
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList;
} else if (this.inputmodal) {
this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList;
this.imgUrlList = this.imgUrlList.join();
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList;
}
}
cancel() {
@ -265,68 +250,60 @@ export default class ChangePalletNew extends BasePage {
});
}
chooseImg() {
// if(!this.materialObj){
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
// return
// }
// uni.chooseImage({
// count: 9, //9
// // sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'],
// success: (res) => {
// // uni.showLoading();
// //console.log('/////',res);
// let tempFilePaths: any = res.tempFilePaths;
// let imgUrlList: any = res.tempFilePaths;
// tempFilePaths.map((item, index) => {
// uni.uploadFile({
// url: 'http://192.168.202.20:9000/prod-api/file/upload',
// //url: '/dev-api/file/upload',
// fileType: 'image',
// filePath: item,
// header: {
// Authorization: 'Bearer ' + session.user?.access_token,
// // 'cosmo-env-sitecode': this.$store.state.siteCode
// },
// name: 'file',
// // formData: {
// // materialCode: this.materialObj.materialCode,
// // },
// success: (res) => {
// console.log(res);
// uni.hideLoading();
// if (!res.data) {
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// return;
// }
// let data = JSON.parse(res.data);
// console.log('123dddd', data);
// this.imgList = [...this.imgList, data.data.url];
// //this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
// //this.picUrls = this.imgList.join(",");
// //this.picNames = this.imgListName.join(",");
// console.log('this.imgList', this.imgList);
// uni.hideLoading();
// },
// fail: (err) => {
// console.log(err);
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// uni.hideLoading();
// },
// });
// });
// },
// });
uni.chooseImage({
count: 9, //9
// sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'],
success: (res) => {
// uni.showLoading();
//console.log('/////',res);
let tempFilePaths: any = res.tempFilePaths;
tempFilePaths.map((item) => {
uni.uploadFile({
url: 'http://192.168.202.20:9000/prod-api/file/upload',
//url: '/dev-api/file/upload',
fileType: 'image',
filePath: item,
header: {
Authorization: 'Bearer ' + session.user?.access_token,
// 'cosmo-env-sitecode': this.$store.state.siteCode
},
name: 'file',
// formData: {
// materialCode: this.materialObj.materialCode,
// },
success: (res) => {
console.log(res);
uni.hideLoading();
if (!res.data) {
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
return;
}
let data = JSON.parse(res.data);
console.log('123dddd', data);
this.imgUrlList = [...this.imgList, data.data.url];
//this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
//this.picUrls = this.imgList.join(",");
//this.picNames = this.imgListName.join(",");
console.log('this.imgList', this.imgList);
uni.hideLoading();
},
fail: (err) => {
console.log(err);
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
uni.hideLoading();
},
});
});
},
});
}
deleteImg(index) {
this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList));
@ -353,6 +330,12 @@ export default class ChangePalletNew extends BasePage {
// return;
// }
}
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
this.isaccord = true;
}
}
}
</script>
<style lang="scss" scoped>
@ -393,6 +376,7 @@ export default class ChangePalletNew extends BasePage {
height: 88rpx;
}
}
.list {
margin-top: 15px;
width: 367px;
@ -443,7 +427,7 @@ export default class ChangePalletNew extends BasePage {
.item1 {
margin-bottom: 3px;
white-space: 1px;
font-size: 17px;
font-size: 15px;
font-weight: 600;
}
.item2 {
@ -479,6 +463,7 @@ export default class ChangePalletNew extends BasePage {
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;

@ -11,26 +11,26 @@
<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.itemq }}</div>
<div class="tag">{{ item.item2 }}</div>
<div class="name">工单号: {{ item.planCode }}</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>
</div>
<div class="item1">任务期限: {{ item.item3 }}</div>
<div class="item1">周期: {{ item.item4 }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<div class="list-top">
<div class="name">{{ item.itemq }}</div>
<div class="tag tag1">{{ item.item2 }}</div>
<div class="name">工单号: {{ item.planCode }}</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>
</div>
<div class="item1">任务期限: {{ item.item3 }}</div>
<div class="item1">周期: {{ item.item4 }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
</view>
</template>
@ -40,7 +40,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 { session } from '@/store/modules/session';
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -73,59 +73,44 @@ export default class ChangePalletNew extends BasePage {
value: 1,
},
];
listdata: any = [
{
itemq: '巡检任务1',
item2: '未巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
item7: 'AF-0002',
item8: '测试设备1',
item9: '车间1',
item10: '产线1',
},
{
itemq: '巡检任务2',
item2: '未巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
item7: 'AF-0002',
item8: '测试设备1',
item9: '车间1',
item10: '产线1',
},
];
detailsdata: any = [
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
];
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
detailsdataceshi: any = [
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
];
userinfo: any = null;
// remove: any = {};
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
async onLoad() {
console.log(uni.getStorageSync('userinfo'));
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
}
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
@ -133,9 +118,19 @@ export default class ChangePalletNew extends BasePage {
location: any = '';
locationStatus: any = 1;
//
change(index) {
async change(index) {
this.current = index;
console.log(this.current);
if (index == 0) {
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
await this.model.getTaskRecord(this.userinfo.userId);
this.detailsdata = model.getTaskRecordList;
}
}
}
linkdetails(item) {
uni.navigateTo({

@ -2,7 +2,6 @@ import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decor
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
@ -11,62 +10,44 @@ import { session } from '@/store/modules/session';
})
export class ChangePalletNew extends VuexModule {
orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjumes.product.getInfoByRfid, {
async getTodayTask(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName,
params: {
factoryCode: session.FactoryCode,
rfid: orderNo,
userId: userId,
},
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async empty() {
const orderNoItemList = [];
return { orderNoItemList };
}
SubmitCode: any = '';
//托盘信息变更x
@MutationAction
async palletInforUpdate(params: any) {
const result: any = await http.post(url.lanjumes.product.palletInforUpdate, params);
const SubmitCode = result.code;
return { SubmitCode };
}
//巡检列表今日任务
DictList: any = [];
@MutationAction
async getpalletLocation(params) {
const result: any = await http.post(url.lanjumes.product.getpalletLocation, {
productionState: params,
});
const DictListoild: [] = result;
if (DictListoild) {
const DictList = DictListoild.map((item: any) => ({
label: item.location,
value: item.location,
}));
return { DictList };
}
}
//巡检列表巡检记录
locList: any = [];
@MutationAction
async getDictList() {
const result: any = await http.get(url.lanjumes.product.getDictList, {
async getTaskRecord(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
//loginName: session.loginName,
params: {
equipmentTypeCode: 'cache',
userId: userId,
},
});
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.itemName,
value: item.itemCode,
}));
return { locList };
const getTaskRecordList = result.data;
return { getTaskRecordList };
}
//巡检列表巡检记录
OrderInfList: any = [];
@MutationAction
async getInspectionOrderInfo(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.getInspectionOrderInfo, params);
const OrderInfList: [] = result.data;
return { OrderInfList };
}
SubmitCode: any = '';
//巡检提交
@MutationAction
async updateInspectionRecord(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.updateInspectionRecord, params);
const SubmitCode: [] = result.code;
return { SubmitCode };
}
}

@ -5,59 +5,32 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">托盘变更</view>
<view class="title">巡检</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" label-width="180rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>rfid:</view>
<u-search placeholder="请扫描" :focus="shouciFocus" v-model="orderNo" :show-action="false" @search="query"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
</view>
</view>
<u-form-item label="物料编码">
<u-input :disabled="true" v-model="orderNoItemList.productCode" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 机台 -->
<u-form-item label="规格">
<u-input :disabled="true" v-model="orderNoItemList.productSpc" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 产品 -->
<u-form-item label="产品">
<u-input :disabled="true" v-model="orderNoItemList.productName" placeholder="" />
</u-form-item>
<!-- 工单 -->
<u-form-item label="工单">
<u-input :disabled="true" v-model="orderNoItemList.workorderCode" placeholder="" />
</u-form-item>
<u-form-item label="缓存区:">
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="productCodelocList.value" :options="model.locList" />
</u-form-item>
<u-form-item label="库位:">
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductCode" showKey="label" valKey="value" :val="productCodeList.value" :options="model.DictList" />
</u-form-item>
<!-- <u-form-item label="托盘码:">
<u-search placeholder="请扫描托盘码" v-model="location" :show-action="false"></u-search>
</u-form-item> -->
<u-form-item label="是否取走托盘:">
<choose-one @switchfunction="switchChangeFun" :switchType="'text'" :defaultColor="'#4A72F9'" :highColor="'#FFFFFF'" :defaultValue="locationStatus" :switchList="switchListText"></choose-one>
</u-form-item>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<u-col :span="6">
<u-button @click="onsubmit" type="primary">确定</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})"></u-button>
</u-col>
</u-row>
<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.planCode }}</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>
</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<div class="list-top">
<div class="name">工单号: {{ item.planCode }}</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>
</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
</view>
</template>
@ -67,7 +40,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 { session } from '@/store/modules/session';
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -77,9 +50,19 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
})
export default class ChangePalletNew extends BasePage {
model = model;
list: any = [
{
cate_name: '今日任务',
},
{
cate_name: '巡检记录',
},
];
current: any = 0;
moren = '选择缓存区';
shouciFocus = true;
zaiciFocus = false;
ischecked = false;
switchListText = [
{
title: '是',
@ -90,100 +73,77 @@ export default class ChangePalletNew extends BasePage {
value: 1,
},
];
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
detailsdataceshi: any = [
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
},
];
userinfo: any = null;
// remove: any = {};
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
async onLoad() {
console.log(uni.getStorageSync('userinfo'));
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
}
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
return;
}
await this.model.queryOrderNo(this.orderNo);
//console.log('???',model.orderNoItemList)
if (model.orderNoItemList == undefined) {
this.customToast('该rfid未查到数据请使用正确的rfid');
//
async change(index) {
this.current = index;
if (index == 0) {
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
this.listdata = model.orderNoItemList;
}
} else {
this.orderNoItemList = model.orderNoItemList;
if (this.userinfo) {
await this.model.getTaskRecord(this.userinfo.userId);
this.detailsdata = model.getTaskRecordList;
}
}
//console.log('this.orderNoItemList', this.orderNoItemList);
}
generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,
v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
linkdetails(item) {
uni.navigateTo({
url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
async onsubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
return;
}
var currentDate = new Date();
//
var year = currentDate.getFullYear();
var month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
var day = ('0' + currentDate.getDate()).slice(-2);
var hours = ('0' + currentDate.getHours()).slice(-2);
var minutes = ('0' + currentDate.getMinutes()).slice(-2);
var seconds = ('0' + currentDate.getSeconds()).slice(-2);
// "YYYY-MM-DD HH:mm:ss"
var formattedDate = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
let params = {
rfidNo: this.orderNo,
reqCode: this.generateGUID(),
reqTime: formattedDate,
sku: this.orderNoItemList.productCode,
spec: this.orderNoItemList.productSpc,
productionState: this.productCodelocList.value, //2323
//location: this.location,
locationStatus: this.locationStatus, //
location: this.productCodeList.value, //
//productionState: this.productCodeList.value,
};
await this.model.palletInforUpdate(params);
if (model.SubmitCode == 10) {
this.uni.showToast({ title: '成功' });
this.Clear();
}
}
Clear() {
this.orderNo = '';
this.location = '';
this.locationStatus = 1;
this.productCodeList = {};
this.productCodelocList = {};
this.shouciFocus = false;
this.model.empty();
this.$nextTick(() => {
this.shouciFocus = true;
linkdetailscheck(item) {
this.ischecked = true;
item.ischecked = true;
uni.navigateTo({
url: `/pages/equipment/Inspection/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
switchChangeFun(e) {
//console.log(e);
this.locationStatus = e.swithcSelectItem.value;
}
async selectProductCode(e: any) {
this.productCodeList = e.pickerName;
}
async selectProductlocCode(e: any) {
this.productCodelocList = e.pickerName;
await this.model.getpalletLocation(this.productCodelocList.value); //23
}
}
</script>
<style lang="scss" scoped>
@ -224,61 +184,58 @@ export default class ChangePalletNew extends BasePage {
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
.Transfer {
width: 280rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 142rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 140rpx;
height: 70rpx;
background-color: #fa3534;
}
}
}
.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;
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
.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;
justify-content: space-between;
position: relative;
height: 24px;
align-items: center;
margin-bottom: 10px;
.name {
font-weight: 600;
font-size: 15px;
}
.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;
}
}
.item1 {
margin-bottom: 10px;
white-space: 1px;
}
}
::v-deep .yjy-switch-container .yjy-switch-item {
width: 100%;

@ -2,7 +2,6 @@ import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decor
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
@ -11,62 +10,44 @@ import { session } from '@/store/modules/session';
})
export class ChangePalletNew extends VuexModule {
orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjumes.product.getInfoByRfid, {
async getTodayTask(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName,
params: {
factoryCode: session.FactoryCode,
rfid: orderNo,
userId: userId,
},
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async empty() {
const orderNoItemList = [];
return { orderNoItemList };
}
SubmitCode: any = '';
//托盘信息变更x
@MutationAction
async palletInforUpdate(params: any) {
const result: any = await http.post(url.lanjumes.product.palletInforUpdate, params);
const SubmitCode = result.code;
return { SubmitCode };
}
//库位下拉列表
DictList: any = [];
@MutationAction
async getpalletLocation(params) {
const result: any = await http.post(url.lanjumes.product.getpalletLocation, {
productionState: params,
});
const DictListoild: [] = result;
if (DictListoild) {
const DictList = DictListoild.map((item: any) => ({
label: item.location,
value: item.location,
}));
return { DictList };
}
}
//缓存区下拉列表
locList: any = [];
@MutationAction
async getDictList() {
const result: any = await http.get(url.lanjumes.product.getDictList, {
async getTaskRecord(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
//loginName: session.loginName,
params: {
equipmentTypeCode: 'cache',
userId: userId,
},
});
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.itemName,
value: item.itemCode,
}));
return { locList };
const getTaskRecordList = result.data;
return { getTaskRecordList };
}
//巡检列表巡检记录
OrderInfList: any = [];
@MutationAction
async getInspectionOrderInfo(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.getInspectionOrderInfo, params);
const OrderInfList: [] = result.data;
return { OrderInfList };
}
SubmitCode: any = '';
//巡检提交
@MutationAction
async updateInspectionRecord(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.updateInspectionRecord, params);
const SubmitCode: [] = result.code;
return { SubmitCode };
}
}

@ -5,21 +5,21 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">检详情</view>
<view class="title">检详情</view>
<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="list">
<div class="item-name">
<div class="quest">点检任务: 点检任务1</div>
<div class="quest">工单号: {{ detailsinfolist.orderCode }}</div>
<div class="details">
<div>设备编码: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfo.itemq }}</div>
<div>设备编码: {{ detailsinfolist.equipmentCode }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfolist.equipmentName }}</div>
</div>
<div class="details">
<div>车间: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">产线: {{ detailsinfo.itemq }}</div>
<div>车间: {{ detailsinfocontent.planWorkshop }}</div>
<div style="margin-left: 42px">工作中心: {{ detailsinfocontent.workCenterName }}</div>
</div>
</div>
<view class="single-left">
@ -27,25 +27,27 @@
<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="item" v-for="(item, index) in equipmentdata" :key="index">
<div class="item1">检查项: {{ item.item3 }}</div>
<div class="item1">检查方法: {{ item.item4 }}</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="select">
<u-radio-group v-model="item.radiovalue" @change="radioGroupChange(item, item.radiovalue, index)">
<u-radio @change="radioChange" v-for="(n, index) in item.listselect" :key="index" :name="n.name" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
<view class="item" v-show="isaccord" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
</div>
</div>
</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" v-model="item.value" @blur="blur(item, item.value, index)" @change="changeinput(item, item.value, index)" @input="input(item, item.value, index)" type="text" name="" id="" />
单位:mm
<div class="item1 item2" v-if="item1.standardType == 'quantify'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" v-model="item1.detailReach" @blur="blur(item1, item1.detailReach, index, index1)" @change="changeinput(item1, item1.detailReach, index, index1)" @input="input(item1, item1.detailReach, index, index1)" type="text" name="" id="" />
单位:mm
</div>
</div>
</div>
</view>
@ -68,7 +70,7 @@
<!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft()">
<view class="photoList">
<view class="itemBox photoBox" v-for="(img, index) in imgUrlList" :key="index">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index">
<view class="closeBtn" @click="deleteImg(index)">
<image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
</view>
@ -92,6 +94,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 { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -106,68 +109,39 @@ export default class ChangePalletNew extends BasePage {
cate_name: '今日任务',
},
{
cate_name: '检记录',
cate_name: '检记录',
},
];
current: any = 0;
shouciFocus = true;
//
detailsinfo: any = [];
detailsinfolist: any = [];
detailsinfo: any = {};
detailsinfolist: any = {};
detailsinfocontent: any = {};
//
isshow = false;
inputmodal = false;
isvalue = false;
ischecked = false;
radiomodal = false;
//
isaccord = false;
//
equipmentdata: any = [
equipmentdata: any = [];
listselect: any = [
{
itemq: '测试设备1',
item2: '已点检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月点检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
value: 55,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
name: '符合标准',
},
{
name: '未达标',
},
],
valuemax: 100,
valuemin: 50,
type: 0,
name: '符合标准',
radiovalue: null,
},
{
type: 1,
name: '未达标',
radiovalue: null,
},
// {
// itemq: '2',
// item2: '',
// item3: '2023-08-01 - 2023-08-31',
// item4: '',
// item5: 'XXXXX',
// item6: '',
// radiovalue: '',
// value: 10,
// imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
// imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
// listselect: [
// {
// name: '',
// },
// {
// name: '',
// },
// ],
// valuemax: 50,
// valuemin: 10,
// },
];
// index equipment
equipmentindex: any = '';
equipmentindex: any = [];
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
@ -177,22 +151,33 @@ export default class ChangePalletNew extends BasePage {
fileList: any = [];
filesArr: any = [];
imgList: any = [];
imgUrlList: any = [];
deleteimgUrlList: any = [];
deleteimgUrlListcope: any = [];
orderNoItemList: any = {};
picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg';
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
//
blur(item, value, index) {
blur(item, value, index, index1) {
console.log(item, value, index, index1);
this.radiomodal = false;
this.inputmodal = false;
console.log(item, value, index);
if (value > item.valuemax || value < item.valuemin) {
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2));
if (value == null) {
this.isvalue == true;
}
if (value > item.detailUpLimit || value < item.detailDownLimit) {
this.equipmentindex = [];
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
this.imgList = JSON.parse(JSON.stringify(item.picturePath));
this.imgList = this.imgList.split(',');
} else {
this.imgList = [];
}
this.inputmodal = true;
this.isshow = true;
this.form = item;
@ -209,24 +194,35 @@ export default class ChangePalletNew extends BasePage {
console.log(e, '11111');
}
// radioradio-group
radioGroupChange(item, value, index) {
console.log(item, value, index);
radioGroupChange(item, value, index, index1) {
console.log(item, value, index, index1);
this.equipmentindex = [];
this.radiomodal = false;
this.inputmodal = false;
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1));
if (value == '未达标') {
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
this.imgList = JSON.parse(JSON.stringify(item.picturePath));
this.imgList = this.imgList.split(',');
} else {
this.imgList = [];
}
if (value == 1) {
this.isshow = true;
this.radiomodal = true;
this.form = item;
}
}
onLoad(options) {
async onLoad(options) {
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
this.detailsinfolist.push(this.detailsinfo);
console.log(this.detailsinfo);
let query = {
orderCode: this.detailsinfo.orderCode,
};
await this.model.getInspectionOrderInfo(query);
this.detailsinfocontent = this.model.OrderInfList;
this.detailsinfolist = this.model.OrderInfList.equ;
}
}
created() {
@ -237,21 +233,40 @@ export default class ChangePalletNew extends BasePage {
}
//
confirm() {
console.log((this as any).uUpload, 'sssss');
console.log((this as any).uUpload, 'sssss', this.equipmentindex);
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]);
if (this.radiomodal) {
this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList;
if (this.imgList.length == 0) {
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null;
} else {
this.imgList = this.imgList.join(',');
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList;
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList);
}
} else if (this.inputmodal) {
this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList;
if (this.imgList.length == 0) {
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = null;
} else {
this.imgList = this.imgList.join(',');
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgList;
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]], this.imgList);
}
}
}
cancel() {
this.imgUrlList = this.deleteimgUrlList;
this.isshow = false;
if (this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath == null) {
this.imgList = [];
} else {
this.imgList = this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath;
this.imgList = this.imgList.split(',');
}
}
scrollLeft() {
return 222 * (this.imgList.length + 1);
}
showScreenImg(i) {
let list = this.imgUrlList;
let list = this.imgList;
uni.previewImage({
current: i,
urls: list,
@ -259,72 +274,72 @@ export default class ChangePalletNew extends BasePage {
});
}
chooseImg() {
// if(!this.materialObj){
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
// return
// }
// uni.chooseImage({
// count: 9, //9
// // sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'],
// success: (res) => {
// // uni.showLoading();
// //console.log('/////',res);
// let tempFilePaths: any = res.tempFilePaths;
// let imgUrlList: any = res.tempFilePaths;
// tempFilePaths.map((item, index) => {
// uni.uploadFile({
// url: 'http://192.168.202.20:9000/prod-api/file/upload',
// //url: '/dev-api/file/upload',
// fileType: 'image',
// filePath: item,
// header: {
// Authorization: 'Bearer ' + session.user?.access_token,
// // 'cosmo-env-sitecode': this.$store.state.siteCode
// },
// name: 'file',
// // formData: {
// // materialCode: this.materialObj.materialCode,
// // },
// success: (res) => {
// console.log(res);
// uni.hideLoading();
// if (!res.data) {
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// return;
// }
// let data = JSON.parse(res.data);
// console.log('123dddd', data);
// this.imgList = [...this.imgList, data.data.url];
// //this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
// //this.picUrls = this.imgList.join(",");
// //this.picNames = this.imgListName.join(",");
// console.log('this.imgList', this.imgList);
// uni.hideLoading();
// },
// fail: (err) => {
// console.log(err);
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// uni.hideLoading();
// },
// });
// });
// },
// });
uni.chooseImage({
count: 9, //9
// sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'],
success: (res) => {
// uni.showLoading();
//console.log('/////',res);
let tempFilePaths: any = res.tempFilePaths;
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// uni.navigateBack({});
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
tempFilePaths.map((item) => {
uni.uploadFile({
url: '/dev-api/file/upload',
//url: '/dev-api/file/upload',
fileType: 'image',
filePath: item,
header: {
Authorization: 'Bearer ' + session.user?.access_token,
// 'cosmo-env-sitecode': this.$store.state.siteCode
},
name: 'file',
// formData: {
// materialCode: this.materialObj.materialCode,
// },
success: (res) => {
uni.hideLoading();
if (!res.data) {
// this.$refs.toastRef.show({
// type:"error",
// text:res.msg
// })
return;
}
let data = JSON.parse(res.data);
this.imgList = [...this.imgList, data.data.url];
//this.imgListName = [...this.imgListName,data.fileName];
//this.picUrls = this.imgList.join(",");
//this.picNames = this.imgListName.join(",");
uni.hideLoading();
},
fail: (err) => {
console.log(err);
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
uni.hideLoading();
},
});
});
},
});
}
deleteImg(index) {
this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList));
this.imgUrlList.splice(index, 1);
this.imgList = JSON.parse(JSON.stringify(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath));
this.imgList = this.imgList.split(',');
this.imgList.splice(index, 1);
}
scanCodeOne() {
uni.scanCode({
@ -339,16 +354,39 @@ export default class ChangePalletNew extends BasePage {
}
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
this.customToast('请扫码设备编码');
return;
}
// if (this.badMeg == '') {
// this.customToast('');
// return;
if (this.isvalue) {
this.customToast('检查标准不能为空');
return;
}
// this.detailsinfocontent.equ = this.detailsinfolist;
// let query = this.detailsinfocontent;
// await this.model.updateInspectionRecord(query);
// if (this.model.SubmitCode == '200') {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// uni.navigateBack({});
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
// }
}
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
this.isaccord = true;
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: '请扫码正确条码',
});
}
}
}
</script>
@ -441,7 +479,7 @@ export default class ChangePalletNew extends BasePage {
.item1 {
margin-bottom: 3px;
white-space: 1px;
font-size: 17px;
font-size: 15px;
font-weight: 600;
}
.item2 {

@ -5,20 +5,20 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">检详情</view>
<view class="title">检详情</view>
<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="list">
<div class="item-name">
<div class="quest">巡检任务: 巡检任务1</div>
<div class="quest">工单号: {{ detailsinfolist.orderCode }}</div>
<div class="details">
<div>设备编码: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfo.itemq }}</div>
<div>设备编码: {{ detailsinfolist.equipmentCode }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfolist.equipmentName }}</div>
</div>
<div class="details">
<div>车间: {{ detailsinfo.itemq }}</div>
<div style="margin-left: 42px">产线: {{ detailsinfo.itemq }}</div>
<div>车间: {{ detailsinfocontent.planWorkshop }}</div>
<div style="margin-left: 42px">工作中心: {{ detailsinfocontent.workCenterName }}</div>
</div>
</div>
<view class="single-left">
@ -26,25 +26,27 @@
<!-- <u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search" :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="item" v-for="(item, index) in equipmentdata" :key="index">
<div class="item1">检查项: {{ item.item3 }}</div>
<div class="item1">检查方法: {{ item.item4 }}</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="select">
<u-radio-group dis v-model="item.radiovalue" @change="radioGroupChange(item, item.radiovalue, index)">
<u-radio @change="radioChange" v-for="(n, index) in item.listselect" :key="index" :name="n.name" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
<view class="item" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="item1.detailReach == n.type ? false : true">
{{ n.name }}
</u-radio>
</u-radio-group>
</div>
</div>
</div>
<div class="item1 item2">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" :disabled="item.isdisabled" v-model="item.value" @blur="blur(item, item.value, index)" @change="changeinput(item, item.value, index)" @input="input(item, item.value, index)" type="text" name="" id="" />
单位:mm
<div class="item1 item2" v-if="item1.standardType == 'quantify'">
<div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div class="input-box" id="input-box1">
实际值:
<input class="input" :disabled="item1.detailReach == null ? true : true" v-model="item1.detailReach" @blur="blur(item1, item1.detailReach, index, index1)" @change="changeinput(item1, item1.detailReach, index, index1)" @input="input(item1, item1.detailReach, index, index1)" type="text" name="" id="" />
单位:mm
</div>
</div>
</div>
</view>
@ -92,6 +94,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 { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -106,74 +109,38 @@ export default class ChangePalletNew extends BasePage {
cate_name: '今日任务',
},
{
cate_name: '检记录',
cate_name: '检记录',
},
];
current: any = 0;
shouciFocus = true;
//
detailsinfo: any = [];
detailsinfolist: any = [];
detailsinfo: any = {};
detailsinfolist: any = {};
detailsinfocontent: any = {};
//
isshow = false;
inputmodal = false;
ischecked = false;
radiomodal = false;
//
isaccord = false;
//
equipmentdata: any = [
equipmentdata: any = [];
listselect: any = [
{
itemq: '巡检任务1',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
value: 55,
isdisabled: true,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
name: '符合标准',
disabled: false,
},
{
name: '未达标',
disabled: true,
},
],
valuemax: 100,
valuemin: 50,
type: 0,
name: '符合标准',
radiovalue: null,
},
{
itemq: '巡检任务2',
item2: '已巡检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月巡检',
item5: 'XXXXX',
item6: '未发现异常',
radiovalue: '符合标准',
isdisabled: true,
value: 10,
imgUrlList1: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg', 'https://cdn.uviewui.com/uview/swiper/3.jpg'],
imgUrlList2: ['https://cdn.uviewui.com/uview/swiper/1.jpg', 'https://cdn.uviewui.com/uview/swiper/2.jpg'],
listselect: [
{
name: '符合标准',
disabled: false,
},
{
name: '未达标',
disabled: true,
},
],
valuemax: 50,
valuemin: 10,
type: 1,
name: '未达标',
radiovalue: null,
},
];
// index equipment
equipmentindex: any = '';
equipmentindex: any = [];
orderNo: any = '';
location: any = '';
locationStatus: any = 1;
@ -186,22 +153,28 @@ export default class ChangePalletNew extends BasePage {
imgUrlList: any = [];
deleteimgUrlList: any = [];
orderNoItemList: any = {};
picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg';
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
//
blur(item, value, index) {
blur(item, value, index, index1) {
this.radiomodal = false;
this.inputmodal = false;
console.log(item, value, index);
if (value > item.valuemax || value < item.valuemin) {
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2));
this.inputmodal = true;
this.isshow = true;
this.form = item;
if (value > item.detailUpLimit || value < item.detailDownLimit) {
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
item.picturePath = item.picturePath.split(',');
this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
} else {
this.imgUrlList = [];
}
// this.inputmodal = true;
// this.isshow = true;
// this.form = item;
}
}
changeinput(e) {
@ -215,24 +188,33 @@ export default class ChangePalletNew extends BasePage {
console.log(e, '11111');
}
// radioradio-group
radioGroupChange(item, value, index) {
console.log(item, value, index);
radioGroupChange(item, value, index, index1) {
this.radiomodal = false;
this.inputmodal = false;
this.equipmentindex = index;
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1));
if (value == '未达标') {
this.isshow = true;
this.radiomodal = true;
this.form = item;
this.equipmentindex.push(index);
this.equipmentindex.push(index1);
if (item.picturePath != null) {
item.picturePath = item.picturePath.split(',');
this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
} else {
this.imgUrlList = [];
}
// if (value == 1) {
// this.isshow = true;
// this.radiomodal = true;
// this.form = item;
// }
}
onLoad(options) {
async onLoad(options) {
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
this.ischecked = this.detailsinfo.ischecked;
console.log(this.detailsinfo);
let query = {
orderCode: this.detailsinfo.orderCode,
};
await this.model.getInspectionOrderInfo(query);
this.detailsinfocontent = this.model.OrderInfList;
this.detailsinfolist = this.model.OrderInfList.equ;
}
}
created() {
@ -243,11 +225,14 @@ export default class ChangePalletNew extends BasePage {
}
//
confirm() {
console.log((this as any).uUpload, 'sssss');
console.log((this as any).uUpload, 'sssss', this.equipmentindex);
console.log(this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]]);
if (this.radiomodal) {
this.equipmentdata[this.equipmentindex].imgUrlList1 = this.imgUrlList;
this.imgUrlList = this.imgUrlList.join();
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList;
} else if (this.inputmodal) {
this.equipmentdata[this.equipmentindex].imgUrlList2 = this.imgUrlList;
this.imgUrlList = this.imgUrlList.join();
this.detailsinfolist.detailList[this.equipmentindex[0]].standardList[this.equipmentindex[1]].picturePath = this.imgUrlList;
}
}
cancel() {
@ -265,68 +250,60 @@ export default class ChangePalletNew extends BasePage {
});
}
chooseImg() {
// if(!this.materialObj){
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
// return
// }
// uni.chooseImage({
// count: 9, //9
// // sizeType: ['original', 'compressed'], //
// sourceType: ['album', 'camera'],
// success: (res) => {
// // uni.showLoading();
// //console.log('/////',res);
// let tempFilePaths: any = res.tempFilePaths;
// let imgUrlList: any = res.tempFilePaths;
// tempFilePaths.map((item, index) => {
// uni.uploadFile({
// url: 'http://192.168.202.20:9000/prod-api/file/upload',
// //url: '/dev-api/file/upload',
// fileType: 'image',
// filePath: item,
// header: {
// Authorization: 'Bearer ' + session.user?.access_token,
// // 'cosmo-env-sitecode': this.$store.state.siteCode
// },
// name: 'file',
// // formData: {
// // materialCode: this.materialObj.materialCode,
// // },
// success: (res) => {
// console.log(res);
// uni.hideLoading();
// if (!res.data) {
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// return;
// }
// let data = JSON.parse(res.data);
// console.log('123dddd', data);
// this.imgList = [...this.imgList, data.data.url];
// //this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
// //this.picUrls = this.imgList.join(",");
// //this.picNames = this.imgListName.join(",");
// console.log('this.imgList', this.imgList);
// uni.hideLoading();
// },
// fail: (err) => {
// console.log(err);
// // this.$refs.toastRef.show({
// // type:"error",
// // text:""
// // })
// uni.hideLoading();
// },
// });
// });
// },
// });
uni.chooseImage({
count: 9, //9
// sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'],
success: (res) => {
// uni.showLoading();
//console.log('/////',res);
let tempFilePaths: any = res.tempFilePaths;
tempFilePaths.map((item) => {
uni.uploadFile({
url: 'http://192.168.202.20:9000/prod-api/file/upload',
//url: '/dev-api/file/upload',
fileType: 'image',
filePath: item,
header: {
Authorization: 'Bearer ' + session.user?.access_token,
// 'cosmo-env-sitecode': this.$store.state.siteCode
},
name: 'file',
// formData: {
// materialCode: this.materialObj.materialCode,
// },
success: (res) => {
console.log(res);
uni.hideLoading();
if (!res.data) {
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
return;
}
let data = JSON.parse(res.data);
console.log('123dddd', data);
this.imgUrlList = [...this.imgList, data.data.url];
//this.imgListName = [...this.imgListName,data.fileName];
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
//this.picUrls = this.imgList.join(",");
//this.picNames = this.imgListName.join(",");
console.log('this.imgList', this.imgList);
uni.hideLoading();
},
fail: (err) => {
console.log(err);
// this.$refs.toastRef.show({
// type:"error",
// text:""
// })
uni.hideLoading();
},
});
});
},
});
}
deleteImg(index) {
this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList));
@ -353,6 +330,12 @@ export default class ChangePalletNew extends BasePage {
// return;
// }
}
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
this.isaccord = true;
}
}
}
</script>
<style lang="scss" scoped>
@ -393,6 +376,7 @@ export default class ChangePalletNew extends BasePage {
height: 88rpx;
}
}
.list {
margin-top: 15px;
width: 367px;
@ -443,7 +427,7 @@ export default class ChangePalletNew extends BasePage {
.item1 {
margin-bottom: 3px;
white-space: 1px;
font-size: 17px;
font-size: 15px;
font-weight: 600;
}
.item2 {
@ -479,6 +463,7 @@ export default class ChangePalletNew extends BasePage {
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;

@ -11,26 +11,26 @@
<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.itemq }}</div>
<div class="tag">{{ item.item2 }}</div>
<div class="name">工单号: {{ item.planCode }}</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>
</div>
<div class="item1">任务期限: {{ item.item3 }}</div>
<div class="item1">周期: {{ item.item4 }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<div class="list-top">
<div class="name">{{ item.itemq }}</div>
<div class="tag tag1">{{ item.item2 }}</div>
<div class="name">工单号: {{ item.planCode }}</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>
</div>
<div class="item1">任务期限: {{ item.item3 }}</div>
<div class="item1">周期: {{ item.item4 }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
</view>
</template>
@ -40,7 +40,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 { session } from '@/store/modules/session';
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
@ -73,29 +73,12 @@ export default class ChangePalletNew extends BasePage {
value: 1,
},
];
listdata: any = [
{
itemq: '点检任务1',
item2: '未点检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月点检',
item5: 'XXXXX',
item6: '未发现异常',
item7: 'AF-0002',
item8: '测试设备1',
item9: '车间1',
item10: '产线1',
},
{
itemq: '今日任务',
item2: '今日任务',
item3: '今日任务',
item4: '今日任务',
item5: '今日任务',
item6: '今日任务',
},
];
detailsdata: any = [
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
detailsdataceshi: any = [
{
itemq: '点检任务1',
item2: '已点检',
@ -105,23 +88,29 @@ export default class ChangePalletNew extends BasePage {
item6: '未发现异常',
},
{
itemq: '今日任务',
item2: '今日任务',
item3: '今日任务',
item4: '今日任务',
item5: '今日任务',
item6: '今日任务',
itemq: '点检任务1',
item2: '已点检',
item3: '2023-08-01 - 2023-08-31',
item4: '每月点检',
item5: 'XXXXX',
item6: '未发现异常',
},
];
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
userinfo: any = null;
// remove: any = {};
async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
async onLoad() {
console.log(uni.getStorageSync('userinfo'));
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
}
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
@ -129,20 +118,30 @@ export default class ChangePalletNew extends BasePage {
location: any = '';
locationStatus: any = 1;
//
change(index) {
async change(index) {
this.current = index;
console.log(this.current);
if (index == 0) {
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userId);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
await this.model.getTaskRecord(this.userinfo.userId);
this.detailsdata = model.getTaskRecordList;
}
}
}
linkdetails(item) {
uni.navigateTo({
url: `/pages/equipment/Spotcheck/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
linkdetailscheck(item) {
this.ischecked = true;
item.ischecked = true;
uni.navigateTo({
url: `/pages/equipment/Spotcheck/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)),
url: `/pages/equipment/Inspection/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)),
});
}
}

@ -2,7 +2,6 @@ import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decor
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
@ -11,62 +10,44 @@ import { session } from '@/store/modules/session';
})
export class ChangePalletNew extends VuexModule {
orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjumes.product.getInfoByRfid, {
async getTodayTask(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName,
params: {
factoryCode: session.FactoryCode,
rfid: orderNo,
userId: userId,
},
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async empty() {
const orderNoItemList = [];
return { orderNoItemList };
}
SubmitCode: any = '';
//托盘信息变更x
@MutationAction
async palletInforUpdate(params: any) {
const result: any = await http.post(url.lanjumes.product.palletInforUpdate, params);
const SubmitCode = result.code;
return { SubmitCode };
}
//库位下拉列表
DictList: any = [];
@MutationAction
async getpalletLocation(params) {
const result: any = await http.post(url.lanjumes.product.getpalletLocation, {
productionState: params,
});
const DictListoild: [] = result;
if (DictListoild) {
const DictList = DictListoild.map((item: any) => ({
label: item.location,
value: item.location,
}));
return { DictList };
}
}
//缓存区下拉列表
locList: any = [];
@MutationAction
async getDictList() {
const result: any = await http.get(url.lanjumes.product.getDictList, {
async getTaskRecord(userId: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
//loginName: session.loginName,
params: {
equipmentTypeCode: 'cache',
userId: userId,
},
});
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.itemName,
value: item.itemCode,
}));
return { locList };
const getTaskRecordList = result.data;
return { getTaskRecordList };
}
//巡检列表巡检记录
OrderInfList: any = [];
@MutationAction
async getInspectionOrderInfo(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.getInspectionOrderInfo, params);
const OrderInfList: [] = result.data;
return { OrderInfList };
}
SubmitCode: any = '';
//巡检提交
@MutationAction
async updateInspectionRecord(params: any) {
const result: any = await http.post(url.lanjuequipment.product.Inspection.updateInspectionRecord, params);
const SubmitCode: [] = result.code;
return { SubmitCode };
}
}

@ -181,6 +181,7 @@ export default class LoginPage extends BasePage {
username,
});
console.log('123guguo', loginResultuser);
uni.setStorageSync('userinfo', loginResultuser.user);
// const aaa = {
// code: '1',
// access_token: 'wdwe2ewdwcds',

@ -198,6 +198,7 @@ class SessionService extends VuexModule {
logout(): void {
// logout
this.user = null;
uni.removeStorageSync('userinfo');
//this.area = null;
uni.reLaunch({ url: page.login.login });
}

@ -14,7 +14,6 @@ const http = new Request({
//baseURL: process.env.VUE_APP_BASE_URL,
//baseURL: 'http://192.168.3.93:81',
});
/**
*
*/
@ -37,6 +36,7 @@ http.interceptors.request.use(
}
// 在请求发送之前做一些处理
config.header['Referrer-Policy'] = 'strict-origin-when-cross-origin';
config.header['poolName'] = session.PoolName;
try {
const token = session.user.access_token; //store.state.session.accessToken;
if (token) {

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
// const qianzhuione = '/dev-api'; // '/prod-api'生产环境 // '/dev-api'开发环境是调后端本地时使用
const qianzhuione = '/prod-api';
const qianzhuione = '/dev-api'; // '/prod-api'生产环境 // '/dev-api'开发环境是调后端本地时使用
// const qianzhuione = '/prod-api';
export const url = {
wmspda: {
system: {
@ -41,6 +41,37 @@ export const url = {
},
// 销售出库/sellout/showProduceCode/ /sellout/s/订单号/产品编码
SaleOutWH: {
// 根据交货单号查询下面的产品编码
showProduceCode: qianzhuione + '/wms/sellout/showProduceCode',
// 根据订单号和产品编码查询
queryinformation: qianzhuione + '/wms/sellout/s',
// 扫描箱码接口
selloutconntray: qianzhuione + '/wms/selloutconntray',
deleteTray: qianzhuione + '/wms/selloutconntray/deleteTray',
// 根据交货单号和产品编码查询展示接口
showTrays: qianzhuione + '/wms/selloutconntray/showTrays',
// 手持出库确认
out: qianzhuione + '/wms/selloutconntray/out',
},
},
},
// 设备管理
lanjuequipment: {
product: {
// 巡检
Inspection: {
// 获取今日任务 获取历史记录
getTodayTask: qianzhuione + '/device/devicePDA/getTodayTask',
// 获取历史记录
getTaskRecord: qianzhuione + '/device/devicePDA/getTaskRecord',
// 获取巡检工单详情信息
getInspectionOrderInfo: qianzhuione + '/device/devicePDA/getInspectionOrderInfo',
// 提交巡检工单详情信息
updateInspectionRecord: qianzhuione + '/device/devicePDA/updateInspectionRecord',
},
// 销售出库/sellout/showProduceCode/ /sellout/s/订单号/产品编码
SaleOutWH: {
// 根据交货单号查询下面的产品编码
showProduceCode: qianzhuione + '/wms/sellout/showProduceCode',

Loading…
Cancel
Save