|
|
@@ -359,6 +359,37 @@
|
|
|
>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
+ <template v-slot:modelKey="{ row, $index }">
|
|
|
+ <el-form-item>
|
|
|
+ <DictSelection
|
|
|
+ dictName="物品机型"
|
|
|
+ clearable
|
|
|
+ v-model="row.modelKey"
|
|
|
+ :isOne="$index === 0"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ </DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ <template v-slot:colorKey="{ row, $index }">
|
|
|
+ <el-form-item>
|
|
|
+ <DictSelection
|
|
|
+ dictName="物品颜色"
|
|
|
+ clearable
|
|
|
+ v-model="row.colorKey"
|
|
|
+ :isOne="$index === 0"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ </DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template v-slot:detailProductionDate="{ row, $index }">
|
|
|
<template v-if="row.isSave">
|
|
|
{{ row.detailProductionDate }}
|
|
|
@@ -604,6 +635,36 @@
|
|
|
{{ row.weightUnit }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- <el-table-column label="机型" prop="modelKey">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <DictSelection
|
|
|
+ dictName="物品机型"
|
|
|
+ clearable
|
|
|
+ v-model="row.modelKey"
|
|
|
+ :isOne="false"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ </DictSelection>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="颜色" prop="colorKey">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <DictSelection
|
|
|
+ dictName="物品颜色"
|
|
|
+ clearable
|
|
|
+ v-model="row.colorKey"
|
|
|
+ :isOne="false"
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ </DictSelection>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
|
|
|
<el-table-column label="质检结果" prop="result" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
@@ -1173,6 +1234,20 @@
|
|
|
width: 300,
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // width: 200,
|
|
|
+ // prop: 'modelKey',
|
|
|
+ // label: '机型',
|
|
|
+ // slot: 'modelKey',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // width: 200,
|
|
|
+ // prop: 'colorKey',
|
|
|
+ // label: '颜色',
|
|
|
+ // slot: 'colorKey',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
{
|
|
|
label: '采购原因',
|
|
|
prop: 'purpose',
|
|
|
@@ -1181,6 +1256,7 @@
|
|
|
width: 200,
|
|
|
align: 'center'
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
label: '生产日期',
|
|
|
prop: 'detailProductionDate',
|
|
|
@@ -1460,7 +1536,7 @@
|
|
|
// 小数处理,最大3位
|
|
|
format3(str) {
|
|
|
let value = str;
|
|
|
- value = value.replace(/[^0-9.]/g, '');
|
|
|
+ value = value.toString().replace(/[^0-9.]/g, '');
|
|
|
const parts = value.split('.');
|
|
|
if (parts.length > 2) {
|
|
|
value = parts[0] + '.' + parts.slice(1).join('');
|
|
|
@@ -1473,7 +1549,6 @@
|
|
|
return value;
|
|
|
},
|
|
|
async computeNum(row, index, isClear) {
|
|
|
- console.log('row,', row);
|
|
|
row.packingQuantity = this.format3(row.packingQuantity);
|
|
|
|
|
|
let data = row.packingSpecificationOption.find(
|
|
|
@@ -1709,11 +1784,17 @@
|
|
|
if (item.weight === null || item.weight === undefined) {
|
|
|
item.weight = 0;
|
|
|
}
|
|
|
- if (this.formData.bizType == 4) {
|
|
|
- item.packingUnit = '箱';
|
|
|
- } else {
|
|
|
- item.packingUnit = '';
|
|
|
- }
|
|
|
+
|
|
|
+ item.packingUnit = item.measuringUnit; // 单位
|
|
|
+ item.packingUnitId = item.packingSpecificationOption.find(
|
|
|
+ (v) => v.conversionUnit == item.measuringUnit
|
|
|
+ )?.id; // 单位
|
|
|
+
|
|
|
+ // if (this.formData.bizType == 4) {
|
|
|
+ // item.packingUnit = '箱';
|
|
|
+ // } else {
|
|
|
+ // item.packingUnit = '';
|
|
|
+ // }
|
|
|
return item;
|
|
|
});
|
|
|
console.log(this.productList, 'productList');
|