PDA成品入库,车间叫料修改
This commit is contained in:
@@ -216,6 +216,14 @@
|
||||
"navigationBarTitleText" : "车间叫料",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/materialManagement/MaterialWarehousing/MaterialWarehousing",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "成品入库",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-subsection :list="list" :current="current" @change="sectionChange" mode="subsection" fontSize="1.5rem"></u-subsection>
|
||||
<view v-if="current == 0">
|
||||
<u-subsection :list="list" :current="current" @change="sectionChange" mode="subsection"
|
||||
fontSize="1.5rem"></u-subsection>
|
||||
<view v-if="current == 0" :key="0">
|
||||
<view>
|
||||
<u-row>
|
||||
<u-col span="6">
|
||||
<u-button @click="timeshow = true">选择日期</u-button>
|
||||
<u-datetime-picker :show="timeshow" v-model="queryParams.workerorder_time" mode="date" @confirm="confirm" @cancel="timeshow = false"></u-datetime-picker>
|
||||
<u-datetime-picker :show="timeshow" v-model="queryParams.workerorder_time" mode="date"
|
||||
@confirm="confirm" @cancel="timeshow = false"></u-datetime-picker>
|
||||
</u-col>
|
||||
<u-col span="6">
|
||||
<view style="font-size: 1.2rem">{{ queryParams.workerorder_time | formatDate }}</view>
|
||||
@@ -25,9 +27,12 @@
|
||||
<view class="cartoon-list-item">
|
||||
<u-row>
|
||||
<u-col span="2">{{ item.id }}</u-col>
|
||||
<u-col span="1"><u-tag :text="item.agvPosition" size="mini" type="primary"></u-tag></u-col>
|
||||
<u-col span="3" offset="1"><u-icon name="arrow-right-double" color="#2979ff" size="50" @click="detail_item(item.taskId)"></u-icon></u-col>
|
||||
<u-col span="2"><u-button type="success" text="开始" size="mini" @click="confirm_startpoint(item.agvPosition)"></u-button></u-col>
|
||||
<u-col span="1"><u-tag :text="item.agvPosition" size="mini"
|
||||
type="primary"></u-tag></u-col>
|
||||
<u-col span="3" offset="1"><u-icon name="arrow-right-double" color="#2979ff"
|
||||
size="50" @click="detail_item(item.taskId)"></u-icon></u-col>
|
||||
<u-col span="2"><u-button type="success" text="开始" size="mini"
|
||||
@click="confirm_startpoint(item.agvPosition)"></u-button></u-col>
|
||||
<u-col span="2"><u-button type="error" text="结束" size="mini"></u-button></u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
@@ -79,242 +84,296 @@
|
||||
<view class="tip-icon2" @click="stop_agv"><span style="font-size: 0.5rem">紧急终止</span></view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="current == 1"></view>
|
||||
<view v-if="current == 1" :key="1">
|
||||
<view class="tip-box">
|
||||
<u-row :gutter="20">
|
||||
<u-col span="2">
|
||||
<u-text text="起点" size="48"></u-text>
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<u-input v-model="end_point" placeholder="请输入起点" clearable></u-input>
|
||||
</u-col>
|
||||
<u-col span="2">
|
||||
<u-text text="终点" size="48"></u-text>
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<u-input v-model="start_point" placeholder="请输入终点" clearable></u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-gap height="20"></u-gap>
|
||||
<u-row>
|
||||
<u-col span="6" align="center">
|
||||
<view class="tip-icon" @click="start_agv"><span>启动</span></view>
|
||||
</u-col>
|
||||
<u-col span="6" align="center">
|
||||
<view class="tip-icon2" @click="stop_agv"><span style="font-size: 0.5rem">紧急终止</span></view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getIngredientTask, getIngredientTask_son, getfabgopoints, go_workshop, emergency_stop_agv } from '@/api/materialManagement/MaterialRequsition.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: ['车间叫料', '空车返程'],
|
||||
current: 0,
|
||||
queryParams: {
|
||||
workerorder_time: Number(new Date()),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
totalNum: 0
|
||||
},
|
||||
timeshow: false,
|
||||
taskList: [],
|
||||
show_popup: false,
|
||||
title: '',
|
||||
taskList_son: [],
|
||||
loading: false,
|
||||
start_point: '',
|
||||
end_point: '',
|
||||
fab_go_points: [],
|
||||
reqCode: ''
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
filters: {
|
||||
formatDate: function (value) {
|
||||
// 创建一个 Date 对象,并使用时间戳初始化
|
||||
const date = new Date(value);
|
||||
|
||||
// 提取年、月、日信息
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份从 0 开始,所以要加 1
|
||||
const day = date.getDate();
|
||||
|
||||
return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInitList();
|
||||
},
|
||||
methods: {
|
||||
// todo 分页查询
|
||||
getInitList() {
|
||||
// 使用时间戳创建一个日期对象
|
||||
let date = new Date(this.queryParams.workerorder_time);
|
||||
|
||||
// 获取上海时区的时间偏移量(以分钟为单位)
|
||||
let offset = 8 * 60; // 上海时区为 UTC+8
|
||||
|
||||
// 计算上海时区的时间
|
||||
let shanghaiTime = new Date(date.getTime() + offset * 60 * 1000);
|
||||
|
||||
let queryTask = { ...this.queryParams };
|
||||
queryTask.datetimespan = shanghaiTime;
|
||||
delete queryTask.workerorder_time;
|
||||
getIngredientTask(queryTask).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach((item, index) => {
|
||||
item.id = index;
|
||||
});
|
||||
this.taskList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.current = index;
|
||||
},
|
||||
// scrolltolower() {
|
||||
// this.loadmore();
|
||||
// },
|
||||
// loadmore() {
|
||||
// for (let i = 0; i < 30; i++) {
|
||||
// this.indexList.push({
|
||||
// url: this.urls[uni.$u.random(0, this.urls.length - 1)]
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
//todo 选择时间
|
||||
confirm() {
|
||||
this.timeshow = false;
|
||||
this.$nextTick(() => {
|
||||
this.getInitList();
|
||||
});
|
||||
},
|
||||
//todo 查看详细信息
|
||||
detail_item(taskId) {
|
||||
const query = {
|
||||
taskId: taskId
|
||||
import {
|
||||
getIngredientTask,
|
||||
getIngredientTask_son,
|
||||
getfabgopoints,
|
||||
go_workshop,
|
||||
emergency_stop_agv
|
||||
} from '@/api/materialManagement/MaterialRequsition.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: ['车间叫料', '空车返程'],
|
||||
current: 0,
|
||||
queryParams: {
|
||||
workerorder_time: Number(new Date()),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sort: undefined,
|
||||
sortType: undefined,
|
||||
totalNum: 0
|
||||
},
|
||||
timeshow: false,
|
||||
taskList: [],
|
||||
show_popup: false,
|
||||
title: '',
|
||||
taskList_son: [],
|
||||
loading: false,
|
||||
start_point: '',
|
||||
end_point: '',
|
||||
fab_go_points: [],
|
||||
reqCode: ''
|
||||
};
|
||||
this.loading = true;
|
||||
getIngredientTask_son(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false;
|
||||
this.taskList_son = res.data;
|
||||
this.show_popup = true;
|
||||
this.title = '任务号:' + taskId;
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 确认起点
|
||||
confirm_startpoint(point) {
|
||||
this.start_point = point;
|
||||
},
|
||||
//todo获取车间点
|
||||
get_fab_go_points() {
|
||||
getfabgopoints().then((res) => {
|
||||
if (res.code == 200) {
|
||||
let array = [];
|
||||
res.data.forEach((item) => {
|
||||
array.push({ value: item, text: item });
|
||||
});
|
||||
this.fab_go_points = array;
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 开始agv
|
||||
start_agv() {
|
||||
if (this.start_point == '' || this.end_point == '') {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: '起点或者终点不能为空'
|
||||
});
|
||||
return;
|
||||
watch: {},
|
||||
filters: {
|
||||
formatDate: function(value) {
|
||||
// 创建一个 Date 对象,并使用时间戳初始化
|
||||
const date = new Date(value);
|
||||
|
||||
// 提取年、月、日信息
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1; // 月份从 0 开始,所以要加 1
|
||||
const day = date.getDate();
|
||||
|
||||
return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
|
||||
}
|
||||
const query = {
|
||||
start_point: this.start_point,
|
||||
end_point: this.end_point
|
||||
};
|
||||
go_workshop(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.reqCode = res.data.data;
|
||||
},
|
||||
mounted() {
|
||||
this.getInitList();
|
||||
},
|
||||
methods: {
|
||||
// todo 分页查询
|
||||
getInitList() {
|
||||
// 使用时间戳创建一个日期对象
|
||||
let date = new Date(this.queryParams.workerorder_time);
|
||||
|
||||
// 获取上海时区的时间偏移量(以分钟为单位)
|
||||
let offset = 8 * 60; // 上海时区为 UTC+8
|
||||
|
||||
// 计算上海时区的时间
|
||||
let shanghaiTime = new Date(date.getTime() + offset * 60 * 1000);
|
||||
|
||||
let queryTask = {
|
||||
...this.queryParams
|
||||
};
|
||||
queryTask.datetimespan = shanghaiTime;
|
||||
delete queryTask.workerorder_time;
|
||||
getIngredientTask(queryTask).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach((item, index) => {
|
||||
item.id = index;
|
||||
});
|
||||
this.taskList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.current = index;
|
||||
},
|
||||
// scrolltolower() {
|
||||
// this.loadmore();
|
||||
// },
|
||||
// loadmore() {
|
||||
// for (let i = 0; i < 30; i++) {
|
||||
// this.indexList.push({
|
||||
// url: this.urls[uni.$u.random(0, this.urls.length - 1)]
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
//todo 选择时间
|
||||
confirm() {
|
||||
this.timeshow = false;
|
||||
this.$nextTick(() => {
|
||||
this.getInitList();
|
||||
});
|
||||
},
|
||||
//todo 查看详细信息
|
||||
detail_item(taskId) {
|
||||
const query = {
|
||||
taskId: taskId
|
||||
};
|
||||
this.loading = true;
|
||||
getIngredientTask_son(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading = false;
|
||||
this.taskList_son = res.data;
|
||||
this.show_popup = true;
|
||||
this.title = '任务号:' + taskId;
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 确认起点
|
||||
confirm_startpoint(point) {
|
||||
this.start_point = point;
|
||||
},
|
||||
//todo获取车间点
|
||||
get_fab_go_points() {
|
||||
getfabgopoints().then((res) => {
|
||||
if (res.code == 200) {
|
||||
let array = [];
|
||||
res.data.forEach((item) => {
|
||||
array.push({
|
||||
value: item,
|
||||
text: item
|
||||
});
|
||||
});
|
||||
this.fab_go_points = array;
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 开始agv
|
||||
start_agv() {
|
||||
if (this.start_point == '' || this.end_point == '') {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动成功' + res.data
|
||||
message: '起点或者终点不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 紧急终止agv
|
||||
stop_agv() {
|
||||
if (this.reqCode == '') {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: '无任务编号'
|
||||
const query = {
|
||||
start_point: this.start_point,
|
||||
end_point: this.end_point
|
||||
};
|
||||
go_workshop(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.reqCode = res.data.data;
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动成功' + res.data
|
||||
});
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
const query = {
|
||||
reqCode: this.reqCode
|
||||
};
|
||||
|
||||
emergency_stop_agv().then((res) => {
|
||||
if (res.code == 200) {
|
||||
},
|
||||
//todo 紧急终止agv
|
||||
stop_agv() {
|
||||
if (this.reqCode == '') {
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
message: '成功取消' + res.data
|
||||
type: 'error',
|
||||
message: '无任务编号'
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
const query = {
|
||||
reqCode: this.reqCode
|
||||
};
|
||||
|
||||
emergency_stop_agv().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
message: '成功取消' + res.data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.area {
|
||||
height: 350px;
|
||||
background-color: white;
|
||||
.area {
|
||||
height: 350px;
|
||||
background-color: white;
|
||||
|
||||
overflow: hidden; /* 隐藏超出部分 */
|
||||
overflow-y: scroll; /* 添加垂直滚动条 */
|
||||
}
|
||||
.cartoon-list-item {
|
||||
background-color: #c8d3db; /* 设置蓝色背景 */
|
||||
padding: 10px; /* 设置内边距 */
|
||||
border-radius: 10px; /* 设置圆角边框 */
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
|
||||
margin-bottom: 10px; /* 设置底部外边距 */
|
||||
font-family: 'Comic Sans MS', cursive; /* 设置卡通化字体 */
|
||||
color: white; /* 设置文字颜色为白色 */
|
||||
}
|
||||
overflow: hidden;
|
||||
/* 隐藏超出部分 */
|
||||
overflow-y: scroll;
|
||||
/* 添加垂直滚动条 */
|
||||
}
|
||||
|
||||
.cartoon-list-item:hover {
|
||||
transform: scale(1.05); /* 鼠标悬停时放大 */
|
||||
}
|
||||
.tip-box {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
background-color: #fff; /* 白色背景 */
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
|
||||
}
|
||||
.cartoon-list-item {
|
||||
background-color: #c8d3db;
|
||||
/* 设置蓝色背景 */
|
||||
padding: 10px;
|
||||
/* 设置内边距 */
|
||||
border-radius: 10px;
|
||||
/* 设置圆角边框 */
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
/* 添加阴影效果 */
|
||||
margin-bottom: 10px;
|
||||
/* 设置底部外边距 */
|
||||
font-family: 'Comic Sans MS', cursive;
|
||||
/* 设置卡通化字体 */
|
||||
color: white;
|
||||
/* 设置文字颜色为白色 */
|
||||
}
|
||||
|
||||
.tip-icon {
|
||||
margin-top: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #00ff00;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
|
||||
}
|
||||
.tip-icon2 {
|
||||
margin-top: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: red;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
|
||||
}
|
||||
.cartoon-list-item:hover {
|
||||
transform: scale(1.05);
|
||||
/* 鼠标悬停时放大 */
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
.tip-box {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
background-color: #fff;
|
||||
/* 白色背景 */
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
/* 添加阴影 */
|
||||
}
|
||||
|
||||
.tip-icon {
|
||||
margin-top: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #00ff00;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
/* 添加阴影 */
|
||||
}
|
||||
|
||||
.tip-icon2 {
|
||||
margin-top: 5px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: red;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
/* 添加阴影 */
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
@@ -7,15 +7,15 @@
|
||||
<text class="grid-text">{{item.name}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
|
||||
|
||||
<u--text text="成品入库" size="36" bold></u--text>
|
||||
<u-grid :border="true" @click="gridCheck" col="4">
|
||||
<u-grid-item v-if="item.type === 1" v-for="(item,index) in gridItemList" :key="index" :name="item.url">
|
||||
<u-grid-item v-if="item.type === 2" v-for="(item,index) in gridItemList" :key="index" :name="item.url">
|
||||
<u-icon :customStyle="{paddingTop:20+'rpx'}" :name="item.icon" :size="128"></u-icon>
|
||||
<text class="grid-text">{{item.name}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -24,20 +24,23 @@
|
||||
data() {
|
||||
return {
|
||||
// 页面按钮参数
|
||||
gridItemList: [
|
||||
{
|
||||
gridItemList: [{
|
||||
name: '仓库配料',
|
||||
icon: 'grid-fill',
|
||||
url: '/pages/materialManagement/MaterialProductionInput/MaterialProductionInput',
|
||||
type: 1,
|
||||
index: 1
|
||||
},
|
||||
{
|
||||
name: '车间叫料',
|
||||
icon: 'grid-fill',
|
||||
url: '/pages/materialManagement/MaterialRequisition/MaterialRequisition',
|
||||
type: 1,
|
||||
index: 2
|
||||
},
|
||||
{
|
||||
name: '入库',
|
||||
icon: 'grid-fill',
|
||||
url: '/pages/materialManagement/MaterialWarehousing/MaterialWarehousing',
|
||||
type: 2,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user