修改页面

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

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

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

@ -2,7 +2,6 @@ import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decor
import store from '@/store'; import store from '@/store';
import http from '@/utils/request'; import http from '@/utils/request';
import { url } from '@/utils/url'; import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({ @Module({
namespaced: true, namespaced: true,
dynamic: true, dynamic: true,
@ -11,62 +10,44 @@ import { session } from '@/store/modules/session';
}) })
export class ChangePalletNew extends VuexModule { export class ChangePalletNew extends VuexModule {
orderNoItemList: any = []; orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction @MutationAction
async queryOrderNo(orderNo: any) { async getTodayTask(userId: any) {
const result: any = await http.get(url.lanjumes.product.getInfoByRfid, { const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName, //loginName: session.loginName,
params: { params: {
factoryCode: session.FactoryCode, userId: userId,
rfid: orderNo,
}, },
}); });
const orderNoItemList = result.data; const orderNoItemList = result.data;
return { orderNoItemList }; return { orderNoItemList };
} }
@MutationAction @MutationAction
async empty() { async getTaskRecord(userId: any) {
const orderNoItemList = []; const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
return { orderNoItemList }; //loginName: session.loginName,
}
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, {
params: { params: {
equipmentTypeCode: 'cache', userId: userId,
}, },
}); });
const DictListoild: [] = result.data; const getTaskRecordList = result.data;
const locList = DictListoild.map((item: any) => ({ return { getTaskRecordList };
label: item.itemName, }
value: item.itemCode, //巡检列表巡检记录
})); OrderInfList: any = [];
return { locList }; @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"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view> </view>
<view class="title">托盘变更</view> <view class="title">巡检</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<u-form class="form" ref="form" label-width="180rpx"> <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">
<view class="single"> <div class="list-top">
<view class="single-left"> <div class="name">工单号: {{ item.planCode }}</div>
<view>rfid:</view> <div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
<u-search placeholder="请扫描" :focus="shouciFocus" v-model="orderNo" :show-action="false" @search="query"></u-search> <u-icon @click="linkdetails(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
</view> </div>
<view class="single-right"> <div class="item1">车间编码: {{ item.planWorkshop }}</div>
<u-button type="primary" @click="query"></u-button> <div class="item1">周期: {{ item.planLoop }}</div>
</view> <div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
</view> <div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
<u-form-item label="物料编码"> </view>
<u-input :disabled="true" v-model="orderNoItemList.productCode" placeholder="" style="overflow: hidden" />
</u-form-item> <view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<!-- 机台 --> <div class="list-top">
<u-form-item label="规格"> <div class="name">工单号: {{ item.planCode }}</div>
<u-input :disabled="true" v-model="orderNoItemList.productSpc" placeholder="" style="overflow: hidden" /> <div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
</u-form-item> <u-icon @click="linkdetailscheck(item)" name="arrow-right" color="#2979ff" size="28"></u-icon>
<!-- 产品 --> </div>
<u-form-item label="产品"> <div class="item1">车间编码: {{ item.planWorkshop }}</div>
<u-input :disabled="true" v-model="orderNoItemList.productName" placeholder="" /> <div class="item1">周期: {{ item.planLoop }}</div>
</u-form-item> <div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<!-- 工单 --> <div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
<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>
</view> </view>
</view> </view>
</template> </template>
@ -67,7 +40,7 @@ import { BasePage } from '@/components/base/page';
import model from './model'; import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue'; import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue'; import jPicker from '@/components/J-Picker/jPicker.vue';
//import { session } from '@/store/modules/session'; // import { session } from '@/store/modules/session';
//import store from '@/store'; //import store from '@/store';
@Component({ @Component({
components: { components: {
@ -77,9 +50,19 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
}) })
export default class ChangePalletNew extends BasePage { export default class ChangePalletNew extends BasePage {
model = model; model = model;
list: any = [
{
cate_name: '今日任务',
},
{
cate_name: '巡检记录',
},
];
current: any = 0;
moren = '选择缓存区'; moren = '选择缓存区';
shouciFocus = true; shouciFocus = true;
zaiciFocus = false; zaiciFocus = false;
ischecked = false;
switchListText = [ switchListText = [
{ {
title: '是', title: '是',
@ -90,100 +73,77 @@ export default class ChangePalletNew extends BasePage {
value: 1, value: 1,
}, },
]; ];
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {}; orderNoItemList: any = {};
productCodeList: any = {}; productCodeList: any = {};
productCodelocList: 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 = {}; // remove: any = {};
async onReady() { async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation(); //await this.model.getpalletLocation();
//this.remove = this.model.WlList[0]; //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) { // selectItem(e: any) {
// this.remove = e.pickerName; // this.remove = e.pickerName;
// } // }
orderNo: any = ''; orderNo: any = '';
location: any = ''; location: any = '';
locationStatus: any = 1; locationStatus: any = 1;
async query() { //
if (this.orderNo == '' || this.orderNo.length == 0) { async change(index) {
this.customToast('请输入nficl'); this.current = index;
return; if (index == 0) {
} if (this.userinfo) {
await this.model.queryOrderNo(this.orderNo); await this.model.getTodayTask(this.userinfo.userId);
//console.log('???',model.orderNoItemList) this.listdata = model.orderNoItemList;
if (model.orderNoItemList == undefined) { }
this.customToast('该rfid未查到数据请使用正确的rfid');
} else { } 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() { linkdetails(item) {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { uni.navigateTo({
var r = (Math.random() * 16) | 0, url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
}); });
} }
async onsubmit() { linkdetailscheck(item) {
if (this.orderNo == '' || this.orderNo.length == 0) { this.ischecked = true;
this.customToast('请输入nficl'); item.ischecked = true;
return; uni.navigateTo({
} url: `/pages/equipment/Inspection/detailsview?listitem=` + encodeURIComponent(JSON.stringify(item)),
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;
}); });
} }
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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -224,61 +184,58 @@ export default class ChangePalletNew extends BasePage {
height: 88rpx; height: 88rpx;
} }
} }
.quest {
.form { width: 367px;
background-color: #fff; border-radius: 5px;
padding: 40rpx; border: rgba(121, 121, 121, 1) solid 1px;
border-radius: 10rpx; background-color: #f2f2f2;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2); padding: 7px 8px 7px 12px;
box-sizing: border-box;
.u-form-item { text-align: center;
padding: 30rpx 0; font-size: 18px;
line-height: 35rpx; font-weight: 600;
color: black;
.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;
}
}
}
} }
.bottom-bar { .list {
position: fixed; margin-top: 15px;
bottom: 0; width: 367px;
left: 0; border-radius: 5px;
right: 0; border: rgba(121, 121, 121, 1) solid 1px;
z-index: 99; background-color: #f2f2f2;
background: #ffffff; padding: 7px 8px 7px 8px;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); box-sizing: border-box;
padding: 20rpx; .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 { ::v-deep .yjy-switch-container .yjy-switch-item {
width: 100%; width: 100%;

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

@ -5,20 +5,20 @@
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view> </view>
<view class="title">检详情</view> <view class="title">检详情</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<!-- <u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs> --> <!-- <u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view class="list"> <view class="list">
<div class="item-name"> <div class="item-name">
<div class="quest">巡检任务: 巡检任务1</div> <div class="quest">工单号: {{ detailsinfolist.orderCode }}</div>
<div class="details"> <div class="details">
<div>设备编码: {{ detailsinfo.itemq }}</div> <div>设备编码: {{ detailsinfolist.equipmentCode }}</div>
<div style="margin-left: 42px">设备名称: {{ detailsinfo.itemq }}</div> <div style="margin-left: 42px">设备名称: {{ detailsinfolist.equipmentName }}</div>
</div> </div>
<div class="details"> <div class="details">
<div>车间: {{ detailsinfo.itemq }}</div> <div>车间: {{ detailsinfocontent.planWorkshop }}</div>
<div style="margin-left: 42px">产线: {{ detailsinfo.itemq }}</div> <div style="margin-left: 42px">工作中心: {{ detailsinfocontent.workCenterName }}</div>
</div> </div>
</div> </div>
<view class="single-left"> <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> --> <!-- <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> --> <!-- <uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons> -->
</view> </view>
<view class="item" v-for="(item, index) in equipmentdata" :key="index"> <view class="item" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<div class="item1">检查项: {{ item.item3 }}</div> <div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.item4 }}</div> <div class="item1">检查方法: {{ item.itemMethod }}</div>
<div class="item1 item2"> <div v-for="(item1, index1) in item.standardList" :key="index1">
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div> <div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div class="select"> <div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<u-radio-group dis v-model="item.radiovalue" @change="radioGroupChange(item, item.radiovalue, index)"> <div class="select">
<u-radio @change="radioChange" v-for="(n, index) in item.listselect" :key="index" :name="n.name" :disabled="n.disabled"> <u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
{{ n.name }} <u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="item1.detailReach == n.type ? false : true">
</u-radio> {{ n.name }}
</u-radio-group> </u-radio>
</u-radio-group>
</div>
</div> </div>
</div> <div class="item1 item2" v-if="item1.standardType == 'quantify'">
<div class="item1 item2"> <div style="white-space: nowrap">检查标准: {{ item1.standardName }}</div>
<div style="white-space: nowrap">检查标准: {{ item.item5 }}</div> <div class="input-box" id="input-box1">
<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="" />
<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
单位:mm </div>
</div> </div>
</div> </div>
</view> </view>
@ -92,6 +94,7 @@ import { BasePage } from '@/components/base/page';
import model from './model'; import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue'; import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue'; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session';
//import store from '@/store'; //import store from '@/store';
@Component({ @Component({
components: { components: {
@ -106,74 +109,38 @@ export default class ChangePalletNew extends BasePage {
cate_name: '今日任务', cate_name: '今日任务',
}, },
{ {
cate_name: '检记录', cate_name: '检记录',
}, },
]; ];
current: any = 0; current: any = 0;
shouciFocus = true; shouciFocus = true;
// //
detailsinfo: any = []; detailsinfo: any = {};
detailsinfolist: any = []; detailsinfolist: any = {};
detailsinfocontent: any = {};
// //
isshow = false; isshow = false;
inputmodal = false; inputmodal = false;
ischecked = false; ischecked = false;
radiomodal = false; radiomodal = false;
//
isaccord = false;
// //
equipmentdata: any = [ equipmentdata: any = [];
listselect: any = [
{ {
itemq: '巡检任务1', type: 0,
item2: '已巡检', name: '符合标准',
item3: '2023-08-01 - 2023-08-31', radiovalue: null,
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,
}, },
{ {
itemq: '巡检任务2', type: 1,
item2: '已巡检', name: '未达标',
item3: '2023-08-01 - 2023-08-31', radiovalue: null,
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,
}, },
]; ];
// index equipment // index equipment
equipmentindex: any = ''; equipmentindex: any = [];
orderNo: any = ''; orderNo: any = '';
location: any = ''; location: any = '';
locationStatus: any = 1; locationStatus: any = 1;
@ -186,22 +153,28 @@ export default class ChangePalletNew extends BasePage {
imgUrlList: any = []; imgUrlList: any = [];
deleteimgUrlList: any = []; deleteimgUrlList: any = [];
orderNoItemList: any = {}; orderNoItemList: any = {};
picturePath: any = 'https://cdn.uviewui.com/uview/swiper/1.jpg,https://cdn.uviewui.com/uview/swiper/2.jpg';
async onReady() { async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation(); //await this.model.getpalletLocation();
//this.remove = this.model.WlList[0]; //this.remove = this.model.WlList[0];
} }
// //
blur(item, value, index) { blur(item, value, index, index1) {
this.radiomodal = false; this.radiomodal = false;
this.inputmodal = false; this.inputmodal = false;
console.log(item, value, index); if (value > item.detailUpLimit || value < item.detailDownLimit) {
if (value > item.valuemax || value < item.valuemin) { this.equipmentindex.push(index);
this.equipmentindex = index; this.equipmentindex.push(index1);
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList2)); if (item.picturePath != null) {
this.inputmodal = true; item.picturePath = item.picturePath.split(',');
this.isshow = true; this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
this.form = item; } else {
this.imgUrlList = [];
}
// this.inputmodal = true;
// this.isshow = true;
// this.form = item;
} }
} }
changeinput(e) { changeinput(e) {
@ -215,24 +188,33 @@ export default class ChangePalletNew extends BasePage {
console.log(e, '11111'); console.log(e, '11111');
} }
// radioradio-group // radioradio-group
radioGroupChange(item, value, index) { radioGroupChange(item, value, index, index1) {
console.log(item, value, index);
this.radiomodal = false; this.radiomodal = false;
this.inputmodal = false; this.inputmodal = false;
this.equipmentindex = index; this.equipmentindex.push(index);
this.imgUrlList = JSON.parse(JSON.stringify(item.imgUrlList1)); this.equipmentindex.push(index1);
if (value == '未达标') { if (item.picturePath != null) {
this.isshow = true; item.picturePath = item.picturePath.split(',');
this.radiomodal = true; this.imgUrlList = JSON.parse(JSON.stringify(item.picturePath));
this.form = item; } 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); let str = decodeURIComponent(options.listitem);
if (str) { if (str) {
this.detailsinfo = JSON.parse(str); this.detailsinfo = JSON.parse(str);
this.ischecked = this.detailsinfo.ischecked; let query = {
console.log(this.detailsinfo); orderCode: this.detailsinfo.orderCode,
};
await this.model.getInspectionOrderInfo(query);
this.detailsinfocontent = this.model.OrderInfList;
this.detailsinfolist = this.model.OrderInfList.equ;
} }
} }
created() { created() {
@ -243,11 +225,14 @@ export default class ChangePalletNew extends BasePage {
} }
// //
confirm() { 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) { 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) { } 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() { cancel() {
@ -265,68 +250,60 @@ export default class ChangePalletNew extends BasePage {
}); });
} }
chooseImg() { chooseImg() {
// if(!this.materialObj){ uni.chooseImage({
// this.$refs.toastRef.show({ count: 9, //9
// type:"error", // sizeType: ['original', 'compressed'], //
// text:"" sourceType: ['album', 'camera'],
// }) success: (res) => {
// return // uni.showLoading();
// } //console.log('/////',res);
// uni.chooseImage({ let tempFilePaths: any = res.tempFilePaths;
// count: 9, //9 tempFilePaths.map((item) => {
// // sizeType: ['original', 'compressed'], // uni.uploadFile({
// sourceType: ['album', 'camera'], url: 'http://192.168.202.20:9000/prod-api/file/upload',
// success: (res) => { //url: '/dev-api/file/upload',
// // uni.showLoading(); fileType: 'image',
// //console.log('/////',res); filePath: item,
// let tempFilePaths: any = res.tempFilePaths; header: {
// let imgUrlList: any = res.tempFilePaths; Authorization: 'Bearer ' + session.user?.access_token,
// tempFilePaths.map((item, index) => { // 'cosmo-env-sitecode': this.$store.state.siteCode
// uni.uploadFile({ },
// url: 'http://192.168.202.20:9000/prod-api/file/upload', name: 'file',
// //url: '/dev-api/file/upload', // formData: {
// fileType: 'image', // materialCode: this.materialObj.materialCode,
// filePath: item, // },
// header: { success: (res) => {
// Authorization: 'Bearer ' + session.user?.access_token, console.log(res);
// // 'cosmo-env-sitecode': this.$store.state.siteCode uni.hideLoading();
// }, if (!res.data) {
// name: 'file', // this.$refs.toastRef.show({
// // formData: { // type:"error",
// // materialCode: this.materialObj.materialCode, // text:""
// // }, // })
// success: (res) => { return;
// console.log(res); }
// uni.hideLoading(); let data = JSON.parse(res.data);
// if (!res.data) { console.log('123dddd', data);
// // this.$refs.toastRef.show({ this.imgUrlList = [...this.imgList, data.data.url];
// // type:"error", //this.imgListName = [...this.imgListName,data.fileName];
// // text:"" // this.imgUrlList = [...this.imgUrlList, imgUrlList[index]];
// // }) //this.picUrls = this.imgList.join(",");
// return; //this.picNames = this.imgListName.join(",");
// } console.log('this.imgList', this.imgList);
// let data = JSON.parse(res.data); uni.hideLoading();
// console.log('123dddd', data); },
// this.imgList = [...this.imgList, data.data.url]; fail: (err) => {
// //this.imgListName = [...this.imgListName,data.fileName]; console.log(err);
// this.imgUrlList = [...this.imgUrlList, imgUrlList[index]]; // this.$refs.toastRef.show({
// //this.picUrls = this.imgList.join(","); // type:"error",
// //this.picNames = this.imgListName.join(","); // text:""
// console.log('this.imgList', this.imgList); // })
// uni.hideLoading(); uni.hideLoading();
// }, },
// fail: (err) => { });
// console.log(err); });
// // this.$refs.toastRef.show({ },
// // type:"error", });
// // text:""
// // })
// uni.hideLoading();
// },
// });
// });
// },
// });
} }
deleteImg(index) { deleteImg(index) {
this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList)); this.deleteimgUrlList = JSON.parse(JSON.stringify(this.imgUrlList));
@ -353,6 +330,12 @@ export default class ChangePalletNew extends BasePage {
// return; // return;
// } // }
} }
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
this.isaccord = true;
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -393,6 +376,7 @@ export default class ChangePalletNew extends BasePage {
height: 88rpx; height: 88rpx;
} }
} }
.list { .list {
margin-top: 15px; margin-top: 15px;
width: 367px; width: 367px;
@ -443,7 +427,7 @@ export default class ChangePalletNew extends BasePage {
.item1 { .item1 {
margin-bottom: 3px; margin-bottom: 3px;
white-space: 1px; white-space: 1px;
font-size: 17px; font-size: 15px;
font-weight: 600; font-weight: 600;
} }
.item2 { .item2 {
@ -479,6 +463,7 @@ export default class ChangePalletNew extends BasePage {
} }
} }
} }
.bottom-bar { .bottom-bar {
position: fixed; position: fixed;
bottom: 0; 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> <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"> <view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index">
<div class="list-top"> <div class="list-top">
<div class="name">{{ item.itemq }}</div> <div class="name">工单号: {{ item.planCode }}</div>
<div class="tag">{{ item.item2 }}</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)" name="arrow-right" color="#2979ff" size="28"></u-icon>
</div> </div>
<div class="item1">任务期限: {{ item.item3 }}</div> <div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.item4 }}</div> <div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div> <div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div> <div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view> </view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index"> <view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index">
<div class="list-top"> <div class="list-top">
<div class="name">{{ item.itemq }}</div> <div class="name">工单号: {{ item.planCode }}</div>
<div class="tag tag1">{{ item.item2 }}</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)" name="arrow-right" color="#2979ff" size="28"></u-icon>
</div> </div>
<div class="item1">任务期限: {{ item.item3 }}</div> <div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1">周期: {{ item.item4 }}</div> <div class="item1">周期: {{ item.planLoop }}</div>
<div class="item1">设备名称: {{ item.item5 }}</div> <div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">存在异常: {{ item.item6 }}</div> <div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view> </view>
</view> </view>
</template> </template>
@ -40,7 +40,7 @@ import { BasePage } from '@/components/base/page';
import model from './model'; import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue'; import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue'; import jPicker from '@/components/J-Picker/jPicker.vue';
//import { session } from '@/store/modules/session'; // import { session } from '@/store/modules/session';
//import store from '@/store'; //import store from '@/store';
@Component({ @Component({
components: { components: {
@ -73,29 +73,12 @@ export default class ChangePalletNew extends BasePage {
value: 1, value: 1,
}, },
]; ];
listdata: any = [ listdata: any = [];
{ detailsdata: any = [];
itemq: '点检任务1', orderNoItemList: any = {};
item2: '未点检', productCodeList: any = {};
item3: '2023-08-01 - 2023-08-31', productCodelocList: any = {};
item4: '每月点检', detailsdataceshi: any = [
item5: 'XXXXX',
item6: '未发现异常',
item7: 'AF-0002',
item8: '测试设备1',
item9: '车间1',
item10: '产线1',
},
{
itemq: '今日任务',
item2: '今日任务',
item3: '今日任务',
item4: '今日任务',
item5: '今日任务',
item6: '今日任务',
},
];
detailsdata: any = [
{ {
itemq: '点检任务1', itemq: '点检任务1',
item2: '已点检', item2: '已点检',
@ -105,23 +88,29 @@ export default class ChangePalletNew extends BasePage {
item6: '未发现异常', item6: '未发现异常',
}, },
{ {
itemq: '今日任务', itemq: '点检任务1',
item2: '今日任务', item2: '已点检',
item3: '今日任务', item3: '2023-08-01 - 2023-08-31',
item4: '今日任务', item4: '每月点检',
item5: '今日任务', item5: 'XXXXX',
item6: '今日任务', item6: '未发现异常',
}, },
]; ];
orderNoItemList: any = {}; userinfo: any = null;
productCodeList: any = {};
productCodelocList: any = {};
// remove: any = {}; // remove: any = {};
async onReady() { async onReady() {
await this.model.getDictList();
//await this.model.getpalletLocation(); //await this.model.getpalletLocation();
//this.remove = this.model.WlList[0]; //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) { // selectItem(e: any) {
// this.remove = e.pickerName; // this.remove = e.pickerName;
// } // }
@ -129,20 +118,30 @@ export default class ChangePalletNew extends BasePage {
location: any = ''; location: any = '';
locationStatus: any = 1; locationStatus: any = 1;
// //
change(index) { async change(index) {
this.current = 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) { linkdetails(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/equipment/Spotcheck/details?listitem=` + encodeURIComponent(JSON.stringify(item)), url: `/pages/equipment/Inspection/details?listitem=` + encodeURIComponent(JSON.stringify(item)),
}); });
} }
linkdetailscheck(item) { linkdetailscheck(item) {
this.ischecked = true; this.ischecked = true;
item.ischecked = true; item.ischecked = true;
uni.navigateTo({ 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 store from '@/store';
import http from '@/utils/request'; import http from '@/utils/request';
import { url } from '@/utils/url'; import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({ @Module({
namespaced: true, namespaced: true,
dynamic: true, dynamic: true,
@ -11,62 +10,44 @@ import { session } from '@/store/modules/session';
}) })
export class ChangePalletNew extends VuexModule { export class ChangePalletNew extends VuexModule {
orderNoItemList: any = []; orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction @MutationAction
async queryOrderNo(orderNo: any) { async getTodayTask(userId: any) {
const result: any = await http.get(url.lanjumes.product.getInfoByRfid, { const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName, //loginName: session.loginName,
params: { params: {
factoryCode: session.FactoryCode, userId: userId,
rfid: orderNo,
}, },
}); });
const orderNoItemList = result.data; const orderNoItemList = result.data;
return { orderNoItemList }; return { orderNoItemList };
} }
@MutationAction @MutationAction
async empty() { async getTaskRecord(userId: any) {
const orderNoItemList = []; const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
return { orderNoItemList }; //loginName: session.loginName,
}
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, {
params: { params: {
equipmentTypeCode: 'cache', userId: userId,
}, },
}); });
const DictListoild: [] = result.data; const getTaskRecordList = result.data;
const locList = DictListoild.map((item: any) => ({ return { getTaskRecordList };
label: item.itemName, }
value: item.itemCode, //巡检列表巡检记录
})); OrderInfList: any = [];
return { locList }; @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, username,
}); });
console.log('123guguo', loginResultuser); console.log('123guguo', loginResultuser);
uni.setStorageSync('userinfo', loginResultuser.user);
// const aaa = { // const aaa = {
// code: '1', // code: '1',
// access_token: 'wdwe2ewdwcds', // access_token: 'wdwe2ewdwcds',

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

@ -14,7 +14,6 @@ const http = new Request({
//baseURL: process.env.VUE_APP_BASE_URL, //baseURL: process.env.VUE_APP_BASE_URL,
//baseURL: 'http://192.168.3.93:81', //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['Referrer-Policy'] = 'strict-origin-when-cross-origin';
config.header['poolName'] = session.PoolName;
try { try {
const token = session.user.access_token; //store.state.session.accessToken; const token = session.user.access_token; //store.state.session.accessToken;
if (token) { if (token) {

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
// const qianzhuione = '/dev-api'; // '/prod-api'生产环境 // '/dev-api'开发环境是调后端本地时使用 const qianzhuione = '/dev-api'; // '/prod-api'生产环境 // '/dev-api'开发环境是调后端本地时使用
const qianzhuione = '/prod-api'; // const qianzhuione = '/prod-api';
export const url = { export const url = {
wmspda: { wmspda: {
system: { system: {
@ -41,6 +41,37 @@ export const url = {
}, },
// 销售出库/sellout/showProduceCode/ /sellout/s/订单号/产品编码 // 销售出库/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: { SaleOutWH: {
// 根据交货单号查询下面的产品编码 // 根据交货单号查询下面的产品编码
showProduceCode: qianzhuione + '/wms/sellout/showProduceCode', showProduceCode: qianzhuione + '/wms/sellout/showProduceCode',

Loading…
Cancel
Save