修改bug

This commit is contained in:
‘937886381’
2024-03-13 15:30:08 +08:00
parent 680f852057
commit 224625e10f
10 changed files with 90 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-12 11:17:53
* @LastEditTime: 2024-03-13 15:28:18
* @LastEditors: zhp
* @Description:
-->
@@ -47,7 +47,8 @@
<el-table-column prop="inputTrend" label="增减" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined}} </span>
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
undefined}} </span>
</template>
</el-table-column>
</el-table-column>
@@ -70,7 +71,8 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
'%' : undefined }} </span>
</template>
</el-table-column>
</el-table-column>
@@ -91,7 +93,8 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * 100).toFixed(2)) + '%' :
undefined }} </span>
</template>
</el-table-column>
</el-table-column>
@@ -114,7 +117,9 @@
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
100).toFixed(2)) +
'%' : undefined }}
</span>
</template>
</el-table-column>
@@ -527,10 +532,16 @@ export default {
}
})
let updateArr = this.list
updateArr.forEach((ele, index) => {
delete ele.inputTrend
delete ele.goodProductTrend
delete ele.missCheckTrend
delete ele.goodProductPassTrend
});
// console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([
await updateSumProductionDataList(obj),
await updateProductionDataList(updateArr),
await updateProductionDataList(updateArr)
])
console.log(result);
if (result[0].data == true && result[1].data == true) {