质量管理新增备品备件出入库页面问题

master
李靖 2 years ago
parent be06960065
commit 6d9a913d4f

@ -0,0 +1,140 @@
<template>
<view class="jPicker">
<u-modal v-model="isshow" class="modal" :show-cancel-button="true" :show-title="false" @cancel="cancel" @confirm="confirm">
<div class="upload-name">
<u-field v-for="(item, index) in tagslist" :key="index" v-model="item.numberall" :label="item.label" placeholder="" @input="handleInput(index)" :focus="isfocus"></u-field>
</div>
</u-modal>
<u-calendar v-model="show" :mode="mode" @change="change"></u-calendar>
</view>
</template>
<script lang="ts">
import { session } from '@/store/modules/session';
/**
* 选择组件
* @property {Array} options 选择数组
* @property {String} showKey 显示的对象键名
* @property {String} val 默认选中下标
* @property {String} valKey 取值的对象键名
* @property {Boolean} disabled 是否只读
* * @property {String} moren 是否只读
* @event {Function} position 搜索框位置
* @event {Function} sure 确认事件
* @example <jPicker :disabled="false" class="cont" @sure="bindPickerChange($event,'TYPE')" showKey="Name" valKey="Value" :val="CurrentType" :options="FilterArray" />
*/
export default {
components: {
// #ifdef H5
// #endif
},
name: 'badType',
data() {
return {
show: false,
mode: 'date',
tagslist: [],
selectList1: {},
//moren: this.moren,
isshow: false,
tagsvalue: '111',
isfocus: false,
searchPosition: 'middle',
//picker
// unSelStyle:'',
//'background-color:rgba(0, 74, 255, 0.44);',//'background-color:rgba(220, 250, 9, 0.44);',rgba(250, 9, 9, 0.44)
selStyle: 'height:50px;',
keyWord: '',
mobile: '',
itemindex: '',
tagslistcopy: [],
moren1: '接受质量限',
};
},
props: ['options', 'moren', 'showKey', 'valKey', 'val', 'position', 'disabled', 'bgColor', 'sureColor', 'focus'],
//,,,,,
watch: {
options(n) {
console.log('22998', n);
},
// bug
// uniapp prop,使computed
reset(v) {
if (v === '' || v === undefined || v === null) {
this.nSel = -1;
}
},
},
computed: {
reset() {
return this.val;
},
},
methods: {
async selectProductlocCode3(e: any) {
this.selectList1 = e.pickerName;
let query = {
factoryCode: session.PoolName,
checkManCode: session.userName,
checkStatus: 0,
checkType: this.selectList.value,
checkLoc: this.selectList1.value,
};
this.getDefectListPDA();
await this.model.getCheckTaskListall(query);
this.list = this.model.CheckTaskListall;
},
open() {
this.show = true;
// this.tagslist = JSON.parse(JSON.stringify(item.babtype));
// this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
},
change(e) {
console.log(e);
// this.tagslist = JSON.parse(JSON.stringify(item.babtype));
// this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
},
handleInput(index) {
let value = this.tagslist[index].numberall;
//
const newValue = value.replace(/[^\d]/g, '');
//
this.$set(this.tagslist, index, { ...this.tagslist[index], numberall: newValue });
},
cancel() {
console.log('22998111', this.tagslist, this.itemindex);
this.tagslist = this.tagslistcopy;
this.tagslist.forEach((item) => {
if (item.numberall == '') {
item.numberall = 0;
}
});
this.$emit('bindtypelist', this.tagslist, this.itemindex);
},
confirm() {
this.tagslist.forEach((item) => {
if (item.numberall == '') {
item.numberall = 0;
}
});
this.$emit('bindtypelist', this.tagslist, this.itemindex);
},
},
};
</script>
<style lang="scss" scoped>
.jPicker {
width: 100%;
.showLine {
// border-left:1px solid #000000;
width: 100%;
display: inline-block;
}
.upload-name {
padding: 10px 15px;
}
}
</style>

@ -196,6 +196,22 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/equipment/SparepartsInto/index",
"style": {
"navigationBarTitleText": "备品备件入库",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/equipment/SparepartsIntoOut/index",
"style": {
"navigationBarTitleText": "备品备件出库",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/quality/index",
"style": {

@ -6,7 +6,7 @@
<u-icon class="icon" name="arrow-left" @click="Back()" />
</view>
<view class="title">巡检详情</view>
<view class="right"></view>
<view class="right"> </view>
</view>
<!-- <u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
@ -31,15 +31,15 @@
</view> -->
<!-- <uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons> -->
</view>
<view class="item" v-show="isaccord" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<view class="item" v-show="isaccord" v-for="(item, index) in detailsinfolist.detailList" :key="index + 'a'">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div v-for="(item1, index1) in item.standardList" :key="index1 + 'b'">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div>检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="n.disabled">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn + 'c'" :name="n.type" :disabled="n.disabled">
{{ n.name }}
</u-radio>
</u-radio-group>
@ -74,7 +74,7 @@
<!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft()">
<view class="photoList">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index + 'd'">
<view class="closeBtn" @click="deleteImg(index)">
<image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
</view>
@ -454,6 +454,8 @@ export default class ChangePalletNew extends BasePage {
});
return;
}
this.detailsinfolist.planPersonName = session.nickName;
this.detailsinfolist.planPerson = session.userName;
let query = this.detailsinfolist;
await this.model.updateInspectionRecord(query);
if (this.model.SubmitCode == '200') {

@ -26,15 +26,15 @@
<!-- <u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search" :focus="shouciFocus" v-model="orderNo" :show-action="false"></u-search> -->
<!-- <uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons> -->
</view>
<view class="item" v-for="(item, index) in detailsinfolist.detailList" :key="index">
<view class="item" v-for="(item, index) in detailsinfolist.detailList" :key="index + 'a'">
<div class="item1">检查项: {{ item.itemName }}</div>
<div class="item1">检查方法: {{ item.itemMethod }}</div>
<div v-for="(item1, index1) in item.standardList" :key="index1">
<div v-for="(item1, index1) in item.standardList" :key="index1 + 'b'">
<div class="item1 item2" v-if="item1.standardType == 'qualitative'">
<div @click="checkimg(item1, item1.detailReach, index, index1)">检查标准: {{ item1.standardName }}</div>
<div class="select">
<u-radio-group v-model="item1.detailReach" @change="radioGroupChange(item1, item1.detailReach, index, index1)">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type" :disabled="item1.detailReach == n.type ? false : true">
<u-radio @change="radioChange" v-for="(n, indexn) in listselect" :key="indexn + 'c'" :name="n.type" :disabled="item1.detailReach == n.type ? false : true">
{{ n.name }}
</u-radio>
</u-radio-group>
@ -54,13 +54,14 @@
<view class="bottom-bar">
<div class="item-name">
<!-- <div class="quest">点检人: 刘XX</div> -->
<div class="details">
<div>巡检人:{{ detailsinfolist.planPerson }}</div>
<div style="margin-left: 42px">巡检时间:{{ detailsinfolist.orderStart }}</div>
<!-- style="margin-left: 42px" -->
<div class="details details1">
<div>巡检人:{{ detailsinfolist.planPersonName }}</div>
<div>是否异常: {{ detailsinfolist.repairCode == null ? '否' : '是' }}</div>
</div>
<div class="details">
<div>是否异常: {{ detailsinfolist.repairCode == null ? '否' : '是' }}</div>
<div style="margin-left: 42px">报修单:{{ detailsinfolist.repairCode }}</div>
<div>巡检时间:{{ detailsinfolist.orderStart }}</div>
<div>报修单:{{ detailsinfolist.repairCode }}</div>
</div>
</div>
</view>
@ -70,7 +71,7 @@
<!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft()">
<view class="photoList">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index">
<view class="itemBox photoBox" v-for="(img, index) in imgList" :key="index + 'd'">
<!-- <view class="closeBtn" @click="deleteImg(index)">
<image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
</view> -->
@ -352,7 +353,7 @@ export default class ChangePalletNew extends BasePage {
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
padding: 118rpx 30rpx 192rpx;
min-height: 100%;
.header {
@ -395,6 +396,7 @@ export default class ChangePalletNew extends BasePage {
background-color: #ffffff;
padding: 7px 8px 7px 12px;
box-sizing: border-box;
margin-bottom: 16px;
.item-name {
.quest {
// width: 367px;
@ -493,7 +495,16 @@ export default class ChangePalletNew extends BasePage {
margin-bottom: 17px;
}
.details {
justify-content: space-around;
// justify-content: space-around;
// display: flex;
font-size: 17px;
font-weight: 600;
// justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.details1 {
justify-content: space-between;
display: flex;
font-size: 17px;
font-weight: 600;

@ -6,15 +6,24 @@
<u-icon class="icon" name="arrow-left" @click="goback()" />
</view>
<view class="title">巡检</view>
<view class="right"></view>
<view class="right">
<!-- <u-icon name="setting-fill"> </u-icon> -->
</view>
</view>
<u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
<view class="single-left" style="background-color: #ffffff; margin-top: 10px">
<!-- <view>扫描设备码:</view> -->
<u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
<uni-icons type="scan" size="22" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons>
</view>
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index" @click="linkdetails(item, isorderNo)">
<div class="singlebox">
<view class="single-left" style="background-color: #ffffff">
<!-- <view>扫描设备码:</view> -->
<u-search style="" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
<uni-icons class="Scan" type="scan" size="22" @click="scanCodeOne" style="color: black; background-color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons>
</view>
<!-- <view class="single-left" style="background-color: #ffffff; margin-top: 10px; display: flex; align-items: center">
<view style="margin-right: 10px">日期:</view>
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" />
<u-icon name="close-circle-fill" @click="clear" color="rgb(96, 98, 102)" size="28"></u-icon>
</view> -->
</div>
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index + 'a'" @click="linkdetails(item, isorderNo)">
<div class="list-top">
<div class="name">工单号: {{ item.orderCode }}</div>
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
@ -28,7 +37,7 @@
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index" @click="linkdetailscheck(item, isorderNo)">
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index + 'b'" @click="linkdetailscheck(item, isorderNo)">
<div class="list-top">
<div class="name">工单号: {{ item.orderCode }}</div>
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
@ -42,6 +51,8 @@
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view>
<u-toast ref="uToast" />
<Attrssetup sureColor="#ff0000" ref="attrssetup1" showKey="label" valKey="value" />
<u-calendar v-model="iscalendar" :mode="mode" @change="changetime"></u-calendar>
</view>
</template>
<script lang="ts">
@ -52,12 +63,15 @@ import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue';
import model1 from '../../equipment/Repairbx/model';
const mpaasScanModule: any = uni.requireNativePlugin('Mpaas-Scan-Module');
import Attrssetup from '@/components/attrs-setup/attrs-setup.vue';
import moment from 'moment';
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
components: {
chooseOne,
jPicker,
Attrssetup,
},
})
export default class ChangePalletNew extends BasePage {
@ -76,6 +90,10 @@ export default class ChangePalletNew extends BasePage {
shouciFocus = true;
zaiciFocus = false;
ischecked = false;
isattrssetup = false;
iscalendar = false;
mode = 'date';
createTime: any = null;
switchListText = [
{
title: '是',
@ -91,6 +109,7 @@ export default class ChangePalletNew extends BasePage {
orderNoItemList: any = {};
productCodeList: any = {};
productCodelocList: any = {};
detailsdataceshi: any = [
{
itemq: '巡检任务1',
@ -113,15 +132,21 @@ export default class ChangePalletNew extends BasePage {
isorderNo: any = null;
// remove: any = {};
async onShow() {
this.createTime = moment().format('YYYY-MM-DD');
console.log(uni.getStorageSync('userinfo'));
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userName);
console.log(model.orderNoItemList);
let query = {
userId: this.userinfo.userName,
// createTime: this.createTime,
createTime: '',
};
await this.model.getTodayTask(query);
this.listdata = model.orderNoItemList;
}
}
async onReady() {
this.createTime = moment().format('YYYY-MM-DD');
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
@ -156,6 +181,9 @@ export default class ChangePalletNew extends BasePage {
},
);
}
clear() {
this.createTime = null;
}
async onLoad() {
// console.log(uni.getStorageSync('userinfo'));
}
@ -181,6 +209,36 @@ export default class ChangePalletNew extends BasePage {
}
}
}
onfocus() {
this.iscalendar = true;
}
async changetime(e) {
console.log(e);
this.createTime = e.result;
if (this.current == 0) {
if (this.userinfo) {
let query = {
userId: this.userinfo.userName,
// createTime: this.createTime,
createTime: '',
};
await this.model.getTodayTask(query);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
let query = {
userId: this.userinfo.userName,
// createTime: this.createTime,
createTime: '',
};
await this.model.getTaskRecord(query);
this.detailsdata = model.getTaskRecordList;
}
}
// this.tagslist = JSON.parse(JSON.stringify(item.babtype));
// this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
}
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
@ -192,12 +250,22 @@ export default class ChangePalletNew extends BasePage {
this.current = index;
if (index == 0) {
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userName);
let query = {
userId: this.userinfo.userName,
// createTime: this.createTime,
createTime: '',
};
await this.model.getTodayTask(query);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
await this.model.getTaskRecord(this.userinfo.userName);
let query = {
userId: this.userinfo.userName,
// createTime: this.createTime,
createTime: '',
};
await this.model.getTaskRecord(query);
this.detailsdata = model.getTaskRecordList;
}
}
@ -233,8 +301,18 @@ export default class ChangePalletNew extends BasePage {
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.singlebox {
margin-top: 10px;
background-color: #fff;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(128, 128, 128, 0.2);
}
.single-left {
display: flex;
.Scan {
border-radius: 6px;
}
}
.header {
position: fixed;

@ -15,24 +15,26 @@ export class Inspection extends VuexModule {
// 点检spotInspection
// 巡检inspection
// 保养maintenance
async getTodayTask(userId: any) {
async getTodayTask(query: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName,
params: {
userId: userId,
userId: query.userId,
planType: 'inspection',
createTime: query.createTime,
},
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async getTaskRecord(userId: any) {
async getTaskRecord(query: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
//loginName: session.loginName,
params: {
userId: userId,
userId: query.userId,
planType: 'inspection',
createTime: query.createTime,
},
});
const getTaskRecordList = result.data;

@ -246,7 +246,7 @@ export default class ChangePalletNew extends BasePage {
workStartTime: moment().format('YYYY-MM-DD HH:mm:ss'),
};
console.log(query);
await this.model.updateInspectionRecord(query);
await this.model.updateDowntime(query);
if (this.model.SubmitCode.code == 200) {
// (this.$refs.uToast as any).show({
// title: '',

@ -118,7 +118,7 @@ export default class ChangePalletNew extends BasePage {
workStatus: '0',
workOutsource: '0',
};
await this.model.getTodayTask(query);
await this.model.getMaintenancePendRecords(query);
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
@ -142,7 +142,7 @@ export default class ChangePalletNew extends BasePage {
workStatus: '0',
workOutsource: '0',
};
await this.model.getTodayTask(query);
await this.model.getMaintenancePendRecords(query);
this.listdata = model.orderNoItemList;
}
} else {

@ -13,8 +13,8 @@ export class Repair extends VuexModule {
orderNoItemList: any = [];
getTaskRecordList: any = [];
@MutationAction
async getTodayTask(params: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.getTodayTask, { params: params });
async getMaintenancePendRecords(params: any) {
const result: any = await http.get(url.lanjuequipment.product.Repair.getMaintenancePendRecords, { params: params });
const orderNoItemList = result.data;
return { orderNoItemList };
}
@ -35,7 +35,7 @@ export class Repair extends VuexModule {
SubmitCode: any = '';
//巡检提交
@MutationAction
async updateInspectionRecord(params: any) {
async updateDowntime(params: any) {
const result: any = await http.put(url.lanjuequipment.product.Repair.updateDowntime, params);
const SubmitCode: [] = result;
return { SubmitCode };

@ -686,7 +686,8 @@ export default class ChangePalletNew extends BasePage {
query.workCost = this.formdata.workCost;
query.workReason = this.workReason.value;
query.repairMeasures = this.repairMeasures.value;
console.log(query, this.isvalue);
query.workPerson = session.userName;
query.workPersonName = session.nickName;
await this.model.updateMaintenanceRecords(query);
if (this.model.SubmitCode.code == '200') {
(this.$refs.uToast as any).show({

@ -104,7 +104,7 @@
<div class="quest">维修单</div>
<u-form class="form" ref="form" label-width="230rpx">
<u-form-item label="维修人:">
{{ detailsinfolist.workPerson }}
{{ detailsinfolist.workPersonName }}
</u-form-item>
<!-- 机台 -->
<!-- <u-form-item label="维修结果:">

@ -171,8 +171,8 @@ export default class ChangePalletNew extends BasePage {
this.formdata = {};
this.imgList = [];
this.orderDesc = {};
uni.showLoading({ title: '加载中' });
this.uni.showToast({ title: '成功' });
// uni.showLoading({ title: '' });
// this.uni.showToast({ title: '' });
// this.customToast('');
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({

@ -0,0 +1,445 @@
<!-- 扫描rfid,选择缓存区根据选择的缓存区查询库位勾选是否取走托盘提交托盘变更信息 -->
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">备品备件入库</view>
<view class="right"></view>
</view>
<div class="singlebox">
<view class="single-left" style="background-color: #ffffff">
<!-- <view>扫描设备码:</view> -->
<u-search style="" placeholder="请扫描" @search="query" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
</view>
</div>
<u-form class="form" ref="uForm" :model="formdata" label-width="180rpx">
<!-- 单号 -->
<u-form-item label="备品备件编码" prop="spareCode">
<u-input placeholder="请输入编码" v-model="formdata.spareCode" />
</u-form-item>
<!-- 订单 -->
<u-form-item label="备品备件名称" prop="spareName">
<u-input placeholder="请输入名称" v-model="formdata.spareName" />
</u-form-item>
<u-form-item label="现有库存" prop="amount">
<u-input placeholder="请输入库存" v-model="orderNoItemList.amount" />
</u-form-item>
<!-- 机台 -->
<u-form-item label="入库数量" prop="quantity">
<u-input type="number" placeholder="请输入数量" v-model="formdata.quantity" />
</u-form-item>
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>
<!-- <view class="list" >
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" :clearable="false" />
<div class="item1" style="color: red">设备编码:{{ item.equipmentCode }}</div>
<div class="item1" style="color: red">设备名称:{{ item.equipmentName }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1" style="color: red">周期: {{ item.planLoop }}{{ item.planLoopType == 'month' ? '月' : item.planLoopType == 'day' ? '日' : item.planLoopType == 'year' ? '年' : '周' }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view> -->
<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>
<u-toast ref="uToast" />
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue';
//import store from '@/store';
@Component({
components: {
chooseOne,
jPicker,
},
})
export default class SparepartsInto extends BasePage {
params: any = { year: true, month: true, day: true, hour: true, minute: true, second: true };
endTime: any = {};
model = model;
orderNoItemList: any = {};
orderNo: any = '';
formdata: any = {
spareCode: null,
spareName: null,
quantity: null,
storageId: null,
};
shouciFocus = true;
rules: any = {
spareCode: [
{
required: true,
message: '编码不能为空',
//
trigger: ['change', 'blur'],
},
],
spareName: [
{
required: true,
message: '名称不能为空',
trigger: ['change', 'blur'],
},
],
amount: [
{
required: false,
message: '库存不能为空',
trigger: ['change', 'blur'],
},
],
quantity: [
{
required: true,
message: '数量不能为空',
trigger: ['change'],
},
{
validator: (rule: any, value: number, callback: (error?: Error) => void) => {
if (value <= 0) {
callback(new Error('数量必须大于0'));
} else {
callback();
}
},
trigger: ['change'],
},
],
};
async onReady() {
(this.$refs.uForm as any).setRules(this.rules);
}
onShow() {
// (this.$refs.uForm as any).setRules(this.rules);
}
cleardata() {
(this.$refs.uForm as any).resetFields();
this.orderNoItemList = [];
this.orderNo = '';
this.shouciFocus = false;
this.$nextTick(() => {
this.shouciFocus = true;
});
console.log(this.formdata);
// (this.$refs.uForm as any).setRules(this.rules);
}
async query() {
this.formdata = {};
// uni.showLoading({ title: '' });
// this.customToast('');
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请扫码条码',
type: 'default',
});
return;
}
await this.model.queryOrderNo(this.orderNo);
if (model.orderNoItemList == undefined) {
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
});
} else {
if (this.orderNoItemList.productCode == 'EmptyPallet') {
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
});
return;
} else {
this.orderNoItemList = model.orderNoItemList;
this.formdata = this.orderNoItemList;
}
}
}
async onsubmit() {
(this.$refs.uForm as any).setRules(this.rules);
(this.$refs.uForm as any).validate(async (valid) => {
if (valid) {
let query = {
spareCode: this.formdata.spareCode,
spareName: this.formdata.spareName,
amount: this.formdata.quantity,
storageId: this.formdata.storageId,
inOutType: 'type_in',
};
console.log(query);
this.cleardata();
await this.model.sparePartsInOutStorage(query);
if (this.model.SubmitCode.code == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'default',
});
this.cleardata();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'default',
});
}
} else {
// console.log('');
}
});
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.singlebox {
margin-top: 10px;
background-color: #fff;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(128, 128, 128, 0.2);
}
.single-left {
display: flex;
.Scan {
border-radius: 6px;
}
}
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 30rpx;
padding-right: 10px;
border-radius: 15px 15px 15px 15px;
margin-top: 10px;
.u-form-item {
padding: 10rpx 0;
line-height: 35rpx;
}
.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: 25px;
height: 70rpx;
background-color: #fa3534;
font-size: 12px;
}
button:first-child {
margin-left: 3px;
}
}
}
.photoList {
display: flex;
padding-top: 12rpx;
.chooseBtn {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
border: 2rpx dashed #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
.inner {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.desc {
font-size: 28rpx;
font-weight: 400;
color: #24252a;
line-height: 40rpx;
}
.img {
width: 50rpx;
height: 50rpx;
margin-bottom: 6rpx;
}
}
.photoBox {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
position: relative;
.closeBtn {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 36rpx;
height: 36rpx;
.img {
width: 36rpx;
height: 36rpx;
}
}
.img {
width: 202rpx;
height: 202rpx;
border-radius: 12rpx;
}
}
.itemBox {
flex: 0 0 202rpx;
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
}
}
.listform {
padding: 0px;
}
.list {
background-color: #ffffff;
padding: 21px;
box-sizing: border-box;
margin-top: 10px;
border-radius: 15px 15px 15px 15px;
border: rgba(121, 121, 121, 1) solid 1px;
.item-name {
.quest {
// width: 367px;
// border-radius: 5px;
// border: rgba(121, 121, 121, 1) solid 1px;
// background-color: #ffffff;
padding: 7px 8px 7px 12px;
box-sizing: border-box;
text-align: center;
font-size: 18px;
font-weight: 600;
color: black;
}
.details {
display: flex;
font-size: 16px;
// font-weight: 600;
// justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
::v-deep .yjy-switch-container .yjy-switch-item {
width: 100%;
}
::v-deep .yjy-switch-container {
width: 50%;
}
.listbottom ::v-deep .uni-input-input {
width: 94%;
padding: 5px;
}
.listbottom1 ::v-deep .uni-input-input {
border: 1px solid black;
width: 94%;
padding: 5px;
}
::v-deep .u-form-item {
padding: 6px 0;
}
::v-deep .uni-textarea-textarea {
border: 1px solid black;
width: 94%;
padding: 5px;
}
.photoList1 {
width: 220px;
overflow-y: scroll;
border: 1px solid black;
}
}
</style>

@ -0,0 +1,36 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.equipment.SparepartsInto',
})
export class SparepartsInto extends VuexModule {
rowdata: any = [];
orderNoItemList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjuequipment.product.SparepartsInto.querySpareDetailBySpareCode + orderNo);
const orderNoItemList = result.data;
return { orderNoItemList };
}
getsparePartsInOutList: any = [];
SubmitCode: any = '';
@MutationAction
// 点检spotInspection
// 巡检inspection
// 保养maintenance
async sparePartsInOutStorage(query: any) {
const result: any = await http.get(url.lanjuequipment.product.SparepartsInto.sparePartsInOutStorage, {
//loginName: session.loginName,
params: query,
});
const SubmitCode: [] = result;
return { SubmitCode };
}
}
export default getModule(SparepartsInto);

@ -0,0 +1,445 @@
<!-- 扫描rfid,选择缓存区根据选择的缓存区查询库位勾选是否取走托盘提交托盘变更信息 -->
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">备品备件出库</view>
<view class="right"></view>
</view>
<div class="singlebox">
<view class="single-left" style="background-color: #ffffff">
<!-- <view>扫描设备码:</view> -->
<u-search style="" placeholder="请扫描" @search="query" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search>
</view>
</div>
<u-form class="form" ref="uForm" :model="formdata" label-width="180rpx">
<!-- 单号 -->
<u-form-item label="备品备件编码" prop="spareCode">
<u-input placeholder="请输入编码" v-model="formdata.spareCode" />
</u-form-item>
<!-- 订单 -->
<u-form-item label="备品备件名称" prop="spareName">
<u-input placeholder="请输入名称" v-model="formdata.spareName" />
</u-form-item>
<u-form-item label="现有库存" prop="amount">
<u-input placeholder="请输入库存" v-model="orderNoItemList.amount" />
</u-form-item>
<!-- 机台 -->
<u-form-item label="出库数量" prop="quantity">
<u-input type="number" placeholder="请输入数量" v-model="formdata.quantity" />
</u-form-item>
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>
<!-- <view class="list" >
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" :clearable="false" />
<div class="item1" style="color: red">设备编码:{{ item.equipmentCode }}</div>
<div class="item1" style="color: red">设备名称:{{ item.equipmentName }}</div>
<div class="item1">车间编码: {{ item.planWorkshop }}</div>
<div class="item1" style="color: red">周期: {{ item.planLoop }}{{ item.planLoopType == 'month' ? '月' : item.planLoopType == 'day' ? '日' : item.planLoopType == 'year' ? '年' : '周' }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
<div class="item1">循环执行时间结束: {{ item.planLoopEnd }}</div>
</view> -->
<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>
<u-toast ref="uToast" />
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue';
//import store from '@/store';
@Component({
components: {
chooseOne,
jPicker,
},
})
export default class SparepartsInto extends BasePage {
params: any = { year: true, month: true, day: true, hour: true, minute: true, second: true };
endTime: any = {};
model = model;
orderNoItemList: any = {};
orderNo: any = '';
formdata: any = {
spareCode: null,
spareName: null,
quantity: null,
storageId: null,
};
shouciFocus = true;
rules: any = {
spareCode: [
{
required: true,
message: '编码不能为空',
//
trigger: ['change', 'blur'],
},
],
spareName: [
{
required: true,
message: '名称不能为空',
trigger: ['change', 'blur'],
},
],
amount: [
{
required: false,
message: '库存不能为空',
trigger: ['change', 'blur'],
},
],
quantity: [
{
required: true,
message: '数量不能为空',
trigger: ['change'],
},
{
validator: (rule: any, value: number, callback: (error?: Error) => void) => {
if (value <= 0) {
callback(new Error('数量必须大于0'));
} else {
callback();
}
},
trigger: ['change'],
},
],
};
async onReady() {
(this.$refs.uForm as any).setRules(this.rules);
}
onShow() {
// (this.$refs.uForm as any).setRules(this.rules);
}
cleardata() {
(this.$refs.uForm as any).resetFields();
this.orderNoItemList = [];
this.orderNo = '';
this.shouciFocus = false;
this.$nextTick(() => {
this.shouciFocus = true;
});
console.log(this.formdata);
// (this.$refs.uForm as any).setRules(this.rules);
}
async query() {
this.formdata = {};
// uni.showLoading({ title: '' });
// this.customToast('');
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请扫码条码',
type: 'default',
});
return;
}
await this.model.queryOrderNo(this.orderNo);
if (model.orderNoItemList == undefined) {
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
});
} else {
if (this.orderNoItemList.productCode == 'EmptyPallet') {
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
});
return;
} else {
this.orderNoItemList = model.orderNoItemList;
this.formdata = this.orderNoItemList;
}
}
}
async onsubmit() {
(this.$refs.uForm as any).setRules(this.rules);
(this.$refs.uForm as any).validate(async (valid) => {
if (valid) {
let query = {
spareCode: this.formdata.spareCode,
spareName: this.formdata.spareName,
amount: this.formdata.quantity,
storageId: this.formdata.storageId,
inOutType: 'type_out',
};
console.log(query);
this.cleardata();
await this.model.sparePartsInOutStorage(query);
if (this.model.SubmitCode.code == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'default',
});
this.cleardata();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'default',
});
}
} else {
// console.log('');
}
});
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.singlebox {
margin-top: 10px;
background-color: #fff;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(128, 128, 128, 0.2);
}
.single-left {
display: flex;
.Scan {
border-radius: 6px;
}
}
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 30rpx;
padding-right: 10px;
border-radius: 15px 15px 15px 15px;
margin-top: 10px;
.u-form-item {
padding: 10rpx 0;
line-height: 35rpx;
}
.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: 25px;
height: 70rpx;
background-color: #fa3534;
font-size: 12px;
}
button:first-child {
margin-left: 3px;
}
}
}
.photoList {
display: flex;
padding-top: 12rpx;
.chooseBtn {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
border: 2rpx dashed #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
.inner {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.desc {
font-size: 28rpx;
font-weight: 400;
color: #24252a;
line-height: 40rpx;
}
.img {
width: 50rpx;
height: 50rpx;
margin-bottom: 6rpx;
}
}
.photoBox {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
position: relative;
.closeBtn {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 36rpx;
height: 36rpx;
.img {
width: 36rpx;
height: 36rpx;
}
}
.img {
width: 202rpx;
height: 202rpx;
border-radius: 12rpx;
}
}
.itemBox {
flex: 0 0 202rpx;
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
}
}
.listform {
padding: 0px;
}
.list {
background-color: #ffffff;
padding: 21px;
box-sizing: border-box;
margin-top: 10px;
border-radius: 15px 15px 15px 15px;
border: rgba(121, 121, 121, 1) solid 1px;
.item-name {
.quest {
// width: 367px;
// border-radius: 5px;
// border: rgba(121, 121, 121, 1) solid 1px;
// background-color: #ffffff;
padding: 7px 8px 7px 12px;
box-sizing: border-box;
text-align: center;
font-size: 18px;
font-weight: 600;
color: black;
}
.details {
display: flex;
font-size: 16px;
// font-weight: 600;
// justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
::v-deep .yjy-switch-container .yjy-switch-item {
width: 100%;
}
::v-deep .yjy-switch-container {
width: 50%;
}
.listbottom ::v-deep .uni-input-input {
width: 94%;
padding: 5px;
}
.listbottom1 ::v-deep .uni-input-input {
border: 1px solid black;
width: 94%;
padding: 5px;
}
::v-deep .u-form-item {
padding: 6px 0;
}
::v-deep .uni-textarea-textarea {
border: 1px solid black;
width: 94%;
padding: 5px;
}
.photoList1 {
width: 220px;
overflow-y: scroll;
border: 1px solid black;
}
}
</style>

@ -0,0 +1,36 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.equipment.SparepartsInto',
})
export class SparepartsInto extends VuexModule {
rowdata: any = [];
orderNoItemList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.get(url.lanjuequipment.product.SparepartsInto.querySpareDetailBySpareCode + orderNo);
const orderNoItemList = result.data;
return { orderNoItemList };
}
getsparePartsInOutList: any = [];
SubmitCode: any = '';
@MutationAction
// 点检spotInspection
// 巡检inspection
// 保养maintenance
async sparePartsInOutStorage(query: any) {
const result: any = await http.get(url.lanjuequipment.product.SparepartsInto.sparePartsInOutStorage, {
//loginName: session.loginName,
params: query,
});
const SubmitCode: [] = result;
return { SubmitCode };
}
}
export default getModule(SparepartsInto);

@ -389,6 +389,8 @@ export default class ChangePalletNew extends BasePage {
});
return;
}
this.detailsinfolist.planPersonName = session.nickName;
this.detailsinfolist.planPerson = session.userName;
let query = this.detailsinfolist;
await this.model.updateInspectionRecord(query);
if (this.model.SubmitCode == '200') {

@ -54,13 +54,13 @@
<view class="bottom-bar">
<div class="item-name">
<!-- <div class="quest">点检人: 刘XX</div> -->
<div class="details">
<div>点检人:{{ detailsinfolist.planPerson }}</div>
<div style="margin-left: 42px">点检时间:{{ detailsinfolist.orderStart }}</div>
<div class="details details1">
<div>点检人:{{ detailsinfolist.planPersonName }}</div>
<div>是否异常: {{ detailsinfolist.repairCode == null ? '否' : '是' }}</div>
</div>
<div class="details">
<div>是否异常: {{ detailsinfolist.repairCode == null ? '否' : '是' }}</div>
<div style="margin-left: 42px">报修单:{{ detailsinfolist.repairCode }}</div>
<div>点检时间:{{ detailsinfolist.orderStart }}</div>
<div>报修单:{{ detailsinfolist.repairCode }}</div>
</div>
</div>
</view>
@ -511,6 +511,15 @@ export default class ChangePalletNew extends BasePage {
align-items: center;
margin-bottom: 8px;
}
.details1 {
justify-content: space-between;
display: flex;
font-size: 17px;
font-weight: 600;
// justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
}
}
.modal {

@ -9,12 +9,23 @@
<view class="right"></view>
</view>
<u-tabs name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
<view class="single-left" style="background-color: #ffffff; margin-top: 10px">
<!-- <view>扫描设备码:</view> -->
<!-- <view class="single-left" style="background-color: #ffffff; margin-top: 10px">
<u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"></u-search>
<!-- <uni-icons type="scan" size="35" @click="scanCodeOne" style="color: #0b9eff; margin: auto; padding: 22rpx"></uni-icons> -->
</view>
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index" @click="linkdetails(item, isorderNo)">
</view> -->
<div class="singlebox">
<view class="single-left" style="background-color: #ffffff">
<!-- <view>扫描设备码:</view> -->
<u-search style="border: 1px solid #a19d9d" placeholder="请扫描" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"></u-search>
</view>
<view class="single-left" style="background-color: #ffffff; margin-top: 10px; display: flex; align-items: center">
<view style="margin-right: 10px">日期:</view>
<!-- <u-search style="" placeholder="请选择" @search="search(orderNo)" :focus="shouciFocus" v-model="orderNo" :show-action="false"> </u-search> -->
<u-input @click="onfocus" placeholder="请选择日期" v-model="createTime" :clearable="false" />
<u-icon name="close-circle-fill" @click="clear" color="rgb(96, 98, 102)" size="28"></u-icon>
<!-- close-circle -->
</view>
</div>
<view class="list" v-show="current == 0" v-for="(item, index) in listdata" :key="index + 'a'" @click="linkdetails(item, isorderNo)">
<div class="list-top">
<div class="name">工单号: {{ item.orderCode }}</div>
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
@ -27,7 +38,7 @@
<div class="item1">创建时间: {{ item.createTime }}</div>
<div class="item1">循环执行时间开始: {{ item.planLoopStart }}</div>
</view>
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index" @click="linkdetailscheck(item, isorderNo)">
<view class="list" v-show="current != 0" v-for="(item, index) in detailsdata" :key="index + 'b'" @click="linkdetailscheck(item, isorderNo)">
<div class="list-top">
<div class="name">工单号: {{ item.orderCode }}</div>
<div class="tag">{{ item.orderStatus == 0 ? '进行中' : item.orderStatus == 1 ? '已完成' : '已逾期' }}</div>
@ -41,6 +52,7 @@
<div class="item1">点检时间: {{ item.orderStart }}</div>
</view>
<u-toast ref="uToast" />
<u-calendar v-model="iscalendar" :mode="mode" @change="changetime"></u-calendar>
</view>
</template>
<script lang="ts">
@ -49,6 +61,7 @@ import { BasePage } from '@/components/base/page';
import model from '../Spotcheck/model';
import chooseOne from '@/components/choose-one/choose-one.vue';
import jPicker from '@/components/J-Picker/jPicker.vue';
import moment from 'moment';
// import { session } from '@/store/modules/session';
//import store from '@/store';
@Component({
@ -82,6 +95,11 @@ export default class ChangePalletNew extends BasePage {
value: 1,
},
];
//
isattrssetup = false;
iscalendar = false;
mode = 'date';
createTime: any = null;
listdata: any = [];
detailsdata: any = [];
orderNoItemList: any = {};
@ -109,18 +127,25 @@ export default class ChangePalletNew extends BasePage {
// remove: any = {};
async onShow() {
this.onLoad;
this.createTime = moment().format('YYYY-MM-DD');
console.log('1111');
this.userinfo = uni.getStorageSync('userinfo');
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userName);
let query = {
userId: this.userinfo.userName,
createTime: this.createTime,
};
await this.model.getTodayTask(query);
console.log(model.orderNoItemList);
this.listdata = model.orderNoItemList;
}
}
async onReady() {
this.createTime = moment().format('YYYY-MM-DD');
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
}
async onLoad() {
// console.log('1222')
// console.log(uni.getStorageSync('userinfo'));
@ -138,17 +163,56 @@ export default class ChangePalletNew extends BasePage {
isorderNo: any = null;
location: any = '';
locationStatus: any = 1;
//
async change(index) {
this.current = index;
if (index == 0) {
onfocus() {
this.iscalendar = true;
}
clear() {
this.createTime = null;
}
//
async changetime(e) {
console.log(e);
this.createTime = e.result;
if (this.current == 0) {
if (this.userinfo) {
await this.model.getTodayTask(this.userinfo.userName);
let query = {
userId: this.userinfo.userName,
createTime: this.createTime,
};
await this.model.getTodayTask(query);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
await this.model.getTaskRecord(this.userinfo.userName);
let query = {
userId: this.userinfo.userName,
createTime: this.createTime,
};
await this.model.getTaskRecord(query);
this.detailsdata = model.getTaskRecordList;
}
}
// this.tagslist = JSON.parse(JSON.stringify(item.babtype));
// this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
}
async change(index) {
this.current = index;
if (index == 0) {
if (this.userinfo) {
let query = {
userId: this.userinfo.userName,
createTime: this.createTime,
};
await this.model.getTodayTask(query);
this.listdata = model.orderNoItemList;
}
} else {
if (this.userinfo) {
let query = {
userId: this.userinfo.userName,
createTime: this.createTime,
};
await this.model.getTaskRecord(query);
this.detailsdata = model.getTaskRecordList;
}
}
@ -199,7 +263,19 @@ export default class ChangePalletNew extends BasePage {
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.singlebox {
margin-top: 10px;
background-color: #fff;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px 0 rgba(128, 128, 128, 0.2);
}
.single-left {
display: flex;
.Scan {
border-radius: 6px;
}
}
.header {
position: fixed;
top: 0rpx;

@ -15,24 +15,26 @@ export class Spotcheck extends VuexModule {
// 点检spotInspection
// 巡检inspection
// 保养maintenance
async getTodayTask(userId: any) {
async getTodayTask(query: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTodayTask, {
//loginName: session.loginName,
params: {
userId: userId,
userId: query.userId,
planType: 'spotInspection',
createTime: query.createTime,
},
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
@MutationAction
async getTaskRecord(userId: any) {
async getTaskRecord(query: any) {
const result: any = await http.get(url.lanjuequipment.product.Inspection.getTaskRecord, {
//loginName: session.loginName,
params: {
userId: userId,
userId: query.userId,
planType: 'spotInspection',
createTime: query.createTime,
},
});
const getTaskRecordList = result.data;

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

@ -191,7 +191,7 @@ export const url = {
// 维修
Repair: {
// 获取今日任务 获取历史记录
getTodayTask: qianzhuione + '/device/devicePDA/getMaintenancePendRecords',
getMaintenancePendRecords: qianzhuione + '/device/devicePDA/getMaintenancePendRecords',
// 获取历史记录
getTaskRecord: qianzhuione + '/device/devicePDA/getMaintenanceRecords',
// 获取维修工单信息
@ -214,6 +214,14 @@ export const url = {
// 是否开机保养
startMaintenanceTask: qianzhuione + '/device/devicePDA/startMaintenanceTask',
},
// 备件备品出入库
SparepartsInto: {
// 获取备品备件信息
querySpareDetailBySpareCode: qianzhuione + '/device/devicePDA/querySpareDetailBySpareCode/',
sparePartsInOutStorage: qianzhuione + '/devicePDA/sparePartsInOutStorage',
},
// 备件备品入库
SparepartsIntoOut: {},
},
},
// 质量管理

Loading…
Cancel
Save