|
@@ -36,9 +36,11 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
:label="
|
|
:label="
|
|
|
formData.bizType == 3
|
|
formData.bizType == 3
|
|
|
- ? '销售订单'
|
|
|
|
|
|
|
+ ? '销售发货单'
|
|
|
: formData.bizType == 4
|
|
: formData.bizType == 4
|
|
|
? '领料单'
|
|
? '领料单'
|
|
|
|
|
+ : formData.bizType == 1
|
|
|
|
|
+ ? '采购退货单'
|
|
|
: '来源单据'
|
|
: '来源单据'
|
|
|
"
|
|
"
|
|
|
prop="sourceBizNo"
|
|
prop="sourceBizNo"
|
|
@@ -68,9 +70,11 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
:label="
|
|
:label="
|
|
|
formData.bizType == 3
|
|
formData.bizType == 3
|
|
|
- ? '销售订单'
|
|
|
|
|
|
|
+ ? '销售发货单'
|
|
|
: formData.bizType == 4
|
|
: formData.bizType == 4
|
|
|
? '领料单'
|
|
? '领料单'
|
|
|
|
|
+ : formData.bizType == 1
|
|
|
|
|
+ ? '采购退货单'
|
|
|
: '来源单据'
|
|
: '来源单据'
|
|
|
"
|
|
"
|
|
|
v-else
|
|
v-else
|
|
@@ -315,7 +319,9 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
<div class="material">
|
|
<div class="material">
|
|
|
- <el-button type="primary" @click="addStock">添加</el-button>
|
|
|
|
|
|
|
+ <div style="width: 100%; text-align: right"
|
|
|
|
|
+ ><el-button type="primary" @click="addStock">添加</el-button></div
|
|
|
|
|
+ >
|
|
|
<div v-if="dimension != 4">
|
|
<div v-if="dimension != 4">
|
|
|
<div class="flex">
|
|
<div class="flex">
|
|
|
<div><span class="red">*</span>物品清单</div>
|
|
<div><span class="red">*</span>物品清单</div>
|
|
@@ -524,13 +530,13 @@
|
|
|
label="计量单位"
|
|
label="计量单位"
|
|
|
prop="measuringUnit"
|
|
prop="measuringUnit"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
- <el-table-column label="物料代号" prop="materielCode">
|
|
|
|
|
|
|
+ <el-table-column label="物料代号" prop="meterielCode">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="客户代号"
|
|
label="客户代号"
|
|
|
prop="clientCode"
|
|
prop="clientCode"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
- <el-table-column label="刻码" prop=""></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="刻码" prop="engrave"></el-table-column>
|
|
|
<el-table-column label="重量" prop="weight"></el-table-column>
|
|
<el-table-column label="重量" prop="weight"></el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="重量单位"
|
|
label="重量单位"
|
|
@@ -741,7 +747,6 @@
|
|
|
if (dimension == 4) {
|
|
if (dimension == 4) {
|
|
|
this.materialCodeReqList = data.wlList;
|
|
this.materialCodeReqList = data.wlList;
|
|
|
this.selectionList = data.wlList;
|
|
this.selectionList = data.wlList;
|
|
|
- console.log('====', data);
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
|
realTimeInventoryNewPOList: data.realTimeInventoryVOList
|
|
realTimeInventoryNewPOList: data.realTimeInventoryVOList
|
|
@@ -755,7 +760,9 @@
|
|
|
|
|
|
|
|
for (const wlItem of data.wlList) {
|
|
for (const wlItem of data.wlList) {
|
|
|
if (detail.id === wlItem.recordId) {
|
|
if (detail.id === wlItem.recordId) {
|
|
|
- detail.outInMaterialDetailsAddPOList.push({ ...wlItem });
|
|
|
|
|
|
|
+ detail.outInMaterialDetailsAddPOList.push({
|
|
|
|
|
+ ...wlItem
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -764,18 +771,122 @@
|
|
|
|
|
|
|
|
this.materialObj = data;
|
|
this.materialObj = data;
|
|
|
} else if (dimension == 3) {
|
|
} else if (dimension == 3) {
|
|
|
- this.batchDetailsVOList = data.wlList.map((item) => {
|
|
|
|
|
|
|
+ //包装维度出库
|
|
|
|
|
+ const list = data.realTimeInventoryVOList;
|
|
|
|
|
+ //获取包装维度
|
|
|
|
|
+ let packArr = [];
|
|
|
|
|
+ for (const item of list) {
|
|
|
|
|
+ if (item.inventoryDetailsVOList.length != 0) {
|
|
|
|
|
+ for (const iterator of item.inventoryDetailsVOList) {
|
|
|
|
|
+ packArr.push({ ...iterator, batchNo: iterator.batchNum });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.batchDetailsVOList = packArr.map((item) => {
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
|
packingCountBase: dimension == 4 ? 1 : item.packingCountBase
|
|
packingCountBase: dimension == 4 ? 1 : item.packingCountBase
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
- this.selectionList = data.wlList;
|
|
|
|
|
- } else if (dimension == 2) {
|
|
|
|
|
- this.batchDetailsVOList = data.wlList;
|
|
|
|
|
- this.selectionList = data.wlList;
|
|
|
|
|
|
|
+ //物料维度数据
|
|
|
|
|
+ let meteArr = [];
|
|
|
|
|
+ for (const item of packArr) {
|
|
|
|
|
+ if (item.materialDetailsVOList.length != 0) {
|
|
|
|
|
+ for (const iterator of item.materialDetailsVOList) {
|
|
|
|
|
+ meteArr.push({
|
|
|
|
|
+ ...iterator
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.materialCodeReqList = meteArr;
|
|
|
|
|
+ //再次打开选择上
|
|
|
|
|
+ this.selectionList = list;
|
|
|
|
|
+ //send数据
|
|
|
|
|
+ this.wlParams = { realTimeInventoryNewPOList: list };
|
|
|
|
|
+ this.wlParams.realTimeInventoryNewPOList.forEach((item) => {
|
|
|
|
|
+ item.inventoryDetailsNewPOList = item.inventoryDetailsVOList;
|
|
|
|
|
+ item.inventoryDetailsNewPOList.forEach((ite) => {
|
|
|
|
|
+ ite.outInMaterialDetailsAddPOList = ite.materialDetailsVOList;
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // else if (dimension == 2) {
|
|
|
|
|
+ // this.batchDetailsVOList = data.wlList;
|
|
|
|
|
+ // this.selectionList = data.wlList;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //物品维度出库
|
|
|
|
|
+ const list = data.realTimeInventoryVOList;
|
|
|
|
|
+ //获取包装维度
|
|
|
|
|
+ let packArr = [];
|
|
|
|
|
+ for (const item of list) {
|
|
|
|
|
+ if (item.inventoryDetailsVOList.length != 0) {
|
|
|
|
|
+ for (const iterator of item.inventoryDetailsVOList) {
|
|
|
|
|
+ packArr.push({ ...iterator, batchNo: iterator.batchNum });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.batchDetailsVOList = packArr;
|
|
|
|
|
+ //物料维度数据
|
|
|
|
|
+ let meteArr = [];
|
|
|
|
|
+ for (const item of packArr) {
|
|
|
|
|
+ if (item.materialDetailsVOList.length != 0) {
|
|
|
|
|
+ for (const iterator of item.materialDetailsVOList) {
|
|
|
|
|
+ meteArr.push({
|
|
|
|
|
+ ...iterator
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.materialCodeReqList = meteArr;
|
|
|
|
|
+ //再次打开选择上
|
|
|
|
|
+ this.selectionList = list;
|
|
|
|
|
+ //send数据
|
|
|
|
|
+ this.wlParams = { realTimeInventoryNewPOList: list };
|
|
|
|
|
+ this.wlParams.realTimeInventoryNewPOList.forEach((item) => {
|
|
|
|
|
+ item.inventoryDetailsNewPOList = item.inventoryDetailsVOList;
|
|
|
|
|
+ item.inventoryDetailsNewPOList.forEach((ite) => {
|
|
|
|
|
+ ite.outInMaterialDetailsAddPOList = ite.materialDetailsVOList;
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ handleNewSave() {
|
|
|
|
|
+ this.$refs.formName.validate(async (valid) => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ if (!this.warehousingMaterialList?.length) {
|
|
|
|
|
+ return this.$message.error('请添加出库明细!');
|
|
|
|
|
+ }
|
|
|
|
|
+ let obj = { ...this.formData, type: 2 };
|
|
|
|
|
+
|
|
|
|
|
+ obj.extInfo.sourceBizNo = obj.sourceBizNo;
|
|
|
|
|
+ obj.fromType = obj.type;
|
|
|
|
|
+ this.saveLoading = true;
|
|
|
|
|
+ obj = { ...obj, ...this.wlParams };
|
|
|
|
|
+ if (this.dimension == 4) {
|
|
|
|
|
+ obj.num = this.materialObj.wlList.length;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ obj.num = this.materialCodeReqList.length;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log('2222', obj);
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ // const res = await outin.saveNew(obj);
|
|
|
|
|
+ // if (res.code == 0) {
|
|
|
|
|
+ // this.$message.success('保存成功!');
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.$router.push('/warehouseManagement/outgoingManagement');
|
|
|
|
|
+ // if (res?.success) {
|
|
|
|
|
+ // this.$message.success('保存成功!');
|
|
|
|
|
+ // this.$router.go(-1);
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.saveLoading = false;
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.saveLoading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
onClear() {
|
|
onClear() {
|
|
|
this.formData.sourceBizNo = '';
|
|
this.formData.sourceBizNo = '';
|
|
@@ -1039,40 +1150,6 @@
|
|
|
}
|
|
}
|
|
|
return arr;
|
|
return arr;
|
|
|
},
|
|
},
|
|
|
- handleNewSave() {
|
|
|
|
|
- this.$refs.formName.validate(async (valid) => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- if (!this.warehousingMaterialList?.length) {
|
|
|
|
|
- return this.$message.error('请添加出库明细!');
|
|
|
|
|
- }
|
|
|
|
|
- let obj = { ...this.formData, type: 2 };
|
|
|
|
|
-
|
|
|
|
|
- obj.extInfo.sourceBizNo = obj.sourceBizNo;
|
|
|
|
|
- obj.fromType = obj.type;
|
|
|
|
|
- this.saveLoading = true;
|
|
|
|
|
- obj.num = this.materialObj.wlList.length;
|
|
|
|
|
- if (this.dimension == 4) {
|
|
|
|
|
- obj = { ...obj, ...this.wlParams };
|
|
|
|
|
- }
|
|
|
|
|
- console.log('2222', obj);
|
|
|
|
|
-
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await outin.saveNew(obj);
|
|
|
|
|
- if (res.code == 0) {
|
|
|
|
|
- this.$message.success('保存成功!');
|
|
|
|
|
- }
|
|
|
|
|
- this.$router.push('/warehouseManagement/outgoingManagement');
|
|
|
|
|
- if (res?.success) {
|
|
|
|
|
- this.$message.success('保存成功!');
|
|
|
|
|
- this.$router.go(-1);
|
|
|
|
|
- }
|
|
|
|
|
- this.saveLoading = false;
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- this.saveLoading = false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
handleSave() {
|
|
handleSave() {
|
|
|
this.$refs.formName.validate(async (valid) => {
|
|
this.$refs.formName.validate(async (valid) => {
|