Commit 0016bf6c authored by W_Y's avatar W_Y

工序库盘点记录

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