|
|
@@ -789,7 +789,7 @@
|
|
|
style="margin-left: 20px"
|
|
|
type="text"
|
|
|
@click="dateSetting"
|
|
|
- v-if="formData.bizType != 5"
|
|
|
+ v-if="!isSplit && formData.bizType != 5"
|
|
|
>批量设置{{
|
|
|
curDateType === 'manufactureTime' ? '生产日期' : '采购日期'
|
|
|
}}</el-button
|
|
|
@@ -809,11 +809,11 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column
|
|
|
+ v-if="formData.bizType != 5"
|
|
|
type="selection"
|
|
|
align="center"
|
|
|
width="50"
|
|
|
fixed="left"
|
|
|
- v-if="formData.bizType != 5"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="序号" type="index" width="50">
|
|
|
@@ -928,7 +928,7 @@
|
|
|
width="220"
|
|
|
>
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
- <el-select filterable v-model="curDateType">
|
|
|
+ <el-select :disabled="isSplit" filterable v-model="curDateType">
|
|
|
<el-option
|
|
|
value="manufactureTime"
|
|
|
label="生产日期"
|
|
|
@@ -945,7 +945,7 @@
|
|
|
</template>
|
|
|
<el-date-picker
|
|
|
v-else
|
|
|
- :disabled="row.ispack"
|
|
|
+ :disabled="row.isPack"
|
|
|
size="small"
|
|
|
v-model="row[curDateType]"
|
|
|
type="datetime"
|
|
|
@@ -967,7 +967,12 @@
|
|
|
width="200"
|
|
|
></el-table-column>
|
|
|
</template>
|
|
|
- <el-table-column label="操作" width="80" fixed="right">
|
|
|
+ <el-table-column
|
|
|
+ v-if="!isSplit"
|
|
|
+ label="操作"
|
|
|
+ width="80"
|
|
|
+ fixed="right"
|
|
|
+ >
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button type="text" @click="packCout(row)">
|
|
|
{{ !row.isPack ? '保存' : '编辑' }}
|
|
|
@@ -1041,32 +1046,38 @@
|
|
|
<el-input v-model="row.engrave"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column width="100" label="重量" prop="weight">
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.weight"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="重量单位" prop="weightUnit">
|
|
|
- <template slot-scope="{ row }">
|
|
|
- {{ row.weightUnit }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="重量"
|
|
|
+ prop="weight"
|
|
|
+ width="100"
|
|
|
+ ></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
|
|
|
+ v-if="!row.isPack"
|
|
|
+ @updateVal="changeWrapStatus($event, row)"
|
|
|
dictName="质检结果"
|
|
|
clearable
|
|
|
v-model="row.result"
|
|
|
/>
|
|
|
+ <span v-else>{{ qualityResults[row.result] }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <DictSelection
|
|
|
- dictName="质检状态"
|
|
|
- clearable
|
|
|
- v-model="row.status"
|
|
|
- />
|
|
|
+ <span>{{ qualityStatus[row.status] }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <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>
|
|
|
@@ -1287,10 +1298,13 @@
|
|
|
},
|
|
|
handleIsDetail(event) {
|
|
|
this.isSplit = event;
|
|
|
+ const list = this.materialCodeReqList;
|
|
|
if (event) {
|
|
|
- const list = this.materialCodeReqList;
|
|
|
let resultArray = [];
|
|
|
list.forEach((item) => {
|
|
|
+ // 包装维度改成已保存状态
|
|
|
+ item.isPack = true;
|
|
|
+ // 拆分物料维度并生成列表
|
|
|
for (let i = 1; i <= Number(item.minPackingCount); i++) {
|
|
|
resultArray.push({
|
|
|
onlyCode: item.onlyCode,
|
|
|
@@ -1306,12 +1320,18 @@
|
|
|
weightUnit: item.weightUnit,
|
|
|
engrave: item.engrave,
|
|
|
result: item.result,
|
|
|
- status: item.status
|
|
|
+ status: item.status,
|
|
|
+ isPack: false
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
this.resultArray = resultArray;
|
|
|
} else {
|
|
|
+ // 包装维度改成编辑状态
|
|
|
+ list.forEach((item) => {
|
|
|
+ item.isPack = false;
|
|
|
+ });
|
|
|
+ // 清空物料维度列表
|
|
|
this.resultArray = [];
|
|
|
}
|
|
|
},
|
|
|
@@ -1330,7 +1350,7 @@
|
|
|
// (acc, curr) => acc + curr.weight,
|
|
|
// 0
|
|
|
// );
|
|
|
-
|
|
|
+ // 修改产品信息重量(包装维度累计)
|
|
|
this.isWeight = false;
|
|
|
this.warehousingMaterialList.forEach((item) => {
|
|
|
if (item.assetCode == code && item.batchNo == batchNo) {
|
|
|
@@ -1357,6 +1377,17 @@
|
|
|
|
|
|
// }, 100);
|
|
|
},
|
|
|
+ // 物料明细保存
|
|
|
+ materialBtn(row) {
|
|
|
+ console.log(row);
|
|
|
+ // true保存 false编辑
|
|
|
+ if (!row.isPack) {
|
|
|
+ row.isPack = true;
|
|
|
+ // 物料维度修改质检改变包装维度质检(结果和状态)
|
|
|
+ } else {
|
|
|
+ row.isPack = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
packNum(row, value) {
|
|
|
const total = {
|
|
|
packingCount: Number(row.minPackingCount),
|