|
|
@@ -599,7 +599,11 @@
|
|
|
<script>
|
|
|
import outin from '@/api/warehouseManagement/outin';
|
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
|
- import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
|
|
|
+ import {
|
|
|
+ getTreeByPid,
|
|
|
+ getTreeByGroup,
|
|
|
+ getProductList
|
|
|
+ } from '@/api/classifyManage';
|
|
|
import selectUpload from '@/components/selectUpload';
|
|
|
import upload from '@/components/uploadImg';
|
|
|
import pickOrder from './components/pickOrder.vue';
|
|
|
@@ -917,7 +921,7 @@
|
|
|
this.title = '';
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
- eomSuccess(row) {
|
|
|
+ async eomSuccess(row) {
|
|
|
console.log(row);
|
|
|
this.formData.extInfo.assetType = 9;
|
|
|
this.$refs.trees.valueTitle = '产品';
|
|
|
@@ -928,10 +932,40 @@
|
|
|
this.formData.clientName = row.contactName;
|
|
|
this.formData.clientUser = row.linkName;
|
|
|
this.formData.clientPhone = row.linkPhone;
|
|
|
- this.onSelectTableData(row.tableData, 1);
|
|
|
+ console.log('==sasa', row.tableData);
|
|
|
+ this.onSelectTableData(await this.serachMainCode(row.tableData), 1);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
- pickOrderRow(row) {
|
|
|
+ async serachMainCode(arr) {
|
|
|
+ let newArr = [];
|
|
|
+ // 使用 Promise.all 来等待所有异步操作完成
|
|
|
+ await Promise.all(
|
|
|
+ arr.map(async (item) => {
|
|
|
+ const data = await getProductList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 10,
|
|
|
+ categoryLevelId: item.productCategoryId,
|
|
|
+ code: item.code
|
|
|
+ });
|
|
|
+ newArr.push(data.list); // 将结果存储到 newArr 中
|
|
|
+ })
|
|
|
+ );
|
|
|
+ let re = [];
|
|
|
+ for (const item of newArr) {
|
|
|
+ for (const it of item) {
|
|
|
+ re.push(it);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return re.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ minUnit: item.packingUnit,
|
|
|
+ assetCode: item.code,
|
|
|
+ assetName: item.name
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async pickOrderRow(row) {
|
|
|
this.formData.sid = row.id;
|
|
|
row.tableData = [];
|
|
|
this.formData.sourceBizNo = row.code;
|
|
|
@@ -970,7 +1004,7 @@
|
|
|
});
|
|
|
row.tableData = uniqueItems;
|
|
|
console.log(row);
|
|
|
- this.onSelectTableData(row.tableData, 1);
|
|
|
+ this.onSelectTableData(await this.serachMainCode(row.tableData), 1);
|
|
|
|
|
|
this.selectTop(row);
|
|
|
this.$forceUpdate();
|