Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
89018c5e59
|
|
@ -6,7 +6,7 @@ NODE_ENV = development
|
||||||
VUE_APP_TITLE = '托克逊能源管理平台'
|
VUE_APP_TITLE = '托克逊能源管理平台'
|
||||||
# VUE_APP_TITLE = '中建材光子科技有限公司'
|
# VUE_APP_TITLE = '中建材光子科技有限公司'
|
||||||
# VUE_APP_TITLE = '超低排放系统'
|
# VUE_APP_TITLE = '超低排放系统'
|
||||||
VUE_APP_PJ = 'pf'
|
VUE_APP_PJ = ''
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||||
|
|
@ -16,14 +16,17 @@ VUE_APP_PJ = 'pf'
|
||||||
# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||||
|
|
||||||
#测试环境
|
#测试环境
|
||||||
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
# VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||||
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||||
VUE_APP_BASEURL = http://49.232.14.174:2226
|
|
||||||
|
VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||||
|
|
||||||
|
# VUE_APP_BASEURL = http://10.50.211.228:2250
|
||||||
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
||||||
|
|
||||||
# #光子
|
# #光子
|
||||||
# VUE_APP_API_BASEURL = http://49.232.14.174:2250/api
|
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||||
# VUE_APP_BASEURL = http://49.232.14.174:2250
|
VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||||
|
|
||||||
# 本地端口
|
# 本地端口
|
||||||
VUE_APP_PORT = 2800
|
VUE_APP_PORT = 2800
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
"babylonjs-gui": "^6.46.0",
|
"babylonjs-gui": "^6.46.0",
|
||||||
"babylonjs-loaders": "^6.46.0",
|
"babylonjs-loaders": "^6.46.0",
|
||||||
"cesium": "1.75",
|
"cesium": "1.75",
|
||||||
"codemirror": "5.65.5",
|
"codemirror": "^5.65.17",
|
||||||
|
"codemirror-editor-vue3": "^2.7.0",
|
||||||
"core-js": "3.29.0",
|
"core-js": "3.29.0",
|
||||||
"cropperjs": "1.5.13",
|
"cropperjs": "1.5.13",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
|
|
|
||||||
13
src/App.vue
13
src/App.vue
|
|
@ -301,5 +301,18 @@ export default {
|
||||||
width: 9vh !important;
|
width: 9vh !important;
|
||||||
height: 9vh !important;
|
height: 9vh !important;
|
||||||
}
|
}
|
||||||
|
#progressbwlq .el-progress-bar__innerText{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
left: 50%;
|
||||||
|
color: #cccccc;
|
||||||
|
}
|
||||||
|
.el-select-dropdown__item{
|
||||||
|
height:auto!important;
|
||||||
|
}
|
||||||
|
.el-select-dropdown__item div{
|
||||||
|
margin-left:15px!important;
|
||||||
|
}
|
||||||
//排放系统
|
//排放系统
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,64 @@ import http from "@/utils/request"
|
||||||
/*EM接口*/
|
/*EM接口*/
|
||||||
export default {
|
export default {
|
||||||
// 测点
|
// 测点
|
||||||
|
xscript: {
|
||||||
|
list: {
|
||||||
|
name: "脚本",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/enm/xscript/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
name: "获取详情",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/enm/xscript/${id}/`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/enm/xscript/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/enm/xscript/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/enm/xscript/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggle: {
|
||||||
|
name: "启用/禁用",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/enm/xscript/${id}/toggle/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
change_data: {
|
||||||
|
name: "变更数据",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/enm/xscript/${id}/change_data/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mpoint: {
|
mpoint: {
|
||||||
mplog: {
|
mplog: {
|
||||||
name: "测点原始记录",
|
name: "测点原始记录",
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,64 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mtaskbAdd: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function(id,data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/pm/mtask/${id}/add_mtaskb/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mtaskb:{
|
||||||
|
list: {
|
||||||
|
name: "生产任务列表",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/pm/mtaskb/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/pm/mtaskb/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cquery: {
|
||||||
|
name: "复杂查询",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/pm/mtaskb/cquery/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
name: "获取详情",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/pm/mtaskb/${id}/`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/pm/mtaskb/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function(id){
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/pm/mtaskb/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
// 生产大任务
|
// 生产大任务
|
||||||
utask: {
|
utask: {
|
||||||
list: {
|
list: {
|
||||||
|
|
|
||||||
|
|
@ -126,9 +126,53 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fmlog: {
|
||||||
|
list: {
|
||||||
|
name: "列表",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.get(`${config.API_URL}/wpm/fmlog/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
name: "获取详情",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.get(`${config.API_URL}/wpm/fmlog/${id}/`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cquery: {
|
||||||
|
name: "复杂查询",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/wpm/fmlog/cquery/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/wpm/fmlog/${id}/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(`${config.API_URL}/wpm/fmlog/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(`${config.API_URL}/wpm/fmlog/${id}/`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mlog: {
|
mlog: {
|
||||||
list: {
|
list: {
|
||||||
name: "值班记录列表",
|
name: "列表",
|
||||||
req: async function (data) {
|
req: async function (data) {
|
||||||
return await http.get(`${config.API_URL}/wpm/mlog/`, data);
|
return await http.get(`${config.API_URL}/wpm/mlog/`, data);
|
||||||
},
|
},
|
||||||
|
|
@ -373,4 +417,18 @@ export default {
|
||||||
return await http.post("http://localhost:8080/prints/", data);
|
return await http.post("http://localhost:8080/prints/", data);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ana:{
|
||||||
|
equipLastMlog:{
|
||||||
|
name: "设备状态列表",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(`${config.API_URL}/wpm/ana/equip_last_mlog/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
put_prod:{
|
||||||
|
name: "统计值",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(`${config.API_URL}/wpm/ana/put_prod/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M12.428 2c-1.114 0-2.129.6-4.157 1.802l-.686.406C5.555 5.41 4.542 6.011 3.985 7c-.557.99-.557 2.19-.557 4.594v.812c0 2.403 0 3.605.557 4.594s1.57 1.59 3.6 2.791l.686.407C10.299 21.399 11.314 22 12.428 22s2.128-.6 4.157-1.802l.686-.407c2.028-1.2 3.043-1.802 3.6-2.791c.557-.99.557-2.19.557-4.594v-.812c0-2.403 0-3.605-.557-4.594s-1.572-1.59-3.6-2.792l-.686-.406C14.555 2.601 13.542 2 12.428 2m-3.75 10a3.75 3.75 0 1 1 7.5 0a3.75 3.75 0 0 1-7.5 0" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</template>
|
||||||
|
|
@ -23,4 +23,5 @@ export { default as Xiaoshou } from './Xiaoshou.vue'
|
||||||
export { default as Zhixing } from './Zhixing.vue'
|
export { default as Zhixing } from './Zhixing.vue'
|
||||||
export { default as Zhizao } from './Zhizao.vue'
|
export { default as Zhizao } from './Zhizao.vue'
|
||||||
export { default as Env } from './Env.vue'
|
export { default as Env } from './Env.vue'
|
||||||
export { default as Elec } from './Elec.vue'
|
export { default as Elec } from './Elec.vue'
|
||||||
|
export { default as Jcpz } from './Jcpz.vue'
|
||||||
|
|
@ -304,8 +304,9 @@ export default {
|
||||||
this.visible = this.modelValue;
|
this.visible = this.modelValue;
|
||||||
this.option.legend.data.push(that.cate);
|
this.option.legend.data.push(that.cate);
|
||||||
this.option.series[0].name = that.cate;
|
this.option.series[0].name = that.cate;
|
||||||
|
console.log(that.mgroup)
|
||||||
if (that.mgroup) {
|
if (that.mgroup) {
|
||||||
if (that.cate == "总产量(t)") {
|
if (that.cate == "总产量(t)"|| that.cate =="熟料(t)" ||that.cate == "出厂水泥合计(t)") {
|
||||||
that.cateName = "total_production";
|
that.cateName = "total_production";
|
||||||
} else if (
|
} else if (
|
||||||
that.cate == "单位产品分布电耗(KW·h/t)" ||
|
that.cate == "单位产品分布电耗(KW·h/t)" ||
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ const routes = [
|
||||||
name: "slag_power",
|
name: "slag_power",
|
||||||
path: "/enm_slag/power",
|
path: "/enm_slag/power",
|
||||||
meta: {
|
meta: {
|
||||||
title: "单位产品电耗",
|
title: "主要设备单耗",
|
||||||
// icon: "el-icon-odometer",
|
// icon: "el-icon-odometer",
|
||||||
perms: ["enm_slag"],
|
perms: ["enm_slag"],
|
||||||
},
|
},
|
||||||
|
|
@ -370,7 +370,7 @@ const routes = [
|
||||||
name: "power",
|
name: "power",
|
||||||
path: "/enm_rm/power",
|
path: "/enm_rm/power",
|
||||||
meta: {
|
meta: {
|
||||||
title: "单位产品电耗",
|
title: "主要设备单耗",
|
||||||
// icon: "el-icon-odometer",
|
// icon: "el-icon-odometer",
|
||||||
perms: ["enm_rm"],
|
perms: ["enm_rm"],
|
||||||
},
|
},
|
||||||
|
|
@ -496,7 +496,7 @@ const routes = [
|
||||||
name: "coal_power",
|
name: "coal_power",
|
||||||
path: "/enm_coal/power",
|
path: "/enm_coal/power",
|
||||||
meta: {
|
meta: {
|
||||||
title: "单位产品电耗",
|
title: "主要设备单耗",
|
||||||
// icon: "el-icon-odometer",
|
// icon: "el-icon-odometer",
|
||||||
perms: ["enm_coal"],
|
perms: ["enm_coal"],
|
||||||
},
|
},
|
||||||
|
|
@ -622,7 +622,7 @@ const routes = [
|
||||||
name: "kiln_power",
|
name: "kiln_power",
|
||||||
path: "/enm_kiln/power",
|
path: "/enm_kiln/power",
|
||||||
meta: {
|
meta: {
|
||||||
title: "单位产品电耗",
|
title: "主要设备单耗",
|
||||||
// icon: "el-icon-odometer",
|
// icon: "el-icon-odometer",
|
||||||
perms: ["enm_kiln"],
|
perms: ["enm_kiln"],
|
||||||
},
|
},
|
||||||
|
|
@ -811,7 +811,7 @@ const routes = [
|
||||||
name: "mill_power",
|
name: "mill_power",
|
||||||
path: "/enm_mill/power",
|
path: "/enm_mill/power",
|
||||||
meta: {
|
meta: {
|
||||||
title: "单位产品电耗",
|
title: "主要设备单耗",
|
||||||
// icon: "el-icon-odometer",
|
// icon: "el-icon-odometer",
|
||||||
perms: ["enm_mill"],
|
perms: ["enm_mill"],
|
||||||
},
|
},
|
||||||
|
|
@ -930,7 +930,7 @@ const routes = [
|
||||||
name: "enm_energy",
|
name: "enm_energy",
|
||||||
path: "/enm_energy",
|
path: "/enm_energy",
|
||||||
meta: {
|
meta: {
|
||||||
title: "电量报表",
|
title: "能源消耗报表",
|
||||||
icon: "sc-icon-elec",
|
icon: "sc-icon-elec",
|
||||||
type: "menu",
|
type: "menu",
|
||||||
perms: ["enm_energy"],
|
perms: ["enm_energy"],
|
||||||
|
|
@ -1000,7 +1000,7 @@ const routes = [
|
||||||
name: "hourBase",
|
name: "hourBase",
|
||||||
path: "/enm_energy/hourBase",
|
path: "/enm_energy/hourBase",
|
||||||
meta: {
|
meta: {
|
||||||
title: "电量消耗小时报表",
|
title: "电量消耗逐时报表",
|
||||||
// icon: "el-icon-grid",
|
// icon: "el-icon-grid",
|
||||||
perms: ["hour_base"],
|
perms: ["hour_base"],
|
||||||
},
|
},
|
||||||
|
|
@ -1088,6 +1088,15 @@ const routes = [
|
||||||
perms: ["enm_report"],
|
perms: ["enm_report"],
|
||||||
},
|
},
|
||||||
component: "enm_report/reportMonth",
|
component: "enm_report/reportMonth",
|
||||||
|
},{
|
||||||
|
name: "exception",
|
||||||
|
path: "/enm_report/exception",
|
||||||
|
meta: {
|
||||||
|
title: "异常动态表",
|
||||||
|
// icon: "el-icon-grid",
|
||||||
|
perms: ["enm_report"],
|
||||||
|
},
|
||||||
|
component: "enm_report/exception",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -1696,68 +1705,6 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "inm/warehouse",
|
component: "inm/warehouse",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "good",
|
|
||||||
path: "/inm/good",
|
|
||||||
meta: {
|
|
||||||
title: "成品库",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["good"],
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "good",
|
|
||||||
path: "/inm/good",
|
|
||||||
meta: {
|
|
||||||
title: "成品库",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["good"],
|
|
||||||
},
|
|
||||||
component: "inm/good",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "good_mio",
|
|
||||||
path: "/inm/good_mio",
|
|
||||||
meta: {
|
|
||||||
title: "出入库记录",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["good_mio"],
|
|
||||||
},
|
|
||||||
component: "inm/good_mio",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "halfgood",
|
|
||||||
path: "/inm/halfgood",
|
|
||||||
meta: {
|
|
||||||
title: "半成品库",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["halfgood"],
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: "halfgood",
|
|
||||||
path: "/inm/halfgood",
|
|
||||||
meta: {
|
|
||||||
title: "半成品库",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["halfgood"],
|
|
||||||
},
|
|
||||||
component: "inm/halfgood",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "halfgood_mio",
|
|
||||||
path: "/inm/halfgood_mio",
|
|
||||||
meta: {
|
|
||||||
title: "出入库记录",
|
|
||||||
// icon: "el-icon-cellphone",
|
|
||||||
perms: ["halfgood_mio"],
|
|
||||||
},
|
|
||||||
component: "inm/halfgood_mio",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "mainso",
|
name: "mainso",
|
||||||
path: "/inm/mainso",
|
path: "/inm/mainso",
|
||||||
|
|
@ -1820,6 +1767,77 @@ const routes = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "halfgood",
|
||||||
|
path: "/inm/halfgood",
|
||||||
|
meta: {
|
||||||
|
title: "半成品库",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["halfgood"],
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "halfgood",
|
||||||
|
path: "/inm/halfgood",
|
||||||
|
meta: {
|
||||||
|
title: "半成品库",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["halfgood"],
|
||||||
|
},
|
||||||
|
component: "inm/halfgood",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "halfgood_mio",
|
||||||
|
path: "/inm/halfgood_mio",
|
||||||
|
meta: {
|
||||||
|
title: "出入库记录",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["halfgood_mio"],
|
||||||
|
},
|
||||||
|
component: "inm/halfgood_mio",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "good",
|
||||||
|
path: "/inm/good",
|
||||||
|
meta: {
|
||||||
|
title: "成品库",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["good"],
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: "good",
|
||||||
|
path: "/inm/good",
|
||||||
|
meta: {
|
||||||
|
title: "成品库",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["good"],
|
||||||
|
},
|
||||||
|
component: "inm/good",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "good_mio",
|
||||||
|
path: "/inm/good_mio",
|
||||||
|
meta: {
|
||||||
|
title: "出入库记录",
|
||||||
|
// icon: "el-icon-cellphone",
|
||||||
|
perms: ["good_mio"],
|
||||||
|
},
|
||||||
|
component: "inm/good_mio",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "inmScrap",
|
||||||
|
path: "/inm/inmScrap",
|
||||||
|
meta: {
|
||||||
|
title: "废品库",
|
||||||
|
perms: ["inmScrap"],
|
||||||
|
},
|
||||||
|
component: "inm/inmScrap",
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// "name": "materialbatch",
|
// "name": "materialbatch",
|
||||||
// "path": "/inm/materialbatch",
|
// "path": "/inm/materialbatch",
|
||||||
|
|
@ -1851,6 +1869,24 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "inm/mioitem",
|
component: "inm/mioitem",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "workshop",
|
||||||
|
path: "/inm/workshop",
|
||||||
|
meta: {
|
||||||
|
title: "车间库存",
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
component: "inm/workshop",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "workshop_mio",
|
||||||
|
path: "/inm/workshop_mio",
|
||||||
|
meta: {
|
||||||
|
title: "车间出入库记录",
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
component: "inm/workshop_mio",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
//采购 pum
|
//采购 pum
|
||||||
|
|
@ -2721,7 +2757,7 @@ const routes = [
|
||||||
{
|
{
|
||||||
path: "/fac_cal/mpointstat",
|
path: "/fac_cal/mpointstat",
|
||||||
meta: {
|
meta: {
|
||||||
title: "计算数据",
|
title: "计算结果",
|
||||||
// icon: "el-icon-postcard",
|
// icon: "el-icon-postcard",
|
||||||
type: "menu",
|
type: "menu",
|
||||||
perms: ["mpointstat"],
|
perms: ["mpointstat"],
|
||||||
|
|
@ -2746,7 +2782,7 @@ const routes = [
|
||||||
path: "/enm_base",
|
path: "/enm_base",
|
||||||
meta: {
|
meta: {
|
||||||
title: "基础配置",
|
title: "基础配置",
|
||||||
icon: "el-icon-management",
|
icon: "sc-icon-jcpz",
|
||||||
type: "menu",
|
type: "menu",
|
||||||
perms: ["enm_base"],
|
perms: ["enm_base"],
|
||||||
},
|
},
|
||||||
|
|
@ -3025,7 +3061,7 @@ const routes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: "黑化车间",
|
title: "黑化车间",
|
||||||
icon: "el-icon-trend-charts",
|
icon: "el-icon-trend-charts",
|
||||||
perms: ["bigScreenP_dept10"],
|
perms: ["bigScreenP_dept_hh"],
|
||||||
fullpage: true,
|
fullpage: true,
|
||||||
},
|
},
|
||||||
component: "bigScreen/index_heihuadept.vue",
|
component: "bigScreen/index_heihuadept.vue",
|
||||||
|
|
@ -3267,6 +3303,17 @@ const routes = [
|
||||||
},
|
},
|
||||||
component: "statistics/task_rate_gx.vue",
|
component: "statistics/task_rate_gx.vue",
|
||||||
},
|
},
|
||||||
|
//人员绩效统计——光芯
|
||||||
|
{
|
||||||
|
path: "/work_statistics",
|
||||||
|
name: "work_statistics",
|
||||||
|
meta: {
|
||||||
|
title: "人员生产统计",
|
||||||
|
icon: "el-icon-trend-charts",
|
||||||
|
perms: ["work_statistics"],
|
||||||
|
},
|
||||||
|
component: "statistics/work_statistics.vue",
|
||||||
|
},
|
||||||
//库存统计——光芯
|
//库存统计——光芯
|
||||||
{
|
{
|
||||||
path: "/statistic_inm",
|
path: "/statistic_inm",
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ export default {
|
||||||
// let baseInFo = data[data.current];
|
// let baseInFo = data[data.current];
|
||||||
let base_logo =
|
let base_logo =
|
||||||
this.$TOOL.data.get("BASE_INFO") !== null
|
this.$TOOL.data.get("BASE_INFO") !== null
|
||||||
? this.$TOOL.data.get("BASE_INFO").base.base_logo
|
? this.$TOOL.data.get("BASE_INFO").base.base_logo_i
|
||||||
: "img/logo.png";
|
: "img/logo.png";
|
||||||
// let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
// let base_logo = baseInFo!==null?baseInFo.base.base_logo:'img/logo.png';
|
||||||
return base_logo;
|
return base_logo;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,7 @@
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
<el-main style="padding: 0 20px 20px 20px">
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
<el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode == 'show'" label-width="100px">
|
<el-form ref="dialogForm" :model="form" :rules="rules" :disabled="mode == 'show'" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="责任部门">
|
<el-form-item label="责任部门">
|
||||||
<el-cascader v-model="form.belong_dept" :options="group" :props="groupsProps" clearable
|
<el-cascader v-model="form.belong_dept" :options="group" :props="groupsProps" clearable
|
||||||
|
|
@ -11,7 +11,13 @@
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="所属工段">
|
||||||
|
<el-select v-model="form.mgroup" placeholder="所属工段" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in mgroups" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="设备名称" prop="name">
|
<el-form-item label="设备名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="设备名称" />
|
<el-input v-model="form.name" placeholder="设备名称" />
|
||||||
|
|
@ -22,7 +28,27 @@
|
||||||
<el-input v-model="form.number" placeholder="设备编号" />
|
<el-input v-model="form.number" placeholder="设备编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type == 10">
|
||||||
|
<el-form-item
|
||||||
|
label="表明工段运行的方式"
|
||||||
|
label-width="160"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.indicate_mgroup_running"
|
||||||
|
style="width: 100%"
|
||||||
|
clearable
|
||||||
|
@clear="() => { form.indicate_mgroup_running=null } "
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="e in iMEnum.values"
|
||||||
|
:key="e.key"
|
||||||
|
:value="e.key"
|
||||||
|
:label="e.text"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="规格型号" prop="model">
|
<el-form-item label="规格型号" prop="model">
|
||||||
<el-input v-model="form.model" placeholder="规格型号" />
|
<el-input v-model="form.model" placeholder="规格型号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -35,15 +61,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="设备分类">
|
<el-form-item label="设备分类">
|
||||||
<el-select v-model="form.cate" placeholder="所属大类" clearable style="width: 100%">
|
<el-select v-model="form.cate" placeholder="所属大类" clearable style="width: 100%">
|
||||||
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider/>
|
</el-row>
|
||||||
|
<el-divider v-if="form.type == 50"/>
|
||||||
|
<el-row v-if="form.type == 50">
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="IP地址" prop="ip">
|
<el-form-item label="IP地址" prop="ip">
|
||||||
<el-input v-model="form.ip" placeholder="设备IP地址" />
|
<el-input v-model="form.ip" placeholder="设备IP地址" />
|
||||||
|
|
@ -54,8 +81,6 @@
|
||||||
<el-input v-model="form.port" placeholder="设备端口号" />
|
<el-input v-model="form.port" placeholder="设备端口号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="登录账号" prop="login_name">
|
<el-form-item label="登录账号" prop="login_name">
|
||||||
<el-input v-model="form.login_name" placeholder="设备登录名" />
|
<el-input v-model="form.login_name" placeholder="设备登录名" />
|
||||||
|
|
@ -66,9 +91,9 @@
|
||||||
<el-input v-model="form.login_pwd" placeholder="设备登录密码" />
|
<el-input v-model="form.login_pwd" placeholder="设备登录密码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider/>
|
</el-row>
|
||||||
|
<el-divider/>
|
||||||
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="生产厂">
|
<el-form-item label="生产厂">
|
||||||
<el-input v-model="form.factory" placeholder="生产厂" />
|
<el-input v-model="form.factory" placeholder="生产厂" />
|
||||||
|
|
@ -121,7 +146,70 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="简要技术参数">
|
||||||
|
<el-input type="textarea" :rows="3" v-model="form.parameter" placeholder="技术参数" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input type="textarea" :rows="3" v-model="form.description" placeholder="备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider/>
|
||||||
|
<el-row v-if="form.type==20">
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="仪表类型">
|
||||||
|
<el-input v-model="form.meter_type" placeholder="仪表类型" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="量程范围">
|
||||||
|
<el-input v-model="form.measurement_range" placeholder="量范" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="管理等级">
|
||||||
|
<el-input v-model="form.management_level" placeholder="管理等级" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="精度等级">
|
||||||
|
<el-input v-model="form.accuracy_level" placeholder="精度等级" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="检定周期(月)">
|
||||||
|
<el-input-number v-model="form.cycle" :precision="1" :min="0" controls-position="right"
|
||||||
|
style="width: 100%;" placeholder="检定周期(月)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider v-if="form.type==20"/>
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="技术参数">
|
||||||
|
<el-button @click="addJsonItem" type="primary" size="small">添加</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-for="(item, $index) in parameter_json" :key="item" :gutter="4">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="参数名">
|
||||||
|
<el-input v-model="item.key" placeholder="参数名" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="参数值">
|
||||||
|
<el-input v-model="item.value" placeholder="参数值" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button @click="delJsonItem($index)" type="danger" size="small">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,8 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.formula"
|
v-model="form.formula"
|
||||||
clearable
|
clearable
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
||||||
|
|
@ -246,21 +246,32 @@ export default {
|
||||||
that.$emit("success", that.form, that.mode);
|
that.$emit("success", that.form, that.mode);
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$message.error("操作失败,请稍后重试");
|
||||||
|
console.error("Error creating mgroup:", error);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
res = that.$API.mtm.mgroup.update
|
that.$API.mtm.mgroup.update
|
||||||
.req(that.form.id, that.form)
|
.req(that.form.id, that.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$emit("success", that.form, that.mode);
|
that.$emit("success", that.form, that.mode);
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$message.error("操作失败,请稍后重试");
|
||||||
|
console.error("Error updating mgroup:", error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
this.selectionFilters = filters;
|
this.selectionFilters = filters;
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.cate }}</td>
|
<td class="numCell">{{ item.stlog_.cate }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.reason }}</td>
|
<td class="numCell">{{ item.stlog_.reason }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.measure }}</td>
|
<td class="numCell">{{ item.stlog_.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,9 @@ export default {
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ind = item.hour; //xAxis
|
let ind = item.hour; //xAxis
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
|
|
@ -571,6 +574,9 @@ export default {
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
|
|
@ -613,6 +619,9 @@ export default {
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.month_s - 1;
|
let ind = item.month_s - 1;
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
let options = { ...that.option3 };
|
let options = { ...that.option3 };
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ export default {
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
},
|
},
|
||||||
tableDatas: [],
|
tableDatas: [],
|
||||||
|
goalDatas: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -108,12 +109,11 @@ export default {
|
||||||
params.year = year;
|
params.year = year;
|
||||||
params.mgroup = that.query.mgroup;
|
params.mgroup = that.query.mgroup;
|
||||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
let data = [];
|
// let data = [];
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
data = res[0];
|
this.goalDatas = res[0];
|
||||||
}
|
}
|
||||||
console.log(data);
|
that.getData(this.goalDatas);
|
||||||
that.getData(data);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -127,43 +127,32 @@ export default {
|
||||||
query0.mgroup = that.query.mgroup;
|
query0.mgroup = that.query.mgroup;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
|
compareArr0 = [],
|
||||||
wrapArrs = [];
|
wrapArrs = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
let data0 = res0;
|
||||||
if (data0.length > 0) {
|
if (data0.length > 0) {
|
||||||
data0.forEach((item0) => {
|
data0.forEach((item0) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n0 = item0.month_s;
|
|
||||||
let ind0 = 0;
|
|
||||||
if (team_name0.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (team_name0.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (team_name0.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
console.log(wrapArr0);
|
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
//今年的值
|
//今年的值
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
compareArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
});
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
@ -201,12 +190,12 @@ export default {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = n - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanqi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit>=0
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanqi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[11] = huanqi; //环期值(KW·h/t)上个月的值
|
arr[11] = huanqi; //环期值(KW·h/t)上个月的值
|
||||||
if (huanqi !== "/") {
|
if (huanqi !== "/") {
|
||||||
|
|
@ -215,22 +204,16 @@ export default {
|
||||||
huanqicha = item.celec_consume_unit;
|
huanqicha = item.celec_consume_unit;
|
||||||
}
|
}
|
||||||
arr[12] = huanqicha; //当期与环期差值(KW·h/t)
|
arr[12] = huanqicha; //当期与环期差值(KW·h/t)
|
||||||
arr[13] =
|
// arr[13] =
|
||||||
huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //环比增长率(%)
|
if (arr[11] !=="/" && arr[11]!==0 && arr[11] !==0 && arr[12] !== "undefined"){
|
||||||
if (wrapArr0[n]) {
|
arr[13] = ((arr[11]/arr[12])*100).toFixed(2);
|
||||||
tongqicha =
|
}else{
|
||||||
item.celec_consume_unit -
|
arr[13] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||||
wrapArr0[n].celec_consume_unit;
|
|
||||||
tongqi = tongqicha / tongqi;
|
|
||||||
} else {
|
|
||||||
tongqicha = item.celec_consume_unit;
|
|
||||||
tongqi = 0;
|
|
||||||
}
|
}
|
||||||
arr[14] = tongqi; //同比增长率(%)
|
arr[14] = tongqi; //同比增长率(%)
|
||||||
arr[15] = 0.0; //得分
|
arr[15] = 0.0; //得分
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
console.log(wrapArr);
|
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
@ -239,7 +222,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
this.getData();
|
this.getData(this.goalDatas);
|
||||||
},
|
},
|
||||||
itemClick(type, item) {
|
itemClick(type, item) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
||||||
|
|
@ -88,37 +88,41 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="deptName=='原料车间'">
|
<tr v-if="deptName=='原料车间'">
|
||||||
<th colspan="4">电石渣</th>
|
<th colspan="4">电石渣</th>
|
||||||
<th colspan="6">原料磨</th>
|
<th colspan="4">原料磨</th>
|
||||||
<th rowspan="2">压缩空气(m3)</th>
|
<th rowspan="2">压缩空气(m3)</th>
|
||||||
|
<th rowspan="2">车间用水(t)</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="deptName=='烧成车间'">
|
<tr v-if="deptName=='烧成车间'">
|
||||||
<th colspan="11">回转窑</th>
|
<th colspan="11">回转窑</th>
|
||||||
<th colspan="4">煤磨</th>
|
<th colspan="3">煤磨</th>
|
||||||
<th rowspan="2">压缩空气(m3)</th>
|
<th rowspan="2">压缩空气(m3)</th>
|
||||||
|
<th rowspan="2">车间用水(t)</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="deptName=='水泥车间'">
|
<tr v-if="deptName=='水泥车间'">
|
||||||
<th colspan="5">水泥磨</th>
|
<th colspan="4">水泥磨</th>
|
||||||
<th colspan="4">包装</th>
|
<th colspan="4">包装</th>
|
||||||
<th rowspan="2">压缩空气(m3)</th>
|
<th rowspan="2">压缩空气(m3)</th>
|
||||||
|
<th rowspan="2">车间用水(t)</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>电量(KW.h)</th>
|
<th>电量(KW.h)</th>
|
||||||
<th>电量折标煤(tce)</th>
|
<th>电量折标煤(tce)</th>
|
||||||
<th v-if="deptName=='烧成车间'">煤粉(t)</th>
|
<th v-if="deptName=='烧成车间'">煤粉(t)</th>
|
||||||
<th v-if="deptName=='烧成车间'">煤粉折标煤(tce)</th>
|
<th v-if="deptName=='烧成车间'">煤粉折标煤(tce)</th>
|
||||||
<th v-if="deptName!='原料车间'">水(t)</th>
|
<!-- <th v-if="deptName!='原料车间'">水(t)</th> -->
|
||||||
<th v-if="deptName=='烧成车间'">柴油(t)</th>
|
<th v-if="deptName=='烧成车间'">柴油(t)</th>
|
||||||
<th v-if="deptName=='烧成车间'">柴油折标煤(tce)</th>
|
<th v-if="deptName=='烧成车间'">柴油折标煤(tce)</th>
|
||||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽(t)</th>
|
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽(t)</th>
|
||||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽折标煤(tce)</th>
|
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽折标煤(tce)</th>
|
||||||
<th>产品产量(t)</th>
|
<th>产品产量(t)</th>
|
||||||
<th>单位产品综合能耗(tce/t)</th>
|
<th v-if="deptName=='烧成车间'">单位产品综合能耗(tce/t)</th>
|
||||||
|
<th v-else>单位产品能耗(tce/t)</th>
|
||||||
<th>电量(KW.h)</th>
|
<th>电量(KW.h)</th>
|
||||||
<th>电量折标煤(tce)</th>
|
<th>电量折标煤(tce)</th>
|
||||||
<th v-if="deptName=='原料车间'">水(t)</th>
|
<!-- <th v-if="deptName=='原料车间'">水(t)</th> -->
|
||||||
<th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th>
|
<!-- <th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th> -->
|
||||||
<th>产品产量(t)</th>
|
<th>产品产量(t)</th>
|
||||||
<th>单位产品综合能耗(tce/t)</th>
|
<th>单位产品能耗(tce/t)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||||
|
|
@ -234,27 +238,34 @@
|
||||||
wrapArr[ind][1]=item
|
wrapArr[ind][1]=item
|
||||||
}else if(item.mgroup_name=='原料压缩空气'){
|
}else if(item.mgroup_name=='原料压缩空气'){
|
||||||
wrapArr[ind][2]=item
|
wrapArr[ind][2]=item
|
||||||
|
}else if(item.mgroup_name=='原料车间用水'){
|
||||||
|
wrapArr[ind][3]=item
|
||||||
}
|
}
|
||||||
}else if(that.deptName=='烧成车间'){
|
}else if(that.deptName=='烧成车间'){
|
||||||
if(item.mgroup_name=='回转窑'){
|
if(item.mgroup_name=='回转窑'){
|
||||||
wrapArr[ind][1]=item
|
wrapArr[ind][0]=item
|
||||||
}else if (item.mgroup_name=='烧成压缩空气') {
|
}else if (item.mgroup_name=='烧成压缩空气') {
|
||||||
wrapArr[ind][2]=item
|
wrapArr[ind][2]=item
|
||||||
|
}
|
||||||
|
else if (item.mgroup_name=='烧成车间用水') {
|
||||||
|
wrapArr[ind][3]=item
|
||||||
}else{
|
}else{
|
||||||
wrapArr[ind][0]=item
|
wrapArr[ind][1]=item
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(item.mgroup_name=='水泥磨'){
|
if(item.mgroup_name=='水泥磨'){
|
||||||
wrapArr[ind][1]=item
|
wrapArr[ind][0]=item
|
||||||
}else if(item.mgroup_name=='水泥压缩空气'){
|
}else if(item.mgroup_name=='水泥压缩空气'){
|
||||||
wrapArr[ind][2]=item
|
wrapArr[ind][2]=item
|
||||||
}else{
|
}else if(item.mgroup_name=='水泥车间用水'){
|
||||||
wrapArr[ind][0]=item
|
wrapArr[ind][3]=item
|
||||||
|
}else if(item.mgroup_name=='水泥包装'){
|
||||||
|
wrapArr[ind][1]=item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// debugger;
|
// debugger;
|
||||||
console.log(wrapArr);
|
// console.log(wrapArr);
|
||||||
wrapArr.forEach((item1)=>{
|
wrapArr.forEach((item1)=>{
|
||||||
//item1------一天的数据
|
//item1------一天的数据
|
||||||
if(item1!=undefined){
|
if(item1!=undefined){
|
||||||
|
|
@ -270,16 +281,25 @@
|
||||||
if(that.deptName=='烧成车间'){
|
if(that.deptName=='烧成车间'){
|
||||||
itemArr.push( item1[0].pcoal_consume)//煤粉(t)
|
itemArr.push( item1[0].pcoal_consume)//煤粉(t)
|
||||||
itemArr.push( item1[0].pcoal_coal_consume)//煤粉折标煤(tce)
|
itemArr.push( item1[0].pcoal_coal_consume)//煤粉折标煤(tce)
|
||||||
itemArr.push( item1[0].water_consume)//水(t)
|
// itemArr.push( item1[0].water_consume)//水(t)
|
||||||
itemArr.push( item1[0].pcoal_consume)//柴油(t)
|
// console.log(item1[0].imaterial_data_dict)
|
||||||
itemArr.push( item1[0].pcoal_coal_consume)//柴油折标煤(tce)
|
if (item1[0].imaterial_data_dict.length>0 || item1[0].imaterial_data_dict.柴油){
|
||||||
|
// console.log(item1[0].imaterial_data_dict.柴油.amount_consume)
|
||||||
|
itemArr.push( item1[0].imaterial_data_dict.柴油.amount_consume)//柴油(t)
|
||||||
|
itemArr.push( (item1[0].imaterial_data_dict.柴油.amount_consume*1.4571).toFixed(2))//柴油折标煤(tce)
|
||||||
|
}else{
|
||||||
|
itemArr.push(0)//柴油(t)
|
||||||
|
itemArr.push(0)//柴油折标煤(tce)
|
||||||
|
}
|
||||||
itemArr.push( item1[0].out_steam)//余热锅炉外送蒸汽(t)
|
itemArr.push( item1[0].out_steam)//余热锅炉外送蒸汽(t)
|
||||||
itemArr.push( item1[0].out_steam_coal)//余热锅炉外送蒸汽折标煤(tce)
|
itemArr.push( item1[0].out_steam_coal)//余热锅炉外送蒸汽折标煤(tce)
|
||||||
}else if(that.deptName=='水泥车间'){
|
|
||||||
itemArr.push( item1[0].water_consume)//水
|
|
||||||
}
|
}
|
||||||
itemArr.push( item1[0].total_production) //总产量
|
itemArr.push( item1[0].total_production) //总产量
|
||||||
itemArr.push( item1[0].cen_consume_unit) // 单位产品综合能耗
|
if(item1[1].mgroup_name == '回转窑'){
|
||||||
|
itemArr.push( item1[0].cen_consume_unit)
|
||||||
|
}else{
|
||||||
|
itemArr.push( item1[0].en_consume_unit) // 单位产品综合能耗
|
||||||
|
}
|
||||||
if (item1[1]){
|
if (item1[1]){
|
||||||
itemArr.push( item1[1].elec_consume)
|
itemArr.push( item1[1].elec_consume)
|
||||||
itemArr.push( item1[1].elec_coal_consume)
|
itemArr.push( item1[1].elec_coal_consume)
|
||||||
|
|
@ -287,17 +307,22 @@
|
||||||
itemArr.push( 0)
|
itemArr.push( 0)
|
||||||
itemArr.push( 0)
|
itemArr.push( 0)
|
||||||
}
|
}
|
||||||
if(that.deptName=='原料车间'){
|
// if(that.deptName=='原料车间'){
|
||||||
itemArr.push( item1[1].water_consume)//水
|
// // itemArr.push( item1[1].water_consume)//水
|
||||||
itemArr.push( item1[1].kiln_end_heat)//窑尾余热
|
// // itemArr.push( item1[1].kiln_end_heat)//窑尾余热
|
||||||
}
|
// }
|
||||||
itemArr.push( item1[1].total_production)
|
itemArr.push( item1[1].total_production)
|
||||||
itemArr.push( item1[1].cen_consume_unit)
|
itemArr.push( item1[1].en_consume_unit)
|
||||||
if(item1 &&item1[2]){
|
if(item1 &&item1[2]){
|
||||||
itemArr.push(item1[2].cair_consume)//压缩空气
|
itemArr.push(item1[2].cair_consume)//压缩空气
|
||||||
}else{
|
}else{
|
||||||
itemArr.push( 0)
|
itemArr.push( 0)
|
||||||
}
|
}
|
||||||
|
if(item1 &&item1[3]){
|
||||||
|
itemArr.push(item1[3].water_consume)//水
|
||||||
|
}else{
|
||||||
|
itemArr.push(0)
|
||||||
|
}
|
||||||
innerArr.push(itemArr)
|
innerArr.push(itemArr)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.run_rate }}
|
{{ reportItem.run_rate }}
|
||||||
</td>
|
</td>
|
||||||
<td class="numCell">停机时长(h)</td>
|
<td class="numCell">停机时长(s)</td>
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.shut_sec }}
|
{{ reportItem.shut_sec }}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,9 @@ export default {
|
||||||
query0.mgroup = that.query.mgroup;
|
query0.mgroup = that.query.mgroup;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
wrapArrs = [];
|
wrapArrs = [],
|
||||||
|
comparEarr = [], //班组对比
|
||||||
|
compareArr0 = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
let data0 = res0;
|
||||||
debugger;
|
debugger;
|
||||||
|
|
@ -168,35 +170,30 @@ export default {
|
||||||
arr0[2] = item0.total_output_unit;
|
arr0[2] = item0.total_output_unit;
|
||||||
arr0[3] = item0.total_output_unit;
|
arr0[3] = item0.total_output_unit;
|
||||||
arr0[4] = item0.run_rate_unit;
|
arr0[4] = item0.run_rate_unit;
|
||||||
if (team_name0.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (team_name0.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (team_name0.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
debugger;
|
|
||||||
console.log(wrapArr0);
|
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
let elecArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
elecArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
elecArr.push(item.team_name);
|
||||||
|
compareArr.push(item.coal_consume_unit);
|
||||||
|
elecArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
comparEarr.push(elecArr);
|
||||||
|
});
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
let ind = 0;
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
@ -245,7 +242,7 @@ export default {
|
||||||
};
|
};
|
||||||
let dq = 0
|
let dq = 0
|
||||||
if (arr[13] !== null && arr[13] !== undefined){
|
if (arr[13] !== null && arr[13] !== undefined){
|
||||||
dq = arr[12] - arr[13]; //当期与目标差值(KW·h/t)
|
dq = (arr[12] - arr[13]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||||
}else{
|
}else{
|
||||||
dq == "/"
|
dq == "/"
|
||||||
};
|
};
|
||||||
|
|
@ -258,21 +255,21 @@ export default {
|
||||||
? wrapArr0[ind_pre].coal_consume_unit
|
? wrapArr0[ind_pre].coal_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = ind - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanbi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].coal_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].coal_consume_unit
|
huanbi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[15] = huanbi; //环期值(KW·h/t)上个月的值
|
arr[15] = huanbi; //环期值(KW·h/t)上个月的值
|
||||||
if(huanbi !=="/"){
|
if(huanbi !=="/"){
|
||||||
arr[16] = arr[12] - huanbi; //当期与环期差值(KW·h/t)
|
arr[16] = (arr[12] - arr[15]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||||
}else{
|
}else{
|
||||||
arr[16] = "/"
|
arr[16] = "/"
|
||||||
};
|
};
|
||||||
if (arr[15] !== "/"&& arr[15]!== 0 && arr[16]!=="/") {
|
if (arr[15] !== "/"&& arr[15]!== 0 && arr[16]!=="/") {
|
||||||
arr[17] = (arr[16] / arr[15]) * 100; //环比增长率(%)
|
arr[17] = ((arr[16] / arr[15]) * 100).toFixed(2); //环比增长率(%)
|
||||||
} else{
|
} else{
|
||||||
arr[17] = "/"
|
arr[17] = "/"
|
||||||
};
|
};
|
||||||
|
|
@ -297,53 +294,52 @@ export default {
|
||||||
? item.高温风机_consume_unit
|
? item.高温风机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[20] =
|
arr[20] =
|
||||||
item.篦冷机一室风机_consume_unit != null
|
item.篦冷机一室风机电机_consume_unit != null
|
||||||
? item.篦冷机一室风机_consume_unit
|
? item.篦冷机一室风机电机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[21] =
|
arr[21] =
|
||||||
item.篦冷机三室风机_consume_unit != null
|
item.篦冷机三室风机电机_consume_unit != null
|
||||||
? item.篦冷机三室风机_consume_unit
|
? item.篦冷机三室风机电机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[22] =
|
arr[22] =
|
||||||
item.篦冷机二室风机_consume_unit != null
|
item.篦冷机二室风机电机_consume_unit != null
|
||||||
? item.篦冷机二室风机_consume_unit
|
? item.篦冷机二室风机电机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[23] =
|
arr[23] =
|
||||||
item.窑头排风机_consume_unit != null
|
item.窑头排风机主电机_consume_unit != null
|
||||||
? item.窑头排风机_consume_unit
|
? item.窑头排风机主电机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[24] = item.elec_consume_unit; //当期值(KW·h/t)
|
arr[24] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||||
// arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
// arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||||
if (item.elec_consume_unit != null &&item.elec_consume_unit !== "/"){
|
if (item.elec_consume_unit != null &&item.elec_consume_unit !== "/"){
|
||||||
arr[26] = arr[24]-arr[25] //当期与目标差值(KW·h/t)
|
arr[26] = (arr[24]-arr[25]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||||
}
|
}
|
||||||
let ind_pre1 = 0,
|
let huanbiec = 0;
|
||||||
huanbi1 = 0;
|
|
||||||
if (item.month_s == 1) {
|
if (item.month_s == 1) {
|
||||||
ind_pre1 = 12;
|
ind_pre1 = 12;
|
||||||
huanbi1 = wrapArr0[ind_pre]
|
huanbiec = wrapArr0[ind_pre]
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre1 = ind - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanbi1 = wrapArr[ind_pre]
|
comparEarr.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanbiec = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[27] = huanbi; //环期值(KW·h/t)上个月的值
|
arr[27] = huanbiec; //环期值(KW·h/t)上个月的值
|
||||||
if(arr[27]!=="/" && huanbi1!=="/"){
|
if(arr[27]!=="/" && huanbiec!=="/"){
|
||||||
arr[28] = arr[24] - huanbi1; //当期与环期差值(KW·h/t)
|
arr[28] = (arr[24] - huanbiec).toFixed(2); //当期与环期差值(KW·h/t)
|
||||||
}else{
|
}else{
|
||||||
arr[28] = "/"
|
arr[28] = "/"
|
||||||
}
|
}
|
||||||
if(arr[28]!=="/" && huanbi1!=="/"){
|
if(arr[28]!=="/" && huanbiec!=="/"&&huanbiec!==0){
|
||||||
arr[29] = (arr[28] / huanbi1) * 100; //环比增长率(%)
|
arr[29] = ((arr[28] / huanbiec) * 100).toFixed(2); //环比增长率(%)
|
||||||
}else{
|
}else{
|
||||||
arr[29] = "/"}; //环比增长率(%)
|
arr[29] = 0}; //环比增长率(%)
|
||||||
arr[30] = item.celec_consume_unit; //同比增长率(%)
|
arr[30] = item.celec_consume_unit; //同比增长率(%)
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -516,11 +516,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate = 0;
|
let lastRate = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff == "/" &&
|
lastDiff !== "/" &&
|
||||||
lastNum !== "/" &&
|
lastNum !== "/" &&
|
||||||
lastNum !== 0
|
lastNum !== 0
|
||||||
) {
|
) {
|
||||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
lastRate = ((lastDiff / arrs[4]) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate = "/";
|
lastRate = "/";
|
||||||
}
|
}
|
||||||
|
|
@ -568,7 +568,7 @@ export default {
|
||||||
: "/";
|
: "/";
|
||||||
}
|
}
|
||||||
if (arrs2[1] !== "/" && lastNum2 !== "/") {
|
if (arrs2[1] !== "/" && lastNum2 !== "/") {
|
||||||
lastDiff2 = arrs2[1] - lastNum2;
|
lastDiff2 = (arrs2[1] - lastNum2).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastDiff2 = "/";
|
lastDiff2 = "/";
|
||||||
}
|
}
|
||||||
|
|
@ -576,11 +576,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate2 = 0;
|
let lastRate2 = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff2 == "/" &&
|
lastDiff2 !== "/" &&
|
||||||
lastNum2 !== "/" &&
|
lastNum2 !== "/" &&
|
||||||
lastNum2 !== 0
|
lastNum2 !== 0
|
||||||
) {
|
) {
|
||||||
lastRate2 = (lastDiff2 / lastNum2) * 100;
|
lastRate2 = ((lastDiff2 / lastNum2) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate2 = "/";
|
lastRate2 = "/";
|
||||||
}
|
}
|
||||||
|
|
@ -637,11 +637,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate3 = 0;
|
let lastRate3 = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff3 == "/" &&
|
lastDiff3 !== "/" &&
|
||||||
lastNum3 !== "/" &&
|
lastNum3 !== "/" &&
|
||||||
lastNum3 !== 0
|
lastNum3 !== 0
|
||||||
) {
|
) {
|
||||||
lastRate3 = (lastDiff3 / lastNum3) * 100;
|
lastRate3 = ((lastDiff3 / lastNum3) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate3 = "/";
|
lastRate3 = "/";
|
||||||
}
|
}
|
||||||
|
|
@ -698,11 +698,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate4 = 0;
|
let lastRate4 = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff4 == "/" &&
|
lastDiff4 !== "/" &&
|
||||||
lastNum4 !== "/" &&
|
lastNum4 !== "/" &&
|
||||||
lastNum4 !== 0
|
lastNum4 !== 0
|
||||||
) {
|
) {
|
||||||
lastRate4 = (lastDiff4 / lastNum4) * 100;
|
lastRate4 = ((lastDiff4 / lastNum4) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate4 = "/";
|
lastRate4 = "/";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.run_rate }}
|
{{ reportItem.run_rate }}
|
||||||
</td>
|
</td>
|
||||||
<td class="numCell">停机时长(h)</td>
|
<td class="numCell">停机时长(s)</td>
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.shut_hour }}
|
{{ reportItem.shut_hour }}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -239,7 +239,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.create_time }}</td>
|
||||||
<td class="numCell">{{ item.cate }}</td>
|
<td class="numCell">{{ item.cate }}</td>
|
||||||
<td class="numCell">{{ item.reason }}</td>
|
<td class="numCell">{{ item.reason }}</td>
|
||||||
<td class="numCell">{{ item.measure }}</td>
|
<td class="numCell">{{ item.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.cate }}</td>
|
<td class="numCell">{{ item.cate }}</td>
|
||||||
<td class="numCell">{{ item.reason }}</td>
|
<td class="numCell">{{ item.reason }}</td>
|
||||||
<td class="numCell">{{ item.measure }}</td>
|
<td class="numCell">{{ item.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.run_rate }}
|
{{ reportItem.run_rate }}
|
||||||
</td>
|
</td>
|
||||||
<td class="numCell">停机时长(h)</td>
|
<td class="numCell">停机时长(s)</td>
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.shut_sec }}
|
{{ reportItem.shut_sec }}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -263,7 +263,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.cate }}</td>
|
<td class="numCell">{{ item.stlog_.cate }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.reason }}</td>
|
<td class="numCell">{{ item.stlog_.reason }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.measure }}</td>
|
<td class="numCell">{{ item.stlog_.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -602,6 +602,9 @@ export default {
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ind = item.hour; //xAxis
|
let ind = item.hour; //xAxis
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
|
|
@ -644,6 +647,9 @@ export default {
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
let options = { ...that.option2 };
|
let options = { ...that.option2 };
|
||||||
|
|
|
||||||
|
|
@ -814,7 +814,6 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
|
||||||
if (val !== null) {
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
|
|
|
||||||
|
|
@ -119,11 +119,21 @@ export default {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
data = res[0];
|
data = res[0];
|
||||||
}
|
}
|
||||||
that.getData(data);
|
that.getGoalData();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getGoalData() {
|
||||||
|
let that = this;
|
||||||
|
let params = {};
|
||||||
|
params.page = 0;
|
||||||
|
params.year = that.query.year_s;
|
||||||
|
params.mgroup = that.query.mgroup;
|
||||||
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
|
that.getData(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
getData(goalData) {
|
getData(goalData) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let query0 = {};
|
let query0 = {};
|
||||||
|
|
@ -133,6 +143,7 @@ export default {
|
||||||
query0.mgroup = that.query.mgroup;
|
query0.mgroup = that.query.mgroup;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
|
compareArr0 = [],
|
||||||
wrapArrs = [];
|
wrapArrs = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = []; //去年的值
|
let data0 = []; //去年的值
|
||||||
|
|
@ -140,38 +151,27 @@ export default {
|
||||||
if (data0.length > 0) {
|
if (data0.length > 0) {
|
||||||
data0.forEach((item0) => {
|
data0.forEach((item0) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n0 = item0.month_s;
|
|
||||||
let ind0 = 0;
|
let ind0 = 0;
|
||||||
let team_name0 = item0.team_name;
|
|
||||||
if (team_name0.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (team_name0.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (team_name0.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
console.log(wrapArr0);
|
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
//今年的值
|
//今年的值
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
compareArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
});
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
let ind = 0;
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
@ -195,8 +195,8 @@ export default {
|
||||||
: "/";
|
: "/";
|
||||||
//设备
|
//设备
|
||||||
arr[9] =
|
arr[9] =
|
||||||
item.循环风机1906_consume_unit != null
|
item.循环风机_consume_unit != null
|
||||||
? item.循环风机1906_consume_unit
|
? item.循环风机_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
arr[10] =
|
arr[10] =
|
||||||
item.系统风机_consume_unit != null
|
item.系统风机_consume_unit != null
|
||||||
|
|
@ -223,12 +223,12 @@ export default {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = n - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanqi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanqi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[14] = huanqi; //环期值(KW·h/t)上个月的值
|
arr[14] = huanqi; //环期值(KW·h/t)上个月的值
|
||||||
if (huanqi !== "/") {
|
if (huanqi !== "/") {
|
||||||
|
|
@ -251,7 +251,7 @@ export default {
|
||||||
|
|
||||||
arr[17] = tongqi; //同比增长率(%):本月-去年本月/去年
|
arr[17] = tongqi; //同比增长率(%):本月-去年本月/去年
|
||||||
arr[18] = 0.0; //同比增长率(%)
|
arr[18] = 0.0; //同比增长率(%)
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
let newArr = [];
|
let newArr = [];
|
||||||
for (let i = 0; i < wrapArr.length; i++) {
|
for (let i = 0; i < wrapArr.length; i++) {
|
||||||
|
|
@ -270,7 +270,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
this.getData();
|
this.getGoalData();
|
||||||
},
|
},
|
||||||
itemClick(type, item) {
|
itemClick(type, item) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
||||||
|
|
@ -50,17 +50,17 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<!-- <div class="right-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
v-auth="'feeset.create'"
|
v-auth="'feeset.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" :params="params" row-key="id">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="#"
|
label="#"
|
||||||
type="index"
|
type="index"
|
||||||
|
|
@ -148,6 +148,9 @@ export default {
|
||||||
fee: "",
|
fee: "",
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
},
|
},
|
||||||
|
params:{
|
||||||
|
mgroup__cate:"section"
|
||||||
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
},
|
},
|
||||||
|
|
@ -163,7 +166,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//获取集合列表
|
//获取集合列表
|
||||||
getMgroup() {
|
getMgroup() {
|
||||||
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
this.$API.mtm.mgroup.list.req({ page: 0, cate:"section"}).then((res) => {
|
||||||
this.options = res;
|
this.options = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,14 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<!-- <div class="right-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="roleAdd"
|
@click="roleAdd"
|
||||||
v-auth="'goal.create'"
|
v-auth="'goal.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
|
|
@ -204,6 +204,7 @@
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="目标种类" prop="goal_cate">
|
<el-form-item label="目标种类" prop="goal_cate">
|
||||||
<el-select
|
<el-select
|
||||||
|
:disabled="type == 'edit'"
|
||||||
v-model="form.goal_cate"
|
v-model="form.goal_cate"
|
||||||
placeholder="目标种类"
|
placeholder="目标种类"
|
||||||
clearable
|
clearable
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,14 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<!-- <div class="right-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
v-auth="'priceset.create'"
|
v-auth="'priceset.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.cate }}</td>
|
<td class="numCell">{{ item.stlog_.cate }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.reason }}</td>
|
<td class="numCell">{{ item.stlog_.reason }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.measure }}</td>
|
<td class="numCell">{{ item.stlog_.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
<sc-dialog v-model="chartShow" draggable title="水泥包装工段">
|
||||||
<div class="searchHead" v-if="type == 'hours'">
|
<div class="searchHead" v-if="type == 'hours'">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.start_time"
|
v-model="query.start_time"
|
||||||
|
|
@ -262,7 +262,7 @@ let toolbox = {
|
||||||
};
|
};
|
||||||
let legend = {
|
let legend = {
|
||||||
top: "2%",
|
top: "2%",
|
||||||
data: ["总产量", "分布电耗"],
|
data: ["熟料", "分布电耗"],
|
||||||
};
|
};
|
||||||
let yAxis = [
|
let yAxis = [
|
||||||
{
|
{
|
||||||
|
|
@ -334,8 +334,7 @@ export default {
|
||||||
["出厂水泥", "P.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||||
["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||||
["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
|
||||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
|
||||||
|
|
@ -343,7 +342,7 @@ export default {
|
||||||
tableName: "生产报告",
|
tableName: "生产报告",
|
||||||
modelValue: true,
|
modelValue: true,
|
||||||
type: "hour_s",
|
type: "hour_s",
|
||||||
title: "水泥磨工段",
|
title: "水包装工段",
|
||||||
cate: "",
|
cate: "",
|
||||||
apiObj: this.$API.enm.enstat,
|
apiObj: this.$API.enm.enstat,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
|
@ -539,7 +538,6 @@ export default {
|
||||||
this.$API.mtm.mgroup.list
|
this.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: "水泥包装" })
|
.req({ page: 0, search: "水泥包装" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("水泥包装", res);
|
|
||||||
that.query.mgroup = res[0].id;
|
that.query.mgroup = res[0].id;
|
||||||
//年
|
//年
|
||||||
let params1 = {};
|
let params1 = {};
|
||||||
|
|
@ -569,7 +567,7 @@ export default {
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][4] = item.val;
|
that.tableDatas[8][4] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
that.tableDatas[9][4] = item.val;
|
that.tableDatas[9][4] = item.elec_consume_unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
|
@ -603,7 +601,7 @@ export default {
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][3] = item.val;
|
that.tableDatas[8][3] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
that.tableDatas[9][3] = item.val;
|
that.tableDatas[9][3] = item.elec_consume_unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -684,7 +682,7 @@ export default {
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][2] = item.val;
|
that.tableDatas[8][2] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
that.tableDatas[9][2] = item.val;
|
that.tableDatas[9][2] = item.elec_consume_unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -746,7 +744,6 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
|
||||||
if (val !== null) {
|
if (val !== null) {
|
||||||
if (this.typeRadio == "month") {
|
if (this.typeRadio == "month") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
|
|
@ -805,7 +802,7 @@ export default {
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
seriesData8[ind] = item.val;
|
seriesData8[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
seriesData9[ind] = item.val;
|
seriesData9[ind] = item.elec_consume_unit;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let options = { ...that.option1 };
|
let options = { ...that.option1 };
|
||||||
|
|
@ -869,7 +866,7 @@ export default {
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
seriesData8[ind] = item.val;
|
seriesData8[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
seriesData9[ind] = item.val;
|
seriesData9[ind] = item.elec_consume_unit;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let options = { ...that.option2 };
|
let options = { ...that.option2 };
|
||||||
|
|
@ -897,6 +894,14 @@ export default {
|
||||||
this.cate = item[1];
|
this.cate = item[1];
|
||||||
this.asynDialog = true;
|
this.asynDialog = true;
|
||||||
},
|
},
|
||||||
|
itemClick1(type, item) {
|
||||||
|
this.chartShow = false;
|
||||||
|
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||||
|
this.myOption = JSON.parse(res.echart_options);
|
||||||
|
debugger;
|
||||||
|
this.chartShow = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
handlePrint() {
|
handlePrint() {
|
||||||
this.$PRINT("#myReport");
|
this.$PRINT("#myReport");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -97,22 +97,29 @@ export default {
|
||||||
this.$API.mtm.mgroup.list
|
this.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: "水泥包装" })
|
.req({ page: 0, search: "水泥包装" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("水泥包装", res);
|
|
||||||
that.query.mgroup = res[0].id;
|
that.query.mgroup = res[0].id;
|
||||||
let params = {};
|
that.getGoalData();
|
||||||
params.page = 0;
|
|
||||||
params.year = year;
|
|
||||||
params.mgroup = that.query.mgroup;
|
|
||||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
|
||||||
let data = [];
|
|
||||||
if (res.length > 0) {
|
|
||||||
data = res[0];
|
|
||||||
}
|
|
||||||
that.getData(data);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getGoalData() {
|
||||||
|
const self = this;
|
||||||
|
let params = {};
|
||||||
|
params.page = 0;
|
||||||
|
params.year = self.query.year_s;
|
||||||
|
params.mgroup = self.query.mgroup;
|
||||||
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
|
// let data = [];
|
||||||
|
// if (res.length > 0) {
|
||||||
|
// self.data = res[1];
|
||||||
|
// console.log("目标数据", self.data);
|
||||||
|
// }
|
||||||
|
self.getData(res[1]);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('获取目标数据失败:', error);
|
||||||
|
});
|
||||||
|
},
|
||||||
getData(goalData) {
|
getData(goalData) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let query0 = {};
|
let query0 = {};
|
||||||
|
|
@ -121,7 +128,7 @@ export default {
|
||||||
query0.year_s = that.query.year_s - 1;
|
query0.year_s = that.query.year_s - 1;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
wrapArrs = [];
|
compareArr0 = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
let data0 = res0;
|
||||||
if (data0.length > 0) {
|
if (data0.length > 0) {
|
||||||
|
|
@ -129,44 +136,39 @@ export default {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n0 = item0.month_s;
|
let n0 = item0.month_s;
|
||||||
let ind0 = 0;
|
let ind0 = 0;
|
||||||
let team_name0 = item0.team_name;
|
|
||||||
if (team_name0.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (team_name0.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (team_name0.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
console.log(wrapArr0);
|
} else {}
|
||||||
} else {
|
|
||||||
}
|
});
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
compareArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
});
|
||||||
|
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
|
let ind = 0;
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
||||||
arr.push(item.team_name);
|
arr.push(item.team_name);
|
||||||
|
|
||||||
arr.push(item.total_production);
|
arr.push(item.total_production);
|
||||||
arr[3] = item.elec_consume_unit; //当期值(KW·h/t)
|
arr[3] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||||
|
|
||||||
let keyVale = "goal_val_" + n;
|
let keyVale = "goal_val_" + n;
|
||||||
arr[4] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
arr[4] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||||
arr[5] = arr[3] - arr[4]; //当期与目标差值(KW·h/t)
|
arr[5] = (arr[3] - arr[4]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||||
let ind_pre = 0,
|
let ind_pre = 0,
|
||||||
huanbi = 0;
|
huanbi = 0;
|
||||||
if (item.month_s == 1) {
|
if (item.month_s == 1) {
|
||||||
|
|
@ -175,25 +177,24 @@ export default {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = ind - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanbi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanbi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[6] = huanbi; //环期值(KW·h/t)上个月的值\
|
arr[6] = huanbi; //环期值(KW·h/t)上个月的值\
|
||||||
let diff = 0;
|
if (arr[6] !== "/"){
|
||||||
if (arr[6] == "/"){
|
arr[7] = (arr[3] - arr[6]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||||
diff == "/";
|
|
||||||
}else{
|
}else{
|
||||||
diff = arr[3] - arr[6]; //当期与环期差值(KW·h/t)
|
arr[7] = "/"; //当期与环期差值(KW·h/t)
|
||||||
}
|
}
|
||||||
arr[7] = diff;
|
// console.log(arr[7], arr[6])
|
||||||
if (arr[7]=="/" || arr[6]=="/" || arr[6]==0){
|
if (arr[7] !=="/" && arr[6] !==0 && arr[7] !== "undefined"){
|
||||||
arr[8] == "/";
|
arr[8] = ((arr[7]/arr[6])*100).toFixed(2);
|
||||||
}else{
|
}else{
|
||||||
arr[8] = (arr[7]/arr[6])*100 //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
arr[8] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||||
}
|
}
|
||||||
let sameRate = 0;
|
let sameRate = 0;
|
||||||
if (
|
if (
|
||||||
|
|
@ -201,7 +202,7 @@ export default {
|
||||||
wrapArr0[ind].elec_consume_unit
|
wrapArr0[ind].elec_consume_unit
|
||||||
) {
|
) {
|
||||||
sameRate =
|
sameRate =
|
||||||
((arrs[1] -
|
((arr[3] -
|
||||||
wrapArr0[ind].elec_consume_unit) /
|
wrapArr0[ind].elec_consume_unit) /
|
||||||
wrapArr0[ind].elec_consume_unit) *
|
wrapArr0[ind].elec_consume_unit) *
|
||||||
100;
|
100;
|
||||||
|
|
@ -210,17 +211,17 @@ export default {
|
||||||
}
|
}
|
||||||
arr[9] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
arr[9] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||||
// arr[10] = item.celec_consume_unit; //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
// arr[10] = item.celec_consume_unit; //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
|
// console.log(wrapArr);
|
||||||
});
|
});
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
this.getData();
|
this.getGoalData();
|
||||||
},
|
},
|
||||||
itemClick(type, item) {
|
itemClick(type, item) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
@ -231,7 +232,6 @@ export default {
|
||||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||||
this.myOption = JSON.parse(res.echart_options);
|
this.myOption = JSON.parse(res.echart_options);
|
||||||
debugger;
|
debugger;
|
||||||
console.log(this.myOption);
|
|
||||||
this.chartShow = true;
|
this.chartShow = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -264,11 +264,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate = 0;
|
let lastRate = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff == "/" &&
|
lastDiff !== "/" &&
|
||||||
lastNum !== "/" &&
|
lastNum !== "/" &&
|
||||||
lastNum !== 0
|
lastNum !== 0
|
||||||
) {
|
) {
|
||||||
lastRate = (lastDiff / lastNum) * 100;
|
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate = "/";
|
lastRate = "/";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<th rowspan="3" v-if="query.type == 0">班次</th>
|
<th rowspan="3" v-if="query.type == 0">班次</th>
|
||||||
<th rowspan="3" v-if="query.type == 0">班组</th>
|
<th rowspan="3" v-if="query.type == 0">班组</th>
|
||||||
<th rowspan="3">实际产量(t)</th>
|
<th rowspan="3">实际产量(t)</th>
|
||||||
<th rowspan="3">总成本(元)</th>
|
<!-- <th rowspan="3">总成本(元)</th> -->
|
||||||
<th rowspan="3">单位成本(元/吨)</th>
|
<th rowspan="3">单位成本(元/吨)</th>
|
||||||
<th :colspan="materialList.length">直接材料</th>
|
<th :colspan="materialList.length">直接材料</th>
|
||||||
<th colspan="2">直接人工</th>
|
<th colspan="2">直接人工</th>
|
||||||
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
mgroupOptions: [],
|
mgroupOptions: [],
|
||||||
tableName: '班组成本计算',
|
tableName: '班组成本计算',
|
||||||
options: [
|
options: [
|
||||||
{ id: 0, name: '班统计' },
|
// { id: 0, name: '班统计' },
|
||||||
{ id: 1, name: '日统计' },
|
{ id: 1, name: '日统计' },
|
||||||
{ id: 2, name: '月统计' },
|
{ id: 2, name: '月统计' },
|
||||||
],
|
],
|
||||||
|
|
@ -174,6 +174,7 @@ export default {
|
||||||
},
|
},
|
||||||
getData() {
|
getData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.tableData1 = [];
|
||||||
that.data1 = 0;
|
that.data1 = 0;
|
||||||
that.data2 = 0;
|
that.data2 = 0;
|
||||||
that.data3 = 0;
|
that.data3 = 0;
|
||||||
|
|
@ -200,27 +201,53 @@ export default {
|
||||||
}
|
}
|
||||||
that.$API.enm.enstat.req(params).then(res => {
|
that.$API.enm.enstat.req(params).then(res => {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
let materials = res[0].imaterial_data;
|
let materials = res[res.length - 1].imaterial_data;
|
||||||
let arr = [];
|
let arr = [];
|
||||||
|
let dataArr = [];
|
||||||
materials.forEach(item => {
|
materials.forEach(item => {
|
||||||
if (item.material_type == 0) {//电水
|
if (item.material_name == "湿电石渣进厂"||item.material_name == "工业水"||item.material_name == "动力电") {
|
||||||
that.data2 = that.data2 + 4;
|
// Skip adding item details to arr for "湿电石渣进厂"
|
||||||
} else if (item.material_type == 30 || item.material_type == 20) {//原材料
|
return;
|
||||||
|
}
|
||||||
|
if (item.material_type == 30 || item.material_type == 20) {//原材料
|
||||||
that.data1 = that.data1 + 4;
|
that.data1 = that.data1 + 4;
|
||||||
} else if (item.material_type == 40) {//辅助材料
|
} else if (item.material_type == 40) {//辅助材料
|
||||||
that.data3 = that.data3 + 4;
|
that.data3 = that.data3 + 4;
|
||||||
}
|
}
|
||||||
arr.push(item.material_name)
|
let materialName = item.material_name
|
||||||
|
if (materialName === "入窑生料") {
|
||||||
|
materialName = "生料";
|
||||||
|
} else if (materialName === "入窑煤粉") {
|
||||||
|
materialName = "原煤";
|
||||||
|
}
|
||||||
|
arr.push(materialName)
|
||||||
arr.push('单价(元/吨)')
|
arr.push('单价(元/吨)')
|
||||||
arr.push('总成本(元)')
|
arr.push('总成本(元)')
|
||||||
arr.push('单位成本(元/吨)')
|
arr.push('单位成本(元/吨)')
|
||||||
})
|
})
|
||||||
|
materials.forEach(item => {
|
||||||
|
if(item.material_name == "动力电"){
|
||||||
|
that.data2 = that.data2 + 4
|
||||||
|
arr.push(item.material_name)
|
||||||
|
arr.push('单价(元/度)')
|
||||||
|
arr.push('总成本(元)')
|
||||||
|
arr.push('单位成本(元/吨)')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
materials.forEach(item => {
|
||||||
|
if(item.material_name == "工业水"){
|
||||||
|
that.data2 = that.data2 + 4
|
||||||
|
arr.push(item.material_name)
|
||||||
|
arr.push('单价(元/吨)')
|
||||||
|
arr.push('总成本(元)')
|
||||||
|
arr.push('单位成本(元/吨)')
|
||||||
|
}
|
||||||
|
})
|
||||||
that.allCol = arr.length + 16
|
that.allCol = arr.length + 16
|
||||||
that.materialList = arr;
|
that.materialList = arr;
|
||||||
let dataArr = [];
|
|
||||||
res.forEach(itemData => {
|
res.forEach(itemData => {
|
||||||
let time = '';
|
let time = '';
|
||||||
dataArr = [];
|
|
||||||
if (that.query.type == 0) {
|
if (that.query.type == 0) {
|
||||||
time = itemData.year_s + '.' + itemData.month_s + '.' + itemData.day_s;
|
time = itemData.year_s + '.' + itemData.month_s + '.' + itemData.day_s;
|
||||||
} else if (that.query.type == 1) {
|
} else if (that.query.type == 1) {
|
||||||
|
|
@ -234,20 +261,42 @@ export default {
|
||||||
dataArr.push(itemData.team_name);
|
dataArr.push(itemData.team_name);
|
||||||
}
|
}
|
||||||
dataArr.push(itemData.total_production);
|
dataArr.push(itemData.total_production);
|
||||||
dataArr.push(itemData.coal_consume_unit);
|
// dataArr.push(itemData.coal_consume_unit);
|
||||||
dataArr.push(itemData.cen_consume_unit);
|
dataArr.push(itemData.production_cost_unit);
|
||||||
let sub1data = itemData.imaterial_data;
|
let sub1data = itemData.imaterial_data;
|
||||||
for (let i = 0; i < sub1data.length; i++) {
|
for (let i = 0; i < sub1data.length; i++) {
|
||||||
dataArr.push(sub1data[i].cost)
|
if (sub1data[i].material_name === '湿电石渣进厂'|| sub1data[i].material_name === '动力电'|| sub1data[i].material_name === '工业水'){
|
||||||
dataArr.push(sub1data[i].price_unit)
|
continue;
|
||||||
dataArr.push(sub1data[i].amount_consume)
|
}
|
||||||
dataArr.push(sub1data[i].cost_unit)
|
dataArr.push((sub1data[i].amount_consume).toFixed(2))
|
||||||
|
dataArr.push((sub1data[i].price_unit).toFixed(2))
|
||||||
|
dataArr.push((sub1data[i].cost).toFixed(2))
|
||||||
|
dataArr.push((sub1data[i].cost_unit).toFixed(2))
|
||||||
|
}
|
||||||
|
for (let i = 0; i < sub1data.length; i++) {
|
||||||
|
if (sub1data[i].material_name == '动力电') {
|
||||||
|
dataArr.push((sub1data[i].amount_consume).toFixed(2));
|
||||||
|
dataArr.push((sub1data[i].price_unit).toFixed(2))
|
||||||
|
dataArr.push((sub1data[i].cost).toFixed(2));
|
||||||
|
dataArr.push((sub1data[i].cost_unit).toFixed(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < sub1data.length; i++) {
|
||||||
|
if (sub1data[i].material_name == '工业水') {
|
||||||
|
dataArr.push((sub1data[i].amount_consume).toFixed(2));
|
||||||
|
dataArr.push((sub1data[i].price_unit).toFixed(2));
|
||||||
|
dataArr.push((sub1data[i].cost).toFixed(2));
|
||||||
|
dataArr.push((sub1data[i].cost_unit).toFixed(2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let otherdata = itemData.other_cost_data;
|
let otherdata = itemData.other_cost_data;
|
||||||
for (let j = 0; j < otherdata.length; j++) {
|
for (let j = 0; j < otherdata.length; j++) {
|
||||||
dataArr.push(otherdata[j].cost_unit)
|
dataArr.push((otherdata[j].cost_unit).toFixed(2))
|
||||||
}
|
}
|
||||||
that.tableData1.push(dataArr)
|
that.tableData1.push(dataArr)
|
||||||
|
dataArr = [];
|
||||||
|
arr = [];
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,224 @@
|
||||||
|
<!-- 成本分析 -->
|
||||||
|
<template>
|
||||||
|
<el-container class="app-container">
|
||||||
|
<el-header>
|
||||||
|
<div>
|
||||||
|
<el-select v-model="query.mgroup" placeholder="工段" clearable @change="mgroupChange" class="headerSearch">
|
||||||
|
<el-option v-for="item in mgroupOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="query.type" placeholder="查询类型" clearable class="headerSearch" @change="typeCange">
|
||||||
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.shift"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
placeholder="班次"
|
||||||
|
class="headerSearch"
|
||||||
|
v-if="query.type == 0"
|
||||||
|
/>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value1"
|
||||||
|
type="datetimerange"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
placeholder="日"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
v-if="query.type == 1"
|
||||||
|
style="width: 300px;"
|
||||||
|
/>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.month"
|
||||||
|
type="month"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
format="YYYY-MM"
|
||||||
|
placeholder="月"
|
||||||
|
v-if="query.type == 2"
|
||||||
|
/>
|
||||||
|
<el-button type="primary" icon="el-icon-search"
|
||||||
|
@click="getTableData">
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="handlePrint">打印
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="stlogTable"
|
||||||
|
:apiObj="apiObjStlog"
|
||||||
|
:query="query"
|
||||||
|
:params="params"
|
||||||
|
row-key="id"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="100" />
|
||||||
|
<el-table-column
|
||||||
|
label="异常类别"
|
||||||
|
prop="duration"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.is_shutdown"
|
||||||
|
>停机</span
|
||||||
|
>
|
||||||
|
<span v-else>其他</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="发生时间"
|
||||||
|
prop="start_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="结束时间"
|
||||||
|
prop="end_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="原因类别"
|
||||||
|
prop="cate"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="异常名称"
|
||||||
|
prop="title"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="事件原因"
|
||||||
|
prop="reason"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="处置措施"
|
||||||
|
prop="measure"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="停机时长"
|
||||||
|
prop="duration"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query: {
|
||||||
|
type: 1,
|
||||||
|
month: '',
|
||||||
|
year: '',
|
||||||
|
mgroup: '',
|
||||||
|
start_time__gt: '',
|
||||||
|
start_time__lt: '',
|
||||||
|
shift: '',
|
||||||
|
},
|
||||||
|
params:{
|
||||||
|
mgroup: "",
|
||||||
|
start_time__gt: '',
|
||||||
|
start_time__lt: '',
|
||||||
|
},
|
||||||
|
value1:[],
|
||||||
|
materialList: [],
|
||||||
|
mgroupOptions: [],
|
||||||
|
tableName: '班组成本计算',
|
||||||
|
options: [
|
||||||
|
// { id: 0, name: '班统计' },
|
||||||
|
{ id: 1, name: '日统计' },
|
||||||
|
{ id: 2, name: '月统计' },
|
||||||
|
],
|
||||||
|
tableNmae: '',
|
||||||
|
tableData1: [],
|
||||||
|
apiObjStlog: null,
|
||||||
|
sourceData: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
var myDate = new Date();
|
||||||
|
let month = myDate.getMonth() + 1;
|
||||||
|
if (month < 10) {
|
||||||
|
month = '0' + month;
|
||||||
|
}
|
||||||
|
this.getShift();
|
||||||
|
this.getMgroup();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取工段列表
|
||||||
|
getMgroup() {
|
||||||
|
this.$API.mtm.mgroup.list.req({ page: 0, cate: 'section' }).then(res => {
|
||||||
|
res.forEach(item => {
|
||||||
|
this.mgroupOptions.push(item);
|
||||||
|
})
|
||||||
|
this.mgroupOptions = this.mgroupOptions.reverse();
|
||||||
|
this.query.mgroup = this.mgroupOptions[0].id;
|
||||||
|
this.params.mgroup = this.mgroupOptions[0].id;
|
||||||
|
this.apiObjStlog = this.$API.wpm.stlog.list;
|
||||||
|
this.tableName = this.mgroupOptions[0].name;
|
||||||
|
this.getTableData();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//班组列表
|
||||||
|
getShift() {
|
||||||
|
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
|
||||||
|
this.optionsShift = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//查询类型
|
||||||
|
// getData() {
|
||||||
|
// let that = this;
|
||||||
|
// that.tableData1 = [];
|
||||||
|
// let params = {};
|
||||||
|
// params.mgroup = that.query.mgroup;
|
||||||
|
// // if (that.query.type == 0) {//班
|
||||||
|
// // arr = that.query.day.split('-');
|
||||||
|
// // params.year_s = Number(arr[0]);
|
||||||
|
// // params.month_s = Number(arr[1]);
|
||||||
|
// // params.day_s = Number(arr[2]);
|
||||||
|
// // params.type = "day_s"
|
||||||
|
// // } else if (that.query.type == 1) {//日
|
||||||
|
// // arr = that.query.month.split('-');
|
||||||
|
// // params.start_time__year = Number(arr[0]);
|
||||||
|
// // params.start_time__month = Number(arr[1]);
|
||||||
|
// // params.start_time__day = Number(arr[2]);
|
||||||
|
// // } else {//月
|
||||||
|
// // params.start_time__year = Number(that.query.year);
|
||||||
|
// // params.start_time__month = Number(that.query.month);
|
||||||
|
// // }
|
||||||
|
// params.start_time__gt = that.query[0];
|
||||||
|
// params.start_time__lt = that.query[1];
|
||||||
|
// this.$API.wpm.stlog.list.req(params).then(res => {
|
||||||
|
// that.apiObjStlog = res;
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
getTableData() {
|
||||||
|
let that = this;
|
||||||
|
let arr = [];
|
||||||
|
if (that.query.type == 1) {
|
||||||
|
this.query.start_time__gt = this.value1[0];
|
||||||
|
this.query.start_time__lt = this.value1[1];}
|
||||||
|
else if (that.query.type == 2) {
|
||||||
|
console.log(this.query.month);
|
||||||
|
arr = that.query.month.split('-');
|
||||||
|
this.query.start_time__year = Number(arr[0]);
|
||||||
|
this.query.start_time__month = Number(arr[1]);
|
||||||
|
}
|
||||||
|
this.$refs.stlogTable.queryData(this.query);
|
||||||
|
},
|
||||||
|
|
||||||
|
handlePrint() {
|
||||||
|
this.$PRINT('#myReport');
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX('#myTable', this.tableName)
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.printContainer {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -204,22 +204,22 @@
|
||||||
that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}];
|
that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}];
|
||||||
that.header2 = ['辅料','干混生料'];//物料
|
that.header2 = ['辅料','干混生料'];//物料
|
||||||
// that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项
|
// that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项
|
||||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||||
}else if(that.deptName=='烧成车间'){
|
}else if(that.deptName=='烧成车间'){
|
||||||
that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}];
|
that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}];
|
||||||
that.header2 = ['入窑生料','熟料'];//物料
|
that.header2 = ['入窑生料','熟料'];//物料
|
||||||
// that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项
|
// that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项
|
||||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||||
}else{
|
}else{
|
||||||
that.header2Obj=[{name:'出磨水泥',lengths:3}];
|
that.header2Obj=[{name:'出磨水泥',lengths:3}];
|
||||||
that.header2 = ['出磨水泥'];//物料
|
that.header2 = ['出磨水泥'];//物料
|
||||||
// that.header3 = ['比表面积','SO3','掺量'];//检测项
|
// that.header3 = ['比表面积','SO3','掺量'];//检测项
|
||||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||||
}
|
}
|
||||||
let params = {page: 0};
|
let params = {page: 0};
|
||||||
let arr = [];
|
let arr = [];
|
||||||
|
|
||||||
if(that.query.type==0){//日
|
if(that.query.type==0){//日
|
||||||
|
console.log(that.query.month)
|
||||||
arr = that.query.month.split('-');
|
arr = that.query.month.split('-');
|
||||||
params.year_s = arr[0];
|
params.year_s = arr[0];
|
||||||
params.month_s = arr[1];
|
params.month_s = arr[1];
|
||||||
|
|
@ -248,6 +248,7 @@
|
||||||
}
|
}
|
||||||
if(that.deptName=='原料车间'){
|
if(that.deptName=='原料车间'){
|
||||||
wrapArr[ind].push(item)
|
wrapArr[ind].push(item)
|
||||||
|
|
||||||
}else if(that.deptName=='烧成车间'){
|
}else if(that.deptName=='烧成车间'){
|
||||||
if(item.mgroup_name=='回转窑'){
|
if(item.mgroup_name=='回转窑'){
|
||||||
wrapArr[ind][1]=item
|
wrapArr[ind][1]=item
|
||||||
|
|
@ -258,7 +259,6 @@
|
||||||
wrapArr[ind].push(item)
|
wrapArr[ind].push(item)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapArr = wrapArr.filter(item=>{
|
wrapArr = wrapArr.filter(item=>{
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
|
|
@ -269,6 +269,7 @@
|
||||||
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
||||||
itemArr.push(time)
|
itemArr.push(time)
|
||||||
//遍历每个工段
|
//遍历每个工段
|
||||||
|
console.log(item1)
|
||||||
item1.forEach(item2=>{
|
item1.forEach(item2=>{
|
||||||
let data2 =item2.qua_data;
|
let data2 =item2.qua_data;
|
||||||
//遍历一个工段的物料检验数据
|
//遍历一个工段的物料检验数据
|
||||||
|
|
@ -285,22 +286,22 @@
|
||||||
header4tem.push('平均值')
|
header4tem.push('平均值')
|
||||||
header4tem.push('检次')
|
header4tem.push('检次')
|
||||||
header4tem.push('合次')
|
header4tem.push('合次')
|
||||||
header4tem.push('及格率')
|
header4tem.push('合格率')
|
||||||
let indexObj = header2tem.indexOf(item3.material_name);
|
let indexObj = header2tem.indexOf(item3.material_name);
|
||||||
if(indexObj>0&&index3==0){
|
if(indexObj>0&&index3==0){
|
||||||
let inde = indexObj-1;
|
let inde = indexObj-1;
|
||||||
let ind =header2Objtem[inde].lengths*4+1;
|
let ind =header2Objtem[inde].lengths*4+1;
|
||||||
itemArr[ind] = item3.val_avg.toFixed(2);
|
itemArr[ind] = (item3.val_avg).toFixed(2);
|
||||||
itemArr.push(item3.num_test)
|
itemArr.push(item3.num_test)
|
||||||
itemArr.push(item3.num_ok)
|
itemArr.push(item3.num_ok)
|
||||||
let pass = (item3.rate_pass).toFixed(2);
|
let pass = (item3.rate_pass).toFixed(2);
|
||||||
pass= pass+'%';
|
pass= pass+'%';
|
||||||
itemArr.push(pass)
|
itemArr.push(pass)
|
||||||
}else{
|
}else{
|
||||||
itemArr.push(item3.val_avg.toFixed(2))
|
itemArr.push(Number(item3.val_avg).toFixed(2));
|
||||||
itemArr.push(item3.num_test)
|
itemArr.push(item3.num_test);
|
||||||
itemArr.push(item3.num_ok)
|
itemArr.push(item3.num_ok)
|
||||||
let pass = (item3.rate_pass).toFixed(2);
|
let pass = Number(item3.rate_pass).toFixed(2);
|
||||||
pass= pass+'%';
|
pass= pass+'%';
|
||||||
itemArr.push(pass)
|
itemArr.push(pass)
|
||||||
}
|
}
|
||||||
|
|
@ -332,7 +333,6 @@
|
||||||
if(header4.length>0){
|
if(header4.length>0){
|
||||||
that.header4 = header4;
|
that.header4 = header4;
|
||||||
}
|
}
|
||||||
console.log(innerArr)
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
innerArr.forEach(item=>{
|
innerArr.forEach(item=>{
|
||||||
if(item.length>1){
|
if(item.length>1){
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@
|
||||||
<td class="numCell" v-if="index==0" rowspan="5">{{item[1]}}</td>
|
<td class="numCell" v-if="index==0" rowspan="5">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==5" rowspan="9">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==5" rowspan="9">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==14" rowspan="14">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==14" rowspan="14">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==28" rowspan="5">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==28" rowspan="4">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==32" rowspan="6">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
||||||
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
||||||
<td class="numCell" v-if="index<39" colspan="3">{{item[3]}}</td>
|
<td class="numCell" v-if="index<39" colspan="3">{{item[3]}}</td>
|
||||||
|
|
@ -129,23 +129,16 @@
|
||||||
[30,'成本','日生料成本(元/吨)'],
|
[30,'成本','日生料成本(元/吨)'],
|
||||||
[31,'成本','日熟料成本(元/吨)'],
|
[31,'成本','日熟料成本(元/吨)'],
|
||||||
[32,'成本','日水泥粉磨成本(元/吨)'],
|
[32,'成本','日水泥粉磨成本(元/吨)'],
|
||||||
[33,'成本','日水泥包装成本(元/吨)'],
|
// [33,'成本','日水泥包装成本(元/吨)'],
|
||||||
|
|
||||||
|
|
||||||
[34,'耗电量','日电石渣耗电量(kw.h)'],
|
[33,'耗电量','日电石渣耗电量(kw.h)'],
|
||||||
[35,'耗电量','日生料耗电量(kw.h)'],
|
[34,'耗电量','日生料耗电量(kw.h)'],
|
||||||
[36,'耗电量','日熟料耗电量(kw.h)'],
|
[35,'耗电量','日熟料耗电量(kw.h)'],
|
||||||
[37,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
[36,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
||||||
[38,'耗电量','日水泥包装耗电量(kw.h)'],
|
[37,'耗电量','日水泥包装耗电量(kw.h)'],
|
||||||
[39,'耗电量','日生活区耗电量(kw.h)'],
|
[38,'耗电量','日生活区耗电量(kw.h)'],
|
||||||
|
|
||||||
|
|
||||||
['生产异常动态','工段','类别','原因','处置措施','处置人'],
|
|
||||||
['生产异常动态','电石渣'],
|
|
||||||
['生产异常动态','原料磨'],
|
|
||||||
['生产异常动态','回转窑'],
|
|
||||||
['生产异常动态','煤磨'],
|
|
||||||
['生产异常动态','水泥磨'],
|
|
||||||
],
|
],
|
||||||
year:'',
|
year:'',
|
||||||
month:'',
|
month:'',
|
||||||
|
|
@ -223,23 +216,23 @@
|
||||||
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
|
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
|
||||||
that.tableDatas[13][3] = dataList.水泥包装.elec_consume_unit;
|
that.tableDatas[13][3] = dataList.水泥包装.elec_consume_unit;
|
||||||
//产量(t)
|
//产量(t)
|
||||||
that.tableDatas[14][3] = dataList.电石渣.production_hour;
|
that.tableDatas[14][3] = dataList.电石渣.total_production;
|
||||||
that.tableDatas[16][3] = dataList.原料磨.production_hour;
|
that.tableDatas[16][3] = dataList.原料磨.total_production;
|
||||||
that.tableDatas[18][3] = dataList.回转窑.production_hour;
|
that.tableDatas[18][3] = dataList.回转窑.total_production;
|
||||||
that.tableDatas[20][3] = dataList.水泥磨.production_hour;
|
that.tableDatas[20][3] = dataList.水泥磨.total_production;
|
||||||
//成本(元/吨)
|
//成本(元/吨)
|
||||||
that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
|
that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
|
||||||
that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
|
that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
|
||||||
that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
|
that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
|
||||||
that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
|
that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
|
||||||
that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
|
// that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
|
||||||
//耗电量(kw.h)
|
//耗电量(kw.h)
|
||||||
that.tableDatas[33][3] = dataList.电石渣.elec_consume;
|
that.tableDatas[32][3] = dataList.电石渣.elec_consume;
|
||||||
that.tableDatas[34][3] = dataList.原料磨.elec_consume;
|
that.tableDatas[33][3] = dataList.原料磨.elec_consume;
|
||||||
that.tableDatas[35][3] = dataList.回转窑.elec_consume;
|
that.tableDatas[34][3] = dataList.回转窑.elec_consume;
|
||||||
that.tableDatas[36][3] = dataList.煤磨.elec_consume;
|
that.tableDatas[35][3] = dataList.煤磨.elec_consume;
|
||||||
that.tableDatas[37][3] = dataList.水泥磨.elec_consume;
|
that.tableDatas[36][3] = dataList.水泥磨.elec_consume;
|
||||||
that.tableDatas[38][3] = dataList.水泥包装.elec_consume;
|
that.tableDatas[37][3] = dataList.水泥包装.elec_consume;
|
||||||
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
|
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
//获取月和年目标
|
//获取月和年目标
|
||||||
|
|
@ -257,10 +250,10 @@
|
||||||
if(this.type=='day'){
|
if(this.type=='day'){
|
||||||
ind = 'goal_val_'+that.month;
|
ind = 'goal_val_'+that.month;
|
||||||
}
|
}
|
||||||
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[ind]!==0&&dataList1.电石渣[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣[ind])*100:'/';
|
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[ind]!==0&&dataList1.电石渣[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[14][3] /dataList1.电石渣[ind])*100).toFixed(2):'/';
|
||||||
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[ind]!==0&&dataList1.原料磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨[ind])*100:'/';
|
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[ind]!==0&&dataList1.原料磨[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[16][3] /dataList1.原料磨[ind])*100).toFixed(2):'/';
|
||||||
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[ind]!==0&&dataList1.回转窑[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑[ind])*100:'/';
|
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[ind]!==0&&dataList1.回转窑[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[18][3] /dataList1.回转窑[ind])*100).toFixed(2):'/';
|
||||||
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[ind]!==0&&dataList1.水泥磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨[ind])*100:'/';
|
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[ind]!==0&&dataList1.水泥磨[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[20][3] /dataList1.水泥磨[ind])*100).toFixed(2):'/';
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
|
|
@ -271,7 +264,7 @@
|
||||||
obj1.day_s = this.day;
|
obj1.day_s = this.day;
|
||||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
that.tableDatas[22][3]=res1[0].clinker_val;
|
that.tableDatas[22][3]=res1[0].bulk_clinker_val;
|
||||||
that.tableDatas[24][3] = res1[0].bulk_cement_val;
|
that.tableDatas[24][3] = res1[0].bulk_cement_val;
|
||||||
that.tableDatas[26][3] = res1[0].bag_cement_val;
|
that.tableDatas[26][3] = res1[0].bag_cement_val;
|
||||||
}
|
}
|
||||||
|
|
@ -283,7 +276,7 @@
|
||||||
obj2.page = 0;
|
obj2.page = 0;
|
||||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
if(res2.length>0){
|
if(res2.length>0){
|
||||||
that.tableDatas[23][3] = res2[0].clinker_val;
|
that.tableDatas[23][3] = res2[0].bulk_clinker_val;
|
||||||
that.tableDatas[25][3] = res2[0].bulk_cement_val;
|
that.tableDatas[25][3] = res2[0].bulk_cement_val;
|
||||||
that.tableDatas[27][3] = res2[0].bag_cement_val;
|
that.tableDatas[27][3] = res2[0].bag_cement_val;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,14 @@
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
||||||
<thead class="myTableHead">
|
<thead class="myTableHead">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="7">生产月报</th>
|
<th colspan="9">生产月报</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>序号</th>
|
<th>序号</th>
|
||||||
<th colspan="2">项目</th>
|
<th colspan="2">项目</th>
|
||||||
<th colspan="2">环比增长</th>
|
<th >月数据</th>
|
||||||
<th colspan="2">同比增长</th>
|
<th>环比增长</th>
|
||||||
|
<th>同比增长</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||||
|
|
@ -53,10 +54,9 @@
|
||||||
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
||||||
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
||||||
<td class="numCell" v-if="index<39" colspan="2">{{item[3]}}</td>
|
<td class="numCell" >{{item[3]}}</td>
|
||||||
<td class="numCell" v-else>{{item[3]}}</td>
|
|
||||||
<td class="numCell">{{item[4]}}</td>
|
<td class="numCell">{{item[4]}}</td>
|
||||||
<td class="numCell" v-if="index>38">{{item[5]}}</td>
|
<td class="numCell">{{item[5]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -103,27 +103,19 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[29,'成本','日电石渣成本(元/吨)'],
|
[29,'成本','月电石渣成本(元/吨)'],
|
||||||
[30,'成本','日生料成本(元/吨)'],
|
[30,'成本','月生料成本(元/吨)'],
|
||||||
[31,'成本','日熟料成本(元/吨)'],
|
[31,'成本','月熟料成本(元/吨)'],
|
||||||
[32,'成本','日水泥粉磨成本(元/吨)'],
|
[32,'成本','月水泥粉磨成本(元/吨)'],
|
||||||
[33,'成本','日水泥包装成本(元/吨)'],
|
[33,'成本','月水泥包装成本(元/吨)'],
|
||||||
|
|
||||||
|
|
||||||
[34,'耗电量','日电石渣耗电量(kw.h)'],
|
[34,'耗电量','月电石渣耗电量(kw.h)'],
|
||||||
[35,'耗电量','日生料耗电量(kw.h)'],
|
[35,'耗电量','月生料耗电量(kw.h)'],
|
||||||
[36,'耗电量','日熟料耗电量(kw.h)'],
|
[36,'耗电量','月熟料耗电量(kw.h)'],
|
||||||
[37,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
[37,'耗电量','月水泥粉磨耗电量(kw.h)'],
|
||||||
[38,'耗电量','日水泥包装耗电量(kw.h)'],
|
[38,'耗电量','月水泥包装耗电量(kw.h)'],
|
||||||
[39,'耗电量','日生活区耗电量(kw.h)'],
|
[39,'耗电量','月生活区耗电量(kw.h)'],
|
||||||
|
|
||||||
|
|
||||||
['生产异常动态','工段','类别','原因','处置措施','处置人'],
|
|
||||||
['生产异常动态','电石渣'],
|
|
||||||
['生产异常动态','原料磨'],
|
|
||||||
['生产异常动态','回转窑'],
|
|
||||||
['生产异常动态','煤磨'],
|
|
||||||
['生产异常动态','水泥磨'],
|
|
||||||
],
|
],
|
||||||
year:'',
|
year:'',
|
||||||
month:'',
|
month:'',
|
||||||
|
|
@ -176,40 +168,71 @@
|
||||||
dataList[label] = item;
|
dataList[label] = item;
|
||||||
});
|
});
|
||||||
//台产
|
//台产
|
||||||
that.nowData[0] = dataList.原料磨.production_hour;
|
that.nowData[0] = dataList.原料磨.production_hour;
|
||||||
that.nowData[1] = dataList.电石渣.production_hour;
|
that.tableDatas[0][3] = dataList.原料磨.production_hour;
|
||||||
that.nowData[2] = dataList.煤磨.production_hour;
|
that.nowData[1] = dataList.电石渣.production_hour;
|
||||||
that.nowData[3] = dataList.回转窑.production_hour;
|
that.tableDatas[1][3] = dataList.电石渣.production_hour;
|
||||||
|
that.nowData[2] = dataList.煤磨.production_hour;
|
||||||
|
that.tableDatas[2][3] = dataList.煤磨.production_hour;
|
||||||
|
that.nowData[3] = dataList.回转窑.production_hour;
|
||||||
|
that.tableDatas[3][3] = dataList.回转窑.production_hour;
|
||||||
that.nowData[4] = dataList.水泥磨.production_hour;
|
that.nowData[4] = dataList.水泥磨.production_hour;
|
||||||
|
that.tableDatas[4][3] = dataList.水泥磨.production_hour;
|
||||||
//能耗(kw.h/t)
|
//能耗(kw.h/t)
|
||||||
that.nowData[5] = dataList.回转窑.celec_consume_unit;
|
that.nowData[5] = dataList.回转窑.celec_consume_unit;
|
||||||
|
that.tableDatas[5][3] = dataList.回转窑.celec_consume_unit;
|
||||||
that.nowData[6] = dataList.回转窑.coal_consume_unit;
|
that.nowData[6] = dataList.回转窑.coal_consume_unit;
|
||||||
|
that.tableDatas[6][3] = dataList.回转窑.coal_consume_unit;
|
||||||
that.nowData[7] = dataList.回转窑.cen_consume_unit;
|
that.nowData[7] = dataList.回转窑.cen_consume_unit;
|
||||||
|
that.tableDatas[7][3] = dataList.回转窑.cen_consume_unit;
|
||||||
that.nowData[8] = dataList.水泥磨.cen_consume_unit;
|
that.nowData[8] = dataList.水泥磨.cen_consume_unit;
|
||||||
|
that.tableDatas[8][3] = dataList.水泥磨.cen_consume_unit;
|
||||||
that.nowData[9] = dataList.电石渣.elec_consume_unit;
|
that.nowData[9] = dataList.电石渣.elec_consume_unit;
|
||||||
|
that.tableDatas[9][3] = dataList.电石渣.elec_consume_unit;
|
||||||
that.nowData[10] = dataList.原料磨.elec_consume_unit;
|
that.nowData[10] = dataList.原料磨.elec_consume_unit;
|
||||||
|
that.tableDatas[10][3] = dataList.原料磨.elec_consume_unit;
|
||||||
that.nowData[11] = dataList.回转窑.elec_consume_unit;
|
that.nowData[11] = dataList.回转窑.elec_consume_unit;
|
||||||
|
that.tableDatas[11][3] = dataList.回转窑.elec_consume_unit;
|
||||||
that.nowData[12] = dataList.水泥磨.elec_consume_unit;
|
that.nowData[12] = dataList.水泥磨.elec_consume_unit;
|
||||||
|
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
|
||||||
that.nowData[13] = dataList.水泥包装.elec_consume_unit;
|
that.nowData[13] = dataList.水泥包装.elec_consume_unit;
|
||||||
|
that.tableDatas[13][3] = dataList.水泥磨.elec_consume_unit;
|
||||||
//产量(t)
|
//产量(t)
|
||||||
that.nowData[14] = dataList.电石渣.production_hour;
|
that.nowData[14] = dataList.电石渣.production_hour;
|
||||||
|
that.tableDatas[14][3] = dataList.电石渣.production_hour;
|
||||||
that.nowData[16] = dataList.原料磨.production_hour;
|
that.nowData[16] = dataList.原料磨.production_hour;
|
||||||
|
that.tableDatas[16][3] = dataList.原料磨.production_hour;
|
||||||
that.nowData[18] = dataList.回转窑.production_hour;
|
that.nowData[18] = dataList.回转窑.production_hour;
|
||||||
|
that.tableDatas[18][3] = dataList.回转窑.production_hour;
|
||||||
that.nowData[20] = dataList.水泥磨.production_hour;
|
that.nowData[20] = dataList.水泥磨.production_hour;
|
||||||
|
that.tableDatas[20][3] = dataList.水泥磨.production_hour;
|
||||||
|
|
||||||
//成本(元/吨)
|
//成本(元/吨)
|
||||||
that.nowData[28] = dataList.电石渣.production_cost_unit;
|
that.nowData[28] = dataList.电石渣.production_cost_unit;
|
||||||
|
that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
|
||||||
that.nowData[29] = dataList.原料磨.production_cost_unit;
|
that.nowData[29] = dataList.原料磨.production_cost_unit;
|
||||||
|
that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
|
||||||
that.nowData[30] = dataList.回转窑.production_cost_unit;
|
that.nowData[30] = dataList.回转窑.production_cost_unit;
|
||||||
|
that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
|
||||||
that.nowData[31] = dataList.水泥磨.production_cost_unit;
|
that.nowData[31] = dataList.水泥磨.production_cost_unit;
|
||||||
|
that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
|
||||||
that.nowData[32] = dataList.水泥包装.production_cost_unit;
|
that.nowData[32] = dataList.水泥包装.production_cost_unit;
|
||||||
|
that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
|
||||||
//耗电量(kw.h)
|
//耗电量(kw.h)
|
||||||
that.nowData[33] = dataList.电石渣.elec_consume;
|
that.nowData[33] = dataList.电石渣.elec_consume;
|
||||||
|
that.tableDatas[33][3] = dataList.电石渣.elec_consume;
|
||||||
that.nowData[34] = dataList.原料磨.elec_consume;
|
that.nowData[34] = dataList.原料磨.elec_consume;
|
||||||
|
that.tableDatas[34][3] = dataList.原料磨.elec_consume;
|
||||||
that.nowData[35] = dataList.回转窑.elec_consume;
|
that.nowData[35] = dataList.回转窑.elec_consume;
|
||||||
that.nowData[36] = dataList.煤磨.elec_consume;
|
that.tableDatas[35][3] = dataList.回转窑.elec_consume;
|
||||||
that.nowData[37] = dataList.水泥磨.elec_consume;
|
// that.nowData[36] = dataList.煤磨.elec_consume;
|
||||||
that.nowData[38] = dataList.水泥包装.elec_consume;
|
// that.tableDatas[36][3] = dataList.煤磨.elec_consume;
|
||||||
// that.nowData[39] = dataList.生活区.elec_consume;
|
that.nowData[36] = dataList.水泥磨.elec_consume;
|
||||||
|
that.tableDatas[36][3] = dataList.水泥磨.elec_consume;
|
||||||
|
that.nowData[37] = dataList.水泥包装.elec_consume;
|
||||||
|
that.tableDatas[37][3] = dataList.水泥包装.elec_consume;
|
||||||
|
that.nowData[38] = dataList.生活区.elec_consume;
|
||||||
|
that.tableDatas[38][3] = dataList.生活区.elec_consume;
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
//获取月和年目标
|
//获取月和年目标
|
||||||
let params1 = {};
|
let params1 = {};
|
||||||
|
|
@ -223,9 +246,13 @@
|
||||||
dataList1[label] = item1;
|
dataList1[label] = item1;
|
||||||
});
|
});
|
||||||
that.nowData[15] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?(that.nowData[14] /dataList1.电石渣.goal_val)*100:'/';
|
that.nowData[15] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?(that.nowData[14] /dataList1.电石渣.goal_val)*100:'/';
|
||||||
|
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?((that.nowData[14] /dataList1.电石渣.goal_val)*100).toFixed(2):'/';
|
||||||
that.nowData[17] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[16] /dataList1.原料磨.goal_val)*100:'/';
|
that.nowData[17] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[16] /dataList1.原料磨.goal_val)*100:'/';
|
||||||
|
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?((that.nowData[16] /dataList1.原料磨.goal_val)*100).toFixed(2):'/';
|
||||||
that.nowData[19] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?(that.nowData[18] /dataList1.回转窑.goal_val)*100:'/';
|
that.nowData[19] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?(that.nowData[18] /dataList1.回转窑.goal_val)*100:'/';
|
||||||
|
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?((that.nowData[18] /dataList1.回转窑.goal_val)*100).toFixed(2):'/';
|
||||||
that.nowData[21] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[20] /dataList1.水泥磨.goal_val)*100:'/';
|
that.nowData[21] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[20] /dataList1.水泥磨.goal_val)*100:'/';
|
||||||
|
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?((that.nowData[20] /dataList1.水泥磨.goal_val)*100).toFixed(2):'/';
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
|
|
@ -236,8 +263,11 @@
|
||||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
that.nowData[22]=res1[0].clinker_val;
|
that.nowData[22]=res1[0].clinker_val;
|
||||||
|
that.tableDatas[22][3]=res1[0].clinker_val;
|
||||||
that.nowData[24] = res1[0].bulk_cement_val;
|
that.nowData[24] = res1[0].bulk_cement_val;
|
||||||
|
that.tableDatas[24][3] = res1[0].bulk_cement_val;
|
||||||
that.nowData[26] = res1[0].bag_cement_val;
|
that.nowData[26] = res1[0].bag_cement_val;
|
||||||
|
that.tableDatas[26][3] = res1[0].bag_cement_val;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
|
|
@ -247,14 +277,30 @@
|
||||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
if(res2.length>0){
|
if(res2.length>0){
|
||||||
that.nowData[23] = res2[0].clinker_val;
|
that.nowData[23] = res2[0].clinker_val;
|
||||||
|
that.tableDatas[23][3] = res2[0].clinker_val;
|
||||||
that.nowData[25] = res2[0].bulk_cement_val;
|
that.nowData[25] = res2[0].bulk_cement_val;
|
||||||
|
that.tableDatas[25][3] = res2[0].bulk_cement_val;
|
||||||
that.nowData[27] = res2[0].bag_cement_val;
|
that.nowData[27] = res2[0].bag_cement_val;
|
||||||
|
that.tableDatas[27][3] = res2[0].bag_cement_val;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
this.getHuanbiData();
|
this.getHuanbiData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
canCompute(a,b){
|
||||||
|
debugger;
|
||||||
|
if(b!=0&&b!=='/'&&b!==''&&b!==null){
|
||||||
|
if(a!=='/'&&a!==''&&a!==null){
|
||||||
|
a= Number(a)
|
||||||
|
b= Number(b)
|
||||||
|
let num =((a-b)/b*100).toFixed(2)
|
||||||
|
return num
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
getHuanbiData(){
|
getHuanbiData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
@ -268,53 +314,41 @@
|
||||||
let label = item.mgroup_name;
|
let label = item.mgroup_name;
|
||||||
dataList[label] = item;
|
dataList[label] = item;
|
||||||
});
|
});
|
||||||
function canCompute(a,b){
|
|
||||||
debugger;
|
|
||||||
if(b!=0&&b!=='/'&&b!==''&&b!==null){
|
|
||||||
if(a!=='/'&&a!==''&&a!==null){
|
|
||||||
a= Number(a)
|
|
||||||
b= Number(b)
|
|
||||||
let num =(a-b)/b*100
|
|
||||||
return num
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//台产
|
//台产
|
||||||
that.tableDatas[0][3] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
that.tableDatas[0][4] = this.canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||||
that.tableDatas[1][3] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
that.tableDatas[1][4] = this.canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||||
that.tableDatas[2][3] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
that.tableDatas[2][4] = this.canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||||
that.tableDatas[3][3] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
that.tableDatas[3][4] = this.canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||||
that.tableDatas[4][3] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
that.tableDatas[4][4] = this.canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||||
//能耗(kw.h/t)
|
//能耗(kw.h/t)
|
||||||
that.tableDatas[5][3] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
that.tableDatas[5][4] = this.canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||||
that.tableDatas[6][3] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
that.tableDatas[6][4] = this.canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||||
that.tableDatas[7][3] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
that.tableDatas[7][4] = this.canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||||
that.tableDatas[8][3] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
that.tableDatas[8][4] = this.canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||||
that.tableDatas[9][3] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
that.tableDatas[9][4] = this.canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||||
that.tableDatas[10][3] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
that.tableDatas[10][4] = this.canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||||
that.tableDatas[11][3] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
that.tableDatas[11][4] = this.canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||||
that.tableDatas[12][3] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
that.tableDatas[12][4] = this.canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
||||||
that.tableDatas[13][3] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
that.tableDatas[13][4] = this.canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
||||||
//产量(t)
|
//产量(t)
|
||||||
that.tableDatas[14][3] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
that.tableDatas[14][4] = this.canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
||||||
that.tableDatas[16][3] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
that.tableDatas[16][4] = this.canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
||||||
that.tableDatas[18][3] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
that.tableDatas[18][4] = this.canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
||||||
that.tableDatas[20][3] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
that.tableDatas[20][4] = this.canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
||||||
//成本(元/吨)
|
//成本(元/吨)
|
||||||
that.tableDatas[28][3] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
that.tableDatas[28][4] = this.canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
||||||
that.tableDatas[29][3] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
that.tableDatas[29][4] = this.canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
||||||
that.tableDatas[30][3] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
that.tableDatas[30][4] = this.canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
||||||
that.tableDatas[31][3] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
that.tableDatas[31][4] = this.canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
||||||
that.tableDatas[32][3] = canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
|
that.tableDatas[32][4] = this.canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
|
||||||
//耗电量(kw.h)
|
//耗电量(kw.h)
|
||||||
that.tableDatas[33][3] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
that.tableDatas[33][4] = this.canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
||||||
that.tableDatas[34][3] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
that.tableDatas[34][4] = this.canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
||||||
that.tableDatas[35][3] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
that.tableDatas[35][4] = this.canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
||||||
that.tableDatas[36][3] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
that.tableDatas[36][4] = this.canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
||||||
that.tableDatas[37][3] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
that.tableDatas[37][4] = this.canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
||||||
that.tableDatas[38][3] = canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
|
that.tableDatas[38][4] = this.canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
|
||||||
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
|
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
//获取月和年目标
|
//获取月和年目标
|
||||||
|
|
@ -328,10 +362,10 @@
|
||||||
let label = item1.mgroup_name;
|
let label = item1.mgroup_name;
|
||||||
dataList1[label] = item1;
|
dataList1[label] = item1;
|
||||||
});
|
});
|
||||||
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣.goal_val)*100:'/';
|
that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[14][4] /dataList1.电石渣.goal_val)*100).toFixed(2):'/';
|
||||||
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨.goal_val)*100:'/';
|
that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[16][4] /dataList1.原料磨.goal_val)*100).toFixed(5):'/';
|
||||||
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑.goal_val)*100:'/';
|
that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[18][4] /dataList1.回转窑.goal_val)*100).toFixed(2):'/';
|
||||||
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨.goal_val)*100:'/';
|
that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[20][4] /dataList1.水泥磨.goal_val)*100).toFixed(2):'/';
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
|
|
@ -341,9 +375,9 @@
|
||||||
obj1.type = 'month_s';
|
obj1.type = 'month_s';
|
||||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
that.tableDatas[22][3]= canCompute(that.nowData[22],res1[0].clinker_val);
|
that.tableDatas[22][4]= this.canCompute(that.nowData[22],res1[0].clinker_val);
|
||||||
that.tableDatas[24][3] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
that.tableDatas[24][4] = this.canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
||||||
that.tableDatas[26][3] = canCompute(that.nowData[26],res1[0].bag_cement_val);
|
that.tableDatas[26][4] = this.canCompute(that.nowData[26],res1[0].bag_cement_val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
|
|
@ -352,9 +386,9 @@
|
||||||
obj2.year_s = this.year;
|
obj2.year_s = this.year;
|
||||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
if(res2.length>0){
|
if(res2.length>0){
|
||||||
that.tableDatas[23][3] = canCompute(that.nowData[23],res2[0].clinker_val);
|
that.tableDatas[23][4] = this.canCompute(that.nowData[23],res2[0].clinker_val);
|
||||||
that.tableDatas[25][3] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
that.tableDatas[25][4] = this.canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
||||||
that.tableDatas[27][3] = canCompute(that.nowData[27],res2[0].bag_cement_val);
|
that.tableDatas[27][4] = this.canCompute(that.nowData[27],res2[0].bag_cement_val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
|
@ -369,45 +403,47 @@
|
||||||
params.month_s = that.month_t;
|
params.month_s = that.month_t;
|
||||||
params.type = 'month_s';
|
params.type = 'month_s';
|
||||||
this.$API.enm.enstat.req(params).then((res) => {
|
this.$API.enm.enstat.req(params).then((res) => {
|
||||||
let dataList = {};
|
if (res.length>0){
|
||||||
res.forEach(item => {
|
let dataList = {};
|
||||||
let label = item.mgroup_name;
|
res.forEach(item => {
|
||||||
dataList[label] = item;
|
let label = item.mgroup_name;
|
||||||
});
|
dataList[label] = item;
|
||||||
|
});
|
||||||
//台产
|
//台产
|
||||||
that.tableDatas[0][4] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
that.tableDatas[0][5] = this.canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||||
that.tableDatas[1][4] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
that.tableDatas[1][5] = this.canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||||
that.tableDatas[2][4] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
that.tableDatas[2][5] = this.canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||||
that.tableDatas[3][4] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
that.tableDatas[3][5] = this.canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||||
that.tableDatas[4][4] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
that.tableDatas[4][5] = this.canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||||
//能耗(kw.h/t)
|
//能耗(kw.h/t)
|
||||||
that.tableDatas[5][4] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
that.tableDatas[5][5] = this.canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||||
that.tableDatas[6][4] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
that.tableDatas[6][5] = this.canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||||
that.tableDatas[7][4] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
that.tableDatas[7][5] = this.canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||||
that.tableDatas[8][4] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
that.tableDatas[8][5] = this.canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||||
that.tableDatas[9][4] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
that.tableDatas[9][5] = this.canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||||
that.tableDatas[10][4] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
that.tableDatas[10][5] = this.canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||||
that.tableDatas[11][4] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
that.tableDatas[11][5] = this.canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||||
that.tableDatas[12][4] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
that.tableDatas[12][5] = this.canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
||||||
that.tableDatas[13][4] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
that.tableDatas[13][5] = this.canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
||||||
//产量(t)
|
//产量(t)
|
||||||
that.tableDatas[14][4] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
that.tableDatas[14][5] = this.canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
||||||
that.tableDatas[16][4] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
that.tableDatas[16][5] = this.canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
||||||
that.tableDatas[18][4] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
that.tableDatas[18][5] = this.canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
||||||
that.tableDatas[20][4] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
that.tableDatas[20][5] = this.canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
||||||
//成本(元/吨)
|
//成本(元/吨)
|
||||||
that.tableDatas[28][4] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
that.tableDatas[28][5] = this.canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
||||||
that.tableDatas[29][4] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
that.tableDatas[29][5] = this.canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
||||||
that.tableDatas[30][4] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
that.tableDatas[30][5] = this.canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
||||||
that.tableDatas[31][4] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
that.tableDatas[31][5] = this.canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
||||||
that.tableDatas[32][4] = canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
|
that.tableDatas[32][5] = this.canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
|
||||||
//耗电量(kw.h)
|
//耗电量(kw.h)
|
||||||
that.tableDatas[33][4] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
that.tableDatas[33][5] = this.canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
||||||
that.tableDatas[34][4] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
that.tableDatas[34][5] = this.canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
||||||
that.tableDatas[35][4] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
that.tableDatas[35][5] = this.canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
||||||
that.tableDatas[36][4] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
that.tableDatas[36][5] = this.canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
||||||
that.tableDatas[37][4] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
that.tableDatas[37][5] = this.canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
||||||
that.tableDatas[38][4] = canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
|
that.tableDatas[38][5] = this.canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
|
||||||
|
}
|
||||||
// that.tableDatas[39][4] = dataList.生活区.elec_consume;
|
// that.tableDatas[39][4] = dataList.生活区.elec_consume;
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
//获取月和年目标
|
//获取月和年目标
|
||||||
|
|
@ -421,22 +457,22 @@
|
||||||
let label = item1.mgroup_name;
|
let label = item1.mgroup_name;
|
||||||
dataList1[label] = item1;
|
dataList1[label] = item1;
|
||||||
});
|
});
|
||||||
that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[14][4] /dataList1.电石渣.goal_val)*100:'/';
|
that.tableDatas[15][5] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[14][5] /dataList1.电石渣.goal_val)*100:'';
|
||||||
that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[16][4] /dataList1.原料磨.goal_val)*100:'/';
|
that.tableDatas[17][5] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[16][5] /dataList1.原料磨.goal_val)*100:'';
|
||||||
that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[18][4] /dataList1.回转窑.goal_val)*100:'/';
|
that.tableDatas[19][5] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[18][5] /dataList1.回转窑.goal_val)*100:'';
|
||||||
that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[20][4] /dataList1.水泥磨.goal_val)*100:'/';
|
that.tableDatas[21][5] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[20][5] /dataList1.水泥磨.goal_val)*100:'';
|
||||||
})
|
})
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.page = 0;
|
obj1.page = 0;
|
||||||
obj1.year_s = this.year_h;
|
obj1.year_s = this.year_t;
|
||||||
obj1.month_s = this.month_h;
|
obj1.month_s = this.month_h;
|
||||||
obj1.type = 'month_s';
|
obj1.type = 'month_s';
|
||||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
that.tableDatas[22][4]= canCompute(that.nowData[22],res1[0].clinker_val);
|
that.tableDatas[22][5]= this.canCompute(that.nowData[22],res1[0].clinker_val);
|
||||||
that.tableDatas[24][4] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
that.tableDatas[24][5] = this.canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
||||||
that.tableDatas[26][4] = canCompute(that.nowData[26],res1[0].bag_cement_val);
|
that.tableDatas[26][5] = this.canCompute(that.nowData[26],res1[0].bag_cement_val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
|
|
@ -445,9 +481,9 @@
|
||||||
obj2.year_s = this.year;
|
obj2.year_s = this.year;
|
||||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
if(res2.length>0){
|
if(res2.length>0){
|
||||||
that.tableDatas[23][4] = canCompute(that.nowData[23],res2[0].clinker_val);
|
that.tableDatas[23][5] = this.canCompute(that.nowData[23],res2[0].clinker_val);
|
||||||
that.tableDatas[25][4] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
that.tableDatas[25][5] = this.canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
||||||
that.tableDatas[27][4] = canCompute(that.nowData[27],res2[0].bag_cement_val);
|
that.tableDatas[27][5] = this.canCompute(that.nowData[27],res2[0].bag_cement_val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -457,7 +493,7 @@
|
||||||
this.tableDatas[i][3] = '';
|
this.tableDatas[i][3] = '';
|
||||||
this.tableDatas[i][4] = '';
|
this.tableDatas[i][4] = '';
|
||||||
}
|
}
|
||||||
this.getData();
|
this.getNowData();
|
||||||
},
|
},
|
||||||
handlePrint() {
|
handlePrint() {
|
||||||
this.$PRINT('#myReport');
|
this.$PRINT('#myReport');
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.run_rate }}
|
{{ reportItem.run_rate }}
|
||||||
</td>
|
</td>
|
||||||
<td class="numCell">停机时长(h)</td>
|
<td class="numCell">停机时长(s)</td>
|
||||||
<td class="numCell">
|
<td class="numCell">
|
||||||
{{ reportItem.shut_sec }}
|
{{ reportItem.shut_sec }}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -306,7 +306,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.cate }}</td>
|
<td class="numCell">{{ item.stlog_.cate }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.reason }}</td>
|
<td class="numCell">{{ item.stlog_.reason }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.measure }}</td>
|
<td class="numCell">{{ item.stlog_.measure }}</td>
|
||||||
|
|
@ -415,6 +415,7 @@ export default {
|
||||||
that.$API.wpm.sflogexp.list
|
that.$API.wpm.sflogexp.list
|
||||||
.req({ page: 0, sflog: id })
|
.req({ page: 0, sflog: id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log("sflogexp", res);
|
||||||
that.sflogexpList = res;
|
that.sflogexpList = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
@click="editStlog(scope.row)"
|
@click.stop="editStlog(scope.row)"
|
||||||
type="primary"
|
type="primary"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
|
|
@ -494,6 +494,7 @@
|
||||||
:height="heightTable"
|
:height="heightTable"
|
||||||
hidePagination
|
hidePagination
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
|
hideDo
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="班组名称">
|
<el-table-column label="班组名称">
|
||||||
|
|
@ -589,7 +590,7 @@
|
||||||
ref="stlogDialog"
|
ref="stlogDialog"
|
||||||
:current_sflog="current_sflog"
|
:current_sflog="current_sflog"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
@success="sflogExpSuccess"
|
@success="stLogSuccess"
|
||||||
@closed="stlogVisiable = false"
|
@closed="stlogVisiable = false"
|
||||||
></stlog-dialog>
|
></stlog-dialog>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
@ -686,7 +687,6 @@ export default {
|
||||||
this.form = JSON.parse(form);
|
this.form = JSON.parse(form);
|
||||||
this.getMpoint();
|
this.getMpoint();
|
||||||
this.getTeam();
|
this.getTeam();
|
||||||
this.getStlog();
|
|
||||||
let height = document.getElementById("elMain").clientHeight;
|
let height = document.getElementById("elMain").clientHeight;
|
||||||
let heightdetail = document.getElementById("logDetail").clientHeight;
|
let heightdetail = document.getElementById("logDetail").clientHeight;
|
||||||
let heightTabs = height - heightdetail - 40;
|
let heightTabs = height - heightdetail - 40;
|
||||||
|
|
@ -842,14 +842,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//***** fourth 异常 ****** */
|
//***** fourth 异常 ****** */
|
||||||
//获取异常列表
|
stLogSuccess(stlogid){
|
||||||
getStlog() {
|
this.$refs.stlogTable.refresh();
|
||||||
let obj = {};
|
if(stlogid != undefined || stlogid != null){
|
||||||
obj.page = 0;
|
this.getSflogexp(stlogid);
|
||||||
obj.mgroup = this.mgroupId;
|
}else{
|
||||||
this.$API.wpm.stlog.list.req(obj).then((res) => {
|
this.sflogexpList = [];
|
||||||
this.stlogList = res;
|
}
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//异常添加
|
//异常添加
|
||||||
|
|
@ -897,11 +897,8 @@ export default {
|
||||||
.req(row.id)
|
.req(row.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.getStlog();
|
this.stLogSuccess();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
|
||||||
this.$message.success(err);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//点击stlog,展示sflogexp
|
//点击stlog,展示sflogexp
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,6 @@ export default {
|
||||||
obj.ordering = "report_sortstr";
|
obj.ordering = "report_sortstr";
|
||||||
obj.material__code__in = "elec,elec_0";
|
obj.material__code__in = "elec,elec_0";
|
||||||
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
||||||
console.log("mpoints", res);
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
arr.push(item.name);
|
arr.push(item.name);
|
||||||
|
|
@ -581,6 +580,9 @@ export default {
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ind = item.hour; //xAxis
|
let ind = item.hour; //xAxis
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
|
|
@ -622,6 +624,9 @@ export default {
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
|
|
@ -664,6 +669,9 @@ export default {
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.month_s - 1;
|
let ind = item.month_s - 1;
|
||||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||||
|
if(index==-1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
seriesData[index][ind] = item.elec_consume_unit;
|
seriesData[index][ind] = item.elec_consume_unit;
|
||||||
});
|
});
|
||||||
let options = { ...that.option3 };
|
let options = { ...that.option3 };
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="异常原因" prop="reason">
|
<el-form-item label="异常原因" prop="reason">
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="form.is_shutdown"
|
|
||||||
v-model="form.reason"
|
v-model="form.reason"
|
||||||
placeholder="异常原因"
|
placeholder="异常原因"
|
||||||
/>
|
/>
|
||||||
|
|
@ -178,7 +177,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
start_time: [{ required: true, message: "请选择发生时间" }],
|
start_time: [{ required: true, message: "请选择发生时间" }],
|
||||||
end_time: [{ required: true, message: "请选择结束时间" }],
|
// end_time: [{ required: true, message: "请选择结束时间" }],
|
||||||
current_note: [
|
current_note: [
|
||||||
{ required: true, message: "请填写值班异常处理备注" },
|
{ required: true, message: "请填写值班异常处理备注" },
|
||||||
],
|
],
|
||||||
|
|
@ -189,7 +188,9 @@ export default {
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
console.log(this.current_sflog)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add") {
|
||||||
|
|
@ -203,14 +204,15 @@ export default {
|
||||||
that.$refs.dialogForm.validate(async (valid) => {
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
|
that.form.current_sflog = that.current_sflog;
|
||||||
if (that.mode == "add") {
|
if (that.mode == "add") {
|
||||||
that.form.mgroup = that.mgroupId;
|
that.form.mgroup = that.mgroupId;
|
||||||
that.form.current_sflog = that.current_sflog;
|
|
||||||
that.$API.wpm.stlog.create
|
that.$API.wpm.stlog.create
|
||||||
.req(that.form)
|
.req(that.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$emit("success", that.form, that.mode);
|
that.$emit("success", res.id);
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
})
|
})
|
||||||
|
|
@ -222,7 +224,7 @@ export default {
|
||||||
.req(that.form.id, that.form)
|
.req(that.form.id, that.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$emit("success", that.form, that.mode);
|
that.$emit("success", res.id);
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ export default {
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
},
|
},
|
||||||
tableDatas: [],
|
tableDatas: [],
|
||||||
|
goalDatas: [],
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -119,11 +120,10 @@ export default {
|
||||||
params.year = year;
|
params.year = year;
|
||||||
params.mgroup = that.query.mgroup;
|
params.mgroup = that.query.mgroup;
|
||||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
let data = [];
|
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
data = res[0];
|
that.goalDatas = res[0];
|
||||||
}
|
}
|
||||||
that.getData(data);
|
that.getData(that.goalDatas);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -137,23 +137,13 @@ export default {
|
||||||
query0.mgroup = that.query.mgroup;
|
query0.mgroup = that.query.mgroup;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
wrapArrs = [];
|
wrapArrs = [],
|
||||||
|
compareArr0 = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
let data0 = res0;
|
||||||
debugger;
|
|
||||||
if (data0.length > 0) {
|
if (data0.length > 0) {
|
||||||
data0.forEach((item0) => {
|
data0.forEach((item0) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n0 = item0.month_s;
|
|
||||||
let ind0 = 0;
|
|
||||||
let team_name0 = item0.team_name;
|
|
||||||
if (team_name0.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (team_name0.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (team_name0.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -161,19 +151,18 @@ export default {
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
compareArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
});
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
let ind = 0;
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
@ -237,21 +226,30 @@ export default {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = ind - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanbi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanbi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[19] = huanbi; //环期值(KW·h/t)上个月的值
|
arr[19] = huanbi; //环期值(KW·h/t)上个月的值
|
||||||
arr[20] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
//当期与环期差值(KW·h/t)
|
||||||
|
if (arr[19] !== "/"){
|
||||||
|
arr[20] = (arr[16] - arr[19]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||||
|
}else{
|
||||||
|
arr[20] = "/"; //当期与环期差值(KW·h/t)
|
||||||
|
}
|
||||||
arr[21] = item.celec_consume_unit; //环比增长率(%)
|
arr[21] = item.celec_consume_unit; //环比增长率(%)
|
||||||
|
if (arr[19] !=="/" && arr[20] !==0 && arr[20] !== "undefined"){
|
||||||
|
arr[21] = ((arr[19]/arr[20])*100).toFixed(2);
|
||||||
|
}else{
|
||||||
|
arr[21] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||||
|
}
|
||||||
arr[22] = item.celec_consume_unit; //同比增长率(%)
|
arr[22] = item.celec_consume_unit; //同比增长率(%)
|
||||||
arr[23] = item.celec_consume_unit; //同比增长率(%)
|
arr[23] = item.celec_consume_unit; //同比增长率(%)
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
console.log(wrapArr);
|
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
@ -260,7 +258,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
this.getData();
|
this.getData(this.goalDatas);
|
||||||
},
|
},
|
||||||
itemClick(type, item) {
|
itemClick(type, item) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
//当期与目标差值(KW·h/t)
|
//当期与目标差值(KW·h/t)
|
||||||
let diff = 0;
|
let diff = 0;
|
||||||
if (item[2] !== "/") {
|
if (item[2] !== "/") {
|
||||||
diff = item[1] - item[2];
|
diff = (item[1] - item[2]).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
diff = "/";
|
diff = "/";
|
||||||
}
|
}
|
||||||
|
|
@ -264,11 +264,11 @@ export default {
|
||||||
//环比增长率(%)
|
//环比增长率(%)
|
||||||
let lastRate = 0;
|
let lastRate = 0;
|
||||||
if (
|
if (
|
||||||
lastDiff == "/" &&
|
lastDiff !== "/" &&
|
||||||
lastNum !== "/" &&
|
lastNum !== "/" &&
|
||||||
lastNum !== 0
|
lastNum !== 0
|
||||||
) {
|
) {
|
||||||
lastRate = (lastDiff / lastNum) * 100;
|
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
lastRate = "/";
|
lastRate = "/";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.cate }}</td>
|
<td class="numCell">{{ item.cate }}</td>
|
||||||
<td class="numCell">{{ item.reason }}</td>
|
<td class="numCell">{{ item.reason }}</td>
|
||||||
<td class="numCell">{{ item.measure }}</td>
|
<td class="numCell">{{ item.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@
|
||||||
<td class="numCell">处置人</td>
|
<td class="numCell">处置人</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<td class="numCell">{{ item.stlog_.start_time }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.cate }}</td>
|
<td class="numCell">{{ item.stlog_.cate }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.reason }}</td>
|
<td class="numCell">{{ item.stlog_.reason }}</td>
|
||||||
<td class="numCell">{{ item.stlog_.measure }}</td>
|
<td class="numCell">{{ item.stlog_.measure }}</td>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,10 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in tableDatas" :key="item">
|
<tr v-for="item in tableDatas" :key="item">
|
||||||
<td class="numCell">{{ item[0] }}</td>
|
<td class="numCell"
|
||||||
|
>
|
||||||
|
{{ item[0] }}
|
||||||
|
</td>
|
||||||
<td class="numCell">{{ item[1] }}</td>
|
<td class="numCell">{{ item[1] }}</td>
|
||||||
<td
|
<td
|
||||||
class="numCell hoursItem"
|
class="numCell hoursItem"
|
||||||
|
|
@ -238,7 +241,7 @@
|
||||||
<script>
|
<script>
|
||||||
import scEcharts from "@/components/scEcharts";
|
import scEcharts from "@/components/scEcharts";
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666"];
|
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC"];
|
||||||
let tooltip = {
|
let tooltip = {
|
||||||
show: true,
|
show: true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
|
|
@ -263,7 +266,7 @@ let toolbox = {
|
||||||
};
|
};
|
||||||
let legend = {
|
let legend = {
|
||||||
top: "2%",
|
top: "2%",
|
||||||
data: ["总产量", "分布电耗", "成本"],
|
data: ["总产量", "分布电耗", "成本", "消耗", "进厂"],
|
||||||
};
|
};
|
||||||
let yAxis = [
|
let yAxis = [
|
||||||
{
|
{
|
||||||
|
|
@ -312,6 +315,38 @@ let yAxis = [
|
||||||
formatter: "{value}",
|
formatter: "{value}",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "消耗(t)",
|
||||||
|
position: "right",
|
||||||
|
alignTicks: true,
|
||||||
|
offset: 130,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: colors[3],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "进厂(t)",
|
||||||
|
position: "right",
|
||||||
|
alignTicks: true,
|
||||||
|
offset: 180,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: colors[4],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -340,6 +375,8 @@ export default {
|
||||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
],
|
],
|
||||||
cate: "",
|
cate: "",
|
||||||
apiObj: this.$API.enm.enstat,
|
apiObj: this.$API.enm.enstat,
|
||||||
|
|
@ -384,6 +421,18 @@ export default {
|
||||||
yAxisIndex: 2,
|
yAxisIndex: 2,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "消耗",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 3,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "进厂",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 4,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
option2: {
|
option2: {
|
||||||
|
|
@ -420,6 +469,18 @@ export default {
|
||||||
yAxisIndex: 2,
|
yAxisIndex: 2,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "消耗",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 3,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "进厂",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 4,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -473,7 +534,16 @@ export default {
|
||||||
that.tableDatas[0][2] = data3.total_production;
|
that.tableDatas[0][2] = data3.total_production;
|
||||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||||
that.tableDatas[2][2] = data3.production_cost_unit;
|
that.tableDatas[2][2] = data3.production_cost_unit;
|
||||||
|
if (data3.imaterial_data.length > 0) {
|
||||||
|
data3.imaterial_data.forEach((item) => {
|
||||||
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
|
that.tableDatas[3][2] = item.amount_consume;
|
||||||
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[4][2] = item.amount_consume;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//月目标
|
//月目标
|
||||||
let params5 = {};
|
let params5 = {};
|
||||||
|
|
@ -531,6 +601,15 @@ export default {
|
||||||
that.tableDatas[2][4],
|
that.tableDatas[2][4],
|
||||||
that.tableDatas[2][7]
|
that.tableDatas[2][7]
|
||||||
);
|
);
|
||||||
|
if (data1.imaterial_data.length > 0) {
|
||||||
|
data1.imaterial_data.forEach((item) => {
|
||||||
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
|
that.tableDatas[3][4] = item.amount_consume;
|
||||||
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[4][4] = item.amount_consume;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -560,6 +639,15 @@ export default {
|
||||||
that.tableDatas[2][3],
|
that.tableDatas[2][3],
|
||||||
that.tableDatas[2][5]
|
that.tableDatas[2][5]
|
||||||
);
|
);
|
||||||
|
if (data2.imaterial_data.length > 0) {
|
||||||
|
data2.imaterial_data.forEach((item) => {
|
||||||
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
|
that.tableDatas[3][3] = item.amount_consume;
|
||||||
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[4][3] = item.amount_consume;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -573,7 +661,6 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
|
||||||
if (val !== null) {
|
if (val !== null) {
|
||||||
if (this.typeRadio == "month") {
|
if (this.typeRadio == "month") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
|
|
@ -603,18 +690,31 @@ export default {
|
||||||
this.$API.enm.enstat.req(query1).then((response) => {
|
this.$API.enm.enstat.req(query1).then((response) => {
|
||||||
let seriesData0 = [],
|
let seriesData0 = [],
|
||||||
seriesData1 = [],
|
seriesData1 = [],
|
||||||
seriesData2 = [];
|
seriesData2 = [],
|
||||||
|
seriesData3 = [],
|
||||||
|
seriesData4 = [];
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
seriesData0[ind] = item.total_production;
|
seriesData0[ind] = item.total_production;
|
||||||
seriesData1[ind] = item.production_cost_unit;
|
seriesData1[ind] = item.production_cost_unit;
|
||||||
seriesData2[ind] = item.elec_consume_unit;
|
seriesData2[ind] = item.elec_consume_unit;
|
||||||
|
if (item.imaterial_data.length > 0) {
|
||||||
|
item.imaterial_data.forEach((items_n) => {
|
||||||
|
if (items_n.material_name == "湿电石渣消耗") {
|
||||||
|
seriesData3[ind] = items_n.amount_consume;
|
||||||
|
}else if(items_n.material_name == "湿电石渣进厂"){
|
||||||
|
seriesData4[ind] = items_n.amount_consume;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
let options = { ...that.option1 };
|
let options = { ...that.option1 };
|
||||||
options.series[0].data = seriesData0;
|
options.series[0].data = seriesData0;
|
||||||
options.series[1].data = seriesData1;
|
options.series[1].data = seriesData1;
|
||||||
options.series[2].data = seriesData2;
|
options.series[2].data = seriesData2;
|
||||||
|
options.series[3].data = seriesData3;
|
||||||
|
options.series[4].data = seriesData4;
|
||||||
let dayXAxis = [];
|
let dayXAxis = [];
|
||||||
for (let i = 1; i <= that.days; i++) {
|
for (let i = 1; i <= that.days; i++) {
|
||||||
let item = i + "日";
|
let item = i + "日";
|
||||||
|
|
@ -635,18 +735,31 @@ export default {
|
||||||
this.$API.enm.enstat.req(query2).then((response) => {
|
this.$API.enm.enstat.req(query2).then((response) => {
|
||||||
let seriesData0 = [],
|
let seriesData0 = [],
|
||||||
seriesData1 = [],
|
seriesData1 = [],
|
||||||
seriesData2 = [];
|
seriesData2 = [],
|
||||||
|
seriesData3 = [],
|
||||||
|
seriesData4 = [];
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.month_s - 1;
|
let ind = item.month_s - 1;
|
||||||
seriesData0[ind] = item.total_production;
|
seriesData0[ind] = item.total_production;
|
||||||
seriesData1[ind] = item.production_cost_unit;
|
seriesData1[ind] = item.production_cost_unit;
|
||||||
seriesData2[ind] = item.elec_consume_unit;
|
seriesData2[ind] = item.elec_consume_unit;
|
||||||
|
if (item.imaterial_data.length > 0) {
|
||||||
|
item.imaterial_data.forEach((items_n) => {
|
||||||
|
if (items_n.material_name == "湿电石渣消耗") {
|
||||||
|
seriesData3[ind] = items_n.amount_consume;
|
||||||
|
}else if(items_n.material_name == "湿电石渣进厂"){
|
||||||
|
seriesData4[ind] = items_n.amount_consume;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
let options = { ...that.option2 };
|
let options = { ...that.option2 };
|
||||||
options.series[0].data = seriesData0;
|
options.series[0].data = seriesData0;
|
||||||
options.series[1].data = seriesData1;
|
options.series[1].data = seriesData1;
|
||||||
options.series[2].data = seriesData2;
|
options.series[2].data = seriesData2;
|
||||||
|
options.series[3].data = seriesData3;
|
||||||
|
options.series[4].data = seriesData4;
|
||||||
let monthXAxis = [];
|
let monthXAxis = [];
|
||||||
for (let i = 1; i <= that.month; i++) {
|
for (let i = 1; i <= that.month; i++) {
|
||||||
let item = i + "月";
|
let item = i + "月";
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ export default {
|
||||||
timeStamp: null,
|
timeStamp: null,
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
tableDatas: [],
|
tableDatas: [],
|
||||||
|
goalDatas: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -105,9 +106,9 @@ export default {
|
||||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
let data = [];
|
let data = [];
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
data = res[0];
|
this.goalDatas = res[0];
|
||||||
}
|
}
|
||||||
that.getData(data);
|
that.getData(this.goalDatas);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -121,42 +122,31 @@ export default {
|
||||||
query0.mgroup = that.query.mgroup;
|
query0.mgroup = that.query.mgroup;
|
||||||
let wrapArr = [],
|
let wrapArr = [],
|
||||||
wrapArr0 = [],
|
wrapArr0 = [],
|
||||||
|
compareArr0 = [],
|
||||||
wrapArrs = [];
|
wrapArrs = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
let data0 = res0;
|
||||||
if (data0.length > 0) {
|
if (data0.length > 0) {
|
||||||
data0.forEach((item0) => {
|
data0.forEach((item0) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n0 = item0.month_s;
|
|
||||||
let ind0 = 0;
|
|
||||||
if (item0.team_name.indexOf("甲") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3;
|
|
||||||
} else if (item0.team_name.indexOf("乙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 1;
|
|
||||||
} else if (item0.team_name.indexOf("丙") > -1) {
|
|
||||||
ind0 = (n0 - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArr0[ind0] = item0;
|
wrapArr0[ind0] = item0;
|
||||||
});
|
});
|
||||||
console.log(wrapArr0);
|
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
data.forEach((item) => {
|
||||||
|
//先按月份排序,再按班组排序
|
||||||
|
let compareArr = [];
|
||||||
|
compareArr.push(item.month_s);
|
||||||
|
compareArr.push(item.team_name);
|
||||||
|
compareArr.push(item.elec_consume_unit);
|
||||||
|
compareArr0.push(compareArr);
|
||||||
|
});
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
let n = item.month_s;
|
let n = item.month_s;
|
||||||
let team_name = item.team_name;
|
|
||||||
let ind = 0;
|
|
||||||
if (team_name.indexOf("甲") > -1) {
|
|
||||||
ind = (n - 1) * 3;
|
|
||||||
} else if (team_name.indexOf("乙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 1;
|
|
||||||
} else if (team_name.indexOf("丙") > -1) {
|
|
||||||
ind = (n - 1) * 3 + 2;
|
|
||||||
}
|
|
||||||
wrapArrs[ind] = item;
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let time = "" + item.year_s + "." + item.month_s;
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr.push(time);
|
arr.push(time);
|
||||||
|
|
@ -179,22 +169,21 @@ export default {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
: "/";
|
: "/";
|
||||||
} else {
|
} else {
|
||||||
ind_pre = n - 1;
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
huanqi = wrapArr[ind_pre]
|
compareArr0.forEach((item0) => {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
|
||||||
? wrapArr[ind_pre].elec_consume_unit
|
huanqi = item0[2];
|
||||||
: "/"
|
}
|
||||||
: "/";
|
})
|
||||||
}
|
}
|
||||||
arr[7] = huanqi; //环期值(KW·h/t)上个月的值
|
arr[7] = huanqi; //环期值(KW·h/t)上个月的值
|
||||||
if (huanqi !== "/") {
|
if (arr[6] !== "/"){
|
||||||
huanqicha = item.celec_consume_unit - huanqi;
|
arr[8] = (arr[4] - arr[7]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||||
} else {
|
}else{
|
||||||
huanqicha = item.celec_consume_unit;
|
arr[8] = "/"; //当期与环期差值(KW·h/t)
|
||||||
}
|
}
|
||||||
arr[8] = huanqicha; //当期与环期差值(KW·h/t)
|
// arr[8] = huanqicha; //当期与环期差值(KW·h/t)
|
||||||
arr[9] =
|
arr[9] = arr[8] != "/" ? ((arr[7] / arr[8]) * 100).toFixed(2) : 0; //环比增长率(%)
|
||||||
huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //环比增长率(%)
|
|
||||||
if (wrapArr0[n]) {
|
if (wrapArr0[n]) {
|
||||||
tongqicha =
|
tongqicha =
|
||||||
item.celec_consume_unit -
|
item.celec_consume_unit -
|
||||||
|
|
@ -206,8 +195,10 @@ export default {
|
||||||
}
|
}
|
||||||
arr[10] = tongqi; //同比增长率(%)
|
arr[10] = tongqi; //同比增长率(%)
|
||||||
arr[11] = 0; //得分
|
arr[11] = 0; //得分
|
||||||
wrapArr[ind] = arr;
|
wrapArr.push(arr);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
console.log(wrapArr);
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +207,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
this.getData();
|
this.getData(this.goalDatas);
|
||||||
},
|
},
|
||||||
itemClick(type, item) {
|
itemClick(type, item) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
@ -0,0 +1,214 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<!-- <div class="left-panel">
|
||||||
|
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">
|
||||||
|
报废</el-button>
|
||||||
|
</div> -->
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- <el-button type="primary" @click="materialsChoses('wm')"
|
||||||
|
>选择物料</el-button
|
||||||
|
> -->
|
||||||
|
<!-- <el-select
|
||||||
|
v-model="query.mgroupx"
|
||||||
|
placeholder="工段"
|
||||||
|
clearable
|
||||||
|
@change="handleQuery"
|
||||||
|
style="width: 250px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select> -->
|
||||||
|
<el-input
|
||||||
|
style="margin-right: 5px;width: 250px"
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="query"
|
||||||
|
>
|
||||||
|
<el-table-column label="状态" prop="state" width="100" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
|
{{wmState[scope.row.state]?.text}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物料名称"
|
||||||
|
prop="material_name"
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_name }}
|
||||||
|
<span v-if="scope.row.material_origin != null"
|
||||||
|
>({{ scope.row.material_origin_name }})</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="批次号"
|
||||||
|
prop="batch"
|
||||||
|
min-width="120"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="部门/工段"
|
||||||
|
prop="belong_dept_name"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="数量"
|
||||||
|
prop="count"
|
||||||
|
min-width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="不合格标记"
|
||||||
|
prop="notok_sign_name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
||||||
|
<materials
|
||||||
|
style="height: 500px"
|
||||||
|
:materialType="materialType"
|
||||||
|
ref="materialsChose"
|
||||||
|
@choseChange="choseChange"
|
||||||
|
></materials>
|
||||||
|
</el-dialog>
|
||||||
|
<scrap-dialog
|
||||||
|
v-if="dialog.scrap"
|
||||||
|
ref="scrapDialog"
|
||||||
|
:type="type"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
@success="handleScrapSuccess"
|
||||||
|
@closed="dialog.scrap = false"
|
||||||
|
>
|
||||||
|
</scrap-dialog>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { wmState } from "@/utils/enum.js";
|
||||||
|
// import materials from "./../mtm/materials.vue";
|
||||||
|
// import checkDialog from "./check_form.vue";
|
||||||
|
// import showDrawer from "./check_drawer.vue";
|
||||||
|
// import scrapDialog from "./handover_form.vue";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
mgroupName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// components: {
|
||||||
|
// materials,
|
||||||
|
// checkDialog,
|
||||||
|
// showDrawer,
|
||||||
|
// scrapDialog
|
||||||
|
// },
|
||||||
|
name: "wmaterial",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
wmState,
|
||||||
|
apiObj: this.$API.wpm.wmaterial.list,
|
||||||
|
params: {
|
||||||
|
state : 50,
|
||||||
|
state_all: 1
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
search:''
|
||||||
|
},
|
||||||
|
dialog: {
|
||||||
|
scrap: false,
|
||||||
|
},
|
||||||
|
options:[],
|
||||||
|
tableData: [],
|
||||||
|
selection: [],
|
||||||
|
queryWm: {
|
||||||
|
search: "",
|
||||||
|
material: "",
|
||||||
|
},
|
||||||
|
materialType: "wm",
|
||||||
|
visibleDrawer: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
// that.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
||||||
|
// that.options = res;
|
||||||
|
// if(res.length>0){
|
||||||
|
// that.params.mgroupx = res[0].id;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
materialsChoses(str) {
|
||||||
|
this.materialType = str;
|
||||||
|
this.materialsVisible = true;
|
||||||
|
},
|
||||||
|
choseChange(data) {
|
||||||
|
this.queryWm.material = data;
|
||||||
|
this.$refs.table_wm.queryData(this.queryWm);
|
||||||
|
this.materialsVisible = false;
|
||||||
|
},
|
||||||
|
tomio() {
|
||||||
|
this.$router.push({ name: "halfgood_mio" });
|
||||||
|
},
|
||||||
|
table_Check(row){
|
||||||
|
this.checkItem = row;
|
||||||
|
let mode = this.mgroupName;
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open(mode);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection) {
|
||||||
|
this.selection = selection;
|
||||||
|
},
|
||||||
|
//添加报废
|
||||||
|
table_add(type) {
|
||||||
|
this.dialog.scrap = true;
|
||||||
|
this.type = type;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.scrapDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleScrapSuccess(){
|
||||||
|
this.dialog.scrap = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -94,6 +94,14 @@
|
||||||
width="150px"
|
width="150px"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="table_edit(scope.row)"
|
||||||
|
v-if="scope.row.state == 10&&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -106,11 +114,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_submit(scope.row)"
|
@click="table_submit(scope.row)"
|
||||||
v-auth="'mio.submit'"
|
v-auth="'mio.submit'"
|
||||||
v-if="
|
v-if="scope.row.state == 10 &&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
|
||||||
scope.row.state == 10 &&
|
|
||||||
(scope.row.type == 'other_in' ||
|
|
||||||
scope.row.type == 'other_out')
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -211,9 +215,10 @@ export default {
|
||||||
table_edit(row) {
|
table_edit(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("edit", type).setData(row);
|
this.$refs.saveDialog.open("edit", row.type).setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//查看
|
//查看
|
||||||
table_detail(row) {
|
table_detail(row) {
|
||||||
this.type = row.type;
|
this.type = row.type;
|
||||||
|
|
|
||||||
|
|
@ -1019,15 +1019,10 @@ export default {
|
||||||
that.weight_kgs.forEach((item) => {
|
that.weight_kgs.forEach((item) => {
|
||||||
arr.push(item.value);
|
arr.push(item.value);
|
||||||
});
|
});
|
||||||
let obj = {};
|
that.form.weight_kgs = arr;
|
||||||
obj.test_date = that.form.test_date;
|
console.log('that.form',that.form);
|
||||||
obj.test_user = that.form.test_user;
|
|
||||||
obj.count_bag = that.form.count_bag;
|
|
||||||
obj.weight_kgs = arr;
|
|
||||||
obj.is_testok = that.form.is_testok;
|
|
||||||
console.log(obj);
|
|
||||||
that.$API.inm.mioitem.testpurin
|
that.$API.inm.mioitem.testpurin
|
||||||
.req(that.mioitemId, obj)
|
.req(that.mioitemId, that.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$emit("success");
|
that.$emit("success");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-select
|
||||||
|
v-model="query.mgroup"
|
||||||
|
clearable
|
||||||
|
placeholder="所在工段"
|
||||||
|
@change="handleQuery"
|
||||||
|
style="margin-left: 10px; width: 150px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in mgroupOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="物料名/批次号"
|
||||||
|
clearable
|
||||||
|
style="margin-right: 5px"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table_wm"
|
||||||
|
:apiObj="apiObjWm"
|
||||||
|
row-key="id"
|
||||||
|
:params="paramsWm"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column label="批次" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名" prop="material">
|
||||||
|
<template #default="scope">{{scope.row.material_.name}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" prop="material">
|
||||||
|
<template #default="scope">{{scope.row.material_.specification}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="型号" prop="material">
|
||||||
|
<template #default="scope">{{scope.row.material_.model}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已到工序" prop="material">
|
||||||
|
<template #default="scope">{{scope.row.material_.process_name}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="所在工段" prop="belong_dept_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" width="80">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "halfgood",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.inm.warehouse.batch,
|
||||||
|
params: { count__gte: 1, material__type: 10 },
|
||||||
|
selection: [],
|
||||||
|
query: {},
|
||||||
|
mgroupOptions: [],
|
||||||
|
apiObjWm: this.$API.wpm.wmaterial.list,
|
||||||
|
paramsWm: { count__gte: 1, material__type: 10 },
|
||||||
|
queryWm: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getMgroup();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMgroup() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.mgroupOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getProcessOptions() {
|
||||||
|
this.$API.mtm.process.list.req({ page: 0 }).then((res) => {
|
||||||
|
this.processOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQueryWm() {
|
||||||
|
this.$refs.table_wm.queryData(this.queryWm);
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,254 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('do_out')"
|
||||||
|
v-auth="'mio.do'"
|
||||||
|
>生产领料</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('do_in')"
|
||||||
|
v-auth="'mio.do'"
|
||||||
|
>生产入库</el-button
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="query.type"
|
||||||
|
clearable
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
placeholder="出入库类型"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cateOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="query.state"
|
||||||
|
clearable
|
||||||
|
style="width: 120px; margin-left: 2px"
|
||||||
|
placeholder="状态"
|
||||||
|
@change="handleQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="编号"
|
||||||
|
clearable
|
||||||
|
style="margin-right: 5px"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="params"
|
||||||
|
:query="query"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column
|
||||||
|
label="记录编号"
|
||||||
|
prop="number"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="出/入库类型">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ typeDict[scope.row.type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="记录状态">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ stateDict[scope.row.state] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出/入库日期" prop="inout_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="执行部门" prop="belong_dept_name">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.belong_dept_name }} - {{ scope.row.mgroup_name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建人" prop="create_by_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="150px"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="table_detail(scope.row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="table_submit(scope.row)"
|
||||||
|
v-auth="'mio.submit'"
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
|
>
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
v-auth="'mio.delete'"
|
||||||
|
v-if="scope.row.state == 10"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
|
<record-dialog
|
||||||
|
ref="showDrawer"
|
||||||
|
v-if="visibleDrawer"
|
||||||
|
:type="type"
|
||||||
|
:cate="cate"
|
||||||
|
:mioId="mioId"
|
||||||
|
@closed="visibleDrawer = false"
|
||||||
|
>
|
||||||
|
</record-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import saveDialog from "./mio_form.vue";
|
||||||
|
import recordDialog from "./mioitem.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "mio",
|
||||||
|
components: {
|
||||||
|
saveDialog,
|
||||||
|
recordDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
stateDict: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "已提交",
|
||||||
|
},
|
||||||
|
stateOptions: [
|
||||||
|
{ id: 10, name: "创建中" },
|
||||||
|
{ id: 20, name: "已提交" },
|
||||||
|
],
|
||||||
|
typeDict: {
|
||||||
|
do_out: "生产领料",
|
||||||
|
do_in: "生产入库",
|
||||||
|
},
|
||||||
|
cateOptions: [
|
||||||
|
{ id: "do_out", name: "生产领料" },
|
||||||
|
{ id: "do_in", name: "生产入库" },
|
||||||
|
],
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
record: false,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
params: {
|
||||||
|
type__in: "sale_out,do_in",
|
||||||
|
materials__type: 10,
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
apiObj: this.$API.inm.mio.list,
|
||||||
|
selection: [],
|
||||||
|
type: "",
|
||||||
|
cate: "good",
|
||||||
|
mioId: "",
|
||||||
|
visibleDrawer: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加
|
||||||
|
add(type) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add", type);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//编辑
|
||||||
|
table_edit(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("edit", type).setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
table_detail(row) {
|
||||||
|
this.type = row.type;
|
||||||
|
this.mioId = row.id;
|
||||||
|
this.visibleDrawer = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.showDrawer.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$API.inm.mio.delete
|
||||||
|
.req(row.id)
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
table_submit(row) {
|
||||||
|
this.$API.inm.mio.submit.req(row.id).then((res) => {
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
handleSaveSuccess() {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<!-- <div class="login-oauth" v-else>
|
<!-- <div class="login-oauth" v-else>
|
||||||
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div>
|
<!-- <div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,15 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="计量单位">
|
||||||
|
<el-input
|
||||||
|
v-model="form.unit"
|
||||||
|
placeholder="计量单位"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
|
||||||
<el-form-item label="已到工序" prop="process">
|
<el-form-item label="已到工序" prop="process">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.process"
|
v-model="form.process"
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,7 @@ export default {
|
||||||
console.log("materialType", this.materialType);
|
console.log("materialType", this.materialType);
|
||||||
this.apiObj = this.$API.mtm.material.list;
|
this.apiObj = this.$API.mtm.material.list;
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
|
this.materialTemplate = this.materialTemplate+"?t=" + new Date().getTime();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rowClick(row) {
|
rowClick(row) {
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,9 @@ export default {
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
})
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error("请求失败", error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -66,10 +66,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="主要输入" prop="material_in">
|
<el-form-item label="输入物料" prop="material_in">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material_in"
|
v-model="form.material_in"
|
||||||
placeholder="物料"
|
placeholder="输入物料"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
:value-on-clear="null"
|
:value-on-clear="null"
|
||||||
|
|
@ -99,10 +99,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="主要输出" prop="material_out">
|
<el-form-item label="输出物料" prop="material_out">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.material_out"
|
v-model="form.material_out"
|
||||||
placeholder="物料"
|
placeholder="输出物料"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
:value-on-clear="null"
|
:value-on-clear="null"
|
||||||
|
|
@ -131,10 +131,10 @@
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="工时" prop="hour_work">
|
<el-form-item label="计划时长" prop="hour_work">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.hour_work"
|
v-model="form.hour_work"
|
||||||
:min="1"
|
:min="0"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -171,9 +171,12 @@ const defaultForm = {
|
||||||
process: null,
|
process: null,
|
||||||
sort: 1,
|
sort: 1,
|
||||||
out_rate: 100,
|
out_rate: 100,
|
||||||
|
material_in:'',
|
||||||
|
material_out:'',
|
||||||
|
hour_work:0,
|
||||||
batch_bind: true,
|
batch_bind: true,
|
||||||
is_autotask: true,
|
is_autotask: true,
|
||||||
is_count_utask: false,
|
// is_count_utask: false,
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -185,7 +188,7 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
//表单数据
|
//表单数据
|
||||||
form: defaultForm,
|
form: Object.assign({}, defaultForm),
|
||||||
//验证规则
|
//验证规则
|
||||||
rules: {
|
rules: {
|
||||||
process: [
|
process: [
|
||||||
|
|
|
||||||
|
|
@ -79,67 +79,73 @@
|
||||||
|
|
||||||
<!--工序!-->
|
<!--工序!-->
|
||||||
<el-main class="nopadding" v-if="active === 1">
|
<el-main class="nopadding" v-if="active === 1">
|
||||||
<div class="left-panel" style="margin: 10px">
|
<el-container>
|
||||||
<el-button
|
<el-header>
|
||||||
type="primary"
|
<div class="left-panel" style="margin: 10px">
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="table_add"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
<scTable
|
|
||||||
ref="tables"
|
|
||||||
:apiObj="apiObj"
|
|
||||||
:query="query"
|
|
||||||
:params="query"
|
|
||||||
row-key="id"
|
|
||||||
hidePagination
|
|
||||||
hideDo
|
|
||||||
stripe
|
|
||||||
style="height: 500px"
|
|
||||||
>
|
|
||||||
<el-table-column label="排序" prop="sort" width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工序" prop="process_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="输入" prop="material_in_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="输出" prop="material_out_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="出材率" prop="out_rate">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工时" prop="hour_work">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="批次校验" prop="batch_bind">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="200"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
<el-button
|
||||||
text
|
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
icon="el-icon-plus"
|
||||||
@click="table_edit(scope.row)"
|
@click="table_add"
|
||||||
>编辑</el-button
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="tables"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:query="query"
|
||||||
|
:params="query"
|
||||||
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column label="排序" prop="sort" width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工序" prop="process_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输入" prop="material_in_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输出" prop="material_out_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出材率" prop="out_rate">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工时" prop="hour_work">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次校验" prop="batch_bind">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
>
|
>
|
||||||
<el-popconfirm
|
<template #default="scope">
|
||||||
title="确定删除该工序吗?"
|
<el-button
|
||||||
@confirm="delWorker(scope.row)"
|
text
|
||||||
>
|
type="primary"
|
||||||
<template #reference>
|
size="small"
|
||||||
<el-button text type="danger" size="small"
|
@click="table_edit(scope.row)"
|
||||||
>删除</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定删除该工序吗?"
|
||||||
|
@confirm="delWorker(scope.row)"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button text type="danger" size="small"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-table-column>
|
||||||
</template>
|
</scTable>
|
||||||
</el-table-column>
|
</el-main>
|
||||||
</scTable>
|
</el-container>
|
||||||
<div style="margin-top: 20px; text-align: center">
|
</el-main>
|
||||||
<el-button @click="handleLastStep" style="margin-right: 4px"
|
<el-footer v-if="active === 1" style="text-align: center">
|
||||||
|
<el-button @click="handleLastStep" style="margin-right: 4px"
|
||||||
>上一步</el-button
|
>上一步</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -155,8 +161,7 @@
|
||||||
<el-button @click="$emit('closed')" type="warning"
|
<el-button @click="$emit('closed')" type="warning"
|
||||||
>退出</el-button
|
>退出</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</el-footer>
|
||||||
</el-main>
|
|
||||||
</el-container>
|
</el-container>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系方式" prop="contact_phone">
|
<el-table-column label="联系方式" prop="contact_phone">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="地址" prop="address" show-overflow-tooltip>
|
||||||
label="地址"
|
</el-table-column>
|
||||||
prop="address"
|
<el-table-column label="单位编号" prop="number" show-overflow-tooltip>
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否外协" prop="can_outsource">
|
<el-table-column label="是否外协" prop="can_outsource">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,14 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="单位编号">
|
||||||
|
<el-input
|
||||||
|
v-model="form.number"
|
||||||
|
placeholder="单位编号"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="是否外协">
|
<el-form-item label="是否外协">
|
||||||
<el-switch v-model="form.can_outsource">
|
<el-switch v-model="form.can_outsource">
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,25 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="班次">
|
||||||
|
<el-select
|
||||||
|
v-model="form.shift"
|
||||||
|
placeholder="班次"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOtions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider style="margin-top:0"></el-divider>
|
<el-divider style="margin-top:0"></el-divider>
|
||||||
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
|
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
|
||||||
|
|
@ -291,6 +310,18 @@
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="棕圈">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_zq"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
:disabled="mode=='sizeShow'||mode=='facadeShow'"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="划伤">
|
<el-form-item label="划伤">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -352,7 +383,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="篮圈">
|
<el-form-item label="蓝圈">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
v-model="count_notok_json.count_n_lq"
|
v-model="count_notok_json.count_n_lq"
|
||||||
|
|
@ -417,6 +448,7 @@ export default {
|
||||||
count_n_swen: 0,
|
count_n_swen: 0,
|
||||||
count_n_bb: 0,
|
count_n_bb: 0,
|
||||||
count_n_zb: 0,
|
count_n_zb: 0,
|
||||||
|
count_n_zq: 0,
|
||||||
count_n_hs: 0,
|
count_n_hs: 0,
|
||||||
count_n_md: 0,
|
count_n_md: 0,
|
||||||
count_n_hqbx: 0,
|
count_n_hqbx: 0,
|
||||||
|
|
@ -445,12 +477,14 @@ export default {
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
userList:[],
|
userList:[],
|
||||||
|
shiftOtions:[],
|
||||||
selectionFilters: [],
|
selectionFilters: [],
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getUsers();
|
this.getUsers();
|
||||||
|
this.getShift();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//显示
|
//显示
|
||||||
|
|
@ -460,6 +494,12 @@ export default {
|
||||||
this.getMaterialBatch();
|
this.getMaterialBatch();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
getShift(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||||
|
that.shiftOtions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getUsers(){
|
getUsers(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let userList = [];
|
let userList = [];
|
||||||
|
|
@ -485,6 +525,7 @@ export default {
|
||||||
this.count_notok_json.count_n_qp=
|
this.count_notok_json.count_n_qp=
|
||||||
this.count_notok_json.count_n_swen=
|
this.count_notok_json.count_n_swen=
|
||||||
this.count_notok_json.count_n_zb=
|
this.count_notok_json.count_n_zb=
|
||||||
|
this.count_notok_json.count_n_zq=
|
||||||
this.count_notok_json.count_n_hs=
|
this.count_notok_json.count_n_hs=
|
||||||
this.count_notok_json.count_n_md=
|
this.count_notok_json.count_n_md=
|
||||||
this.count_notok_json.count_n_hqbx=
|
this.count_notok_json.count_n_hqbx=
|
||||||
|
|
@ -507,6 +548,7 @@ export default {
|
||||||
this.count_notok_json.count_n_z+
|
this.count_notok_json.count_n_z+
|
||||||
this.count_notok_json.count_n_swen+
|
this.count_notok_json.count_n_swen+
|
||||||
this.count_notok_json.count_n_zb+
|
this.count_notok_json.count_n_zb+
|
||||||
|
this.count_notok_json.count_n_zq+
|
||||||
this.count_notok_json.count_n_hs+
|
this.count_notok_json.count_n_hs+
|
||||||
this.count_notok_json.count_n_md+
|
this.count_notok_json.count_n_md+
|
||||||
this.count_notok_json.count_n_hqbx+
|
this.count_notok_json.count_n_hqbx+
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,39 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
<!-- 检验类型 -->
|
||||||
|
<el-select v-model="query.process_name"
|
||||||
|
placeholder="检验类型">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- 检验人 -->
|
||||||
|
<!-- <el-select v-model="query.test_user"
|
||||||
|
placeholder="检验人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-select v-model="query.shift"
|
||||||
|
placeholder="班次">
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select> -->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.start_date"
|
v-model="query.start_date"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
@ -18,8 +51,13 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="handleExport" type="primary">导出</el-button>
|
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="background: #ffffff">
|
<el-main class="nopadding">
|
||||||
<scTable :data="tableData" id="exportDiv">
|
<scTable
|
||||||
|
:data="tableData"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
||||||
<el-table-column label="规格" prop="规格"> </el-table-column>
|
<el-table-column label="规格" prop="规格"> </el-table-column>
|
||||||
|
|
@ -32,12 +70,38 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
||||||
<el-table-column label="合格数" prop="合格数量"></el-table-column>
|
<el-table-column label="合格数" prop="合格数量"></el-table-column>
|
||||||
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
<el-table-column label="不合格数" align="center" v-if="query.process_name == '一次超洗'">
|
||||||
|
<el-table-column label="黑圈内径" prop="黑圈内径"></el-table-column>
|
||||||
|
<el-table-column label="黑圈内径圆度" prop="黑圈内径圆度"></el-table-column>
|
||||||
|
<el-table-column label="黑圈外径" prop="黑圈外径"></el-table-column>
|
||||||
|
<el-table-column label="黑圈外径圆度" prop="黑圈外径圆度"></el-table-column>
|
||||||
|
<el-table-column label="产品外径" prop="产品外径"></el-table-column>
|
||||||
|
<el-table-column label="产品圆度" prop="产品圆度"></el-table-column>
|
||||||
|
<el-table-column label="产品同心度" prop="产品同心度"></el-table-column>
|
||||||
|
<el-table-column label="厚度" prop="厚度"></el-table-column>
|
||||||
|
<el-table-column label="准合格" prop="准合格"></el-table-column>
|
||||||
|
<el-table-column label="圆准" prop="圆准"></el-table-column>
|
||||||
|
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" align="center" v-else>
|
||||||
|
<el-table-column label="脏" prop="脏"></el-table-column>
|
||||||
|
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||||
|
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||||
|
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||||
|
<el-table-column label="棕边" prop="棕边"></el-table-column>
|
||||||
|
<el-table-column label="棕圈" prop="棕圈"></el-table-column>
|
||||||
|
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||||
|
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||||
|
<el-table-column label="黑圈变形" prop="黑圈变形"></el-table-column>
|
||||||
|
<el-table-column label="倒角" prop="倒角"></el-table-column>
|
||||||
|
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||||
|
<el-table-column label="蓝圈" prop="蓝圈"></el-table-column>
|
||||||
|
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "chart",
|
name: "chart",
|
||||||
|
|
@ -45,12 +109,25 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
query:{
|
query:{
|
||||||
start_date:'',
|
fw_type:'prod',
|
||||||
end_date:'',
|
end_date:'',
|
||||||
fw_type:'prod'
|
start_date:'',
|
||||||
|
process_name:'一次超洗',
|
||||||
|
group_by_dept: ", dept.id",
|
||||||
|
group_by_user: ", suser.id",
|
||||||
|
group_by_shift: ", shift.id",
|
||||||
|
select_col_dept: ", dept.name as 部门",
|
||||||
|
select_col_user: ", suser.name as 检验人",
|
||||||
|
select_col_shift: ", shift.name as 班次"
|
||||||
},
|
},
|
||||||
currentDate: "",
|
currentDate: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
options:[
|
||||||
|
{name:'外观',value:'一次超洗'},
|
||||||
|
{name:'尺寸',value:'二次超洗'}
|
||||||
|
],
|
||||||
|
userOptions:[],
|
||||||
|
shiftOptions:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -64,8 +141,22 @@ export default {
|
||||||
let queryDate = year + "-" + month + "-" + day;
|
let queryDate = year + "-" + month + "-" + day;
|
||||||
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
||||||
this.getData();
|
this.getData();
|
||||||
|
this.getUsers();
|
||||||
|
this.getShifts();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getUsers(){
|
||||||
|
let that = this;
|
||||||
|
this.$API.system.user.list.req({ page: 0, posts__code__contains: "check" }).then((res) => {
|
||||||
|
that.userOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getShifts(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||||
|
that.shiftOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getData() {
|
getData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,14 +2,27 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
<el-select v-model="query.process_name"
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请选择工序">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.start_date"
|
v-model="query.start_date"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="查询日期"
|
placeholder="查询日期"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
style="width: 160px"
|
style="width: 200px"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
<el-input v-model="query.m_s"
|
||||||
|
placeholder="物料名称" clearable style="width:200px"></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
|
|
@ -18,8 +31,13 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="handleExport" type="primary">导出</el-button>
|
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="background: #ffffff">
|
<el-main>
|
||||||
<scTable :data="tableData" id="exportDiv">
|
<scTable
|
||||||
|
:data="tableData"
|
||||||
|
id="exportDiv"
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
||||||
<el-table-column label="规格" prop="规格"> </el-table-column>
|
<el-table-column label="规格" prop="规格"> </el-table-column>
|
||||||
|
|
@ -31,8 +49,20 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
||||||
<el-table-column label="合格数" prop="合格数量"></el-table-column>
|
<el-table-column label="合格数" prop="合格数"></el-table-column>
|
||||||
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
<el-table-column label="不合格数" align="center">
|
||||||
|
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||||
|
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||||
|
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||||
|
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||||
|
<el-table-column label="雾面" prop="雾面"></el-table-column>
|
||||||
|
<el-table-column label="小崩边" prop="小崩边"></el-table-column>
|
||||||
|
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||||
|
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||||
|
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||||
|
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||||
|
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -45,12 +75,21 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
query:{
|
query:{
|
||||||
start_date:'',
|
m_s:'',
|
||||||
|
fw_type:'process',
|
||||||
end_date:'',
|
end_date:'',
|
||||||
fw_type:'process'
|
start_date:'',
|
||||||
|
process_name:'',
|
||||||
|
group_by_dept: ", dept.id",
|
||||||
|
group_by_user: ", suser.id",
|
||||||
|
group_by_shift: ", shift.id",
|
||||||
|
select_col_dept: ", dept.name as 部门",
|
||||||
|
select_col_user: ", suser.name as 检验人",
|
||||||
|
select_col_shift: ", shift.name as 班次"
|
||||||
},
|
},
|
||||||
currentDate: "",
|
currentDate: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
options:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -63,14 +102,21 @@ export default {
|
||||||
day = day < 10 ? "0" + day : day;
|
day = day < 10 ? "0" + day : day;
|
||||||
let queryDate = year + "-" + month + "-" + day;
|
let queryDate = year + "-" + month + "-" + day;
|
||||||
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
||||||
|
this.getProcess();
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getProcess(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.process.list.req({ page: 0}).then((res) => {
|
||||||
|
that.options = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getData() {
|
getData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.query = that.query;
|
obj.query = that.query;
|
||||||
|
that.tableData =[];
|
||||||
that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => {
|
that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => {
|
||||||
that.tableData = res.data2.ds0;
|
that.tableData = res.data2.ds0;
|
||||||
console.log(that.tableData);
|
console.log(that.tableData);
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,25 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select v-model="material__name">
|
<el-select v-model="searchType" style="width: 200px" @change="searchTypeChange">
|
||||||
|
<el-option label="原料批次号" value="batch"></el-option>
|
||||||
|
<el-option label="物料名称" value="material"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-if="searchType === 'batch'"
|
||||||
|
v-model="query.batch" placeholder="物料批次"
|
||||||
|
clearable style="width:200px"
|
||||||
|
></el-input>
|
||||||
|
<el-select v-else
|
||||||
|
v-model="query.m_name"
|
||||||
|
style="width: 200px"
|
||||||
|
@change="materialChange"
|
||||||
|
placeholder="请选择物料">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item"
|
:key="item.id"
|
||||||
:label="item"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item.name"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -16,76 +29,78 @@
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
@click="handleExport"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main id="elMain">
|
<el-main class="nopadding">
|
||||||
<el-row :gutter="10" id="elCol">
|
<scTable
|
||||||
<el-col :lg="12">
|
:data="tableData"
|
||||||
<el-card shadow="never">
|
id="exportDiv"
|
||||||
<div id="bachart1"></div>
|
stripe
|
||||||
<!-- <scEcharts height="500px" :option="option"></scEcharts> -->
|
hideDo
|
||||||
</el-card>
|
hidePagination
|
||||||
</el-col>
|
>
|
||||||
<el-col :lg="12">
|
<el-table-column type="index" width="50" />
|
||||||
<el-card shadow="never" style="position: relative">
|
<el-table-column label="部门" prop="部门">
|
||||||
<el-button
|
</el-table-column>
|
||||||
@click="handleExport"
|
<el-table-column label="工段" prop="工段">
|
||||||
class="tables"
|
</el-table-column>
|
||||||
type="primary"
|
<el-table-column label="原料数" prop="原料数">
|
||||||
>导出</el-button
|
</el-table-column>
|
||||||
>
|
<el-table-column label="待加工原料数" prop="待加工原料数">
|
||||||
<el-table
|
</el-table-column>
|
||||||
:data="tableData1"
|
<el-table-column label="非本段产物数" prop="非本段产物数">
|
||||||
id="exportDiv7"
|
</el-table-column>
|
||||||
:height="tableHeight"
|
<el-table-column label="待加工产物数" prop="待加工产物数">
|
||||||
>
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column label="加工中原料数" prop="加工中原料数">
|
||||||
<el-table-column
|
</el-table-column>
|
||||||
label="任务编号"
|
<el-table-column label="加工中产物数" prop="加工中产物数">
|
||||||
prop="number"
|
</el-table-column>
|
||||||
min-width="100px"
|
<el-table-column label="合格品数" prop="合格品数">
|
||||||
>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="不合格品数" prop="不合格品数">
|
||||||
<el-table-column label="计划数" prop="count">
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="返工品数" prop="返工品数">
|
||||||
<el-table-column label="完成数" prop="count_ok">
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="检验数" prop="检验数">
|
||||||
<el-table-column label="完成率" prop="rate">
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="废品数" prop="废品数">
|
||||||
</el-table>
|
</el-table-column>
|
||||||
</el-card>
|
<el-table-column label="仓库原料数" prop="仓库原料数">
|
||||||
</el-col>
|
</el-table-column>
|
||||||
</el-row>
|
<el-table-column label="仓库合格品数" prop="仓库合格品数">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="仓库合格成品数" prop="仓库合格成品数">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
|
||||||
import T from "@/components/scEcharts/echarts-theme-T.js";
|
|
||||||
echarts.registerTheme("T", T);
|
|
||||||
import scEcharts from "@/components/scEcharts";
|
|
||||||
function deepCopy(obj) {
|
function deepCopy(obj) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "chart",
|
name: "chart",
|
||||||
components: {
|
|
||||||
scEcharts,
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentYear:'',
|
query: {
|
||||||
currentMonth:'',
|
batch: "",
|
||||||
start_date:'',
|
m_name: "",
|
||||||
end_date:'',
|
m_model: "",
|
||||||
queryDate:'',
|
m_specification: ""
|
||||||
option:{},
|
},
|
||||||
seriesData1:[],
|
searchType:'batch',
|
||||||
seriesData2:[],
|
options:[],
|
||||||
seriesData3:[],
|
tableData:[],
|
||||||
material__name:'',
|
|
||||||
options:['白片','DDG片','一次抛','外协海富'],
|
|
||||||
basicOption: {
|
basicOption: {
|
||||||
backgroundColor: "transparent",
|
backgroundColor: "transparent",
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -132,77 +147,49 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.getOptions();
|
||||||
that.getInmMaterial();
|
that.getInmMaterial();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getOptions(){
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
obj.page = 0;
|
||||||
|
obj.type__in = "10,20";
|
||||||
|
obj.is_hidden = false;
|
||||||
|
that.options = [];
|
||||||
|
that.$API.mtm.material.list.req(obj).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.options = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getInmMaterial(){
|
getInmMaterial(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {
|
let obj = {};
|
||||||
name__contains:that.material__name,
|
obj.query = that.query;
|
||||||
page:0
|
that.tableData =[];
|
||||||
};
|
that.$API.bi.dataset.exec.req('batch_search', this.query).then((res) => {
|
||||||
this.$API.mtm.material.list.req(obj).then(res=>{
|
if(res.data2.ds0){
|
||||||
console.log('InmMaterial',res);
|
that.tableData = res.data2.ds0;
|
||||||
that.getWmaterial();
|
|
||||||
if(res.length>0){
|
|
||||||
res.forEach(item => {
|
|
||||||
that.seriesData3[0]+=item.count;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getWmaterial(){
|
searchTypeChange(){
|
||||||
|
this.query.batch = '';
|
||||||
|
this.query.m_name = '';
|
||||||
|
this.query.m_model = '';
|
||||||
|
this.query.m_specification = '';
|
||||||
|
},
|
||||||
|
materialChange(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {
|
console.log(val);
|
||||||
material__name__contains:that.material__name,
|
that.options.forEach((item) => {
|
||||||
page:0
|
if (item.name == val) {
|
||||||
};
|
that.query.m_model = item.model;
|
||||||
this.$API.wpm.wmaterial.list.req(obj).then(res=>{
|
that.query.m_specification = item.specification;
|
||||||
console.log('Wmaterial',res);
|
|
||||||
if(res.length>0){
|
|
||||||
res.forEach(item => {
|
|
||||||
if(item.belong_dept_name=="扫边车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[1]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[1]+=item.count;
|
|
||||||
}
|
|
||||||
}else if(item.belong_dept_name=="黑化车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[2]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[2]+=item.count;
|
|
||||||
}
|
|
||||||
}else if(item.belong_dept_name=="减薄车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[3]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[3]+=item.count;
|
|
||||||
}
|
|
||||||
}else if(item.belong_dept_name=="精雕车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[4]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[4]+=item.count;
|
|
||||||
}
|
|
||||||
}else if(item.belong_dept_name=="倒角车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[5]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[5]+=item.count;
|
|
||||||
}
|
|
||||||
}else if(item.belong_dept_name=="磨抛车间"){
|
|
||||||
if(item.count_xtest==null){
|
|
||||||
seriesData3[6]+=item.count;
|
|
||||||
}else{
|
|
||||||
seriesData1[6]+=item.count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
let option = deepCopy(that.basicOption);
|
|
||||||
that.setChart("bachart1", option);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleQuery(){
|
handleQuery(){
|
||||||
|
|
@ -234,9 +221,7 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
.tables{
|
|
||||||
width:
|
|
||||||
}
|
|
||||||
.tableHead {
|
.tableHead {
|
||||||
background:rgb(0,176,240);
|
background:rgb(0,176,240);
|
||||||
height:40px;
|
height:40px;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select v-model="mgroupId"
|
<!-- <el-select v-model="mgroupId"
|
||||||
placeholder="请选择工段"
|
placeholder="请选择工段"
|
||||||
@change="mgroupChange">
|
@change="mgroupChange">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchDate"
|
v-model="searchDate"
|
||||||
type="month"
|
type="month"
|
||||||
|
|
@ -29,31 +29,25 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main id="elMain">
|
<el-main id="elMain">
|
||||||
<el-row :gutter="10" id="elCol">
|
<!-- 0 -->
|
||||||
<el-col :lg="8">
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
<el-card shadow="never">
|
<el-row :gutter="10">
|
||||||
<scEcharts height="500px" :option="option"></scEcharts>
|
<el-col :lg="12">
|
||||||
</el-card>
|
<el-card shadow="never">
|
||||||
</el-col>
|
<div id="linechart0"></div>
|
||||||
<el-col :lg="16">
|
</el-card>
|
||||||
<el-card shadow="never" style="position: relative">
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
<el-button
|
<el-button
|
||||||
@click="handleExport('7')"
|
@click="handleExport(0)"
|
||||||
class="tables"
|
class="tables"
|
||||||
type="primary"
|
type="primary"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
<el-table
|
<el-table :data="tableData0" id="exportDiv0" :height="300">
|
||||||
:data="tableData1"
|
|
||||||
id="exportDiv7"
|
|
||||||
:height="tableHeight"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
label="任务编号"
|
|
||||||
prop="number"
|
|
||||||
min-width="100px"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划数" prop="count">
|
<el-table-column label="计划数" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -63,13 +57,490 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 1 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart1"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(1)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table
|
||||||
|
:data="tableData1"
|
||||||
|
id="exportDiv1"
|
||||||
|
:height="300"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 2 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart2"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(2)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData2" id="exportDiv2" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 3 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart3"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(3)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData3" id="exportDiv3" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 4 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart4"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(4)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData4" id="exportDiv4" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 5 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart5"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(5)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData5" id="exportDiv5" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 6 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart6"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(6)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData6" id="exportDiv6" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 7 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart7"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(7)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData7" id="exportDiv7" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 8 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart8"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(8)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData8" id="exportDiv8" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 9 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart9"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(9)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData9" id="exportDiv9" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 10 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart10"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(10)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData10" id="exportDiv10" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 11 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart11"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(11)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData11" id="exportDiv11" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 12 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart12"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(12)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData12" id="exportDiv12" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 13 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart13"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(13)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData13" id="exportDiv13" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 14 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart14"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(14)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData14" id="exportDiv14" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<!-- 15 -->
|
||||||
|
<el-card shadow="never" style="margin-bottom: 8px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<div id="linechart15"></div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="12">
|
||||||
|
<el-card shadow="never" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
@click="handleExport(15)"
|
||||||
|
class="tables"
|
||||||
|
type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
<el-table :data="tableData15" id="exportDiv15" :height="300">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成数" prop="count_ok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="完成率" prop="rate">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import * as echarts from "echarts";
|
||||||
|
import T from "@/components/scEcharts/echarts-theme-T.js";
|
||||||
|
echarts.registerTheme("T", T);
|
||||||
import scEcharts from "@/components/scEcharts";
|
import scEcharts from "@/components/scEcharts";
|
||||||
|
function deepCopy(obj) {
|
||||||
|
return JSON.parse(JSON.stringify(obj));
|
||||||
|
}
|
||||||
|
const ondDayTime = 86400000;
|
||||||
export default {
|
export default {
|
||||||
name: "chart",
|
name: "chart",
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -90,8 +561,7 @@ export default {
|
||||||
currentDate: "",
|
currentDate: "",
|
||||||
searchDate:'',
|
searchDate:'',
|
||||||
options:[],
|
options:[],
|
||||||
tableData1: [],
|
basicOption: {
|
||||||
option: {
|
|
||||||
title: {
|
title: {
|
||||||
text: "",
|
text: "",
|
||||||
},
|
},
|
||||||
|
|
@ -104,7 +574,7 @@ export default {
|
||||||
},
|
},
|
||||||
color: ["rgb(64,158,255)", "orange"],
|
color: ["rgb(64,158,255)", "orange"],
|
||||||
series: {
|
series: {
|
||||||
name: "7车间完成率",
|
name: "任务进度",
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: ["40%", "70%"],
|
radius: ["40%", "70%"],
|
||||||
center: ["50%", "60%"],
|
center: ["50%", "60%"],
|
||||||
|
|
@ -114,69 +584,126 @@ export default {
|
||||||
formatter: "{b} : {c} ({d}%)",
|
formatter: "{b} : {c} ({d}%)",
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 0, name: "已完成" },
|
{ value: 0, name: "合格数" },
|
||||||
{ value: 0, name: "未完成" },
|
{ value: 0, name: "未完成" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
tableData0: [],
|
||||||
|
tableData1: [],
|
||||||
|
tableData2: [],
|
||||||
|
tableData3: [],
|
||||||
|
tableData4: [],
|
||||||
|
tableData5: [],
|
||||||
|
tableData6: [],
|
||||||
|
tableData7: [],
|
||||||
|
tableData8: [],
|
||||||
|
tableData9: [],
|
||||||
|
tableData10: [],
|
||||||
|
tableData11: [],
|
||||||
|
tableData12: [],
|
||||||
|
tableData13: [],
|
||||||
|
tableData14: [],
|
||||||
|
tableData15: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = new Date();
|
let nowDate = new Date();
|
||||||
let year = date.getFullYear();
|
|
||||||
let month = date.getMonth() + 1;
|
|
||||||
month = month < 10 ? "0" + month : month;
|
|
||||||
that.currentDate = that.searchDate = year + "-" + month;
|
|
||||||
let days = new Date(year, month, 0).getDate();
|
|
||||||
let start_date = year + "-" + month + "-01";
|
|
||||||
let end_date = year + "-" + month + "-"+days;
|
|
||||||
that.start_date = that.query.querys[0][0].value = start_date;
|
|
||||||
that.end_date = that.query.querys[1][0].value = end_date;
|
|
||||||
let height = document.getElementById("elCol").clientHeight;
|
|
||||||
let chartheight = height+'px';
|
|
||||||
that.tableHeight = height-20;
|
|
||||||
that.getMgroup();
|
that.getMgroup();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWeekDate(dates){
|
||||||
|
let that = this;
|
||||||
|
dates = new Date(dates);
|
||||||
|
let week =dates.getDay(); //当前时间的week数
|
||||||
|
let weekFirst = 0, weekLast = 0;
|
||||||
|
if (week == 0) {
|
||||||
|
weekFirst = 6;
|
||||||
|
weekLast = 0; //周日特殊处理
|
||||||
|
} else {
|
||||||
|
weekFirst = week - 1;
|
||||||
|
weekLast = 7 - week;
|
||||||
|
}
|
||||||
|
let first = new Date(dates.getTime() - weekFirst * ondDayTime); //本周周一
|
||||||
|
let last = new Date(new Date(dates.getTime() + weekLast * ondDayTime)); //本周周日
|
||||||
|
let dateArr = [];
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
|
let itemDate = new Date(first.getTime() + i * ondDayTime);
|
||||||
|
let item = itemDate.getDate();
|
||||||
|
dateArr.push(item);
|
||||||
|
}
|
||||||
|
that.weekDateList = dateArr;
|
||||||
|
that.query.start_date = that.query.querys[0][0].value = first.toISOString().split('T')[0];
|
||||||
|
that.query.end_date = that.query.querys[1][0].value = last.toISOString().split('T')[0];
|
||||||
|
that.options.forEach((item,index)=>{
|
||||||
|
console.log('item',item);
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.getData(item.id,item.name,index);
|
||||||
|
},500)
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
getMgroup(){
|
getMgroup(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.options = [];
|
||||||
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
||||||
|
// that.options = res.slice(21);
|
||||||
that.options = res;
|
that.options = res;
|
||||||
|
let nowDate = new Date();
|
||||||
|
that.getWeekDate(nowDate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData7() {
|
setChart(name, option = null) {
|
||||||
|
// 根据name 渲染数据, option需填写,否则option为模拟数据
|
||||||
|
var myChart = echarts.getInstanceByDom(
|
||||||
|
document.getElementById(name)
|
||||||
|
);
|
||||||
|
if (myChart == undefined) {
|
||||||
|
myChart = echarts.init(document.getElementById(name), "T");
|
||||||
|
}
|
||||||
|
if (option == null) {
|
||||||
|
option = Object.assign({}, this.basicOption);
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
myChart.setOption(option);
|
||||||
|
} catch (error) {}
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
getData(mgroup_id,mgroup_name,mgroup_index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.tableData1 = [];
|
that.tableData1 = [];
|
||||||
that.option.series.data[0].value = 0;
|
that.query.querys[0][1].value = null;
|
||||||
that.option.series.data[1].value = 0;
|
that.query.querys[1][1].value = null;
|
||||||
|
let option = deepCopy(that.basicOption);
|
||||||
|
option.title.text = mgroup_name+"任务进度";
|
||||||
|
option.series.data[0].value = 0;
|
||||||
|
option.series.data[1].value = 0;
|
||||||
|
that.query.querys[0][1].value = mgroup_id;
|
||||||
|
that.query.querys[1][1].value = mgroup_id;
|
||||||
that.$API.pm.mtask.cquery.req(that.query).then((res) => {
|
that.$API.pm.mtask.cquery.req(that.query).then((res) => {
|
||||||
let data = [];
|
let names = 'tableData'+mgroup_index;
|
||||||
let count_ok1 = 0;
|
that[names] = res;
|
||||||
let count_notok1 = 0;
|
// console.log('names',names);
|
||||||
|
// console.log('that[names]',that[names]);
|
||||||
|
let count_jh = 0,count_ok = 0,count_diff = 0;
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
let obj = item;
|
count_jh+=item.count;
|
||||||
obj.rate = Math.round((item.count_ok / item.count) * 100).toFixed(2) + "%";
|
count_ok+=item.count_ok;
|
||||||
if (item.count_ok >= item.count) {
|
|
||||||
count_ok1++;
|
|
||||||
} else {
|
|
||||||
count_notok1++;
|
|
||||||
}
|
|
||||||
data.push(obj);
|
|
||||||
});
|
});
|
||||||
that.tableData1 = data;
|
count_diff = count_jh - count_ok;
|
||||||
// that.option.series.data[0].value = count_ok1;
|
option.series.data[0].value = count_ok;
|
||||||
|
option.series.data[1].value = count_diff;
|
||||||
|
let chartId = 'linechart'+mgroup_index;
|
||||||
|
that.setChart(chartId, option);
|
||||||
|
}else{
|
||||||
|
let chartId = 'linechart'+mgroup_index;
|
||||||
|
that.setChart(chartId, option);
|
||||||
}
|
}
|
||||||
that.option.series.data[0].value = count_ok1;
|
|
||||||
that.option.series.data[1].value = count_notok1;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mgroupChange(){
|
|
||||||
let that = this;
|
|
||||||
that.query.querys[0][1].value = that.mgroupId;
|
|
||||||
that.query.querys[1][1].value = that.mgroupId;
|
|
||||||
},
|
|
||||||
handleQuery(){
|
handleQuery(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(this.searchDate!==''&&this.searchDate!==null){
|
if(this.searchDate!==''&&this.searchDate!==null){
|
||||||
|
|
@ -192,7 +719,11 @@ export default {
|
||||||
that.query.querys[0][0].value = that.start_date;
|
that.query.querys[0][0].value = that.start_date;
|
||||||
that.query.querys[1][0].value = that.end_date;
|
that.query.querys[1][0].value = that.end_date;
|
||||||
}
|
}
|
||||||
that.getData7();
|
that.options.forEach((item,index)=>{
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.getData(item.id,item.name,index);
|
||||||
|
},500)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleExport(val) {
|
handleExport(val) {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
|
|
@ -206,8 +737,12 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#elCol{
|
#linechart1,#linechart2,#linechart3,#linechart4,
|
||||||
height:100%;
|
#linechart5,#linechart6,#linechart7,#linechart8,
|
||||||
|
#linechart9,#linechart10,#linechart11,#linechart12,
|
||||||
|
#linechart13,#linechart14,#linechart15,#linechart0{
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
}
|
}
|
||||||
.tables {
|
.tables {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-aside style="width: 45%; background: #ffffff">
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<span style="font-size: 14px">人员生产统计</span>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<!-- 工段 -->
|
||||||
|
<el-select
|
||||||
|
v-model="query.mgroup_name"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- 日期 -->
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryData"
|
||||||
|
type="date"
|
||||||
|
placeholder="查询日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 160px"
|
||||||
|
@change="dateChange"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="searchHandle"
|
||||||
|
></el-button>
|
||||||
|
|
||||||
|
<el-button @click="handleExport('1')" type="primary"
|
||||||
|
>导出</el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="tables1"
|
||||||
|
:data="tableData"
|
||||||
|
id="exportDiv1"
|
||||||
|
@row-click="rowClick"
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination
|
||||||
|
>
|
||||||
|
<el-table-column label="工段" prop="工段"></el-table-column>
|
||||||
|
<el-table-column label="操作人" prop="操作人"></el-table-column>
|
||||||
|
<el-table-column label="生产数" prop="生产数"></el-table-column>
|
||||||
|
<el-table-column label="合格数" prop="合格数"></el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
||||||
|
<el-table-column label="合格率" prop="合格率"></el-table-column>
|
||||||
|
<el-table-column label="日期" prop="日期"></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-aside>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<span style="font-size: 14px">人员生产统计详情</span>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-button @click="handleExport('2')" type="primary"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="tables2"
|
||||||
|
:data="tableData2"
|
||||||
|
id="exportDiv2"
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
hidePagination
|
||||||
|
>
|
||||||
|
<el-table-column label="工段" prop="工段"></el-table-column>
|
||||||
|
<el-table-column label="物料名" prop="物料名"></el-table-column>
|
||||||
|
<el-table-column label="操作人" prop="操作人"></el-table-column>
|
||||||
|
<el-table-column label="规格" prop="规格"></el-table-column>
|
||||||
|
<el-table-column label="型号" prop="型号"></el-table-column>
|
||||||
|
<el-table-column label="生产数" prop="生产数"></el-table-column>
|
||||||
|
<el-table-column label="合格数" prop="合格数"></el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
||||||
|
<el-table-column label="合格率" prop="合格率"></el-table-column>
|
||||||
|
<el-table-column label="日期" prop="日期"></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mioTypeEnum } from "@/utils/enum.js";
|
||||||
|
function deepCopy(obj) {
|
||||||
|
return JSON.parse(JSON.stringify(obj));
|
||||||
|
}
|
||||||
|
const ondDayTime = 86400000;
|
||||||
|
export default {
|
||||||
|
name: "chart",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query:{
|
||||||
|
start_date:"",
|
||||||
|
end_date:''
|
||||||
|
},
|
||||||
|
start_date: "",
|
||||||
|
end_date: "",
|
||||||
|
options:[],
|
||||||
|
tableData: [],
|
||||||
|
tableData2: [],
|
||||||
|
queryData:'',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let date = new Date();
|
||||||
|
that.query.start_date = that.start_date = that.queryData =
|
||||||
|
that.query.end_date = that.end_date = date.toISOString().split('T')[0];
|
||||||
|
// let week = date.getDay(); //当前时间的week数
|
||||||
|
// let weekFirst = week - 1; //第一天对应的天数
|
||||||
|
// let weekLast = 7 - week; //最后一天对应的天数
|
||||||
|
// if (week == 0) {
|
||||||
|
// weekFirst = 6;
|
||||||
|
// weekLast = 0; //周日特殊处理
|
||||||
|
// } else {
|
||||||
|
// weekFirst = week - 1;
|
||||||
|
// weekLast = 7 - week;
|
||||||
|
// }
|
||||||
|
// let first = new Date(new Date(date.getTime() - weekFirst * ondDayTime)); //本周周一
|
||||||
|
// let last = new Date(new Date(date.getTime() + weekLast * ondDayTime)); //本周周日
|
||||||
|
// this.query.start_date = this.start_date = first.toISOString().split('T')[0];
|
||||||
|
// this.query.end_date = this.end_date = last.toISOString().split('T')[0];
|
||||||
|
this.getMgroup();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getWeekDate(dateTime) {
|
||||||
|
let date = new Date(dateTime);
|
||||||
|
let week = date.getDay(); //当前时间的week数
|
||||||
|
let weekFirst = week - 1; //第一天对应的天数
|
||||||
|
let weekLast = 7 - week; //最后一天对应的天数
|
||||||
|
if (week == 0) {
|
||||||
|
weekFirst = 6;
|
||||||
|
weekLast = 0; //周日特殊处理
|
||||||
|
} else {
|
||||||
|
weekFirst = week - 1;
|
||||||
|
weekLast = 7 - week;
|
||||||
|
}
|
||||||
|
let first = new Date(new Date(date.getTime() - weekFirst * ondDayTime)); //本周周一
|
||||||
|
let last = new Date(new Date(date.getTime() + weekLast * ondDayTime)); //本周周日
|
||||||
|
this.query.start_date = first.toISOString().split('T')[0];
|
||||||
|
this.query.end_date = last.toISOString().split('T')[0];
|
||||||
|
},
|
||||||
|
getMgroup(){
|
||||||
|
let that = this;
|
||||||
|
this.$API.mtm.mgroup.list.req({page:0}).then((res) => {
|
||||||
|
that.options = res;
|
||||||
|
that.query.mgroup_name = res[0].name;
|
||||||
|
that.getTableData();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchHandle() {
|
||||||
|
let that = this;
|
||||||
|
that.tableData = [];
|
||||||
|
that.getTableData();
|
||||||
|
},
|
||||||
|
dateChange(){
|
||||||
|
this.query.start_date = this.query.end_date = this.queryData;
|
||||||
|
},
|
||||||
|
//获取表格数据
|
||||||
|
getTableData() {
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
let query = deepCopy(that.query);
|
||||||
|
query.group_by_material = "";
|
||||||
|
query.select_col_material = "";
|
||||||
|
obj.query = query;
|
||||||
|
that.$API.bi.dataset.exec.req('ryjxtj', obj).then((res) => {
|
||||||
|
if (res.data2.ds0) {
|
||||||
|
that.tableData = res.data2.ds0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
rowClick(row){
|
||||||
|
console.log(row);
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
let query = deepCopy(that.query);
|
||||||
|
query.where_user = "and userd.name = '"+row.操作人+"'";
|
||||||
|
obj.query = query;
|
||||||
|
that.tableData2 = [];
|
||||||
|
that.$API.bi.dataset.exec.req('ryjxtj', obj).then((res) => {
|
||||||
|
if( res.data2.ds0){
|
||||||
|
that.tableData2 = res.data2.ds0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleExport(val) {
|
||||||
|
this.exportLoading = true;
|
||||||
|
let id = "#exportDiv" + val;
|
||||||
|
let name = val == "1" ? "库存统计" : "库存出入库统计";
|
||||||
|
this.$XLSX(id, name);
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.tables {
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 6px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,11 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<el-button
|
<el-container>
|
||||||
type="primary"
|
<el-header>
|
||||||
icon="el-icon-plus"
|
<div class="left-panel">
|
||||||
@click="table_add"
|
<el-button
|
||||||
></el-button>
|
type="primary"
|
||||||
<el-divider></el-divider>
|
icon="el-icon-plus"
|
||||||
<scTable
|
@click="table_add"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
|
|
@ -13,7 +18,6 @@
|
||||||
:params="params"
|
:params="params"
|
||||||
hidePagination
|
hidePagination
|
||||||
hideDo
|
hideDo
|
||||||
style="height: 400px"
|
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
>
|
>
|
||||||
<el-table-column label="类型" prop="name" width="80">
|
<el-table-column label="类型" prop="name" width="80">
|
||||||
|
|
@ -26,7 +30,7 @@
|
||||||
prop="name"
|
prop="name"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="80">
|
<el-table-column label="操作" align="center" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
|
|
@ -46,7 +50,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
<el-dialog title="创建/编辑" v-model="dialogVisible" width="80%">
|
</el-main>
|
||||||
|
<el-dialog title="创建/编辑" v-model="dialogVisible" width="80%">
|
||||||
<el-form :model="saveForm" label-width="100px" ref="saveForm">
|
<el-form :model="saveForm" label-width="100px" ref="saveForm">
|
||||||
<el-form-item label="策略类型" required>
|
<el-form-item label="策略类型" required>
|
||||||
<el-select v-model="saveForm.type">
|
<el-select v-model="saveForm.type">
|
||||||
|
|
@ -126,6 +131,7 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { scheduleTypeEnum, schedulePeriodEnum } from "@/utils/enum.js";
|
import { scheduleTypeEnum, schedulePeriodEnum } from "@/utils/enum.js";
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ export default {
|
||||||
} else if (cateType.indexOf("opl_") != -1) {
|
} else if (cateType.indexOf("opl_") != -1) {
|
||||||
projectId = row.ticket_data.opl;
|
projectId = row.ticket_data.opl;
|
||||||
cateType = "opl";
|
cateType = "opl";
|
||||||
} else if (cateType == "routepack") {
|
} else if (cateType == "routepack"||cateType == "backfire") {
|
||||||
projectId = row.ticket_data.t_id;
|
projectId = row.ticket_data.t_id;
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
style="margin-top: 4px; position: relative"
|
style="margin-top: 4px; position: relative"
|
||||||
|
v-if="cateType === 'routepack'"
|
||||||
header="工艺流程"
|
header="工艺流程"
|
||||||
>
|
>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
@ -599,6 +600,8 @@ export default {
|
||||||
this.getRpj();
|
this.getRpj();
|
||||||
} else if (this.cateType === "routepack") {
|
} else if (this.cateType === "routepack") {
|
||||||
this.getRoutePack();
|
this.getRoutePack();
|
||||||
|
} else if (this.cateType === "backfire") {
|
||||||
|
// 获取退火相关数据
|
||||||
} else {
|
} else {
|
||||||
this.getOpl();
|
this.getOpl();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-card>
|
<el-card>
|
||||||
<div id="main" style="width: 1200px; height: 500px"></div>
|
<div>
|
||||||
<div
|
<div id="title"
|
||||||
id="mains"
|
style="width: 850px;padding-left:10px; height: 50px;background-color: rgb(204,51,0);color:white;font-size: 30px;line-height: 50px">
|
||||||
style="
|
Decarbonization Roadmap of Cement Industry in China
|
||||||
width: 1200px;
|
</div>
|
||||||
height: 500px;
|
<div id="title"
|
||||||
position: absolute;
|
style="width: 850px;padding-left:10px; height: 50px;background-color: rgb(204,51,0);color:white;font-size: 30px;line-height: 50px">
|
||||||
top: 155px;
|
(when low carbon cement technology breakthroughs)
|
||||||
"
|
</div>
|
||||||
></div>
|
<!-- 柱状图 -->
|
||||||
|
<div id="main" style="width: 1200px; height: 600px;border: 4px solid rgb(204,51,0)"></div>
|
||||||
|
<!-- 折线图 155 / 205-->
|
||||||
|
<div id="mains" style="width: 1200px;height: 600px;position: absolute;top: 205px;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -19,15 +24,22 @@
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
const updateFrequency = 2000;
|
const updateFrequency = 2000;
|
||||||
const dimension = 0;
|
const dimension = 0;
|
||||||
|
// const countryColors = {
|
||||||
|
// 水泥碳排放: "rgb(244,192,0)",
|
||||||
|
// 石膏板排放: "rgb(242,119,36)",
|
||||||
|
// 建筑卫生陶瓷排放: "rgb(103,169,59)",
|
||||||
|
// 玻璃排放: "rgb(77,148,211)",
|
||||||
|
// 玻纤排放: "rgb(159,159,159)",
|
||||||
|
// 墙体材料: "rgb(84,112,198)",
|
||||||
|
// };
|
||||||
const countryColors = {
|
const countryColors = {
|
||||||
水泥碳排放: "rgb(244,192,0)",
|
'Low carbon cement': "rgb(244,192,0)",
|
||||||
石膏板排放: "rgb(242,119,36)",
|
'Alternative Fuel': "rgb(242,119,36)",
|
||||||
建筑卫生陶瓷排放: "rgb(103,169,59)",
|
'Clean Energy Electricity': "rgb(103,169,59)",
|
||||||
玻璃排放: "rgb(77,148,211)",
|
'Energy Efficiencylmprovement Technology': "rgb(77,148,211)",
|
||||||
玻纤排放: "rgb(159,159,159)",
|
'CCUS': "rgb(159,159,159)",
|
||||||
墙体材料: "rgb(84,112,198)",
|
|
||||||
};
|
};
|
||||||
const years = [2022, 2025, 2030, 2040, 2050, 2060];
|
const years = [2021, 2025, 2030, 2040, 2050, 2060];
|
||||||
export default {
|
export default {
|
||||||
name: "chart",
|
name: "chart",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -39,61 +51,94 @@ export default {
|
||||||
var myChart = echarts.init(chartDom);
|
var myChart = echarts.init(chartDom);
|
||||||
var option;
|
var option;
|
||||||
let startIndex = 0;
|
let startIndex = 0;
|
||||||
|
let data1 = [
|
||||||
|
["Income", "Life Expectancy", "Population", "Country", "Year"],
|
||||||
|
[0, 34.05, 0, "Low carbon cement", 2021],
|
||||||
|
[0, 39, 0, "Alternative Fuel", 2021],
|
||||||
|
[0, 32, 0, "Clean Energy Electricity", 2021],
|
||||||
|
[0, 32.2, 0, "Energy Efficiencylmprovement Technology", 2021],
|
||||||
|
[0, 36.57, 0, "CCUS", 2021],
|
||||||
|
|
||||||
|
[6, 34.05, 6, "Low carbon cement", 2025],
|
||||||
|
[14, 39, 14, "Alternative Fuel", 2025],
|
||||||
|
[6, 32, 6, "Clean Energy Electricity", 2025],
|
||||||
|
[8, 32.2, 8, "Energy Efficiencylmprovement Technology", 2025],
|
||||||
|
[4, 36.5, 4, "CCUS", 2025],
|
||||||
|
|
||||||
|
[33, 34.05, 33, "Low carbon cement", 2030],
|
||||||
|
[26, 39, 26, "Alternative Fuel", 2030],
|
||||||
|
[10, 32, 10, "Clean Energy Electricity", 2030],
|
||||||
|
[18, 32.2, 18, "Energy Efficiencylmprovement Technology", 2030],
|
||||||
|
[9, 36.57, 9, "CCUS", 2030],
|
||||||
|
|
||||||
|
[78, 34.05, 78, "Low carbon cement", 2040],
|
||||||
|
[68, 39, 68, "Alternative Fuel", 2040],
|
||||||
|
[17, 32, 17, "Clean Energy Electricity", 2040],
|
||||||
|
[18, 32.2, 18, "Energy Efficiencylmprovement Technology", 2040],
|
||||||
|
[19, 36.57, 19, "CCUS", 2040],
|
||||||
|
|
||||||
|
[118, 34.05, 118, "Low carbon cement", 2050],
|
||||||
|
[111, 39, 111, "Alternative Fuel", 2050],
|
||||||
|
[23, 32, 23, "Clean Energy Electricity", 2050],
|
||||||
|
[16, 32.2, 16, "Energy Efficiencylmprovement Technology", 2050],
|
||||||
|
[57, 36.57, 57, "CCUS", 2050],
|
||||||
|
|
||||||
|
[118, 34.05, 118, "Low carbon cement", 2060],
|
||||||
|
[177, 39, 117, "Alternative Fuel", 2060],
|
||||||
|
[26, 32, 26, "Clean Energy Electricity", 2060],
|
||||||
|
[16, 32.2, 16, "Energy Efficiencylmprovement Technology", 2060],
|
||||||
|
[254, 36.57, 254, "CCUS", 2060],
|
||||||
|
];
|
||||||
let data = [
|
let data = [
|
||||||
["Income", "Life Expectancy", "Population", "Country", "Year"],
|
["Income", "Life Expectancy", "Population", "Country", "Year"],
|
||||||
[12.09, 34.05, 0, "水泥碳排放", 2022],
|
[0, 34.05, 0, "Low carbon cement", 2021],
|
||||||
[1.31, 39, 0, "石膏板排放", 2022],
|
[0, 39, 0, "Alternative Fuel", 2021],
|
||||||
[1.45, 32, 0, "建筑卫生陶瓷排放", 2022],
|
[0, 32, 0, "Clean Energy Electricity", 2021],
|
||||||
[0.36, 32.2, 0, "玻璃排放", 2022],
|
[0, 32.2, 0, "Energy Efficiencylmprovement Technology", 2021],
|
||||||
[0.12, 36.57, 0, "玻纤排放", 2022],
|
[0, 36.57, 0, "CCUS", 2021],
|
||||||
[0.25, 36.57, 0, "墙体材料", 2022],
|
|
||||||
|
|
||||||
[11.61, 34.05, 6, "水泥碳排放", 2025],
|
[6, 34.05, 6, "Low carbon cement", 2025],
|
||||||
[1.06, 39, 14, "石膏板排放", 2025],
|
[14, 39, 14, "Alternative Fuel", 2025],
|
||||||
[1.16, 32, 6, "建筑卫生陶瓷排放", 2025],
|
[6, 32, 6, "Clean Energy Electricity", 2025],
|
||||||
[0.31, 32.2, 8, "玻璃排放", 2025],
|
[8, 32.2, 8, "Energy Efficiencylmprovement Technology", 2025],
|
||||||
[0.1, 36.5, 4, "玻纤排放", 2025],
|
[3, 36.5, 4, "CCUS", 2025],
|
||||||
[0.23, 36.57, 0, "墙体材料", 2025],
|
|
||||||
|
|
||||||
[9.32, 34.05, 33, "水泥碳排放", 2030],
|
[33, 34.05, 33, "Low carbon cement", 2030],
|
||||||
[0.88, 39, 26, "石膏板排放", 2030],
|
[26, 39, 26, "Alternative Fuel", 2030],
|
||||||
[0.95, 32, 10, "建筑卫生陶瓷排放", 2030],
|
[10, 32, 10, "Clean Energy Electricity", 2030],
|
||||||
[0.27, 32.2, 18, "玻璃排放", 2030],
|
[18, 32.2, 18, "Energy Efficiencylmprovement Technology", 2030],
|
||||||
[0.08, 36.57, 9, "玻纤排放", 2030],
|
[7, 36.57, 9, "CCUS", 2030],
|
||||||
[0.19, 36.57, 9, "墙体材料", 2030],
|
|
||||||
|
|
||||||
[4.61, 34.05, 78, "水泥碳排放", 2040],
|
[118, 34.05, 78, "Low carbon cement", 2040],
|
||||||
[0.63, 39, 68, "石膏板排放", 2040],
|
[68, 39, 68, "Alternative Fuel", 2040],
|
||||||
[0.68, 32, 17, "建筑卫生陶瓷排放", 2040],
|
[17, 32, 17, "Clean Energy Electricity", 2040],
|
||||||
[0.22, 32.2, 18, "玻璃排放", 2040],
|
[18, 32.2, 18, "Energy Efficiencylmprovement Technology", 2040],
|
||||||
[0.06, 36.57, 19, "玻纤排放", 2040],
|
[14, 36.57, 19, "CCUS", 2040],
|
||||||
[0.10, 36.57, 19, "墙体材料", 2040],
|
|
||||||
|
|
||||||
[2.65, 34.05, 118, "水泥碳排放", 2050],
|
[157, 34.05, 118, "Low carbon cement", 2050],
|
||||||
[0.26, 39, 111, "石膏板排放", 2050],
|
[111, 39, 111, "Alternative Fuel", 2050],
|
||||||
[0.27, 32, 23, "建筑卫生陶瓷排放", 2050],
|
[23, 32, 23, "Clean Energy Electricity", 2050],
|
||||||
[0.14, 32.2, 16, "玻璃排放", 2050],
|
[16, 32.2, 16, "Energy Efficiencylmprovement Technology", 2050],
|
||||||
[0.035, 36.57, 57, "玻纤排放", 2050],
|
[41, 36.57, 57, "CCUS", 2050],
|
||||||
[0.055, 36.57, 57, "墙体材料", 2050],
|
|
||||||
|
|
||||||
[1.94, 34.05, 118, "水泥碳排放", 2060],
|
[196, 34.05, 118, "Low carbon cement", 2060],
|
||||||
[0.04, 39, 117, "石膏板排放", 2060],
|
[177, 39, 117, "Alternative Fuel", 2060],
|
||||||
[0.0008, 32, 26, "建筑卫生陶瓷排放", 2060],
|
[26, 32, 26, "Clean Energy Electricity", 2060],
|
||||||
[0.09, 32.2, 16, "玻璃排放", 2060],
|
[16, 32.2, 16, "Energy Efficiencylmprovement Technology", 2060],
|
||||||
[0.022, 36.57, 254, "玻纤排放", 2060],
|
[184, 36.57, 254, "CCUS", 2060],
|
||||||
[0.034, 36.57, 254, "墙体材料", 2060],
|
|
||||||
];
|
];
|
||||||
let startYear = years[startIndex];
|
let startYear = years[startIndex];
|
||||||
option = {
|
option = {
|
||||||
grid: {
|
grid: {
|
||||||
top: 50,
|
top: 50,
|
||||||
bottom: 30,
|
bottom: 30,
|
||||||
left: 150,
|
left: 300,
|
||||||
right: 80,
|
right: 80,
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
max: "13",
|
max: "dataMax",
|
||||||
min: "0.0008",
|
// max: "13",
|
||||||
|
// min: "0.0008",
|
||||||
position: "top",
|
position: "top",
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
// show: false,
|
// show: false,
|
||||||
|
|
@ -186,38 +231,47 @@ export default {
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
}
|
}
|
||||||
//折线
|
//折线
|
||||||
let countries = ["建材行业碳排放总量"];
|
let countries = ["CementCO:Emissions"];
|
||||||
let datasetWithFilters = [];
|
let datasetWithFilters = [];
|
||||||
let seriesList = [];
|
let seriesList = [];
|
||||||
|
let _rawData1 = [
|
||||||
|
["Income", "Country", "Year"],
|
||||||
|
[575, "CementCO:Emissions", 2021],
|
||||||
|
[558, "CementCO:Emissions", 2025],
|
||||||
|
[520, "CementCO:Emissions", 2030],
|
||||||
|
[420, "CementCO:Emissions", 2040],
|
||||||
|
[296, "CementCO:Emissions", 2050],
|
||||||
|
[31, "CementCO:Emissions", 2060],
|
||||||
|
];
|
||||||
let _rawData = [
|
let _rawData = [
|
||||||
["Income", "Country", "Year"],
|
["Income", "Country", "Year"],
|
||||||
[15.6, "建材行业碳排放总量", 2022],
|
[575, "CementCO:Emissions", 2021],
|
||||||
[14.2, "建材行业碳排放总量", 2025],
|
[559, "CementCO:Emissions", 2025],
|
||||||
[11.1, "建材行业碳排放总量", 2030],
|
[523, "CementCO:Emissions", 2030],
|
||||||
[5.7, "建材行业碳排放总量", 2040],
|
[386, "CementCO:Emissions", 2040],
|
||||||
[2.4, "建材行业碳排放总量", 2050],
|
[272, "CementCO:Emissions", 2050],
|
||||||
[0.1, "建材行业碳排放总量", 2060],
|
[23, "CementCO:Emissions", 2060],
|
||||||
];
|
];
|
||||||
var chartDoms = document.getElementById("mains");
|
var chartDoms = document.getElementById("mains");
|
||||||
var myCharts = echarts.init(chartDoms);
|
var myCharts = echarts.init(chartDoms);
|
||||||
datasetWithFilters.push({
|
datasetWithFilters.push({
|
||||||
id: "dataset_建材行业碳排放总量",
|
id: "dataset_CementCO:Emissions",
|
||||||
fromDatasetId: "dataset_raw",
|
fromDatasetId: "dataset_raw",
|
||||||
transform: {
|
transform: {
|
||||||
type: "filter",
|
type: "filter",
|
||||||
config: {
|
config: {
|
||||||
and: [
|
and: [
|
||||||
{ dimension: "Year", gte: 1950 },
|
{ dimension: "Year", gte: 1950 },
|
||||||
{ dimension: "Country", "=": "建材行业碳排放总量" },
|
{ dimension: "Country", "=": "CementCO:Emissions" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
seriesList.push({
|
seriesList.push({
|
||||||
type: "line",
|
type: "line",
|
||||||
datasetId: "dataset_建材行业碳排放总量",
|
datasetId: "dataset_CementCO:Emissions",
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
name: "建材行业碳排放总量",
|
name: "CementCO:Emissions",
|
||||||
endLabel: {
|
endLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
|
|
@ -276,7 +330,8 @@ export default {
|
||||||
name: "",
|
name: "",
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: 140,
|
top:70,
|
||||||
|
left: 300,
|
||||||
},
|
},
|
||||||
series: seriesList,
|
series: seriesList,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
v-model="visible"
|
||||||
|
title="检验记录"
|
||||||
|
:size="'90%'"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="drawer_table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="paramsObj"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="index" width="50" /> -->
|
||||||
|
<el-table-column label="检验类型">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.type2 == 10">
|
||||||
|
{{ type2_[scope.row.type2] }}
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-else type="success">
|
||||||
|
{{ type2_[scope.row.type2] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料批次" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总数" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling }}</span>
|
||||||
|
<span v-else>{{ scope.row.count }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格数">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok }}</span>
|
||||||
|
<span v-else>{{ scope.row.count_ok }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合格率">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok/scope.row.count_sampling*100 }}%</span>
|
||||||
|
<span v-else>{{ scope.row.count_ok/scope.row.count*100 }}%</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验人" prop="test_user_name">
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="操作" fixed="right" width="60">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
v-auth="'ftestwork.update'"
|
||||||
|
@click="table_del(scope.row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
emits: ["closed"],
|
||||||
|
props: {
|
||||||
|
wm: { type: String, default: "" },
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
apiObj: null,
|
||||||
|
paramsObj: {},
|
||||||
|
form: {},
|
||||||
|
type2_: {
|
||||||
|
10: "抽检",
|
||||||
|
20: "全检",
|
||||||
|
},
|
||||||
|
isSaveing: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true;
|
||||||
|
this.paramsObj.wm = this.wm;
|
||||||
|
this.apiObj = this.$API.qm.ftestwork.list;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
table_del(row){
|
||||||
|
this.$API.qm.ftestwork.delete.req(row.id).then((res) => {
|
||||||
|
this.$refs.drawer_table.fetch();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -16,26 +16,26 @@
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料批次" prop="batch">
|
<el-form-item label="检验类型">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.batch"
|
v-model="form.type2"
|
||||||
placeholder="物料批次"
|
placeholder="检验类型"
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleChange"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in typeOption"
|
||||||
:key="item.id"
|
:key="item.value"
|
||||||
:label="item.batch"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.value"
|
||||||
>
|
></el-option>
|
||||||
<span>{{item.batch}}</span>
|
|
||||||
<span style="float:right">({{item.count}})</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="物料批次" prop="batch">
|
||||||
|
<el-input v-model="form.batch" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="总数">
|
<el-form-item label="总数">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -44,34 +44,44 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type2==20">
|
||||||
<el-form-item label="检验数量">
|
<el-form-item label="检验数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:max="batchCount"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
v-model="form.count"
|
v-model="form.count"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
@change="handleCheckChange"
|
@change="handleCountNotokChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type2==20">
|
||||||
|
<el-form-item label="合格数量">
|
||||||
|
<el-input v-model="form.count_ok" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="form.type2==10">
|
||||||
<el-form-item label="抽检数量">
|
<el-form-item label="抽检数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
:max="batchCount"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
v-model="form.count_sampling"
|
v-model="form.count_sampling"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
@change="handleCheckChange"
|
@change="handleCountNotokChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="form.type2==10">
|
||||||
<el-form-item label="合格数量">
|
<el-form-item label="抽检合格数">
|
||||||
<el-input
|
<el-input-number
|
||||||
v-model="form.count_ok"
|
controls-position="right"
|
||||||
|
v-model="form.count_sampling_ok"
|
||||||
|
style="width: 100%"
|
||||||
disabled
|
disabled
|
||||||
></el-input>
|
precision="0"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -85,6 +95,16 @@
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="合格率">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_ok_rate"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="检验日期" prop="test_date">
|
<el-form-item label="检验日期" prop="test_date">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -123,7 +143,6 @@
|
||||||
v-model="count_notok_json.count_n_hd"
|
v-model="count_notok_json.count_n_hd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -135,7 +154,6 @@
|
||||||
v-model="count_notok_json.count_n_wj"
|
v-model="count_notok_json.count_n_wj"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -147,7 +165,6 @@
|
||||||
v-model="count_notok_json.count_n_yd"
|
v-model="count_notok_json.count_n_yd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -159,7 +176,6 @@
|
||||||
v-model="count_notok_json.count_n_txd"
|
v-model="count_notok_json.count_n_txd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -171,7 +187,6 @@
|
||||||
v-model="count_notok_json.count_n_qp"
|
v-model="count_notok_json.count_n_qp"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -183,7 +198,6 @@
|
||||||
v-model="count_notok_json.count_n_swen"
|
v-model="count_notok_json.count_n_swen"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -195,12 +209,21 @@
|
||||||
v-model="count_notok_json.count_n_bb"
|
v-model="count_notok_json.count_n_bb"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="小崩边">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_xbb"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="划伤">
|
<el-form-item label="划伤">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -208,7 +231,6 @@
|
||||||
v-model="count_notok_json.count_n_hs"
|
v-model="count_notok_json.count_n_hs"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -220,7 +242,6 @@
|
||||||
v-model="count_notok_json.count_n_md"
|
v-model="count_notok_json.count_n_md"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -233,7 +254,17 @@
|
||||||
v-model="count_notok_json.count_n_ps"
|
v-model="count_notok_json.count_n_ps"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
precision="0"
|
precision="0"
|
||||||
|
@change="handleCountChange"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="其他">
|
||||||
|
<el-input-number
|
||||||
|
controls-position="right"
|
||||||
|
v-model="count_notok_json.count_n_qt"
|
||||||
|
style="width: 100%"
|
||||||
|
precision="0"
|
||||||
@change="handleCountChange"
|
@change="handleCountChange"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -243,7 +274,7 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||||
>保存</el-button>
|
>提交</el-button>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -273,10 +304,12 @@ export default {
|
||||||
test_date: "",
|
test_date: "",
|
||||||
batch: "",
|
batch: "",
|
||||||
count: null,
|
count: null,
|
||||||
count_ok: null,
|
count_ok: 0,
|
||||||
|
count_sampling_ok:'',
|
||||||
count_notok: 0,
|
count_notok: 0,
|
||||||
count_notok_json:{}
|
count_notok_json:{}
|
||||||
},
|
},
|
||||||
|
count_ok_rate:100,
|
||||||
count_notok_json:{
|
count_notok_json:{
|
||||||
//尺寸
|
//尺寸
|
||||||
count_n_wj: 0,
|
count_n_wj: 0,
|
||||||
|
|
@ -289,40 +322,36 @@ export default {
|
||||||
count_n_hs: 0,
|
count_n_hs: 0,
|
||||||
count_n_md: 0,
|
count_n_md: 0,
|
||||||
count_n_bb:0,
|
count_n_bb:0,
|
||||||
|
count_n_xbb:0,
|
||||||
count_n_ps: 0,
|
count_n_ps: 0,
|
||||||
count_n_qt:0,
|
count_n_qt:0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
test_date: [
|
test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}],
|
||||||
{
|
batch: [{required: true,message: "请选择物料批次",trigger: "blur"}],
|
||||||
required: true,
|
test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}],
|
||||||
message: "请选择检验日期",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
batch: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择物料批次",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
|
options: [],
|
||||||
|
userList : [],
|
||||||
|
typeOption:[
|
||||||
|
{name:'全检',value:20},
|
||||||
|
{name:'抽检',value:10},
|
||||||
|
],
|
||||||
|
selectionFilters: [],
|
||||||
batchCount:null,
|
batchCount:null,
|
||||||
formCount:null,
|
formCount:null,
|
||||||
visible: false,
|
visible: false,
|
||||||
|
supplier:null,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
|
||||||
userList : [],
|
|
||||||
selectionFilters: [],
|
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.batchCount = this.itemObj.count;
|
this.batchCount = this.itemObj.count_cando;
|
||||||
this.form.batch = this.itemObj.batch;
|
this.form.batch = this.itemObj.batch;
|
||||||
this.form.wm = this.itemObj.id;
|
this.form.wm = this.itemObj.id;
|
||||||
this.form.count = this.itemObj.count;
|
this.form.count = this.itemObj.count_cando;
|
||||||
|
this.form.supplier = this.itemObj.supplier;
|
||||||
this.deptID = this.$TOOL.data.get('gx_deptID');
|
this.deptID = this.$TOOL.data.get('gx_deptID');
|
||||||
this.getUsers();
|
this.getUsers();
|
||||||
},
|
},
|
||||||
|
|
@ -332,7 +361,6 @@ export default {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.modeTitle = mode+'抽检';
|
this.modeTitle = mode+'抽检';
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
getUsers(){
|
getUsers(){
|
||||||
|
|
@ -351,9 +379,6 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCheckChange(){
|
|
||||||
this.form.count_ok = this.form.count-this.form.count_notok;
|
|
||||||
},
|
|
||||||
handleCountChange(type){
|
handleCountChange(type){
|
||||||
this.form.count_notok =
|
this.form.count_notok =
|
||||||
this.count_notok_json.count_n_wj+
|
this.count_notok_json.count_n_wj+
|
||||||
|
|
@ -364,12 +389,20 @@ export default {
|
||||||
this.count_notok_json.count_n_swen+
|
this.count_notok_json.count_n_swen+
|
||||||
this.count_notok_json.count_n_hs+
|
this.count_notok_json.count_n_hs+
|
||||||
this.count_notok_json.count_n_bb+
|
this.count_notok_json.count_n_bb+
|
||||||
|
this.count_notok_json.count_n_xbb+
|
||||||
this.count_notok_json.count_n_md+
|
this.count_notok_json.count_n_md+
|
||||||
this.count_notok_json.count_n_ps;
|
this.count_notok_json.count_n_ps+
|
||||||
this.form.count_ok = this.form.count - this.form.count_notok;
|
this.count_notok_json.count_n_qt;
|
||||||
|
this.handleCountNotokChange();
|
||||||
},
|
},
|
||||||
handleCountNotokChange(){
|
handleCountNotokChange(){
|
||||||
this.form.count_ok = this.form.count - this.form.count_notok;
|
if(this.form.type2==10){//抽检
|
||||||
|
this.form.count_sampling_ok = this.form.count_sampling - this.form.count_notok;
|
||||||
|
this.count_ok_rate = ((this.form.count_sampling_ok/this.form.count_sampling)*100).toFixed(2);
|
||||||
|
}else if(this.form.type2==20){//全检
|
||||||
|
this.form.count_ok = this.form.count - this.form.count_notok;
|
||||||
|
this.count_ok_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//获取物料批次
|
//获取物料批次
|
||||||
getMaterialBatch() {
|
getMaterialBatch() {
|
||||||
|
|
@ -398,17 +431,28 @@ export default {
|
||||||
this.count_notok_json.count_n_swen+
|
this.count_notok_json.count_n_swen+
|
||||||
this.count_notok_json.count_n_hs+
|
this.count_notok_json.count_n_hs+
|
||||||
this.count_notok_json.count_n_bb+
|
this.count_notok_json.count_n_bb+
|
||||||
|
this.count_notok_json.count_n_xbb+
|
||||||
this.count_notok_json.count_n_md+
|
this.count_notok_json.count_n_md+
|
||||||
this.count_notok_json.count_n_ps;
|
this.count_notok_json.count_n_ps+
|
||||||
if(count_notok>this.form.count_notok){
|
this.count_notok_json.count_n_qt;
|
||||||
this.$notify.error("不合格数量有问题");
|
if(count_notok>that.form.count_notok){
|
||||||
|
that.$notify.error("不合格数量有问题");
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
}else{
|
}else{
|
||||||
if(count_notok<this.form.count_notok){
|
if(count_notok<that.form.count_notok){
|
||||||
that.count_notok_json.count_n_qt = this.form.count_notok-count_notok;
|
that.count_notok_json.count_n_qt = that.form.count_notok-count_notok;
|
||||||
|
}
|
||||||
|
if(that.supplier!== null&&that.form.type2==10){
|
||||||
|
that.form.need_update_wm = false;
|
||||||
|
}
|
||||||
|
// that.form.count_ok = that.form.count-that.form.count_notok;
|
||||||
|
if(that.form.type2==10){//抽检
|
||||||
|
that.form.count_sampling_ok = that.form.count_sampling - that.form.count_notok;
|
||||||
|
}else{//全检
|
||||||
|
that.form.count_ok = that.form.count - that.form.count_notok;
|
||||||
}
|
}
|
||||||
that.form.count_ok = this.form.count-this.form.count_notok;
|
|
||||||
that.form.count_notok_json = that.count_notok_json;
|
that.form.count_notok_json = that.count_notok_json;
|
||||||
|
console.log('that.form',that.form)
|
||||||
that.$API.qm.ftestwork.create.req(that.form)
|
that.$API.qm.ftestwork.create.req(that.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.$API.qm.ftestwork.submit.req(res.id)
|
that.$API.qm.ftestwork.submit.req(res.id)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,547 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="titleMap[mode]"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container v-loading="loading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-position="right"
|
||||||
|
label-width="100px"
|
||||||
|
style="padding: 0 10px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="生产设备">
|
||||||
|
<el-select
|
||||||
|
v-model="form.equipment"
|
||||||
|
placeholder="生产设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
class="width100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
<span style="float:right">{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="个人任务">
|
||||||
|
<el-select
|
||||||
|
v-model="form.mtaskb"
|
||||||
|
placeholder="个人任务"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
class="width100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in mtaskbOtions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.handle_user_name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.handle_user_name}}</span>
|
||||||
|
<span style="float:right">{{item.count}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="开始时间" prop="work_start_time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.work_start_time"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
class="width100"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="结束时间" prop="work_end_time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.work_end_time"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
class="width100"
|
||||||
|
:disabledDate="disabledDateFn"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="班次">
|
||||||
|
<el-select
|
||||||
|
v-model="form.shift"
|
||||||
|
placeholder="班次"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
class="width100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOtions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="批次号" prop="wm_in">
|
||||||
|
<el-select
|
||||||
|
v-model="form.wm_in"
|
||||||
|
placeholder="交接物料"
|
||||||
|
clearable
|
||||||
|
class="width100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span style="flex:1;margin-right:15px!important;">{{ item.batch }}</span>
|
||||||
|
<span style="flex:1;">{{ item.count }}</span>
|
||||||
|
</div>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="领用数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_use"
|
||||||
|
:min="1"
|
||||||
|
controls-position="right"
|
||||||
|
class="width100"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="加工前不良" prop="count_pn_jgqbl">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_pn_jgqbl"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="实际生产数">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_real"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChanges"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="合格数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_ok"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="不合格数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_notok"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
@change="countChanges"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input
|
||||||
|
v-model="form.note"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="划伤">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_hs"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="气泡">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_qp"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="水纹">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_swen"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="崩边">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_bb"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="雾面">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_wm"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="小崩边">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_xbb"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="麻点">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_md"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="线痕">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_xh"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="破损">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_ps"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="棕圈">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_zq"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="其他">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_qt"
|
||||||
|
:min="0"
|
||||||
|
class="width100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const defaultForm = {
|
||||||
|
batch: null,
|
||||||
|
equipment: null,
|
||||||
|
mtaskb: null,
|
||||||
|
shift: null,
|
||||||
|
wm_in: null,
|
||||||
|
fmlog:null,
|
||||||
|
work_start_time:'',
|
||||||
|
work_end_time:'',
|
||||||
|
material_out:'',
|
||||||
|
count_pn_jgqbl:0,
|
||||||
|
count_use:0,
|
||||||
|
count_real: 0,
|
||||||
|
count_ok: 0,
|
||||||
|
count_notok: 0,
|
||||||
|
count_n_hs: 0,
|
||||||
|
count_n_qp: 0,
|
||||||
|
count_n_swen: 0,
|
||||||
|
count_n_bb: 0,
|
||||||
|
count_n_xbb:0,
|
||||||
|
count_n_md: 0,
|
||||||
|
count_n_xh: 0,
|
||||||
|
count_n_ps: 0,
|
||||||
|
count_n_qt: 0,
|
||||||
|
count_n_wm: 0,
|
||||||
|
count_n_zq:0,
|
||||||
|
note:''
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
fmlog: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroup: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mtask: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return this.titleMap[this.mode];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
titleMap: {
|
||||||
|
add: "新增日志",
|
||||||
|
edit: "编辑日志",
|
||||||
|
show: "查看日志",
|
||||||
|
},
|
||||||
|
//表单数据
|
||||||
|
form: Object.assign({}, defaultForm),
|
||||||
|
//验证规则
|
||||||
|
rules: {
|
||||||
|
work_start_time: [{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||||
|
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||||
|
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
||||||
|
},
|
||||||
|
material_in:'',
|
||||||
|
material_out:'',
|
||||||
|
shiftOtions:[],
|
||||||
|
mtaskbOtions:[],
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
options: [],
|
||||||
|
routeOptions: [],
|
||||||
|
supplierOptions: [],
|
||||||
|
materialOptions:[],
|
||||||
|
setFiltersVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getShift();
|
||||||
|
this.getMgroup();
|
||||||
|
this.getMtask();
|
||||||
|
this.getMtaskb();
|
||||||
|
console.log('this.fmlog',this.fmlog)
|
||||||
|
this.form.fmlog = this.fmlog;
|
||||||
|
console.log('this.form.fmlog',this.form.fmlog)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
disabledDateFn(time) {
|
||||||
|
return time.getTime() > new Date().getTime();
|
||||||
|
},
|
||||||
|
getShift(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||||
|
that.shiftOtions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMgroup(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => {
|
||||||
|
that.deptId = res.belong_dept;
|
||||||
|
that.process = res.process;
|
||||||
|
that.getEquipment();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getEquipment() {
|
||||||
|
let that = this;
|
||||||
|
that.options = [];
|
||||||
|
that.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup }).then((res) => {
|
||||||
|
res.forEach((item) => {
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj, item);
|
||||||
|
obj.label = item.name+'-'+item.number;
|
||||||
|
that.options.push(obj);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMtask() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.pm.mtask.item.req(that.mtask).then(res=>{
|
||||||
|
that.material_in = res.material_in;
|
||||||
|
that.material_out = that.form.material_out = res.material_out;
|
||||||
|
that.getMaterial();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMtaskb() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.pm.mtaskb.list.req({ page: 0, mtask:that.mtask }).then((res) => {
|
||||||
|
that.mtaskbOtions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取车间物料
|
||||||
|
getMaterial() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.wmaterial.list.req({mgroupx: that.mgroup,material: that.material_in,page: 0,}).then((res) => {
|
||||||
|
that.materialOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//显示
|
||||||
|
open(mode = "add") {
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
console.log("data", data);
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
},
|
||||||
|
countChange() {
|
||||||
|
this.form.count_notok =
|
||||||
|
this.form.count_n_hs +
|
||||||
|
this.form.count_n_qp +
|
||||||
|
this.form.count_n_swen +
|
||||||
|
this.form.count_n_bb +
|
||||||
|
this.form.count_n_xbb +
|
||||||
|
this.form.count_n_md +
|
||||||
|
this.form.count_n_xh +
|
||||||
|
this.form.count_n_ps +
|
||||||
|
this.form.count_n_zq +
|
||||||
|
this.form.count_n_qt +
|
||||||
|
this.form.count_n_wm;
|
||||||
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
|
},
|
||||||
|
countChanges(){
|
||||||
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
submit() {
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.form.mgroup = that.mgroup;
|
||||||
|
if (that.mode === "add") {
|
||||||
|
that.$API.wpm.mlog.create.req(that.form).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let obj = {};
|
||||||
|
obj.work_end_time = that.form.work_end_time;
|
||||||
|
obj.handle_user = that.form.handle_user;
|
||||||
|
obj.note = that.form.note;
|
||||||
|
that.$API.wpm.mlog.update.req(that.form.id, that.form).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.form_unit {
|
||||||
|
position: absolute;
|
||||||
|
right: -25px;
|
||||||
|
}
|
||||||
|
.width100{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,312 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="日志详情"
|
||||||
|
v-model="visible"
|
||||||
|
:size="'90%'"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container>
|
||||||
|
<el-header style="height:100px;padding:0">
|
||||||
|
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||||
|
<el-descriptions>
|
||||||
|
<el-descriptions-item label="工艺路线">{{
|
||||||
|
fmlogItem.routepack_name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务编号">{{
|
||||||
|
fmlogItem.mtask_number
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="部门/车间">{{
|
||||||
|
fmlogItem.belong_dept_name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
</el-header>
|
||||||
|
|
||||||
|
<!-- mlog -->
|
||||||
|
<el-main style="padding-top: 40px;position: relative;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="position: absolute;top: 5px;"
|
||||||
|
v-if="fmlogItem.submit_time == null"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="table_add"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
<scTable
|
||||||
|
stripe
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
@row-click="table_detail"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template #default="props">
|
||||||
|
<div style="padding-left: 50px">
|
||||||
|
<el-descriptions :column="2">
|
||||||
|
<template v-for="item in props.row.mlogb_full" :key="item.id">
|
||||||
|
<el-descriptions-item :label="item.material_out!==null?'输出物料':'输入物料'">
|
||||||
|
<span v-if="item.material_out!==null">{{item.batch}}</span>
|
||||||
|
<span v-else>{{item.batch}}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</template>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-descriptions :column="4">
|
||||||
|
<el-descriptions-item label="划伤" v-if="props.row.count_n_hs>0">
|
||||||
|
{{props.row.count_n_hs}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="气泡" v-if="props.row.count_n_qp>0">
|
||||||
|
{{props.row.count_n_qp}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="水纹" v-if="props.row.count_n_swen>0">
|
||||||
|
{{props.row.count_n_swen}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="崩边" v-if="props.row.count_n_bb>0">
|
||||||
|
{{props.row.count_n_bb}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="小崩边" v-if="props.row.count_n_xbb>0">
|
||||||
|
{{props.row.count_n_xbb}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="雾面" v-if="props.row.count_n_wm>0">
|
||||||
|
{{props.row.count_n_wm}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="麻点" v-if="props.row.count_n_md>0">
|
||||||
|
{{props.row.count_n_md}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="线痕" v-if="props.row.count_n_xh>0">
|
||||||
|
{{props.row.count_n_xh}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="破损" v-if="props.row.count_n_ps>0">
|
||||||
|
{{props.row.count_n_ps}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作员" prop="handle_user_name" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="设备" prop="equipment_name" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="领料数" prop="count_use"></el-table-column>
|
||||||
|
<el-table-column label="加工数" prop="count_real"></el-table-column>
|
||||||
|
<el-table-column label="加工前不良" prop="count_pn_jgqbl"></el-table-column>
|
||||||
|
<el-table-column label="合格数" prop="count_ok"></el-table-column>
|
||||||
|
<el-table-column label="不合格数" prop="count_notok"></el-table-column>
|
||||||
|
<el-table-column label="开始时间" prop="work_start_time"></el-table-column>
|
||||||
|
<el-table-column label="结束时间" prop="work_end_time"></el-table-column>
|
||||||
|
<el-table-column label="班次" prop="shift_name"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="100"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link size="small" v-auth="'mlog.update'"
|
||||||
|
v-if="scope.row.submit_time == null" type="primary"
|
||||||
|
@click.stop="table_edit(scope.row)"
|
||||||
|
>编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button link size="small" v-auth="'mlog.submit'"
|
||||||
|
v-if="scope.row.submit_time == null" type="primary"
|
||||||
|
@click.stop="mlogSubmit(scope.row)"
|
||||||
|
>提交
|
||||||
|
</el-button>
|
||||||
|
<el-button link size="small" v-auth="'mlog.delete'" type="danger"
|
||||||
|
v-if="scope.row.submit_time == null"
|
||||||
|
@click.stop="table_del(scope.row)"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
<el-button link v-else size="small" type="danger"
|
||||||
|
@click.stop="mlogRevert(scope.row)"
|
||||||
|
>撤回
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
:fmlog="params.fmlog"
|
||||||
|
:mgroup="mgroup"
|
||||||
|
:mtask="mtask"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
|
</save-dialog>
|
||||||
|
<check-dialog
|
||||||
|
v-if="dialog.check"
|
||||||
|
ref="checkDialog"
|
||||||
|
@success="handleCheckSuccess"
|
||||||
|
@closed="dialog.check = false"
|
||||||
|
>
|
||||||
|
</check-dialog>
|
||||||
|
</el-container>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import saveDialog from "./f_mlogs_form.vue";
|
||||||
|
import checkDialog from "./mlogb_check.vue";
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
fmlogId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
saveDialog,
|
||||||
|
checkDialog,
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
//表单数据
|
||||||
|
form: {},
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
edit: false,
|
||||||
|
check: false,
|
||||||
|
},
|
||||||
|
apiObj: null,
|
||||||
|
params: {
|
||||||
|
page: 0,
|
||||||
|
fmlog: "",
|
||||||
|
},
|
||||||
|
mgroup: "",
|
||||||
|
fmlogItem: {},
|
||||||
|
saveInForm: {
|
||||||
|
count_use: 0,
|
||||||
|
count_pn_jgqbl: 0,
|
||||||
|
},
|
||||||
|
oinfo_json:{
|
||||||
|
退火炉号:'',
|
||||||
|
退火时间:'',
|
||||||
|
退火温度:'',
|
||||||
|
抽检结果:'',
|
||||||
|
抽检数:'',
|
||||||
|
强度落球:'',
|
||||||
|
},
|
||||||
|
fileList:[],
|
||||||
|
test_file:'',
|
||||||
|
deptId: "",
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
options: [],
|
||||||
|
saveInDialog: false,
|
||||||
|
ticketDialog:false,
|
||||||
|
setFiltersVisible: false,
|
||||||
|
rules: {
|
||||||
|
count_use: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入领取数量",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getfmlogItem();
|
||||||
|
this.params.fmlog = this.fmlogId;
|
||||||
|
console.log('this.params.fmlog',this.params.fmlog);
|
||||||
|
this.apiObj = this.$API.wpm.mlog.list;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
getfmlogItem() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.fmlog.item.req(that.fmlogId).then((res) => {
|
||||||
|
that.fmlogItem = res;
|
||||||
|
that.mgroup = res.mgroup;
|
||||||
|
that.mtask = res.mtask;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
this.getRoute(data.id);
|
||||||
|
},
|
||||||
|
table_add() {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open('add');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
table_edit(row){
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open('edit').setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
mlogSubmit(row) {
|
||||||
|
let that = this;
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.$API.wpm.mlog.submit.req(row.id).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//日志撤回
|
||||||
|
mlogRevert(row) {
|
||||||
|
this.$confirm(`确定撤回该日志吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
var id = row.id;
|
||||||
|
this.$API.wpm.mlog.revert.req(id).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
this.$message.error(res.err_msg);
|
||||||
|
} else {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
this.$message.success("撤回成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//日志删除
|
||||||
|
table_del(row) {
|
||||||
|
let that = this;
|
||||||
|
this.$confirm(`确定删除该日志吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
var id = row.id;
|
||||||
|
this.$API.wpm.mlog.delete.req(id).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
this.$message.error(res.err_msg);
|
||||||
|
} else {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSaveSuccess() {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
handleCheckSuccess() {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
fileUPSuccess(res) {
|
||||||
|
console.log('res',res);
|
||||||
|
this.test_file = res.id;
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
|
|
@ -0,0 +1,232 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="titleMap[mode]"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-container v-loading="loading">
|
||||||
|
<el-main style="padding: 0 20px 20px 20px">
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
style="padding: 0 10px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="工艺路线" prop="route">
|
||||||
|
<el-select
|
||||||
|
v-model="form.route"
|
||||||
|
placeholder="工艺路线"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="mode == 'edit'"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in routeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.routepack_name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
>{{ item.routepack_name }}-{{
|
||||||
|
item.process_name
|
||||||
|
}}</span
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="关联任务">
|
||||||
|
<el-select
|
||||||
|
v-model="form.mtask"
|
||||||
|
placeholder="关联任务"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<!-- <span>{{ item.material_out_name }}</span>/ -->
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input
|
||||||
|
v-model="form.note"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const defaultForm = {
|
||||||
|
route: "",
|
||||||
|
mtask:"",
|
||||||
|
mgroup:"",
|
||||||
|
note:'',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
process: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroupName:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mgroup: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
dept: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return this.titleMap[this.mode];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
titleMap: {
|
||||||
|
add: "新增日志",
|
||||||
|
edit: "编辑日志",
|
||||||
|
show: "查看日志",
|
||||||
|
},
|
||||||
|
//表单数据
|
||||||
|
form: Object.assign({}, defaultForm),
|
||||||
|
//验证规则
|
||||||
|
rules: {
|
||||||
|
|
||||||
|
route: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择工艺路线",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
options: [],
|
||||||
|
routeOptions: [],
|
||||||
|
setFiltersVisible: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getRoute();
|
||||||
|
this.getMtask();
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
disabledDateFn(time) {
|
||||||
|
return time.getTime() > new Date().getTime();
|
||||||
|
},
|
||||||
|
getMtask() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.pm.mtask.list
|
||||||
|
.req({ page: 0, mgroup: that.mgroup, state: 20 })
|
||||||
|
.then((res) => {
|
||||||
|
that.options = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getRoute(id) {
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.route.list
|
||||||
|
.req({ process: that.process, page: 0, routepack__state: 30 })
|
||||||
|
.then((res) => {
|
||||||
|
that.routeOptions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//显示
|
||||||
|
open(mode = "add") {
|
||||||
|
this.mode = mode;
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
console.log("data", data);
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
this.getRoute(data.id);
|
||||||
|
},
|
||||||
|
|
||||||
|
//表单提交方法
|
||||||
|
submit() {
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
if (that.mode === "add") {
|
||||||
|
that.form.mgroup = that.mgroup;
|
||||||
|
that.$API.wpm.fmlog.create.req(that.form).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
that.$API.wpm.fmlog.update.req(that.form.id, that.form).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.form_unit {
|
||||||
|
position: absolute;
|
||||||
|
right: -25px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,215 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="table_add"
|
||||||
|
v-auth="'mlog.create'"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input
|
||||||
|
style="margin-right: 5px"
|
||||||
|
v-model="query.search"
|
||||||
|
placeholder="名称"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
@row-click="table_detail"
|
||||||
|
>
|
||||||
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="工艺路线" prop="routepack_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="任务编号" prop="mtask_number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="部门/工段" prop="belong_dept_name">
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||||
|
<el-table-column label="备注" prop="note"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
v-auth="'mlog.update'"
|
||||||
|
v-if="scope.row.submit_time == null"
|
||||||
|
type="primary"
|
||||||
|
@click.stop="table_edit(scope.row)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
@click="table_detail(scope.row)"
|
||||||
|
type="primary"
|
||||||
|
>详情</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
v-auth="'mlog.delete'"
|
||||||
|
type="danger"
|
||||||
|
v-if="scope.row.submit_time == null"
|
||||||
|
@click.stop="table_del(scope.row, scope.$index)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
:process="processId"
|
||||||
|
:mgroup="mgroupId"
|
||||||
|
:dept="deptId"
|
||||||
|
:mgroupName = "mgroupName"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
>
|
||||||
|
</save-dialog>
|
||||||
|
<detail-drawer
|
||||||
|
v-if="dialog.detail"
|
||||||
|
ref="detailDialog"
|
||||||
|
:fmlogId="fmlogId"
|
||||||
|
@closed="detailClose"
|
||||||
|
>
|
||||||
|
</detail-drawer>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import saveDialog from "./fmlog_form.vue";
|
||||||
|
import detailDrawer from "./fmlog_detail.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
mgroupName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "mlog",
|
||||||
|
components: {
|
||||||
|
saveDialog,
|
||||||
|
detailDrawer,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: null,
|
||||||
|
params: { mgroup: "" },
|
||||||
|
query: {},
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
detail: false,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
selection: [],
|
||||||
|
mtask: "",
|
||||||
|
mlogId: "",
|
||||||
|
deptId: null,
|
||||||
|
processId: "",
|
||||||
|
processCate: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.list
|
||||||
|
.req({ page: 0, search: that.mgroupName })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.length < 1) {
|
||||||
|
that.$message.error("获取工段错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
that.mgroupId = res[0].id;
|
||||||
|
that.deptId = res[0].belong_dept;
|
||||||
|
that.processId = res[0].process;
|
||||||
|
that.processCate = res[0].process_cate;
|
||||||
|
that.params.mgroup = res[0].id;
|
||||||
|
that.apiObj = that.$API.wpm.fmlog.list;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
detailClose() {
|
||||||
|
this.dialog.detail = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
//添加日志
|
||||||
|
table_add() {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//编辑日志
|
||||||
|
table_edit(row) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//日志详情
|
||||||
|
table_detail(row) {
|
||||||
|
this.fmlogId = row.id;
|
||||||
|
this.dialog.detail = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.detailDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//日志删除
|
||||||
|
table_del(row) {
|
||||||
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
var id = row.id;
|
||||||
|
this.$API.wpm.fmlog.delete.req(id).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
this.$message.error(res.err_msg);
|
||||||
|
} else {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection) {
|
||||||
|
this.selection = selection;
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
//本地更新数据
|
||||||
|
//新增岗位后更新数据
|
||||||
|
handleSaveSuccess(data, mode) {
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
||||||
|
|
@ -16,6 +16,11 @@
|
||||||
v-auth="'handover.create'"
|
v-auth="'handover.create'"
|
||||||
>返工</el-button
|
>返工</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="printSetting"
|
||||||
|
>打印机</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
|
|
@ -67,27 +72,44 @@
|
||||||
type="index"
|
type="index"
|
||||||
width="50"
|
width="50"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template #default="props">
|
||||||
|
<div style="padding-left: 50px">
|
||||||
|
<template v-for="item in props.row.handoverb" :key="item.id">
|
||||||
|
<el-descriptions :column="3">
|
||||||
|
<el-descriptions-item label="批次">
|
||||||
|
{{item.batch}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="数量">
|
||||||
|
{{item.count}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="不合格标记" v-if="item.notok_sign_name!==null">
|
||||||
|
{{item.notok_sign_name}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="物料"
|
label="物料"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="批次" prop="batch" min-width="140">
|
<el-table-column label="批次" prop="batch" min-width="140">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-text v-if="scope.row.handoverb.length>0" type="primary">{{scope.row.handoverb.length}}批</el-text>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
||||||
<el-table-column label="交接类型" prop="type" width="100">
|
<el-table-column label="交接类型" prop="type" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope" v-if="mgroupName=='size'||mgroupName=='facade'">
|
||||||
<el-text
|
<el-text v-if="scope.row.send_dept == deptId" type="primary">交送</el-text>
|
||||||
v-if="scope.row.send_mgroup == mgroupId"
|
<el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
|
||||||
type="primary"
|
</template>
|
||||||
>交送</el-text
|
<template #default="scope" v-else>
|
||||||
>
|
<el-text v-if="scope.row.send_mgroup == mgroupId" type="primary">交送</el-text>
|
||||||
<span style="width: 4px;"></span>
|
<el-text v-if="scope.row.recive_mgroup == mgroupId" type="success">接收</el-text>
|
||||||
<el-text
|
|
||||||
v-if="scope.row.recive_mgroup == mgroupId"
|
|
||||||
type="success"
|
|
||||||
>接收</el-text
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交接类别" prop="type" width="80">
|
<el-table-column label="交接类别" prop="type" width="80">
|
||||||
|
|
@ -98,9 +120,12 @@
|
||||||
<el-tag v-if="scope.row.type == 20" type="warning"
|
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||||
>返工</el-tag
|
>返工</el-tag
|
||||||
>
|
>
|
||||||
<el-tag v-if="scope.row.type == 30" type="warning"
|
<el-tag v-if="scope.row.type == 30" type="primary"
|
||||||
>检验</el-tag
|
>检验</el-tag
|
||||||
>
|
>
|
||||||
|
<el-tag v-if="scope.row.type == 40" type="danger"
|
||||||
|
>报废</el-tag
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -138,12 +163,14 @@
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_receive(scope.row)"
|
@click="table_receive(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
v-if="
|
v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null"
|
||||||
scope.row.recive_mgroup == mgroupId &&
|
>接收</el-button>
|
||||||
scope.row.submit_time == null
|
<el-button
|
||||||
"
|
link
|
||||||
>接收</el-button
|
size="small"
|
||||||
>
|
@click="table_show(scope.row)"
|
||||||
|
type="success"
|
||||||
|
>查看</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -238,8 +265,10 @@ export default {
|
||||||
selection: [],
|
selection: [],
|
||||||
handoverItem: {},
|
handoverItem: {},
|
||||||
values: "交送",
|
values: "交送",
|
||||||
|
deptId:'',
|
||||||
mtask: "",
|
mtask: "",
|
||||||
mlogId: "",
|
mlogId: "",
|
||||||
|
mgroupId: "",
|
||||||
processId: "",
|
processId: "",
|
||||||
processCate: "",
|
processCate: "",
|
||||||
printer_name: "",
|
printer_name: "",
|
||||||
|
|
@ -248,12 +277,27 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
console.log('that.mgroupName',that.mgroupName);
|
||||||
if(that.mgroupName=="size"){//尺寸检验
|
if(that.mgroupName=="size"){//尺寸检验
|
||||||
that.params.material__process__name="一次超洗";
|
// that.params.material__process__name="一次超洗";
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.deptId = res[0].id;
|
||||||
|
that.params.dept=res[0].id;
|
||||||
|
console.log('that.deptId',that.deptId);
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
|
})
|
||||||
}else if(that.mgroupName=="facade"){//外观检验
|
}else if(that.mgroupName=="facade"){//外观检验
|
||||||
that.params.material__process__name="二次超洗";
|
// that.params.material__process__name="二次超洗";
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.deptId = res[0].id;
|
||||||
|
that.params.dept=res[0].id;
|
||||||
|
console.log('that.deptId',that.deptId);
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
|
})
|
||||||
}else{//工段交接
|
}else{//工段交接
|
||||||
that.printer_name = localStorage.getItem("printer_name");
|
that.printer_name = localStorage.getItem("printer_name");
|
||||||
that.$API.mtm.mgroup.list
|
that.$API.mtm.mgroup.list
|
||||||
|
|
@ -273,6 +317,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
printSetting(){
|
||||||
|
this.setNameVisible = true;
|
||||||
|
},
|
||||||
handoverPrint() {
|
handoverPrint() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let str = [
|
let str = [
|
||||||
|
|
@ -324,6 +371,13 @@ export default {
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
table_show(row){
|
||||||
|
this.type=row.type;
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("show").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
var id = row.id;
|
var id = row.id;
|
||||||
|
|
@ -346,14 +400,26 @@ export default {
|
||||||
searchTypeQuery() {
|
searchTypeQuery() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.searchType == "send") {
|
if (that.searchType == "send") {
|
||||||
that.query.send_mgroup = that.mgroupId;
|
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
||||||
that.query.recive_mgroup = "";
|
that.query.send_dept = that.deptId;
|
||||||
|
that.query.recive_dept = "";
|
||||||
|
}else{
|
||||||
|
that.query.send_mgroup = that.mgroupId;
|
||||||
|
that.query.recive_mgroup = "";
|
||||||
|
}
|
||||||
} else if (that.searchType == "recive") {
|
} else if (that.searchType == "recive") {
|
||||||
that.query.recive_mgroup = that.mgroupId;
|
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
||||||
that.query.send_mgroup = "";
|
that.query.send_dept = "";
|
||||||
|
that.query.recive_dept =that.deptId;
|
||||||
|
}else{
|
||||||
|
that.query.recive_mgroup = that.mgroupId;
|
||||||
|
that.query.send_mgroup = "";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
that.query.send_mgroup = "";
|
that.query.send_mgroup = "";
|
||||||
that.query.recive_mgroup = "";
|
that.query.recive_mgroup = "";
|
||||||
|
that.query.recive_dept = "";
|
||||||
|
that.query.send_dept = "";
|
||||||
}
|
}
|
||||||
console.log(that.query);
|
console.log(that.query);
|
||||||
this.$refs.table.queryData(that.query);
|
this.$refs.table.queryData(that.query);
|
||||||
|
|
|
||||||
|
|
@ -14,35 +14,6 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item label="交接物料" prop="wm">
|
|
||||||
<el-select
|
|
||||||
v-model="form.wm"
|
|
||||||
placeholder="交接物料"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
@change="materialChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in materialOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.batch"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
<span>{{ item.batch }}</span>
|
|
||||||
<div style="float: right">
|
|
||||||
<span>{{ item.count }}</span>
|
|
||||||
<span
|
|
||||||
v-if="item.notok_sign_name !== null"
|
|
||||||
style="color: #aaaaaa"
|
|
||||||
>({{ item.notok_sign_name }})</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="交送日期" prop="send_date">
|
<el-form-item label="交送日期" prop="send_date">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -55,7 +26,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<!-- <el-col :md="12" :sm="24">
|
||||||
<el-form-item label="交接数量" width="100">
|
<el-form-item label="交接数量" width="100">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count"
|
v-model="form.count"
|
||||||
|
|
@ -68,7 +39,7 @@
|
||||||
>
|
>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="交送人" prop="send_user">
|
<el-form-item label="交送人" prop="send_user">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -91,7 +62,7 @@
|
||||||
<el-form-item label="接收部门" prop="recive_dept">
|
<el-form-item label="接收部门" prop="recive_dept">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.recive_dept"
|
v-model="form.recive_dept"
|
||||||
placeholder="接收工段"
|
placeholder="接收部门"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="getUserList3"
|
@change="getUserList3"
|
||||||
|
|
@ -141,9 +112,60 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="交接物料">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="addMaterial"></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="交接物料">
|
||||||
|
<el-select
|
||||||
|
v-model="listItem.wm"
|
||||||
|
placeholder="交接物料"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span>{{ item.batch }}</span>
|
||||||
|
<div style="float: right">
|
||||||
|
<span>{{ item.count }}</span>
|
||||||
|
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
||||||
|
({{ item.notok_sign_name }})
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item label="交接数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="listItem.count"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0"
|
||||||
|
step="1"
|
||||||
|
:step-strictly="true"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="交接数量"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer v-if="mode!=='show'">
|
||||||
<el-button type="primary" v-loading="isSaveing" @click="submit"
|
<el-button type="primary" v-loading="isSaveing" @click="submit"
|
||||||
>确定</el-button
|
>确定</el-button
|
||||||
>
|
>
|
||||||
|
|
@ -178,16 +200,15 @@ export default {
|
||||||
edit: "编辑交接记录",
|
edit: "编辑交接记录",
|
||||||
show: "查看交接记录",
|
show: "查看交接记录",
|
||||||
},
|
},
|
||||||
|
lists:[],//交接数组
|
||||||
handle_user: [],
|
handle_user: [],
|
||||||
form: {
|
form: {
|
||||||
batch: "",
|
send_date: null,
|
||||||
count: 0, //送料数
|
send_user: null,
|
||||||
wm: "",
|
send_mgroup: null,
|
||||||
send_date: "",
|
recive_user: null,
|
||||||
send_user: "",
|
recive_mgroup: null,
|
||||||
send_mgroup: "",
|
handoverb:[{wm:'',count:''}],
|
||||||
recive_user: "",
|
|
||||||
recive_mgroup: "",
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
batch: [
|
batch: [
|
||||||
|
|
@ -260,7 +281,6 @@ export default {
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
that.form.handle_date = year + "-" + month + "-" + day;
|
that.form.handle_date = year + "-" + month + "-" + day;
|
||||||
that.form.send_mgroup = that.mgroupId;
|
that.form.send_mgroup = that.mgroupId;
|
||||||
console.log('mgroupName',that.mgroupName)
|
|
||||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接
|
if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接
|
||||||
that.$API.system.user.list
|
that.$API.system.user.list
|
||||||
.req({ page: 0, posts__code__contains: "check" })
|
.req({ page: 0, posts__code__contains: "check" })
|
||||||
|
|
@ -271,7 +291,11 @@ export default {
|
||||||
that.deptID = that.$TOOL.data.get('gx_deptID');
|
that.deptID = that.$TOOL.data.get('gx_deptID');
|
||||||
that.getUserList();
|
that.getUserList();
|
||||||
}
|
}
|
||||||
that.getMaterial();
|
if(that.type==20||that.type==40){
|
||||||
|
that.getMaterialNotok();
|
||||||
|
}else{
|
||||||
|
that.getMaterial();
|
||||||
|
}
|
||||||
that.getDeptOptions();
|
that.getDeptOptions();
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
},
|
},
|
||||||
|
|
@ -296,40 +320,83 @@ export default {
|
||||||
getMaterial() {
|
getMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
var req = {
|
var req = {
|
||||||
mgroupx: that.mgroupId,
|
|
||||||
page: 0,
|
page: 0,
|
||||||
notok_sign__isnull : 1,
|
notok_sign__isnull : 1,
|
||||||
count_xtest__isnull:1
|
count_xtest__isnull:1
|
||||||
};
|
};
|
||||||
if(that.mgroupName=="size"){
|
if(that.mgroupName=="size"){
|
||||||
req.material__process__name="一次超洗";
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
}else if(that.mgroupName=="facade"){
|
if(res.length>0){
|
||||||
req.material__process__name="二次超洗";
|
req.belong_dept=res[0].id;
|
||||||
}
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
// else{
|
let arr = [];
|
||||||
// if (this.type == 10) {
|
res.forEach(item=>{
|
||||||
// req.notok_sign__isnull = 1;
|
let obj = {};
|
||||||
// } else if (this.type == 20) {
|
Object.assign(obj,item);
|
||||||
// req.notok_sign__isnull = 0;
|
obj.label = item.batch;
|
||||||
// }else if (this.type == 30) {
|
arr.push(obj);
|
||||||
// req.notok_sign__isnull = 1;
|
})
|
||||||
// }
|
that.materialOptions = arr;
|
||||||
// }
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else if(that.mgroupName=="facade"){
|
||||||
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
req.belong_dept=res[0].id;
|
||||||
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
res.forEach(item=>{
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj,item);
|
||||||
|
obj.label = item.batch;
|
||||||
|
arr.push(obj);
|
||||||
|
})
|
||||||
|
that.materialOptions = arr;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
req.mgroupx = that.mgroupId;
|
||||||
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
res.forEach(item=>{
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj,item);
|
||||||
|
obj.label = item.batch;
|
||||||
|
arr.push(obj);
|
||||||
|
})
|
||||||
|
that.materialOptions = arr;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.$API.wpm.wmaterial.list
|
},
|
||||||
.req(req)
|
//获取车间不合格物料
|
||||||
.then((res) => {
|
getMaterialNotok() {
|
||||||
that.materialOptions = res;
|
let that = this;
|
||||||
});
|
var req = {
|
||||||
|
mgroupx: that.mgroupId,
|
||||||
|
page: 0,
|
||||||
|
notok_sign__isnull : 0,
|
||||||
|
count_xtest__isnull:1
|
||||||
|
};
|
||||||
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
res.forEach(item=>{
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj,item);
|
||||||
|
obj.label = item.batch+'('+item.notok_sign_name+')';
|
||||||
|
arr.push(obj);
|
||||||
|
})
|
||||||
|
that.materialOptions = arr;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
getUserList() {
|
getUserList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.system.user.list
|
this.$API.system.user.list.req({ depts: that.deptID, page: 0 }).then((res) => {
|
||||||
.req({ depts: that.deptID, page: 0 })
|
that.userList = res;
|
||||||
.then((res) => {
|
});
|
||||||
that.userList = res;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//获取接收工段人员
|
//获取接收工段人员
|
||||||
getUserList2() {
|
getUserList2() {
|
||||||
|
|
@ -338,9 +405,7 @@ export default {
|
||||||
this.mgroupOptions.forEach(item => {
|
this.mgroupOptions.forEach(item => {
|
||||||
if(item.id==that.form.recive_mgroup){
|
if(item.id==that.form.recive_mgroup){
|
||||||
deptID = item.belong_dept;
|
deptID = item.belong_dept;
|
||||||
this.$API.system.user.list
|
this.$API.system.user.list.req({ depts: deptID, page: 0 }).then((res) => {
|
||||||
.req({ depts: deptID, page: 0 })
|
|
||||||
.then((res) => {
|
|
||||||
that.userList2 = res;
|
that.userList2 = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -355,6 +420,12 @@ export default {
|
||||||
that.userList2 = res;
|
that.userList2 = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
addMaterial(){
|
||||||
|
this.form.handoverb.push({wm:'',count:''});
|
||||||
|
},
|
||||||
|
delMaterial(index){
|
||||||
|
this.form.handoverb.splice(index,1);
|
||||||
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add") {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
|
@ -369,36 +440,42 @@ export default {
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.dialogForm.validate(async (valid) => {
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.mode == "add") {
|
if (that.mode == "add") {
|
||||||
this.$API.wpm.handover.create
|
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
||||||
.req(this.form)
|
if(that.type==40){
|
||||||
.then((res) => {
|
//提交
|
||||||
this.isSaveing = false;
|
that.$API.wpm.handover.submit.req(res.id).then((res1) => {
|
||||||
this.$emit("success", this.form, this.mode);
|
that.isSaveing = false;
|
||||||
this.visible = false;
|
that.$emit("success");
|
||||||
this.$message.success("操作成功");
|
that.visible = false;
|
||||||
})
|
that.$message.success("操作成功");
|
||||||
.catch((err) => {
|
});
|
||||||
//可以处理校验错误
|
}else{
|
||||||
this.isSaveing = false;
|
that.isSaveing = false;
|
||||||
return err;
|
that.$emit("success");
|
||||||
});
|
that.visible = false;
|
||||||
} else if (this.mode == "edit") {
|
that.$message.success("操作成功");
|
||||||
this.$API.wpm.handover.update
|
}
|
||||||
.req(this.form.id, this.form)
|
}).catch((err) => {
|
||||||
.then((res) => {
|
//可以处理校验错误
|
||||||
this.isSaveing = false;
|
that.isSaveing = false;
|
||||||
this.$emit("success", this.form, this.mode);
|
return err;
|
||||||
this.visible = false;
|
});
|
||||||
this.$message.success("操作成功");
|
} else if (that.mode == "edit") {
|
||||||
})
|
that.$API.wpm.handover.update.req(that.form.id, that.form).then((res) => {
|
||||||
.catch((err) => {
|
that.isSaveing = false;
|
||||||
//可以处理校验错误
|
that.$emit("success", that.form, that.mode);
|
||||||
this.isSaveing = false;
|
that.visible = false;
|
||||||
return err;
|
that.$message.success("操作成功");
|
||||||
});
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
//可以处理校验错误
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'"
|
<el-button type="primary" @click="tomio" v-auth="'mio.do'"
|
||||||
>入库</el-button
|
>入库</el-button
|
||||||
>
|
>
|
||||||
|
<el-button type="primary" v-auth="'handover.create'" @click="table_add(40)">
|
||||||
|
报废</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<!-- <el-button type="primary" @click="materialsChoses('wm')"
|
<!-- <el-button type="primary" @click="materialsChoses('wm')"
|
||||||
|
|
@ -32,22 +34,16 @@
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
hidePagination
|
|
||||||
:params="params"
|
:params="params"
|
||||||
:query="query"
|
:query="query"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column label="状态" prop="state" width="100" >
|
||||||
label="状态"
|
<template #default="scope">
|
||||||
prop="state"
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
width="100"
|
{{wmState[scope.row.state]?.text}}
|
||||||
><template #default="scope"
|
</el-tag>
|
||||||
><el-tag
|
</template>
|
||||||
:type="wmState[scope.row.state]?.type"
|
</el-table-column>
|
||||||
>{{
|
|
||||||
wmState[scope.row.state]?.text
|
|
||||||
}}</el-tag
|
|
||||||
>
|
|
||||||
</template></el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
|
|
@ -100,18 +96,24 @@
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
align="center"
|
align="center"
|
||||||
width="80"
|
width="120"
|
||||||
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link size="small"
|
||||||
size="small"
|
|
||||||
@click="table_Check(scope.row)"
|
@click="table_Check(scope.row)"
|
||||||
v-auth="'mgroup.update'"
|
v-auth="'ftestwork.create'"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.notok_sign_name == null"
|
v-if="scope.row.notok_sign_name == null"
|
||||||
>抽检
|
>检验
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link size="small"
|
||||||
|
type="warning"
|
||||||
|
@click="tableCheckList(scope.row)"
|
||||||
|
v-if="scope.row.notok_sign_name == null"
|
||||||
|
>检验记录
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -134,12 +136,31 @@
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
>
|
>
|
||||||
</check-dialog>
|
</check-dialog>
|
||||||
|
<scrap-dialog
|
||||||
|
v-if="dialog.scrap"
|
||||||
|
ref="scrapDialog"
|
||||||
|
:type="type"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
:mgroupId="mgroupId"
|
||||||
|
@success="handleScrapSuccess"
|
||||||
|
@closed="dialog.scrap = false"
|
||||||
|
>
|
||||||
|
</scrap-dialog>
|
||||||
|
<showDrawer
|
||||||
|
ref="showDrawer"
|
||||||
|
v-if="visibleDrawer"
|
||||||
|
:wm="wm"
|
||||||
|
@closed="visibleDrawer = false"
|
||||||
|
>
|
||||||
|
</showDrawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { wmState } from "@/utils/enum.js";
|
import { wmState } from "@/utils/enum.js";
|
||||||
import materials from "./../mtm/materials.vue";
|
import materials from "./../mtm/materials.vue";
|
||||||
import checkDialog from "./check_form.vue";
|
import checkDialog from "./check_form.vue";
|
||||||
|
import showDrawer from "./check_drawer.vue";
|
||||||
|
import scrapDialog from "./handover_form.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
mgroupName: {
|
mgroupName: {
|
||||||
|
|
@ -149,7 +170,9 @@ export default {
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
materials,
|
materials,
|
||||||
checkDialog
|
checkDialog,
|
||||||
|
showDrawer,
|
||||||
|
scrapDialog
|
||||||
},
|
},
|
||||||
name: "wmaterial",
|
name: "wmaterial",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -158,10 +181,12 @@ export default {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {
|
params: {
|
||||||
mgroupx: "",
|
mgroupx: "",
|
||||||
|
belong_dept:''
|
||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
scrap: false,
|
||||||
permission: false,
|
permission: false,
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
|
@ -177,11 +202,21 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.mgroupName=="size"){
|
if(that.mgroupName=="size"){
|
||||||
that.params.material__process__name = "一次超洗";
|
// that.params.material__process__name = "一次超洗";
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.params.belong_dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
})
|
||||||
}else if(that.mgroupName=="facade"){
|
}else if(that.mgroupName=="facade"){
|
||||||
that.params.material__process__name = "二次超洗";
|
// that.params.material__process__name = "二次超洗";
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.params.belong_dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
that.$API.mtm.mgroup.list
|
that.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: that.mgroupName })
|
.req({ page: 0, search: that.mgroupName })
|
||||||
|
|
@ -193,6 +228,7 @@ export default {
|
||||||
that.mgroupId = res[0].id;
|
that.mgroupId = res[0].id;
|
||||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||||
that.params.mgroupx = res[0].id;
|
that.params.mgroupx = res[0].id;
|
||||||
|
that.params.belong_dept = res[0].belong_dept;
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -218,10 +254,30 @@ export default {
|
||||||
this.$refs.saveDialog.open(mode);
|
this.$refs.saveDialog.open(mode);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//获取当前批次车间物料的检验记录
|
||||||
|
tableCheckList(row){
|
||||||
|
this.wm = row.id;
|
||||||
|
this.visibleDrawer = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.showDrawer.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
},
|
},
|
||||||
|
//添加报废
|
||||||
|
table_add(type) {
|
||||||
|
this.dialog.scrap = true;
|
||||||
|
this.type = type;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.scrapDialog.open("add");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleScrapSuccess(){
|
||||||
|
this.dialog.scrap = false;
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,12 @@
|
||||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="工艺路线">{{
|
<el-descriptions-item label="工艺路线">{{
|
||||||
|
mlogItem.routepack_name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="输入物料">{{
|
||||||
|
mlogItem.material_in_name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="输出物料">{{
|
||||||
mlogItem.material_out_name
|
mlogItem.material_out_name
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="工段名称">{{
|
<el-descriptions-item label="工段名称">{{
|
||||||
|
|
@ -33,40 +39,49 @@
|
||||||
<el-descriptions-item label="创建时间">{{
|
<el-descriptions-item label="创建时间">{{
|
||||||
mlogItem.create_time
|
mlogItem.create_time
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="工单状态" v-if="mlogItem.mgroup_name=='退火'">
|
||||||
|
<el-tag v-if="mlogItem.ticket_">{{act_states[mlogItem.ticket_.act_state]}}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='退火'||mlogItem.mgroup_name=='黑化'">
|
||||||
|
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div
|
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
||||||
style="
|
|
||||||
padding: 5px 10px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: end;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||||
@click="mlogUpdate"
|
@click="mlogUpdate"
|
||||||
|
style="margin-right: 10px;"
|
||||||
v-auth="'mlog.update'"
|
v-auth="'mlog.update'"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null"
|
||||||
:loading="isSaveing"
|
:loading="isSaveing"
|
||||||
@click="mlogSubmit"
|
@click="mlogSubmit"
|
||||||
>提交</el-button
|
>提交</el-button
|
||||||
>
|
>
|
||||||
|
<!-- 退火-->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="mlogItem.mgroup_name=='退火'&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||||
|
:loading="isSaveing"
|
||||||
|
@click="createTicket"
|
||||||
|
>放行审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- 输入物料 -->
|
||||||
<el-card
|
<el-card
|
||||||
style="width: 100%; margin: 1vh 0"
|
style="width: 100%; margin: 1vh 0"
|
||||||
header="物料消耗"
|
header="输入物料"
|
||||||
shadow="never"
|
shadow="never"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
|
|
@ -91,7 +106,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="领用数量" prop="count_use">
|
<el-table-column label="领用数量" prop="count_use">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="破碎数量" prop="count_break">
|
<el-table-column label="加工前不良" prop="count_pn_jgqbl">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
|
|
@ -110,13 +125,13 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_in_edit(scope.row)"
|
@click="table_in_edit(scope.row)"
|
||||||
:disabled="mlogItem.submit_time !== null"
|
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
:disabled="mlogItem.submit_time !== null"
|
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="table_in_del(scope.row)"
|
@click="table_in_del(scope.row)"
|
||||||
>
|
>
|
||||||
|
|
@ -126,7 +141,48 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="width: 100%" header="产出物料" shadow="never">
|
<!-- 输入物料编辑 -->
|
||||||
|
<el-dialog v-model="saveInDialog" title="编辑">
|
||||||
|
<el-form
|
||||||
|
:model="saveInForm"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
ref="saveInForm"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="领取数量" prop="count_use">
|
||||||
|
<el-input-number
|
||||||
|
v-model="saveInForm.count_use"
|
||||||
|
:min="1"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="加工前不良" prop="count_pn_jgqbl">
|
||||||
|
<el-input-number
|
||||||
|
v-model="saveInForm.count_pn_jgqbl"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:loading="isSaveing"
|
||||||
|
@click="saveInSubmit()"
|
||||||
|
>保 存</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 输出物料 -->
|
||||||
|
<el-card style="width: 100%" header="输出物料" shadow="never">
|
||||||
<scTable
|
<scTable
|
||||||
ref="tableOut"
|
ref="tableOut"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
|
|
@ -138,7 +194,20 @@
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template #default="props">
|
<template #default="props">
|
||||||
<div style="padding-left: 50px">
|
<div style="padding-left: 50px" v-if="props.row.count_notok_json.length>0">
|
||||||
|
<el-descriptions :column="4" v-for="item in props.row.count_notok_json" :key="item">
|
||||||
|
<el-descriptions-item label="层数">
|
||||||
|
{{item.floor}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="抽检数">
|
||||||
|
{{item.count_sampling}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总数">
|
||||||
|
{{item.count}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div style="padding-left: 50px" v-else>
|
||||||
<el-descriptions :column="4">
|
<el-descriptions :column="4">
|
||||||
<el-descriptions-item label="划伤">{{
|
<el-descriptions-item label="划伤">{{
|
||||||
props.row.count_n_hs
|
props.row.count_n_hs
|
||||||
|
|
@ -152,6 +221,9 @@
|
||||||
<el-descriptions-item label="崩边">{{
|
<el-descriptions-item label="崩边">{{
|
||||||
props.row.count_n_bb
|
props.row.count_n_bb
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="小崩边">{{
|
||||||
|
props.row.count_n_xbb
|
||||||
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="雾面">{{
|
<el-descriptions-item label="雾面">{{
|
||||||
props.row.count_n_wm
|
props.row.count_n_wm
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
@ -194,7 +266,7 @@
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="mlogItem.submit_time !== null"
|
:disabled="mlogItem.submit_time !== null||mlogItem.ticket!==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1)"
|
||||||
@click="table_out_check(scope.row)"
|
@click="table_out_check(scope.row)"
|
||||||
>
|
>
|
||||||
检验
|
检验
|
||||||
|
|
@ -220,7 +292,17 @@
|
||||||
@closed="dialog.check = false"
|
@closed="dialog.check = false"
|
||||||
>
|
>
|
||||||
</check-dialog>
|
</check-dialog>
|
||||||
<el-dialog v-model="saveInDialog" title="新增/编辑">
|
<edit-dialog
|
||||||
|
v-if="dialog.edit"
|
||||||
|
ref="editDialog"
|
||||||
|
:dept="deptId"
|
||||||
|
:mgroupName= "mlogItem.mgroup_name"
|
||||||
|
@success="handleEditSuccess"
|
||||||
|
@closed="dialog.edit = false"
|
||||||
|
>
|
||||||
|
</edit-dialog>
|
||||||
|
<!-- 退火放行通知单 -->
|
||||||
|
<el-dialog v-model="ticketDialog" title="退火放行通知单">
|
||||||
<el-form
|
<el-form
|
||||||
:model="saveInForm"
|
:model="saveInForm"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
|
|
@ -228,45 +310,81 @@
|
||||||
ref="saveInForm"
|
ref="saveInForm"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="23">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="领取数量" prop="count_use">
|
<el-form-item label="退火炉号">
|
||||||
|
<el-input v-model="oinfo_json.退火炉号"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="退火时间">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="saveInForm.count_use"
|
v-model="oinfo_json.退火时间"
|
||||||
|
:min="1"
|
||||||
|
controls-position="right"
|
||||||
|
/>min
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="退火温度">
|
||||||
|
<el-input-number
|
||||||
|
v-model="oinfo_json.退火温度"
|
||||||
|
:min="1"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
<span style="position: absolute;right: -17px;">°C</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="抽检结果">
|
||||||
|
<el-input v-model="oinfo_json.抽检结果"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="抽检数">
|
||||||
|
<el-input-number
|
||||||
|
v-model="oinfo_json.抽检数"
|
||||||
|
:precision="0"
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="23">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="破碎数量" prop="count_break">
|
<el-form-item label="强度落球">
|
||||||
<el-input-number
|
<el-input v-model="oinfo_json.强度落球"/>
|
||||||
v-model="saveInForm.count_break"
|
|
||||||
:min="0"
|
|
||||||
style="width: 100%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="放行标准">:退火后直径23.5±0.2;黑圈内径:5.9±0.1;外径7.6-7.77</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="检验附件">
|
||||||
|
<sc-upload-file
|
||||||
|
v-model="fileList"
|
||||||
|
:multiple="false"
|
||||||
|
:limit="1"
|
||||||
|
:accept="['.xlsx', '.xls']"
|
||||||
|
@success = "fileUPSuccess"
|
||||||
|
>
|
||||||
|
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||||
|
</sc-upload-file>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-for="item in initForm.transitions"
|
||||||
|
:key="item.id"
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="isSaveing"
|
:loading="isSaveing"
|
||||||
@click="saveInSubmit()"
|
:disabled="isSaveing"
|
||||||
>保 存</el-button
|
@click="submitTicketCreate(item.id)"
|
||||||
|
style="margin-right: 4px"
|
||||||
|
>{{ item.name }}</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<edit-dialog
|
|
||||||
v-if="dialog.edit"
|
|
||||||
ref="editDialog"
|
|
||||||
:dept="deptId"
|
|
||||||
@success="handleEditSuccess"
|
|
||||||
@closed="dialog.edit = false"
|
|
||||||
>
|
|
||||||
</edit-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -312,13 +430,32 @@ export default {
|
||||||
mlogItem: {},
|
mlogItem: {},
|
||||||
saveInForm: {
|
saveInForm: {
|
||||||
count_use: 0,
|
count_use: 0,
|
||||||
count_break: 0,
|
count_pn_jgqbl: 0,
|
||||||
},
|
},
|
||||||
|
oinfo_json:{
|
||||||
|
退火炉号:'',
|
||||||
|
退火时间:'',
|
||||||
|
退火温度:'',
|
||||||
|
抽检结果:'',
|
||||||
|
抽检数:'',
|
||||||
|
强度落球:'',
|
||||||
|
},
|
||||||
|
act_states: {
|
||||||
|
0: "草稿中",
|
||||||
|
1: "进行中",
|
||||||
|
2: "被退回",
|
||||||
|
3: "被撤回",
|
||||||
|
4: "已完成",
|
||||||
|
5: "已关闭",
|
||||||
|
},
|
||||||
|
fileList:[],
|
||||||
|
test_file:'',
|
||||||
deptId: "",
|
deptId: "",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
saveInDialog: false,
|
saveInDialog: false,
|
||||||
|
ticketDialog:false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
rules: {
|
rules: {
|
||||||
count_use: [
|
count_use: [
|
||||||
|
|
@ -328,13 +465,6 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
count_break: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入破碎数量",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -343,15 +473,21 @@ export default {
|
||||||
this.paramsIn.mlog = this.mlogId;
|
this.paramsIn.mlog = this.mlogId;
|
||||||
this.paramsOut.mlog = this.mlogId;
|
this.paramsOut.mlog = this.mlogId;
|
||||||
this.apiObj = this.$API.wpm.mlogb.list;
|
this.apiObj = this.$API.wpm.mlogb.list;
|
||||||
|
this.getInit();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
getMlogItem() {
|
getMlogItem() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
||||||
that.mlogItem = res;
|
that.mlogItem = res;
|
||||||
|
if(res.test_file!==null){
|
||||||
|
that.fileList = [{name:res.test_file,url:res.test_file}];
|
||||||
|
that.form.test_file = res.test_file;
|
||||||
|
}
|
||||||
that.mgroup = res.mgroup;
|
that.mgroup = res.mgroup;
|
||||||
that.materialIn = res.material_in;
|
that.materialIn = res.material_in;
|
||||||
that.deptId = res.belong_dept;
|
that.deptId = res.belong_dept;
|
||||||
|
|
@ -391,7 +527,7 @@ export default {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.count_use = that.saveInForm.count_use;
|
obj.count_use = that.saveInForm.count_use;
|
||||||
obj.count_break = that.saveInForm.count_break;
|
obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl;
|
||||||
that.$API.wpm.mlogb.updateIn
|
that.$API.wpm.mlogb.updateIn
|
||||||
.req(that.saveInForm.id, obj)
|
.req(that.saveInForm.id, obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -420,8 +556,11 @@ export default {
|
||||||
},
|
},
|
||||||
table_out_check(row) {
|
table_out_check(row) {
|
||||||
this.dialog.check = true;
|
this.dialog.check = true;
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj, row);
|
||||||
|
obj.mgroup_name = this.mlogItem.mgroup_name;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.checkDialog.open(row);
|
this.$refs.checkDialog.open(obj);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -434,6 +573,49 @@ export default {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//渲染工单提交按钮
|
||||||
|
getInit() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||||
|
that.initForm = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//填写退火放行单信息
|
||||||
|
createTicket(){
|
||||||
|
if(this.mlogItem.work_end_time==null){
|
||||||
|
this.$message.error("请先编辑日志并选择结束时间");
|
||||||
|
}else{
|
||||||
|
let sum = 0;
|
||||||
|
this.mlogItem.reminder_interval_list.forEach(item => {
|
||||||
|
sum+=item;
|
||||||
|
});
|
||||||
|
this.oinfo_json.退火时间 = sum;
|
||||||
|
this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:'';
|
||||||
|
this.ticketDialog = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//提交退火放行单信息,创建工单
|
||||||
|
submitTicketCreate(id) {
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
obj.oinfo_json = that.oinfo_json;
|
||||||
|
obj.test_file = that.test_file;
|
||||||
|
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
|
||||||
|
let ticket = {};
|
||||||
|
that.isSaveing = true;
|
||||||
|
ticket.title = '退火放行审批单';
|
||||||
|
ticket.workflow = that.initForm.workflow;
|
||||||
|
ticket.ticket_data = {t_id: that.mlogItem.id};
|
||||||
|
ticket.transition = id;
|
||||||
|
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.ticketDialog = false;
|
||||||
|
that.$message.success("提交成功");
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
this.$refs.tableIn.refresh();
|
this.$refs.tableIn.refresh();
|
||||||
this.$refs.tableOut.refresh();
|
this.$refs.tableOut.refresh();
|
||||||
|
|
@ -441,6 +623,11 @@ export default {
|
||||||
handleCheckSuccess() {
|
handleCheckSuccess() {
|
||||||
this.$refs.tableOut.refresh();
|
this.$refs.tableOut.refresh();
|
||||||
},
|
},
|
||||||
|
fileUPSuccess(res) {
|
||||||
|
let that = this;
|
||||||
|
console.log('res',res);
|
||||||
|
this.test_file = res.path;
|
||||||
|
},
|
||||||
handleEditSuccess() {},
|
handleEditSuccess() {},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
label-width="100px"
|
label-width="80px"
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.process_name"
|
:label="item.routepack_name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span style="float:left">{{item.name}}</span>
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
|
@ -132,6 +132,24 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-form-item label="保温时间" required>
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.reminder_interval_list[0]"
|
||||||
|
:min="0"
|
||||||
|
controls-position="right"
|
||||||
|
/>(min)
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-form-item label="冷却时间" required>
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.reminder_interval_list[1]"
|
||||||
|
:min="0"
|
||||||
|
controls-position="right"
|
||||||
|
/>(min)
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="操作人">
|
<el-form-item label="操作人">
|
||||||
<ehsSelect
|
<ehsSelect
|
||||||
|
|
@ -140,21 +158,23 @@
|
||||||
:apiObj="this.$API.system.user.list"
|
:apiObj="this.$API.system.user.list"
|
||||||
:params="{ depts: dept }"
|
:params="{ depts: dept }"
|
||||||
></ehsSelect>
|
></ehsSelect>
|
||||||
<!-- <el-select
|
|
||||||
v-model="form.handle_user"
|
|
||||||
placeholder="操作人"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in userOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- 黑化 -->
|
||||||
|
<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'">
|
||||||
|
<el-form-item label="检验文件">
|
||||||
|
<sc-upload-file
|
||||||
|
v-model="fileList"
|
||||||
|
:multiple="false"
|
||||||
|
:limit="1"
|
||||||
|
:accept="['.xlsx', '.xls']"
|
||||||
|
@success = "fileUPSuccess"
|
||||||
|
>
|
||||||
|
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||||
|
</sc-upload-file>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -163,39 +183,6 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="间隔提醒">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.reminder_interval_list[0]"
|
|
||||||
:min="1"
|
|
||||||
:disabled="mode == 'edit'"
|
|
||||||
style="width: 25%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.reminder_interval_list[1]"
|
|
||||||
:min="1"
|
|
||||||
:disabled="mode == 'edit'"
|
|
||||||
style="width: 25%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.reminder_interval_list[2]"
|
|
||||||
:min="1"
|
|
||||||
:disabled="mode == 'edit'"
|
|
||||||
style="width: 25%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.reminder_interval_list[3]"
|
|
||||||
:min="1"
|
|
||||||
:disabled="mode == 'edit'"
|
|
||||||
style="width: 25%"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
<div class="form_unit">(h)</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
@ -211,12 +198,15 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
note: "",
|
mtype: "",
|
||||||
|
supplier:'',
|
||||||
route: "",
|
route: "",
|
||||||
equipment: "",
|
equipment: "",
|
||||||
handle_user: null,
|
handle_user: null,
|
||||||
work_start_time: "",
|
work_start_time: "",
|
||||||
reminder_interval_list: [],
|
work_end_time:null,
|
||||||
|
note:'',
|
||||||
|
reminder_interval_list: [0,0],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -225,6 +215,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
mgroupName:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
mgroup: {
|
mgroup: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
|
|
@ -250,8 +244,10 @@ export default {
|
||||||
edit: "编辑日志",
|
edit: "编辑日志",
|
||||||
show: "查看日志",
|
show: "查看日志",
|
||||||
},
|
},
|
||||||
|
test_file:'',
|
||||||
|
fileList:[],
|
||||||
//表单数据
|
//表单数据
|
||||||
form: defaultForm,
|
form: Object.assign({}, defaultForm),
|
||||||
//验证规则
|
//验证规则
|
||||||
rules: {
|
rules: {
|
||||||
supplier: [
|
supplier: [
|
||||||
|
|
@ -301,6 +297,7 @@ export default {
|
||||||
this.getUser();
|
this.getUser();
|
||||||
this.getSupplier();
|
this.getSupplier();
|
||||||
this.getEquipment();
|
this.getEquipment();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
disabledDateFn(time) {
|
disabledDateFn(time) {
|
||||||
|
|
@ -313,11 +310,15 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getEquipment() {
|
getEquipment() {
|
||||||
this.$API.em.equipment.list
|
let that = this;
|
||||||
.req({ page: 0, type: 10,belong_dept:this.dept })
|
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
|
||||||
.then((res) => {
|
res.forEach((item) => {
|
||||||
this.options = res;
|
let obj = {};
|
||||||
|
Object.assign(obj, item);
|
||||||
|
obj.label = item.name+'-'+item.number;
|
||||||
|
that.options.push(obj);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getSupplier() {
|
getSupplier() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -346,12 +347,17 @@ export default {
|
||||||
setData(data) {
|
setData(data) {
|
||||||
console.log("data", data);
|
console.log("data", data);
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
if(data.test_file!==null){
|
||||||
|
this.form.test_file = data.test_file;
|
||||||
|
this.fileList = [{name:data.test_file,url:data.test_file}];
|
||||||
|
}
|
||||||
this.getRoute(data.id);
|
this.getRoute(data.id);
|
||||||
},
|
},
|
||||||
setMgroup(id) {
|
fileUPSuccess(res) {
|
||||||
this.form.mgroup = id;
|
let that = this;
|
||||||
|
console.log('res',res);
|
||||||
|
this.test_file = res.path;
|
||||||
},
|
},
|
||||||
|
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -365,20 +371,25 @@ export default {
|
||||||
that.$emit("success");
|
that.$emit("success");
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.work_end_time = that.form.work_end_time;
|
obj.work_end_time = that.form.work_end_time;
|
||||||
obj.handle_user = that.form.handle_user;
|
obj.handle_user = that.form.handle_user;
|
||||||
obj.note = that.form.note;
|
obj.note = that.form.note;
|
||||||
that.$API.wpm.mlog.change
|
if(that.mgroupName=='黑化'){
|
||||||
.req(that.form.id, that.form)
|
that.form.test_file = that.test_file;
|
||||||
.then((res) => {
|
}
|
||||||
that.isSaveing = false;
|
that.$API.wpm.mlog.change.req(that.form.id, that.form).then((res) => {
|
||||||
that.$emit("success");
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.$emit("success");
|
||||||
that.$message.success("操作成功");
|
that.visible = false;
|
||||||
});
|
that.$message.success("操作成功");
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChanges"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -51,11 +52,66 @@
|
||||||
v-model="form.count_notok"
|
v-model="form.count_notok"
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
|
@change="countChanges"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider></el-divider>
|
</el-row>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-row v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="不合格统计">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="notok_add"
|
||||||
|
></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<template v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<el-row style="margin-bottom:10px" v-for="(item, $index) in count_notok_json" :key="item">
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.floor"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="层数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.count_sampling"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="抽检数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-input-number
|
||||||
|
style="width:90%"
|
||||||
|
v-model="item.count"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
placeholder="总数"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="notok_del( $index)"
|
||||||
|
></el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<el-row v-else>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="划伤">
|
<el-form-item label="划伤">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -122,7 +178,6 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="麻点">
|
<el-form-item label="麻点">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -179,6 +234,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-row>
|
<!-- <el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="前道不良">
|
<el-form-item label="前道不良">
|
||||||
|
|
@ -225,9 +281,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||||
>保存</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -289,7 +343,7 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
options: [],
|
options: [],
|
||||||
notokList:[],
|
count_notok_json:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
|
@ -305,13 +359,14 @@ export default {
|
||||||
open(data) {
|
open(data) {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
this.mgroupName = data.mgroup_name;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
notok_add(){
|
notok_add(){
|
||||||
this.notokList.push({file:'',value:0});
|
this.count_notok_json.push({notok:'qt',count:null,floor:null,count_sampling:null});
|
||||||
},
|
},
|
||||||
notok_del(index){
|
notok_del(index){
|
||||||
this.notokList.splice(index, 1)
|
this.count_notok_json.splice(index, 1)
|
||||||
},
|
},
|
||||||
countChange() {
|
countChange() {
|
||||||
this.form.count_notok =
|
this.form.count_notok =
|
||||||
|
|
@ -326,6 +381,9 @@ export default {
|
||||||
this.form.count_n_zq +
|
this.form.count_n_zq +
|
||||||
this.form.count_n_qt +
|
this.form.count_n_qt +
|
||||||
this.form.count_n_wm;
|
this.form.count_n_wm;
|
||||||
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
|
},
|
||||||
|
countChanges(){
|
||||||
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
|
@ -335,7 +393,16 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.mlog = that.mlog;
|
that.form.mlog = that.mlog;
|
||||||
this.form.count_notok =
|
let sum = 0;
|
||||||
|
if(that.mgroupName=='黑化'||that.mgroupName=='退火'){
|
||||||
|
let total = 0;
|
||||||
|
that.count_notok_json.forEach(item => {
|
||||||
|
total+=item.count;
|
||||||
|
});
|
||||||
|
this.form.count_notok = total;
|
||||||
|
this.form.count_notok_json = this.count_notok_json;
|
||||||
|
}else{
|
||||||
|
this.form.count_notok =
|
||||||
this.form.count_n_hs +
|
this.form.count_n_hs +
|
||||||
this.form.count_n_qp +
|
this.form.count_n_qp +
|
||||||
this.form.count_n_swen +
|
this.form.count_n_swen +
|
||||||
|
|
@ -347,7 +414,8 @@ export default {
|
||||||
this.form.count_n_zq +
|
this.form.count_n_zq +
|
||||||
this.form.count_n_qt +
|
this.form.count_n_qt +
|
||||||
this.form.count_n_wm;
|
this.form.count_n_wm;
|
||||||
let sum = this.form.count_ok + this.form.count_notok;
|
}
|
||||||
|
sum = this.form.count_ok + this.form.count_notok;
|
||||||
if (sum - this.form.count_real == 0) {
|
if (sum - this.form.count_real == 0) {
|
||||||
that.$API.wpm.mlogb.updateOut
|
that.$API.wpm.mlogb.updateOut
|
||||||
.req(that.form.id, that.form)
|
.req(that.form.id, that.form)
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,9 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所在层数">
|
||||||
|
<el-input v-model="form.note"/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,18 @@
|
||||||
prop="equipment_name"
|
prop="equipment_name"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column label="进度" prop="belong_dept_name" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-progress id="progressbwlq" :percentage="customMethod(scope.row,1)" :stroke-width="20" :color="customMethod(scope.row,2)" :text-inside="true"><span>{{customMethod(scope.row,3)}}</span></el-progress>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="部门/工段"
|
label="部门/工段"
|
||||||
prop="belong_dept_name"
|
prop="belong_dept_name"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="处理人"
|
label="处理人"
|
||||||
|
|
@ -75,10 +80,17 @@
|
||||||
label="结束时间"
|
label="结束时间"
|
||||||
prop="work_end_time"
|
prop="work_end_time"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<!-- <el-table-column
|
<el-table-column label="是否提交">
|
||||||
label="创建时间"
|
<template #default="scope">
|
||||||
prop="create_time"
|
<el-icon v-if="scope.row.submit_time != null" color="green">
|
||||||
></el-table-column> -->
|
<CircleCheckFilled />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="提交时间"
|
||||||
|
prop="submit_time"
|
||||||
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
|
@ -86,7 +98,7 @@
|
||||||
width="150"
|
width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
v-auth="'mlog.update'"
|
v-auth="'mlog.update'"
|
||||||
|
|
@ -94,7 +106,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click.stop="table_edit(scope.row)"
|
@click.stop="table_edit(scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -129,6 +141,7 @@
|
||||||
:process="processId"
|
:process="processId"
|
||||||
:mgroup="mgroupId"
|
:mgroup="mgroupId"
|
||||||
:dept="deptId"
|
:dept="deptId"
|
||||||
|
:mgroupName = "mgroupName"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
>
|
>
|
||||||
|
|
@ -253,7 +266,57 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
customMethod(row,index){
|
||||||
|
let color = '',context = '';
|
||||||
|
let percent = 0;
|
||||||
|
if(row.reminder_interval_list.length>0){
|
||||||
|
let data = new Date();
|
||||||
|
//当前时间
|
||||||
|
let currentTime = data.getTime();
|
||||||
|
//开始时间
|
||||||
|
let startTime = new Date(row.work_start_time).getTime();
|
||||||
|
//结束时间
|
||||||
|
let endTime = new Date(row.work_end_time).getTime();
|
||||||
|
//已开始工作的时长
|
||||||
|
let times = (currentTime-startTime)/1000/60;
|
||||||
|
//总时长
|
||||||
|
let sum = row.reminder_interval_list[0]+row.reminder_interval_list[1];
|
||||||
|
if(endTime!==0&&(currentTime>endTime)){
|
||||||
|
percent = 100;
|
||||||
|
color = row.mstate_json[1].color;
|
||||||
|
context = '已完成';
|
||||||
|
}else{
|
||||||
|
if(times>0){
|
||||||
|
percent = Math.round((times/sum)*100);
|
||||||
|
}else{
|
||||||
|
percent = 0;
|
||||||
|
}
|
||||||
|
if(times>0){
|
||||||
|
if(times>row.reminder_interval_list[0]){//冷却中
|
||||||
|
color = row.mstate_json[1].color;
|
||||||
|
context = row.mstate_json[1].name;
|
||||||
|
}else if(times>row.reminder_interval_list[1]){//已完成
|
||||||
|
color = row.mstate_json[1].color;
|
||||||
|
context = '已完成';
|
||||||
|
}else{//保温中
|
||||||
|
color = row.mstate_json[0].color;
|
||||||
|
context = row.mstate_json[0].name;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
color = "#ffffff";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(index==1){
|
||||||
|
return percent
|
||||||
|
}else if(index==2){
|
||||||
|
return color
|
||||||
|
}else{
|
||||||
|
return context
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
|
@ -271,4 +334,6 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -8,23 +8,10 @@
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:params="params"
|
:params="params"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column label="任务列表" type="index" width="80"></el-table-column>
|
||||||
label="任务列表"
|
<el-table-column label="产品名" prop="material_out_name" show-overflow-tooltip>
|
||||||
type="index"
|
|
||||||
width="80"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="产品名"
|
|
||||||
prop="material_out_name"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||||
label="任务编号"
|
|
||||||
prop="number"
|
|
||||||
width="140"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务量" prop="count"> </el-table-column>
|
<el-table-column label="任务量" prop="count"> </el-table-column>
|
||||||
<el-table-column label="开始时间" prop="start_date">
|
<el-table-column label="开始时间" prop="start_date">
|
||||||
|
|
@ -33,31 +20,50 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格数" prop="count_ok">
|
<el-table-column label="合格数" prop="count_ok">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="state">
|
<el-table-column label="分配人数" prop="mtaskb">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="elTagType(scope.row.state)">
|
<span v-if="scope.row.mtaskb.length>0">
|
||||||
{{ state_[scope.row.state] }}
|
{{scope.row.mtaskb.length}}
|
||||||
</el-tag>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="60">
|
<el-table-column label="操作" fixed="right" width="90">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link
|
<el-button
|
||||||
type="primary"
|
link
|
||||||
@click="mtask_submit(scope.row)"
|
size="small"
|
||||||
v-auth="'mtask.submit'"
|
v-auth="'mtask.submit'"
|
||||||
v-if="
|
type="primary"
|
||||||
scope.row.state != 40 && scope.row.state != 34
|
v-if="scope.row.state == 20 "
|
||||||
"
|
@click="mtask_submit(scope.row)"
|
||||||
>提交
|
>提交
|
||||||
</el-link>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
v-auth="'mtask.submit'"
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.state == 20 "
|
||||||
|
@click="mtask_deliver(scope.row)"
|
||||||
|
>分配
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
<deliver-drawer
|
||||||
|
v-if="deliverShow"
|
||||||
|
ref="detailDialog"
|
||||||
|
:mgroup="mgroupId"
|
||||||
|
:dept="deptId"
|
||||||
|
@success = "refreshMtask"
|
||||||
|
@closed="detailClose"
|
||||||
|
>
|
||||||
|
</deliver-drawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import deliverDrawer from "./mtask_deliver.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
mgroupName: {
|
mgroupName: {
|
||||||
|
|
@ -65,11 +71,14 @@ export default {
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
deliverDrawer,
|
||||||
|
},
|
||||||
name: "mtask",
|
name: "mtask",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: { mgroup: "" },
|
params: { mgroup: "",state:20 },
|
||||||
query: {},
|
query: {},
|
||||||
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
|
@ -85,13 +94,15 @@ export default {
|
||||||
34: "danger",
|
34: "danger",
|
||||||
40: "success",
|
40: "success",
|
||||||
},
|
},
|
||||||
state_: {
|
// state_: {
|
||||||
10: "创建中",
|
// 10: "创建中",
|
||||||
20: "已下达",
|
// 20: "已下达",
|
||||||
30: "生产中",
|
// 30: "生产中",
|
||||||
34: "已终止",
|
// 34: "已终止",
|
||||||
40: "已提交",
|
// 40: "已提交",
|
||||||
},
|
// },
|
||||||
|
deptId: null,
|
||||||
|
deliverShow:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -104,17 +115,38 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
that.mgroupId = res[0].id;
|
that.mgroupId = res[0].id;
|
||||||
|
that.deptId = res[0].belong_dept;
|
||||||
that.processId = res[0].process;
|
that.processId = res[0].process;
|
||||||
that.processCate = res[0].process_cate;
|
that.processCate = res[0].process_cate;
|
||||||
that.params.mgroup = res[0].id;
|
that.params.mgroup = res[0].id;
|
||||||
that.apiObj = this.$API.pm.mtask.list;
|
that.apiObj = this.$API.pm.mtask.list;
|
||||||
console.log("mgroupId", res[0].id);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
elTagType(state) {
|
elTagType(state) {
|
||||||
return this.type_[state];
|
return this.type_[state];
|
||||||
},
|
},
|
||||||
|
mtask_submit(row){
|
||||||
|
this.$confirm('确定提交该任务吗?提交后不可更改相关信息', "提示", {
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.$API.pm.mtask.submit.req(row.id).then((res) => {
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
this.$refs.table_mtask.refresh();
|
||||||
|
this.mtaskClick(this.currentMtask);
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mtask_deliver(row){
|
||||||
|
this.deliverShow = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.detailDialog.open(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
refreshMtask(){
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
//表格选择后回调事件
|
//表格选择后回调事件
|
||||||
selectionChange(selection) {
|
selectionChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,202 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="任务分配"
|
||||||
|
v-model="visible"
|
||||||
|
:size="'90%'"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||||
|
<el-descriptions>
|
||||||
|
<el-descriptions-item label="名称">{{
|
||||||
|
mtaskObj.material_out_name
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务编号">{{
|
||||||
|
mtaskObj.number
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务量">{{
|
||||||
|
mtaskObj.count
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开始时间">{{
|
||||||
|
mtaskObj.start_date
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="结束时间">{{
|
||||||
|
mtaskObj.end_date
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
<!-- 选择人员 -->
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
ref="form"
|
||||||
|
style="margin-top: 10px;margin-bottom:50px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="操作人员">
|
||||||
|
<el-checkbox-group
|
||||||
|
v-model="choose_user"
|
||||||
|
@change="userChange"
|
||||||
|
>
|
||||||
|
<el-checkbox class="checkboxItem" v-for="item in userList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-divider style="margin-top:0"></el-divider>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="6" :sm="8" v-for="item in cUserList" :key="item.id">
|
||||||
|
<el-form-item :label="item.handle_user_name">
|
||||||
|
<el-input-number
|
||||||
|
v-model="item.count"
|
||||||
|
:precision="0"
|
||||||
|
:min="1"
|
||||||
|
style="width: 90%"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="footer">
|
||||||
|
<el-button type="primary" @click="mtaskb_submit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
mgroup: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
dept: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
|
apiObj: null,
|
||||||
|
loading: false,
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
mtaskObj:{},
|
||||||
|
userList:[],
|
||||||
|
cUserList:[],//
|
||||||
|
choose_user:[],//已选人员id
|
||||||
|
rules: {
|
||||||
|
count_use: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入领取数量",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getUsers();
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(data) {
|
||||||
|
let that = this;
|
||||||
|
this.visible = true;
|
||||||
|
this.mtaskObj = data;
|
||||||
|
that.cUserList = data.mtaskb;
|
||||||
|
that.choose_user = [];
|
||||||
|
if(that.cUserList.length>0){
|
||||||
|
that.cUserList.forEach(item=>{
|
||||||
|
that.choose_user.push(item.handle_user);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getUsers() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.system.user.list.req({ belong_dept: that.dept, page: 0 }).then(res => {
|
||||||
|
// that.$API.system.user.list.req({ page:1,page_size:60}).then(res => {
|
||||||
|
that.userList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
userChange(){
|
||||||
|
let that = this;
|
||||||
|
let average = Math.floor( that.mtaskObj.count/that.choose_user.length);
|
||||||
|
let remainder = that.mtaskObj.count%that.choose_user.length;//取余
|
||||||
|
that.cUserList = [];
|
||||||
|
console.log('that.choose_user',that.choose_user);
|
||||||
|
that.userList.forEach(item=>{
|
||||||
|
if(that.choose_user.indexOf(item.id)>-1){
|
||||||
|
let obj = {};
|
||||||
|
obj.handle_user_name = item.name;
|
||||||
|
obj.handle_user = item.id;
|
||||||
|
obj.count = average;
|
||||||
|
that.cUserList.push(obj);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('that.cUserList',that.cUserList);
|
||||||
|
for(let i=0;i<remainder;i++){
|
||||||
|
that.cUserList[i].count += 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mtaskb_submit() {
|
||||||
|
let that = this;
|
||||||
|
console.log(that.cUserList);
|
||||||
|
let sum = 0;
|
||||||
|
that.cUserList.forEach(item => {
|
||||||
|
sum+=item.count;
|
||||||
|
});
|
||||||
|
console.log(sum-that.mtaskObj.count)
|
||||||
|
if(sum-that.mtaskObj.count==0){
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.$API.pm.mtaskbAdd.req(that.mtaskObj.id,that.cUserList).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
this.$emit("success");
|
||||||
|
that.$message.success("提交成功");
|
||||||
|
}).catch((e) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
that.$message.error("分配数量与任务总数不匹配,请确认后再提交");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEditSuccess() {},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.checkboxItem{
|
||||||
|
width:80px;
|
||||||
|
}
|
||||||
|
.footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 10;
|
||||||
|
text-align: center;
|
||||||
|
background: #ffffff;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inm from "./inm.vue";
|
import inm from "./inm.vue";
|
||||||
import mlogs from "./mlogs.vue";
|
import mlogs from "./fmlogs.vue";
|
||||||
import mtask from "./mtask.vue";
|
import mtask from "./mtask.vue";
|
||||||
import handover from "./handover.vue";
|
import handover from "./handover.vue";
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue