Merge branch 'gzerp'

This commit is contained in:
shijing 2025-12-15 10:47:49 +08:00
commit b65fc2c7be
38 changed files with 3956 additions and 1282 deletions

View File

@ -383,6 +383,26 @@ export default {
},
},
},
mloguser: {
list: {
name: "列表",
req: async function (data) {
return await http.get(`${config.API_URL}/wpm/mloguser/`, data);
},
},
create: {
name: "创建",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/mloguser/`, data);
},
},
delete: {
name: "删除",
req: async function (id) {
return await http.delete(`${config.API_URL}/wpm/mloguser/${id}/`);
},
},
},
handover: {
list: {
name: "值班记录列表",
@ -559,6 +579,38 @@ export default {
// return await http.get(`${config.API_URL}/wpm/batchlog/`, data);
// },
// },
batchlog: {
list: {
name: "批次列表",
req: async function (data) {
return await http.get(`${config.API_URL}/wpm/batchlog/`, data);
},
},
dag: {
name: "获取批次的DAG图数据",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/batchlog/dag/`, data);
},
},
batchesTo:{
name: "获取已指向的批次号",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/batchlog/batches_to/`, data);
},
},
batchwork:{
name: "工段批次加工进度",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/ana/batchwork/`, data);
},
},
},
// batchlog: {
// name: "批次列表",
// req: async function (data) {
// return await http.get(`${config.API_URL}/wpm/batchlog/`, data);
// },
// },
batchlog: {
list: {
name: "批次列表",
@ -591,6 +643,12 @@ export default {
return await http.post(`${config.API_URL}/wpm/batchst/cquery/`, data);
},
},
batchstquery: {
name: "批次统计数据",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/batchst/cquery/`, data);
},
},
wpr:{
list: {
name: "动态产品",

View File

@ -1828,6 +1828,7 @@ const routes = [
title: "首件检验",
// icon: "el-icon-cellphone",
perms: ["ftest"],
hidden: true,
},
component: "qm/first",
},
@ -1841,16 +1842,6 @@ const routes = [
},
component: "qm/process",
},
{
name: "qmProcess_gx",
path: "/qm/qmProcess_gx",
meta: {
title: "过程自检",
// icon: "el-icon-cellphone",
perms: ["ptest_gx"],
},
component: "qm/process_gx",
},
{
name: "qmProcess2",
path: "/qm/qmProcess2",
@ -1892,35 +1883,14 @@ const routes = [
component: "qm/product",
},
{
name: "products_cc",
path: "/qm/products_cc",
name: "product_middle",
path: "/qm/product_middle",
meta: {
title: "尺寸检验",
// icon: "el-icon-cellphone",
perms: ["productstest_cc"],
},
component: "qm/products_cc",
},
{
name: "products_wg",
path: "/qm/products_wg",
meta: {
title: "外观检验",
// icon: "el-icon-cellphone",
perms: ["productstest_wg"],
},
component: "qm/products_wg",
},
{
name: "productDetail",
path: "/qm/productDetail",
meta: {
title: "成品检验",
title: "中检记录",
// icon: "el-icon-cellphone",
perms: ["producttest"],
hidden: true,
},
component: "qm/productCheck",
component: "qm/product_middle",
},
],
},
@ -3512,47 +3482,7 @@ const routes = [
perms: ["statistic_qm"],
},
component: "statistics/product_check2.vue",
},
// {
// "name": "inm_check",
// "path": "/statistic/inm_check",
// "meta": {
// "title": "库存检验统计",
// "icon": "el-icon-DataAnalysis",
// "perms": ["statistic_qm"]
// },
// "component": "statistics/inm_check.vue"
// },
{
name: "good_check",
path: "/statistic/good_check",
meta: {
title: "成品检验统计",
// icon: "el-icon-DataAnalysis",
perms: ["statistic_qm"],
},
component: "statistics/good_check.vue",
},
// {
// "name": "behavior_check",
// "path": "/statistic/behavior_check",
// "meta": {
// "title": "性能检验",
// "icon": "el-icon-cellphone",
// "perms": ["statistic_qm"]
// },
// "component": "statistics/behavior_check.vue"
// },
// {
// "name": "enter_check",
// "path": "/statistic/enter_check",
// "meta": {
// "title": "入厂检验",
// "icon": "el-icon-cellphone",
// "perms": ["statistic_qm"]
// },
// "component": "statistics/enter_check.vue"
// },
}
],
},
//物料统计
@ -3599,105 +3529,6 @@ const routes = [
},
component: "statistics/stock_statistics.vue",
},
//合格数统计——光芯
{
name: "pass_num_gx",
path: "/statistic/pass_num_gx",
meta: {
title: "合格数统计",
icon: "el-icon-DataAnalysis",
perms: ["pass_num_gx"],
},
component: "statistics/pass_num_gx.vue",
},
//任务进度统计——光芯
{
name: "task_rate_gx",
path: "/statistic/task_rate_gx",
meta: {
title: "任务进度",
icon: "el-icon-DataAnalysis",
perms: ["task_rate_gx"],
},
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",
name: "statistic_inm",
meta: {
title: "库存统计",
icon: "el-icon-trend-charts",
perms: ["statistic_inm_gx"],
},
component: "statistics/statistics_inm.vue",
},
//返工统计——光芯
{
path: "/rework_gx",
name: "rework_gx",
meta: {
title: "返工统计",
icon: "el-icon-trend-charts",
perms: ["rework_gx"],
},
component: "statistics/rework_gx.vue",
},
//过程检验统计——光芯
{
path: "/process_check_gx",
name: "process_check_gx",
meta: {
title: "过程检验统计",
icon: "el-icon-trend-charts",
perms: ["process_check_gx"],
},
component: "statistics/process_check_gx.vue",
},
//成品检验统计——光芯
{
path: "/good_check_gx",
name: "good_check_gx",
meta: {
title: "成品检验统计",
icon: "el-icon-trend-charts",
perms: ["good_check_gx"],
},
component: "statistics/good_check_gx.vue",
},
//成品检验记录——光芯
{
path: "/check_record_gx",
name: "check_record_gx",
meta: {
title: "成品检验记录",
icon: "el-icon-trend-charts",
perms: ["check_record_gx"],
},
component: "statistics/check_record_gx.vue",
},
//扫边车间数据汇总——光芯
// {
// path: "/statistics_saobian",
// name: "statistics_saobian",
// meta: {
// title: "扫边车间统计",
// icon: "el-icon-trend-charts",
// perms: ["statistic_inm"],
// },
// component: "statistics/statistics_saobian.vue",
// },
//综合查询
{
name: "total_statistics",
@ -3731,50 +3562,29 @@ const routes = [
},
component: "statistics/statistics_guan.vue",
},
//综合统计--AVG
//批次统计
{
name: "statistics_batch",
path: "/statistic/statistics_batch",
meta: {
title: "批次统计",
icon: "el-icon-DataAnalysis",
perms: ["statistics_batch"],
},
component: "statistics/batch_statistics.vue",
},
//综合统计导出
{
name: "total_export",
path: "/statistic/total_export",
meta: {
title: "统计导出",
icon: "el-icon-DataAnalysis",
perms: ["total_export"],
},
component: "statistics/all.vue",
},
],
// children:[
// {
// "path": "/product_statistics",
// "name": "product_statistics",
// "meta": {
// "title": "生产统计",
// "icon": "el-icon-trend-charts",
// "perms": ["bigScreenP"],
// },
// "component": "statistics/product_statistics.vue"
// },
// {
// "path": "/quality_statistics",
// "name": "quality_statistics",
// "meta": {
// "title": "质量统计",
// "icon": "el-icon-trend-charts",
// "perms": ["bigScreenP"],
// },
// "component": "statistics/quality_statistics.vue"
// },
// {
// "path": "/sale_statistics",
// "name": "sale_statistics",
// "meta": {
// "title": "销售统计",
// "icon": "el-icon-trend-charts",
// "perms": ["bigScreenP"],
// },
// "component": "statistics/sale_statistics.vue"
// },
// {
// "path": "/material_statistics",
// "name": "material_statistics",
// "meta": {
// "title": "物料统计",
// "icon": "el-icon-trend-charts",
// "perms": ["bigScreenP"],
// },
// "component": "statistics/material_statistics.vue"
// },
// ],
},
//报表
{

View File

@ -239,7 +239,6 @@ export default {
this.containerHeight2 =
document.getElementById("scrollContainer2").clientHeight;
this.table2Visible = true;
const ondDayTime = 86400000;
let date = new Date();
let year = date.getFullYear();
@ -247,9 +246,10 @@ export default {
let day = date.getDate();
let days = new Date(year, month, 0).getDate();
this.days = days;
month = month < 10 ? "0" + month : month;
day = day < 10 ? "0" + day : day;
let start_date = year + "-" + month + "-01";
let lastDay = new Date(year, month, 0).getDate();
let end_date = year + "-" + month + "-" + lastDay;
let end_date = year + "-" + month + "-" + days;
this.start_date = start_date;
this.end_date = end_date;
this.today = year + "-" + month + "-" + day;
@ -383,12 +383,13 @@ export default {
start_date: this.weekFirst,
end_date: this.weekLast,
dept_name: "6车间",
select_cols_material: ", material.model AS 型号",
group_bys_material: ", material.model",
order_bys_material: "",
select_cols_mgroup: ", mgroup.name AS 工段",
group_bys_mgroup: ", mgroup.name",
is_count_utask: -1,
group_bys_mgroup: ", mgroup.name",
order_bys_mgroup: ", 工段",
group_bys_material: ", material.model",
order_bys_material: ", 型号",
select_cols_mgroup: ", mgroup.name AS 工段",
select_cols_material: ", material.model AS 型号"
},
};
//
@ -446,15 +447,15 @@ export default {
legendArr2 = [];
let obj = {
query: {
start_date: "2023-01-01",
end_date: "2023-12-31",
dept_name: "10车间",
start_date: this.start_date,
end_date: this.end_date,
dept_name: "6车间",
},
};
let obj2 = {
query: {
start_date: "2023-01-01",
end_date: "2023-12-31",
start_date: this.start_date,
end_date: this.end_date,
mio_type: "sale_out",
material_id: "",
},
@ -466,9 +467,7 @@ export default {
xAxisData[i] = text;
}
//
that.$API.bi.dataset.exec
.req("productStatistic", obj)
.then((res1) => {
that.$API.bi.dataset.exec.req("productStatistic", obj).then((res1) => {
console.log("生产车间按日统计:", res1);
if (res1.data2.ds0) {
let list1 = res1.data2.ds0;
@ -498,8 +497,6 @@ export default {
});
}
}
console.log("00000000000000000000000");
console.log("seriesData:", seriesData);
let chart1Option = deepCopy(this.basicOption);
chart1Option.legend.data = legendArr;
chart1Option.xAxis.data = xAxisData;

View File

@ -5,86 +5,37 @@
光子科技生产管理系统
<span class="top-line top-line-right"></span>
</el-header>
<el-main style="padding: 0; overflow: hidden" id="mainBlock">
<el-main id="mainBlock">
<el-row style="height: 100%">
<div
style="position: absolute; left: 0; width: 20%; z-index: 10"
>
<div
style="
display: flex;
flex-direction: column;
height: 100%;
padding: 0 10px;
"
>
<div class="leftPosition">
<div class="leftPositionContainer">
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
<div class="blockTitleIcon"></div>
<div>本周交付数</div>
</div>
<div
id="line1"
style="
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
"
></div>
<div id="line1"></div>
</div>
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
<div class="blockTitleIcon"></div>
<div>本周合格数</div>
</div>
<div
id="bar1"
style="
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
"
></div>
<div id="bar1"></div>
</div>
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
<div class="blockTitleIcon"></div>
<div>本周合格率</div>
</div>
<div
id="line2"
style="
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
"
></div>
<div id="line2"></div>
</div>
</div>
</div>
<el-col :span="24">
<div class="model">
<div
style="
position: absolute;
width: 100%;
text-align: center;
"
>
<div
style="
margin: 5px 0 50px 0;
color: #fff;
font-size: 12px;
font-weight: bold;
"
>
<div class="modelContainer">
<div class="modeltopTitle">
<img src="img/photon_top_line.png" />
<span>枣庄</span>
{{ currentDay }}{{ currentWeek
@ -95,33 +46,15 @@
/>
</div>
<div class="totalNumContnier">
<div class="totalNumWrap totalNum_orange">
<img
class=""
src="img/number_bg_orange.png"
/>
<span class="totalNumText">AVG合格数</span>
<div class="totalNumber">
{{ countOk_AVG }}
</div>
</div>
<div class="totalNumWrap totalNumWrap_green">
<img src="img/number_bg_green.png" />
<span class="totalNumText"
>预制棒合格数</span
>
<div class="totalNumber">
{{ countOk_dept7 }}
</div>
<span class="totalNumText">本周预制棒合格数</span>
<div class="totalNumber">{{ countOk_dept7 }}</div>
</div>
<div class="totalNumWrap totalNum_blue">
<img src="img/number_bg_blue.png" />
<span class="totalNumText"
>预制管合格数</span
>
<div class="totalNumber">
{{ countOk_dept10 }}
</div>
<span class="totalNumText">本周预制管合格数</span>
<div class="totalNumber">{{ countOk_dept10 }}</div>
</div>
</div>
</div>
@ -133,46 +66,16 @@
status="warning"
>
<template #default="{ percentage }">
<div
style="
font-size: 30px;
color: white;
font-weight: bold;
"
>
{{ percentage }}%
</div>
<div
style="
font-size: 18px;
color: white;
margin-top: 10px;
"
>
工厂模型加载中
</div>
<div class="progressNum">{{ percentage }}%</div>
<div class="progressText">工厂模型加载中</div>
</template>
</el-progress>
</div>
<canvas id="renderCanvas"></canvas>
</div>
</el-col>
<div
style="
position: absolute;
right: 0;
width: 20%;
z-index: 10;
"
>
<div
style="
display: flex;
flex-direction: column;
height: 100%;
padding: 20px;
"
>
<div class="rightPosition">
<div class="rightPositionContainer">
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
<div class="blockTitleIcon"></div>
@ -182,32 +85,14 @@
<el-radio label="10车间">10车间</el-radio>
</el-radio-group>
</div>
<div
id="pie"
style="
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
"
></div>
<div id="pie"></div>
</div>
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
<div class="blockTitleIcon"></div>
<div>本周计划完成度</div>
</div>
<div
id="line3"
style="
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
"
></div>
<div id="line3"></div>
</div>
<div class="flexItem" style="flex: 1">
<div class="blockTitle">
@ -483,7 +368,6 @@ export default {
},
deptName: "10车间",
heightTimer: null,
countOk_AVG: 0,
countOk_dept7: 0,
countOk_dept10: 0,
blockTableHeight: 0,
@ -681,7 +565,7 @@ export default {
this.getPlanRate();
this.getMaterialList();
},
//6----
//
getsaleOut() {
let that = this;
let obj = {
@ -699,43 +583,13 @@ export default {
list.forEach((item) => {
for (let i = 0; i < this.weekDateList.length; i++) {
if (item. == that.weekDateList[i]) {
saleOutdept6[i] = item.交付;
saleOutdept6[i] = item.;
}
}
});
}
that.saleOutdept6 = saleOutdept6;
that.getAVGDayData();
});
},
//AVG$
getAVGDayData() {
let that = this;
this.$API.wpm.otherlog.list
.req({
product: "AVG",
page: 0,
handle_date__gte: that.start_date,
handle_date__lte: that.end_date,
})
.then((res) => {
let list = res;
let count_ok = 0,
saleOutAVG = [0, 0, 0, 0, 0, 0, 0],
countOkAVG = [0, 0, 0, 0, 0, 0, 0];
if (list.length > 0) {
list.forEach((item) => {
count_ok = count_ok + item.count_ok;
let day = item.handle_date.split("-");
let index = this.weekDateList.indexOf(day[2]);
saleOutAVG[index] = item.count_delivered;
countOkAVG[index] = item.count_ok;
});
that.saleOutAVG = saleOutAVG;
that.countOkAVG = countOkAVG;
that.countOk_AVG = count_ok;
}
that.getCountDept7();
that.getCountDept7();
//1---
let chartDom = document.getElementById("line1");
chartDom.style.height = this.blockHeight;
@ -745,9 +599,6 @@ export default {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
},
legend: {
@ -758,16 +609,12 @@ export default {
{
backgroundColor: "rgb(1,235,239)",
name: "预制棒管",
textStyle: {
color: "#fff",
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -781,31 +628,6 @@ export default {
),
},
},
{
name: "AVG",
textStyle: {
color: "#fff",
},
itemStyle: {
// color:'rgb(1,235,239)',
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgb(1,235,239)",
},
{
offset: 1,
color: "rgb(5, 158, 163)",
},
]
),
},
},
],
},
grid: {
@ -857,42 +679,6 @@ export default {
{
name: "预制棒管",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 1,
color: "rgb(1,235,239)",
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgba(1,235,239)",
},
{
offset: 1,
color: "rgb(5, 158, 163)",
},
]
),
},
emphasis: {
focus: "series",
},
data: that.saleOutdept6,
},
{
name: "AVG",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 1,
@ -902,10 +688,7 @@ export default {
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -921,11 +704,40 @@ export default {
emphasis: {
focus: "series",
},
data: that.saleOutAVG,
data: that.saleOutdept6,
},
],
};
myChart.setOption(option);
});
},
//AVG$
getAVGDayData() {
let that = this;
this.$API.wpm.otherlog.list
.req({
product: "AVG",
page: 0,
handle_date__gte: that.start_date,
handle_date__lte: that.end_date,
})
.then((res) => {
let list = res;
let count_ok = 0,
saleOutAVG = [0, 0, 0, 0, 0, 0, 0],
countOkAVG = [0, 0, 0, 0, 0, 0, 0];
if (list.length > 0) {
list.forEach((item) => {
count_ok = count_ok + item.count_ok;
let day = item.handle_date.split("-");
let index = this.weekDateList.indexOf(day[2]);
saleOutAVG[index] = item.count_delivered;
countOkAVG[index] = item.count_ok;
});
that.saleOutAVG = saleOutAVG;
that.countOkAVG = countOkAVG;
}
});
},
//7&&
@ -939,6 +751,9 @@ export default {
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
group_bys_material_name: "",
order_bys_material_name: "",
select_cols_material_name: ""
},
};
that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => {
@ -988,20 +803,15 @@ export default {
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
group_bys_material_name: "",
order_bys_material_name: "",
select_cols_material_name: ""
},
};
that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => {
let list = res.data2.ds0;
let countOkDept10 = [0, 0, 0, 0, 0, 0, 0],
countRateDept10 = [
null,
null,
null,
null,
null,
null,
null,
];
countRateDept10 = [null,null,null,null,null,null,null,];
let countOk_dept10 = 0;
if (list.length > 0) {
list.forEach((item) => {
@ -1039,9 +849,7 @@ export default {
dept_name: that.deptName,
},
};
that.$API.bi.dataset.exec
.req("productStatistic", obj)
.then((res) => {
that.$API.bi.dataset.exec.req("productStatistic", obj).then((res) => {
let list = res.data2.ds0;
let PlanRate = [0, 0, 0, 0, 0, 0, 0];
if (list.length > 0) {
@ -1119,23 +927,6 @@ export default {
show: false,
},
},
// {
// type: 'value',
// name: '',
// min: 0,
// max: 100,
// interval: 20,
// axisLabel: {
// formatter: '{value} %',
// color: '#ffffff'
// },
// nameTextStyle: {
// color: '#ffffff'
// },
// splitLine: {
// show: false,
// },
// }
],
series: [
{
@ -1168,27 +959,6 @@ export default {
),
},
},
// {
// name: '',
// type: 'line',
// yAxisIndex: 1,
// // 255,120,0
// tooltip: {
// valueFormatter: function (value) {
// return value;
// }
// },
// symbol: 'circle',
// symbolSize: 8,
// itemStyle: {
// // symbol
// color: 'rgb(255,120,0)'
// },
// lineStyle: {
// color: 'rgb(255,120,0)'
// },
// data: [63, 80, 71, 82, 60, 70, 85],
// }
],
};
line3Chart.setOption(line3option);
@ -1759,31 +1529,6 @@ export default {
top: 5,
right: 5,
data: [
{
name: "AVG",
textStyle: {
color: "#fff",
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgb(5,245,2)",
},
{
offset: 1,
color: "rgb(7,137,43)",
},
]
),
},
},
{
name: "预制管",
textStyle: {
@ -1791,10 +1536,7 @@ export default {
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -1814,12 +1556,8 @@ export default {
color: "#fff",
},
itemStyle: {
// color:'rgb(1,235,239)',
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -1881,12 +1619,8 @@ export default {
focus: "series",
},
itemStyle: {
// color:'rgb(1,235,239)',
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -1912,10 +1646,7 @@ export default {
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -1930,34 +1661,6 @@ export default {
},
data: that.countOkDept10,
},
{
name: "AVG",
type: "bar",
stack: "Ad",
barWidth: 20,
emphasis: {
focus: "series",
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "rgb(5,245,2)",
},
{
offset: 1,
color: "rgb(7,137,43)",
},
]
),
},
data: that.countOkAVG,
},
],
};
bar1Chart.setOption(bar1option);
@ -1980,10 +1683,7 @@ export default {
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -2004,10 +1704,7 @@ export default {
},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -2073,12 +1770,8 @@ export default {
symbolSize: 8, //线
symbol: "circle",
itemStyle: {
// symbol
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -2110,7 +1803,7 @@ export default {
color: "yellow", // 100%
},
],
globalCoord: false, // false
globalCoord: false,
},
},
},
@ -2121,12 +1814,8 @@ export default {
symbolSize: 8, //线
symbol: "circle",
itemStyle: {
// symbol
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
0,0,0,1,
[
{
offset: 0,
@ -2139,7 +1828,7 @@ export default {
]
),
},
smooth: 0.5, // 线
smooth: 0.5,
data: that.countRateDept10,
lineStyle: {
color: {
@ -2158,7 +1847,7 @@ export default {
color: "rgb(5, 158, 163)", // 100%
},
],
globalCoord: false, // false
globalCoord: false,
},
},
},
@ -2171,11 +1860,12 @@ export default {
let pieChart = echarts.init(pieDom);
let pieoption = {
color: [
"rgb(3,195,198)",
"rgb(237,224,45)",
"rgb(155,248,249)",
"rgb(110,181,249)",
"rgb(205,248,248)",
"rgb(248,189,118)",
"rgb(3,195,198)",
],
legend: {
bottom: 1,
@ -2197,33 +1887,9 @@ export default {
type: "pie",
radius: [30, 60],
center: ["50%", "45%"],
// roseType: 'area',
itemStyle: {
borderRadius: 2,
},
// label: {
// fontSize: 12,
// alignTo: 'edge',
// formatter: '{b}\n',
// edgeDistance: 10,
// lineHeight: 20,
// rich: {
// title: {
// fontSize: 12,
// color: '#999',
// lineHeight: 50,
// },
// }
// },
// labelLayout: function (params) {
// var isLeft = params.labelRect.x < myChart.getWidth() / 2;
// var points = params.labelLinePoints;
// points[2][0] = isLeft? params.labelRect.x: params.labelRect.x + params.labelRect.width;
// return {
// labelLinePoints: points
// };
// },
label: {
minMargin: 10,
edgeDistance: 10,
@ -2290,7 +1956,42 @@ export default {
background: url("/public/img/photon_bg.png") no-repeat;
background-size: cover;
}
.leftPosition{
position: absolute;
left: 0;
width: 20%;
z-index: 10
}
.leftPositionContainer{
display: flex;
flex-direction: column;
height: 100%;
padding: 0 10px;
}
#line1,#bar1,#line2,#pie,#line3{
width: 100%;
height: 92%;
background: rgba(9, 31, 43, 0.5);
border-radius: 20px;
margin-top: 5px;
}
.rightPosition{
position: absolute;
right: 0;
width: 20%;
z-index: 10;
}
.rightPositionContainer{
display: flex;
flex-direction: column;
height: 100%;
padding: 0 10px;
}
#mainBlock{
padding: 0;
overflow: hidden;
}
.pageHeader {
font-size: 32px;
background: none;
@ -2386,7 +2087,27 @@ export default {
width: 100%;
height: 100%;
}
.modelContainer{
position: absolute;
width: 100%;
text-align: center;
}
.modeltopTitle{
margin: 5px 0 50px 0;
color: #fff;
font-size: 12px;
font-weight: bold;
}
.progressNum{
font-size: 30px;
color: white;
font-weight: bold;
}
.progressText{
font-size: 18px;
color: white;
margin-top: 10px;
}
#renderCanvas {
width: 100%;
height: 100%;
@ -2437,7 +2158,7 @@ export default {
}
.totalNumWrap > img {
width: 10vw;
width: 12vw;
}
.totalNumWrap_green > .totalNumber {
@ -2453,7 +2174,7 @@ export default {
}
.totalNumber {
font-size: 25px;
font-size: 2vw;
font-weight: bold;
position: absolute;
left: 50%;

View File

@ -286,13 +286,13 @@ export default {
that.$API.bi.dataset.exec.req('saleOutDay', obj6).then((res6) => {
let list6 = res6.data2.ds0;
if (list6.length > 0) {
this.dayPayNum6 = list6[0].交付;
this.dayPayNum6 = list6[0].;
}
//6
that.$API.bi.dataset.exec.req('saleOutDay', obj06).then((res06) => {
let list06 = res06.data2.ds0;
if (list06.length > 0) {
this.tongbi06 = Math.round((this.dayPayNum6 - list06[0].交付) / list06[0].交付* 100);
this.tongbi06 = Math.round((this.dayPayNum6 - list06[0].) / list06[0]. * 100);
}
});
});

View File

@ -16,146 +16,99 @@
<img class="topCardImg" src="img/topCard.png" />
</div>
</div>
<div class="retangleWrap">
<div class="retangle countRetangle">
<div class="Retangle_container">
<div class="title">昨日核心指标</div>
<!-- <div style="color: rgb(122, 121, 121);size: 12px;font-weight: 290;line-height: 22px;">时间</div> -->
</div>
<div style="padding-top: 20px; display: flex">
<div class="countItem">
<div class="countname">预制棒合格数</div>
<p class="countnum">{{ dayPassNum7 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi7)">
{{ tongbi7 }}%
<span v-if="tongbi7 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">预制管合格数</div>
<p class="countnum">{{ dayPassNum10 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi10)">
{{ tongbi10 }}%
<span v-if="tongbi10 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">AVG合格数</div>
<p class="countnum">{{ dayAVGcountOk }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(AVGOktongbi)">
{{ AVGOktongbi }}%
<span v-if="AVGOktongbi < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">预制棒管交付数</div>
<p class="countnum">{{ dayPayNum6 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi06)">
{{ tongbi06 }}%
<span v-if="tongbi06 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">AVG交付数</div>
<p class="countnum">{{ dayAVGcountDelivered }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(AVGDelivertongbi)">
{{ AVGDelivertongbi }}%
<span v-if="AVGDelivertongbi < 0"> </span>
<span v-else> </span>
</span>
</p>
<el-row>
<el-col :span="12">
<div class="retangleWrap">
<div class="retangle countRetangle">
<div class="Retangle_container">
<div class="title">昨日核心指标</div>
</div>
<div style="padding-top: 20px; display: flex">
<div class="countItem">
<div class="countname">昨日预制棒合格数</div>
<p class="countnum">{{ dayPassNum7 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi7)">
{{ tongbi7 }}%
<span v-if="tongbi7 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">昨日预制管合格数</div>
<p class="countnum">{{ dayPassNum10 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi10)">
{{ tongbi10 }}%
<span v-if="tongbi10 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
<div class="countItem">
<div class="countname">昨日预制棒管交付数</div>
<p class="countnum">{{ dayPayNum6 }}</p>
<p class="countrate">
同比前天
<span :class="bindClass(tongbi06)">
{{ tongbi06 }}%
<span v-if="tongbi06 < 0"> </span>
<span v-else> </span>
</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="retangleWrap retangleWrapmiddle">
<div class="retangle middleRetangle">
<div style="padding: 20px 0; display: flex">
<div class="middleItem">
<div class="countname">本月累积交付数</div>
<div
style="
display: flex;
justify-content: space-around;
padding-top: 25px;
font-size: 20px;
"
>
<div>
<div>预制棒管</div>
</el-col>
<el-col :span="12">
<div class="retangleWrap">
<div class="retangle countRetangle">
<div class="Retangle_container">
<div class="title">本月生产数据</div>
</div>
<div style="padding-top: 20px; display: flex">
<div class="countItem">
<div class="countname">本月预制棒管 </div>
<p class="countnum">{{ monthPayNum6 }}</p>
<div class="countrate">本月累积交付数</div>
</div>
<div>
<div>AVG</div>
<p class="countnum">{{ monthPayNumAVG }}</p>
<div class="countItem" style="display: flex">
<el-progress
type="circle"
width="100"
:stroke-width="10"
:percentage="monthPassRate7"
/>
<div style="margin-left: 20px">
<div class="countname">本月预制棒合格率</div>
<p class="countnum" style="line-height: 82px">
{{ monthPassRate7 }}%
</p>
</div>
</div>
<div class="countItem" style="display: flex">
<el-progress
type="circle"
width="100"
:stroke-width="10"
:percentage="monthPassRate10"
/>
<div style="margin-left: 20px">
<div class="countname">本月预制管合格率</div>
<p class="countnum" style="line-height: 82px">
{{ monthPassRate10 }}%
</p>
</div>
</div>
</div>
</div>
<div class="middleItem" style="display: flex">
<el-progress
type="circle"
:stroke-width="15"
:show-text="false"
:percentage="monthPassRate7"
/>
<div style="margin-left: 20px">
<div class="countname">预制棒合格率</div>
<p class="countnum" style="line-height: 82px">
{{ monthPassRate7 }}%
</p>
</div>
</div>
<div class="middleItem" style="display: flex">
<el-progress
type="circle"
:stroke-width="15"
:show-text="false"
:percentage="monthPassRate10"
/>
<div style="margin-left: 20px">
<div class="countname">预制管合格率</div>
<p class="countnum" style="line-height: 82px">
{{ monthPassRate10 }}%
</p>
<!-- <p class="countrate">同比上周 8.63%</p> -->
</div>
</div>
<div class="middleItem" style="display: flex">
<el-progress
type="circle"
:stroke-width="15"
:show-text="false"
:percentage="monthRateAVG"
/>
<div style="margin-left: 20px">
<div class="countname">AVG合格率</div>
<p class="countnum" style="line-height: 82px">
{{ monthRateAVG }}%
</p>
<!-- <p class="countrate">同比上周 8.63%</p> -->
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<div class="retangleWrap" style="padding-right: 0">
@ -182,9 +135,6 @@
"
>
<div class="bottomItem">
<!-- <div class="countname">本月计划完成度</div>
<p class="countnum">{{ hgNumber }}%</p> -->
<!-- <p class="countrate">同比上周<span class="redColor"> 8.63%</span> 月同比6.47%</p> -->
<div
id="barCharts"
style="width: 100%; height: 289px"
@ -198,8 +148,8 @@
<div class="retangleWrap retangleWrapTable">
<div class="retangle tableRetangle">
<div class="Retangle_container">
<div class="title">库存情况</div>
<div class="radios_group">
<div class="title">成品库存统计</div>
<!-- <div class="radios_group">
<el-radio-group
v-model="materialType"
@change="materialTypeChange"
@ -207,7 +157,7 @@
<el-radio label="20">半成品</el-radio>
<el-radio label="10">成品</el-radio>
</el-radio-group>
</div>
</div> -->
</div>
<div style="padding: 20px 24px 24px 24px">
<el-table
@ -220,20 +170,20 @@
width="50"
></el-table-column>
<el-table-column
prop="name"
prop="material_name"
label="名称"
></el-table-column>
<el-table-column
prop="specification"
prop="material_specification"
label="规格"
></el-table-column>
<el-table-column
prop="model"
prop="material_model"
label="型号"
></el-table-column>
<el-table-column
prop="unit"
label="单位"
prop="dept_name"
label="完成车间"
></el-table-column>
<el-table-column
prop="count"
@ -256,6 +206,7 @@
<div style="flex: 2">名称</div>
<div class="warningFlex1">型号</div>
<div class="warningFlex1">规格</div>
<div class="warningFlex1">安全库存</div>
<div
class="warningFlex1"
style="text-align: right"
@ -282,6 +233,9 @@
<div class="warningFlex1">
{{ item.specification }}
</div>
<div class="warningFlex1">
{{ item.count_safe }}
</div>
<div
class="warningFlex1 warningNumberStyle"
>
@ -434,6 +388,7 @@ export default {
chartData: [],
tableData: [],
equipList: [],
productList:[],
halfProductList: [],
warningMaterial: [],
calendarValue: "",
@ -449,17 +404,9 @@ export default {
tongbi10: 0,
dayPayNum6: 0, //
tongbi06: 0,
monthPayNum6: 0,
monthPassRate7: 0,
monthPassRate10: 0,
dayAVGcountOk: 0,
AVGOktongbi: 0,
dayAVGcountDelivered: 0,
AVGDelivertongbi: 0,
monthRateAVG: 0,
monthPayNumAVG: 0,
hgNumber: 0,
option: {
tooltip: {
@ -541,12 +488,12 @@ export default {
yesterdayBefore.getDate();
that.getdayData();
that.getMonthData();
this.getAVGDayData();
this.calendarValue = new Date();
this.getEquipList();
this.getMaterialList();
// this.getMaterialList();
this.getProductStatistic();
this.getMaterialWarning();
this.getProductList();
this.getHalfProductList();
},
methods: {
@ -575,43 +522,56 @@ export default {
//
getHalfProductList() {
let that = this;
let obj = {
query: {
material_types: "20",
},
};
let obj = {query: {material_types: "20"}};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
if (res.data2.ds0) {
this.halfProductList = res.data2.ds0;
console.log("getHalfProductList", res);
that.halfProductList = res.data2.ds0;
that.tableData = res.data2.ds0;
}
});
},
materialTypeChange() {
this.getMaterialList();
//
getProductList() {
let that = this;
let obj = {query: {material_types: "10"}};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
if (res.data2.ds0) {
console.log("getProductList", res);
that.productList = res.data2.ds0;
that.tableData = res.data2.ds0;
}
});
},
// materialTypeChange() {
// let that = this;
// if(that.materialType==10){
// this.getProductList();
// }else{
// this.getHalfProductList();
// }
// },
//
getMaterialList() {
let that = this;
that.$API.mtm.material.list
.req({ page: 0, type: that.materialType })
.then((res) => {
that.tableData = res.filter((item) => {
return item.count > 0;
});
that.$API.mtm.material.list.req({ page: 0, type: that.materialType }).then((res) => {
that.tableData = [];
that.tableData = res.filter((item) => {
return item.count > 0;
});
console.log("getMaterialList", res);
});
},
//
getMaterialWarning() {
let that = this;
that.$API.mtm.material.list
.req({ page: 0, type__in: "10,20", count__lte: 1 })
.then((res) => {
if (res.length > 0) {
console.log("getMaterialWarning", res);
that.warningMaterial = res;
} else {
}
});
that.$API.mtm.material.list.req({ page: 0, tag:'low_inm'}).then((res) => {
if (res.length > 0) {
console.log("getMaterialWarning", res);
that.warningMaterial = res;
} else {
}
});
},
showTime() {
this.time = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
@ -709,12 +669,12 @@ export default {
}
}
if (beforData7 !== 0) {
this.tongbi7 = Math.round(
((this.dayPassNum7 - beforData7) / beforData7) *
that.tongbi7 = Math.round(
((that.dayPassNum7 - beforData7) / beforData7) *
100
);
} else {
this.tongbi7 = this.dayPassNum7;
that.tongbi7 = that.dayPassNum7;
}
});
});
@ -745,57 +705,48 @@ export default {
}
}
if (beforData10 !== 0) {
this.tongbi10 = Math.round(
((this.dayPassNum10 - beforData10) /
beforData10) *
100
);
that.tongbi10 = Math.round(((that.dayPassNum10 - beforData10) /beforData10) *100);
} else {
this.tongbi7 = this.dayPassNum7;
that.tongbi7 = that.dayPassNum7;
}
});
});
//6
this.dayPayNum6 = 0;
that.dayPayNum6 = 0;
that.$API.bi.dataset.exec.req("saleOutDay", obj6).then((res6) => {
if (res6.data2.ds0) {
let list6 = res6.data2.ds0;
if (list6.length > 0) {
list6.forEach((item6) => {
this.dayPayNum6 += item6.交付;
that.dayPayNum6 += item6.;
});
}
}
let beforData6 = 0;
//6
that.$API.bi.dataset.exec
.req("saleOutDay", obj06)
.then((res06) => {
if (res06.data2.ds0) {
let list06 = res06.data2.ds0;
if (list06.length > 0) {
list06.forEach((item06) => {
beforData6 += item06.交付数;
});
}
that.$API.bi.dataset.exec.req("saleOutDay", obj06).then((res06) => {
if (res06.data2.ds0) {
let list06 = res06.data2.ds0;
if (list06.length > 0) {
list06.forEach((item06) => {
beforData6 += item06.数量;
});
}
if (beforData6 !== 0) {
this.tongbi06 = Math.round(
((this.dayPassNum6 - beforData6) / beforData6) *
100
);
} else {
this.tongbi06 = this.dayPassNum6;
}
});
}
if (beforData6 !== 0) {
that.tongbi06 = Math.round(((that.dayPayNum6 - beforData6) / beforData6) *100);
} else {
that.tongbi06 = that.dayPayNum6;
}
});
});
},
//&---6710
getMonthData() {
let that = this;
this.monthPayNum6 = 0;
this.monthPassRate7 = 0;
this.monthPassRate10 = 0;
that.monthPayNum6 = 0;
that.monthPassRate7 = 0;
that.monthPassRate10 = 0;
let start_date = that.year_s + "-" + that.month_s + "-01";
let end_date = that.year_s + "-" + that.month_s + "-" + that.day_s;
let obj6 = {
@ -842,11 +793,11 @@ export default {
rate = (sum_ok / sum_real) * 100;
}
}
this.monthPassRate7 = Math.round(rate);
that.monthPassRate7 = Math.round(rate);
});
//10
that.$API.bi.dataset.exec.req("lineMonth", obj10).then((res10) => {
this.monthPassRate10 = 0;
that.monthPassRate10 = 0;
let sum_ok_10 = 0,
sum_real_10 = 0,
rate_10 = 0;
@ -860,103 +811,20 @@ export default {
rate_10 = (sum_ok_10 / sum_real_10) * 100;
}
}
this.monthPassRate10 = Math.round(rate_10);
that.monthPassRate10 = Math.round(rate_10);
});
//6
that.$API.bi.dataset.exec.req("saleOutMonth", obj6).then((res6) => {
if (res6.data2.ds0) {
let sum6 = 0;
if (res6.data2.ds0&&res6.data2.ds0.length>0) {
let list6 = res6.data2.ds0;
let sum6 = 0;
if (list6.length > 0) {
list6.forEach((item) => {
sum6 = sum6 + item.交付;
sum6 = sum6 + item.;
});
}
this.monthPayNum6 = sum6;
}
});
},
//AVG
getAVGDayData() {
let that = this;
let date = that.yesterday;
let date0 = that.yesterdayBefore;
this.$API.wpm.otherlog.list
.req({
product: "AVG",
page: 0,
handle_date__gte: date,
handle_date__lte: date,
})
.then((res) => {
let list = res;
let count_ok = 0,
count_delivered = 0;
if (list.length > 0) {
list.forEach((item) => {
count_ok = count_ok + item.count_ok;
count_delivered =
count_delivered + item.count_delivered;
});
that.dayAVGcountOk = count_ok;
that.dayAVGcountDelivered = count_delivered;
this.$API.wpm.otherlog.list
.req({
product: "AVG",
page: 0,
handle_date__gte: date0,
handle_date__lte: date0,
})
.then((res0) => {
let list0 = res0;
let count_ok0 = 0,
count_delivered0 = 0;
if (list0.length > 0) {
list0.forEach((item0) => {
count_ok0 = count_ok0 + item0.count_ok;
count_delivered0 =
count_delivered0 +
item0.count_delivered;
});
that.AVGOktongbi = Math.round(
((count_ok - count_ok0) / count_ok0) *
100
);
that.AVGDelivertongbi = Math.round(
((count_delivered - count_delivered0) /
count_delivered0) *
100
);
}
});
}
});
},
getAVGMonthData() {
let that = this;
let start_date = that.year_s + "-" + that.month_s + "-01";
let end_date = that.year_s + "-" + that.month_s + "-" + that.day_s;
let obj = {
query: { start_date: start_date, end_date: end_date },
};
that.$API.bi.dataset.exec.req("AVGMonth", obj).then((res) => {
let list = res.data2.ds0;
let sum = 0,
count_real = 0,
count_ok = 0;
list.forEach((item) => {
sum = sum + item.交付数;
count_ok = count_ok + item.count_ok;
count_real = count_real + item.count_real;
});
this.monthPayNumAVG = sum;
if (count_real != 0) {
this.monthRateAVG = Math.round(
(count_ok / count_real) * 100
);
} else {
this.monthRateAVG = 0;
}
that.monthPayNum6 = sum6;
});
},
getProductStatistic() {
@ -967,13 +835,17 @@ export default {
query: {
start_date: start_date,
end_date: end_date,
dept_name: this.deptName,
dept_name: that.deptName,
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
group_bys_material_name: "",
order_bys_material_name: "",
select_cols_material_name: ""
},
};
that.$API.bi.dataset.exec
.req("productStatistic", obj)
.then((res) => {
console.log("productStatistic:", res);
that.$API.bi.dataset.exec.req("lineDay", obj).then((res) => {
console.log("lineDay本月数据:", res);
let list = res.data2.ds0;
let chartData = [],
xAxisData = [],
@ -990,17 +862,14 @@ export default {
}
}
}
this.hgNumber = (
(hgNumber / xAxisData.length) *
100
).toFixed(2);
this.chartData = chartData;
this.option.xAxis.data = xAxisData;
this.option.series.data = chartData;
that.hgNumber = ((hgNumber / xAxisData.length) *100).toFixed(2);
that.chartData = chartData;
that.option.xAxis.data = xAxisData;
that.option.series.data = chartData;
//
var dom = document.getElementById("barCharts");
var myChart = echarts.init(dom);
myChart.setOption(this.option, true);
myChart.setOption(that.option, true);
});
},
deptNameChange() {
@ -1022,6 +891,7 @@ export default {
box-sizing: border-box;
position: relative;
background: #ffffff;
padding-top: 20px;
}
.Retangle_container {
display: flex;
@ -1079,7 +949,7 @@ export default {
}
.countItem {
width: 20%;
width: 33.33%;
padding-left: 24px;
display: inline-block;
box-sizing: border-box;
@ -1116,7 +986,7 @@ export default {
}
.middleRetangle {
border-radius: 2px;
// border-radius: 2px;
position: relative;
box-sizing: border-box;
}

View File

@ -125,6 +125,15 @@
>
撤销
</el-button>
<el-button
link
type="warning"
@click="revert(scope.row)"
v-auth="'mio.submit'"
v-if="scope.row.state == 20"
>
撤销
</el-button>
<el-button
link
type="danger"

View File

@ -66,8 +66,8 @@
</el-table-column>
<el-table-column label="物料存量" prop="count">
</el-table-column>
<el-table-column label="有效期" prop="expiration_date">
</el-table-column>
<!-- <el-table-column label="有效期" prop="expiration_date">
</el-table-column> -->
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
<!-- <el-table-column width="90">

View File

@ -94,7 +94,7 @@
</el-table-column>
<el-table-column label="批次号" prop="batch">
</el-table-column>
<el-table-column label="大箱序号" prop="pack_index">
<el-table-column label="大箱序号" prop="pack_index" v-if="project_code=='bxerp'&&mioObj.type == 'sale_out'">
</el-table-column>
<el-table-column label="仓库" prop="warehouse_name">
</el-table-column>
@ -104,6 +104,8 @@
<el-link v-else :underline="false" type="primary" @click="showWpr(scope.row)">{{scope.row.count}}</el-link>
</template>
</el-table-column>
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'&&project_code=='gzerp'">
</el-table-column>
<el-table-column label="发出数量" prop="count_send" v-if="mioObj.type == 'sale_out'&&project_code=='gx'">
</el-table-column>
<el-table-column label="样品数量" v-if="mioObj.type == 'sale_out'&&project_code=='gx'">
@ -111,6 +113,38 @@
{{ Number(scope.row.count) - Number(scope.row.count_send) }}
</template>
</el-table-column>
<el-table-column
label="组合件信息"
v-if="cate == 'good'"
width="300"
>
<template #default="scope">
<div v-if="scope.row.assemb.length > 0">
<div
v-for="item in scope.row.assemb"
:key="item.id"
>
<div>
{{ item.material_name }}
<span
style="
color: gray;
font-size: 12px;
"
>:</span
>{{ item.batch }}
<span
style="
color: gray;
font-size: 12px;
"
>:</span
>{{ item.rate }}
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'">
</el-table-column>
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">

View File

@ -450,7 +450,7 @@ export default {
this.inputBatchDisable = true;
} else if (type == "do_in") {
//
query = { page: 0, type__in: type__in };
query = { page: 0,is_hidden: false, type__in: type__in };
this.inputBatchDisable = false;
} else if (type == "pur_in") {
//
@ -552,10 +552,7 @@ export default {
if (that.selectObj.is_assemb) {
this.initAssemb(that.selectObj);
} else {
this.selectBatchDisable = false;
this.components = [];
this.assembShow = false;
this.getBatchOptions();
that.getBatchOptions();
}
} else {
this.getBatchOptions();

View File

@ -93,12 +93,13 @@
placeholder="关联物料"
clearable
multiple
filterable
style="width: 100%"
>
<el-option
v-for="item in materialOptions"
:key="item.id"
:label="item.label"
:label="item.full_name"
:value="item.id"
/>
</el-select>
@ -301,7 +302,7 @@ export default {
query.type = val;
query.page = 0;
query.is_hidden = false;
this.$API.mtm.material.list.req(query).then((res) => {
that.$API.mtm.material.list.req(query).then((res) => {
that.materialOptions = [];
res.forEach((item) => {
item.label =
@ -315,42 +316,37 @@ export default {
},
//
submit() {
this.$refs.dialogForm.validate(async (valid) => {
let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
this.form.brothers = this.brothers;
if (this.form.is_assemb) {
that.isSaveing = true;
that.form.brothers = that.brothers;
if (that.form.is_assemb) {
let obj = {};
this.componentList.forEach((item) => {
that.componentList.forEach((item) => {
obj[item.id] = item.count;
});
this.form.components = obj;
that.form.components = obj;
}
if (this.mode == "add") {
this.$API.mtm.material.create
.req(this.form)
.then((res) => {
this.isSaveing = false;
this.$emit("success", this.form, this.mode);
this.visible = false;
this.$message.success("操作成功");
})
.catch(() => {
this.isSaveing = false;
this.visible = false;
});
} else if (this.mode == "edit") {
this.$API.mtm.material.update
.req(this.form.id, this.form)
.then((res) => {
this.isSaveing = false;
this.$emit("success", this.form, this.mode);
this.visible = false;
this.$message.success("操作成功");
})
.catch(() => {
this.isSaveing = false;
});
if (that.mode == "add") {
that.$API.mtm.material.create.req(that.form).then((res) => {
that.isSaveing = false;
that.$emit("success", that.form, that.mode);
that.visible = false;
that.$message.success("操作成功");
}).catch(() => {
that.isSaveing = false;
that.visible = false;
});
} else if (that.mode == "edit") {
that.$API.mtm.material.update.req(that.form.id, that.form).then((res) => {
that.isSaveing = false;
that.$emit("success", that.form, that.mode);
that.visible = false;
that.$message.success("操作成功");
}).catch(() => {
that.isSaveing = false;
});
}
}
});
@ -377,7 +373,6 @@ export default {
},
delComponent(index) {
this.componentList.splice(index, 1);
console.log("this.componentList:", this.componentList);
},
//
setFilters(filters) {

View File

@ -70,7 +70,7 @@
<el-switch v-model="form.need_enm"></el-switch>
</el-form-item> -->
</el-form>
<sc-form-table v-if="baseCode!=='bxerp'&&baseCode!=='tcerp'" ref="table" v-model="materialList" :addTemplate="addTemplate" placeholder="暂无数据">
<sc-form-table v-if="baseCode!=='bxerp'&&baseCode!=='tcerp'" :pushType="'unshift'" ref="table" v-model="materialList" :addTemplate="addTemplate" placeholder="暂无数据">
<el-table-column prop="type" label="输入物料" min-width="120" align="center">
<template #default="scope">
<span v-if="!scope.row.isedit">{{
@ -207,7 +207,7 @@ export default {
},
getRoute(id) {
let that = this;
that.$API.mtm.route.list.req({ mgroup: id, page: 0 }).then(res => {
that.$API.mtm.route.list.req({ mgroup: id,ordering:'-update_time', page: 0 }).then(res => {
that.routes = res;
let mList = []
res.forEach(item => {

View File

@ -11,12 +11,21 @@
v-auth="'utask.create'"
>新增任务</el-button
>
<el-button
type="primary"
@click="utaskBreak"
v-loading="isBreakLoading"
v-auth="'utask.assgin'"
:disabled="!canBreak"
>任务分解</el-button
>
<el-button
type="primary"
@click="utaskDepuse"
v-loading="isLoading"
v-auth="'utask.assgin'"
>任务分解并下达</el-button
:disabled="!canDepuse"
>任务下达</el-button
>
</div>
<div class="'right-panel'">
@ -167,6 +176,7 @@
@confirm.stop="table_del(scope.row)"
v-if="
scope.row.state == 10 ||
scope.row.state == 14 ||
scope.row.state == 20
"
v-auth="'utask.delete'"
@ -235,6 +245,9 @@ export default {
data() {
return {
utaskId: "",
canBreak:true,
canDepuse:true,
isBreakLoading: false,
visibleDrawer: false,
isLoading: false,
selectedIds: [],
@ -254,6 +267,7 @@ export default {
paramsUtask: {},
paramsObj: {},
utaskList: [],
selection:[],
state_: {
10: "创建中",
14: "已分解",
@ -378,37 +392,60 @@ export default {
gantt.refreshData();
});
},
utaskBreak() {
let that = this;
if (that.selectedIds.length > 0) {
let ids = that.selectedIds;
that.isBreakLoading = true;
that.$API.pm.utask.scheduemtasks.req({ ids: ids }).then((res) => {
that.$message.success("任务分解成功");
that.isBreakLoading = false;
that.$refs.table.refresh();
}).catch(() => {
that.isBreakLoading = false;
});
} else {
this.$message.error("未选择任何任务");
}
},
utaskDepuse() {
let that = this;
if (that.selectedIds.length > 0) {
let ids = that.selectedIds;
that.isLoading = true;
that.$API.pm.utask.scheduemtasks
.req({ ids: ids })
.then((res) => {
that.$API.pm.utask.assgin
.req({ ids: ids })
.then((res) => {
that.$message.success("下达任务成功");
that.isLoading = false;
that.$refs.table.refresh();
})
.catch(() => {
that.isLoading = false;
});
})
.catch(() => {
that.isLoading = false;
});
that.$API.pm.utask.assgin.req({ ids: ids }).then((res) => {
that.$message.success("下达任务成功");
that.isLoading = false;
that.$refs.table.refresh();
}).catch(() => {
that.isLoading = false;
});
} else {
this.$message.error("未选择任何任务");
}
},
handleSelectionChange(selection) {
this.selectedIds = [];
selection.forEach((item) => {
this.selectedIds.push(item.id);
});
this.selection= selection;
if(selection.length>0){
selection.forEach((item) => {
this.selectedIds.push(item.id);
if(item.state == 10){//
this.canBreak = true;
this.canDepuse = false;
}else if(item.state == 14){//
this.canDepuse = true;
this.canBreak = false;
}else{
this.canBreak = false;
this.canDepuse = false;
}
});
}else{
this.canBreak = true;
this.canDepuse = true;
}
},
utaskCreate() {
this.dialog.save = true;

View File

@ -14,8 +14,9 @@
<el-button
type="primary"
@click="utaskDepuse"
v-loading="isLoading"
v-loading="isBreakLoading"
v-auth="'utask.schedule'"
:disabled="!canBreak"
>任务分解</el-button
>
<el-button
@ -23,6 +24,7 @@
@click="utaskAssgin"
v-loading="isLoading"
v-auth="'utask.assgin'"
:disabled="!canDepuse"
>任务下达</el-button
>
</div>
@ -251,6 +253,8 @@ export default {
data() {
return {
utaskId: "",
canBreak:true,
canDepuse:true,
visibleDrawer: false,
isLoading: false,
selectedIds: [],
@ -400,16 +404,16 @@ export default {
let that = this;
if (that.selectedIds.length > 0) {
let ids = that.selectedIds;
that.isLoading = true;
that.isBreakLoading = true;
that.$API.pm.utask.scheduemtasks
.req({ ids: ids })
.then((res) => {
that.$message.success("分解任务成功");
that.isLoading = false;
that.isBreakLoading = false;
that.$refs.table.refresh();
})
.catch(() => {
that.isLoading = false;
that.isBreakLoading = false;
});
} else {
this.$message.error("未选择任何任务");
@ -436,9 +440,24 @@ export default {
},
handleSelectionChange(selection) {
this.selectedIds = [];
selection.forEach((item) => {
this.selectedIds.push(item.id);
});
if(selection.length>0){
selection.forEach((item) => {
this.selectedIds.push(item.id);
if(item.state == 10){//
this.canBreak = true;
this.canDepuse = false;
}else if(item.state == 14){//
this.canDepuse = true;
this.canBreak = false;
}else{
this.canBreak = false;
this.canDepuse = false;
}
});
}else{
this.canBreak = true;
this.canDepuse = true;
}
},
utaskCreate() {
this.dialog.save = true;

View File

@ -11,12 +11,21 @@
v-auth="'utask.create'"
>新增任务</el-button
>
<el-button
type="primary"
@click="utaskBreak"
v-loading="isBreakLoading"
v-auth="'utask.assgin'"
:disabled="!canBreak"
>任务分解</el-button
>
<el-button
type="primary"
@click="utaskDepuse"
v-loading="isLoading"
v-auth="'utask.assgin'"
>任务分解并下达</el-button
:disabled="!canDepuse"
>任务下达</el-button
>
</div>
<div class="'right-panel'">
@ -165,16 +174,11 @@
<el-popconfirm
title="确定删除吗?"
@confirm.stop="table_del(scope.row)"
v-if="
scope.row.state == 10 ||
scope.row.state == 20
"
v-if="scope.row.state == 10 ||scope.row.state == 14 ||scope.row.state == 20"
v-auth="'utask.delete'"
>
<template #reference>
<el-button link type="danger"
>删除</el-button
>
<el-button link type="danger">删除</el-button>
</template>
</el-popconfirm>
<el-popconfirm
@ -270,8 +274,11 @@ export default {
data() {
return {
utaskId: "",
canBreak:true,
canDepuse:true,
visibleDrawer: false,
isLoading: false,
isBreakLoading:false,
selectedIds: [],
dialog: {
save: false,
@ -289,6 +296,7 @@ export default {
paramsUtask: {},
queryUtask: {},
utaskList: [],
selection: [],
state_: {
10: "创建中",
14: "已分解",
@ -369,37 +377,60 @@ export default {
that.ganntVisit = true;
gantt.refreshData();
},
utaskDepuse() {
utaskBreak(){
let that = this;
if (that.selectedIds.length > 0) {
let ids = that.selectedIds;
that.isBreakLoading = true;
that.$API.pm.utask.scheduemtasks.req({ ids: ids }).then((res) => {
that.isBreakLoading = false;
that.$refs.table.refresh();
that.$message.success("任务分解成功");
}).catch(() => {
that.isBreakLoading = false;
});
} else {
this.$message.error("未选择任何任务");
}
},
utaskDepuse() {
let that = this;
if (that.selectedIds.length > 0) {
that.isLoading = true;
that.$API.pm.utask.scheduemtasks
.req({ ids: ids })
.then((res) => {
that.$API.pm.utask.assgin
.req({ ids: ids })
.then((res) => {
that.$message.success("下达任务成功");
that.isLoading = false;
that.$refs.table.refresh();
})
.catch(() => {
that.isLoading = false;
});
})
.catch(() => {
that.isLoading = false;
});
let ids = that.selectedIds;
that.$API.pm.utask.assgin.req({ ids: ids }).then((res) => {
that.$message.success("任务下达成功");
that.isLoading = false;
that.$refs.table.refresh();
}).catch(() => {
that.isLoading = false;
});
} else {
this.$message.error("未选择任何任务");
}
},
handleSelectionChange(selection) {
this.selectedIds = [];
selection.forEach((item) => {
this.selectedIds.push(item.id);
});
this.selection= selection;
if(selection.length>0){
selection.forEach((item) => {
this.selectedIds.push(item.id);
if(item.state == 10){//
this.canBreak = true;
this.canDepuse = false;
}else if(item.state == 14){//
this.canDepuse = true;
this.canBreak = false;
}else{
this.canBreak = false;
this.canDepuse = false;
}
});
}else{
this.canBreak = true;
this.canDepuse = true;
}
},
utaskCreate() {
this.dialog.save = true;

View File

@ -246,6 +246,7 @@ export default {
return {
loading: false,
form: {
val_xj: "S",
},
rules: {
belong_dept: [

View File

@ -279,11 +279,9 @@ export default {
//
getUserList() {
let that = this;
this.$API.system.user.list
.req({ page: 0, posts__code__contains: "check" })
.then((res) => {
that.userList = res.results;
});
this.$API.system.user.list.req({ page: 0, posts__code__contains: "check" }).then((res) => {
that.userList = res;
});
},
// getProcess(){
// let that = this;

View File

@ -82,8 +82,9 @@ export default {
apiObj: this.$API.inm.mioitem.list,
query: {
test_date: '',
ordering: '-test_date'
},
params: { type: 20, mio__type: 'pur_in', test_date__isnull: false },
params: { type: 20, mio__type: 'pur_in',ordering: '-test_date',test_date__isnull:0},
selection: [],
state_: {
10: '',

View File

@ -112,6 +112,8 @@
</el-table-column>
<el-table-column label="壁厚偏差大" prop="count_n_bhpcd">
</el-table-column>
<el-table-column label="其他" prop="count_n_qt">
</el-table-column>
</el-table-column>
<el-table-column label="班组" prop="shift_name">
</el-table-column>

View File

@ -35,7 +35,7 @@
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="test_date"></el-table-column>
<el-table-column label="批次号" prop="batch"> </el-table-column>
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip> </el-table-column>
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip min-width="150"> </el-table-column>
<el-table-column label="总数" prop="count"> </el-table-column>
<el-table-column label="抽检数" prop="count_sampling"> </el-table-column>
<el-table-column label="抽检合格数" prop="count_sampling_ok"> </el-table-column>

View File

@ -0,0 +1,96 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
</div>
<div class="right-panel">
<el-input
v-model="query.batch"
placeholder="批次号"
clearable
style="width: 150px"
></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"
stripe
:params="query"
:query="query"
>
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="test_date"></el-table-column>
<el-table-column label="批次号" prop="batch"> </el-table-column>
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip min-width="150"> </el-table-column>
<el-table-column label="总数" prop="count"> </el-table-column>
<el-table-column label="抽检数" prop="count_sampling"> </el-table-column>
<el-table-column label="抽检合格数" prop="count_sampling_ok"> </el-table-column>
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
<el-table-column label="不合格数" prop="count_notok"> </el-table-column>
</scTable>
</el-main>
<check-dialog
ref="checkDialogs"
v-if="dialog.check"
:materialCate="materialCate"
:ftestWork="ftestWork"
@closed="handleCheckClose"
>
</check-dialog>
</el-container>
</template>
<script>
import checkDialog from "./productCheck.vue";
export default {
name: "product_middle",
components: {
checkDialog,
},
data() {
return {
apiObj: this.$API.qm.ftestwork.list,
query: {
batch:''
},
dialog: {
check: false,
},
ftestWork:'',
materialCate:'',
selection: [],
exportLoading:false,
};
},
methods: {
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};
},
table_check(row) {
let that = this;
that.materialCate = row.material_cate;
that.ftestWork = row.id;
that.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialogs.open();
});
},
exportExcel() {
this.exportLoading = true;
this.$XLSX('#myTable', "成品检验表")
this.exportLoading = false;
},
},
};
</script>

View File

@ -0,0 +1,241 @@
<!-- 最新版生产执行页面 -->
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-date-picker v-model="queryDate" type="month" placeholder="查询月份"
value-format="YYYY-MM" style="width:200px">
</el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button type="primary" @click="downloadPDF">导出</el-button>
</div>
</el-header>
<el-main id="elMain" class="nopadding">
<div id="content">
<!-- 混料统计 -->
<hunliao
class="contentItem"
:firstWeekNum="firstWeekNum"
:endWeekNum="endWeekNum"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
:xAxisData="xAxisData"
></hunliao>
<!-- 合格数统计 -->
<pass_num
class="contentItem"
:firstWeekNum="firstWeekNum"
:endWeekNum="endWeekNum"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
:xAxisData="xAxisData"
></pass_num>
<!-- 任务进度 -->
<task_rate
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></task_rate>
<!-- 工序合格数 -->
<ppass_num
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></ppass_num>
<product_check
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></product_check>
<product_check2
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></product_check2>
<material_statistics
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></material_statistics>
<user_statistics
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></user_statistics>
<inm_statistics
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></inm_statistics>
<stock_statistics
class="contentItem"
:start_date="start_date"
:end_date="end_date"
:queryDate="queryDate"
:queryType="queryType"
></stock_statistics>
</div>
</el-main>
</el-container>
</template>
<script>
import getPdf from "@/utils/htmlToPdf";
import PdfLoader from '@/utils/html2pdf';
import hunliao from "./all_sc_hl.vue";//-
import pass_num from "./all_sc_hg.vue";//-
import task_rate from "./all_sc_rw.vue";//-
import ppass_num from "./all_sc_gx.vue";//-
import product_check from "./all_jy_sc.vue";//-
import product_check2 from "./all_jy_cjg.vue";//-()
import material_statistics from "./all_cg.vue";//
import user_statistics from "./all_jx.vue";//
import inm_statistics from "./all_xs.vue";//
import stock_statistics from "./all_kc.vue";//
export default {
name: "all",
components: {
hunliao,
pass_num,
task_rate,
ppass_num,
product_check,
product_check2,
material_statistics,
user_statistics,
inm_statistics,
stock_statistics},
data() {
return {
queryType:'月',
queryDate: '',
start_date: '',
end_date: '',
xAxisData:[],
xAxisOrigin:[],
firstWeekNum: 1,
endWeekNum: 4,
currentfirstWeekNum: 1,
currentendWeekNum: 4,
pdfDownLoader:null
};
},
mounted() {
let that = this;
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let days = new Date(year, month, 0).getDate();
that.currentYear = year;
that.currentMonth = month;
that.firstWeekNum = that.currentfirstWeekNum = that.getWeekOfYear(year,month,1);
that.endWeekNum = that.currentendWeekNum = that.getWeekOfYear(year,month,days);
month = month < 10 ? '0' + month : month;
that.start_date = year + '-' + month + '-01';
that.end_date = year + '-' + month + '-' + days;
that.queryDate = year + '-' + month;
let duration = that.endWeekNum - that.firstWeekNum + 1;
for (let i = 1; i <= duration; i++) {
that.xAxisOrigin.push('第' + i + '周');
}
that.xAxisData = that.xAxisOrigin;
const content = document.getElementById('content')
this.pdfDownLoader = new PdfLoader(content, '光子科技生产管理系统月度报告') // exportTables -->class
},
methods: {
getWeekOfYear(a,b,c) {
var date1 = new Date(a, parseInt(b) - 1, c), //  
date2 = new Date(a, 0, 1), //  
// d  
d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000);
// d + 7  
return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7);
},
downloadPDF() {
this.$PRINT('#content');
this.pdfDownLoader.outPutPdfFn('光子科技生产管理系统月度报告')
},
handleQuery() {
let that = this;
if (that.queryDate !== "" && that.queryDate !== null) {
let arr = that.queryDate.split("-");
let year = arr[0];
let month = arr[1];
let days = new Date(year, month, 0).getDate();
that.start_date = that.queryDate + "-01";
that.end_date =that.queryDate +"-" +days;
that.firstWeekNum = that.getWeekOfYear(year,month,1);
that.endWeekNum = that.getWeekOfYear(year,month,days);
let duration = that.endWeekNum - that.firstWeekNum + 1;
let xAxisData = [];
for (let i = 1; i <= duration; i++) {
xAxisData.push("第" + i + "周");
}
that.xAxisData = xAxisData;
} else {
that.start_date =that.currentYear + "-" + that.currentMonth + "-01";
that.end_date =that.currentYear +"-" +that.currentMonth +"-" +new Date(that.currentYear,that.currentMonth,0).getDate();
that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1);
that.xAxisData = that.xAxisOrigin;
}
// if (that.queryType == "") {
// if (that.queryDate !== "" && that.queryDate !== null) {
// let arr = that.queryDate.split("-");
// let year = arr[0];
// let month = arr[1];
// let days = new Date(year, month, 0).getDate();
// that.start_date = that.queryDate + "-01";
// that.end_date =that.queryDate +"-" +days;
// that.firstWeekNum = that.getWeekOfYear(year,month,1);
// that.endWeekNum = that.getWeekOfYear(year,month,days);
// let duration = that.endWeekNum - that.firstWeekNum + 1;
// let xAxisData = [];
// for (let i = 1; i <= duration; i++) {
// xAxisData.push("" + i + "");
// }
// that.xAxisData = xAxisData;
// } else {
// that.start_date =that.currentYear + "-" + that.currentMonth + "-01";
// that.end_date =that.currentYear +"-" +that.currentMonth +"-" +new Date(that.currentYear,that.currentMonth,0).getDate();
// that.firstWeekNum = that.getWeekOfYear(that.currentYear,that.currentMonth,1);;
// that.xAxisData = that.xAxisOrigin;
// }
// } else {
// if (that.queryDate !== "" && that.queryDate !== null) {
// that.start_date = that.queryDate + "-01-01";
// that.end_date = that.queryDate + "-12-31";
// } else {
// that.start_date = that.currentYear + "-01-01";
// that.end_date = that.currentYear + "-12-31";
// }
// that.xAxisData = that.monthList;
// }
},
},
};
</script>
<style scoped>
#content{
width: 1190px;
}
.contentItem{
margin-top: 20px;
}
</style>

View File

@ -0,0 +1,100 @@
<template>
<div>
<p style="font-size: 18px;font-weight: 600;text-align: center;margin: 10px;">{{queryDate}}采购统计</p>
<scTable :data="tableData2" hideDo hidePagination class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column
label="年份"
prop="年"
width="80"
/>
<el-table-column
v-if="queryType == '月'"
width="50"
label="周"
prop="周"
/>
<el-table-column
v-else
width="50"
label="月份"
prop="月"
/>
<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>
</div>
</template>
<script>
export default {
name: "all_cg",
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
currentYear: "",
currentMonth: "",
typeOptions: ["月", "年"],
tableData2: [],
materialItem:{},
};
},
mounted() {
this.$nextTick(() => {
this.getTable();
})
},
methods: {
getTable() {
let that = this;
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: "pur_in",
},
};
let exec = that.queryType == "月" ? "saleOutWeek" : "saleOutMonth";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
that.tableData2 = [];
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData2 = data;
}
});
},
},
};
</script>
<style scoped>
.tables {
position: absolute;
top: 4px;
right: 6px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,289 @@
<template>
<div>
<scEcharts height="600px" :option="option6" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData6" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date">
<template #default="scope">
{{ scope.row. }}-{{ scope.row. }}
</template>
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="工段" prop="工段">
</el-table-column>
<el-table-column label="车间" prop="dept_name">
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
<scEcharts height="500px" :option="option7" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData7" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date">
<template #default="scope">
{{ scope.row. }}-{{ scope.row. }}
</template>
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="工段" prop="工段">
</el-table-column>
<el-table-column label="车间" prop="dept_name">
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
<scEcharts height="300px" :option="option10" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData10" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date">
<template #default="scope">
{{ scope.row. }}-{{ scope.row. }}
</template>
</el-table-column>
<el-table-column label="操作人" prop="操作人">
</el-table-column>
<el-table-column label="工段" prop="工段">
</el-table-column>
<el-table-column label="车间" prop="dept_name">
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import scEcharts from "@/components/scEcharts";
export default {
name: "all_jx",
components: {
scEcharts,
},
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
queryBelongDept: "",
currentYear: "",
currentMonth: "",
deptData: [],
tableData: [],
option6:{
title: {
text: "6车间人员绩效统计",
left: "center",
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
},
xAxis: {
type: "value",
position: "top",
axisLine: {
show: true,
},
},
yAxis: {
type: "category",
data: [],
},
series: {
data: [],
type: "bar",
barWidth: "15px",
},
},
option7:{
title: {
text: "7车间人员绩效统计",
left: "center",
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
},
xAxis: {
type: "value",
position: "top",
axisLine: {
show: true,
},
},
yAxis: {
type: "category",
data: [],
},
series: {
data: [],
type: "bar",
barWidth: "15px",
},
},
option10:{
title: {
text: "10车间人员绩效统计",
left: "center",
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
},
xAxis: {
type: "value",
position: "top",
axisLine: {
show: true,
},
},
yAxis: {
type: "category",
data: [],
},
series: {
data: [],
type: "bar",
barWidth: "15px",
},
},
tableData6: [],
tableData7: [],
tableData10: [],
chartHeight: 0,
};
},
mounted() {
this.$nextTick(() => {
this.getData();
})
},
methods: {
deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
},
getData() {
let that = this;
let obj6 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: '6车间',
},
};
that.$API.bi.dataset.exec.req("performance", obj6).then((res) => {
console.log("绩效统计6:", res);
let data = res.data2.ds0;
let seriesData = [],yAxisData = [];
data.forEach((item) => {
item.dept_name = "6车间";
seriesData.push(item.合格数);
yAxisData.push(item.操作人 + "∙" + item.工段);
});
that.tableData6 = data;
that.option6.yAxis.data = yAxisData;
that.option6.series.data = seriesData;
});
let obj7 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: '7车间',
},
};
that.$API.bi.dataset.exec.req("performance", obj7).then((res) => {
console.log("绩效统计7:", res);
let data = res.data2.ds0;
let seriesData = [],yAxisData = [];
data.forEach((item) => {
item.dept_name = "7车间";
seriesData.push(item.合格数);
yAxisData.push(item.操作人 + "∙" + item.工段);
});
that.tableData7 = data;
that.option7.yAxis.data = yAxisData;
that.option7.series.data = seriesData;
});
let obj10 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: '10车间',
},
};
that.$API.bi.dataset.exec.req("performance", obj10).then((res) => {
console.log("绩效统计10:", res);
let data = res.data2.ds0;
let seriesData = [],yAxisData = [];
data.forEach((item) => {
item.dept_name = "10车间";
seriesData.push(item.合格数);
yAxisData.push(item.操作人 + "∙" + item.工段);
});
that.tableData10 = data;
that.option10.yAxis.data = yAxisData;
that.option10.series.data = seriesData;
});
},
},
};
</script>
<style scoped>
.tables {
position: absolute;
top: 4px;
left: 4px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,213 @@
<template>
<div>
<div v-for="(item, $index) in mgroup" :key="item.id">
<scEcharts height="500px" :option="'option'+$index"></scEcharts>
<el-table :data="'tableData'+$index" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date">
<template #default="scope">
<span>{{ scope.row. }}</span>
<span v-if="scope.row.月">-{{ scope.row.月 }}</span>
</template>
</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 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>
</div>
</div>
</template>
<script>
import scEcharts from '@/components/scEcharts';
const baseOption ={
title: {
text: '工序检验统计',
left: 'center'
},
tooltip: {
trigger: 'item'
},
series: [
{
name: '工序检验',
type: 'pie',
radius: ['40%', '60%'],
center: ['50%', '60%'],
label: {
show: true,
formatter: '{b} : {c}',
},
data: []
}
]
};
export default {
name: 'all_jy_cjg',
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
components: {
scEcharts
},
data() {
return {
currentYear:'',
currentMonth:'',
typeOptions:['月','年'],
mgroupOption:[],
tableData0:[],
tableData1:[],
tableData2:[],
tableData3:[],
tableData4:[],
tableData5:[],
tableData6:[],
tableData7:[],
tableData8:[],
tableData9:[],
tableData10:[],
tableData11:[],
tableData12:[],
tableData13:[],
tableData14:[],
option0:{},
option1:{},
option2:{},
option3:{},
option4:{},
option5:{},
option6:{},
option7:{},
option8:{},
option9:{},
option10:{},
option11:{},
option12:{},
option13:{},
option14:{},
}
},
mounted(){
this.$nextTick(() => {
this.getMgroup();
})
},
methods:{
deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
},
getMgroup(){
let that = this;
this.$API.mtm.mgroup.list.req({belong_dept__name:'6车间',page:0}).then((res) => {
for(let i=0;i<res.length;i++){
that.mgroupsData = res;
this.getData(res[i].name,i);
}
});
},
getData(name,index){
let that = this;
let exec = that.queryType=='月'?'lineMonth':'lineYear';
let obj = {
query: {
end_date: that.end_date,
start_date: that.start_date,
mgroup_name: name,
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
group_bys_mgroup: ", mgroup.name",
select_cols_mgroup: ", mgroup.name AS 工段",
is_count_utask: -1
},
};
let optionKey = 'option'+index;
let tableKey = 'tableData'+index;
that[optionKey] = that.deepCopy(baseOption);
that[optionKey].title.text= name;
//echarts
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
let seriesData = [
{value: 0, name: '合格数'},
{value: 0, name: '条纹'},
{value: 0, name: '气泡'},
{value: 0, name: '断裂' },
{value: 0, name: '气线' },
{value: 0, name: '炸纹'},
{value: 0, name: '结石'},
{value: 0, name: '弯曲' },
{value: 0, name: '偏壁'},
{value: 0, name: '大小头'},
{value: 0, name: '其他'},
];
if (data.length > 0) {
data.forEach((item) => {
seriesData.forEach((item2) => {
item2.value += item[item2.name];
})
})
}
that[optionKey].series[0].data = seriesData;
}
});
let obj2 = {
query: {
start_date: that.start_date, end_date: that.end_date,
mgroup_name: name,
group_bys_mgroup: ", mgroup.name",
select_cols_mgroup: ", mgroup.name AS 工段",
is_count_utask: -1
},
};
//table
that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => {
console.log('获取table数据:', res2.data2.ds0);
that[tableKey] = res2.data2.ds0;
});
},
},
}
</script>
<style scoped>
.tables {
position: absolute;
top: 4px;
right: 6px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,506 @@
<template>
<div>
<scEcharts height="300px" :option="option1" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData7" class="exportTables">
<el-table-column
label="年"
prop="年"
v-if="queryType == '年'"
width="60"
>
</el-table-column>
<el-table-column
label="月"
prop="月"
v-else
width="60"
>
</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="合格率">
<template #default="scope">
<span>{{Math.round(scope.row.合格率)}}%</span>
</template>
</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>
</el-table>
<scEcharts height="300px" :option="option2" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData10" class="exportTables">
<el-table-column
label="年"
prop="年"
v-if="queryType == '年'"
width="60"
>
</el-table-column>
<el-table-column
label="月"
prop="月"
v-else
width="60"
>
</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="合格率">
<template #default="scope">
<span>{{Math.round(scope.row.合格率)}}%</span>
</template>
</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>
</el-table>
<scEcharts height="300px" :option="option3" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData8" class="exportTables">
<el-table-column
label="年"
prop="年"
v-if="queryType == '年'"
width="60"
>
</el-table-column>
<el-table-column
label="月"
prop="月"
v-else
width="60"
>
</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="合格率">
<template #default="scope">
<span>{{Math.round(scope.row.合格率)}}%</span>
</template>
</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>
</el-table>
</div>
</template>
<script>
const colors = [
"rgb(64,158,255)",
"#FAFAD2",
"#EEE9BF",
"#EEDC82",
"#EED5B7",
"#EEC591",
"#EEAD0E",
"#EE9A00",
"#EE9572",
"#F08080",
];
import scEcharts from "@/components/scEcharts";
export default {
name: "all_jy_sc",
components: {
scEcharts,
},
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
currentYear: "",
currentMonth: "",
typeOptions: ["月", "年"],
option1: {
color: colors,
title: {
text: "7车间不合格原因及数量",
left: "center",
},
tooltip: {
trigger: "item",
},
legend: {
top: "10%",
right:'5%',
orient: 'vertical',
},
series: {
name: "7车间预制棒",
type: "pie",
radius: ["35%", "65%"],
center: ["45%", "50%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "合格数" },
{ value: 0, name: "炸纹" },
{ value: 0, name: "条纹" },
{ value: 0, name: "气泡" },
{ value: 0, name: "弯曲" },
{ value: 0, name: "其他" },
],
},
},
option2: {
color: colors,
title: {
text: "10车间不合格原因及数量",
left: "center",
},
tooltip: {
trigger: "item",
},
legend: {
top: "10%",
right:'5%',
orient: 'vertical',
},
series: {
name: "10车间预制管检验统计",
type: "pie",
radius: ["35%", "65%"],
center: ["45%", "50%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "合格数" },
{ value: 0, name: "条纹" },
{ value: 0, name: "断裂" },
{ value: 0, name: "偏壁" },
{ value: 0, name: "大小头" },
{ value: 0, name: "结石" },
{ value: 0, name: "气线" },
],
},
},
option3: {
color: colors,
title: {
text: "退火不合格原因及数量",
left: "center",
// subtext: '',
},
tooltip: {
trigger: "item",
},
legend: {
top: "10%",
right:'5%',
orient: 'vertical',
},
series: {
name: "退火预制管",
type: "pie",
radius: ["35%", "65%"],
center: ["45%", "50%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "合格数" },
{ value: 0, name: "椭圆/弯曲" },
{ value: 0, name: "条纹" },
{ value: 0, name: "断裂" },
{ value: 0, name: "偏壁" },
{ value: 0, name: "大小头" },
{ value: 0, name: "结石" },
{ value: 0, name: "气线" },
{ value: 0, name: "箱中破" },
],
},
},
tableData7: [],
tableData10: [],
tableData8: [],
};
},
mounted() {
this.$nextTick(() => {
this.getData();
this.getData7();
this.getData10();
})
},
methods: {
getData() {
let that = this;
that.tableData8 = [];
let exec = that.queryType == "月" ? "lineMonth" : "lineYear";
let obj = {
query: {
start_date: this.start_date,
end_date: this.end_date,
mgroup_name: "管料退火",
is_count_utask: -1,
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log("退火车间统计:", res);
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData8 = data;
} else {
that.tableData8 = [];
}
});
//echarts
let obj2 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
mgroup_name: "管料退火",
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
is_count_utask: -1,
},
};
that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => {
console.log("退火车间统计:", res2);
if (res2.data2.ds0) {
that.option3.series.data[0].value=0;
that.option3.series.data[1].value=0;
that.option3.series.data[2].value=0;
that.option3.series.data[3].value=0;
that.option3.series.data[4].value=0;
that.option3.series.data[5].value=0;
that.option3.series.data[6].value=0;
that.option3.series.data[7].value=0;
that.option3.series.data[8].value=0;
let data = res2.data2.ds0;
if (data.length > 0) {
data.forEach((item) => {
that.option3.series.data[0].value += item.合格数;
that.option3.series.data[1].value += item.弯曲;
that.option3.series.data[2].value += item.条纹;
that.option3.series.data[3].value += item.断裂;
that.option3.series.data[4].value += item.偏壁;
that.option3.series.data[5].value += item.大小头;
that.option3.series.data[6].value += item.结石;
that.option3.series.data[7].value += item.气线;
that.option3.series.data[8].value += item.箱中破;
});
}
}
});
},
getData7() {
let that = this;
that.tableData7 = [];
let obj = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: "7车间",
},
};
let exec = that.queryType == "月" ? "lineMonth" : "lineYear";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log("7生产车间统计:", res);
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData7 = data;
} else {
that.tableData7 = [];
}
});
//echarts
let obj2 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: "7车间",
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
},
};
that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => {
console.log("7生产车间统计:", res2);
if (res2.data2.ds0) {
that.option1.series.data[0].value=0;
that.option1.series.data[1].value=0;
that.option1.series.data[2].value=0;
that.option1.series.data[3].value=0;
that.option1.series.data[4].value=0;
that.option1.series.data[5].value=0;
let data = res2.data2.ds0;
if (data.length > 0) {
data.forEach((item) => {
that.option1.series.data[0].value += item.合格数;
that.option1.series.data[1].value += item.炸纹;
that.option1.series.data[2].value += item.条纹;
that.option1.series.data[3].value += item.气泡;
that.option1.series.data[4].value += item.弯曲;
that.option1.series.data[5].value += item.其他;
});
}
}
});
},
getData10() {
let that = this;
that.tableData10 = [];
let obj = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: "10车间",
},
};
let exec = that.queryType == "月" ? "lineMonth" : "lineYear";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log("10生产车间统计:", res);
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData10 = data;
} else {
that.tableData10 = [];
}
});
//echarts
let obj2 = {
query: {
start_date: this.start_date,
end_date: this.end_date,
dept_name: "10车间",
group_bys_material: "",
order_bys_material: "",
select_cols_material: "",
},
};
that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => {
console.log("10生产车间统计:", res2);
if (res2.data2.ds0) {
let data = res2.data2.ds0;
that.option2.series.data[0].value=0;
that.option2.series.data[1].value=0;
that.option2.series.data[2].value=0;
that.option2.series.data[3].value=0;
that.option2.series.data[4].value=0;
that.option2.series.data[5].value=0;
that.option2.series.data[6].value=0;
if (data.length > 0) {
data.forEach((item) => {
that.option2.series.data[0].value += item.合格数;
that.option2.series.data[1].value += item.断裂;
that.option2.series.data[2].value += item.条纹;
that.option2.series.data[3].value += item.偏壁;
that.option2.series.data[4].value += item.大小头;
that.option2.series.data[5].value += item.结石;
that.option2.series.data[6].value += item.气线;
});
}
}
});
},
},
};
</script>
<style scoped>
.tables {
position: absolute;
top: 4px;
right: 14px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,425 @@
<template>
<div>
<!-- 10 成品-->
<p class="titleText">当前成品库存</p>
<scTable :data="tableData10" class="exportTables" stripe hideDo hidePagination>
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="material_name" />
<el-table-column label="型号" prop="material_model" />
<el-table-column label="规格" prop="material_specification" />
<el-table-column label="完成车间" prop="dept_name" />
<el-table-column label="库存总数" prop="count" />
</scTable>
<!-- 20 半成品 -->
<p class="titleText">当前半成品库存</p>
<scTable :data="tableData20" class="exportTables" stripe hideDo hidePagination>
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="material_name" />
<el-table-column label="型号" prop="material_model" />
<el-table-column label="规格" prop="material_specification"/>
<el-table-column label="完成车间" prop="dept_name" />
<el-table-column label="库存总数" prop="count" />
</scTable>
<!-- 30原料 -->
<p class="titleText">当前原料库存</p>
<scTable class="exportTables" :apiObj="apiObj" :params="params30" stripe hideDo hidePagination>
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="name">
</el-table-column>
<el-table-column label="型号" prop="model">
</el-table-column>
<el-table-column label="规格" prop="specification">
</el-table-column>
<el-table-column label="库存总数" prop="count_mb">
</el-table-column>
<el-table-column label="周预估值" prop="week_esitimate_consume">
</el-table-column>
<el-table-column label="可用天数">
<template #default="scope">
<span v-if="scope.row.week_esitimate_consume &&scope.row.week_esitimate_consume !==null">
{{Math.floor(scope.row.count_mb /scope.row.week_esitimate_consume) * 7}}
</span>
</template>
</el-table-column>
</scTable>
<!-- 40辅料 -->
<p class="titleText">当前辅料库存</p>
<scTable class="exportTables" :apiObj="apiObj" :params="params40" stripe hideDo hidePagination>
<el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="name">
</el-table-column>
<el-table-column label="型号" prop="model">
</el-table-column>
<el-table-column label="规格" prop="specification">
</el-table-column>
<el-table-column label="库存总数" prop="count_mb">
</el-table-column>
</scTable>
<!-- 采购入库 -->
<p class="titleText">采购入库统计</p>
<scTable class="exportTables"
v-if="tableDatapur_in.length > 0"
:data="tableDatapur_in"
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="出入库类型">采购入库
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月入库总数" prop="数量">
</el-table-column>
</template>
<template v-if=" queryType == '年'">
<el-table-column label="年入库总数" prop="数量">
</el-table-column>
</template>
</scTable>
<!-- 销售发货 -->
<p class="titleText">销售发货统计</p>
<scTable class="exportTables"
v-if="tableDatasale_out.length > 0"
:data="tableDatasale_out"
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="出入库类型">销售发货
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月出库数量" prop="数量">
</el-table-column>
</template>
<template v-if="queryType == '年'">
<el-table-column label="年出库总数" prop="数量">
</el-table-column>
</template>
</scTable>
<!-- 生产入库 -->
<p class="titleText">生产入库统计</p>
<scTable class="exportTables"
v-if="tableDatado_in.length > 0"
:data="tableDatado_in"
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="出入库类型">生产入库
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月入库总数" prop="数量">
</el-table-column>
</template>
<template v-if="queryType == '年'">
<el-table-column label="年入库总数" prop="数量">
</el-table-column>
</template>
</scTable>
<!-- 生产领料 -->
<p class="titleText">生产领料统计</p>
<scTable class="exportTables"
v-if="tableDatado_out.length > 0"
:data="tableDatado_out"
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="出入库类型">生产领料
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月出库数量" prop="数量">
</el-table-column>
</template>
<template v-if="queryType == '年'">
<el-table-column label="年出库总数" prop="数量">
</el-table-column>
</template>
</scTable>
<!-- 其他入库 -->
<p class="titleText">其他入库统计</p>
<scTable class="exportTables"
v-if="tableDataother_in.length > 0"
:data="tableDataother_in"
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="出入库类型">其他入库
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月入库总数" prop="数量">
</el-table-column>
</template>
<template
v-if="queryType == '年'">
<el-table-column label="年入库总数" prop="数量">
</el-table-column>
</template>
</scTable>
<!-- 其他出库 -->
<p class="titleText">其他出库统计</p>
<scTable class="exportTables"
v-if="tableDataother_out.length > 0"
:data="tableDataother_out"
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="出入库类型">其他出库
</el-table-column>
<el-table-column label="执行车间" prop="执行车间">
</el-table-column>
<template v-if="queryType == '月'">
<el-table-column label="月出库数量" prop="数量">
</el-table-column>
</template>
<template v-if=" queryType == '年'">
<el-table-column label="年出库总数" prop="数量">
</el-table-column>
</template>
</scTable>
</div>
</template>
<script>
export default {
name: "all_kc",
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
apiObj: this.$API.mtm.material.list,
params10: { is_hidden: false, type: 10, count__gte: 1 },
params20: { is_hidden: false, type: 20, count__gte: 1 },
params30: { is_hidden: false, type: 30, count__gte: 1 },
params40: { is_hidden: false, type: 40, count__gte: 1 },
currentYear: "",
currentMonth: "",
currentLastDay: "",
tableData10: [],
tableData20: [],
tableDatapur_in: [],
tableDatasale_out: [],
tableDatado_in: [],
tableDatado_out: [],
tableDataother_in: [],
tableDataother_out: [],
typeOptions: ["月", "年"],
};
},
mounted() {
let that = this;
that.$nextTick(() => {
that.getTableData10();
that.getTableData20();
that.getTableDataPurin();
that.getTableDataSaleout();
that.getTableDataDoout();
that.getTableDataDoin();
that.getTableDataOtherin();
that.getTableDataOtherout();
})
},
methods: {
getTableData10(){
let that = this;
let obj = {
query: {material_types: 10},
};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
if (res.data2.ds0) {
that.tableData10 = res.data2.ds0;
}
});
},
getTableData20(){
let that = this;
let obj = {
query: {material_types: 20},
};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
if (res.data2.ds0) {
that.tableData20 = res.data2.ds0;
}
});
},
//
getTableDataPurin() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'pur_in',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDatapur_in = data;
}
});
},
//
getTableDataSaleout() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'sale_out',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDatasale_out = data;
}
});
},
//
getTableDataDoout() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'do_out',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDatado_out = data;
}
});
},
//
getTableDataDoin() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'do_in',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDatado_in = data;
}
});
},
//
getTableDataOtherin() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'other_in',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDataother_in = data;
}
});
},
//
getTableDataOtherout() {
let that = this;
let exec = that.queryType == "月" ? "saleOutMonth" : "saleOutYear";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: 'other_out',
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableDataother_out = data;
}
});
},
},
};
</script>
<style lang="scss">
.titleText{
font-size: 18px;
font-weight: 600;
text-align: center;
margin: 10px;
}
</style>

View File

@ -0,0 +1,167 @@
<template>
<div>
<scEcharts height="300px" :option="option" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column label="工段" prop="工段">
</el-table-column>
<el-table-column
label="物料名"
prop="物料名"
min-width="100"
>
</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="完成进度">
<template #default="scope">
<span v-if="scope.row.完成进度&&scope.row.完成进度>0">{{(scope.row.完成进度).toFixed(2)}}%</span>
<span v-else>{{scope.row.完成进度}}</span>
</template>
</el-table-column>
<el-table-column label="合格率" prop="合格率">
<template #default="scope">
<span v-if="scope.row.合格率&&scope.row.合格率>0">{{(scope.row.合格率).toFixed(2)}}%</span>
<span v-else>{{scope.row.合格率}}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import scEcharts from "@/components/scEcharts";
export default {
name: "all_sc_gx",
components: {
scEcharts,
},
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
currentYear: "",
currentMonth: "",
typeOptions: ["月", "年"],
option: {
title: {
text: "6车间工序合格数统计",
left: "center",
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
},
legend: {
top: "10%",
icon: "stack",
right:'10%',
},
xAxis: {
type: "category",
data: [],
},
yAxis: {
type: "value",
},
series: [],
},
processData: [],
xAxisData: [],
tableData: [],
};
},
mounted() {
let that = this;
that.$nextTick(() => {
that.getData6();
})
},
methods: {
getData6() {
let that = this;
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
dept_name: "6车间",
select_cols_material: "",
group_bys_material: "",
order_bys_material: "",
is_count_utask: -1,
select_cols_mgroup: ", mgroup.name AS 工段",
group_bys_mgroup: ", mgroup.name",
order_bys_mgroup:",工段"
},
raise_exception: true,
};
if (that.queryType == "月") {
obj.query.select_cols_date =
",EXTRACT ( MONTH FROM mlog.handle_date ) AS 月";
obj.query.group_bys_date =
",EXTRACT ( MONTH FROM mlog.handle_date )";
obj.query.order_bys_date = ", 月";
}
let xAxisData = [],nameData=[],seriesData=[];
that.$API.bi.dataset.exec.req("lineWeek", obj).then((res) => {
let data = res.data2.ds0;
that.tableData = data;
data.forEach((item) => {
if (xAxisData.indexOf(item.工段) > -1) {
} else {
xAxisData.push(item.工段);
}
if (nameData.indexOf(item.物料名) > -1) {
} else {
nameData.push(item.物料名);
let obj = {
name:'',
type: "bar",
label:{
show: true,
position: "top",
formatter: "{c}"
},
barWidth: "15px",
data:[0, 0, 0, 0, 0, 0, 0, 0],
};
obj.name=item.物料名,
seriesData.push(obj);
}
let index = xAxisData.indexOf(item.工段);
let indexY = nameData.indexOf(item.物料名);
seriesData[indexY].data[index] += item.合格数;
});
that.xAxisData = xAxisData;
that.option.xAxis.data = that.xAxisData;
that.option.series = seriesData;
});
},
},
};
</script>

View File

@ -0,0 +1,478 @@
<template>
<div>
<div id="bachart1"></div>
<el-table :data="tableData7" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column
label="物料名"
prop="物料名"
min-width="100"
>
</el-table-column>
<el-table-column
label="月份"
prop="月"
v-if="queryType == '年'"
width="50"
>
</el-table-column>
<el-table-column
label="周"
prop="周"
v-else
width="50"
>
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
<div id="bachart2"></div>
<el-table :data="tableData10" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column
label="物料名"
prop="物料名"
min-width="100"
>
</el-table-column>
<el-table-column
label="月份"
prop="月"
v-if="queryType == '年'"
>
</el-table-column>
<el-table-column label="周" prop="周" v-else>
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
<div id="bachart3"></div>
<el-table :data="tableData6" class="exportTables">
<el-table-column type="index" width="50" />
<el-table-column
label="物料名"
prop="物料名"
min-width="100"
>
</el-table-column>
<el-table-column
label="物料系列"
prop="物料系列"
>
</el-table-column>
<el-table-column
label="月份"
prop="月"
v-if="queryType == '年'"
>
</el-table-column>
<el-table-column label="周" prop="周" v-else>
</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="合格率">
<template #default="scope">
{{ Math.round(scope.row.合格率) }}%
</template>
</el-table-column>
</el-table>
</div>
</template>
<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) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "all_sc_hg",
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
firstWeekNum:{
type: String,
default: ""
},
endWeekNum:{
type: String,
default: ""
},
xAxisData:{
type: String,
default: ""
},
},
components: {
scEcharts,
},
data() {
return {
typeOptions: ["月", "年"],
basicOption: {
backgroundColor: "transparent",
title: {
text: "",
left: 'center',
},
grid: {
top: "80px",
},
tooltip: {
trigger: "axis",
show: true,
},
xAxis: {
type: "category",
data: [],
},
yAxis: {
type: "value",
},
legend: {
top: "10%",
icon: "stack",
right:'10%',
},
series: [
{
data: [0, 0, 0, 0, 0, 0, 0],
stack: "Ad",
type: "bar",
barWidth: "15px",
},
],
},
tableData6: [],
tableData7: [],
tableData10: [],
monthList: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
};
},
mounted() {
this.$nextTick(() => {
this.getData6();
this.getData7();
this.getData10();
})
},
methods: {
setChart(name, option = null) {
// name , optionoption
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);
},
queryTypeChange(value) {
console.log(value);
},
getData6() {
let that = this;
let option = deepCopy(that.basicOption);
option.xAxis.data = that.xAxisData;
option.title.text = "6车间生产合格数统计";
let exec = that.queryType == "月" ? "lineWeek" : "lineMonth";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
dept_name: "6车间",
},
};
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
let tableData6 = res.data2.ds0 ? res.data2.ds0 : [];
that.tableData6 = tableData6;
if (tableData6.length > 0) {
option.series = [];
let seriesData = [],
nameList = [];
tableData6.forEach((ite) => {
if (nameList.indexOf(ite.物料名) > -1) {
} else {
nameList.push(ite.物料名);
seriesData.push([]);
}
});
if (that.queryType == "月") {
tableData6.forEach((item) => {
let indexX = nameList.indexOf(item.物料名);
let indexY = item. - that.firstWeekNum;
if(seriesData[indexX][indexY]){
seriesData[indexX][indexY] += item.合格数;
}else{
seriesData[indexX][indexY] =0;
seriesData[indexX][indexY] += item.合格数;
}
});
} else {
tableData6.forEach((item) => {
let indexX = nameList.indexOf(item.物料名);
let indexY = item.month - 1;
if(seriesData[indexX][indexY]){
seriesData[indexX][indexY] += item.合格数;
}else{
seriesData[indexX][indexY] =0;
seriesData[indexX][indexY] += item.合格数;
}
});
}
for (let n = 0; n < seriesData.length; n++) {
let obj = {};
obj.name = nameList[n];
obj.stack = "Ad";
obj.type = "bar";
obj.barWidth = "15px";
obj.data = seriesData[n];
obj.label={
show: true,
position: "right",
formatter: "{c}",
};
option.series.push(obj);
}
that.setChart("bachart3", option);
} else {
that.setChart("bachart3", option);
}
});
},
getData7() {
let that = this;
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
dept_name: "7车间",
},
};
let option = deepCopy(that.basicOption);
option.xAxis.data = that.xAxisData;
option.title.text = "预制棒生产合格数统计7车间";
let exec = that.queryType == "月" ? "lineWeek" : "lineMonth";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
console.log("7生产车间统计:", res);
let tableData7 = res.data2.ds0 ? res.data2.ds0 : [];
that.tableData7 = tableData7;
debugger;
if (tableData7.length > 0) {
debugger;
option.series = [];
let seriesData = [],
nameList = [];
tableData7.forEach((ite) => {
if (nameList.indexOf(ite.物料名) > -1) {
} else {
nameList.push(ite.物料名);
seriesData.push([]);
}
});
tableData7.forEach((item) => {
let indexX = 0,
indexY = 0;
if (that.queryType == "月") {
indexX = nameList.indexOf(item.物料名);
indexY = item. - that.firstWeekNum;
} else {
indexX = nameList.indexOf(item.物料名);
indexY = item. - 1;
}
if(seriesData[indexX][indexY]){
seriesData[indexX][indexY] += item.合格数;
}else{
seriesData[indexX][indexY] =0;
seriesData[indexX][indexY] += item.合格数;
}
});
for (let n = 0; n < seriesData.length; n++) {
let obj = {};
obj.name = nameList[n];
obj.stack = "Ad";
obj.type = "bar";
obj.barWidth = "15px";
obj.data = seriesData[n];
obj.label={
show: true,
position: "right",
formatter: "{c}",
};
option.series.push(obj);
}
that.setChart("bachart1", option);
} else {
that.setChart("bachart1", option);
}
});
},
getData10() {
let that = this;
let option = deepCopy(that.basicOption);
option.xAxis.data = that.xAxisData;
option.title.text = "预制管生产合格数统计10车间";
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
dept_name: "10车间",
},
};
let exec = that.queryType == "月" ? "lineWeek" : "lineMonth";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
// console.log('10:',res);
let tableData10 = res.data2.ds0 ? res.data2.ds0 : [];
that.tableData10 = tableData10;
if (tableData10.length > 0) {
option.series = [];
let seriesData = [],
nameList = [];
tableData10.forEach((ite) => {
if (nameList.indexOf(ite.物料名) > -1) {
} else {
nameList.push(ite.物料名);
seriesData.push([]);
}
});
tableData10.forEach((item) => {
let indexX = 0,
indexY = 0;
if (that.queryType == "月") {
indexX = nameList.indexOf(item.物料名);
indexY = item. - that.firstWeekNum;
} else {
indexX = nameList.indexOf(item.物料名);
indexY = item. - 1;
}
if(seriesData[indexX][indexY]){
seriesData[indexX][indexY] += item.合格数;
}else{
seriesData[indexX][indexY] =0;
seriesData[indexX][indexY] += item.合格数;
}
});
for (let n = 0; n < seriesData.length; n++) {
let obj = {};
obj.name = nameList[n];
obj.stack = "Ad";
obj.type = "bar";
obj.barWidth = "15px";
obj.data = seriesData[n];
option.series.push(obj);
obj.label={
show: true,
position: "right",
formatter: "{c}",
};
}
that.setChart("bachart2", option);
} else {
that.setChart("bachart2", option);
}
});
},
},
};
</script>
<style scoped>
#bachart1,
#bachart2,
#bachart3,
#bachart4 {
width: 100%;
height: 300px;
margin-top: 10px;
}
.tables {
position: absolute;
top: 6px;
left: 4px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,185 @@
<!-- 混料统计 -->
<template>
<div>
<div id="bachartHL" style="width:100%;height:300px;margin-top: 10px;"></div>
<el-table :data="dataList" class="exportTables">
<el-table-column type="index" width="50"/>
<el-table-column label="物料名" prop="物料名">
</el-table-column>
<el-table-column label="月份" prop="月" v-if="queryType == '年'">
</el-table-column>
<el-table-column label="周" prop="周" v-else>
</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>
</div>
</template>
<script>
import * as echarts from "echarts";
import T from '@/components/scEcharts/echarts-theme-T.js';
echarts.registerTheme('T', T);
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
export default {
name: "all_sc_hl",
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
firstWeekNum:{
type: String,
default: ""
},
endWeekNum:{
type: String,
default: ""
},
xAxisData:{
type: String,
default: ""
},
},
data() {
return {
typeOptions: ["月", "年"],
dataList: [],
xAxisOrigin:[],
basicOption: {
backgroundColor: 'transparent',
title: {
text: '混料生产桶数及重量统计',
left: 'center',
},
grid: {
top: '80px'
},
tooltip: {
trigger: 'axis'
},
legend: {
top: "10%",
icon: "stack",
right:'10%',
},
xAxis: {
type: 'category',
data: []
},
yAxis: {
type: 'value'
},
series: [{
data: [0, 0, 0, 0, 0, 0, 0],
stack: 'Ad',
type: 'bar',
barWidth: '15px',
}]
},
monthList: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
};
},
mounted() {
this.$nextTick(() => {
this.getDataHL();//
})
},
methods: {
setChart(name, option = null) {
// name , optionoption
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)
},
getDataHL() {
let that = this;
let obj = {
query: { start_date: that.start_date, end_date: that.end_date, mgroup_name: "混料", is_count_utask: -1 },
};
let option = deepCopy(that.basicOption);
option.xAxis.data = that.xAxisData;
that.$API.bi.dataset.exec.req('lineWeek', obj).then((res) => {
let dataList = res.data2.ds0 ? res.data2.ds0 : [];
that.dataList = dataList;
if (dataList.length > 0) {
option.series = [];
let seriesData = [], nameList = [];
dataList.forEach(ite => {
if (nameList.indexOf(ite.物料名) > -1) { } else {
nameList.push(ite.物料名);
seriesData.push([0,0,0,0,0,0,0,0,0,0,0,0])
}
})
dataList.forEach(item => {
let indexX = 0, indexY = 0;
indexX = nameList.indexOf(item.物料名);
indexY = item. - that.firstWeekNum;
seriesData[indexX][indexY] += item.合格数;
});
for (let n = 0; n < seriesData.length; n++) {
let obj = {};
obj.name = nameList[n];
obj.stack = 'Ad';
obj.type = 'bar';
obj.barWidth = '15px';
obj.data = seriesData[n];
obj.label={
show: true,
position: "right",
formatter: "{c}",
};
option.series.push(obj)
}
that.setChart("bachartHL", option);
} else {
that.setChart("bachartHL", option);
}
});
},
},
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,299 @@
<template>
<div>
<scEcharts height="300px" :option="option1" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData1" class="exportTables">
<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>
<scEcharts height="300px" :option="option2" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData2" class="exportTables">
<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>
<scEcharts height="300px" :option="option3" style="margin-top: 10px;"></scEcharts>
<el-table :data="tableData3" class="exportTables">
<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>
</div>
</template>
<script>
import scEcharts from "@/components/scEcharts";
export default {
name: "chart",
components: {
scEcharts,
},
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
tableHeight: 0,
currentYear: "",
currentMonth: "",
typeOptions: ["月", "年"],
option1: {
title: {
text: "7车间任务完成进度",
left: 'center',
},
tooltip: {
trigger: "item",
},
legend: {
top: "3",
right: "3%",
},
color: ["rgb(64,158,255)", "orange"],
series: {
name: "7车间完成进度",
type: "pie",
radius: ["40%", "70%"],
center: ["50%", "60%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "已完成" },
{ value: 0, name: "未完成" },
],
},
},
option2: {
title: {
text: "10车间任务完成进度",
left: 'center',
},
tooltip: {
trigger: "item",
},
legend: {
top: "3",
right: "3%",
},
color: ["rgb(64,158,255)", "orange"],
series: {
name: "10车间完成进度",
type: "pie",
radius: ["40%", "70%"],
center: ["50%", "60%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "已完成" },
{ value: 0, name: "未完成" },
],
},
},
option3: {
title: {
text: "6车间任务完成进度",
left: 'center',
},
tooltip: {
trigger: "item",
},
legend: {
top: "3",
right: "3%",
},
color: ["rgb(64,158,255)", "orange"],
series: {
name: "6车间完成进度",
type: "pie",
radius: ["40%", "70%"],
center: ["50%", "60%"],
label: {
show: true,
position: "outside",
formatter: "{b} : {c} ({d}%)",
},
data: [
{ value: 0, name: "已完成" },
{ value: 0, name: "未完成" },
],
},
},
tableData1: [],
tableData2: [],
tableData3: [],
};
},
mounted() {
this.$nextTick(() => {
this.getData6();
this.getData7();
this.getData10();
})
},
methods: {
getData7() {
let that = this;
that.tableData1 = [];
that.option1.series.data[0].value = 0;
that.option1.series.data[1].value = 0;
let obj = {};
obj.page = 0;
obj.mgroup__belong_dept__name = "7车间";
obj.start_date__gte = that.start_date;
obj.end_date__lte = that.end_date;
that.$API.pm.utask.list.req(obj).then((res) => {
console.log("utask:", res);
let data = [];
let count_ok1 = 0;
let count_notok1 = 0;
if (res.length > 0) {
res.forEach((item) => {
let obj = item;
obj.rate =
Math.round((item.count_ok / item.count) * 100) +
"%";
if (item.count_ok >= item.count) {
count_ok1++;
} else {
count_notok1++;
}
data.push(obj);
});
that.tableData1 = data;
that.option1.series.data[0].value = count_ok1;
}
this.option1.series.data[0].value = count_ok1;
this.option1.series.data[1].value = count_notok1;
});
},
async getData10() {
let that = this;
that.tableData2 = [];
that.option2.series.data[0].value = 0;
that.option2.series.data[1].value = 0;
let obj = {};
obj.page = 0;
obj.mgroup__belong_dept__name = "10车间";
obj.start_date__gte = that.start_date;
obj.end_date__lte = that.end_date;
await that.$API.pm.utask.list.req(obj).then((res) => {
console.log("utask:", res);
let data = [];
let count_ok2 = 0;
let count_notok2 = 0;
if (res.length > 0) {
res.forEach((item) => {
let obj = item;
obj.rate =
Math.round((item.count_ok / item.count) * 100) +
"%";
if (item.count_ok >= item.count) {
count_ok2++;
} else {
count_notok2++;
}
data.push(obj);
});
that.tableData2 = data;
that.option2.series.data[0].value = count_ok2;
that.option2.series.data[1].value = count_notok2;
}
});
},
async getData6() {
let that = this;
that.tableData3 = [];
that.option3.series.data[0].value = 0;
that.option3.series.data[1].value = 0;
let obj = {};
obj.page = 0;
obj.mtask_utask__mgroup__belong_dept__name = "6车间";
obj.start_date__gte = that.start_date;
obj.end_date__lte = that.end_date;
await that.$API.pm.utask.list.req(obj).then((res) => {
console.log("utask:", res);
let data = [];
let count_ok3 = 0;
let count_notok3 = 0;
if (res.length > 0) {
res.forEach((item) => {
let obj = item;
obj.rate =
Math.round((item.count_ok / item.count) * 100) +
"%";
if (item.count_ok >= item.count) {
count_ok3++;
} else {
count_notok3++;
}
data.push(obj);
});
that.tableData3 = data;
that.option3.series.data[0].value = count_ok3;
that.option3.series.data[1].value = count_notok3;
}
});
},
},
};
</script>
<style scoped>
.tables {
position: absolute;
top: 6px;
left: 4px;
z-index: 10;
}
</style>

View File

@ -0,0 +1,83 @@
<template>
<div>
<p style="font-size: 18px;font-weight: 600;text-align: center;margin: 10px;">销售统计</p>
<scTable class="exportTables" :data="tableData2" hideDo hidePagination>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="年" width="80"/>
<el-table-column v-if="queryType == ''" width="50" label="周" prop="周"/>
<el-table-column v-else width="50" label="月份" prop="月"/>
<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>
</div>
</template>
<script>
export default {
name: "all_xs",
props: {
queryType:{
type: String,
default: "月"
},
queryDate:{
type: String,
default: ""
},
start_date:{
type: String,
default: ""
},
end_date:{
type: String,
default: ""
},
},
data() {
return {
typeOptions: ["月", "年"],
tableData2: [],
};
},
mounted() {
this.$nextTick(() => {
this.getTable();
})
},
methods: {
getTable() {
let that = this;
let obj = {
query: {
start_date: that.start_date,
end_date: that.end_date,
mio_type: "sale_out",
},
};
let exec = that.queryType == "月" ? "saleOutWeek" : "saleOutMonth";
that.$API.bi.dataset.exec.req(exec, obj).then((res) => {
that.tableData2 = [];
if (res.data2.ds0) {
let data = res.data2.ds0;
that.tableData2 = data;
}
});
},
},
};
</script>
<style scoped>
.tables {
position: absolute;
top: 4px;
right: 6px;
z-index: 10;
}
</style>

View File

@ -231,8 +231,12 @@
</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>
@ -359,6 +363,8 @@ export default {
{ value: 0, name: "结石" },
{ value: 0, name: "气线" },
{ value: 0, name: "箱中破" },
{ value: 0, name: "退火后碎" },
{ value: 0, name: "划伤" },
],
},
},
@ -468,6 +474,8 @@ export default {
that.option3.series.data[6].value=0;
that.option3.series.data[7].value=0;
that.option3.series.data[8].value=0;
that.option3.series.data[9].value=0;
that.option3.series.data[10].value=0;
let data = res2.data2.ds0;
if (data.length > 0) {
data.forEach((item) => {
@ -480,6 +488,8 @@ export default {
that.option3.series.data[6].value += item.结石;
that.option3.series.data[7].value += item.气线;
that.option3.series.data[8].value += item.箱中破;
that.option3.series.data[9].value += item.退火后碎;
that.option3.series.data[10].value += item.划伤;
});
}
}

View File

@ -211,9 +211,21 @@
];
if (data.length > 0) {
data.forEach((item) => {
seriesData.forEach((item2) => {
item2.value += item[item2.name];
})
let other_count = item.不合格数 - item.条纹 - item.气泡 - item.断裂 - item.气线 - item.炸纹 - item.结石 - item.弯曲 - item.偏壁 - item.大小头;
seriesData[0].value += item.合格数;
seriesData[1].value += item.条纹;
seriesData[2].value += item.气泡;
seriesData[3].value += item.断裂;
seriesData[4].value += item.气线;
seriesData[5].value += item.炸纹;
seriesData[6].value += item.结石;
seriesData[7].value += item.弯曲;
seriesData[8].value += item.偏壁;
seriesData[9].value += item.大小头;
seriesData[10].value += other_count;
// seriesData.forEach((item2) => {
// item2.value += item[item2.name];
// })
})
}
that.option1.series[0].data = seriesData;
@ -229,8 +241,12 @@
};
//table
that.$API.bi.dataset.exec.req(exec, obj2).then((res2) => {
that.tableData = res2.data2.ds0;
let data = res2.data2.ds0;
data.forEach((item) => {
let other_count = item.不合格数 - item.条纹 - item.气泡 - item.断裂 - item.气线 - item.炸纹 - item.结石 - item.弯曲 - item.偏壁 - item.大小头;
item.其他 = other_count;
})
that.tableData = res2.data2.ds0;
data.forEach((item) => {
let date =item.;
if(that.queryType=='月'){

View File

@ -43,7 +43,7 @@
ref="table"
:apiObj="apiObj"
:params="params"
:query="query"
:query="params"
id="exportDiv"
stripe
>
@ -55,10 +55,6 @@
<span v-if="scope.row.data">{{ scope.row.data.产品规格 }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="实际重量/KG" class-name="colorheader2">
</el-table-column>
<el-table-column label="合格重量/KG" class-name="colorheader2">
</el-table-column> -->
<el-table-column label="应出数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.棒料成型_count_real }}</span>
@ -71,7 +67,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.棒料成型_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.棒料成型_合格率||scope.row.data.棒料成型_合格率==0)">{{ scope.row.data.棒料成型_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="炸纹" class-name="colorheader2">
@ -143,7 +139,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.七车间入库_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.七车间入库_合格率||scope.row.data.七车间入库_合格率==0)">{{ scope.row.data.七车间入库_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="炸纹" class-name="colorheader3">
@ -204,110 +200,110 @@
</template>
</el-table-column>
<!-- 平头 -->
<el-table-column label="平头" class-name="colorheader4">
<el-table-column label="接收数" class-name="colorheader4">
<el-table-column label="平头" class-name="colorheader1">
<el-table-column label="接收数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_平头_count_real }}</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_平头_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_平头_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_平头_合格率||scope.row.data.六车间_平头_合格率==0)">{{ scope.row.data.六车间_平头_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="加工日期" class-name="colorheader4" min-width="160">
<el-table-column label="加工日期" class-name="colorheader1" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_平头_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_平头_操作人 }}</span>
</template>
</el-table-column>
</el-table-column>
<!-- 粘头接收数 -->
<el-table-column label="粘头" class-name="colorheader4">
<el-table-column label="接收数" class-name="colorheader4">
<el-table-column label="粘头" class-name="colorheader2">
<el-table-column label="接收数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粘铁头_count_use }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粘铁头_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_粘铁头_合格率||scope.row.data.六车间_粘铁头_合格率==0)">{{ scope.row.data.六车间_粘铁头_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粘铁头_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="加工日期" class-name="colorheader4" min-width="160">
<el-table-column label="加工日期" class-name="colorheader2" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粘铁头_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粘铁头_操作人 }}</span>
</template>
</el-table-column>
</el-table-column>
<!-- 粗中细接收数 -->
<el-table-column label="粗中细" class-name="colorheader4">
<el-table-column label="接收数" class-name="colorheader4">
<el-table-column label="粗中细" class-name="colorheader3">
<el-table-column label="接收数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_use }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_粗中细磨_合格率||scope.row.data.六车间_粗中细磨_合格率==0)">{{ scope.row.data.六车间_粗中细磨_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="短" class-name="colorheader4">
<el-table-column label="短" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_n_d }}</span>
</template>
</el-table-column>
<el-table-column label="弯" class-name="colorheader4">
<el-table-column label="弯" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_n_w }}</span>
</template>
</el-table-column>
<el-table-column label="有皮" class-name="colorheader4">
<el-table-column label="有皮" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_n_yp }}</span>
</template>
</el-table-column>
<el-table-column label="断裂" class-name="colorheader4">
<el-table-column label="断裂" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_count_n_dl }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader4">
<el-table-column label="其他" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ getCountQt(scope.row.data,'粗中细磨') }}</span>
</template>
</el-table-column>
<el-table-column label="加工日期" class-name="colorheader4" min-width="160">
<el-table-column label="加工日期" class-name="colorheader3" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_粗中细磨_操作人 }}</span>
</template>
@ -327,7 +323,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_抛光_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_抛光_合格率||scope.row.data.六车间_抛光_合格率==0)">{{ scope.row.data.六车间_抛光_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="划伤" class-name="colorheader4">
@ -362,96 +358,101 @@
</el-table-column>
</el-table-column>
<!-- 开槽接收数 -->
<el-table-column label="开槽" class-name="colorheader4">
<el-table-column label="接收数" class-name="colorheader4">
<el-table-column label="开槽" class-name="colorheader5">
<el-table-column label="接收数" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_count_use }}</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_开槽_合格率||scope.row.data.六车间_开槽_合格率==0)">{{ scope.row.data.六车间_开槽_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="加工日期" class-name="colorheader4" min-width="160">
<el-table-column label="加工日期" class-name="colorheader5" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_操作人 }}</span>
</template>
</el-table-column>
</el-table-column>
<!-- 6车间自己的检验 -->
<el-table-column label="检测" class-name="colorheader4">
<el-table-column label="接收数" class-name="colorheader4">
<el-table-column label="检测" class-name="colorheader6">
<el-table-column label="接收数" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间中检_合格率||scope.row.data.六车间中检_合格率==0)">{{ scope.row.data.六车间中检_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="划伤" class-name="colorheader4">
<el-table-column label="划伤" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_hs }}</span>
</template>
</el-table-column>
<el-table-column label="炸纹" class-name="colorheader4">
<el-table-column label="炸纹" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_zw }}</span>
</template>
</el-table-column>
<el-table-column label="锥度大" class-name="colorheader4">
<el-table-column label="锥度大" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_zdd }}</span>
</template>
</el-table-column>
<el-table-column label="气泡" class-name="colorheader4">
<el-table-column label="气泡" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_qp }}</span>
</template>
</el-table-column>
<el-table-column label="不亮" class-name="colorheader4">
<el-table-column label="不亮" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_bl }}</span>
</template>
</el-table-column>
<el-table-column label="气线" class-name="colorheader4">
<el-table-column label="气线" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_count_n_qx }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader4">
<el-table-column label="其他" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ getCountQt(scope.row.data,'六车间中检') }}</span>
</template>
</el-table-column>
<el-table-column label="日期" class-name="colorheader4" min-width="160">
<el-table-column label="日期" class-name="colorheader6" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_检验人 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="车间库存" class-name="colorheader7">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间库存_count }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="技术质量" align="center" class-name="colorheader5">
<el-table-column label="终检" class-name="colorheader5">
@ -459,6 +460,11 @@
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_count }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.六车间生产入库_合格率||scope.row.data.六车间生产入库_合格率==0)">{{ scope.row.data.六车间生产入库_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_count_notok }}</span>
@ -489,11 +495,6 @@
<span v-if="scope.row.data">{{ getCountQt(scope.row.data,'六车间生产入库') }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_合格率 }}</span>
</template>
</el-table-column>
<el-table-column label="日期" class-name="colorheader5" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_检验日期 }}</span>
@ -505,14 +506,29 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column label="6号领取加工-发货合格率" class-name="colorheader6">
<el-table-column label="仓库库存" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_批次发货合格率 }}</span>
<span v-if="scope.row.data">{{ scope.row.data.库存_count }}</span>
</template>
</el-table-column>
<el-table-column label="7号生产-发货合格率" class-name="colorheader7">
<el-table-column label="组合件批次号" class-name="colorheader7">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.七车间_批次发货合格率 }}</span>
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_组合件_批次号 }}</span>
</template>
</el-table-column>
<el-table-column label="发货数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.销售发货_count }}</span>
</template>
</el-table-column>
<el-table-column label="6号领取加工-发货合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.六车间_批次发货合格率||scope.row.data.六车间_批次发货合格率==0)">{{ scope.row.data.六车间_批次发货合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="7号生产-发货合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.七车间_批次发货合格率||scope.row.data.七车间_批次发货合格率==0)">{{ scope.row.data.七车间_批次发货合格率 }}%</span>
</template>
</el-table-column>
</scTable>
@ -529,16 +545,15 @@ export default {
data() {
return {
params: {
ordering:'-last_time,-first_time',
material_start__cate:'棒',
last_time_isnull:false,
ordering:'-data__棒料成型_小日期',
querys : [[{field:"data__has_key",compare:"",value:"棒料成型_日期"}]]
},
query:{
batch__contains:'',
last_time__gte:'',
last_time__lte:'',
},
apiObj: this.$API.wpm.batchst,
apiObj: this.$API.wpm.batchstquery,
options:[],
tableData:[],
};
@ -546,33 +561,25 @@ export default {
methods: {
handleQuery(){
let that = this;
let querys = [],arr1=[],arr2=[];
let querys = [[{field:"data__has_key",compare:"",value:"棒料成型_日期"}],];
let obj = {},obj1 = {},obj2 = {};
obj.field = 'batch__contains';
obj.value = that.query.batch__contains;
obj.compare = '';
obj1.field = 'last_time__gte';
obj1.field = 'last_time';
obj1.value = that.query.last_time__gte;
obj1.compare = 'gte';
obj2.field = 'last_time__lte';
obj2.field = 'last_time';
obj2.value = that.query.last_time__lte;
obj2.compare = 'lte';
if((that.query.last_time__gte==''||that.query.last_time__gte==null)&&(that.query.last_time__lte==''||that.query.last_time__lte==null)&&that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys.push(obj);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj);
}
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
arr1.push(obj1);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr1.push(obj);
}
querys.push(arr1)
querys[0].push(obj1);
}
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
arr2.push(obj2);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr2.push(obj);
}
querys.push(arr2)
querys[0].push(obj2);
}
let params = {};
params.querys = querys;

View File

@ -43,7 +43,7 @@
ref="table"
:apiObj="apiObj"
:params="params"
:query="query"
:query="params"
id="exportDiv"
stripe
>
@ -67,7 +67,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.管料成型_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.管料成型_合格率||scope.row.data.管料成型_合格率==0)">{{ scope.row.data.管料成型_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader1">
@ -129,12 +129,12 @@
</el-table-column>
<el-table-column label="合格数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_抽检合格数 }}</span>
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_合格数 }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_抽检合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.十车间入库_合格率||scope.row.data.十车间入库_合格率==0)">{{ scope.row.data.十车间入库_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader2">
@ -188,81 +188,6 @@
</template>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="8号入库" align="center" class-name="colorheader3">
<el-table-column label="时间" width="100px" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="入库数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_ok }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_合格率 }}</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="椭圆/弯曲" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_wq }}</span>
</template>
</el-table-column>
<el-table-column label="条纹" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_tw }}</span>
</template>
</el-table-column>
<el-table-column label="断裂" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_dl }}</span>
</template>
</el-table-column>
<el-table-column label="偏壁" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_pb }}</span>
</template>
</el-table-column>
<el-table-column label="大小头" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_dxt }}</span>
</template>
</el-table-column>
<el-table-column label="结石" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_js }}</span>
</template>
</el-table-column>
<el-table-column label="气线" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_count_n_qx }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{getCountQt(scope.row.data,'十车间入库')}}</span>
</template>
</el-table-column>
<el-table-column label="备注" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.十车间入库_检验备注 }}</span>
</template>
</el-table-column>
<el-table-column label="接收人" class-name="colorheader3">
<template #default="scope">{{ scope.row.data.十车间入库_备注 }}</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="退火" align="center" class-name="colorheader3">
<el-table-column label="时间" width="160px" class-name="colorheader3">
<template #default="scope">
@ -281,7 +206,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.管料退火_合格率 }}</span>
<span v-if="scope.row.data&&scope.row.data.管料退火_合格率">{{ scope.row.data.管料退火_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader3">
@ -375,85 +300,85 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column label="开槽" align="center" class-name="colorheader4">
<el-table-column label="加工数" class-name="colorheader4">
<el-table-column label="开槽" align="center" class-name="colorheader1">
<el-table-column label="加工数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_count_real }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_开槽_合格率||scope.row.data.六车间_开槽_合格率==0)">{{ scope.row.data.六车间_开槽_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="断裂" class-name="colorheader4">
<el-table-column label="断裂" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_count_n_dl }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader4">
<el-table-column label="其他" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{getCountQt(scope.row.data,'开槽')}}</span>
</template>
</el-table-column>
<el-table-column label="加工日期" min-width="160" class-name="colorheader4">
<el-table-column label="加工日期" min-width="160" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_操作人 }}</span>
</template>
</el-table-column>
<el-table-column label="备注" class-name="colorheader4">
<el-table-column label="备注" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_开槽_备注 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="倒角" align="center" class-name="colorheader4">
<el-table-column label="加工数" class-name="colorheader4">
<el-table-column label="倒角" align="center" class-name="colorheader2">
<el-table-column label="加工数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_count_real }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader4">
<el-table-column label="合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间_倒角_合格率||scope.row.data.六车间_倒角_合格率==0)">{{ scope.row.data.六车间_倒角_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader4">
<el-table-column label="不合格数" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="断裂" class-name="colorheader4">
<el-table-column label="断裂" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_count_n_dl }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader4">
<el-table-column label="其他" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{getCountQt(scope.row.data,'倒角')}}</span>
</template>
</el-table-column>
<el-table-column label="加工日期" min-width="160" class-name="colorheader4">
<el-table-column label="加工日期" min-width="160" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader4">
<el-table-column label="操作人" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_操作人 }}</span>
</template>
</el-table-column>
<el-table-column label="备注" class-name="colorheader4">
<el-table-column label="备注" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_倒角_备注 }}</span>
</template>
@ -469,7 +394,7 @@
</el-table-column>
<el-table-column label="合格率" class-name="colorheader5">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间中检_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间中检_合格率||scope.row.data.六车间中检_合格率==0)">{{ scope.row.data.六车间中检_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader5">
@ -536,12 +461,12 @@
<el-table-column label="终检" align="center" class-name="colorheader6">
<el-table-column label="终检数" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data&&scope.row.data.销售发货_count">{{ scope.row.data.销售发货_count + scope.row.data.六车间生产入库_count_notok }}</span>
<span v-if="scope.row.data&&scope.row.data.六车间生产入库_count">{{ scope.row.data.六车间生产入库_count }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data&&scope.row.data.六车间生产入库_检验日期!==''">{{ scope.row.data.六车间生产入库_合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.六车间生产入库_合格率||scope.row.data.六车间生产入库_合格率==0)">{{ scope.row.data.六车间生产入库_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader6">
@ -577,9 +502,19 @@
</el-table-column>
<el-table-column label="领管-终检合格率">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.七车间_批次发货合格率 }}</span>
<span v-if="scope.row.data&&(scope.row.data.七车间_批次发货合格率||scope.row.data.七车间_批次发货合格率==0)">{{ scope.row.data.七车间_批次发货合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="组合件批次号" min-width="160">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_组合件_批次号 }}</span>
</template>
</el-table-column>
<el-table-column label="发货数">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.销售发货_count }}</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -591,9 +526,8 @@ export default {
data() {
return {
params: {
ordering:'-last_time',
material_start__cate:'管',
last_time_isnull:false,
ordering:'-data__管料成型_小日期',
querys : [[{field:"data__has_key",compare:"",value:"管料成型_日期"}],[{field:"data__has_key",compare:"",value:"管料退火_日期"}]]
},
query:{
batch__contains:'',
@ -601,7 +535,7 @@ export default {
last_time__lte:'',
},
apiObj: this.$API.wpm.batchst,
apiObj: this.$API.wpm.batchstquery,
options:[],
tableData:[],
};
@ -609,33 +543,28 @@ export default {
methods: {
handleQuery(){
let that = this;
let querys = [],arr1=[],arr2=[];
let querys = [[{field:"data__has_key",compare:"",value:"管料成型_日期"}],[{field:"data__has_key",compare:"",value:"管料退火_日期"}]];
let obj = {},obj1 = {},obj2 = {};
obj.field = 'batch__contains';
obj.value = that.query.batch__contains;
obj.compare = '';
obj1.field = 'last_time__gte';
obj1.field = 'last_time';
obj1.value = that.query.last_time__gte;
obj1.compare = 'gte';
obj2.field = 'last_time__lte';
obj2.field = 'last_time';
obj2.value = that.query.last_time__lte;
obj2.compare = 'lte';
if((that.query.last_time__gte==''||that.query.last_time__gte==null)&&(that.query.last_time__lte==''||that.query.last_time__lte==null)&&that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys.push(obj);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj);
querys[1].push(obj);
}
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
arr1.push(obj1);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr1.push(obj);
}
querys.push(arr1)
querys[0].push(obj1);
querys[1].push(obj1);
}
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
arr2.push(obj2);
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
arr2.push(obj);
}
querys.push(arr2)
querys[0].push(obj2);
querys[1].push(obj2);
}
let params = {};
params.querys = querys;

View File

@ -482,6 +482,21 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="其他">
<el-input-number
v-model="form.count_n_qt"
controls-position="right"
:min="0"
:step="1"
:step-strictly="true"
style="width: 100%"
placeholder="其他"
@change="countNotOkSun"
>
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合计">
<el-input-number
@ -549,6 +564,7 @@ export default {
count_n_d: 0, //
count_n_zw: 0, //
count_n_tydd: 0, // 8
count_n_qt:0, //
//
count_n_dl: 0, //
count_n_qp: 0, //
@ -565,7 +581,7 @@ export default {
count_n_sw: 0, //
count_n_bhpcd: 0, //
count_n_wq: 0, // 5
handle_user: "",
},
mlogb: [],
@ -692,6 +708,7 @@ export default {
Number(this.form.count_n_sw) +
Number(this.form.count_n_bhpcd) +
Number(this.form.count_n_wq) +
Number(this.form.count_n_qt) +
Number(this.form.count_n_zw);
},
//

View File

@ -606,6 +606,21 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="杂质">
<el-input-number
v-model="form.count_n_zz"
controls-position="right"
:min="0"
:step="0.1"
:step-strictly="true"
style="width: 100%"
placeholder="杂质"
@change="countNotOkSun"
>
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="其他">
<el-input-number
@ -930,6 +945,21 @@
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="其他">
<el-input-number
v-model="form.count_n_qt"
controls-position="right"
:min="0"
:step="1"
:step-strictly="true"
style="width: 100%"
placeholder="其他"
@change="countNotOkSun"
>
</el-input-number>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="合计">
<el-input-number
@ -1004,6 +1034,7 @@ export default {
count_n_dxt: 0,
count_n_js: 0,
count_n_qx: 0,
count_n_zz:0,
count_n_qt: 0,
count_n_hs: 0,
count_n_xzp: 0,
@ -1282,6 +1313,7 @@ export default {
this.form.count_n_qp +
this.form.count_n_zt +
this.form.count_n_b +
this.form.count_n_zz +
this.form.count_n_qt;
} else if (this.activeType == "10车间") {
this.form.count_notok =
@ -1332,6 +1364,7 @@ export default {
this.form.count_n_qp +
this.form.count_n_zt +
this.form.count_n_b +
this.form.count_n_zz +
this.form.count_n_qt;
} else if (this.activeType == "10车间") {
this.form.mtask = this.mtask;