|
@@ -101,7 +101,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="content-detail mt20">
|
|
<div class="content-detail mt20">
|
|
|
- <header-title title="产品信息" size="16px"></header-title>
|
|
|
|
|
|
|
+ <header-title title="产品信息" size="16px"> </header-title>
|
|
|
<el-table
|
|
<el-table
|
|
|
ref="productListTable"
|
|
ref="productListTable"
|
|
|
:data="productList"
|
|
:data="productList"
|
|
@@ -164,26 +164,20 @@
|
|
|
>
|
|
>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- label="最小包装单元"
|
|
|
|
|
|
|
+ label="包装数量"
|
|
|
|
|
+ prop="packingQuantity"
|
|
|
align="center"
|
|
align="center"
|
|
|
- width="120"
|
|
|
|
|
- prop="minPackingQuantity"
|
|
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
|
|
|
|
|
- row.packingUnit
|
|
|
|
|
- }}
|
|
|
|
|
|
|
+ {{ row.packingQuantity }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- label="包装数量"
|
|
|
|
|
- prop="packingQuantity"
|
|
|
|
|
|
|
+ label="包装单位"
|
|
|
align="center"
|
|
align="center"
|
|
|
|
|
+ width="120"
|
|
|
|
|
+ prop="packingUnit"
|
|
|
>
|
|
>
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
|
|
- {{ row.packingQuantity }} {{ row.packingUnit }}
|
|
|
|
|
- </template>
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="计量数量"
|
|
label="计量数量"
|
|
@@ -191,23 +185,8 @@
|
|
|
width="100"
|
|
width="100"
|
|
|
align="center"
|
|
align="center"
|
|
|
>
|
|
>
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
|
|
- <template>
|
|
|
|
|
- {{
|
|
|
|
|
- $math.format(
|
|
|
|
|
- row.minPackingQuantity * row.packingQuantity,
|
|
|
|
|
- 14
|
|
|
|
|
- )
|
|
|
|
|
- }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </template>
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="计量单位" prop="measureUnit" align="center">
|
|
<el-table-column label="计量单位" prop="measureUnit" align="center">
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
|
|
- <template>
|
|
|
|
|
- {{ row.measureUnit }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </template>
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="重量"
|
|
label="重量"
|
|
@@ -285,17 +264,42 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="mt20">
|
|
<div class="mt20">
|
|
|
- <header-title :title="`包装明细`" size="16px"></header-title>
|
|
|
|
|
|
|
+ <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>
|
|
|
<el-table
|
|
<el-table
|
|
|
ref="showPackingListTable"
|
|
ref="showPackingListTable"
|
|
|
- :data="showPackingList"
|
|
|
|
|
|
|
+ :data="packingList"
|
|
|
tooltip-effect="dark"
|
|
tooltip-effect="dark"
|
|
|
:max-height="300"
|
|
:max-height="300"
|
|
|
border
|
|
border
|
|
|
:row-class-name="tableRowClassName"
|
|
:row-class-name="tableRowClassName"
|
|
|
:header-cell-style="rowClass"
|
|
:header-cell-style="rowClass"
|
|
|
- v-el-table-infinite-scroll="pickingHandleScroll"
|
|
|
|
|
|
|
+ @selection-change="productSplit"
|
|
|
>
|
|
>
|
|
|
|
|
+ <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 label="序号" type="index" width="50">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -450,73 +454,17 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- </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
|
|
|
|
|
+ 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"
|
|
|
>
|
|
>
|
|
|
- <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>
|
|
|
|
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
@@ -524,25 +472,40 @@
|
|
|
ref="wareHouseDailogRef"
|
|
ref="wareHouseDailogRef"
|
|
|
@houseData="houseData"
|
|
@houseData="houseData"
|
|
|
></WareHouseDailog>
|
|
></WareHouseDailog>
|
|
|
|
|
+ <mergeDetails
|
|
|
|
|
+ ref="mergeDetailsRef"
|
|
|
|
|
+ @refresh="getPackingList"
|
|
|
|
|
+ ></mergeDetails>
|
|
|
|
|
+ <splitDetails ref="splitDetailsRef"></splitDetails>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import mergeDetails from './mergeDetails.vue';
|
|
|
|
|
+ import splitDetails from './splitDetails.vue';
|
|
|
import WareHouseDailog from '../components/warehouseShelvesDialog.vue';
|
|
import WareHouseDailog from '../components/warehouseShelvesDialog.vue';
|
|
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
|
|
import { getFile } from '@/api/system/file/index.js';
|
|
import { getFile } from '@/api/system/file/index.js';
|
|
|
import PageHeader from '@/components/PageHeader';
|
|
import PageHeader from '@/components/PageHeader';
|
|
|
import storageApi from '@/api/warehouseManagement';
|
|
import storageApi from '@/api/warehouseManagement';
|
|
|
|
|
+ import { getCode } from '@/api/codeManagement/index.js';
|
|
|
import { allCategoryLevel } from '@/api/classifyManage';
|
|
import { allCategoryLevel } from '@/api/classifyManage';
|
|
|
import { useDictLabel, sceneState } from '@/utils/dict/index';
|
|
import { useDictLabel, sceneState } from '@/utils/dict/index';
|
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
import { mapGetters, mapActions } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
- components: { PageHeader, WareHouseDailog },
|
|
|
|
|
|
|
+ components: { PageHeader, WareHouseDailog, mergeDetails, splitDetails },
|
|
|
directives: {
|
|
directives: {
|
|
|
'el-table-infinite-scroll': elTableInfiniteScroll
|
|
'el-table-infinite-scroll': elTableInfiniteScroll
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ pages: { pageNum: 1, size: 10 },
|
|
|
|
|
+ oldSelectionList: [],
|
|
|
|
|
+ selectionList: [],
|
|
|
|
|
+ mergeOptions: [],
|
|
|
|
|
+ splitOptions: [],
|
|
|
|
|
+ currentId: '',
|
|
|
newColumns: [], // 动态表头
|
|
newColumns: [], // 动态表头
|
|
|
qualityStatus: {
|
|
qualityStatus: {
|
|
|
0: '未质检',
|
|
0: '未质检',
|
|
@@ -565,7 +528,8 @@
|
|
|
infoData: {},
|
|
infoData: {},
|
|
|
stepsTitle: '已完成',
|
|
stepsTitle: '已完成',
|
|
|
stepsStatus: 'success',
|
|
stepsStatus: 'success',
|
|
|
- active: 0
|
|
|
|
|
|
|
+ active: 0,
|
|
|
|
|
+ verifyStatus: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -624,10 +588,69 @@
|
|
|
created() {
|
|
created() {
|
|
|
this.getFieldModel();
|
|
this.getFieldModel();
|
|
|
this.requestDict('类型用途');
|
|
this.requestDict('类型用途');
|
|
|
|
|
+ this.requestDict('不拆物料层规格');
|
|
|
this.getAllCategoryType();
|
|
this.getAllCategoryType();
|
|
|
this._getInfo();
|
|
this._getInfo();
|
|
|
|
|
+ this.verifyStatus = this.$route.query.verifyStatus;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
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() {
|
|
getFieldModel() {
|
|
|
storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
|
|
storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
|
|
@@ -643,6 +666,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
isUpper(row) {
|
|
isUpper(row) {
|
|
|
|
|
+ console.log('this.packingList------', this.packingList);
|
|
|
let filterPackingList = this.packingList.filter((packingItem) => {
|
|
let filterPackingList = this.packingList.filter((packingItem) => {
|
|
|
return packingItem.parentIndex === row.index;
|
|
return packingItem.parentIndex === row.index;
|
|
|
});
|
|
});
|
|
@@ -804,7 +828,6 @@
|
|
|
return filteredData.map((item) => item.dictValue).join(',');
|
|
return filteredData.map((item) => item.dictValue).join(',');
|
|
|
},
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
- console.log(row);
|
|
|
|
|
if (row.result == 2) {
|
|
if (row.result == 2) {
|
|
|
return 'warning-row';
|
|
return 'warning-row';
|
|
|
} else {
|
|
} else {
|
|
@@ -881,33 +904,52 @@
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
- // 获取包装维度数据
|
|
|
|
|
- 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();
|
|
|
|
|
|
|
+ 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();
|
|
|
},
|
|
},
|
|
|
download(row) {
|
|
download(row) {
|
|
|
if (row.storePath) {
|
|
if (row.storePath) {
|
|
|
getFile({ objectName: row.storePath }, row.name);
|
|
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;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|