This commit is contained in:
caoqianming 2025-12-16 09:03:59 +08:00
commit 9f1f0dc860
33 changed files with 1223 additions and 1475 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

@ -333,14 +333,21 @@ export default {
dataToExcel(this.hExportCols, this.tableData, this.hExportName?this.hExportName:'表格数据')
}else if (type === 2) {
const extractHeaderKeys = (columns) =>{
const keys = columns.map(item => {
// key
return item.key.split('.')[0];
});
//
return [...new Set(keys)].join(',');
}
const keys = [];
columns.map(item => {
if(item.is_notquery){
let key = item.key.split('.')[0];
if(key.indexOf('mio')>-1){
keys.push('mio');
}
}else{
let key = item.key.split('.')[0];// key
keys.push(key);
}
});
//
return [...new Set(keys)].join(',');
}
var c = Object.assign({}, this.query, this.tableParams, {[this.orderStr]: this.order}, {page: 0},
{query: "{" + extractHeaderKeys(this.hExportCols) + "}"}
)

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

@ -22,7 +22,7 @@ export const dataToExcel = (columns = [], data = [], name = 'data') => {
const dataList = data.map((item) => {
let obj = {};
columns.forEach(col => {
obj[col.header] = getNestedValue(item, col.key) ?? '';
obj[col.header] = getNestedValue(item, col.key, col.type_dict) ?? '';
});
return obj;
});
@ -54,19 +54,30 @@ export const dataToExcel = (columns = [], data = [], name = 'data') => {
// URL.revokeObjectURL(blobUrl);
};
const getNestedValue = (obj, path, defaultValue = '') => {
const getNestedValue = (obj, path,type_dict, defaultValue = '') => {
if (!obj || !path) return defaultValue;
const keys = path.split('.');
let result = obj;
for (const key of keys) {
if (result === null || result === undefined) {
return defaultValue;
if(type_dict!==undefined){
let dict_key = "";
if(path.indexOf(".")>-1){
let key0 = path.split(".")[0];
let key1 = path.split(".")[1];
let obj1 = result[key0];
let key2 = obj1[key1];
dict_key = key2;
}else{
dict_key = result[path];
}
result = result[key];
result = type_dict[dict_key]
}else{
for (const key of keys) {
if (result === null || result === undefined) {
return defaultValue;
}
result = result[key];
}
}
return result !== undefined ? result : defaultValue;
};
const calculateColumnWidths = (columns, dataList) => {

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>
@ -111,6 +111,36 @@
{{ Number(scope.row.count) - Number(scope.row.count_send) }}
</template>
</el-table-column>
<el-table-column label="组合件信息" v-if="cate == 'good'&&project_code=='gzerp'"
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'">
@ -636,14 +666,18 @@ export default {
return;
}
let propert = '';
//
if(index == 6){
if((index == 5||index == 6)&&column.label=='数量'){
propert = 'count';
}else if(index == 7&&this.mioObj.type == 'sale_out'&&this.project_code=='gx'){
propert = 'count_send';
}else if((index == 7||index == 8)&&column.label=='不合格数量'){
}
if((index == 6||index == 7||index == 8||index == 9)&&column.label=='不合格数量'){
propert = 'count_notok';
}
if((index == 6||index == 7||index == 8)&&column.label=='检验'){
propert = 'count_tested';
}
if(index == 6 &&column.label == '发出数量'){
propert = 'count_send';
}
if (propert!=='') {
const values = data.map((item) =>
Number(item[propert])
@ -660,12 +694,12 @@ export default {
}, 0);
}
}
if(index==8&&this.mioObj.type == 'sale_out'&&this.project_code=='gx'){
if(sums[6]){
if(sums[7]){
sums[index] = sums[6]-sums[7];
if(index==7&&this.mioObj.type == 'sale_out'&&this.project_code=='gx'){
if(sums[5]){
if(sums[6]){
sums[index] = sums[5]-sums[6];
}else{
sums[index] = sums[6];
sums[index] = sums[5];
}
}
}

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") {
//
@ -534,6 +534,7 @@ export default {
if(that.form.batch == item.batch){
that.form.count = item.count;
that.form.wm = item.id;
that.batchcount = item.count;
}
})
},
@ -552,10 +553,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

@ -3,7 +3,7 @@
<el-header>
<div class="right-panel">
<el-date-picker
v-model="query.mio__inout_date__gte"
v-model="params.mio__inout_date__gte"
type="date"
placeholder="开始日期"
format="YYYY-MM-DD"
@ -11,7 +11,7 @@
style="width: 150px;"
/>
<el-date-picker
v-model="query.mio__inout_date__lte"
v-model="params.mio__inout_date__lte"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@ -20,7 +20,7 @@
/>
<xtSelect
:apiObj="apiObjm"
v-model="query.material"
v-model="params.material"
v-model:obj="selectObj"
:labelField="'full_name'"
style="width: 150px;"
@ -30,7 +30,7 @@
<el-table-column label="物料" prop="full_name"></el-table-column>
</xtSelect>
<el-input
v-model="query.search"
v-model="params.search"
placeholder="名称"
clearable
style="width: 150px;"
@ -43,15 +43,18 @@
</div>
</el-header>
<el-main style="padding: 0;">
<el-table
<scTable
ref="table"
:data="tableData"
:apiObj="apiObj"
row-key="id"
stripe
border
style="height: 100%;"
:params="params"
:summary-method="getSummaries"
show-summary
:hExportCols = "hExportCols"
:hExportName="'辅料出入库记录'"
style="height: 100%;"
>
<el-table-column type="index" width="50" />
<el-table-column label="类型" width="80">
@ -155,21 +158,8 @@
>撤消</el-button>
</template>
</el-table-column>
</el-table>
</scTable>
</el-main>
<el-footer>
<el-pagination
background
:small="true"
:total="dataTotal"
layout="total, sizes, prev, pager, next, jumper"
:page-size="params.page_size"
:page-sizes="[20, 50, 100, 200]"
:current-page="params.page"
@current-change="getList"
@update:page-size="getList2"
></el-pagination>
</el-footer>
</el-container>
</template>
<script>
@ -177,13 +167,14 @@ export default {
name: "mioitemlist",
data() {
return {
apiObj: null,
params: {
page:1,
page_size:20,
with_mio:'yes',
material__type:40,
mio__state:20
mio__state:20,
mio__inout_date__gte:'',
mio__inout_date__lte:'',
material:'',
search:'',
},
mquery:{
page: 0,
@ -192,7 +183,6 @@ export default {
is_assemb: false,
},
selection: [],
tableData:[],
nameFilters1: [],
nameFilters2: [],
nameFilters3: [],
@ -202,12 +192,6 @@ export default {
nameFilters7: [],
nameFilters8: [],
nameFilters9: [],
query: {
search : "",
material : "",
mio__inout_date__gte : "",
mio__inout_date__lte : "",
},
stateDict: {
10: "创建中",
20: "已提交",
@ -221,110 +205,150 @@ export default {
other_out: "其他出库",
},
selectObj: {},
project_code:'',
dataTotal:0,
apiObj:this.$API.inm.mioitem.list,
apiObjm:this.$API.mtm.material.list,
hExportCols:[{
header: "类型",
key: "mio_.type",
type_dict:{
do_out: "生产领料",
sale_out: "销售发货",
pur_in: "采购入库",
do_in: "生产入库",
other_in: "其他入库",
other_out: "其他出库",
},
is_notquery: true
}, {
header: "日期",
key: "inout_date"
}, {
header: "物料编号",
key: "material_.number"
}, {
header: "名称",
key: "material_.name"
}, {
header: "货位号",
key: "material_.bin_number_main"
}, {
header: "规格",
key: "material_.specification"
}, {
header: "品牌型号",
key: "material_.model"
}, {
header: "单位",
key: "material_.unit"
}, {
header: "入库数量",
key: "count"
}, {
header: "单价",
key: "unit_price"
}, {
header: "总金额",
key: "price",
is_notquery: true,
}, {
header: "入库人",
key: "mio_.submit_user_name",
is_notquery: true,
}, {
header: "入库凭证号",
key: "mio_.number",
is_notquery: true,
}, {
header: "供应商",
key: "supplier_name",
is_notquery: true,
}
]
};
},
mounted() {
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
this.params.mio = this.mioId;
let that = this;
that.getList();
this.$nextTick(() => {
this.getFilters();
});
},
methods: {
getList(val){
getFilters(){
let that = this;
that.params.page = val?val:1;
that.params.with_mio = 'yes';
that.params.search = that.query.search;
that.params.mio__inout_date__gte = that.query.mio__inout_date__gte;
that.params.mio__inout_date__lte = that.query.mio__inout_date__lte;
if(that.query.material!==''||that.query.material!==undefined||that.query.material!==null){
that.params.material = that.query.material;
let datas = [];
datas = that.$refs.table.tableData;
console.log( datas);
if(datas.length&&datas.length>0){
let numberList=[],nameList = [],batchlist=[],specificationList=[],modelList=[],unitList=[],userList=[],mioNumberList=[],typeList=[];
datas.forEach((ite) => {
if (numberList.indexOf(ite.material_.number) > -1) {} else {
numberList.push(ite.material_.number);
let obj = {};
obj.text = ite.material_.number;
obj.value = ite.material_.number;
that.nameFilters1.push(obj);
}
if (nameList.indexOf(ite.material_.name) > -1) {} else {
nameList.push(ite.material_.name);
let obj = {};
obj.text = ite.material_.name;
obj.value = ite.material_.name;
that.nameFilters2.push(obj);
}
if (batchlist.indexOf(ite.material_.bin_number_main) > -1) {} else {
batchlist.push(ite.material_.bin_number_main);
let obj = {};
obj.text = ite.material_.bin_number_main;
obj.value = ite.material_.bin_number_main;
that.nameFilters3.push(obj);
}
if (specificationList.indexOf(ite.material_.specification) > -1) {} else {
specificationList.push(ite.material_.specification);
let obj = {};
obj.text = ite.material_.specification;
obj.value = ite.material_.specification;
that.nameFilters4.push(obj);
}
if (modelList.indexOf(ite.material_.model) > -1) {} else {
modelList.push(ite.material_.model);
let obj = {};
obj.text = ite.material_.model;
obj.value = ite.material_.model;
that.nameFilters5.push(obj);
}
if (unitList.indexOf(ite.material_.unit) > -1) {} else {
unitList.push(ite.material_.unit);
let obj = {};
obj.text = ite.material_.unit;
obj.value = ite.material_.unit;
that.nameFilters6.push(obj);
}
if (userList.indexOf(ite.mio_.submit_user_name) > -1) {} else {
userList.push(ite.mio_.submit_user_name);
let obj = {};
obj.text = ite.mio_.submit_user_name;
obj.value = ite.mio_.submit_user_name;
that.nameFilters7.push(obj);
}
if (mioNumberList.indexOf(ite.mio_.number) > -1) {} else {
mioNumberList.push(ite.mio_.number);
let obj = {};
obj.text = ite.mio_.number;
obj.value = ite.mio_.number;
that.nameFilters8.push(obj);
}
if (typeList.indexOf(ite.mio_.type) > -1) {} else {
typeList.push(ite.mio_.type);
let obj = {};
obj.text = that.typeDict[ite.mio_.type];
obj.value = that.typeDict[ite.mio_.type];
that.nameFilters9.push(obj);
}
})
}else{
setTimeout(function(){
that.getFilters();
},500);
}
that.$API.inm.mioitem.list.req(that.params).then((res) => {
if (res.count > 0) {
that.tableData = res.results;
that.dataTotal = res.count;
let numberList=[],nameList = [],batchlist=[],specificationList=[],modelList=[],unitList=[],userList=[],mioNumberList=[],typeList=[];
res.results.forEach((ite) => {
if (numberList.indexOf(ite.material_.number) > -1) {} else {
numberList.push(ite.material_.number);
let obj = {};
obj.text = ite.material_.number;
obj.value = ite.material_.number;
that.nameFilters1.push(obj);
}
if (nameList.indexOf(ite.material_.name) > -1) {} else {
nameList.push(ite.material_.name);
let obj = {};
obj.text = ite.material_.name;
obj.value = ite.material_.name;
that.nameFilters2.push(obj);
}
if (batchlist.indexOf(ite.material_.bin_number_main) > -1) {} else {
batchlist.push(ite.material_.bin_number_main);
let obj = {};
obj.text = ite.material_.bin_number_main;
obj.value = ite.material_.bin_number_main;
that.nameFilters3.push(obj);
}
if (specificationList.indexOf(ite.material_.specification) > -1) {} else {
specificationList.push(ite.material_.specification);
let obj = {};
obj.text = ite.material_.specification;
obj.value = ite.material_.specification;
that.nameFilters4.push(obj);
}
if (modelList.indexOf(ite.material_.model) > -1) {} else {
modelList.push(ite.material_.model);
let obj = {};
obj.text = ite.material_.model;
obj.value = ite.material_.model;
that.nameFilters5.push(obj);
}
if (unitList.indexOf(ite.material_.unit) > -1) {} else {
unitList.push(ite.material_.unit);
let obj = {};
obj.text = ite.material_.unit;
obj.value = ite.material_.unit;
that.nameFilters6.push(obj);
}
if (userList.indexOf(ite.mio_.submit_user_name) > -1) {} else {
userList.push(ite.mio_.submit_user_name);
let obj = {};
obj.text = ite.mio_.submit_user_name;
obj.value = ite.mio_.submit_user_name;
that.nameFilters7.push(obj);
}
if (mioNumberList.indexOf(ite.mio_.number) > -1) {} else {
mioNumberList.push(ite.mio_.number);
let obj = {};
obj.text = ite.mio_.number;
obj.value = ite.mio_.number;
that.nameFilters8.push(obj);
}
if (typeList.indexOf(ite.mio_.type) > -1) {} else {
typeList.push(ite.mio_.type);
let obj = {};
obj.text = that.typeDict[ite.mio_.type];
obj.value = that.typeDict[ite.mio_.type];
that.nameFilters9.push(obj);
}
})
}else{
that.tableData = [];
that.dataTotal = 0;
}
});
},
getList2(val){
let that = this;
that.params.page = 1;
that.params.page_size = val;
that.getList(1);
},
handleCheckSuccess() {
this.$refs.table.refresh();
@ -332,15 +356,11 @@ export default {
},
handleQuery() {
let that = this;
that.params.page = 1;
that.getList(1);
},
resetQuery() {
this.query = {};
that.$refs.table.queryData(that.params);
},
selectMaterialChange() {
var that = this;
that.query.material = that.selectObj.id;
that.params.material = that.selectObj.id;
},
//
printMaterial(row,type){

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

@ -96,6 +96,7 @@
id="exportDiv1"
:height="tableHeight"
:summary-method="getSummaries" show-summary
row-key="id"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="年" width="70"/>
@ -152,6 +153,7 @@
hideDo
hidePagination
:summary-method="getSummaries" show-summary
row-key="id"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="年" width="70"/>

View File

@ -74,6 +74,7 @@
:height="tableHeight"
:summary-method="getSummaries"
show-summary
row-key="id"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="年" width="80"/>
@ -130,6 +131,7 @@
hidePagination
:summary-method="getSummaries"
show-summary
row-key="id"
>
<el-table-column type="index" width="50" />
<el-table-column label="年份" prop="年" width="80"/>

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,8 +43,9 @@
ref="table"
:apiObj="apiObj"
:params="params"
:query="query"
:query="params"
id="exportDiv"
row-key="id"
stripe
>
<el-table-column label="产品编号" prop="batch" min-width="160">
@ -55,10 +56,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 +68,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 +140,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 +201,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 +324,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 +359,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 +461,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 +496,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 +507,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 +546,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 +562,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,8 +43,9 @@
ref="table"
:apiObj="apiObj"
:params="params"
:query="query"
:query="params"
id="exportDiv"
row-key="id"
stripe
>
<el-table-column label="产品编号" prop="batch" min-width="160">
@ -67,7 +68,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 +130,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 +189,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 +207,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 +301,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 +395,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 +462,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 +503,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 +527,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 +536,7 @@ export default {
last_time__lte:'',
},
apiObj: this.$API.wpm.batchst,
apiObj: this.$API.wpm.batchstquery,
options:[],
tableData:[],
};
@ -609,33 +544,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

@ -80,7 +80,7 @@
<el-main style="padding: 8px 0 0 0">
<el-container>
<el-header> <h2>管数据</h2> </el-header>
<el-main id="guanTable" style="background: #ffffff">
<el-main id="guanTable" style="background: #ffffff;padding-left:23px;">
<el-table
:data="tableData22"
style="width: 1200px"
@ -166,7 +166,7 @@ export default {
day = day < 10 ? "0" + day : day;
this.day = day;
this.query.date = this.currentDate = `${year}-${month}-${day}`;
this.getSourceData();
this.getSourceDataNow();
this.bangHeight = document.getElementById("bangTable").offsetHeight - 20;
this.guanHeight = document.getElementById("guanTable").offsetHeight - 20;
},
@ -250,6 +250,17 @@ export default {
}
});
},
getSourceDataNow(){
let that = this;
that.$API.bi.dataset.exec.req("gz_zh").then((res) => {
let datas = res.data2;
let data_b = [...datas.ds0, ...datas.ds2];
let data_g = [...datas.ds1, ...datas.ds3];
that.data_b = data_b;
that.data_g = data_g;
that.getSaleOutData(data_b, data_g);
});
},
//
getSourceData() {
let that = this;
@ -328,8 +339,6 @@ export default {
key = "开槽";
}
if (item1.车间==null||item1.车间==undefined) {
// console.log( '',item1);
// console.log( item1. !== ""&&item1.==10);
if (item1.工序 == "配管") {
key = "配管";
}else if(item1.工序 !== "配管"&&item1.类型==10){
@ -353,18 +362,6 @@ export default {
obj.成品库;
that.tableData11[index] = obj;
});
// saleData.forEach((item) => {
// let index = 0;
// if (item..indexOf("+") > -1) {
// let model = item..split("+")[0];
// index = models.indexOf(model);
// } else {
// index = models.indexOf(item.);
// }
// if (index > -1) {
// that.tableData11[index].=item.;
// }
// })
that.models_b = models;
that.getCountOk('b',models);
},
@ -460,8 +457,6 @@ export default {
key = "倒角";
}
if (item5.车间==null||item5.车间==undefined) {
// console.log( '',item5);
// console.log( item5. !== ""&&item5.==10);
if (item5.工序 == "配管") {
key = "配棒";
}else if(item5.工序 !== "配管"&&item5.类型==10){
@ -531,7 +526,12 @@ export default {
that.query.date = that.currentDate;
}
}
that.getSourceData();
if(that.query.date == that.currentDate){
that.getSourceDataNow();
}else{
that.getSourceData();
}
},
},
};

View File

@ -21,20 +21,22 @@
v-if="mode == 'edit'"
v-model="form.batch"
></el-input>
<el-select
<xtSelect
v-else
v-model="form.batch"
style="width: 100%"
filterable
:disabled="mode == 'edit'"
v-model:label="form.batch"
:apiObj = "apiObj"
:params="params"
v-model:obj="selectBatch"
:valueField="'batch'"
:labelField="'batch'"
@change="batchChange"
style="width: 100%;"
>
<el-option
v-for="item in wmaterialOptions"
:key="item"
:label="item"
:value="item"
/>
</el-select>
<el-table-column label="批次号" prop="batch" min-width="100px"></el-table-column>
<el-table-column label="物料" prop="material_name" min-width="100px"></el-table-column>
<el-table-column label="数量" prop="count_cando"></el-table-column>
</xtSelect>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
@ -482,6 +484,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 +566,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 +583,7 @@ export default {
count_n_sw: 0, //
count_n_bhpcd: 0, //
count_n_wq: 0, // 5
handle_user: "",
},
mlogb: [],
@ -582,13 +600,19 @@ export default {
leader_name: "",
count_n_all: null,
rules: {},
selectBatch:{},
params:{
material__in: this.material_in,
belong_dept__name: "6车间"
},
apiObj:this.$API.wpm.wmaterial.list,
};
},
mounted() {
this.getBatchs();
// this.getBatchs();
this.getUserList();
this.getEquipment();
this.getWMaterial();
// this.getWMaterial();
this.getShiftOptions();
this.form.material_out = this.material_out;
this.form.handle_date = this.handle_date;
@ -637,6 +661,12 @@ export default {
}
});
},
batchChange(){
let that = this;
that.form.count_use = that.selectBatch.count_cando;
that.form.count_real = that.selectBatch.count_cando;
that.form.count_ok = that.selectBatch.count_cando;
},
//
getBatchs() {
let that = this;
@ -692,7 +722,9 @@ 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);
this.form.count_real = this.form.count_use-this.form.count_notok;
},
//
submit() {

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;