|
|
@@ -317,7 +317,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div class="material">
|
|
|
- <header-title title="入库信息">
|
|
|
+ <header-title title="产品信息">
|
|
|
<el-button type="primary" @click="addStock">添加</el-button>
|
|
|
</header-title>
|
|
|
|
|
|
@@ -354,7 +354,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
- label="物品编码"
|
|
|
+ label="编码"
|
|
|
prop="assetCode"
|
|
|
align="center"
|
|
|
width="150"
|
|
|
@@ -507,80 +507,26 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="总数" prop="counts">
|
|
|
+ <el-table-column label="计量数量" prop="counts">
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.minPackingCount * row.outInNum }}/{{
|
|
|
- handleRowUnit(row)
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="单价"
|
|
|
- prop="univalence"
|
|
|
- width="150"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- <!-- <template v-if="row.isSave || formData.bizType == 5">
|
|
|
- <template v-if="row.univalence || row.univalence === 0">
|
|
|
- {{ row.univalence
|
|
|
- }}{{
|
|
|
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </template> -->
|
|
|
- <!-- v-else -->
|
|
|
- <el-form-item
|
|
|
- :prop="`warehousingMaterialList.${$index}.univalence`"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="row.univalence"
|
|
|
- placeholder="非必填"
|
|
|
- @input="
|
|
|
- (value) =>
|
|
|
- (row.univalence = value.replace(/[^0-9.]+/g, ''))
|
|
|
- "
|
|
|
- >
|
|
|
- <template slot="append">
|
|
|
- 元/{{ handleRowUnit(row) }}
|
|
|
- <!-- {{
|
|
|
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
|
|
|
- }} -->
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
+ {{ row.minPackingCount * row.outInNum }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="金额"
|
|
|
- align="center"
|
|
|
- prop="contentImage"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- >
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- {{
|
|
|
- calcSumTotal(
|
|
|
- row.outInNum,
|
|
|
- row.minPackingCount,
|
|
|
- row.univalence,
|
|
|
- row
|
|
|
- )
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="数量"
|
|
|
+ label="计量单位"
|
|
|
prop="batchNo"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
v-if="formData.extInfo.assetType == 1"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template> {{ row.outInNum }} </template>
|
|
|
+ <template>
|
|
|
+ {{ row.measuringUnit }}
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="数量"
|
|
|
+ label="计量单位"
|
|
|
prop="batchNo"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
@@ -588,25 +534,24 @@
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
<template>
|
|
|
- {{ row.minPackingCount * row.outInNum }}
|
|
|
+ {{ row.measuringUnit }}
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="计量单位"
|
|
|
+
|
|
|
+ <!-- <el-table-column
|
|
|
+ label="数量"
|
|
|
prop="batchNo"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
v-if="formData.extInfo.assetType == 1"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template>
|
|
|
- {{ row.minPackUnit }}
|
|
|
- </template>
|
|
|
+ <template> {{ row.outInNum }} </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="计量单位"
|
|
|
+ label="数量"
|
|
|
prop="batchNo"
|
|
|
width="150"
|
|
|
align="center"
|
|
|
@@ -614,19 +559,20 @@
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
<template>
|
|
|
- {{ row.measuringUnit }}
|
|
|
+ {{ row.minPackingCount * row.outInNum }}
|
|
|
</template>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
+
|
|
|
<el-table-column
|
|
|
label="重量"
|
|
|
align="center"
|
|
|
prop="contentImage"
|
|
|
:show-overflow-tooltip="true"
|
|
|
- v-if="formData.extInfo.assetType == 1"
|
|
|
>
|
|
|
+ <!-- v-if="formData.extInfo.assetType == 1" -->
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ weightTotal(row.outInNum, row.minPackingCount) }}
|
|
|
+ {{ weightTotal(row) }}
|
|
|
<template slot="append">
|
|
|
{{ handleRowUnit(row) }}
|
|
|
<!-- {{
|
|
|
@@ -635,7 +581,7 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
label="重量"
|
|
|
align="center"
|
|
|
prop="contentImage"
|
|
|
@@ -649,14 +595,14 @@
|
|
|
row.minPackingCount * row.outInNum
|
|
|
)
|
|
|
}}
|
|
|
- <template slot="append">
|
|
|
- {{ handleRowUnit(row) }}
|
|
|
- <!-- {{
|
|
|
+ <template slot="append"> -->
|
|
|
+ <!-- {{ handleRowUnit(row) }} -->
|
|
|
+ <!-- {{
|
|
|
{ yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
|
|
|
}} -->
|
|
|
- </template>
|
|
|
+ <!-- </template>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column
|
|
|
label="重量单位"
|
|
|
align="center"
|
|
|
@@ -668,6 +614,60 @@
|
|
|
<template slot="append"> </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="单价"
|
|
|
+ prop="univalence"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <!-- <template v-if="row.isSave || formData.bizType == 5">
|
|
|
+ <template v-if="row.univalence || row.univalence === 0">
|
|
|
+ {{ row.univalence
|
|
|
+ }}{{
|
|
|
+ { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </template> -->
|
|
|
+ <!-- v-else -->
|
|
|
+ <el-form-item
|
|
|
+ :prop="`warehousingMaterialList.${$index}.univalence`"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="row.univalence"
|
|
|
+ placeholder="非必填"
|
|
|
+ @input="
|
|
|
+ (value) =>
|
|
|
+ (row.univalence = value.replace(/[^0-9.]+/g, ''))
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template slot="append">
|
|
|
+ 元/{{ handleRowUnit(row) }}
|
|
|
+ <!-- {{
|
|
|
+ { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
|
|
|
+ }} -->
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="金额"
|
|
|
+ align="center"
|
|
|
+ prop="contentImage"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{
|
|
|
+ calcSumTotal(
|
|
|
+ row.outInNum,
|
|
|
+ row.minPackingCount,
|
|
|
+ row.univalence,
|
|
|
+ row
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="货位"
|
|
|
prop="warehouseName"
|
|
|
@@ -753,9 +753,17 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="mt20">
|
|
|
- <header-title :title="`${title}明细`">
|
|
|
+ <header-title :title="`包装明细`">
|
|
|
<div class="switch_right">
|
|
|
+ 拆分物料明细<el-switch
|
|
|
+ v-model="isDetail"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ @change="handleIsDetail"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
<el-button
|
|
|
+ style="margin-left: 20px"
|
|
|
type="text"
|
|
|
@click="dateSetting"
|
|
|
v-if="formData.bizType != 5"
|
|
|
@@ -787,10 +795,26 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="序号" type="index" width="50">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="编码" prop="assetCode"></el-table-column>
|
|
|
+ <el-table-column label="名称" prop="assetName"></el-table-column>
|
|
|
+ <el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
<el-table-column
|
|
|
- :label="`${title}编码`"
|
|
|
+ :label="`包装编码`"
|
|
|
prop="onlyCode"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column label="包装数量" prop="packNum"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="包装单位"
|
|
|
+ prop="packingUnit"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量数量"
|
|
|
+ prop="minPackingCount"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量单位"
|
|
|
+ prop="measuringUnit"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
label="物料代号"
|
|
|
@@ -809,6 +833,15 @@
|
|
|
<el-input v-model="row.clientCode"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 1"
|
|
|
+ label="刻码"
|
|
|
+ prop="engrave"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.engrave"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
label="重量"
|
|
|
@@ -831,34 +864,7 @@
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-if="formData.bizType == 1"
|
|
|
- label="刻码"
|
|
|
- prop="engrave"
|
|
|
- >
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.engrave"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="包装编码" prop="num"></el-table-column>
|
|
|
- <el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="物品编码"
|
|
|
- prop="assetCode"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column label="名称" prop="assetName"></el-table-column>
|
|
|
- <el-table-column label="最小包装单元" prop="modelType">
|
|
|
- <el-table-column label="" prop="minPackingCount" width="100">
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- {{ row.minPackingCount }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="" prop="minPackingCount">
|
|
|
- <template slot-scope="{ row, $index }">
|
|
|
- {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
v-if="formData.bizType != 5"
|
|
|
label="生产日期"
|
|
|
@@ -908,6 +914,96 @@
|
|
|
<!-- </el-tab-pane>
|
|
|
</el-tabs> -->
|
|
|
</div>
|
|
|
+ <div class="mt20" v-if="isDetail">
|
|
|
+ <header-title :title="`物料明细`"> </header-title>
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="materialCodeReqList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :key="formData.bizType"
|
|
|
+ :header-cell-style="rowClass"
|
|
|
+ style="width: 100%"
|
|
|
+ stripe
|
|
|
+ height="300px"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" type="index" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="编码" prop="assetCode"></el-table-column>
|
|
|
+ <el-table-column label="名称" prop="assetName"></el-table-column>
|
|
|
+ <el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量数量"
|
|
|
+ prop="minPackingCount"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="计量单位"
|
|
|
+ prop="measuringUnit"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
+ label="物料代号"
|
|
|
+ prop="materielCode"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.materielCode"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
+ label="客户代号"
|
|
|
+ prop="clientCode"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.clientCode"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
+ label="重量"
|
|
|
+ prop="weight"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.weight"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 2 || formData.bizType == 1"
|
|
|
+ label="重量单位"
|
|
|
+ prop="weightUtil"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <DictSelection
|
|
|
+ dictName="重量单位"
|
|
|
+ clearable
|
|
|
+ v-model="row.weightUtil"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="formData.bizType == 1"
|
|
|
+ label="刻码"
|
|
|
+ prop="engrave"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.engrave"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="最小包装单元" prop="modelType">
|
|
|
+ <el-table-column label="" prop="minPackingCount" width="100">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.minPackingCount }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="" prop="minPackingCount">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="center mt20">
|
|
|
<el-button type="primary" @click="handleSave" :loading="saveLoading"
|
|
|
@@ -995,6 +1091,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isDetail: false,
|
|
|
contactList: [],
|
|
|
pickerRow: {},
|
|
|
fromUserList: [],
|
|
|
@@ -1084,6 +1181,10 @@
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleIsDetail(event) {
|
|
|
+ if (event) {
|
|
|
+ }
|
|
|
+ },
|
|
|
async searchContact(id) {
|
|
|
const data = await contactlink({ contactId: id });
|
|
|
this.contactList = data.data;
|
|
|
@@ -1136,12 +1237,18 @@
|
|
|
}
|
|
|
},
|
|
|
//计算重量
|
|
|
- weightTotal(PackingCount, outInNum) {
|
|
|
+ weightTotal(row) {
|
|
|
+ console.log(row);
|
|
|
const total = {
|
|
|
- PackingCount: Number(PackingCount),
|
|
|
- outInNum: Number(outInNum)
|
|
|
+ packingCount: Number(row.minPackingCount),
|
|
|
+ outInNum: Number(row.outInNum)
|
|
|
};
|
|
|
- return total.PackingCount * total.outInNum;
|
|
|
+ if (row.measuringUnit == row.weightUnit) {
|
|
|
+ return total.packingCount * total.outInNum * 1;
|
|
|
+ } else {
|
|
|
+ const totals = total.packingCount * total.outInNum;
|
|
|
+ return totals * row.netWeight;
|
|
|
+ }
|
|
|
},
|
|
|
//计算金额
|
|
|
calcSumTotal(PackingCount, outInNum, univalence) {
|
|
|
@@ -1154,13 +1261,14 @@
|
|
|
return total.PackingCount * total.outInNum * total.univalence;
|
|
|
},
|
|
|
handleRowUnit(row) {
|
|
|
- if (this.formData.extInfo.assetType == 1) {
|
|
|
- return row.weightUnit;
|
|
|
- } else if (this.formData.extInfo.assetType == 4) {
|
|
|
- return row.measuringUnit;
|
|
|
- } else {
|
|
|
- return row.measuringUnit;
|
|
|
- }
|
|
|
+ return row.measuringUnit;
|
|
|
+ // if (this.formData.extInfo.assetType == 1) {
|
|
|
+ // return row.weightUnit;
|
|
|
+ // } else if (this.formData.extInfo.assetType == 4) {
|
|
|
+ // return row.measuringUnit;
|
|
|
+ // } else {
|
|
|
+ // return row.measuringUnit;
|
|
|
+ // }
|
|
|
},
|
|
|
changeVerfy(it) {
|
|
|
this.formData.verifyName = it.name;
|
|
|
@@ -1405,7 +1513,7 @@
|
|
|
},
|
|
|
// 入库明细生成条码信息
|
|
|
async createMaterialCode(row) {
|
|
|
- console.lot('====', row);
|
|
|
+ console.log('====', row);
|
|
|
// 添加相同物品、批次号重新更新明细 原料编码
|
|
|
const list = this.warehousingMaterialList.filter(
|
|
|
(i) =>
|
|
|
@@ -1429,8 +1537,9 @@
|
|
|
const res = await outin.getAssetNum({
|
|
|
assetCode: row.assetCode,
|
|
|
batchNum: row.batchNo,
|
|
|
- num: row.measuringUnit == 'PCS' ? nums : num
|
|
|
+ num: num
|
|
|
});
|
|
|
+ // row.measuringUnit == 'PCS' ? nums :
|
|
|
|
|
|
list.forEach((item) => {
|
|
|
if (item.warehouseLedgerDetails?.length) {
|
|
|
@@ -1454,9 +1563,9 @@
|
|
|
new Array(
|
|
|
item.isUnpack
|
|
|
? item.outInNum * item.minPackingCount
|
|
|
- : item.measuringUnit == 'PCS'
|
|
|
- ? +item.outInNum * parseInt(item.minPackingCount)
|
|
|
- : +item.outInNum
|
|
|
+ : // : item.measuringUnit == 'PCS'
|
|
|
+ // ? +item.outInNum * parseInt(item.minPackingCount)
|
|
|
+ +item.outInNum
|
|
|
),
|
|
|
(val, idx) => {
|
|
|
return {
|
|
|
@@ -1488,13 +1597,18 @@
|
|
|
batchList.forEach((item) => {
|
|
|
let num = res1.shift()?.num;
|
|
|
let minPackingCount = item.minPackingCount;
|
|
|
-
|
|
|
+ console.log('item', item);
|
|
|
if (item.warehouseLedgerDetails?.length) {
|
|
|
item.warehouseLedgerDetails.forEach((i, index) => {
|
|
|
this.$set(i, 'num', num);
|
|
|
- this.$set(i, 'weight', item.minPackingCount);
|
|
|
+ this.$set(i, 'weight', item.netWeight);
|
|
|
this.$set(i, 'weightUtil', item.weightUnit);
|
|
|
|
|
|
+ this.$set(i, 'packNum', 1);
|
|
|
+ this.$set(i, 'packingUnit ', item.packingUnit);
|
|
|
+ this.$set(i, 'minPackingCount ', item.minPackingCount);
|
|
|
+ this.$set(i, 'measuringUnit', item.measuringUnit);
|
|
|
+
|
|
|
if (!item.isUnpack) {
|
|
|
if (index < item.warehouseLedgerDetails.length - 1) {
|
|
|
num = res1.shift()?.num;
|