|
|
@@ -33,7 +33,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="关联订单:">
|
|
|
- <span>{{ infoData.sourceBizNo }}</span>
|
|
|
+ <span>{{ extInfo.documentSource }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -101,7 +101,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content-detail mt20">
|
|
|
- <header-title title="产品信息" size="16px"> </header-title>
|
|
|
+ <header-title title="产品信息" size="16px"></header-title>
|
|
|
<el-table
|
|
|
ref="productListTable"
|
|
|
:data="productList"
|
|
|
@@ -164,20 +164,26 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="包装数量"
|
|
|
- prop="packingQuantity"
|
|
|
+ label="最小包装单元"
|
|
|
align="center"
|
|
|
+ width="120"
|
|
|
+ prop="minPackingQuantity"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.packingQuantity }}
|
|
|
+ {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
|
|
|
+ row.packingUnit
|
|
|
+ }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
- label="包装单位"
|
|
|
+ label="包装数量"
|
|
|
+ prop="packingQuantity"
|
|
|
align="center"
|
|
|
- width="120"
|
|
|
- prop="packingUnit"
|
|
|
>
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.packingQuantity }} {{ row.packingUnit }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="计量数量"
|
|
|
@@ -185,8 +191,23 @@
|
|
|
width="100"
|
|
|
align="center"
|
|
|
>
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <template>
|
|
|
+ {{
|
|
|
+ $math.format(
|
|
|
+ row.minPackingQuantity * row.packingQuantity,
|
|
|
+ 14
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</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="重量"
|
|
|
@@ -264,42 +285,17 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="mt20">
|
|
|
- <header-title :title="`包装明细`" size="16px">
|
|
|
- <el-button
|
|
|
- v-for="item in mergeOptions"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="openMergeDialog(item)"
|
|
|
- >合并成{{ item.conversionUnit }}</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- v-for="item in splitOptions"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="openSplitDialog(item)"
|
|
|
- >拆分到{{ item.packageUnit }}</el-button
|
|
|
- >
|
|
|
- </header-title>
|
|
|
+ <header-title :title="`包装明细`" size="16px"></header-title>
|
|
|
<el-table
|
|
|
ref="showPackingListTable"
|
|
|
- :data="packingList"
|
|
|
+ :data="showPackingList"
|
|
|
tooltip-effect="dark"
|
|
|
:max-height="300"
|
|
|
border
|
|
|
:row-class-name="tableRowClassName"
|
|
|
:header-cell-style="rowClass"
|
|
|
- @selection-change="productSplit"
|
|
|
+ v-el-table-infinite-scroll="pickingHandleScroll"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- v-if="infoData.verifyStatus == 2"
|
|
|
- key="selection"
|
|
|
- label="选择"
|
|
|
- type="selection"
|
|
|
- width="55"
|
|
|
- align="center"
|
|
|
- fixed="left"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="序号" type="index" width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -454,17 +450,73 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- :page-sizes="[10, 10, 20, 30]"
|
|
|
- :page-size.sync="pages.size"
|
|
|
- :current-page.sync="pages.pageNum"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- @size-change="handleSizeChange"
|
|
|
+ </div>
|
|
|
+ <div class="mt20">
|
|
|
+ <header-title :title="`物料明细`" size="16px"> </header-title>
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="showMaterialList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :max-height="300"
|
|
|
+ border
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ :header-cell-style="rowClass"
|
|
|
+ style="width: 100%"
|
|
|
+ stripe
|
|
|
+ height="300px"
|
|
|
+ v-el-table-infinite-scroll="materielHandleScroll"
|
|
|
>
|
|
|
- </el-pagination>
|
|
|
+ <el-table-column label="序号" type="index" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="编码"
|
|
|
+ prop="categoryCode"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="名称"
|
|
|
+ prop="categoryName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="物料编码"
|
|
|
+ prop="materialCode"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="发货条码"
|
|
|
+ prop="barcodes"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量数量"
|
|
|
+ prop="measureQuantity"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量单位"
|
|
|
+ prop="measureUnit"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="物料代号" prop="materielDesignation">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户代号" prop="clientCode">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="刻码" prop="engrave"> </el-table-column>
|
|
|
+ <el-table-column width="100" label="重量" prop="weight">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="重量单位" prop="weightUnit">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="质检结果" prop="result" width="120">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ qualityResults[row.result] }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="质检状态" prop="status" width="120">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ qualityStatus[row.status] }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
@@ -472,40 +524,25 @@
|
|
|
ref="wareHouseDailogRef"
|
|
|
@houseData="houseData"
|
|
|
></WareHouseDailog>
|
|
|
- <mergeDetails
|
|
|
- ref="mergeDetailsRef"
|
|
|
- @refresh="getPackingList"
|
|
|
- ></mergeDetails>
|
|
|
- <splitDetails ref="splitDetailsRef"></splitDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import mergeDetails from './mergeDetails.vue';
|
|
|
- import splitDetails from './splitDetails.vue';
|
|
|
import WareHouseDailog from '../components/warehouseShelvesDialog.vue';
|
|
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
|
|
import { getFile } from '@/api/system/file/index.js';
|
|
|
import PageHeader from '@/components/PageHeader';
|
|
|
import storageApi from '@/api/warehouseManagement';
|
|
|
- import { getCode } from '@/api/codeManagement/index.js';
|
|
|
import { allCategoryLevel } from '@/api/classifyManage';
|
|
|
import { useDictLabel, sceneState } from '@/utils/dict/index';
|
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
|
export default {
|
|
|
- components: { PageHeader, WareHouseDailog, mergeDetails, splitDetails },
|
|
|
+ components: { PageHeader, WareHouseDailog },
|
|
|
directives: {
|
|
|
'el-table-infinite-scroll': elTableInfiniteScroll
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- total: 0,
|
|
|
- pages: { pageNum: 1, size: 10 },
|
|
|
- oldSelectionList: [],
|
|
|
- selectionList: [],
|
|
|
- mergeOptions: [],
|
|
|
- splitOptions: [],
|
|
|
- currentId: '',
|
|
|
newColumns: [], // 动态表头
|
|
|
qualityStatus: {
|
|
|
0: '未质检',
|
|
|
@@ -528,8 +565,7 @@
|
|
|
infoData: {},
|
|
|
stepsTitle: '已完成',
|
|
|
stepsStatus: 'success',
|
|
|
- active: 0,
|
|
|
- verifyStatus: ''
|
|
|
+ active: 0
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -588,69 +624,10 @@
|
|
|
created() {
|
|
|
this.getFieldModel();
|
|
|
this.requestDict('类型用途');
|
|
|
- this.requestDict('不拆物料层规格');
|
|
|
this.getAllCategoryType();
|
|
|
this._getInfo();
|
|
|
- this.verifyStatus = this.$route.query.verifyStatus;
|
|
|
},
|
|
|
methods: {
|
|
|
- openMergeDialog(dimensionRow) {
|
|
|
- this.$refs.mergeDetailsRef.open(dimensionRow, this.selectionList);
|
|
|
- },
|
|
|
- openSplitDialog(dimensionRow) {
|
|
|
- this.$refs.splitDetailsRef.open(dimensionRow, this.selectionList);
|
|
|
- },
|
|
|
- productSplit(selectionList) {
|
|
|
- console.log(selectionList);
|
|
|
- let isUnification = selectionList.every(
|
|
|
- (item) =>
|
|
|
- item.packingUnit == selectionList[0].packingUnit &&
|
|
|
- item.categoryId == selectionList[0].categoryId
|
|
|
- );
|
|
|
- if (isUnification) {
|
|
|
- if (selectionList.length > 0) {
|
|
|
- this.selectionList = selectionList;
|
|
|
- this.oldSelectionList = selectionList;
|
|
|
- if (this.mergeOptions.length == 0) {
|
|
|
- storageApi
|
|
|
- .getCategoryPackageDisposition({
|
|
|
- categoryIds: [this.selectionList[0].categoryId]
|
|
|
- })
|
|
|
- .then((data) => {
|
|
|
- console.log(data);
|
|
|
- console.log(this.selectionList[0]);
|
|
|
- // 形成合并按钮
|
|
|
- let mergeIndex = data.findIndex(
|
|
|
- (item) =>
|
|
|
- item.packageUnit == this.selectionList[0].packingUnit &&
|
|
|
- item.packageUnit != item.conversionUnit
|
|
|
- );
|
|
|
- console.log(mergeIndex);
|
|
|
- this.mergeOptions = data.filter(
|
|
|
- (item) => item.sort == data[mergeIndex].sort
|
|
|
- );
|
|
|
- // 形成拆分按钮
|
|
|
- let splitIndex = data.findIndex(
|
|
|
- (item) =>
|
|
|
- item.conversionUnit ==
|
|
|
- this.selectionList[0].packingUnit &&
|
|
|
- item.packageUnit != item.conversionUnit
|
|
|
- );
|
|
|
- this.splitOptions = data.filter(
|
|
|
- (item) => item.sort == data[splitIndex].sort
|
|
|
- );
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.mergeOptions = [];
|
|
|
- this.splitOptions = [];
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.error('请选择相同物品和包装装单位');
|
|
|
- this.$refs.showPackingListTable.clearSelection();
|
|
|
- }
|
|
|
- console.log(isUnification);
|
|
|
- },
|
|
|
// 获取动态表头
|
|
|
getFieldModel() {
|
|
|
storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
|
|
|
@@ -666,7 +643,6 @@
|
|
|
});
|
|
|
},
|
|
|
isUpper(row) {
|
|
|
- console.log('this.packingList------', this.packingList);
|
|
|
let filterPackingList = this.packingList.filter((packingItem) => {
|
|
|
return packingItem.parentIndex === row.index;
|
|
|
});
|
|
|
@@ -828,6 +804,7 @@
|
|
|
return filteredData.map((item) => item.dictValue).join(',');
|
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
+ console.log(row);
|
|
|
if (row.result == 2) {
|
|
|
return 'warning-row';
|
|
|
} else {
|
|
|
@@ -904,52 +881,33 @@
|
|
|
};
|
|
|
}
|
|
|
);
|
|
|
- this.getPackingList();
|
|
|
- // // 获取包装维度数据
|
|
|
- // const arr = [];
|
|
|
- // for (const key in this.productList) {
|
|
|
- // for (const k in this.productList[key].outInDetailRecordRequestList) {
|
|
|
- // arr.push({
|
|
|
- // ...this.productList[key].outInDetailRecordRequestList[k]
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.packingList = arr;
|
|
|
- // // 获取物料维度数据
|
|
|
- // let iArr = [];
|
|
|
- // arr.forEach((item) => {
|
|
|
- // item.materialDetailList.forEach((ele) => {
|
|
|
- // iArr.push({ ...ele });
|
|
|
- // });
|
|
|
- // });
|
|
|
- // this.materialList = iArr;
|
|
|
- // console.log(this.packingList);
|
|
|
- // console.log(this.materialList);
|
|
|
- // this.pickingFetchData();
|
|
|
- // this.materielFetchData();
|
|
|
+ // 获取包装维度数据
|
|
|
+ const arr = [];
|
|
|
+ for (const key in this.productList) {
|
|
|
+ for (const k in this.productList[key].outInDetailRecordRequestList) {
|
|
|
+ arr.push({
|
|
|
+ ...this.productList[key].outInDetailRecordRequestList[k]
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.packingList = arr;
|
|
|
+ // 获取物料维度数据
|
|
|
+ let iArr = [];
|
|
|
+ arr.forEach((item) => {
|
|
|
+ item.materialDetailList.forEach((ele) => {
|
|
|
+ iArr.push({ ...ele });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.materialList = iArr;
|
|
|
+ console.log(this.packingList);
|
|
|
+ console.log(this.materialList);
|
|
|
+ this.pickingFetchData();
|
|
|
+ this.materielFetchData();
|
|
|
},
|
|
|
download(row) {
|
|
|
if (row.storePath) {
|
|
|
getFile({ objectName: row.storePath }, row.name);
|
|
|
}
|
|
|
- },
|
|
|
- handleCurrentChange(e) {
|
|
|
- this.getPackingList();
|
|
|
- },
|
|
|
- handleSizeChange(e) {
|
|
|
- this.pages.pageNum = 1;
|
|
|
- this.getPackingList();
|
|
|
- },
|
|
|
- getPackingList() {
|
|
|
- storageApi
|
|
|
- .getOutInRecordsPage({
|
|
|
- ...this.pages,
|
|
|
- outInId: this.$route.query.id
|
|
|
- })
|
|
|
- .then((data) => {
|
|
|
- this.total = data.count;
|
|
|
- this.packingList = data.list;
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
};
|