|
|
@@ -396,6 +396,29 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="供应商"
|
|
|
+ align="center"
|
|
|
+ prop="supplierId"
|
|
|
+ width="200"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-select
|
|
|
+ @change="selectSupplier($event, row)"
|
|
|
+ v-model="row.supplierId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in row.supplierListOptions"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="仓库"
|
|
|
align="center"
|
|
|
@@ -1004,6 +1027,12 @@
|
|
|
this.getNowFormatDate();
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectSupplier(val, row) {
|
|
|
+ row.supplierId = val;
|
|
|
+ row.supplierName = row.supplierListOptions.filter(
|
|
|
+ (item) => item.id == val
|
|
|
+ )[0].name;
|
|
|
+ },
|
|
|
// 获取动态表头
|
|
|
getFieldModel() {
|
|
|
storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
|
|
|
@@ -1036,6 +1065,9 @@
|
|
|
});
|
|
|
storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
|
|
|
const batchNo = await getCode('lot_number_code');
|
|
|
+ const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
|
|
|
+ categoryIds: res.map((item) => item.id)
|
|
|
+ });
|
|
|
this.productList = res.map((item, index) => {
|
|
|
let filtersItem = this.saleProductList.filter(
|
|
|
(detailItem) => detailItem.productCode == item.code
|
|
|
@@ -1056,6 +1088,11 @@
|
|
|
specification: item.specification, // 规格
|
|
|
brandNum: item.brandNum, // 牌号
|
|
|
batchNo: batchNo, // 批次号
|
|
|
+ supplierListOptions: supplierList[item.id], // 供应商列表
|
|
|
+ supplierId: '', // 供应商id
|
|
|
+ supplierName: '', // 供应商名称
|
|
|
+ approvalNumber: item.approvalNumber, // 批准文号
|
|
|
+ packingSpecification: item.packingSpecification, // 包装规格
|
|
|
minPackingQuantity: minPackingQuantity, // 最小包装单元数量
|
|
|
packingQuantity: packingQuantity, // 包装数量
|
|
|
packingUnit: item.packingUnit, // 包装单位
|
|
|
@@ -1093,6 +1130,9 @@
|
|
|
warehouseIds.push(this.form.warehouseId);
|
|
|
warehouseNames.push(this.form.warehouseName);
|
|
|
}
|
|
|
+ const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
|
|
|
+ categoryIds: res.map((item) => item.id)
|
|
|
+ });
|
|
|
this.productList = res.map((item, index) => {
|
|
|
return {
|
|
|
index: this.productList.length + index,
|
|
|
@@ -1103,6 +1143,11 @@
|
|
|
specification: item.specification, // 规格
|
|
|
brandNum: item.brandNum, // 牌号
|
|
|
batchNo: batchNo, // 批次号
|
|
|
+ supplierListOptions: supplierList[item.id], // 供应商列表
|
|
|
+ supplierId: '', // 供应商id
|
|
|
+ supplierName: '', // 供应商名称
|
|
|
+ approvalNumber: item.approvalNumber, // 批准文号
|
|
|
+ packingSpecification: item.packingSpecification, // 包装规格
|
|
|
minPackingQuantity: 1, // 最小包装单元数量
|
|
|
packingQuantity: this.form.totalCount, // 包装数量
|
|
|
packingUnit: item.packingUnit, // 包装单位
|
|
|
@@ -1670,6 +1715,9 @@
|
|
|
// 添加物品明细
|
|
|
async addGoods(data) {
|
|
|
const batchNo = await getCode('lot_number_code');
|
|
|
+ const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
|
|
|
+ categoryIds: data.map((item) => item.id)
|
|
|
+ });
|
|
|
let productList = data.map((item, index) => {
|
|
|
return {
|
|
|
index: this.productList.length + index,
|
|
|
@@ -1680,6 +1728,9 @@
|
|
|
specification: item.specification, // 规格
|
|
|
brandNum: item.brandNum, // 牌号
|
|
|
batchNo: batchNo, // 批次号
|
|
|
+ supplierListOptions: supplierList[item.id], // 供应商列表
|
|
|
+ supplierId: '', // 供应商id
|
|
|
+ supplierName: '', // 供应商名称
|
|
|
approvalNumber: item.approvalNumber, // 批准文号
|
|
|
packingSpecification: item.packingSpecification, // 包装规格
|
|
|
minPackingQuantity: '', // 最小包装单元数量
|