|
@@ -68,7 +68,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { getOutindetailtwoList, getTreeByGroup } from '@/api/wms';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getOutindetailtwoList,
|
|
|
|
|
+ getTreeByGroup,
|
|
|
|
|
+ getCategoryPackageDisposition
|
|
|
|
|
+ } from '@/api/wms';
|
|
|
import ItemSearch from './item-search.vue';
|
|
import ItemSearch from './item-search.vue';
|
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
|
|
|
|
|
|
|
@@ -257,22 +261,22 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async getSupplierObj(productList, queryName) {
|
|
async getSupplierObj(productList, queryName) {
|
|
|
- try {
|
|
|
|
|
- let categoryIds = productList
|
|
|
|
|
- .filter((item) => item.id)
|
|
|
|
|
- .map((item) => item.id);
|
|
|
|
|
- if (categoryIds.length > 0) {
|
|
|
|
|
- return await contactQueryByCategoryIdsAPI({
|
|
|
|
|
- categoryIds,
|
|
|
|
|
- isQueryEE: 1
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ let categoryIds = productList
|
|
|
|
|
+ .filter((item) => item.id)
|
|
|
|
|
+ .map((item) => item.id);
|
|
|
|
|
+ if (categoryIds.length > 0) {
|
|
|
|
|
+ return await contactQueryByCategoryIdsAPI({
|
|
|
|
|
+ categoryIds,
|
|
|
|
|
+ isQueryEE: 1
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Promise.resolve({});
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
return Promise.resolve({});
|
|
return Promise.resolve({});
|
|
|
}
|
|
}
|
|
|
- } catch (e) {
|
|
|
|
|
- return Promise.resolve({});
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
// 单击获取id
|
|
// 单击获取id
|
|
|
cellClick(row) {
|
|
cellClick(row) {
|
|
|
if (this.currentIndex == -1) return;
|
|
if (this.currentIndex == -1) return;
|
|
@@ -319,14 +323,22 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ let idList = list.map((item) => item.categoryId);
|
|
|
|
|
+
|
|
|
|
|
+ // 获取包装规格
|
|
|
|
|
+ let packingSpecification = await getCategoryPackageDisposition({
|
|
|
|
|
+ categoryIds: idList
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
list.forEach((item, index) => {
|
|
list.forEach((item, index) => {
|
|
|
item.productName = item.categoryName;
|
|
item.productName = item.categoryName;
|
|
|
item.productCode = item.categoryCode;
|
|
item.productCode = item.categoryCode;
|
|
|
item.productCategoryName = '';
|
|
item.productCategoryName = '';
|
|
|
item.productBrand = item.brandNum;
|
|
item.productBrand = item.brandNum;
|
|
|
- item.provenance = item.provenance||[];
|
|
|
|
|
- // item.warehouseName = item.warehouseList[0].warehouse_name;
|
|
|
|
|
- // item.warehouseId = item.warehouseList[0].warehouse_id;
|
|
|
|
|
|
|
+ item.provenance = item.provenance || [];
|
|
|
|
|
+ item['packageDispositionList'] = packingSpecification
|
|
|
|
|
+ .filter((ite) => item.categoryId == ite.categoryId && ite.conversionUnit)
|
|
|
|
|
+ .sort((a, b) => a.sort - b.sort);
|
|
|
this.$set(list[index], 'totalCount', 1);
|
|
this.$set(list[index], 'totalCount', 1);
|
|
|
// item.totalCount = 1;
|
|
// item.totalCount = 1;
|
|
|
item.measuringUnit = item.measureUnit;
|
|
item.measuringUnit = item.measureUnit;
|
|
@@ -337,7 +349,7 @@
|
|
|
|
|
|
|
|
// item.specification = item.specification;
|
|
// item.specification = item.specification;
|
|
|
});
|
|
});
|
|
|
- this.$emit('changeParent',list, this.currentIndex);
|
|
|
|
|
|
|
+ this.$emit('changeParent', list, this.currentIndex);
|
|
|
this.handleClose();
|
|
this.handleClose();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|