Commit 0016bf6c authored by W_Y's avatar W_Y

工序库盘点记录

parent 7ba174a2
......@@ -185,6 +185,8 @@ export default {
name: 'Control',
data() {
return {
// 接口状态
statusCode: true,
// 图表
// 折线图
myChartRegistrationTime: undefined,
......@@ -471,63 +473,68 @@ export default {
},
// 总图
getAll() {
findControl().then(res => {
// 折线图
this.sumUpdateList = res.data.findCountIdByUpdateDate
this.numList = []
this.dataList = []
this.sumUpdateList.forEach(item => {
this.numList.push(item.sum)
this.dataList.push(item.time)
})
this.updateRegistrationTime()
if (this.statusCode === true) {
findControl().then(res => {
this.statusCode = false
// console.log('---res---', res)
// 折线图
this.sumUpdateList = res.data.findCountIdByUpdateDate
this.numList = []
this.dataList = []
this.sumUpdateList.forEach(item => {
this.numList.push(item.sum)
this.dataList.push(item.time)
})
this.updateRegistrationTime()
// 柱状图
this.sumFqYyList = res.data.findCountIdByFqYy
this.YyList = []
this.FqNumList = []
this.sumFqYyList.forEach(item => {
this.YyList.push(item.fq_yy)
this.FqNumList.push(item.sum)
})
this.updateChartsLeaveMessage()
// 柱状图
this.sumFqYyList = res.data.findCountIdByFqYy
this.YyList = []
this.FqNumList = []
this.sumFqYyList.forEach(item => {
this.YyList.push(item.fq_yy)
this.FqNumList.push(item.sum)
})
this.updateChartsLeaveMessage()
// 饼图1
this.PtypeList = []
const renamedData = res.data.findCountIdByPtype.map(item => ({
...item,
name: item.ptype === '1' ? '设备库' : (item.ptype === '2' ? '工序库' : (item.ptype === '3' ? '工序样品库' : item.ptype)),
value: item.sum
}))
this.PtypeList = renamedData
this.updateVisitorData()
// 饼图1
this.PtypeList = []
const renamedData = res.data.findCountIdByPtype.map(item => ({
...item,
name: item.ptype === '1' ? '设备库' : (item.ptype === '2' ? '工序库' : (item.ptype === '3' ? '工序样品库' : item.ptype)),
value: item.sum
}))
this.PtypeList = renamedData
this.updateVisitorData()
// 饼图2
this.PtypeList1 = []
const renamedData1 = res.data.findCountIdByPtype1CreateDate.map(item => ({
...item,
name: item.time,
value: item.sum
}))
this.PtypeList1 = renamedData1
this.updateVisitorData1()
// 饼图2
this.PtypeList1 = []
const renamedData1 = res.data.findCountIdByPtype1CreateDate.map(item => ({
...item,
name: item.time,
value: item.sum
}))
this.PtypeList1 = renamedData1
this.updateVisitorData1()
// 月同比
// 本月化学数量
this.hxNum = res.data.findMoM.num1ThisMonth
// 化学上月入库数量
this.lastHxNum = res.data.findMoM.num1LastMonth
// 化学本月错误数量
this.hxErrorNum = res.data.findMoM.num2ThisMonth
// 化学上月错误数量
this.lastHxErrorNum = res.data.findMoM.num2LastMonth
// 网版板月入库数量
this.wbNum = res.data.findMoM.num3ThisMonth
// 网板上月入库数量
this.lastWbNum = res.data.findMoM.num3LastMonth
// 实时数量
this.realTime = res.data.findMoM.num3All
})
// 月同比
// 本月化学数量
this.hxNum = res.data.findMoM.num1ThisMonth
// 化学上月入库数量
this.lastHxNum = res.data.findMoM.num1LastMonth
// 化学本月错误数量
this.hxErrorNum = res.data.findMoM.num2ThisMonth
// 化学上月错误数量
this.lastHxErrorNum = res.data.findMoM.num2LastMonth
// 网版板月入库数量
this.wbNum = res.data.findMoM.num3ThisMonth
// 网板上月入库数量
this.lastWbNum = res.data.findMoM.num3LastMonth
// 实时数量
this.realTime = res.data.findMoM.num3All
})
}
this.statusCode = true
},
handleClick(row) {
this.$router.push({
......
......@@ -140,10 +140,10 @@ export default {
options: [{
value: 1,
label: '已盘点'
},{
}, {
value: 0,
label: '未盘点'
},
}
],
// 日期范围
dateRange: [],
......@@ -195,9 +195,7 @@ export default {
}
},
// 表单参数
form: {
},
form: {}
}
},
/** 路由离开前存储筛选条件*/
......@@ -237,10 +235,10 @@ export default {
/** 查询角色列表 */
getList() {
// 去除字段默认为0导致0对应的未盘点无法使用问题
let flag = 0;
this.loading = true;
let flag = 0
this.loading = true
if (this.queryEntity.entity.status === undefined || this.queryEntity.entity.status === '') {
flag = 1;
flag = 1
}
if (flag === 1) {
this.queryEntity.entity.status = -1
......@@ -249,14 +247,14 @@ export default {
this.dateRange = []
}
listdevice(this.queryParams, this.addDateRange(this.queryEntity, this.dateRange)).then(response => {
console.log('list',response)
// console.log('list', response)
this.equipmentList = response.rows
this.total = response.total
this.loading = false
})
if (flag == 1) {
if (flag === 1) {
this.queryEntity.entity.status = undefined
flag = 0;
flag = 0
}
},
// 取消按钮
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment