This commit is contained in:
朱文强 2025-08-15 09:10:33 +08:00
parent 91e431e545
commit f5d8b37c09
24 changed files with 2173 additions and 135 deletions

View File

@ -18,6 +18,26 @@ export function updateStacker(data) {
})
}
// 巷道入库更新
export function updateInStacker(data) {
return request({
url: '/asrs/stacker/updatein',
method: 'put',
data: data,
timeout: 100000,
})
}
// 巷道出库更新
export function updateOutStacker(data) {
return request({
url: '/asrs/stacker/updateout',
method: 'put',
data: data,
timeout: 100000,
})
}
// 获得巷道分页
export function getStackerPage(query) {
return request({

View File

@ -32,6 +32,14 @@ export function inWarehouseStorehouse(data) {
data: data
})
}
// 外购膜卷入库
export function buyinWarehouseStorehouse(data) {
return request({
url: '/asrs/warehouse-storehouse/buyin',
method: 'post',
data: data
})
}
// 手动出库
export function outWarehouseStorehouse(data) {
return request({

View File

@ -135,3 +135,12 @@ export function mesoutsync(data) {
timeout: 100000,
})
}
// 校验是否最早的货物
export function checkGoods(query) {
return request({
url: '/asrs/warehouse-storehouse-goods-specification/check',
method: 'get',
params: query,
})
}

View File

@ -17,6 +17,14 @@ export function updateMainTask(data) {
data: data
})
}
// 主任务巷道变更
export function updatestacker(data) {
return request({
url: '/asrs/job-main-task/updatestacker',
method: 'put',
data: data
})
}
// 删除主任务
export function deleteMainTask(id) {
@ -43,6 +51,15 @@ export function getMainTaskPage(query) {
})
}
// 线边库分页
export function getLibraryPage(query) {
return request({
url: '/asrs/line-edge-library/page',
method: 'get',
params: query
})
}
// 导出主任务 Excel
export function exportMainTaskExcel(query) {
return request({

View File

@ -140,7 +140,7 @@ export default {
if (item.code !== 0) {
this.$notify({
title: '异常',
message: item.msg,
message: item.name+'-'+item.msg,
type: 'warning',
duration: 8000,
});
@ -149,7 +149,7 @@ export default {
if (item.code > 30) {
this.$notify({
title: '异常',
message: item.msg,
message: item.name+'-'+item.msg,
type: 'warning',
duration: 9000,
});
@ -168,7 +168,7 @@ export default {
if (item.code !== 0) {
this.$notify({
title: '异常',
message: item.msg,
message: item.name+'-'+item.msg,
type: 'warning',
duration: 8000,
});
@ -177,7 +177,7 @@ export default {
if (item.code > 30) {
this.$notify({
title: '异常',
message: item.msg,
message: item.name+'-'+item.msg,
type: 'warning',
duration: 9000,
});

View File

@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 15:27:31
* @LastEditors: zwq
* @LastEditTime: 2023-08-01 16:25:54
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// : xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: 18px;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@ -0,0 +1,432 @@
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:destroy-on-close="true"
:wrapper-closable="false"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">货物信息</small-title>
<div class="content">
<div class="visual-part">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="托盘编码" prop="trayCode">
<el-input
v-model="dataForm.trayCode"
@input="$forceUpdate()"
@keyup.enter.native="nextTInput"
ref="input"
placeholder="请输入托盘编码" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="选择起点区域" prop="region">
<el-select
v-model="dataForm.region"
style="width: 100%"
@change="getPotArr"
:popper-append-to-body="false"
placeholder="请选择区域">
<el-option
v-for="item in regionArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="选择起点位置" prop="startInfo">
<el-select
v-model="dataForm.startInfo"
style="width: 100%"
:disabled="potDisable"
@change="$forceUpdate()"
placeholder="请选择起点位置">
<el-option
v-for="item in potArr"
:key="item.id"
:label="item.lineEdgeLibraryCode"
:value="
item.lineEdgeLibraryCode + '-' + item.agvGroundCode
" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
产品信息
<el-alert
title="产品信息新增和修改后,需点击最下方保存按钮确定修改"
type="warning"
show-icon></el-alert>
</small-title>
<div class="attr-list">
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:add-button-show="addButtonShow"
@emitButtonClick="addNew"
@emitFun="inputChange"
:height="400"
:table-data="productAttributeList">
<method-btn
slot="handleBtn"
:width="60"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
</div>
</div>
</div>
<div style="position: absolute; bottom: 74px; right: 24px">
<el-switch
v-model="decode"
active-text="解码"
inactive-text="不解码"
:active-value="1"
:inactive-value="0"></el-switch>
</div>
<div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<span>
<el-button
type="primary"
@click="dataFormSubmit()"
:loading="isloading">
保存
</el-button>
</span>
</div>
<product-attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:warehouse-id="warehouseId"
@refreshDataList="addList" />
</el-drawer>
</template>
<script>
import {
getLineList,
buyinWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality';
import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter';
import SmallTitle from './SmallTitle';
const tableBtn = [
{
type: 'delete',
btnName: '删除',
},
];
const tableProps = [
{
prop: 'goodSpecificationName',
label: '产品名',
},
{
prop: 'specification',
label: '产品规格',
filter: codeFilter('specification'),
width: 80,
},
{
prop: 'rollCode',
label: '膜卷编码',
subcomponent: inputArea,
},
{
prop: 'number',
label: '数量',
width: 55,
},
{
prop: 'grade',
label: '品质',
},
{
prop: 'cureTime',
label: '需要熟化时间(小时)',
width: 140,
subcomponent: inputArea,
},
];
const regionArra = [
{ name: '一次分切区域1线', id: 1 },
{ name: '一次分拣区域', id: 2 },
{ name: '二次分切区域', id: 3 },
{ name: '二次分拣区域', id: 4 },
{ name: '手动包装区域', id: 5 },
{ name: '涂覆区域', id: 6 },
{ name: '其他', id: 7 },
{ name: '自动包装区域', id: 8 },
{ name: '一次分切区域2线', id: 9 },
{ name: '一次分切区域3线', id: 10 },
{ name: '一次分切区域4线', id: 11 },
];
const regionArrb = [
{ name: '其他', id: 7 },
{ name: '一次分切5线', id: 24 },
{ name: '一次分切6线', id: 25 },
{ name: '一次分切7线', id: 26 },
{ name: '一次分切8线', id: 27 },
{ name: '涂覆区域', id: 29 },
{ name: '二次分切', id: 28 },
{ name: '自动包装区', id: 21 },
{ name: '手动包装区', id: 23 },
{ name: '一次分拣区', id: 22 },
{ name: '二次分拣区', id: 20 },
];
export default {
components: { productAttrAdd, SmallTitle },
data() {
return {
visible: false,
addOrUpdateVisible: false,
tableBtn,
tableProps,
productAttributeList: [],
addButtonShow: '新增',
potArr: [],
regionArr: [],
regionArra,
regionArrb,
potDisable: true,
dataForm: {
id: null,
region: undefined,
trayCode: '',
startInfo: '',
},
warehouseId: null,
isloading: false,
updata: {},
decode:1,
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
},
dataRule: {
trayCode: [
{
required: true,
message: '托盘编码不能为空',
trigger: 'blur',
},
],
startInfo: [
{
required: true,
message: '起点位置不能为空',
trigger: 'change',
},
],
},
};
},
methods: {
initData() {
this.productAttributeList.splice(0);
},
init(warehouseId) {
this.isloading = false;
this.potDisable = true;
this.warehouseId = warehouseId;
this.regionArr =
warehouseId === '1696803324030865409'
? this.regionArra
: this.regionArrb;
this.dataForm.trayCode = '';
this.dataForm.startInfo = '';
this.dataForm.region = null;
this.initData();
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
this.$refs.input.focus();
});
},
getPotArr(val) {
getLineList({ region: val, warehouseId: this.warehouseId }).then(
(response) => {
this.potArr = response.data;
this.potDisable = false;
}
);
},
nextTInput() {
if (this.productAttributeList.length > 0) {
document.getElementById('inputFocus1').focus();
}
},
inputChange(data) {
switch (data.sType) {
case 1:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data[data.prop];
break;
case 2:
this.productAttributeList[data._pageIndex - 1][data.prop] =
data.string ? data.string.split('+')[0] : '';
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
data.string ? data.string.split('+')[1] : '';
break;
case 3:
if (data._pageIndex < this.productAttributeList.length) {
document
.getElementById('inputFocus' + (data._pageIndex + 1))
.focus();
}
break;
default:
console.log(val);
}
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.productAttributeList.splice(raw.data._pageIndex - 1, 1);
})
.catch(() => {});
} else {
this.addNew(raw.data._pageIndex);
}
},
//
dataFormSubmit() {
let tableValid = false;
this.productAttributeList.forEach((item) => {
item.id = '';
item.warehouseId = '';
if (!item.number) {
tableValid = true;
}
});
if (!tableValid) {
this.updata.trayCode = this.dataForm.trayCode;
this.updata.lineEdgeLibraryCode = this.dataForm.startInfo.split('-')[0];
this.updata.agvGroundCode = this.dataForm.startInfo.split('-')[1];
this.updata.decode = this.decode
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.isloading = true;
//
this.updata.list = this.productAttributeList;
buyinWarehouseStorehouse(this.updata)
.then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.isloading = false;
this.$emit('refreshDataList');
})
.catch(() => {
this.isloading = false;
});
return;
}
});
} else {
this.$modal.msgWarning('产品信息的数量为必填数据!');
}
},
// /
addNew(index) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(index);
});
},
addList(data) {
data.productInfo.number = 1;
data.productInfo.grade = data.grade;
for (let i = 0; i < data.number; i++) {
this.productAttributeList.push(
JSON.parse(JSON.stringify(data.productInfo))
);
}
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
this.initData();
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-form-item {
margin: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 10px;
}
.drawer >>> .content {
padding: 0 24px 30px;
display: flex;
flex-direction: column;
height: 100%;
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
</style>

View File

@ -0,0 +1,166 @@
<template>
<el-dialog
:visible.sync="visible"
:width="'35%'"
:append-to-body="true"
:close-on-click-modal="false"
class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">
{{ !dataForm.id ? '新增' : '编辑' }}
</div>
</slot>
</template>
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="产品" prop="productInfo">
<el-select
v-model="dataForm.productInfo"
style="width: 100%"
filterable
remote
:remote-method="remoteMethod"
value-key="id"
placeholder="请选择产品"
:loading="loading">
<el-option
v-for="item in productArr"
:key="item.id"
:label="item.goodSpecificationName"
:value="item"
:disabled="!item.deactivate" />
</el-select>
</el-form-item>
<el-form-item label="品质" prop="grade">
<el-input
v-model="dataForm.grade"
placeholder="请输入品质"
clearable
:style="{ width: '100%' }" />
</el-form-item>
<el-form-item label="数量" prop="number">
<el-input-number
v-model="dataForm.number"
:step="1"
:min="1"
step-strictly></el-input-number>
</el-form-item>
</el-form>
<el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
export default {
props: {
warehouseId: {
type: String,
default: '',
},
},
data() {
return {
visible: false,
dataForm: {
index: -1,
productInfo: null,
number: 1,
grade: null,
},
productArr: [],
loading: false,
dataRule: {
productInfo: [
{ required: true, message: '产品不能为空', trigger: 'change' },
],
number: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
// grade: [{ required: true, message: '', trigger: 'change' }],
},
};
},
methods: {
init(index) {
if (index >= 0) {
this.dataForm.index = index;
}
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
});
},
remoteMethod(query) {
if (query !== '') {
this.loading = true;
const params = {
pageSize: 100,
pageNo: 1,
goodSpecificationName: query,
// warehouseId: this.warehouseId,
};
getGoodSpecificationPage(params).then((response) => {
this.loading = false;
this.productArr = response.data.list;
});
} else {
this.productArr = [];
}
},
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.dataForm.productInfo.goodSpecificationId =
this.dataForm.productInfo.id;
//
if (this.dataForm.index >= 0) {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList', this.dataForm);
return;
}
//
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList', this.dataForm);
}
});
},
},
};
</script>
<style scoped>
.dialog >>> .el-dialog__body {
padding: 30px 24px;
}
.dialog >>> .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
.dialog >>> .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>

View File

@ -0,0 +1,363 @@
<template>
<div class="app-container">
<search-bar
:isFold="true"
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<drawerAdd
v-if="drawerVisible"
ref="drawerRef"
:prop-type="2"
@refreshDataList="getDataList" />
</div>
</template>
<script>
import drawerAdd from './add-or-updata.vue';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter';
import { getMainTaskHistoryPage } from '@/api/oth/mainTaskHistory';
import point from './point';
const tableProps = [
{
prop: 'mainTaskCode',
label: '任务编码',
},
{
prop: 'inOutWarehouseName',
label: '出入移库库位',
},
{
prop: 'relocationWarehouseName',
label: '移库终点库位',
},
{
prop: 'mainTaskType',
label: '任务类型',
filter: codeFilter('mainTaskType'),
width: 100,
},
{
prop: 'stacker',
label: '堆垛机',
width: 110,
},
{
prop: 'barCode',
label: '托盘编码',
},
{
prop: 'agv',
label: 'agv',
},
{
prop: 'agvStartPoint',
label: 'AGV起点',
},
{
prop: 'agvEndPoint',
label: 'AGV终点',
},
{
prop: 'mainTaskState',
label: '状态',
subcomponent: point,
},
{
prop: 'taskSource',
label: '任务来源',
filter: codeFilter('taskSourceBuyIn'),
width: 100,
},
{
prop: 'createTime',
label: '创建时间',
filter: parseTime,
width: 150,
},
];
const mainTaskType = [
{
name: '入库',
id: 1,
},
{
name: '出库',
id: 2,
},
{
name: '移库',
id: 3,
},
{
name: '出库+移库',
id: 4,
},
{
name: '不带agv入库',
id: 5,
},
{
name: '不带agv出库',
id: 6,
},
{
name: '入库+6臂空托盘出库',
id: 7,
},
{
name: '不带agv出库+移库',
id: 8,
},
{
name: '入库+12臂空托盘出库',
id: 9,
},
{
name: '平库移库',
id: 10,
},
{
name: '盘库出库',
id: 11,
},
{
name: '盘库入库',
id: 12,
},
{
name: '盘库出库+移库',
id: 13,
},
];
const mainTaskState = [
{
name: '开始',
id: 0,
},
{
name: '已发送agv',
id: 1,
},
{
name: 'agv运行中',
id: 2,
},
{
name: '已发送堆垛机',
id: 3,
},
{
name: '堆垛机运行中',
id: 4,
},
{
name: '完成',
id: 5,
},
{
name: '已发送传输线',
id: 6,
},
{
name: '传输线运行中',
id: 7,
},
{
name: '暂时无空托盘',
id: 8,
},
];
export default {
mixins: [basicPage],
components: {
drawerAdd,
},
data() {
return {
urlOptions: {
getDataListURL: getMainTaskHistoryPage,
},
listQuery: {
taskSource: 4,
pageSize: 10,
pageNo: 1,
total: 1,
},
drawerVisible: false,
tableProps,
tableBtn: [
// {
// type: 'canlce',
// btnName: '',
// },
],
tableData: [],
formConfig: [
{
type: 'input',
label: '任务编码',
placeholder: '任务编码',
param: 'code',
},
{
type: 'select',
label: '任务类型',
selectOptions: mainTaskType,
param: 'taskType',
defaultSelect: '',
filterable: true,
},
{
type: 'input',
label: '托盘编码',
placeholder: '托盘编码',
param: 'tcode',
},
{
type: 'select',
label: '状态',
selectOptions: mainTaskState,
param: 'status',
defaultSelect: '',
filterable: true,
},
{
type: 'select',
label: 'agv',
selectOptions: [],
param: 'agv',
defaultSelect: '',
filterable: true,
},
{
type: 'datePicker',
label: '选择日期',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
],
};
},
created() {
this.listQuery.taskSource = 4;
this.setFormConfig();
},
methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i,
};
this.formConfig[4].selectOptions.push(obj);
}
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType;
this.listQuery.barCode = val.tcode;
this.listQuery.mainTaskState = val.status;
this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
warehouseId: '1696803324030865409',
taskSource: 4,
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.drawerVisible = true;
this.$nextTick(() => {
this.$refs.drawerRef.init(this.listQuery.warehouseId);
});
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.$confirm(
`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => {});
},
},
};
</script>

View File

@ -0,0 +1,364 @@
<template>
<div class="app-container">
<search-bar
:isFold="true"
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" />
<base-table
v-loading="dataListLoading"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<drawerAdd
v-if="drawerVisible"
ref="drawerRef"
:prop-type="2"
@refreshDataList="getDataList" />
</div>
</template>
<script>
import drawerAdd from './add-or-updata.vue';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter';
import { getMainTaskHistoryPage } from '@/api/oth/mainTaskHistory';
import point from './point';
const tableProps = [
{
prop: 'mainTaskCode',
label: '任务编码',
},
{
prop: 'inOutWarehouseName',
label: '出入移库库位',
},
{
prop: 'relocationWarehouseName',
label: '移库终点库位',
},
{
prop: 'mainTaskType',
label: '任务类型',
filter: codeFilter('mainTaskType'),
width: 100,
},
{
prop: 'stacker',
label: '堆垛机',
width: 110,
},
{
prop: 'barCode',
label: '托盘编码',
},
{
prop: 'agv',
label: 'agv',
},
{
prop: 'agvStartPoint',
label: 'AGV起点',
},
{
prop: 'agvEndPoint',
label: 'AGV终点',
},
{
prop: 'mainTaskState',
label: '状态',
subcomponent: point,
},
{
prop: 'taskSource',
label: '任务来源',
filter: codeFilter('taskSourceBuyIn'),
width: 100,
},
{
prop: 'createTime',
label: '创建时间',
filter: parseTime,
width: 150,
},
];
const mainTaskType = [
{
name: '入库',
id: 1,
},
{
name: '出库',
id: 2,
},
{
name: '移库',
id: 3,
},
{
name: '出库+移库',
id: 4,
},
{
name: '不带agv入库',
id: 5,
},
{
name: '不带agv出库',
id: 6,
},
{
name: '入库+6臂空托盘出库',
id: 7,
},
{
name: '不带agv出库+移库',
id: 8,
},
{
name: '入库+12臂空托盘出库',
id: 9,
},
{
name: '平库移库',
id: 10,
},
{
name: '盘库出库',
id: 11,
},
{
name: '盘库入库',
id: 12,
},
{
name: '盘库出库+移库',
id: 13,
},
];
const mainTaskState = [
{
name: '开始',
id: 0,
},
{
name: '已发送agv',
id: 1,
},
{
name: 'agv运行中',
id: 2,
},
{
name: '已发送堆垛机',
id: 3,
},
{
name: '堆垛机运行中',
id: 4,
},
{
name: '完成',
id: 5,
},
{
name: '已发送传输线',
id: 6,
},
{
name: '传输线运行中',
id: 7,
},
{
name: '暂时无空托盘',
id: 8,
},
];
export default {
mixins: [basicPage],
components: {
drawerAdd,
},
data() {
return {
urlOptions: {
getDataListURL: getMainTaskHistoryPage,
},
listQuery: {
taskSource: 4,
pageSize: 10,
pageNo: 1,
total: 1,
},
drawerVisible: false,
tableProps,
tableBtn: [
// {
// type: 'canlce',
// btnName: '',
// },
],
tableData: [],
formConfig: [
{
type: 'input',
label: '任务编码',
placeholder: '任务编码',
param: 'code',
},
{
type: 'select',
label: '任务类型',
selectOptions: mainTaskType,
param: 'taskType',
defaultSelect: '',
filterable: true,
},
{
type: 'input',
label: '托盘编码',
placeholder: '托盘编码',
param: 'tcode',
},
{
type: 'select',
label: '状态',
selectOptions: mainTaskState,
param: 'status',
defaultSelect: '',
filterable: true,
},
{
type: 'select',
label: 'agv',
selectOptions: [],
param: 'agv',
defaultSelect: '',
filterable: true,
},
{
type: 'datePicker',
label: '选择日期',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
},
{
type: 'button',
btnName: '搜索',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '重置',
name: 'reset',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true,
},
],
};
},
created() {
this.listQuery.warehouseId = this.bId
this.listQuery.taskSource = 4;
this.setFormConfig();
},
methods: {
setFormConfig() {
for (let i = 1; i <= 16; i++) {
const obj = {
id: i,
name: i,
};
this.formConfig[4].selectOptions.push(obj);
}
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType;
this.listQuery.barCode = val.tcode;
this.listQuery.mainTaskState = val.status;
this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime;
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
this.getDataList();
break;
case 'reset':
this.$refs.searchBarForm.resetForm();
this.listQuery = {
warehouseId: '1698950657556340737',
taskSource: 4,
pageSize: 10,
pageNo: 1,
total: 1,
};
this.getDataList();
break;
case 'add':
this.drawerVisible = true;
this.$nextTick(() => {
this.$refs.drawerRef.init(this.listQuery.warehouseId);
});
break;
default:
console.log(val);
}
},
otherMethods(val) {
this.$confirm(
`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
},
});
});
})
.catch(() => {});
},
},
};
</script>

View File

@ -0,0 +1,54 @@
<!--
* @Author: zwq
* @Date: 2024-01-17 15:16:28
* @LastEditors: zwq
* @LastEditTime: 2024-03-13 15:03:09
* @Description:
-->
<template>
<div>
{{ mainTaskState[injectData.mainTaskState] }}
<el-button v-if="injectData.mainTaskState===8" type="text" size="mini" @click="Radd()">重补</el-button>
</div>
</template>
<script>
import { Radd } from '@/api/oth/mainTask';
const mainTaskState = {
0: '开始',
1: '已发送agv',
2: 'agv运行中',
3: '已发送堆垛机',
4: '堆垛机运行中',
5: '完成',
6: '已发送传输线',
7: '传输线运行中',
8: '暂时无空托盘',
};
export default {
name: 'point',
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
list: this.injectData,
mainTaskState,
};
},
methods: {
Radd() {
Radd(this.injectData.id).then((response) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
});
});
},
},
};
</script>
<style scoped></style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-06-25 08:49:35
* @LastEditTime: 2025-08-14 09:47:56
* @Description:
-->
<template>
@ -233,6 +233,19 @@
<el-table-column prop="productCode" label="物料编码" width="120" />
<el-table-column prop="productQuality" label="货物品质" />
<el-table-column prop="process" label="工序" />
<el-table-column prop="earlyTime" label="最早时间">
<template slot-scope="scope">
<span>
{{
scope.row.earlyTime
? scope.row.earlyTime == 0
? '是'
: '否'
: ''
}}
</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="50">
<template slot-scope="scope">
<el-button
@ -308,7 +321,10 @@
clearable />
</el-form-item>
<el-form-item label="数量" prop="planQty">
<el-input v-model="listQuery.planQty" clearable placeholder="请输入数量" />
<el-input
v-model="listQuery.planQty"
clearable
placeholder="请输入数量" />
</el-form-item>
<el-form-item label="当日工单" prop="todayOrder">
<el-input
@ -328,6 +344,17 @@
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="完成日期" prop="finishTime">
<el-date-picker
v-model="listQuery.finishTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
搜索
@ -357,13 +384,18 @@
<el-table-column property="grade" label="货物品质" width="80" />
<el-table-column property="cpGrade" label="初判等级" width="80" />
<el-table-column property="fpGrade" label="复判等级" width="80" />
<el-table-column property="inventory" label="膜卷号" />
<el-table-column property="inventory" label="膜卷号" width="160" />
<el-table-column property="process" label="工序" width="80" />
<el-table-column property="createTime" label="入库时间" width="180">
<el-table-column property="createTime" label="入库时间" width="160">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column property="finishTime" label="完成日期" width="160">
<template v-slot="scope">
<span>{{ parseTime(scope.row.finishTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
:limit.sync="listQuery.pageSize"
@ -382,6 +414,7 @@ import {
getDelivery,
getCode,
createDeliveryList,
checkGoods,
} from '@/api/oth/delivery';
import { getPage } from '@/api/oth/rollMessage';
import { getLineList } from '@/api/asrs/warehouseStorehouse';
@ -566,12 +599,67 @@ export default {
});
},
setTray(val) {
const params = {
containerCode: val.containerCode,
warehouseId: this.aId,
};
checkGoods(params).then((res) => {
if (res == 0) {
this.innerVisible = false;
this.$set(this.tableData[this.trayIndex], 'trayCode', val.trayCode);
this.$set(this.tableData[this.trayIndex], 'productName', val.description);
this.$set(this.tableData[this.trayIndex], 'productCode', val.productCode);
this.$set(this.tableData[this.trayIndex], 'productQuality', val.grade);
this.$set(
this.tableData[this.trayIndex],
'productName',
val.description
);
this.$set(
this.tableData[this.trayIndex],
'productCode',
val.productCode
);
this.$set(
this.tableData[this.trayIndex],
'productQuality',
val.grade
);
this.$set(this.tableData[this.trayIndex], 'process', val.process);
this.$set(this.tableData[this.trayIndex], 'earlyTime', 0);
} else {
this.$confirm('该货物不是完成日期最早货物,是否选择出库?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.innerVisible = false;
this.$set(
this.tableData[this.trayIndex],
'trayCode',
val.trayCode
);
this.$set(
this.tableData[this.trayIndex],
'productName',
val.description
);
this.$set(
this.tableData[this.trayIndex],
'productCode',
val.productCode
);
this.$set(
this.tableData[this.trayIndex],
'productQuality',
val.grade
);
this.$set(this.tableData[this.trayIndex], 'process', val.process);
this.$set(this.tableData[this.trayIndex], 'earlyTime', 1);
})
.catch(() => {
return;
});
}
});
},
//dialog
handleQuery() {
@ -591,6 +679,12 @@ export default {
this.listQuery.endTime = this.listQuery.createTime
? this.listQuery.createTime[1]
: null;
this.listQuery.startfinshTime = this.listQuery.finishTime
? this.listQuery.finishTime[0]
: null;
this.listQuery.endfinshTime = this.listQuery.finishTime
? this.listQuery.finishTime[1]
: null;
this.getGridList();
},
//

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-06-25 08:50:54
* @LastEditTime: 2025-08-14 09:33:21
* @Description:
-->
<template>
@ -233,6 +233,13 @@
<el-table-column prop="productCode" label="物料编码" width="120" />
<el-table-column prop="productQuality" label="货物品质" />
<el-table-column prop="process" label="工序" />
<el-table-column prop="earlyTime" label="最早时间">
<template slot-scope="scope">
<span>
{{ scope.row.earlyTime?scope.row.earlyTime == 0 ? '是' : '否':'' }}
</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="50">
<template slot-scope="scope">
<el-button
@ -328,6 +335,17 @@
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="完成日期" prop="finishTime">
<el-date-picker
v-model="listQuery.finishTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
搜索
@ -357,13 +375,18 @@
<el-table-column property="grade" label="货物品质" width="80" />
<el-table-column property="cpGrade" label="初判等级" width="80" />
<el-table-column property="fpGrade" label="复判等级" width="80" />
<el-table-column property="inventory" label="膜卷号" />
<el-table-column property="inventory" label="膜卷号" width="160" />
<el-table-column property="process" label="工序" width="80" />
<el-table-column property="createTime" label="入库时间" width="180">
<el-table-column property="createTime" label="入库时间" width="160">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column property="finishTime" label="完成日期" width="160">
<template v-slot="scope">
<span>{{ parseTime(scope.row.finishTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
:limit.sync="listQuery.pageSize"
@ -382,6 +405,7 @@ import {
getDelivery,
getCode,
createDeliveryList,
checkGoods
} from '@/api/oth/delivery';
import { getPage } from '@/api/oth/rollMessage';
import { getLineList } from '@/api/asrs/warehouseStorehouse';
@ -566,12 +590,67 @@ export default {
});
},
setTray(val) {
const params = {
containerCode: val.containerCode,
warehouseId: this.bId,
};
checkGoods(params).then((res) => {
if (res == 0) {
this.innerVisible = false;
this.$set(this.tableData[this.trayIndex], 'trayCode', val.trayCode);
this.$set(this.tableData[this.trayIndex], 'productName', val.description);
this.$set(this.tableData[this.trayIndex], 'productCode', val.productCode);
this.$set(this.tableData[this.trayIndex], 'productQuality', val.grade);
this.$set(
this.tableData[this.trayIndex],
'productName',
val.description
);
this.$set(
this.tableData[this.trayIndex],
'productCode',
val.productCode
);
this.$set(
this.tableData[this.trayIndex],
'productQuality',
val.grade
);
this.$set(this.tableData[this.trayIndex], 'process', val.process);
this.$set(this.tableData[this.trayIndex], 'earlyTime', 0);
} else {
this.$confirm('该货物不是完成日期最早货物,是否选择出库?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.innerVisible = false;
this.$set(
this.tableData[this.trayIndex],
'trayCode',
val.trayCode
);
this.$set(
this.tableData[this.trayIndex],
'productName',
val.description
);
this.$set(
this.tableData[this.trayIndex],
'productCode',
val.productCode
);
this.$set(
this.tableData[this.trayIndex],
'productQuality',
val.grade
);
this.$set(this.tableData[this.trayIndex], 'process', val.process);
this.$set(this.tableData[this.trayIndex], 'earlyTime', 1);
})
.catch(() => {
return;
});
}
});
},
//dialog
handleQuery() {
@ -591,6 +670,12 @@ export default {
this.listQuery.endTime = this.listQuery.createTime
? this.listQuery.createTime[1]
: null;
this.listQuery.startfinshTime = this.listQuery.finishTime
? this.listQuery.finishTime[0]
: null;
this.listQuery.endfinshTime = this.listQuery.finishTime
? this.listQuery.finishTime[1]
: null;
this.getGridList();
},
//

View File

@ -115,6 +115,13 @@ const tableProps = [
prop: 'workOrder',
label: '产出工单',
},
{
prop: 'earlyTime',
label: '最早时间',
filter: (val) => {
val == 0 ? '是' : '否';
},
},
{
prop: 'department',
label: '部门',

View File

@ -115,6 +115,13 @@ const tableProps = [
prop: 'workOrder',
label: '产出工单',
},
{
prop: 'earlyTime',
label: '最早时间',
filter: (val) => {
val == 0 ? '是' : '否';
},
},
{
prop: 'department',
label: '部门',

View File

@ -61,6 +61,19 @@
</template>
</el-table-column>
<el-table-column prop="workOrder" label="产出工单" />
<el-table-column prop="earlyTime" label="最早时间">
<template slot-scope="scope">
<span>
{{
scope.row.earlyTime
? scope.row.earlyTime == 0
? '是'
: '否'
: ''
}}
</span>
</template>
</el-table-column>
<el-table-column prop="department" label="部门" />
<el-table-column prop="applicant" label="申请人" />
<el-table-column prop="process" label="工序" />

View File

@ -47,7 +47,13 @@
<el-table-column prop="region" label="发货区域" width="95">
<template slot-scope="scope">
<span>
{{ scope.row.region?regionArr.filter(item=>{return item.id===scope.row.region})[0].name:'-' }}
{{
scope.row.region
? regionArr.filter((item) => {
return item.id === scope.row.region;
})[0].name
: '-'
}}
</span>
</template>
</el-table-column>
@ -61,6 +67,19 @@
</template>
</el-table-column>
<el-table-column prop="workOrder" label="产出工单" />
<el-table-column prop="earlyTime" label="最早时间">
<template slot-scope="scope">
<span>
{{
scope.row.earlyTime
? scope.row.earlyTime == 0
? '是'
: '否'
: ''
}}
</span>
</template>
</el-table-column>
<el-table-column prop="department" label="部门" />
<el-table-column prop="applicant" label="申请人" />
<el-table-column prop="process" label="工序" />
@ -235,7 +254,7 @@ export default {
product,
},
created() {
this.listQuery.warehouseId = this.bId
this.listQuery.warehouseId = this.bId;
const params = {
pageSize: 100,
pageNo: 1,

View File

@ -0,0 +1,155 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2025-08-14 13:57:21
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
<el-form-item label-width="150px" label="新的起点" prop="newstart">
<el-select
v-model="dataForm.newstart"
style="width: 100%"
placeholder="请选择新的起点">
<el-option
v-for="item in libraryArr"
:key="item.id"
:label="item.agvGroundCode"
:value="item.agvGroundCode" />
</el-select>
</el-form-item>
<el-form-item label-width="150px" label="新的巷道" prop="tostcker">
<el-select
v-model="dataForm.tostcker"
style="width: 100%"
placeholder="请选择新的巷道">
<el-option
v-for="item in stackerArr"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import { updatestacker, getLibraryPage } from '@/api/oth/mainTask';
const stackerArr1 = [
{
name: 'DDJ1',
id: 1,
},
{
name: 'DDJ2',
id: 2,
},
{
name: 'DDJ3',
id: 3,
},
{
name: 'DDJ4',
id: 4,
},
];
const stackerArr2 = [
{
name: 'DDJ5',
id: 5,
},
{
name: 'DDJ6',
id: 6,
},
{
name: 'DDJ7',
id: 7,
},
{
name: 'DDJ8',
id: 8,
},
];
export default {
data() {
return {
stackerArr: [],
stackerArr1,
stackerArr2,
libraryArr: [],
dataForm: {
id: undefined,
barCode: undefined,
tostcker: '',
newstart: '',
warehouseId: '',
},
aId: '1696803324030865409',
bId: '1698950657556340737',
dataRule: {
newstart: [
{ required: true, message: '新起点不能为空', trigger: 'change' },
],
tostcker: [
{ required: true, message: '目标堆垛机不能为空', trigger: 'change' },
],
},
};
},
methods: {
init(id, barCode, bPage) {
this.dataForm.id = id || '';
this.dataForm.barCode = barCode;
this.visible = true;
this.stackerArr = [];
if (bPage) {
this.dataForm.warehouseId = this.bId;
this.stackerArr = this.stackerArr2;
} else {
this.dataForm.warehouseId = this.aId;
this.stackerArr = this.stackerArr1;
}
const params = {
pageSize: 100,
pageNo: 1,
warehouseId: this.dataForm.warehouseId,
};
getLibraryPage(params).then((res) => {
this.libraryArr = res.data.list;
});
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
}
});
},
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
const data = {
...this.dataForm,
};
updatestacker(data).then((res) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
});
},
formClear() {
this.$refs.dataForm.resetFields();
},
},
};
</script>

View File

@ -24,10 +24,20 @@
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" />
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter';
@ -51,12 +61,12 @@ const tableProps = [
prop: 'mainTaskType',
label: '任务类型',
filter: codeFilter('mainTaskType'),
width:100
width: 100,
},
{
prop: 'stacker',
label: '堆垛机',
width:110
width: 110,
},
{
prop: 'barCode',
@ -77,19 +87,19 @@ const tableProps = [
{
prop: 'mainTaskState',
label: '状态',
subcomponent: point
subcomponent: point,
},
{
prop: 'taskSource',
label: '任务来源',
filter: codeFilter('taskSource'),
width:100
filter: codeFilter('taskSourceBuyIn'),
width: 100,
},
{
prop: 'createTime',
label: '创建时间',
filter: parseTime,
width:150
width: 150,
},
];
const mainTaskType = [
@ -186,6 +196,9 @@ const mainTaskState = [
];
export default {
mixins: [basicPage],
components: {
AddOrUpdate,
},
data() {
return {
urlOptions: {
@ -198,12 +211,7 @@ export default {
total: 1,
},
tableProps,
tableBtn: [
// {
// type: 'canlce',
// btnName: '',
// },
],
tableBtn: [],
tableData: [],
formConfig: [
{
@ -267,8 +275,30 @@ export default {
],
};
},
components: {},
created() {
this.tableBtn = [];
const obj = {
type: 'changeXD',
btnName: '变更巷道',
showParam: {
type: '|',
data: [
{
type: 'equal',
name: 'mainTaskState',
value: 1,
},
{
type: 'equal',
name: 'mainTaskState',
value: 2,
},
],
},
};
if (this.$auth.hasPermi(`asrs:job-main-task:changeXD`)) {
this.tableBtn.push(obj);
}
this.setFormConfig();
},
methods: {
@ -310,25 +340,34 @@ export default {
console.log(val);
}
},
otherMethods(val){
this.$confirm(`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
otherMethods(val) {
this.addOrEditTitle = '变更巷道';
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, val.data.barCode, this.bPage);
});
});
})
.catch(() => { });
// this.$confirm(
// `${'[=' + val.data.mainTaskCode + ']'}?`,
// '',
// {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// }
// )
// .then(() => {
// this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// this.getDataList();
// },
// });
// });
// })
// .catch(() => {});
},
},
};

View File

@ -1,3 +1,10 @@
<!--
* @Author: zwq
* @Date: 2024-02-27 15:32:56
* @LastEditors: zwq
* @LastEditTime: 2025-08-14 15:56:11
* @Description:
-->
<template>
<div class="app-container">
<search-bar
@ -24,10 +31,20 @@
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" />
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="addOrUpdateVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%">
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" />
</base-dialog>
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter';
@ -51,12 +68,12 @@ const tableProps = [
prop: 'mainTaskType',
label: '任务类型',
filter: codeFilter('mainTaskType'),
width:100
width: 100,
},
{
prop: 'stacker',
label: '堆垛机',
width:110
width: 110,
},
{
prop: 'barCode',
@ -77,19 +94,19 @@ const tableProps = [
{
prop: 'mainTaskState',
label: '状态',
subcomponent: point
subcomponent: point,
},
{
prop: 'taskSource',
label: '任务来源',
filter: codeFilter('taskSource'),
width:100
filter: codeFilter('taskSourceBuyIn'),
width: 100,
},
{
prop: 'createTime',
label: '创建时间',
filter: parseTime,
width:150
width: 150,
},
];
const mainTaskType = [
@ -186,6 +203,9 @@ const mainTaskState = [
];
export default {
mixins: [basicPage],
components: {
AddOrUpdate,
},
data() {
return {
urlOptions: {
@ -197,13 +217,9 @@ export default {
pageNo: 1,
total: 1,
},
bPage: true,
tableProps,
tableBtn: [
// {
// type: 'canlce',
// btnName: '',
// },
],
tableBtn: [],
tableData: [],
formConfig: [
{
@ -267,9 +283,31 @@ export default {
],
};
},
components: {},
created() {
this.listQuery.warehouseId = this.bId
this.tableBtn = [];
const obj = {
type: 'changeXD',
btnName: '变更巷道',
showParam: {
type: '|',
data: [
{
type: 'equal',
name: 'mainTaskState',
value: 1,
},
{
type: 'equal',
name: 'mainTaskState',
value: 2,
},
],
},
};
if (this.$auth.hasPermi(`asrs:job-main-task:changeXDb`)) {
this.tableBtn.push(obj);
}
this.listQuery.warehouseId = this.bId;
this.setFormConfig();
},
methods: {
@ -311,25 +349,34 @@ export default {
console.log(val);
}
},
otherMethods(val){
this.$confirm(`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
otherMethods(val) {
this.addOrEditTitle = '变更巷道';
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id,val.data.barCode,this.bPage);
});
});
})
.catch(() => { });
// this.$confirm(
// `${'[=' + val.data.mainTaskCode + ']'}?`,
// '',
// {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// }
// )
// .then(() => {
// this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// this.getDataList();
// },
// });
// });
// })
// .catch(() => {});
},
},
};

View File

@ -2,7 +2,7 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: zwq
* @LastEditTime: 2024-06-21 15:00:05
* @LastEditTime: 2025-08-14 15:44:13
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
@ -62,6 +62,12 @@ const table = {
2: 'wms手动',
3: '自动包装线',
},
taskSourceBuyIn: {
1: 'mes下发',
2: 'wms手动',
3: '自动包装线',
4: 'wms外购',
},
cancellation: {
1: '否',
2: '是',

View File

@ -218,7 +218,7 @@
<stacker-dialog
ref="stackerRef"
v-if="stackerVisible"
:warehouse-id="listQuery.aId"></stacker-dialog>
:warehouse-id="aId"></stacker-dialog>
</div>
</template>

View File

@ -218,7 +218,7 @@
<stacker-dialog
ref="stackerRef"
v-if="stackerVisible"
:warehouse-id="listQuery.bId"></stacker-dialog>
:warehouse-id="bId"></stacker-dialog>
</div>
</template>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-09-23 14:10:53
* @LastEditTime: 2025-08-14 15:04:06
* @Description:
-->
<template>
@ -13,24 +13,67 @@
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)">
<div
style="
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
">
<el-card shadow="hover" v-for="item in stackerList" :key="item.id">
<el-descriptions :column="1" size="mini" border>
<el-descriptions-item label="巷道名称">
<el-descriptions-item
label="巷道名称"
:labelStyle="{ color: 'black' }"
:contentStyle="{ color: 'black', fontWeight: '600' }">
{{ item.stackerName }}
</el-descriptions-item>
<el-descriptions-item label="巷道状态">
<el-tag size="mini" :type="item.stackerState === 1 ? '' : 'warning'">
<el-descriptions-item
label="巷道状态"
:labelStyle="{ color: 'black' }"
:contentStyle="{ color: 'black' }">
<el-tag
size="mini"
:type="item.stackerState === 1 ? '' : 'warning'">
{{ item.stackerState === 1 ? '开启中' : '已关闭' }}
</el-tag>
<el-switch
style="float: right"
@change="changeStatus(item)"
@change="changeStatus(1, item)"
:active-value="1"
:inactive-value="0"
v-model="item.stackerState" />
</el-descriptions-item>
<el-descriptions-item
label="巷道入口"
:labelStyle="{ color: 'black' }"
:contentStyle="{ color: 'black' }">
<el-tag size="mini" :type="item.inOpen === 1 ? '' : 'warning'">
{{ item.inOpen === 1 ? '开启中' : '已关闭' }}
</el-tag>
<el-switch
style="float: right"
@change="changeStatus(2, item)"
:active-value="1"
:inactive-value="0"
v-model="item.inOpen" />
</el-descriptions-item>
<el-descriptions-item
label="巷道出口"
:labelStyle="{ color: 'black' }"
:contentStyle="{ color: 'black' }">
<el-tag size="mini" :type="item.outOpen === 1 ? '' : 'warning'">
{{ item.outOpen === 1 ? '开启中' : '已关闭' }}
</el-tag>
<el-switch
style="float: right"
@change="changeStatus(3, item)"
:active-value="1"
:inactive-value="0"
v-model="item.outOpen" />
</el-descriptions-item>
</el-descriptions>
</el-card>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
</span>
@ -38,7 +81,12 @@
</template>
<script>
import { updateStacker, getStackerPage } from '@/api/asrs/stacker';
import {
updateStacker,
getStackerPage,
updateInStacker,
updateOutStacker,
} from '@/api/asrs/stacker';
export default {
props: {
@ -68,26 +116,46 @@ export default {
});
});
},
changeStatus(val) {
const _this = this
let text = val.stackerState === 1 ? '启用' : '关闭';
changeStatus(num, val) {
const _this = this;
const state = ['stackerState', 'inOpen', 'outOpen'];
const stateName = ['巷道', '巷道入口', '巷道出口'];
const Url = [updateStacker, updateInStacker, updateOutStacker];
let text = val[state[num - 1]] === 1 ? '启用' : '关闭';
this.$modal
.confirm('确认要"' + text + '""' + val.stackerName + '"巷道吗?')
.confirm(
'确认要"' +
text +
'""' +
val.stackerName +
stateName[num - 1] +
'"吗?'
)
.then(function () {
_this.loading = true;
const data = {
let data = {
id: val.id,
stacker: val.stacker,
stackerState: val.stackerState,
inOpen: val.inOpen,
outOpen: val.outOpen,
};
return updateStacker(data);
return Url[num - 1](data);
})
.then(() => {
_this.loading = false;
this.$modal.msgSuccess(text + '成功');
const params = {
pageNo: 1,
pageSize: 100,
warehouseId: _this.warehouseId,
};
getStackerPage(params).then((response) => {
_this.stackerList = response.data.list.reverse();
});
})
.catch(function () {
val.stackerState = val.stackerState === 1 ? 0 : 1;
val[state[num - 1]] = val[state[num - 1]] === 1 ? 0 : 1;
_this.loading = false;
});
},