|
@@ -183,10 +183,22 @@ export default {
|
|
|
item.reAccNum = item.reAccNum ? item.reAccNum : 0;
|
|
|
item.accNum = item.accNum ? item.accNum : 0;
|
|
|
item.pcs = item.pcs ? item.pcs : 0;
|
|
|
- item.piclvs = ((item.reCodeNum * 100) / item.codeNum).toFixed(2);
|
|
|
- item.acclvs = ((item.reAccNum * 100) / item.accNum).toFixed(2);
|
|
|
- item.readlvs = ((item.codeNum * 100) / item.pcs).toFixed(2);
|
|
|
- item.oklvs = ((item.reAccNum * 100) / item.pcs).toFixed(2);
|
|
|
+ item.piclvs = ((item.reCodeNum * 100) / item.codeNum === 0
|
|
|
+ ? 1
|
|
|
+ : item.codeNum
|
|
|
+ ).toFixed(2);
|
|
|
+ item.acclvs = ((item.reAccNum * 100) / item.accNum === 0
|
|
|
+ ? 1
|
|
|
+ : item.accNum
|
|
|
+ ).toFixed(2);
|
|
|
+ item.readlvs = ((item.codeNum * 100) / item.pcs === 0
|
|
|
+ ? 1
|
|
|
+ : item.pcs
|
|
|
+ ).toFixed(2);
|
|
|
+ item.oklvs = ((item.reAccNum * 100) / item.pcs === 0
|
|
|
+ ? 1
|
|
|
+ : item.pcs
|
|
|
+ ).toFixed(2);
|
|
|
if (isNaN(item.piclvs)) {
|
|
|
item.piclvs = "0%";
|
|
|
} else {
|
|
@@ -222,21 +234,26 @@ export default {
|
|
|
this.listall.pcsall + returnData.listValues[i].pcs;
|
|
|
}
|
|
|
this.listall.piclvall =
|
|
|
- (
|
|
|
- (this.listall.reCodeNumall * 100) /
|
|
|
- this.listall.codeNumall
|
|
|
+ ((this.listall.reCodeNumall * 100) / this.listall.codeNumall === 0
|
|
|
+ ? 1
|
|
|
+ : this.listall.codeNumall
|
|
|
).toFixed(2) + "%";
|
|
|
this.listall.acclvall =
|
|
|
- ((this.listall.reAccNumall * 100) / this.listall.accNumall).toFixed(
|
|
|
- 2
|
|
|
- ) + "%";
|
|
|
+ ((this.listall.reAccNumall * 100) / this.listall.accNumall === 0
|
|
|
+ ? 1
|
|
|
+ : this.listall.accNumall
|
|
|
+ ).toFixed(2) + "%";
|
|
|
this.listall.readlvall =
|
|
|
- ((this.listall.codeNumall * 100) / this.listall.pcsall).toFixed(2) +
|
|
|
- "%";
|
|
|
+ ((this.listall.codeNumall * 100) / this.listall.pcsall === 0
|
|
|
+ ? 1
|
|
|
+ : this.listall.pcsall
|
|
|
+ ).toFixed(2) + "%";
|
|
|
this.listall.oklvall =
|
|
|
- ((this.listall.reAccNumall * 100) / this.listall.pcsall).toFixed(
|
|
|
- 2
|
|
|
- ) + "%";
|
|
|
+ ((this.listall.reAccNumall * 100) / this.listall.pcsall === 0
|
|
|
+ ? 1
|
|
|
+ : this.listall.pcsall
|
|
|
+ ).toFixed(2) + "%";
|
|
|
+ // console.log(this.listall, "1111111");
|
|
|
this.tableListcop.forEach((item, index) => {
|
|
|
item.indexs = index + 1;
|
|
|
});
|