231
This commit is contained in:
@@ -44,4 +44,15 @@ export function emergency_stop_agv(params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function FinisBatchingTask(params) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/mm/materialinput/finishBatchingTask',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
<view class="cartoon-list-item">
|
<view class="cartoon-list-item">
|
||||||
<u-row>
|
<u-row>
|
||||||
<u-col span="2">{{ item.id }}</u-col>
|
<u-col span="2">{{ item.id }}</u-col>
|
||||||
|
<<<<<<< HEAD
|
||||||
<u-col span="1"><u-tag :text="item.agvPosition" size="mini"
|
<u-col span="1"><u-tag :text="item.agvPosition" size="mini"
|
||||||
type="primary"></u-tag></u-col>
|
type="primary"></u-tag></u-col>
|
||||||
<u-col span="3" offset="1"><u-icon name="arrow-right-double" color="#2979ff"
|
<u-col span="3" offset="1"><u-icon name="arrow-right-double" color="#2979ff"
|
||||||
@@ -34,6 +35,12 @@
|
|||||||
<u-col span="2"><u-button type="success" text="开始" size="mini"
|
<u-col span="2"><u-button type="success" text="开始" size="mini"
|
||||||
@click="confirm_startpoint(item.agvPosition)"></u-button></u-col>
|
@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-col span="2"><u-button type="error" text="结束" size="mini"></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" @click="final_task(item.taskId)"></u-button></u-col>
|
||||||
|
>>>>>>> 9c7f6d2 (配料任务)
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
</u-list-item>
|
</u-list-item>
|
||||||
@@ -119,6 +126,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
<<<<<<< HEAD
|
||||||
import {
|
import {
|
||||||
getIngredientTask,
|
getIngredientTask,
|
||||||
getIngredientTask_son,
|
getIngredientTask_son,
|
||||||
@@ -149,6 +157,99 @@
|
|||||||
end_point: '',
|
end_point: '',
|
||||||
fab_go_points: [],
|
fab_go_points: [],
|
||||||
reqCode: ''
|
reqCode: ''
|
||||||
|
=======
|
||||||
|
import { getIngredientTask, getIngredientTask_son, getfabgopoints, go_workshop, emergency_stop_agv, FinisBatchingTask } 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
|
||||||
|
>>>>>>> 9c7f6d2 (配料任务)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
@@ -280,6 +381,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
const query = {
|
const query = {
|
||||||
reqCode: this.reqCode
|
reqCode: this.reqCode
|
||||||
};
|
};
|
||||||
@@ -293,6 +395,29 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//todo 完成任务
|
||||||
|
final_task(taskId) {
|
||||||
|
if (this.start_point == '' || this.end_point == '' || taskId == '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const query = {
|
||||||
|
start_point: this.start_point,
|
||||||
|
end_point: this.end_point,
|
||||||
|
taskId: taskId
|
||||||
|
};
|
||||||
|
FinisBatchingTask(query).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'success',
|
||||||
|
message: '完成成功' + res.data
|
||||||
|
});
|
||||||
|
this.getInitList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
>>>>>>> 9c7f6d2 (配料任务)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user