|
|
@@ -115,10 +115,17 @@
|
|
|
tooltip-effect="dark"
|
|
|
:max-height="300"
|
|
|
:header-cell-style="rowClass"
|
|
|
+ @selection-change="handleSelectionProductChange"
|
|
|
>
|
|
|
<el-table-column label="序号" type="index" width="50">
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55"
|
|
|
+ align="center"
|
|
|
+ :selectable="selectable"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
minWidth="150"
|
|
|
label="出库单号"
|
|
|
@@ -281,7 +288,12 @@
|
|
|
align="center"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column type="selection" width="55" align="center">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :selectable="selectablePick"
|
|
|
+ width="55"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="编码"
|
|
|
@@ -474,9 +486,7 @@
|
|
|
getInfoBySourceBizNoAPI,
|
|
|
getInfoBySourceBizNoAll
|
|
|
} from '@/api/wms';
|
|
|
- import {
|
|
|
- getUserDetail
|
|
|
- } from '@/api/system/organization/index.js';
|
|
|
+ import { getUserDetail } from '@/api/system/organization/index.js';
|
|
|
|
|
|
import { fieldModelAPI } from '@/api/main';
|
|
|
export default {
|
|
|
@@ -509,7 +519,8 @@
|
|
|
stepsTitle: '已完成',
|
|
|
stepsStatus: 'success',
|
|
|
active: 0,
|
|
|
- multipleSelection: []
|
|
|
+ multipleSelection: [],
|
|
|
+ productSelection: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -572,6 +583,18 @@
|
|
|
// this._getInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectable(row, index) {
|
|
|
+ let arr = this.multipleSelection.map((item) => {
|
|
|
+ return item.batchNo + item.categoryId;
|
|
|
+ });
|
|
|
+ return !arr.includes(row.batchNo + row.categoryId);
|
|
|
+ },
|
|
|
+ selectablePick(row, index) {
|
|
|
+ let arr = this.productSelection.map((item) => {
|
|
|
+ return item.batchNo + item.categoryId;
|
|
|
+ });
|
|
|
+ return !arr.includes(row.batchNo + row.categoryId);
|
|
|
+ },
|
|
|
// 获取动态表头
|
|
|
getFieldModel() {
|
|
|
fieldModelAPI({ fieldModel: 't_main_category' }).then((res) => {
|
|
|
@@ -622,7 +645,7 @@
|
|
|
...mapActions('dict', ['requestDict']),
|
|
|
getSceneState: useDictLabel(outputSceneStateEnum),
|
|
|
handleAssetType(r) {
|
|
|
- let codes = r&&r.split(',');
|
|
|
+ let codes = r && r.split(',');
|
|
|
|
|
|
let name = codes?.map((code) => {
|
|
|
return this.codeList.find((val) => val.dictCode == code)?.dictValue;
|
|
|
@@ -668,8 +691,8 @@
|
|
|
});
|
|
|
res['bizNo'] = dataArray.map((item) => item.bizNo);
|
|
|
}
|
|
|
- let user=await getUserDetail(res.extInfo?.createUserId)
|
|
|
- res.extInfo['deptName']=user.deptName
|
|
|
+ let user = await getUserDetail(res.extInfo?.createUserId);
|
|
|
+ res.extInfo['deptName'] = user.deptName;
|
|
|
// res
|
|
|
this.init(res, type);
|
|
|
},
|
|
|
@@ -725,38 +748,73 @@
|
|
|
console.log(this.materialList);
|
|
|
this.pickingFetchData();
|
|
|
this.materielFetchData();
|
|
|
- if (type == 10) {
|
|
|
- this.multipleSelection = this.showPackingList;
|
|
|
- this.$emit('handleSave');
|
|
|
- }
|
|
|
+ // if (type == 10) {
|
|
|
+ // this.multipleSelection = this.showPackingList;
|
|
|
+ // this.$emit('handleSave');
|
|
|
+ // }
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
- getValue() {
|
|
|
- // console.log(this.multipleSelection,'this.multipleSelection')
|
|
|
- return this.multipleSelection.map((item) => {
|
|
|
- item['outInCode'] = item.bizNo;
|
|
|
- item['packageId'] = item.id;
|
|
|
- item['wmsOutId'] = item.outInId;
|
|
|
- item['wmsOutNo'] = item.bizNo;
|
|
|
- item['outboundType'] = item.outType;
|
|
|
- item['outboundDetailId'] = item.id;
|
|
|
- item['productName'] = item.categoryName;
|
|
|
- item['productCode'] = item.categoryCode;
|
|
|
- item['measuringUnit'] = item.measureUnit;
|
|
|
- item['productId'] = item.categoryId;
|
|
|
- item['receiveTotalWeight'] = item.weight;
|
|
|
- this.productList.forEach((val) => {
|
|
|
- if (item.categoryCode == val.categoryCode) {
|
|
|
- item['warehouseId'] = val.warehouseId;
|
|
|
- item['warehouseName'] = val.warehouseName;
|
|
|
- }
|
|
|
- });
|
|
|
+ handleSelectionProductChange(val) {
|
|
|
+ this.productSelection = val;
|
|
|
+ },
|
|
|
+ setMultipleSelection() {
|
|
|
+ return (
|
|
|
+ this.multipleSelection.map((item) => {
|
|
|
+ item['outInCode'] = item.bizNo;
|
|
|
+ item['packageId'] = item.id;
|
|
|
+ item['wmsOutId'] = item.outInId;
|
|
|
+ item['wmsOutNo'] = item.bizNo;
|
|
|
+ item['outboundType'] = item.outType;
|
|
|
+ item['outboundDetailId'] = item.id;
|
|
|
+ item['productName'] = item.categoryName;
|
|
|
+ item['productCode'] = item.categoryCode;
|
|
|
+ item['measuringUnit'] = item.measureUnit;
|
|
|
+ item['productId'] = item.categoryId;
|
|
|
+ item['receiveTotalWeight'] = item.weight;
|
|
|
+ item['provenance']= item['provenance']||[]
|
|
|
+ this.productList.forEach((val) => {
|
|
|
+ if (item.categoryCode == val.categoryCode) {
|
|
|
+ item['warehouseId'] = val.warehouseId;
|
|
|
+ item['warehouseName'] = val.warehouseName;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- item.id = '';
|
|
|
- return item;
|
|
|
- });
|
|
|
+ item.id = '';
|
|
|
+ return item;
|
|
|
+ }) || []
|
|
|
+ );
|
|
|
+ },
|
|
|
+ setProductSelection() {
|
|
|
+ return (
|
|
|
+ this.productSelection.map((item) => {
|
|
|
+ item['outInCode'] = item.bizNo;
|
|
|
+ item['wmsOutId'] = item.outInId;
|
|
|
+ item['wmsOutNo'] = item.bizNo;
|
|
|
+ item['outboundType'] = item.outType;
|
|
|
+ // item['outboundDetailId'] = item.id;
|
|
|
+ item['productName'] = item.categoryName;
|
|
|
+ item['productCode'] = item.categoryCode;
|
|
|
+ item['measuringUnit'] = item.measureUnit;
|
|
|
+ item['productId'] = item.categoryId;
|
|
|
+ item['receiveTotalWeight'] = item.weight;
|
|
|
+ item['provenance']= item['provenance']||[]
|
|
|
+ // this.productList.forEach((val) => {
|
|
|
+ // if (item.categoryCode == val.categoryCode) {
|
|
|
+ // item['warehouseId'] = val.warehouseId;
|
|
|
+ // item['warehouseName'] = val.warehouseName;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ item.id = '';
|
|
|
+ return item;
|
|
|
+ }) || []
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ getValue() {
|
|
|
+ return [...this.setMultipleSelection(), ...this.setProductSelection()];
|
|
|
},
|
|
|
download(row) {
|
|
|
if (row.storePath) {
|