|
|
@@ -234,12 +234,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="批号" width="100" prop="assetName">
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template v-if="row.isSave">
|
|
|
+ <template>
|
|
|
{{ row.manualBatchNo }}
|
|
|
</template>
|
|
|
- <el-form-item v-else>
|
|
|
+ <!-- <el-form-item>
|
|
|
<el-input v-model="row.manualBatchNo"> </el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -271,7 +271,10 @@
|
|
|
>
|
|
|
<el-table-column label="" prop="minPackingCount" width="100">
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template v-if="row.isSave">
|
|
|
+ <template>
|
|
|
+ {{ row.minPackingCount }}
|
|
|
+ </template>
|
|
|
+ <!-- <template v-if="row.isSave">
|
|
|
{{ row.minPackingCount }}
|
|
|
</template>
|
|
|
<el-form-item
|
|
|
@@ -285,7 +288,7 @@
|
|
|
@input="minPackingCountChange(row, $event)"
|
|
|
>
|
|
|
</el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="" prop="minPackingCount">
|
|
|
@@ -301,7 +304,10 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template v-if="row.isSave || formData.bizType == 5">
|
|
|
+ <template>
|
|
|
+ {{ row.outInNum }} {{ row.minPackUnit }}
|
|
|
+ </template>
|
|
|
+ <!-- <template v-if="row.isSave || formData.bizType == 5">
|
|
|
{{ row.outInNum }} {{ row.minPackUnit }}
|
|
|
</template>
|
|
|
<el-form-item
|
|
|
@@ -317,7 +323,7 @@
|
|
|
{{ row.minPackUnit ? row.minPackUnit : '/' }}
|
|
|
</template>
|
|
|
</el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="计量数量" prop="counts">
|
|
|
@@ -370,7 +376,11 @@
|
|
|
align="center"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
+ <div v-if="row.isSave"
|
|
|
+ >{{ row.univalence }}元/{{ handleRowUnit(row) }}</div
|
|
|
+ >
|
|
|
<el-form-item
|
|
|
+ v-else
|
|
|
:prop="`warehousingMaterialList.${$index}.univalence`"
|
|
|
>
|
|
|
<el-input
|
|
|
@@ -469,6 +479,7 @@
|
|
|
@click="listSave(row, $index)"
|
|
|
>保存</el-button
|
|
|
>
|
|
|
+
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-show="row.isSave"
|
|
|
@@ -500,7 +511,7 @@
|
|
|
</el-switch>
|
|
|
</span>
|
|
|
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
style="margin-left: 20px"
|
|
|
type="text"
|
|
|
@click="dateSetting"
|
|
|
@@ -508,10 +519,10 @@
|
|
|
>批量设置{{
|
|
|
curDateType === 'manufactureTime' ? '生产日期' : '采购日期'
|
|
|
}}</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
</div>
|
|
|
</header-title>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
v-if="materialCodeReqList.length != 0"
|
|
|
type="success"
|
|
|
plain
|
|
|
@@ -519,7 +530,7 @@
|
|
|
size="mini"
|
|
|
@click="wrapListSave"
|
|
|
>批量保存</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-table
|
|
|
ref="materialCodeReqListTable"
|
|
|
:data="materialCodeReqList"
|
|
|
@@ -563,6 +574,12 @@
|
|
|
prop="batchNo"
|
|
|
width="70"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="发货条码"
|
|
|
+ prop="barcodes"
|
|
|
+ width="80"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
:label="`包装编码`"
|
|
|
prop="onlyCode"
|
|
|
@@ -588,36 +605,22 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column label="物料代号" prop="materielCode" width="130">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-if="!row.isPack"
|
|
|
- v-model="row.materielCode"
|
|
|
- ></el-input>
|
|
|
- <span v-else>{{ row.materielCode }}</span>
|
|
|
+ <span>{{ row.materielCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="客户代号" prop="clientCode">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-if="!row.isPack"
|
|
|
- v-model="row.clientCode"
|
|
|
- ></el-input>
|
|
|
- <span v-else> {{ row.clientCode }}</span>
|
|
|
+ <span> {{ row.clientCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="刻码" prop="engrave">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-if="!row.isPack" v-model="row.engrave"></el-input>
|
|
|
- <span v-else>{{ row.engrave }}</span>
|
|
|
+ <span>{{ row.engrave }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="重量" prop="weight" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-if="!row.isPack && row.measuringUnit != row.weightUtil"
|
|
|
- v-model="row.weight"
|
|
|
- @input="weightInput($event, row)"
|
|
|
- ></el-input>
|
|
|
- <span v-else>{{ row.weight }}</span>
|
|
|
+ <span>{{ row.weight }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="重量单位" prop="weightUtil">
|
|
|
@@ -628,14 +631,7 @@
|
|
|
|
|
|
<el-table-column label="质检结果" prop="result" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <DictSelection
|
|
|
- dictName="质检结果"
|
|
|
- clearable
|
|
|
- v-model="row.result"
|
|
|
- v-if="!row.isPack"
|
|
|
- @updateVal="changeWrapStatus($event, row)"
|
|
|
- />
|
|
|
- <span v-else>{{ qualityResults[row.result] }}</span>
|
|
|
+ <span>{{ qualityResults[row.result] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
|
@@ -643,67 +639,25 @@
|
|
|
<span>{{ qualityStatus[row.status] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
<el-table-column
|
|
|
- v-if="formData.bizType != 5"
|
|
|
label="生产日期"
|
|
|
- prop=""
|
|
|
- width="220"
|
|
|
- >
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
- <el-select filterable v-model="curDateType">
|
|
|
- <el-option
|
|
|
- value="manufactureTime"
|
|
|
- label="生产日期"
|
|
|
- ></el-option>
|
|
|
- <el-option
|
|
|
- value="procurementTime"
|
|
|
- label="采购日期"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <template v-if="formData.bizType == 5">
|
|
|
- {{ row[curDateType] }}
|
|
|
- </template>
|
|
|
- <el-date-picker
|
|
|
- v-else
|
|
|
- :disabled="row.ispack"
|
|
|
- size="small"
|
|
|
- v-model="row[curDateType]"
|
|
|
- type="datetime"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- placeholder="选择日期"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <template v-else>
|
|
|
- <el-table-column
|
|
|
- label="生产日期"
|
|
|
- prop="manufactureTime"
|
|
|
- width="200"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="采购日期"
|
|
|
- prop="procurementTime"
|
|
|
- width="200"
|
|
|
- ></el-table-column>
|
|
|
- </template>
|
|
|
- <el-table-column label="操作" width="80" fixed="right">
|
|
|
+ width="150"
|
|
|
+ prop="createTime"
|
|
|
+ ></el-table-column>
|
|
|
+ <!-- <el-table-column label="操作" width="80" fixed="right">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button type="text" @click="packCout(row)">
|
|
|
{{ !row.isPack ? '保存' : '编辑' }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
<!-- </el-tab-pane>
|
|
|
</el-tabs> -->
|
|
|
</div>
|
|
|
<div class="mt20" v-if="isSplit">
|
|
|
<header-title :title="`物料明细`"> </header-title>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
v-if="resultArray.length != 0"
|
|
|
type="success"
|
|
|
plain
|
|
|
@@ -711,7 +665,8 @@
|
|
|
size="mini"
|
|
|
@click="materialListSave"
|
|
|
>批量保存</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
+
|
|
|
<el-table
|
|
|
ref="resultArrayTable"
|
|
|
:data="resultArray"
|
|
|
@@ -752,6 +707,12 @@
|
|
|
width="200"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="发货条码"
|
|
|
+ prop="barcodes"
|
|
|
+ width="80"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
label="计量数量"
|
|
|
prop="minPackingCount"
|
|
|
@@ -764,49 +725,29 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column label="物料代号" prop="meterielCode" width="130">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.materielCode"
|
|
|
- v-if="!row.isPack"
|
|
|
- ></el-input>
|
|
|
- <span v-else>{{ row.materialCode }}</span>
|
|
|
+ <span>{{ row.materialCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="客户代号" prop="clientCode">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.clientCode"
|
|
|
- v-if="!row.isPack"
|
|
|
- ></el-input>
|
|
|
- <span v-else> {{ row.clientCode }}</span>
|
|
|
+ <span> {{ row.clientCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="刻码" prop="engrave">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.engrave" v-if="!row.isPack"></el-input>
|
|
|
- <span v-else> {{ row.engrave }}</span>
|
|
|
+ <span> {{ row.engrave }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="100" label="重量" prop="weight">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.weight"
|
|
|
- v-if="!row.isPack && row.measuringUnit != row.weightUnit"
|
|
|
- ></el-input>
|
|
|
- <span v-else>{{ row.weight }}</span>
|
|
|
+ <span>{{ row.weight }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="重量单位" prop="weightUnit" width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="质检结果" prop="result" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <DictSelection
|
|
|
- dictName="质检结果"
|
|
|
- clearable
|
|
|
- v-model="row.result"
|
|
|
- v-if="!row.isPack"
|
|
|
- @updateVal="changeWrapStatus($event, row)"
|
|
|
- />
|
|
|
- <span v-else>{{ qualityResults[row.result] }}</span>
|
|
|
+ <span>{{ qualityResults[row.result] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
|
@@ -814,13 +755,13 @@
|
|
|
<span>{{ qualityStatus[row.status] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="80" fixed="right">
|
|
|
+ <!-- <el-table-column label="操作" width="80" fixed="right">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button type="text" @click="materialBtn(row)">
|
|
|
{{ !row.isPack ? '保存' : '编辑' }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -878,6 +819,7 @@
|
|
|
import { tableHeader } from '@/views/bpm/handleTask/components/inoutBound/common';
|
|
|
import { getCode } from '@/api/codeManagement/index.js';
|
|
|
import { getReceiveSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
|
|
|
+ import { deepClone } from 'ele-admin/lib/utils/core';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -1026,6 +968,7 @@
|
|
|
no: item.onlyCode + i.toString().padStart(4, '0'),
|
|
|
assetCode: item.assetCode,
|
|
|
assetName: item.assetName,
|
|
|
+ barcodes: item.barcodes,
|
|
|
manualBatchNo: item.manualBatchNo,
|
|
|
batchNo: item.batchNo,
|
|
|
minPackingCount: 1,
|
|
|
@@ -1302,6 +1245,7 @@
|
|
|
// this.formData.extInfo.supplierName = row.supplierName;
|
|
|
// this.formData.extInfo.supplierId = row.supplierId;
|
|
|
if (this.warehousingMaterialList.length == 0) {
|
|
|
+ this.createDataByWrap(row);
|
|
|
// let list = data.productList.map((item) => {
|
|
|
// return {
|
|
|
// ...item,
|
|
|
@@ -1311,17 +1255,138 @@
|
|
|
// minPackUnit: item.packingUnit
|
|
|
// };
|
|
|
// });
|
|
|
- this.onSelectTableData(
|
|
|
- await this.serachMainCode({
|
|
|
- ...row,
|
|
|
- assetName: row.categoryName,
|
|
|
- assetCode: row.categoryCode,
|
|
|
- categoryId: row.categoryId,
|
|
|
- minPackUnit: row.packingUnit
|
|
|
- })
|
|
|
- );
|
|
|
+ // this.onSelectTableData(
|
|
|
+ // await this.serachMainCode({
|
|
|
+ // ...row,
|
|
|
+ // assetName: row.categoryName,
|
|
|
+ // assetCode: row.categoryCode,
|
|
|
+ // categoryId: row.categoryId,
|
|
|
+ // minPackUnit: row.packingUnit
|
|
|
+ // })
|
|
|
+ // );
|
|
|
}
|
|
|
},
|
|
|
+ async createDataByWrap(wrapData) {
|
|
|
+ console.log(wrapData);
|
|
|
+ let list = deepClone(wrapData);
|
|
|
+ const batchNo = await getCode('lot_number_code'); // 生成批次号
|
|
|
+ let sameItemWraplist = []; // 储存分类数据
|
|
|
+ let sameItemWrapInfolist = []; // 用来判断去重
|
|
|
+ // 先过滤同一种物品下面包装
|
|
|
+ list.detailList.forEach((item) => {
|
|
|
+ if (sameItemWraplist.length > 0) {
|
|
|
+ let filterArr = sameItemWrapInfolist.filter(
|
|
|
+ (it) =>
|
|
|
+ item.categoryCode == it.categoryCode &&
|
|
|
+ item.quantity == it.quantity
|
|
|
+ );
|
|
|
+ if (filterArr.length > 0) {
|
|
|
+ sameItemWraplist[filterArr[0].index].push(item);
|
|
|
+ } else {
|
|
|
+ sameItemWraplist.push([item]);
|
|
|
+ sameItemWrapInfolist.push({
|
|
|
+ categoryCode: item.categoryCode,
|
|
|
+ quantity: item.quantity,
|
|
|
+ index: sameItemWrapInfolist.length
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sameItemWraplist.push([item]);
|
|
|
+ sameItemWrapInfolist.push({
|
|
|
+ categoryCode: item.categoryCode,
|
|
|
+ quantity: item.quantity,
|
|
|
+ index: 0
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 添加包装批号丶包装编码丶包装数量
|
|
|
+ Promise.all(
|
|
|
+ sameItemWraplist.map(async (goodsItem) => {
|
|
|
+ const onlyCodeList = await outin.getAssetNum({
|
|
|
+ assetCode: goodsItem[0].categoryCode,
|
|
|
+ batchNum: batchNo,
|
|
|
+ num: goodsItem.length
|
|
|
+ });
|
|
|
+ goodsItem = goodsItem.map((wrapItem) => {
|
|
|
+ return {
|
|
|
+ ...wrapItem,
|
|
|
+ assetCode: wrapData.categoryCode,
|
|
|
+ assetName: wrapData.categoryName,
|
|
|
+ manualBatchNo: wrapData.manualBatchNo,
|
|
|
+ batchNo,
|
|
|
+ barcodes: wrapItem.sendCode,
|
|
|
+ weight: wrapItem.packingWeight,
|
|
|
+ initWeight: wrapItem.packingWeight,
|
|
|
+ weightUtil: wrapItem.weightUnit,
|
|
|
+ engrave: wrapItem.extInfo.engrave,
|
|
|
+ materielCode: wrapItem.extInfo.materielCode,
|
|
|
+ clientCode: wrapItem.extInfo.clientCode,
|
|
|
+ num: wrapItem.quantity,
|
|
|
+ isPack: false,
|
|
|
+ minPackingCount: wrapItem.quantity,
|
|
|
+ onlyCode: onlyCodeList.shift().onlyCode,
|
|
|
+ result: '0',
|
|
|
+ status: '1',
|
|
|
+ modelType: wrapData.modelType,
|
|
|
+ specification: wrapData.specification,
|
|
|
+ brandNum: wrapData.brandNum
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(goodsItem);
|
|
|
+ return goodsItem;
|
|
|
+ })
|
|
|
+ ).then((sameItemWraplist) => {
|
|
|
+ console.log(sameItemWraplist.flat());
|
|
|
+ console.log(sameItemWraplist);
|
|
|
+ console.log(sameItemWrapInfolist);
|
|
|
+ this.warehousingMaterialList = sameItemWraplist.map((goodsItem) => {
|
|
|
+ return {
|
|
|
+ assetCode: wrapData.categoryCode,
|
|
|
+ assetName: wrapData.categoryName,
|
|
|
+ manualBatchNo: wrapData.manualBatchNo,
|
|
|
+ modelType: wrapData.modelType,
|
|
|
+ specification: wrapData.specification,
|
|
|
+ brandNum: wrapData.brandNum,
|
|
|
+ batchNo,
|
|
|
+ categoryId: goodsItem[0].categoryId,
|
|
|
+ minPackingCount: goodsItem[0].num,
|
|
|
+ outInNum: goodsItem.length,
|
|
|
+ minPackUnit: goodsItem[0].packingUnit,
|
|
|
+ measuringUnit: goodsItem[0].measuringUnit,
|
|
|
+ weight: goodsItem.reduce((num, pre) => (num += pre.weight), 0),
|
|
|
+ weightUnit: goodsItem[0].weightUnit,
|
|
|
+ univalence: wrapData.univalence > 0 ? wrapData.univalence : '',
|
|
|
+ warehouseId: goodsItem[0].warehouseId,
|
|
|
+ houseList: [],
|
|
|
+ warehouseLedgerDetails: goodsItem
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // this.materialCodeReqList = list.detailList.map((wrapItem) => {
|
|
|
+ // return {
|
|
|
+ // code: it.onlyCode,
|
|
|
+ // dateType: 2, // 2生产日期 1采购日期
|
|
|
+ // dateValue: wrapItem.createTime,
|
|
|
+ // minUnit: it.minPackingCount,
|
|
|
+ // minPositionId: it.cargoSpaceId,
|
|
|
+ // minPackingCount: it.minPackingCount,
|
|
|
+ // name: it.assetName,
|
|
|
+ // pathIds: item.pathIds,
|
|
|
+ // unit: it.unit,
|
|
|
+ // packageNo: it.num,
|
|
|
+ // clientCode: it.clientCode,
|
|
|
+ // materielCode: it.materielCode,
|
|
|
+ // weight: it.weight,
|
|
|
+ // weightUtil: it.weightUtil,
|
|
|
+ // engrave: it.engrave,
|
|
|
+ // materialDetails: this.materialDetails(it.onlyCode),
|
|
|
+ // packingCount: it.packingCount,
|
|
|
+ // status: it.status,
|
|
|
+ // result: it.result
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ },
|
|
|
async serachMainCode(arr) {
|
|
|
let newArr = [];
|
|
|
const data = await getProductList({
|
|
|
@@ -1395,19 +1460,19 @@
|
|
|
},
|
|
|
// 仓库编辑
|
|
|
handleWareHouse(row, idx) {
|
|
|
- this.$refs.wareHouseDailogRef.open(row, idx);
|
|
|
+ this.$refs.wareHouseDailogRef.open(row, idx, true);
|
|
|
},
|
|
|
// 入库操作
|
|
|
listEdit(row) {
|
|
|
this.$set(row, 'isSave', false);
|
|
|
- row.selfWarehouseLedgerDetails = row.warehouseLedgerDetails;
|
|
|
- row.warehouseLedgerDetails = [];
|
|
|
- // 重置重量
|
|
|
- this.packNum(row, row.outInNum);
|
|
|
- // 清空物料明细防止数据错乱
|
|
|
- if (this.isSplit && this.resultArray?.length > 0) {
|
|
|
- this.handleIsDetail(false);
|
|
|
- }
|
|
|
+ // row.selfWarehouseLedgerDetails = row.warehouseLedgerDetails;
|
|
|
+ // row.warehouseLedgerDetails = [];
|
|
|
+ // // 重置重量
|
|
|
+ // this.packNum(row, row.outInNum);
|
|
|
+ // // 清空物料明细防止数据错乱
|
|
|
+ // if (this.isSplit && this.resultArray?.length > 0) {
|
|
|
+ // this.handleIsDetail(false);
|
|
|
+ // }
|
|
|
},
|
|
|
// 产品单个保存
|
|
|
listSave(row, index) {
|
|
|
@@ -1417,7 +1482,7 @@
|
|
|
}
|
|
|
const fileds = [
|
|
|
// `warehousingMaterialList.${index}.cargoSpaceCode`,
|
|
|
- `warehousingMaterialList.${index}.batchNo`,
|
|
|
+ // `warehousingMaterialList.${index}.batchNo`,
|
|
|
`warehousingMaterialList.${index}.houseList`
|
|
|
];
|
|
|
if (this.formData.bizType == 1) {
|
|
|
@@ -1426,12 +1491,12 @@
|
|
|
// fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
|
|
|
}
|
|
|
if (this.formData.bizType != 5) {
|
|
|
- fileds.push(
|
|
|
- ...[
|
|
|
- `warehousingMaterialList.${index}.outInNum`,
|
|
|
- `warehousingMaterialList.${index}.minPackingCount`
|
|
|
- ]
|
|
|
- );
|
|
|
+ // fileds.push(
|
|
|
+ // ...[
|
|
|
+ // `warehousingMaterialList.${index}.outInNum`,
|
|
|
+ // `warehousingMaterialList.${index}.minPackingCount`
|
|
|
+ // ]
|
|
|
+ // );
|
|
|
} else if (
|
|
|
this.warehousingMaterialList.some(
|
|
|
(i) => !i.selfWarehouseLedgerDetails?.length
|
|
|
@@ -1458,8 +1523,9 @@
|
|
|
)
|
|
|
)
|
|
|
.then((res) => {
|
|
|
+ console.log('-------------');
|
|
|
this.$set(row, 'isSave', true);
|
|
|
- this.createMaterialCode(row);
|
|
|
+ // this.createMaterialCode(row);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.$message.error('请填入必填项!');
|
|
|
@@ -1481,7 +1547,7 @@
|
|
|
const index = indexes[i];
|
|
|
const fileds = [
|
|
|
// `warehousingMaterialList.${index}.cargoSpaceCode`,
|
|
|
- `warehousingMaterialList.${index}.batchNo`,
|
|
|
+ // `warehousingMaterialList.${index}.batchNo`,
|
|
|
`warehousingMaterialList.${index}.houseList`
|
|
|
];
|
|
|
if (this.formData.bizType == 1) {
|
|
|
@@ -1490,12 +1556,12 @@
|
|
|
// fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
|
|
|
}
|
|
|
if (this.formData.bizType != 5) {
|
|
|
- fileds.push(
|
|
|
- ...[
|
|
|
- `warehousingMaterialList.${index}.outInNum`,
|
|
|
- `warehousingMaterialList.${index}.minPackingCount`
|
|
|
- ]
|
|
|
- );
|
|
|
+ // fileds.push(
|
|
|
+ // ...[
|
|
|
+ // `warehousingMaterialList.${index}.outInNum`,
|
|
|
+ // `warehousingMaterialList.${index}.minPackingCount`
|
|
|
+ // ]
|
|
|
+ // );
|
|
|
} else if (
|
|
|
this.warehousingMaterialList.some(
|
|
|
(i) => !i.selfWarehouseLedgerDetails?.length
|
|
|
@@ -1523,7 +1589,7 @@
|
|
|
)
|
|
|
.then((res) => {
|
|
|
this.$set(row, 'isSave', true);
|
|
|
- this.createMaterialCode(row);
|
|
|
+ // this.createMaterialCode(row);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
if (showMessage) {
|
|
|
@@ -1583,6 +1649,7 @@
|
|
|
batchNum: row.batchNo,
|
|
|
num: num
|
|
|
});
|
|
|
+
|
|
|
// row.measuringUnit == 'PCS' ? nums :
|
|
|
|
|
|
list.forEach((item) => {
|
|
|
@@ -1747,12 +1814,7 @@
|
|
|
num: item.num > 0 ? item.num : 0,
|
|
|
manualBatchNo: item.manualBatchNo,
|
|
|
batchNo: item.batchNo,
|
|
|
- categoryId:
|
|
|
- this.formData.bizType == 2
|
|
|
- ? item.categoryId
|
|
|
- ? item.categoryId
|
|
|
- : item.id
|
|
|
- : item.id,
|
|
|
+ categoryId: item.categoryId,
|
|
|
count:
|
|
|
item.outInNum > 0 && item.minPackingCount > 0
|
|
|
? this.$math.format(
|
|
|
@@ -1766,6 +1828,7 @@
|
|
|
packingCount: item.outInNum > 0 ? item.outInNum : 0,
|
|
|
price: item.univalence > 0 ? item.univalence : 0,
|
|
|
outInDetailRecordAddPOList: item.warehouseLedgerDetails,
|
|
|
+ manualBatchNo: item.manualBatchNo,
|
|
|
position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
|
|
|
remark: '',
|
|
|
pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
|
|
|
@@ -1837,6 +1900,8 @@
|
|
|
name: it.assetName,
|
|
|
pathIds: item.pathIds,
|
|
|
unit: it.unit,
|
|
|
+ barcodes: it.barcodes,
|
|
|
+ manualBatchNo: it.manualBatchNo,
|
|
|
packageNo: it.num,
|
|
|
clientCode: it.clientCode,
|
|
|
materielCode: it.materielCode,
|