Commit 24e35bbc authored by kangzhenfei's avatar kangzhenfei Committed by 佟礼

质量填报

parent 02745e50
......@@ -48,7 +48,7 @@
"vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3",
"vue-slider-component": "^3.1.5",
"vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2",
......
<template>
<div>
数据分析表
</div>
<div>数据分析表
<Echart1 ></Echart1>
</div>
</template>
<script>
import Echart1 from './compose/echart1'
export default {
}
components: {
Echart1,
},
data() {
return {
// echarts选项
option: {
title: {
text: '折线图堆叠'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['在用率', '运行率', '故障率', '停机率'],
right: '50px' ,
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
},
yAxis: {
type: 'value'
},
series: [
{
name: '在用率',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '运行率',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '故障率',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '停机率',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
]
},
};
},
methods: {},
};
</script>
<template>
<div>
<div id="myChart" style="width:1200px;height:410px;margin:0 auto;top: -40px;"></div>
</div>
</template>
<script>
export default {
name: 'Echart1',
data() {
return {
disabled: false
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
loadEchart() {
// 基于准备好的dom,初始化echarts实例
var myChart = this.$echarts.init(document.getElementById('myChart'))
var option = {
title: {
text:
'Total: 115 SampleSize: 5 Groups: 23 Max: 0.966 Min: 0.91 Dev: 0.022003 CPK: 1.34 PPK: 1.36 Ca: 0.1 Cp: 1.49 Pp: 1.51',
subtext: '',
textStyle: {
fontWeight: 'normal',
fontSize:'12px',
color: '#515A6E' //legend颜色
},
left: 'center',
top: 'bottom'
},
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#739ADD' // 0% 处的颜色
},
{
offset: 1,
color: '#739ADD' // 100% 处的颜色
}
],
global: false // 缺省为 false
},
tooltip: {
trigger: 'axis',
axisPointer: {
animation: false
}
},
xAxis: {
type: 'category',
data: [
'2019',
'2020',
'2021',
'2022',
'2023',
'2024',
'2025',
'2026',
'2027',
'2028',
'2029',
'2030'
]
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} ‰'
}
},
series: [
{
data: [1.6, 2.8, 3.2, 1.6, 0.2, 4.7, 1.5, 4.9, 2.5, 5.4, 6.2, 1.5],
type: 'line',
markLine: {
data: [
{
type: 'max',
label: {
formatter: '2020目标值 6 ‰'
},
lineStyle: {
//警戒线的样式 ,虚实 颜色
type: 'dashed',
color: '#0B5813',
width: 2
}
},
{
type: 'min',
label: {
formatter: '2030目标值 0.2 ‰'
},
lineStyle: {
//警戒线的样式 ,虚实 颜色
type: 'dashed',
color: '#E99224',
width: 2
}
}
]
}
}
]
}
// 绘制图表
myChart.setOption(option)
}
},
mounted() {
this.loadEchart()
}
}
</script>
......@@ -115,7 +115,7 @@ export default {
this.datafrom.fill_in_user_type = fill_in_user_type;
this.datafrom.data_type = 4;
this.ids = [];
console.log(params);
if (
fill_in_user_type == 1 && //自检
params.selfchecklist != null &&
......@@ -151,9 +151,9 @@ export default {
: params.seizurechecklist.record_id;
}
this.datafrom.product_code = product_code.join(",");
this.datafrom.product_code = product_code;
// this.datafrom.board_code = board_code
alert(2)
this.loaddata();
},
loaddata() {
......@@ -204,14 +204,20 @@ alert(2)
this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1;
} else {
let lastindex = this.moviedata.length - 1;
if(lastindex<0)
{
lastindex=0;
}
this.data_content1 = this.moviedata[lastindex].data_content1;
this.data_content2 = this.moviedata[lastindex].data_content2;
this.data_content3 = this.moviedata[lastindex].data_content3;
this.editIndex = lastindex;
}
this.datafrom.product_code = this.datafrom.product_code.join(",");
},
handleEdit(row, index) {
this.data_content1 = row.data_content1;
......
......@@ -4,85 +4,87 @@
<div class="data-title flex">
<div class="fg">
<span class="ml20">产品号</span>
<ProductNumberSelect
v-model="product_ID"
:eid="row.orderId"
ref="codes"
@on-change="change"
<Select
:multiple="false"
class="select-produt-name"
/>
</div>
<!-- <template v-if="datasearch.isMain!=1">
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200">
@on-change="productonchange"
v-model="product_ID"
>
<!-- <Option value="" class="option_text">请选择</Option> -->
<Option
v-for="item in board_List"
:value="item.boardNumber"
v-for="item in product_List"
:value="item.productids"
:key="item.index"
>{{ item.boardNumber }}</Option>
>{{ item.productcodes }}</Option>
</Select>
</template>-->
</div>
<div class="tr">
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button>
<Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button
type="primary"
:disabled="ishavzj"
@click="SendCheckRecord()"
class="title_btn ml10"
>送检记录</Button>
<Button type="primary" :disabled="ishavself" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button
type="primary"
:disabled="ishavhj"
@click="QcCardChecker(2)"
class="title_btn ml10"
>互检</Button>
<Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button
type="primary"
:disabled="ishavzj"
@click="SendCheckRecord()"
class="title_btn ml10"
>送检记录</Button>
</div>
</div>
<div class="table-i">
<Table border :columns="columns12" :data="recorddata">
<!-- 自检 -->
<template slot-scope="{ row,index }" slot="selffillin">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox
v-model="row.selfchecklist.checkstatus"
@on-change="selfchecklistcheck(index,$event)"
v-if="row.fillintype == 1"
></Checkbox>
<Input
v-model="row.selfchecklist.fill_in_content"
v-else-if="row.fillintype == 2"
placeholder="请输入..."
@on-blur="selfchecklistinput(index,row.selfchecklist.fill_in_content)"
></Input>
<template v-else>
<op
class="view"
@click="showrecordData(row,1,true)"
v-if="row.selfchecklist.fill_in_content==''"
v-text="row.fillintype_str"
></op>
<op class="view" @click="showrecordData(row,1,true)" v-else v-text="look"></op>
</template>
</template>
<template v-else>
<template
v-if="row.fillintype == 1"
>{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}</template>
<template v-else-if="row.fillintype ==2">
<op class="view">{{row.selfchecklist.fill_in_content}}</op>
{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}
<template v-if="row.inspect_type.split(',').indexOf('1')>-1">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox
v-model="row.selfchecklist.checkstatus"
@on-change="selfchecklistcheck(index,$event)"
v-if="row.fillintype == 1"
></Checkbox>
<Input
v-model="row.selfchecklist.fill_in_content"
v-else-if="row.fillintype == 2"
placeholder="请输入..."
@on-blur="selfchecklistinput(index,row.selfchecklist.fill_in_content)"
></Input>
<template v-else>
<op
class="view"
@click="showrecordData(row,1,true)"
v-if="row.selfchecklist.fill_in_content==''"
v-text="row.fillintype_str"
></op>
<op class="view" @click="showrecordData(row,1,true)" v-else v-text="look"></op>
</template>
</template>
<template v-else>
<op
class="view"
@click="showrecordData(row,1,false)"
v-text="row.selfchecklist.user_name+' '+row.selfchecklist.addTime"
></op>
<template
v-if="row.fillintype == 1"
>{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}</template>
<template v-else-if="row.fillintype ==2">
<op class="view">{{row.selfchecklist.fill_in_content}}</op>
{{row.selfchecklist.user_name}} {{row.selfchecklist.addTime}}
</template>
<template v-else>
<op
class="view"
@click="showrecordData(row,1,false)"
v-text="row.selfchecklist.user_name+' '+row.selfchecklist.addTime"
></op>
</template>
</template>
</template>
</template>
<!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin">
<template v-if="row.check_type==2||row.check_type==4">
<template v-if="row.inspect_type.split(',').indexOf('2')>-1">
<!--未填报-->
<template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4">
<!--自检完成-->
......@@ -129,7 +131,7 @@
</template>
<!-- 检验员 -->
<template slot-scope="{ row,index }" slot="seizurefillin">
<template v-if="row.check_type==3||row.check_type==4">
<template v-if="row.inspect_type.split(',').indexOf('3')>-1">
<template v-if="row.seizurechecklist.fillinstatus==1">
<template
v-if="row.fillintype == 1"
......@@ -236,9 +238,11 @@ export default {
},
data() {
return {
product_List: [],
product_ID: "",
disabled: false,
ishavhj: false,
ishavself: true,
ishavhj: true,
ishavzj: true,
board_ID: "",
board_List: [],
......@@ -263,7 +267,7 @@ export default {
columns12: [
{ title: "序号", type: "index", width: "70", align: "center" },
{ title: "参数名称", key: "check_params" },
{ title: "检验类型", key: "check_type" },
{ title: "检验类型", key: "inspectType" },
{ title: "汇报类型", key: "fillintype" },
{ title: "标准指标", key: "standard" },
{ title: "生产要求", key: "production_requirement", tooltip: true },
......@@ -386,40 +390,60 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.loaddata();
this.loadproduct();
},
methods: {
loaddata() {
// if (
// this.datasearch.productcode == '' ||
// typeof this.datasearch.productcode == 'undefined'
// ) {
// return
// }
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist_new`;
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist`;
service.get(url, this.datasearch).then(response => {
this.recorddata = response.result;
let gh = this.recorddata.filter(function(obj) {
return obj.check_type === 2;
});
if (gh != null && gh.length > 0) {
this.ishavhj = false;
} else {
this.ishavhj = true;
this.ishavself = true;
this.ishavhj = true;
this.ishavzj = true;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
let checktypes = obj.inspect_type.split(",");
if (checktypes.indexOf("1") > -1) {
this.ishavself = false;
}
if (checktypes.indexOf("2") > -1) {
this.ishavhj = false;
}
if (checktypes.indexOf("3") > -1) {
this.ishavzj = false;
}
}
});
},
loadproduct() {
let entry = {
dispatch_id: this.row.id,
execute_id: this.row.executeId,
order_id: this.row.orderId,
routingHeaderId: this.row.headid,
routingDetailId: this.row.routingdetailId
};
var url = `${PlanUrl}/orderexecutequalityrecord/getentryproductcode`;
let gh1 = this.recorddata.filter(function(obj) {
return obj.check_type === 3 || obj.check_type === 4;
});
if (gh1 != null && gh1.length > 0) {
this.ishavzj = false;
} else {
this.ishavzj = true;
service.get(url, entry).then(response => {
this.product_List = response.result;
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i];
if (obj.productstatus == 1 || obj.productstatus == 2) {
this.datasearch.productcode = obj.productids;
this.product_ID = obj.productids;
this.productobj = obj;
break;
}
}
this.loaddata();
});
},
change(v) {
productonchange(v) {
this.datasearch.productcode = v;
this.loaddata();
},
......@@ -464,57 +488,7 @@ export default {
}
}
},
// loadproduct() {
// var url =
// `${PlanUrl}/orderexecutequalityrecord/getentryproductcode?entryID=` +
// this.datasearch.entryID;
// service.get(`${url}`).then(response => {
// this.product_List = response.result;
// this.board_List = response.result;
// for (let i = 0; i < this.product_List.length; i++) {
// let obj = this.product_List[i];
// if (obj.productstatus == 1 || obj.productstatus == 2) {
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// break;
// }
// if (
// this.productobj == null ||
// this.datasearch.productcode == "" ||
// typeof this.datasearch.productcode == "undefined"
// ) {
// let obj = this.product_List[0];
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// }
// }
// this.loaddata();
// });
// },
showPhoto(params, isedit) {
this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage(
......@@ -538,7 +512,7 @@ export default {
},
handleselfCheckAll() {
this.isselfCheckAll = !this.isselfCheckAll;
console.log(this.recorddata);
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.fillintype == 1) {
......@@ -587,8 +561,7 @@ export default {
// this.entity.productQuantity = e.length + ''
// },
QcCardChecker(fill_in_user_type) {
// console.log(this.$refs.codes.dic);
this.$refs.usercard.product_List = this.$refs.codes.dic;
this.$refs.usercard.product_List = this.product_List;
this.usercardModal = true;
let fillModel = {
......@@ -596,38 +569,43 @@ export default {
// productisabled: this.productisabled,
product_ID: this.product_ID,
// board_ID: this.board_ID,
product_List: this.$refs.codes.dic
product_List: this.product_List
// board_List: this.board_List
};
let recordList = [];
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
console.log(obj);
let checktypes = obj.inspect_type.split(",");
if (fill_in_user_type == 1) {
//自检
// &&
// obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null &&
// obj.selfchecklist.fill_in_content != ""
if (
obj.selfchecklist.fillinstatus == "0" ||
this.productobj.productstatus == 4 //打回重写填报
) {
let qc = {
qc_card_id: obj.qc_card_id,
movieid: obj.movieid,
Fillintype: obj.fillintype,
fill_in_content: obj.selfchecklist.fill_in_content,
fillinstatus: "1",
dispatch_id: obj.dispatch_id
};
recordList.push(qc);
if (checktypes.indexOf("1") > -1) {
// &&
// obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null &&
// obj.selfchecklist.fill_in_content != ""
if (
obj.selfchecklist.fillinstatus == "0" ||
this.productobj.productstatus == 4 //打回重写填报
) {
let qc = {
qc_card_id: obj.qc_card_id,
movieid: obj.movieid,
Fillintype: obj.fillintype,
fill_in_content: obj.selfchecklist.fill_in_content,
fillinstatus: "1",
dispatch_id: obj.dispatch_id
};
recordList.push(qc);
}
}
} else if (fill_in_user_type == 2) {
//互检
if (obj.check_type == 2 || obj.check_type == 3) {
if (checktypes.indexOf("2") > -1) {
//是否需要互检,2和3需要互检和专检 inspect_type
if (
(obj.mutualchecklist.fillinstatus == "0" &&
......@@ -647,7 +625,7 @@ export default {
recordList.push(qc);
}
}
} else if (inspect_type == 3) {
} else if (fill_in_user_type == 3) {
}
}
......
......@@ -81,6 +81,10 @@ export default {
row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid;
row.routingdetailId=this.$route.query.routid;
this.row = row;
this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment