@@ -22,10 +22,10 @@ export default {
},
computed: {
state() {
- return ['', '未开始', '生产中', '已完成'][this.injectData.orderStatus]
+ return ['未开始', '生产中', '已完成'][this.injectData.orderStatus]
},
myClass() {
- return ['', 'yellow', 'blue', 'green'][this.injectData.orderStatus]
+ return ['yellow', 'blue', 'green'][this.injectData.orderStatus]
}
},
};
diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue
index 07b26bc..2408049 100644
--- a/src/views/report/comprehensiveData.vue
+++ b/src/views/report/comprehensiveData.vue
@@ -1,7 +1,7 @@
@@ -201,12 +201,29 @@ export default {
// this.getOverView()
const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
- this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
- this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
+ this.listQuery.startDate = this.getFirstDay()
+ this.listQuery.endDate = this.getLastDay()
this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
this.getDataList()
},
methods: {
+ getFirstDay() {
+ //当前月第一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = "01";
+ m = m < 10 ? "0" + m : m; //月份补 0
+ return [y, m, d].join("-");
+ },
+ getLastDay() {
+ //当前月最后一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+ m = m < 10 ? "0" + m : m; //月份补 0
+ d = d < 10 ? "0" + d : d; //日数补 0
+ return [y, m, d].join("-");
+ },
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue
index f6f4281..f88e2d6 100644
--- a/src/views/report/produceConversion.vue
+++ b/src/views/report/produceConversion.vue
@@ -396,12 +396,29 @@ export default {
// this.getOverView()
const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
- this.listQuery.beginTime = moment(sevenDaysAgo).format('yyyy-MM-DD')
- this.listQuery.endTime = moment(today).format('yyyy-MM-DD')
+ this.listQuery.beginTime = this.getFirstDay()
+ this.listQuery.endTime = this.getLastDay()
this.listQuery.reportTime = [this.listQuery.beginTime, this.listQuery.endTime]
this.getDataList()
},
methods: {
+ getFirstDay() {
+ //当前月第一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = "01";
+ m = m < 10 ? "0" + m : m; //月份补 0
+ return [y, m, d].join("-");
+ },
+ getLastDay() {
+ //当前月最后一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+ m = m < 10 ? "0" + m : m; //月份补 0
+ d = d < 10 ? "0" + d : d; //日数补 0
+ return [y, m, d].join("-");
+ },
handleChange(val) {
this.listQuery.reportTime = []
this.listQuery.end = null
diff --git a/src/views/report/productionSituationMW.vue b/src/views/report/productionSituationMW.vue
index 7590597..6fba050 100644
--- a/src/views/report/productionSituationMW.vue
+++ b/src/views/report/productionSituationMW.vue
@@ -365,12 +365,29 @@ export default {
// this.getOverView()
const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
- this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
- this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
+ this.listQuery.startDate = this.getFirstDay()
+ this.listQuery.endDate = this.getLastDay()
this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
this.getDataList()
},
methods: {
+ getFirstDay() {
+ //当前月第一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = "01";
+ m = m < 10 ? "0" + m : m; //月份补 0
+ return [y, m, d].join("-");
+ },
+ getLastDay() {
+ //当前月最后一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+ m = m < 10 ? "0" + m : m; //月份补 0
+ d = d < 10 ? "0" + d : d; //日数补 0
+ return [y, m, d].join("-");
+ },
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
diff --git a/src/views/report/productionSituationTablets.vue b/src/views/report/productionSituationTablets.vue
index f579bbe..f99679c 100644
--- a/src/views/report/productionSituationTablets.vue
+++ b/src/views/report/productionSituationTablets.vue
@@ -489,12 +489,29 @@ export default {
// this.getOverView()
const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
- this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
- this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
+ this.listQuery.startDate = this.getFirstDay()
+ this.listQuery.endDate = this.getLastDay()
this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
this.getDataList()
},
methods: {
+ getFirstDay() {
+ //当前月第一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = "01";
+ m = m < 10 ? "0" + m : m; //月份补 0
+ return [y, m, d].join("-");
+ },
+ getLastDay() {
+ //当前月最后一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+ m = m < 10 ? "0" + m : m; //月份补 0
+ d = d < 10 ? "0" + d : d; //日数补 0
+ return [y, m, d].join("-");
+ },
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
diff --git a/src/views/report/productionYield.vue b/src/views/report/productionYield.vue
index 17507fb..234ba17 100644
--- a/src/views/report/productionYield.vue
+++ b/src/views/report/productionYield.vue
@@ -416,12 +416,29 @@ export default {
// this.getOverView()
const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
- this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
- this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
+ this.listQuery.startDate = this.getFirstDay()
+ this.listQuery.endDate = this.getLastDay()
this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
this.getDataList()
},
methods: {
+ getFirstDay() {
+ //当前月第一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = "01";
+ m = m < 10 ? "0" + m : m; //月份补 0
+ return [y, m, d].join("-");
+ },
+ getLastDay() {
+ //当前月最后一天
+ var y = new Date().getFullYear(); //获取年份
+ var m = new Date().getMonth() + 1; //获取月份
+ var d = new Date(y, m, 0).getDate(); //获取当月最后一日
+ m = m < 10 ? "0" + m : m; //月份补 0
+ d = d < 10 ? "0" + d : d; //日数补 0
+ return [y, m, d].join("-");
+ },
handleChange() {
this.listQuery.reportTime = []
this.listQuery.end = null
@@ -583,13 +600,22 @@ export default {
if (this.listQuery.type == 2) {
res.data.list.forEach((ele, index) => {
let i = index + 1
- this.chartMsg.xData.push(ele.titleValue)
+ // this.chartMsg.xData.push(ele.titleValue)
this.otherProps.push({
label: ele.titleValue,
filter: (val) => (val || val === 0 ? val : "-"),
prop: 'value' + i
})
})
+ res.data.list.slice(0,res.data.list.length-1).forEach((ele, index) => {
+ // let i = index + 1
+ this.chartMsg.xData.push(ele.titleValue)
+ // this.otherProps.push({
+ // label: ele.titleValue,
+ // filter: (val) => (val || val === 0 ? val : "-"),
+ // prop: 'value' + i
+ // })
+ })
this.chartMsgYearTarget.xData.push('FTO投入', '芯片产量', '标准组件产量', '综合良率')
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele) => {
this.title = ele.titleValue
@@ -693,42 +719,35 @@ export default {
dataArr[3]['' + m + ''] = item.comprehensiveYieldRate
})
})
- for (let i in dataArr[0]) {
- this.chartMsg.series[0].name = dataArr[0]['item']
- if (i.search('value') === 0) {
+ // for (let i in chartDataArr[0]) {
+ // this.chartMsg.series[0].name = chartDataArr[0]['item']
+ // if (i.search('value') === 0) {
+ // this.chartMsg.series[0].data.push({
+ // name: chartDataArr[0]['item'],
+ // value: chartDataArr[0][i] === 0 ? null : chartDataArr[0][i]
+ // })
+ // }
+ // }
+ res.data.list.slice(0, res.data.list.length - 1).forEach((ele, index) => {
+ ele.productYieldDataVOList.forEach((item, index) => {
this.chartMsg.series[0].data.push({
- name: dataArr[0]['item'],
- value: dataArr[0][i] === 0 ? null : dataArr[0][i]
+ name: ele.titleValue,
+ value: item.ftoInput === 0 ? null : item.ftoInput
})
- }
- }
- for (let i in dataArr[1]) {
- this.chartMsg.series[1].name = dataArr[1]['item']
- if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
- name: dataArr[1]['item'],
- value: dataArr[1][i] === 0 ? null : dataArr[1][i]
+ name: ele.titleValue,
+ value: item.chipYield === 0 ? null : item.chipYield
})
- }
- }
- for (let i in dataArr[2]) {
- this.chartMsg.series[2].name = dataArr[2]['item']
- if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
- name: dataArr[2]['item'],
- value: dataArr[2][i] === 0 ? null : dataArr[2][i]
+ name: ele.titleValue,
+ value: item.componentYield === 0 ? null : item.componentYield
})
- }
- }
- for (let i in dataArr[3]) {
- this.chartMsg.series[3].name = dataArr[3]['item']
- if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
- name: dataArr[3]['item'],
- value: dataArr[3][i] === 0 ? null : dataArr[3][i]
+ name: ele.titleValue,
+ value: item.comprehensiveYieldRate === 0 ? null : item.comprehensiveYieldRate
})
- }
- }
+ })
+ })
} else {
res.data.list.forEach((ele, index) => {
let i = index + 1