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

质量填报

parent 02745e50
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"vue-i18n": "^8.15.5", "vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8", "vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3", "vue-slider-component": "^3.1.5",
"vue-switches": "^2.0.1", "vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1", "vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2", "vue2-editor": "^2.10.2",
......
<template> <template>
<div> <div>数据分析表
数据分析表 <Echart1 ></Echart1>
</div> </div>
</template> </template>
<script> <script>
import Echart1 from './compose/echart1'
export default { 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> </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 { ...@@ -115,7 +115,7 @@ export default {
this.datafrom.fill_in_user_type = fill_in_user_type; this.datafrom.fill_in_user_type = fill_in_user_type;
this.datafrom.data_type = 4; this.datafrom.data_type = 4;
this.ids = []; this.ids = [];
console.log(params);
if ( if (
fill_in_user_type == 1 && //自检 fill_in_user_type == 1 && //自检
params.selfchecklist != null && params.selfchecklist != null &&
...@@ -151,9 +151,9 @@ export default { ...@@ -151,9 +151,9 @@ export default {
: params.seizurechecklist.record_id; : params.seizurechecklist.record_id;
} }
this.datafrom.product_code = product_code.join(","); this.datafrom.product_code = product_code;
// this.datafrom.board_code = board_code // this.datafrom.board_code = board_code
alert(2)
this.loaddata(); this.loaddata();
}, },
loaddata() { loaddata() {
...@@ -204,14 +204,20 @@ alert(2) ...@@ -204,14 +204,20 @@ alert(2)
this.moviedata.push(row); this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1; this.editIndex = this.moviedata.length - 1;
} else { } else {
let lastindex = this.moviedata.length - 1; let lastindex = this.moviedata.length - 1;
if(lastindex<0)
{
lastindex=0;
}
this.data_content1 = this.moviedata[lastindex].data_content1; this.data_content1 = this.moviedata[lastindex].data_content1;
this.data_content2 = this.moviedata[lastindex].data_content2; this.data_content2 = this.moviedata[lastindex].data_content2;
this.data_content3 = this.moviedata[lastindex].data_content3; this.data_content3 = this.moviedata[lastindex].data_content3;
this.editIndex = lastindex; this.editIndex = lastindex;
} }
this.datafrom.product_code = this.datafrom.product_code.join(",");
}, },
handleEdit(row, index) { handleEdit(row, index) {
this.data_content1 = row.data_content1; this.data_content1 = row.data_content1;
......
...@@ -4,29 +4,30 @@ ...@@ -4,29 +4,30 @@
<div class="data-title flex"> <div class="data-title flex">
<div class="fg"> <div class="fg">
<span class="ml20">产品号</span> <span class="ml20">产品号</span>
<ProductNumberSelect
v-model="product_ID" <Select
:eid="row.orderId"
ref="codes"
@on-change="change"
:multiple="false" :multiple="false"
class="select-produt-name" class="select-produt-name"
/> @on-change="productonchange"
</div> v-model="product_ID"
>
<!-- <template v-if="datasearch.isMain!=1"> <!-- <Option value="" class="option_text">请选择</Option> -->
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200">
<Option <Option
v-for="item in board_List" v-for="item in product_List"
:value="item.boardNumber" :value="item.productids"
:key="item.index" :key="item.index"
>{{ item.boardNumber }}</Option> >{{ item.productcodes }}</Option>
</Select> </Select>
</template>--> </div>
<div class="tr"> <div class="tr">
<Button type="primary" @click="QcCardChecker(1)" 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="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="SendCheck()" class="title_btn ml10">送检</Button>
<Button <Button
type="primary" type="primary"
...@@ -35,12 +36,12 @@ ...@@ -35,12 +36,12 @@
class="title_btn ml10" class="title_btn ml10"
>送检记录</Button> >送检记录</Button>
</div> </div>
</div> </div>
<div class="table-i"> <div class="table-i">
<Table border :columns="columns12" :data="recorddata"> <Table border :columns="columns12" :data="recorddata">
<!-- 自检 --> <!-- 自检 -->
<template slot-scope="{ row,index }" slot="selffillin"> <template slot-scope="{ row,index }" slot="selffillin">
<template v-if="row.inspect_type.split(',').indexOf('1')>-1">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4"> <template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox <Checkbox
v-model="row.selfchecklist.checkstatus" v-model="row.selfchecklist.checkstatus"
...@@ -80,9 +81,10 @@ ...@@ -80,9 +81,10 @@
</template> </template>
</template> </template>
</template> </template>
</template>
<!--互检--> <!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin"> <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"> <template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4">
<!--自检完成--> <!--自检完成-->
...@@ -129,7 +131,7 @@ ...@@ -129,7 +131,7 @@
</template> </template>
<!-- 检验员 --> <!-- 检验员 -->
<template slot-scope="{ row,index }" slot="seizurefillin"> <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.seizurechecklist.fillinstatus==1">
<template <template
v-if="row.fillintype == 1" v-if="row.fillintype == 1"
...@@ -236,9 +238,11 @@ export default { ...@@ -236,9 +238,11 @@ export default {
}, },
data() { data() {
return { return {
product_List: [],
product_ID: "", product_ID: "",
disabled: false, disabled: false,
ishavhj: false, ishavself: true,
ishavhj: true,
ishavzj: true, ishavzj: true,
board_ID: "", board_ID: "",
board_List: [], board_List: [],
...@@ -263,7 +267,7 @@ export default { ...@@ -263,7 +267,7 @@ export default {
columns12: [ columns12: [
{ title: "序号", type: "index", width: "70", align: "center" }, { title: "序号", type: "index", width: "70", align: "center" },
{ title: "参数名称", key: "check_params" }, { title: "参数名称", key: "check_params" },
{ title: "检验类型", key: "check_type" }, { title: "检验类型", key: "inspectType" },
{ title: "汇报类型", key: "fillintype" }, { title: "汇报类型", key: "fillintype" },
{ title: "标准指标", key: "standard" }, { title: "标准指标", key: "standard" },
{ title: "生产要求", key: "production_requirement", tooltip: true }, { title: "生产要求", key: "production_requirement", tooltip: true },
...@@ -386,40 +390,60 @@ export default { ...@@ -386,40 +390,60 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
this.loaddata(); this.loadproduct();
}, },
methods: { methods: {
loaddata() { loaddata() {
// if ( var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist`;
// this.datasearch.productcode == '' ||
// typeof this.datasearch.productcode == 'undefined'
// ) {
// return
// }
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist_new`;
service.get(url, this.datasearch).then(response => { service.get(url, this.datasearch).then(response => {
this.recorddata = response.result; this.recorddata = response.result;
let gh = this.recorddata.filter(function(obj) { this.ishavself = true;
return obj.check_type === 2;
});
if (gh != null && gh.length > 0) {
this.ishavhj = false;
} else {
this.ishavhj = true; this.ishavhj = true;
} this.ishavzj = true;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
let gh1 = this.recorddata.filter(function(obj) { let checktypes = obj.inspect_type.split(",");
return obj.check_type === 3 || obj.check_type === 4; if (checktypes.indexOf("1") > -1) {
}); this.ishavself = false;
if (gh1 != null && gh1.length > 0) { }
if (checktypes.indexOf("2") > -1) {
this.ishavhj = false;
}
if (checktypes.indexOf("3") > -1) {
this.ishavzj = false; this.ishavzj = false;
} else {
this.ishavzj = true;
} }
}
});
},
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`;
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.datasearch.productcode = v;
this.loaddata(); this.loaddata();
}, },
...@@ -464,57 +488,7 @@ export default { ...@@ -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) { showPhoto(params, isedit) {
this.entryrecordmovieModal = true; this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage( this.$refs.entryrecordMovie.loadpage(
...@@ -538,7 +512,7 @@ export default { ...@@ -538,7 +512,7 @@ export default {
}, },
handleselfCheckAll() { handleselfCheckAll() {
this.isselfCheckAll = !this.isselfCheckAll; this.isselfCheckAll = !this.isselfCheckAll;
console.log(this.recorddata);
for (let i = 0; i < this.recorddata.length; i++) { for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i]; let obj = this.recorddata[i];
if (obj.fillintype == 1) { if (obj.fillintype == 1) {
...@@ -587,8 +561,7 @@ export default { ...@@ -587,8 +561,7 @@ export default {
// this.entity.productQuantity = e.length + '' // this.entity.productQuantity = e.length + ''
// }, // },
QcCardChecker(fill_in_user_type) { QcCardChecker(fill_in_user_type) {
// console.log(this.$refs.codes.dic); this.$refs.usercard.product_List = this.product_List;
this.$refs.usercard.product_List = this.$refs.codes.dic;
this.usercardModal = true; this.usercardModal = true;
let fillModel = { let fillModel = {
...@@ -596,17 +569,20 @@ export default { ...@@ -596,17 +569,20 @@ export default {
// productisabled: this.productisabled, // productisabled: this.productisabled,
product_ID: this.product_ID, product_ID: this.product_ID,
// board_ID: this.board_ID, // board_ID: this.board_ID,
product_List: this.$refs.codes.dic product_List: this.product_List
// board_List: this.board_List // board_List: this.board_List
}; };
let recordList = []; let recordList = [];
for (let i = 0; i < this.recorddata.length; i++) { for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i]; let obj = this.recorddata[i];
console.log(obj);
let checktypes = obj.inspect_type.split(",");
if (fill_in_user_type == 1) { if (fill_in_user_type == 1) {
//自检 //自检
if (checktypes.indexOf("1") > -1) {
// && // &&
// obj.selfchecklist != null && // obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null && // obj.selfchecklist.fill_in_content != null &&
...@@ -625,9 +601,11 @@ export default { ...@@ -625,9 +601,11 @@ export default {
}; };
recordList.push(qc); recordList.push(qc);
} }
}
} else if (fill_in_user_type == 2) { } 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 //是否需要互检,2和3需要互检和专检 inspect_type
if ( if (
(obj.mutualchecklist.fillinstatus == "0" && (obj.mutualchecklist.fillinstatus == "0" &&
...@@ -647,7 +625,7 @@ export default { ...@@ -647,7 +625,7 @@ export default {
recordList.push(qc); recordList.push(qc);
} }
} }
} else if (inspect_type == 3) { } else if (fill_in_user_type == 3) {
} }
} }
......
...@@ -81,6 +81,10 @@ export default { ...@@ -81,6 +81,10 @@ export default {
row.id = this.$route.query.id; row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId; row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId; row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid;
row.routingdetailId=this.$route.query.routid;
this.row = row; this.row = row;
this.inputId = this.$route.query.id; this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index"); 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