|
@@ -80,7 +80,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调出仓库:"
|
|
label="调出仓库:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="outWarehouseId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -130,7 +130,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调出货架:"
|
|
label="调出货架:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="outShelvesId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -154,7 +154,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调出货位:"
|
|
label="调出货位:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="outFreightId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -281,7 +281,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调入仓库:"
|
|
label="调入仓库:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="inWarehouseId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -307,7 +307,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调入库区:"
|
|
label="调入库区:"
|
|
|
- prop="outCargoAreaId"
|
|
|
|
|
|
|
+ prop="inCargoAreaId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -331,7 +331,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调入货架:"
|
|
label="调入货架:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="inShelvesId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -355,7 +355,7 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label-width="65px"
|
|
label-width="65px"
|
|
|
label="调入货位:"
|
|
label="调入货位:"
|
|
|
- prop="warehouseId"
|
|
|
|
|
|
|
+ prop="inFreightId"
|
|
|
>
|
|
>
|
|
|
<template>
|
|
<template>
|
|
|
<el-select
|
|
<el-select
|
|
@@ -431,7 +431,7 @@
|
|
|
selection: [],
|
|
selection: [],
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
productList: [],
|
|
productList: [],
|
|
|
- allocateId: 1,
|
|
|
|
|
|
|
+ allocateId: 2,
|
|
|
currentPullAreaId: '',
|
|
currentPullAreaId: '',
|
|
|
currentPullAreaName: '',
|
|
currentPullAreaName: '',
|
|
|
currentTuneAreaId: '',
|
|
currentTuneAreaId: '',
|
|
@@ -715,13 +715,20 @@
|
|
|
minWidth: 130,
|
|
minWidth: 130,
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'batchNo',
|
|
|
|
|
+ // label: '批次号',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // minWidth: 110
|
|
|
|
|
+ // },
|
|
|
|
|
+ ...(this.dimension != '1' ? [{
|
|
|
prop: 'batchNo',
|
|
prop: 'batchNo',
|
|
|
label: '批次号',
|
|
label: '批次号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
|
|
+ minWidth: 130,
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }] : []),
|
|
|
this.dimension == 3 ? {
|
|
this.dimension == 3 ? {
|
|
|
prop: 'packageNo',
|
|
prop: 'packageNo',
|
|
|
label: '包装编码',
|
|
label: '包装编码',
|
|
@@ -779,18 +786,18 @@
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- prop: 'weight',
|
|
|
|
|
- label: '重量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'weightUnit',
|
|
|
|
|
- label: '重量单位',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'weight',
|
|
|
|
|
+ // label: '重量',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'weightUnit',
|
|
|
|
|
+ // label: '重量单位',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
label: '操作',
|
|
label: '操作',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -807,6 +814,8 @@
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
|
const code = await getCode('transfer_no');
|
|
const code = await getCode('transfer_no');
|
|
|
|
|
+ const name = await getCode('inventory_allocation_name');
|
|
|
|
|
+ this.params.name = name;
|
|
|
this.params.code = code;
|
|
this.params.code = code;
|
|
|
// this.getTreeData();
|
|
// this.getTreeData();
|
|
|
await this.getFactoryList();
|
|
await this.getFactoryList();
|
|
@@ -817,9 +826,10 @@
|
|
|
} else {
|
|
} else {
|
|
|
if(this.factoryList.find(item => item.id == this.userInfo.factoryId)?.id) {
|
|
if(this.factoryList.find(item => item.id == this.userInfo.factoryId)?.id) {
|
|
|
this.factoryId = this.userInfo.factoryId;
|
|
this.factoryId = this.userInfo.factoryId;
|
|
|
- if(this.allocateId == 1) {
|
|
|
|
|
- this.params.targetFactoriesId = this.factoryId
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.params.targetFactoriesId = this.factoryId
|
|
|
|
|
+ // if(this.allocateId == 1) {
|
|
|
|
|
+ // this.params.targetFactoriesId = this.factoryId
|
|
|
|
|
+ // }
|
|
|
this.getTreeData(this.factoryId)
|
|
this.getTreeData(this.factoryId)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -986,13 +996,36 @@
|
|
|
this.getTreeData();
|
|
this.getTreeData();
|
|
|
},
|
|
},
|
|
|
targetFactoryChange() {
|
|
targetFactoryChange() {
|
|
|
- this.reset();
|
|
|
|
|
- this.getTreeData();
|
|
|
|
|
|
|
+ // this.reset();
|
|
|
|
|
+ // this.getTreeData();
|
|
|
},
|
|
},
|
|
|
search() {
|
|
search() {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
// 重置错误标志
|
|
// 重置错误标志
|
|
|
this.searchState.hasError = false;
|
|
this.searchState.hasError = false;
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.params.targetFactoriesId){
|
|
|
|
|
+ this.searchState.hasError = true;
|
|
|
|
|
+ const errorMsg = '调入工厂不能为空';
|
|
|
|
|
+ this.$message.error(errorMsg);
|
|
|
|
|
+ return reject(new Error(errorMsg));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.params.inWarehouseId){
|
|
|
|
|
+ this.searchState.hasError = true;
|
|
|
|
|
+ const errorMsg = '调入仓库不能为空';
|
|
|
|
|
+ this.$message.error(errorMsg);
|
|
|
|
|
+ return reject(new Error(errorMsg));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 检查是否存在quantity小于等于0或无效的项
|
|
|
|
|
+ if(this.tableData.some((item) => !item.quantity || item.quantity <= 0)) {
|
|
|
|
|
+ this.searchState.hasError = true;
|
|
|
|
|
+ const errorMsg = '调拨数量不能为0';
|
|
|
|
|
+ this.$message.error(errorMsg);
|
|
|
|
|
+ return reject(new Error(errorMsg));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (this.allocateId == 1) {
|
|
if (this.allocateId == 1) {
|
|
|
// 库内调拨
|
|
// 库内调拨
|
|
|
if (this.params.inFreightId && this.params.outFreightId) {
|
|
if (this.params.inFreightId && this.params.outFreightId) {
|
|
@@ -1371,11 +1404,6 @@
|
|
|
this.selectionIds = this.selectionIds.filter((item) => item != row.id);
|
|
this.selectionIds = this.selectionIds.filter((item) => item != row.id);
|
|
|
this.selection = this.selection.filter((item) => item.id != row.id);
|
|
this.selection = this.selection.filter((item) => item.id != row.id);
|
|
|
this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
this.$refs.table.setSelectedRowKeys(this.selectionIds);
|
|
|
- console.log('this.$refs.table.getSelectedRowKeys()~~~~', this.$refs.table);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- console.log('selectionIds~~~~', this.selectionIds);
|
|
|
|
|
- console.log('selection~~~~', this.selection);
|
|
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
},
|
|
},
|
|
|
config() {
|
|
config() {
|
|
@@ -1390,7 +1418,7 @@
|
|
|
submit(status) {
|
|
submit(status) {
|
|
|
if (!this.params.name) {
|
|
if (!this.params.name) {
|
|
|
return this.$message.error('名称不能为空!');
|
|
return this.$message.error('名称不能为空!');
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 提交前通过search方法校验数据
|
|
// 提交前通过search方法校验数据
|
|
|
this.search().then(() => {
|
|
this.search().then(() => {
|