This commit is contained in:
2023-10-25 16:44:11 +08:00
parent d51328c836
commit 60c6131cfe
21 changed files with 195 additions and 107 deletions

View File

@@ -22,7 +22,7 @@
<el-form-item label="库位编码" prop="warehouseStorehouseCode">
<el-input
v-model="dataForm.warehouseStorehouseCode"
readonly
disabled
placeholder="请输入库位编码" />
</el-form-item>
</el-col>
@@ -30,10 +30,37 @@
<el-form-item label="库位名" prop="warehouseStorehouseName">
<el-input
v-model="dataForm.warehouseStorehouseName"
readonly
disabled
placeholder="请输入库位名" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="托盘编码" prop="trayCode">
<el-input
v-model="dataForm.trayCode"
@input="$forceUpdate()"
placeholder="请输入托盘编码" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="选择起点位置"
prop="startInfo">
<el-select
v-model="dataForm.startInfo"
style="width: 100%"
@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-col :span="8">
<el-form-item label="工序" prop="process">
<el-select
@@ -49,31 +76,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="托盘编码" prop="trayCode">
<el-input
v-model="dataForm.trayCode"
@input="$forceUpdate()"
placeholder="请输入托盘编码" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="选择起点位置"
prop="inWarehouseStorehouseName">
<el-select
v-model="dataForm.inWarehouseStorehouseName"
style="width: 100%"
@change="$forceUpdate()"
placeholder="请选择起点位置">
<el-option
v-for="item in potArr"
:key="item.id"
:label="item.lineEdgeLibraryCode"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
@@ -124,13 +126,11 @@
</template>
<script>
import { updateProduct } from '@/api/core/base/product';
import { getWarehouseStorehouseGoodsSpecificationPage } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import {
getWarehouseStorehouseGoodsSpecificationPage,
deleteWarehouseStorehouseGoodsSpecification,
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
import { getLineList } from '@/api/asrs/warehouseStorehouse';
getLineList,
inWarehouseStorehouse,
} from '@/api/asrs/warehouseStorehouse';
import productAttrAdd from './attr-add';
import inputArea from '../mixins/inputArea';
import selectQuality from '../mixins/selectQuality';
@@ -218,21 +218,30 @@ export default {
warehouseStorehouseName: '',
warehouseStorehouseCode: '',
process: '',
inWarehouseStorehouseName: '',
trayCode: '',
startInfo: '',
},
updata: {},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
},
dataRule: {
// name: [
// {
// required: true,
// message: '产品名称不能为空',
// trigger: 'blur',
// },
// ],
trayCode: [
{
required: true,
message: '托盘编码不能为空',
trigger: 'blur',
},
],
startInfo: [
{
required: true,
message: '起点位置不能为空',
trigger: 'change',
},
],
},
};
},
@@ -241,7 +250,13 @@ export default {
this.productAttributeList.splice(0);
},
init(val) {
this.dataForm = val;
this.updata = val;
this.dataForm.id = val.id;
this.dataForm.warehouseStorehouseName = val.warehouseStorehouseName;
this.dataForm.warehouseStorehouseCode = val.warehouseStorehouseCode;
this.dataForm.process = val.process;
this.dataForm.trayCode = val.trayCode;
this.dataForm.startInfo = ''
this.initData();
this.visible = true;
getLineList().then((response) => {
@@ -316,12 +331,18 @@ export default {
item.warehouseStorehouseId = this.dataForm.id;
item.warehouseId = '';
});
this.updata.process = this.dataForm.process;
this.updata.trayCode = this.dataForm.trayCode;
this.updata.lineEdgeLibraryCode =
this.dataForm.startInfo.split('-')[0];
this.updata.agvGroundCode =
this.dataForm.startInfo.split('-')[1];
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// 修改的提交
this.dataForm.list = this.productAttributeList;
this.updata.list = this.productAttributeList;
if (this.dataForm.id) {
updateProduct(this.dataForm).then((response) => {
inWarehouseStorehouse(this.updata).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');

View File

@@ -286,7 +286,7 @@ export default {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '移库';
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, 1);
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId);
});
} else if (val.type === 'in') {
this.drawerVisible = true;
@@ -297,6 +297,7 @@ export default {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
trayCode:val.data.id.trayCode?val.data.id.trayCode:''
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');

View File

@@ -288,7 +288,7 @@ export default {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '移库';
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, 1);
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId);
});
} else if (val.type === 'in') {
this.drawerVisible = true;
@@ -299,6 +299,7 @@ export default {
const dataForm = {
id: val.data.id.id,
deactivate: 1,
trayCode:val.data.id.trayCode?val.data.id.trayCode:''
};
updateWarehouseStorehouse(dataForm).then((response) => {
this.$modal.msgSuccess('启用成功');

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2023-10-11 13:45:45
* @LastEditTime: 2023-10-20 15:36:19
* @Description:
-->
<template>
@@ -56,14 +56,14 @@ export default {
};
},
methods: {
init(id, type) {
init(id, type,wId) {
this.dataForm.sourceId = id || '';
this.type = type;
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.type) {
getWarehouseStorehouseList().then((response) => {
getWarehouseStorehouseList({warehouseId:wId}).then((response) => {
this.potArr = response.data;
});
return;