|
|
@ -15,138 +15,58 @@
|
|
|
|
<dv-scroll-board class="dv-scr-board" :config="config" />
|
|
|
|
<dv-scroll-board class="dv-scr-board" :config="config" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-dialog title="工单详细信息" style="font-color:#fff" :visible.sync="moDetailShow" width="50%" :append-to-body="true">
|
|
|
|
|
|
|
|
<el-descriptions class="margin-top" :column="1" border>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">工单号</template>{{ moInfo.FBILL_NO }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">产线</template>{{ moInfo.FWORK_SHOP }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">产品名称</template>{{ moInfo.FMATERIAL_NAME }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">型号</template>{{ moInfo.FSPECIFICATION }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">单位</template>{{ moInfo.FUNIT_ID }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">计划数量</template>{{ moInfo.FQTY_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">合格品数量</template>{{ moInfo.FREPQUAAUX_QTY_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">不合格数量</template>{{ moInfo.FREPFAILAUX_QTY_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">开工</template>{{ moInfo.FSTATUS }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">计划开工日期</template>{{ moInfo.FPLAN_START_DATE_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">预定完工日期</template>{{ moInfo.FPLAN_FINISH_DATE_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">实际开工时间</template>{{ moInfo.FSTART_DATE_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
|
|
|
<template slot="label">实际完工时间</template>{{ moInfo.FFINISH_DATE_SHOW }}
|
|
|
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="moDetailShow = false">关 闭</el-button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { request } from "@/utils/request.js";
|
|
|
|
import { request } from '@/utils/request.js'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
config: {
|
|
|
|
config: {
|
|
|
|
header: [
|
|
|
|
header: ['生产订单', '产品名称', '订单数量', '合格品数量', '剩余天数', '生产进度%'],
|
|
|
|
"生产订单",
|
|
|
|
|
|
|
|
"产品名称",
|
|
|
|
|
|
|
|
"订单数量",
|
|
|
|
|
|
|
|
"合格品数量",
|
|
|
|
|
|
|
|
"剩余天数",
|
|
|
|
|
|
|
|
"生产进度%",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
// data: [],
|
|
|
|
// data: [],
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
["MO000680", "2020*510门扇 040201001", "1000", "997", "3", "99.70%"],
|
|
|
|
['MO000680', '2020*510门扇 040201001', '1000', '997', '3', '99.70%'],
|
|
|
|
["MO000681", "2020*560门扇 040201015", "1023", "989", "34", "96.68%"],
|
|
|
|
['MO000681', '2020*560门扇 040201015', '1023', '989', '34', '96.68%'],
|
|
|
|
[
|
|
|
|
['MO000682', '2020*750门扇 040201051', '1653', '1546', '107', '93.53%'],
|
|
|
|
"MO000682",
|
|
|
|
['MO000683', 'L100延长套', '1245', '1103', '142', '88.59%'],
|
|
|
|
"2020*750门扇 040201051",
|
|
|
|
['MO000684', 'C120门套 040201084', '2341', '2340', '1', '99.96%'],
|
|
|
|
"1653",
|
|
|
|
['MO000685', 'B100横头 040201093', '2213', '2209', '4', '99.82%'],
|
|
|
|
"1546",
|
|
|
|
['MO000686', '2030*650移门 040201101', '678', '619', '59', '91.30%'],
|
|
|
|
"107",
|
|
|
|
['MO000687', '2020*600 窄玻璃门 040201111', '1908', '1708', '200', '89.52%'],
|
|
|
|
"93.53%",
|
|
|
|
['MO000680', '2020*510门扇 040201001', '1000', '997', '3', '99.70%'],
|
|
|
|
],
|
|
|
|
['MO000681', '2020*560门扇 040201015', '1023', '989', '34', '96.68%'],
|
|
|
|
["MO000683", "L100延长套", "1245", "1103", "142", "88.59%"],
|
|
|
|
['MO000682', '2020*750门扇 040201051', '1653', '1546', '107', '93.53%'],
|
|
|
|
["MO000684", "C120门套 040201084", "2341", "2340", "1", "99.96%"],
|
|
|
|
['MO000683', 'L100延长套', '1245', '1103', '142', '88.59%'],
|
|
|
|
["MO000685", "B100横头 040201093", "2213", "2209", "4", "99.82%"],
|
|
|
|
['MO000684', 'C120门套 040201084', '2341', '2340', '1', '99.96%'],
|
|
|
|
["MO000686", "2030*650移门 040201101", "678", "619", "59", "91.30%"],
|
|
|
|
['MO000685', 'B100横头 040201093', '2213', '2209', '4', '99.82%'],
|
|
|
|
[
|
|
|
|
['MO000686', '2030*650移门 040201101', '678', '619', '59', '91.30%'],
|
|
|
|
"MO000687",
|
|
|
|
['MO000687', '2020*600 窄玻璃门 040201111', '1908', '1708', '200', '89.52%']
|
|
|
|
"2020*600 窄玻璃门 040201111",
|
|
|
|
|
|
|
|
"1908",
|
|
|
|
|
|
|
|
"1708",
|
|
|
|
|
|
|
|
"200",
|
|
|
|
|
|
|
|
"89.52%",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
["MO000680", "2020*510门扇 040201001", "1000", "997", "3", "99.70%"],
|
|
|
|
|
|
|
|
["MO000681", "2020*560门扇 040201015", "1023", "989", "34", "96.68%"],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"MO000682",
|
|
|
|
|
|
|
|
"2020*750门扇 040201051",
|
|
|
|
|
|
|
|
"1653",
|
|
|
|
|
|
|
|
"1546",
|
|
|
|
|
|
|
|
"107",
|
|
|
|
|
|
|
|
"93.53%",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
["MO000683", "L100延长套", "1245", "1103", "142", "88.59%"],
|
|
|
|
|
|
|
|
["MO000684", "C120门套 040201084", "2341", "2340", "1", "99.96%"],
|
|
|
|
|
|
|
|
["MO000685", "B100横头 040201093", "2213", "2209", "4", "99.82%"],
|
|
|
|
|
|
|
|
["MO000686", "2030*650移门 040201101", "678", "619", "59", "91.30%"],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"MO000687",
|
|
|
|
|
|
|
|
"2020*600 窄玻璃门 040201111",
|
|
|
|
|
|
|
|
"1908",
|
|
|
|
|
|
|
|
"1708",
|
|
|
|
|
|
|
|
"200",
|
|
|
|
|
|
|
|
"89.52%",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
rowNum: 8, // 表格行数
|
|
|
|
rowNum: 8, // 表格行数
|
|
|
|
align: ["center"],
|
|
|
|
align: ['center'],
|
|
|
|
headerHeight: 35,
|
|
|
|
headerHeight: 35,
|
|
|
|
headerBGC: "#0f1325", // 表头
|
|
|
|
headerBGC: '#0f1325', // 表头
|
|
|
|
oddRowBGC: "#0f1325", // 奇数行
|
|
|
|
oddRowBGC: '#0f1325', // 奇数行
|
|
|
|
evenRowBGC: "#171c33", // 偶数行
|
|
|
|
evenRowBGC: '#171c33', // 偶数行
|
|
|
|
|
|
|
|
|
|
|
|
// index: true,
|
|
|
|
// index: true,
|
|
|
|
columnWidth: [130, 250, 120, 120, 120, 120], // 表的宽度
|
|
|
|
columnWidth: [130, 250, 120, 120, 120, 120], // 表的宽度
|
|
|
|
align: ["center"],
|
|
|
|
align: ['center']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
moDetailShow: false,
|
|
|
|
moDetailShow: false,
|
|
|
|
moKey: null,
|
|
|
|
moKey: null,
|
|
|
|
moInfo: {},
|
|
|
|
moInfo: {}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.setData();
|
|
|
|
this.setData()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.setData();
|
|
|
|
this.setData()
|
|
|
|
this.startInterval();
|
|
|
|
this.startInterval()
|
|
|
|
|
|
|
|
this.startInterval1()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 点击事件
|
|
|
|
// 点击事件
|
|
|
@ -157,91 +77,74 @@ export default {
|
|
|
|
// this.moDetailShow = true;
|
|
|
|
// this.moDetailShow = true;
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// 开启定时器
|
|
|
|
// 开启定时器
|
|
|
|
|
|
|
|
startInterval1() {
|
|
|
|
|
|
|
|
const timer = 1000 * 60 * 10 // 10分钟的时间,单位是毫秒;
|
|
|
|
|
|
|
|
if (this.intervalId1 !== null) {
|
|
|
|
|
|
|
|
clearInterval(this.intervalId1) // 修正这里,应该是 this.intervalId1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.intervalId1 = setInterval(() => {
|
|
|
|
|
|
|
|
location.reload()
|
|
|
|
|
|
|
|
}, timer)
|
|
|
|
|
|
|
|
},
|
|
|
|
startInterval() {
|
|
|
|
startInterval() {
|
|
|
|
const _this = this;
|
|
|
|
const _this = this
|
|
|
|
const time = 1000 * 60 * 60 * 2;
|
|
|
|
const time = 1000 * 10
|
|
|
|
if (this.intervalId !== null) {
|
|
|
|
if (this.intervalId !== null) {
|
|
|
|
clearInterval(this.intervalId);
|
|
|
|
clearInterval(this.intervalId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.intervalId = setInterval(() => {
|
|
|
|
this.intervalId = setInterval(() => {
|
|
|
|
_this.setData();
|
|
|
|
_this.setData()
|
|
|
|
}, time);
|
|
|
|
}, time)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setData() {
|
|
|
|
setData() {
|
|
|
|
const _this = this;
|
|
|
|
const _this = this
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
// 获取生产工单
|
|
|
|
// 获取生产工单
|
|
|
|
url: "/admin-api/biz/screen/all",
|
|
|
|
url: '/admin-api/biz/screen/all',
|
|
|
|
method: "get",
|
|
|
|
method: 'get'
|
|
|
|
}).then((r) => {
|
|
|
|
}).then((r) => {
|
|
|
|
// 先删除旧数据
|
|
|
|
// // 先删除旧数据
|
|
|
|
localStorage.removeItem("myStoredArray");
|
|
|
|
// localStorage.removeItem("myStoredArray");
|
|
|
|
var dataArray = JSON.stringify(r.data);
|
|
|
|
// var dataArray = JSON.stringify(r.data);
|
|
|
|
localStorage.setItem("myStoredArray", dataArray);
|
|
|
|
// localStorage.setItem("myStoredArray", dataArray);
|
|
|
|
|
|
|
|
// 获取本地存储的旧数据
|
|
|
|
|
|
|
|
var oldData = localStorage.getItem('myStoredArray')
|
|
|
|
|
|
|
|
if (oldData) {
|
|
|
|
|
|
|
|
oldData = JSON.parse(oldData)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
oldData = null
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 获取新数据
|
|
|
|
|
|
|
|
var newData = r.data
|
|
|
|
|
|
|
|
// 比较新数据和旧数据
|
|
|
|
|
|
|
|
if (!_.isEqual(newData, oldData)) {
|
|
|
|
|
|
|
|
// 使用lodash库的isEqual方法进行深度比较
|
|
|
|
|
|
|
|
// 新数据与旧数据不同,删除旧数据并存储新数据
|
|
|
|
|
|
|
|
localStorage.removeItem('myStoredArray')
|
|
|
|
|
|
|
|
var dataArray = JSON.stringify(newData)
|
|
|
|
|
|
|
|
localStorage.setItem('myStoredArray', dataArray)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 新数据与旧数据相同,无需更新
|
|
|
|
|
|
|
|
// console.log('新数据与旧数据相同,无需更新.')
|
|
|
|
|
|
|
|
}
|
|
|
|
r.data.filter((item) => {
|
|
|
|
r.data.filter((item) => {
|
|
|
|
if (item.type == "ProductionStateList") {
|
|
|
|
if (item.type == 'ProductionStateList') {
|
|
|
|
if (item.openMock == 1) {
|
|
|
|
if (item.openMock == 1) {
|
|
|
|
var datalist = JSON.parse(item.mockData);
|
|
|
|
var datalist = JSON.parse(item.mockData)
|
|
|
|
this.config.data = datalist;
|
|
|
|
this.config.data = datalist
|
|
|
|
this.config = { ...this.config };
|
|
|
|
this.config = { ...this.config }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var datalist = JSON.parse(item.data);
|
|
|
|
var datalist = JSON.parse(item.data)
|
|
|
|
this.config.data = datalist;
|
|
|
|
this.config.data = datalist
|
|
|
|
this.config = { ...this.config };
|
|
|
|
this.config = { ...this.config }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// if (r) {
|
|
|
|
|
|
|
|
// const newArr = r.data.map(function (item) {
|
|
|
|
|
|
|
|
// var ret = [];
|
|
|
|
|
|
|
|
// ret.push(
|
|
|
|
|
|
|
|
// item.FBILL_NO,
|
|
|
|
|
|
|
|
// item.FMATERIAL_NAME,
|
|
|
|
|
|
|
|
// item.FQTY_SHOW,
|
|
|
|
|
|
|
|
// item.FREPQUAAUX_QTY_SHOW,
|
|
|
|
|
|
|
|
// item.FREPFAILAUX_QTY_SHOW,
|
|
|
|
|
|
|
|
// (item.COMPLETE_RATE =
|
|
|
|
|
|
|
|
// (item.COMPLETE_RATE * 100).toFixed(1) + "%"),
|
|
|
|
|
|
|
|
// item.FENTRY_ID
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// return ret;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// _this.config = {
|
|
|
|
|
|
|
|
// header: [
|
|
|
|
|
|
|
|
// "生产工单",
|
|
|
|
|
|
|
|
// "产品名称",
|
|
|
|
|
|
|
|
// "计划数量",
|
|
|
|
|
|
|
|
// "合格数量",
|
|
|
|
|
|
|
|
// "不合格数量",
|
|
|
|
|
|
|
|
// "生产进度(%)",
|
|
|
|
|
|
|
|
// "11",
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// data: newArr,
|
|
|
|
|
|
|
|
// rowNum: 8, // 表格行数
|
|
|
|
|
|
|
|
// headerHeight: 35,
|
|
|
|
|
|
|
|
// headerBGC: "#0f1325", // 表头
|
|
|
|
|
|
|
|
// oddRowBGC: "#0f1325", // 奇数行
|
|
|
|
|
|
|
|
// evenRowBGC: "#171c33", // 偶数行
|
|
|
|
|
|
|
|
// columnWidth: [110, 380, 100, 90, 100, 110, 0], // 表的宽度
|
|
|
|
|
|
|
|
// align: ["left", "left", "right", "right", "right", "right"], // 显示方式
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// getmoDetailInfo() {
|
|
|
|
|
|
|
|
// const _this = this;
|
|
|
|
|
|
|
|
// // request({
|
|
|
|
|
|
|
|
// // // 获取生产工单详细
|
|
|
|
|
|
|
|
// // url: '/api/BigScreen/getPlanOrderDetail?fentryId=' + this.moKey,
|
|
|
|
|
|
|
|
// // method: 'get'
|
|
|
|
|
|
|
|
// // }).then((r) => {
|
|
|
|
|
|
|
|
// // // debugger
|
|
|
|
|
|
|
|
// // _this.moInfo = r.data
|
|
|
|
|
|
|
|
// // })
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|