|
@@ -6,7 +6,7 @@
|
|
|
<div class="cardTitle">MES今日生产出库数据</div>
|
|
|
<div class="firstRowBoard">
|
|
|
<span style="font-size: 16px !important">BOM出库总数(个)</span>
|
|
|
- <span style="font-weight: 700; font-size: 20px !important">{{ TLData.count }}</span>
|
|
|
+ <span style="font-weight: 700; font-size: 20px !important">{{ TLData.count || 0 }}</span>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="TLData.list"
|
|
@@ -32,7 +32,7 @@
|
|
|
<div class="cardTitle">MES&万里牛今日订单和BOM差异(不含自建订单)</div>
|
|
|
<div class="firstRowBoard">
|
|
|
<span style="font-size: 16px !important">差异订单总数(单)</span>
|
|
|
- <span style="font-weight: 700; font-size: 20px !important">{{ TCData.count }}</span>
|
|
|
+ <span style="font-weight: 700; font-size: 20px !important">{{ TCData.count || 0 }}</span>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="TCData.list"
|
|
@@ -42,20 +42,20 @@
|
|
|
height="30vh"
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" width="120" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" width="120" />
|
|
|
<el-table-column label="MES" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.mesQuantity">{{ Number(scope.row.mesQuantity) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="万里牛" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.wlQuantity">{{ Number(scope.row.wlQuantity) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="差异订单号" min-width="140" />
|
|
|
+ <el-table-column label="差异订单号" prop="codes" min-width="140" />
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
@@ -64,7 +64,7 @@
|
|
|
<div class="cardTitle">MES今日生产&出库差异</div>
|
|
|
<div class="firstRowBoard">
|
|
|
<span style="font-size: 16px !important">差异总数(个)</span>
|
|
|
- <span style="font-weight: 700; font-size: 20px !important">{{ TRData.count }}</span>
|
|
|
+ <span style="font-weight: 700; font-size: 20px !important">{{ TRData.count || 0 }}</span>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="TRData.list"
|
|
@@ -101,17 +101,17 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>销售出库订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.sumCount }}
|
|
|
+ {{ CLData.sumCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>BOM销售出库总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.sumData.count }}
|
|
|
+ {{ CLData.sumBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
|
- :data="CLData.sumData.list"
|
|
|
+ :data="CLData.sumBomList"
|
|
|
:cell-style="{ padding: '0' }"
|
|
|
:row-style="{ height: '50px' }"
|
|
|
header-row-class-name="tableHeader"
|
|
@@ -119,10 +119,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -132,17 +132,17 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>佰卓销售出库订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.bzCount }}
|
|
|
+ {{ CLData.bzCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>佰卓出库BOM总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.bzData.count }}
|
|
|
+ {{ CLData.sumBzBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
|
- :data="CLData.bzData.list"
|
|
|
+ :data="CLData.sumBzBomList"
|
|
|
:cell-style="{ padding: '0' }"
|
|
|
:row-style="{ height: '50px' }"
|
|
|
header-row-class-name="tableHeader"
|
|
@@ -150,10 +150,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -163,17 +163,17 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>宝恒盛销售出库订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.bhsCount }}
|
|
|
+ {{ CLData.bhsCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>宝恒盛出库BOM总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CLData.bhsData.count }}
|
|
|
+ {{ CLData.sumBhsBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
|
- :data="CLData.bhsData.list"
|
|
|
+ :data="CLData.sumBhsBomList"
|
|
|
:cell-style="{ padding: '0' }"
|
|
|
:row-style="{ height: '50px' }"
|
|
|
header-row-class-name="tableHeader"
|
|
@@ -181,10 +181,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -201,13 +201,13 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>生产订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.sumCount }}
|
|
|
+ {{ CRData.sumCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>BOM生产总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.sumBomCount }}
|
|
|
+ {{ CRData.sumBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
@@ -219,10 +219,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -232,13 +232,13 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>佰卓生产订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.bzCount }}
|
|
|
+ {{ CRData.bzCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>佰卓生产BOM总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.sumBzBomCount }}
|
|
|
+ {{ CRData.sumBzBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
@@ -250,10 +250,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -263,13 +263,13 @@
|
|
|
<div class="secondRowBoardTop">
|
|
|
<div>宝恒盛生产订单总数(单)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.bhsCount }}
|
|
|
+ {{ CRData.bhsCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="secondRowBoardBottom">
|
|
|
<div>宝恒盛生产BOM总数(个)</div>
|
|
|
<div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
|
|
|
- {{ CRData.sumBhsBomCount }}
|
|
|
+ {{ CRData.sumBhsBomCount || 0 }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table
|
|
@@ -281,10 +281,10 @@
|
|
|
style="margin-top: 20px"
|
|
|
>
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
- <el-table-column label="BOM编号" prop="colorCode" min-width="140" />
|
|
|
+ <el-table-column label="BOM编号" prop="bomColorCode" min-width="140" />
|
|
|
<el-table-column label="数量" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.quantity">{{ Number(scope.row.quantity) }}</span>
|
|
|
+ <span v-if="scope.row.bomColorCount">{{ Number(scope.row.bomColorCount) }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -363,20 +363,14 @@ export default {
|
|
|
},
|
|
|
CLData: {
|
|
|
sumCount: 0,
|
|
|
- sumData: {
|
|
|
- count: 0,
|
|
|
- list: [],
|
|
|
- },
|
|
|
+ sumBomCount: 0,
|
|
|
+ sumBomList: [],
|
|
|
bzCount: 0,
|
|
|
- bzData: {
|
|
|
- count: 0,
|
|
|
- list: [],
|
|
|
- },
|
|
|
+ sumBzBomCount: 0,
|
|
|
+ sumBzBomList: [],
|
|
|
bhsCount: 0,
|
|
|
- bhsData: {
|
|
|
- count: 0,
|
|
|
- list: [],
|
|
|
- },
|
|
|
+ sumBhsBomCount: 0,
|
|
|
+ sumBhsBomList: [],
|
|
|
},
|
|
|
CRData: {
|
|
|
sumCount: 0,
|
|
@@ -413,6 +407,45 @@ export default {
|
|
|
this.topLeft = false
|
|
|
}
|
|
|
)
|
|
|
+ this.topCenter = true
|
|
|
+ API.getDifList().then(
|
|
|
+ (res) => {
|
|
|
+ this.TCData = res.data.data
|
|
|
+ let num = 0
|
|
|
+ if (this.TCData.list && this.TCData.list.length > 0) {
|
|
|
+ for (let i = 0; i < this.TCData.list.length; i++) {
|
|
|
+ let codes = ''
|
|
|
+ if (this.TCData.list[i].code && this.TCData.list[i].code.length > 0) {
|
|
|
+ let list = this.TCData.list[i].code.reduce((acc, cur) => {
|
|
|
+ if (acc[cur]) {
|
|
|
+ acc[cur]++
|
|
|
+ } else {
|
|
|
+ acc[cur] = 1
|
|
|
+ }
|
|
|
+ return acc
|
|
|
+ }, {})
|
|
|
+ for (let text in list) {
|
|
|
+ if (list[text] % 2 != 0) {
|
|
|
+ num++
|
|
|
+ if (codes) {
|
|
|
+ codes = codes + ', ' + text
|
|
|
+ } else {
|
|
|
+ codes = text
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.TCData.list[i].codes = codes
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.TCData.count = num
|
|
|
+ this.topCenter = false
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log('getDifList: ' + err)
|
|
|
+ this.topCenter = false
|
|
|
+ }
|
|
|
+ )
|
|
|
this.topRight = true
|
|
|
API.differenceBoard().then(
|
|
|
(res) => {
|