|
|
@@ -18,7 +18,7 @@
|
|
|
<el-form label-width="120px">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="出库单号:">
|
|
|
- <span>{{ infoData.bizNo&&infoData.bizNo.toString() }}</span>
|
|
|
+ <span>{{ infoData.bizNo && infoData.bizNo.toString() }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -55,7 +55,7 @@
|
|
|
<el-form-item
|
|
|
:label="infoData.bizType == 4 ? '领料单:' : '来源单据:'"
|
|
|
>
|
|
|
- <span>{{ infoData.sourceBizNo }}</span>
|
|
|
+ <span>{{ infoData.sourceBizNo }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -115,12 +115,19 @@
|
|
|
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
|
|
|
- minWidth="150"
|
|
|
+ type="selection"
|
|
|
+ width="55"
|
|
|
+ align="center"
|
|
|
+ :selectable="selectable"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ minWidth="150"
|
|
|
label="出库单号"
|
|
|
prop="bizNo"
|
|
|
align="center"
|
|
|
@@ -237,7 +244,7 @@
|
|
|
<el-table-column label="单价" prop="price" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<template>
|
|
|
- {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
|
|
|
+ {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -259,7 +266,6 @@
|
|
|
prop="purpose"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="mt20">
|
|
|
@@ -275,9 +281,20 @@
|
|
|
:header-cell-style="rowClass"
|
|
|
v-el-table-infinite-scroll="pickingHandleScroll"
|
|
|
>
|
|
|
- <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
+ <el-table-column
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :selectable="selectablePick"
|
|
|
+ width="55"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
- <el-table-column type="selection" width="55" align="center"> </el-table-column>
|
|
|
<el-table-column
|
|
|
label="编码"
|
|
|
prop="categoryCode"
|
|
|
@@ -385,7 +402,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <!-- <div class="mt20">
|
|
|
+ <div class="mt20">
|
|
|
<header-title :title="`物料明细`" size="16px"> </header-title>
|
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
|
@@ -451,25 +468,26 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
|
|
import { useDictLabel } from '@/utils/dict';
|
|
|
import { outputSceneStateEnum } from '@/enum/dict';
|
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
|
- import {
|
|
|
- allCategoryLevel,
|
|
|
-
|
|
|
- } from '@/api/bpm/components/wms';
|
|
|
import api from '@/api/warehouseManagement/index.js';
|
|
|
+ import { getUserDetail } from '@/api/system/organization/index.js';
|
|
|
|
|
|
+ import { fieldModelAPI } from '@/api/main';
|
|
|
export default {
|
|
|
components: {},
|
|
|
-
|
|
|
+ directives: {
|
|
|
+ 'el-table-infinite-scroll': elTableInfiniteScroll
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
newColumns: [], // 动态表头
|
|
|
@@ -495,7 +513,8 @@
|
|
|
stepsTitle: '已完成',
|
|
|
stepsStatus: 'success',
|
|
|
active: 0,
|
|
|
- multipleSelection: []
|
|
|
+ multipleSelection: [],
|
|
|
+ productSelection: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -552,26 +571,23 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getFieldModel();
|
|
|
this.requestDict('类型用途');
|
|
|
- this.getAllCategoryType();
|
|
|
// this._getInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 获取动态表头
|
|
|
- getFieldModel() {
|
|
|
- // fieldModelAPI({ fieldModel: 't_main_category' }).then((res) => {
|
|
|
- // let newRes = res.map((m) => {
|
|
|
- // return {
|
|
|
- // prop: 'extField.' + m.prop,
|
|
|
- // label: m.label,
|
|
|
- // align: 'center',
|
|
|
- // showOverflowTooltip: true
|
|
|
- // };
|
|
|
- // });
|
|
|
- // this.newColumns = [...newRes];
|
|
|
- // });
|
|
|
+ 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);
|
|
|
},
|
|
|
+
|
|
|
pickingHandleScroll() {
|
|
|
console.log('---------pickingHandleScroll------------');
|
|
|
if (this.showPackingList.length < this.packingList.length) {
|
|
|
@@ -608,8 +624,12 @@
|
|
|
...mapActions('dict', ['requestDict']),
|
|
|
getSceneState: useDictLabel(outputSceneStateEnum),
|
|
|
handleAssetType(r) {
|
|
|
- const code = this.codeList.find((item) => item.dictCode == r);
|
|
|
- return code?.dictValue;
|
|
|
+ let codes = r && r.split(',');
|
|
|
+
|
|
|
+ let name = codes?.map((code) => {
|
|
|
+ return this.codeList.find((val) => val.dictCode == code)?.dictValue;
|
|
|
+ });
|
|
|
+ return name?.toString();
|
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
console.log(row);
|
|
|
@@ -628,31 +648,35 @@
|
|
|
}
|
|
|
return { background: '#0000' };
|
|
|
},
|
|
|
- async getAllCategoryType() {
|
|
|
- const { data } = await allCategoryLevel();
|
|
|
- this.codeList = data.map((item) => {
|
|
|
- return { dictCode: item.id, dictValue: item.name };
|
|
|
- });
|
|
|
- },
|
|
|
- async _getInfo(sourceBizNo,type,list=[]) {
|
|
|
+
|
|
|
+ async _getInfo(sourceBizNo, type, list = []) {
|
|
|
const dataArray = await api.getInfoBySourceBizNoAll(sourceBizNo);
|
|
|
- let res={}
|
|
|
- if (dataArray&&dataArray.length > 0) {
|
|
|
- res = dataArray[0];
|
|
|
- res.outInDetailList=dataArray.map(item=>item.outInDetailList[0])
|
|
|
- res['bizNo']=dataArray.map(item=>item.bizNo)
|
|
|
+ let res = {};
|
|
|
+
|
|
|
+ if (dataArray && dataArray.length > 0) {
|
|
|
+ res = JSON.parse(JSON.stringify(dataArray[0]));
|
|
|
+ res['outInDetailList'] = [];
|
|
|
+ dataArray.forEach((item) => {
|
|
|
+ console.log(item, 'item');
|
|
|
+ item.outInDetailList.forEach((val) => {
|
|
|
+ val['bizNo'] = item.bizNo;
|
|
|
+ res['outInDetailList'].push(val);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ res['bizNo'] = dataArray.map((item) => item.bizNo);
|
|
|
}
|
|
|
+ let user = await getUserDetail(res.extInfo?.createUserId);
|
|
|
+ res.extInfo['deptName'] = user.deptName;
|
|
|
// res
|
|
|
- this.init(res,type);
|
|
|
-
|
|
|
+ this.init(res, type);
|
|
|
},
|
|
|
- init(res,type) {
|
|
|
+ init(res, type) {
|
|
|
console.log(res, 'res');
|
|
|
this.infoData = res;
|
|
|
this.extInfo = res.extInfo;
|
|
|
this.productList = res?.outInDetailList?.map(
|
|
|
(productItem, productIndex) => {
|
|
|
- productItem['bizNo']=res.bizNo[productIndex]
|
|
|
+ // productItem['bizNo'] = res.bizNo[productIndex]||res.bizNo[0];
|
|
|
return {
|
|
|
...productItem,
|
|
|
outInDetailRecordRequestList:
|
|
|
@@ -661,6 +685,7 @@
|
|
|
...packingItem,
|
|
|
categoryName: productItem.categoryName,
|
|
|
categoryCode: productItem.categoryCode,
|
|
|
+ bizNo: productItem.bizNo,
|
|
|
materialDetailList: packingItem.materialDetailList.map(
|
|
|
(materialItem) => {
|
|
|
return {
|
|
|
@@ -697,39 +722,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() {
|
|
|
- return this.multipleSelection.map((item) => {
|
|
|
- item['outInCode'] = 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;
|
|
|
+ }) || []
|
|
|
+ );
|
|
|
},
|
|
|
- download(row) {
|
|
|
- if (row.storePath) {
|
|
|
- getFile({ objectName: row.storePath }, row.name);
|
|
|
- }
|
|
|
+ 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()];
|
|
|
}
|
|
|
}
|
|
|
};
|