This commit is contained in:
赵正易 2024-05-17 10:37:18 +08:00
commit 4ba542b181
6 changed files with 259 additions and 10 deletions

View File

@ -79,4 +79,14 @@ export function getAllOptions(params) {
method: 'get',
params
})
}
// 所有点位下拉_包装箱
export function getAllOptions_package(params) {
return request({
url: '/mes/mm/MmFinishedwarehouse/finish_point_pack',
method: 'get',
params
})
}

View File

@ -232,6 +232,14 @@
"navigationBarTitleText" : "扫码信息展示",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/materialManagement/package/package",
"style" :
{
"navigationBarTitleText" : "进箱",
"enablePullDownRefresh" : false
}
}
]

View File

@ -143,6 +143,7 @@ export default {
watch: {},
mounted() {
this.get_startpoints();
this.get_workorder_list();
},
methods: {
containsChinese(str) {
@ -179,18 +180,18 @@ export default {
//todo
get_workorder_list() {
this.loading = true;
// let date = new Date(this.workerorder_time);
// date = new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
let date = new Date(this.workerorder_time);
date = new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
// 使
let date = new Date(this.workerorder_time);
//let date = new Date(this.workerorder_time);
//
let offset = 8 * 60; // UTC+8
//
let shanghaiTime = new Date(date.getTime() + offset * 60 * 1000);
console.log("shanghaiTime",shanghaiTime);
const query = {
datetimespan: shanghaiTime,
pageNum: this.page.pageNum,

View File

@ -60,7 +60,7 @@
</view>
</u-modal>
<view class="tip-box">
<view>
<!-- <view>
<u-row>
<u-col span="2">小车1</u-col>
<u-col span="1">
@ -71,8 +71,8 @@
<view class="tip-icon-small"></view>
</u-col>
</u-row>
</view>
<u-divider text="agv状态"></u-divider>
</view> -->
<!-- <u-divider text="agv状态"></u-divider> -->
<u-row>
<u-col span="1">起点</u-col>
@ -102,7 +102,6 @@
</view>
<view v-if="current == 1" :key="1">
<view class="tip-box">
<u-row :gutter="20">
<u-col span="1">
<u-text text="起点" size="32"></u-text>
@ -202,8 +201,8 @@ export default {
methods: {
// todo
getInitList() {
// 使
let date = new Date(this.queryParams.workerorder_time);
let now = new Date(this.queryParams.workerorder_time);
var date = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0); //
//
let offset = 8 * 60; // UTC+8

View File

@ -15,6 +15,13 @@
<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 === 3" v-for="(item,index) in gridItemList" :key="index" :name="item.url">
<u-icon color="#00ff00" :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>
@ -42,6 +49,12 @@
url: '/pages/materialManagement/MaterialWarehousing/MaterialWarehousing',
type: 2,
},
{
name: '进箱',
icon: 'gift',
url: '/pages/materialManagement/package/package',
type: 3,
},
]
}
},

View File

@ -0,0 +1,218 @@
<template>
<view>
<view :key="1">
<view class="tip-box">
<u-row :gutter="20">
<u-col span="1">
<u-text text="起点" size="32"></u-text>
</u-col>
<u-col span="3">
<uni-data-select v-model="start_point" :localdata="startOptions"
placeholder="请选择起点"></uni-data-select>
</u-col>
<u-col span="1">
<u-text text="终点" size="32"></u-text>
</u-col>
<u-col span="3">
<uni-data-select v-model="end_point" :localdata="endOptions"
placeholder="请选择终点"></uni-data-select>
</u-col>
<u-col span="1" offset="0.5">agv</u-col>
<u-col span="3">
<uni-data-select v-model="agv_num" :localdata="agv_num_list"></uni-data-select>
</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 {
go_workshop,
emergency_stop_agv,
getAllOptions_package
} from '@/api/materialManagement/MaterialRequsition.js';
export default {
data() {
return {
loading: false,
start_point: '',
startOptions: [],
end_point: '',
endOptions: [],
reqCode: '',
agv_num_list:[{value:"1743",text:"1号"},{value:"1744",text:"2号"}],
agv_num:""
};
},
watch: {},
filters: {
},
mounted() {
this.init();
},
methods: {
init() {
getAllOptions_package().then(res => {
if (res.code === 200) {
let _list = [];
res.data.forEach(item => {
_list.push({
value: item,
text: item
})
})
this.startOptions = _list;
this.endOptions = _list;
}
})
},
start_agv() {
if (this.start_point == '' || this.end_point == '') {
this.$refs.uToast.show({
type: 'error',
message: '起点或者终点不能为空'
});
return;
}
const query = {
start_point: this.start_point,
end_point: this.end_point,
agvCode:this.agv_num
};
go_workshop(query).then((res) => {
if (res.code == 200) {
try {
let json = JSON.parse(res.data);
this.reqCode = json.data;
this.$refs.uToast.show({
type: 'success',
message: 'agv起动成功' + this.reqCode
});
} catch (e) {
this.$refs.uToast.show({
type: 'error',
message: 'agv起动失败' + this.reqCode
});
}
}
});
},
stop_agv() {
if (this.reqCode == '') {
this.$refs.uToast.show({
type: 'error',
message: '无任务编号'
});
return;
}
const query = {
reqCode: this.reqCode
};
emergency_stop_agv(query).then((res) => {
if (res.code == 200) {
this.$refs.uToast.show({
type: 'success',
message: '成功取消' + res.data
});
}
});
}
}
};
</script>
<style scoped>
.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;
/* 设置文字颜色为白色 */
}
.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);
/* 添加阴影 */
}
.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>