|
@@ -924,7 +924,14 @@
|
|
|
dictName="质检结果"
|
|
dictName="质检结果"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="row.result"
|
|
v-model="row.result"
|
|
|
|
|
+ v-if="!row.isPack"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ <span v-if="!row.result"></span>
|
|
|
|
|
+ <span v-if="row.result == 0">合格</span>
|
|
|
|
|
+ <span v-else-if="row.result == 1">不合格</span>
|
|
|
|
|
+ <span v-else>让步接收</span>
|
|
|
|
|
+ </span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
@@ -933,7 +940,13 @@
|
|
|
dictName="质检状态"
|
|
dictName="质检状态"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="row.status"
|
|
v-model="row.status"
|
|
|
|
|
+ v-if="!row.isPack"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <span v-else
|
|
|
|
|
+ ><span v-if="!row.status"></span>
|
|
|
|
|
+ <span v-if="row.status == 0">未检</span>
|
|
|
|
|
+ <span v-else>已检</span></span
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
@@ -1041,7 +1054,11 @@
|
|
|
prop="meterielCode"
|
|
prop="meterielCode"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.materielCode"></el-input>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.materielCode"
|
|
|
|
|
+ v-if="!row.isMeta"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <span v-else>{{ row.materialCode }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1050,7 +1067,11 @@
|
|
|
prop="clientCode"
|
|
prop="clientCode"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.clientCode"></el-input>
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.clientCode"
|
|
|
|
|
+ v-if="!row.isMeta"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <span v-else> {{ row.clientCode }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1059,7 +1080,8 @@
|
|
|
prop="engrave"
|
|
prop="engrave"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.engrave"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="row.engrave" v-if="!row.isMeta"></el-input>
|
|
|
|
|
+ <span v-else> {{ row.engrave }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1069,7 +1091,8 @@
|
|
|
prop="weight"
|
|
prop="weight"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-model="row.weight"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="row.weight" v-if="!row.isMeta"></el-input>
|
|
|
|
|
+ <span v-else>{{ row.weight }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1087,7 +1110,13 @@
|
|
|
dictName="质检结果"
|
|
dictName="质检结果"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="row.result"
|
|
v-model="row.result"
|
|
|
|
|
+ v-if="!row.isMeta"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <span v-else
|
|
|
|
|
+ ><span v-if="!row.status"></span>
|
|
|
|
|
+ <span v-if="row.status == 0">未检</span>
|
|
|
|
|
+ <span v-else>已检</span></span
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
<el-table-column label="质检状态" prop="status" width="120">
|
|
@@ -1096,7 +1125,20 @@
|
|
|
dictName="质检状态"
|
|
dictName="质检状态"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="row.status"
|
|
v-model="row.status"
|
|
|
|
|
+ v-if="!row.isMeta"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <span v-else
|
|
|
|
|
+ ><span v-if="!row.status"></span>
|
|
|
|
|
+ <span v-if="row.status == 0">未检</span>
|
|
|
|
|
+ <span v-else>已检</span></span
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" width="80">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <el-button type="text" @click="packMeta(row)">
|
|
|
|
|
+ {{ !row.isMeta ? '保存' : '编辑' }}
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -1156,6 +1198,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import { getProductList } from '@/api/bpm/components/saleManage/contact';
|
|
|
import { getLoginUser } from '@/api/login';
|
|
import { getLoginUser } from '@/api/login';
|
|
|
import picker from './components/picker.vue';
|
|
import picker from './components/picker.vue';
|
|
|
import outin from '@/api/warehouseManagement/outin';
|
|
import outin from '@/api/warehouseManagement/outin';
|
|
@@ -1326,7 +1369,8 @@
|
|
|
weightUnit: item.weightUnit,
|
|
weightUnit: item.weightUnit,
|
|
|
engrave: item.engrave,
|
|
engrave: item.engrave,
|
|
|
result: item.result,
|
|
result: item.result,
|
|
|
- status: item.status
|
|
|
|
|
|
|
+ status: item.status,
|
|
|
|
|
+ isMeta: false
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1334,8 +1378,13 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.resultArray = [];
|
|
this.resultArray = [];
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log('this.resultArray', this.resultArray);
|
|
|
},
|
|
},
|
|
|
//包装明细保存
|
|
//包装明细保存
|
|
|
|
|
+ packMeta(row) {
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ row.isMeta = !row.isMeta;
|
|
|
|
|
+ },
|
|
|
packCout(row) {
|
|
packCout(row) {
|
|
|
//true保存==》反之
|
|
//true保存==》反之
|
|
|
if (!row.isPack) {
|
|
if (!row.isPack) {
|
|
@@ -1414,11 +1463,41 @@
|
|
|
...item,
|
|
...item,
|
|
|
assetName: item.productName,
|
|
assetName: item.productName,
|
|
|
assetCode: item.productCode,
|
|
assetCode: item.productCode,
|
|
|
- categoryId: item.productCategoryId
|
|
|
|
|
|
|
+ categoryId: item.productCategoryId,
|
|
|
|
|
+ minPackUnit: item.packingUnit
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
- this.onSelectTableData(list);
|
|
|
|
|
|
|
+ this.onSelectTableData(await this.serachMainCode(list));
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async serachMainCode(arr) {
|
|
|
|
|
+ let newArr = [];
|
|
|
|
|
+ // 使用 Promise.all 来等待所有异步操作完成
|
|
|
|
|
+ await Promise.all(
|
|
|
|
|
+ arr.map(async (item) => {
|
|
|
|
|
+ const data = await getProductList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ categoryLevelId: item.categoryLevelPathIdParent,
|
|
|
|
|
+ code: item.assetCode
|
|
|
|
|
+ });
|
|
|
|
|
+ newArr.push(data.list); // 将结果存储到 newArr 中
|
|
|
|
|
+ })
|
|
|
|
|
+ );
|
|
|
|
|
+ let re = [];
|
|
|
|
|
+ for (const item of newArr) {
|
|
|
|
|
+ for (const it of item) {
|
|
|
|
|
+ re.push(it);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ return re.map((item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ minPackUnit: item.packingUnit,
|
|
|
|
|
+ assetCode: item.code,
|
|
|
|
|
+ assetName: item.name
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
onClear() {
|
|
onClear() {
|
|
|
this.formData.extInfo.documentSource = '';
|
|
this.formData.extInfo.documentSource = '';
|
|
@@ -1943,12 +2022,12 @@
|
|
|
this.formatWarehouseMaterialList();
|
|
this.formatWarehouseMaterialList();
|
|
|
|
|
|
|
|
let arr = this.warehousingMaterialList.map((item) => {
|
|
let arr = this.warehousingMaterialList.map((item) => {
|
|
|
- console.log(item,'item')
|
|
|
|
|
|
|
+ console.log(item, 'item');
|
|
|
return {
|
|
return {
|
|
|
netWeight: item.netWeight,
|
|
netWeight: item.netWeight,
|
|
|
num: item.num,
|
|
num: item.num,
|
|
|
batchNo: item.batchNo,
|
|
batchNo: item.batchNo,
|
|
|
- code:item.productCode,
|
|
|
|
|
|
|
+ code: item.productCode,
|
|
|
categoryId:
|
|
categoryId:
|
|
|
this.formData.bizType == 2
|
|
this.formData.bizType == 2
|
|
|
? item.categoryId
|
|
? item.categoryId
|
|
@@ -2052,6 +2131,7 @@
|
|
|
},
|
|
},
|
|
|
//添加明细
|
|
//添加明细
|
|
|
async onSelectTableData(val) {
|
|
async onSelectTableData(val) {
|
|
|
|
|
+ console.log('===ssa', val);
|
|
|
const res = await getCode('lot_number_code');
|
|
const res = await getCode('lot_number_code');
|
|
|
|
|
|
|
|
this.warehousingMaterialList.push(
|
|
this.warehousingMaterialList.push(
|