|
|
@@ -120,33 +120,6 @@
|
|
|
:prop="item.prop" :show-overflow-tooltip="item.showOverflowTooltip"></el-table-column>
|
|
|
<el-table-column label="批次号" prop="batchNo" align="center" :show-overflow-tooltip="true">
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column
|
|
|
- label="最小包装单元"
|
|
|
- align="center"
|
|
|
- width="120"
|
|
|
- prop="minPackingQuantity"
|
|
|
- >
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
|
|
|
- row.packingUnit
|
|
|
- }}
|
|
|
- </template>
|
|
|
-</el-table-column>
|
|
|
-
|
|
|
-<el-table-column label="包装数量" prop="packingQuantity" align="center">
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- {{ row.packingQuantity }} {{ row.packingUnit }}
|
|
|
- </template>
|
|
|
-</el-table-column>
|
|
|
-<el-table-column label="计量数量" prop="measureQuantity" width="100" align="center">
|
|
|
-</el-table-column>
|
|
|
-<el-table-column label="计量单位" prop="measureUnit" align="center">
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- <template>
|
|
|
- {{ row.measureUnit }}
|
|
|
- </template>
|
|
|
- </template>
|
|
|
-</el-table-column> -->
|
|
|
<el-table-column label="包装数量" prop="packingQuantity" width="80"></el-table-column>
|
|
|
<el-table-column label="单位" prop="packingUnit"></el-table-column>
|
|
|
<el-table-column label="计量数量" prop="measureQuantity" :show-overflow-tooltip="true"></el-table-column>
|
|
|
@@ -178,6 +151,12 @@
|
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column prop="supplierCode" label="供应商代号" min-width="200"
|
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="120" align="center">
|
|
|
+ <template slot="header" slot-scope="scope"> 操作 </template>
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-link type="danger" @click="deleteProductList(row, $index)">删除</el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<header-title class="mt20" title="包装清单"></header-title>
|
|
|
@@ -264,7 +243,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
- <AssetsDialog ref="assetsDialogRef" :treeIds="formData.extInfo?.assetType" @detailData="detailData" />
|
|
|
+ <AssetsDialog ref="assetsDialogRef" :treeIds="formData.extInfo?.assetType" @detailData="detailData"
|
|
|
+ :productLists="this.productList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -564,6 +544,10 @@ export default {
|
|
|
this.materielFetchData();
|
|
|
|
|
|
this.formData.outInDetailList = this.productList;
|
|
|
+
|
|
|
+ console.log(this.productList, 'this.productList')
|
|
|
+ console.log(this.packingList, 'this.packingList')
|
|
|
+
|
|
|
},
|
|
|
async getReturnStorage() {
|
|
|
return new Promise((resolve) => {
|
|
|
@@ -678,10 +662,17 @@ export default {
|
|
|
// this.formData.extInfo.createUserName = this.user.info.name;
|
|
|
// this.formData.createUserId = this.user.info.userId;
|
|
|
|
|
|
- // 物品类型
|
|
|
this.formData.extInfo.assetType = Array.from(
|
|
|
new Set(this.form.categoryLevelTopId.split(','))
|
|
|
);
|
|
|
+
|
|
|
+ //委外出库
|
|
|
+ if (this.bizType == 7 && this.form.productList) {
|
|
|
+ const categoryids = this.form.productList.map(p => p.productCategoryId)
|
|
|
+ console.log(categoryids, '委外出库的物品id')
|
|
|
+ this.formData.extInfo.assetType = categoryids
|
|
|
+ }
|
|
|
+
|
|
|
// 出库类型
|
|
|
this.formData.bizType = this.bizType;
|
|
|
// 添加单据来源
|
|
|
@@ -855,13 +846,50 @@ export default {
|
|
|
if (!this.formData.bizType && this.formData.bizType !== 0)
|
|
|
return this.$message.error('请选择出库场景');
|
|
|
|
|
|
- this.$refs.assetsDialogRef.open();
|
|
|
+ this.$refs.assetsDialogRef.open(this.productList);
|
|
|
},
|
|
|
handleBizSceneChange() {
|
|
|
if (this.formData.extInfo.assetType == 7) {
|
|
|
this.formData.extInfo.sourceBizNo = '';
|
|
|
}
|
|
|
this.formData.sourceBizNo = '';
|
|
|
+ },
|
|
|
+ deleteProductList(row, index) {
|
|
|
+ // 1. 获取当前物料的所有包装列表
|
|
|
+ const targetPackages = row.outInDetailRecordRequestList || []
|
|
|
+ const packageIds = new Set(targetPackages.map(p => p.id))
|
|
|
+
|
|
|
+ console.log('targetPackages', targetPackages)
|
|
|
+ console.log('packageIds包装的id', packageIds)
|
|
|
+
|
|
|
+
|
|
|
+ // 从packingList中移除相关包装
|
|
|
+ this.packingList = this.packingList.filter(p =>
|
|
|
+ !packageIds.has(p.id) &&
|
|
|
+ p.categoryCode !== row.categoryCode
|
|
|
+ )
|
|
|
+ console.log('包装列表', this.packingList)
|
|
|
+
|
|
|
+ // 从materialList中移除关联物料
|
|
|
+ const materialIds = new Set()
|
|
|
+ targetPackages.forEach(packageItem => {
|
|
|
+ packageItem.materialDetailList.forEach(material => {
|
|
|
+ materialIds.add(material.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.materialList = this.materialList.filter(m =>
|
|
|
+ !materialIds.has(m.id) &&
|
|
|
+ m.categoryCode !== row.categoryCode
|
|
|
+ )
|
|
|
+
|
|
|
+ this.productList.splice(index, 1)
|
|
|
+
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.productListTable?.doLayout()
|
|
|
+ // this.$refs.showPackingListTable?.doLayout()
|
|
|
+ // this.$refs.multipleTable?.doLayout()
|
|
|
+ // })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
watch: {
|