yangwl
zhaoxiaolin 3 months ago
parent be12b1bf7c
commit 541a28fcba

@ -23,7 +23,7 @@ export function getOverallInfo(data) {
data: data,
});
}
// 来料--异常分布 过程检验--当日不良占比类型
// 巡检检验--当日不良占比类型
export function getCheckProjectsPie(data) {
return request({
url: '/quality/qcInterface/getCheckProjectsPie',
@ -31,6 +31,16 @@ export function getCheckProjectsPie(data) {
data: data
});
}
// 来料--异常分布 过程检验--当日不良占比类型
export function getCheckProjectsPieLL(data) {
return request({
url: '/quality/qcInterface/getCheckProjectsPieLL',
method: 'post',
data: data
});
}
// 来料--供应商产品数量不良TOP5来料--供应商产品批次不良TOP5
export function getSupplierBadTOP5(data) {
return request({

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询故障类型-缺陷描述分类列表
export function listClass(query) {
return request({
url: '/quality/defectClass/list',
method: 'get',
params: query
});
}
// 查询故障类型-缺陷描述分类详细
export function getClass(id) {
return request({
url: '/quality/defectClass/' + id,
method: 'get'
});
}
// 新增故障类型-缺陷描述分类
export function addClass(data) {
return request({
url: '/quality/defectClass',
method: 'post',
data: data
});
}
// 修改故障类型-缺陷描述分类
export function updateClass(data) {
return request({
url: '/quality/defectClass',
method: 'put',
data: data
});
}
// 删除故障类型-缺陷描述分类
export function delClass(id) {
return request({
url: '/quality/defectClass/' + id,
method: 'delete'
});
}

@ -48,3 +48,10 @@ export function getDefectTypeListByDefectType(defectType) {
method: 'get',
});
}
export function getCheckTypes() {
return request({
url: '/quality/defectType/getCheckTypes',
method: 'get'
});
}

@ -157,7 +157,7 @@
</div>
<div class="item-table item-table1">
<div class="titlebox" style="margin-bottom: 14px;">
<div class="titlename">产品不同工序异常对比</div>
<div class="titlename">产品不合格率同期对比</div>
</div>
<div id="echart6" style="margin: auto; width: 900px; height:304.15px"></div>
</div>

@ -166,7 +166,7 @@
import {
getBoardFactory,
getOverallInfo,
getCheckProjectsPie,
getCheckProjectsPieLL,
getSupplierBadTOP5,
getSupplierNoOkList,
getDictData,
@ -312,7 +312,7 @@ export default {
getdatalist() {
const _this = this;
getOverallInfo({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -320,8 +320,8 @@ export default {
_this.ordermessage = response;
}
});
getCheckProjectsPie({
ymdType: moment().format(_this.selectxtclasses),
getCheckProjectsPieLL({
ymdType: _this.selectxtclasses,
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -337,7 +337,7 @@ export default {
}
});
getSupplierBadTOP5({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -366,7 +366,7 @@ export default {
});
this.orderdetail = []
getSupplierNoOkList({
ymdType: moment().format(_this.selectxtclasses),
ymdType: _this.selectxtclasses,
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
@ -386,7 +386,6 @@ export default {
var tick = "../../../static/img/icon-dingdan1.d5172b23.png";
console.log(tick)
// let bjlxChartData = { areaName: ['', '', '鹿', ''], eventCount: [30, 3, 3, 3] };
let bjlxChartData = _this.optionDatalist3[0]
let max = 100;
var maxArr = [];

@ -131,6 +131,11 @@
label="人均效率达成率"
width="120">
</el-table-column>
<el-table-column
prop="reason"
label="影响效率原因"
width="120" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<pagination
v-show="total>0"

@ -133,6 +133,7 @@
<el-table-column label="产品名称" align="center" prop="productName" width="350" />
<el-table-column label="标准用人" align="center" prop="useMan" width="100"/>
<el-table-column label="标准效率" align="center" prop="efficiency" width="100"/>
<el-table-column label="标准效率(PC/小时)" align="center" prop="hourEfficiency" width="120"/>
<el-table-column label="标准工时" align="center" prop="attr1" width="100"/>
<!--<el-table-column label="产品列表" align="left" prop="productList" :formatter="formatProductNames" :show-overflow-tooltip="true"/>-->
<el-table-column width="120"
@ -215,6 +216,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="标准效率(PC/小时)" prop="hourEfficiency">
<el-input v-model="form.hourEfficiency" type="number" placeholder="请输入标准效率" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

@ -303,7 +303,6 @@ import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
import moment from "moment/moment";
import JsBarcode from 'jsbarcode';
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
// import Detail from "./prepareDetail.vue";
export default {
@ -655,6 +654,7 @@ export default {
</script>
<style>
.my-print-head {
margin-top: 20px;
font-weight: bold;
text-align: center;
}

@ -0,0 +1,296 @@
<template>
<div>
<el-dialog title="不良分类缺陷管理"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="缺陷描述" prop="className">
<el-input
v-model="queryParams.className"
placeholder="请输入缺陷描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:class:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:class:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:class:remove']"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="classList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="不良类型编码" align="center" prop="defectCode"/>
<el-table-column label="缺陷名称" align="center" prop="className"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:class:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:class:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障类型-缺陷描述分类对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="缺陷名称" prop="className">
<el-input v-model="form.className" type="textarea" placeholder="请输入内容"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注"/>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input type="number" v-model="form.sort" placeholder="请输入排序"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
<el-button @click="cancelForm"> </el-button>
</el-dialog>
</div>
</template>
<script>
import {listClass,getClass,delClass,addClass,updateClass } from "@/api/quality/defectClass";
export default {
name: "defectClass",
data() {
return {
//
loading: true,
showFlag : false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// -
classList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
defectId: null,
defectCode: null,
className: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
defectId:null
},
//
form: {
},
defectId:null,
defectCode:null,
//
rules: {
defectCode: [{required: true, message: "不良类型编码不能为空", trigger: "blur" }],
className: [{required: true, message: "q缺陷名称不能为空", trigger: "blur" }]
}
}
},
created() {
},
methods: {
init(defectId,defectCode){
this.queryParams.defectId = defectId;
this.defectId = defectId;
this.defectCode = defectCode;
this.getList();
},
/** 查询故障类型-缺陷描述分类列表 */
getList() {
this.loading = true;
listClass(this.queryParams).then(response => {
this.classList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
defectId: null,
defectCode: null,
className: null,
remark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
}
;
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障类型-缺陷描述分类";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id =
row.id || this.ids
getClass(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改故障类型-缺陷描述分类";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
this.form.defectId = this.defectId;
this.form.defectCode = this.defectCode;
if (valid) {
if (this.form.id != null) {
updateClass(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addClass(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除编号为"' + ids + '"的数据项?')
.then(function () {
return delClass(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
//
cancelForm() {
this.showFlag = false;
},
},
};
</script>

@ -4,10 +4,10 @@
<el-form-item label="不良类型" prop="defectType">
<el-select v-model="queryParams.defectType" placeholder="请选择不良类型" clearable>
<el-option
v-for="dict in dict.type.quc_defect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="dict in defectTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
/>
</el-select>
</el-form-item>
@ -81,6 +81,17 @@
v-hasPermi="['quality:defectType:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-share"
size="mini"
:disabled="single"
@click="handleUpdateCode"
v-hasPermi="['quality:defectType:edit']"
>缺陷管理</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -89,12 +100,9 @@
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="defectId" />
<el-table-column width="150" label="不良类型编码" align="center" prop="defectCode" />
<el-table-column width="150" label="不良类型" align="center" prop="defectType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.quc_defect_type" :value="scope.row.defectType"/>
</template>
</el-table-column>
<el-table-column width="150" label="不良名称" align="center" prop="defectSubclass" />
<el-table-column width="150" label="不良类型" align="center" prop="defectType" />
<el-table-column width="150" label="不良名称" align="center" prop="checkName" />
<el-table-column width="150" label="不良分类" align="center" prop="defectSubclass" />
<el-table-column width="150" label="不良系数" align="center" prop="ratio" />
<el-table-column width="180" label="备注" align="center" prop="defectRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
@ -146,10 +154,10 @@
<el-form-item label="不良类型" prop="defectType">
<el-select v-model="form.defectType" placeholder="请选择不良类型" clearable style="width:100%">
<el-option
v-for="dict in dict.type.quc_defect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="dict in defectTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
/>
</el-select>
</el-form-item>
@ -168,17 +176,22 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 不良分类缺陷分配对话框 -->
<CodeContent ref="itemDefectTypeClass"></CodeContent>
</div>
</template>
<script>
import { listDefectType, getDefectType, delDefectType, addDefectType, updateDefectType } from "@/api/quality/defectType";
import { listDefectType, getDefectType, delDefectType, addDefectType, updateDefectType ,getCheckTypes} from "@/api/quality/defectType";
import CodeContent from "./codeContent.vue";
export default {
name: "DefectType",
components: {CodeContent},
dicts: ['quc_defect_type'],
data() {
return {
defectTypes:[],
//
pickerOptions: {
shortcuts: [{
@ -209,8 +222,12 @@ export default {
},
//
loading: true,
openCode: false,
selectedDefectId: null, // null
//
ids: [],
//
selectedRows:[],
//
single: true,
//
@ -263,6 +280,9 @@ export default {
},
created() {
this.getList();
getCheckTypes().then(response => {
this.defectTypes = response;
});
},
methods: {
/** 查询不良类型维护列表 */
@ -278,6 +298,7 @@ export default {
cancel() {
this.open = false;
this.reset();
this.openCode = false;
},
//
reset() {
@ -304,6 +325,14 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
/** 维护不良分类缺陷按钮操作 */
handleUpdateCode(row) {
this.openCode = true;
this.reset();
const defectId = row.defectId || this.ids;
this.$refs.itemDefectTypeClass.showFlag = true;
this.$refs.itemDefectTypeClass.init(defectId[0],this.selectedRows[0].defectCode);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
@ -314,6 +343,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.selectedRows = selection;
this.ids = selection.map(item => item.defectId)
this.single = selection.length!==1
this.multiple = !selection.length

@ -445,7 +445,6 @@
></ItemSelectConfirmUser>
</div>
</template>
<script>
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,
getCheckTypes,changeProduceStatus,getBatchList

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="检验类型" prop="typeCode">
<el-select v-model="queryParams.typeCode" clearable placeholder="请选择类型" @change="getCheckTypeList">
<el-select v-model="queryParams.typeCode" placeholder="请选择类型" @change="getCheckTypeList">
<el-option
v-for="dict in dict.type.check_type"
:key="dict.value"
@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<el-form-item label="检验节点" prop="checkType">
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
<el-select v-model="queryParams.checkType" placeholder="请选择检验节点">
<el-option
v-for="dict in checkTypeList"
:key="dict.checkType"
@ -80,6 +80,7 @@
<script>
import { getTableHzTitle,
getCheckTypeList,
getTableData
} from "@/api/quality/qcTable";
import moment from 'moment';
export default {
@ -172,7 +173,7 @@ export default {
for(let i=0;i<response.columns1.length;i++){
var pobj={};
pobj.id="colone"+i;
pobj.titleName = response[i];
pobj.titleName = response.columns1[i];
this.showTitles1.push(pobj)
}
@ -180,13 +181,13 @@ export default {
for(let i=0;i<response.columns2.length;i++){
var pobj={};
pobj.id="coltwo"+i;
pobj.titleName = response[i];
pobj.titleName = response.columns2[i];
this.showTitles2.push(pobj)
}
});
//Table
getTableData(this.queryParams).then(response => {
this.hourProList = response;
this.tableList = response;
this.loading = false;
});
},

@ -310,6 +310,18 @@
<el-input v-model="form.wxId" placeholder="请输入微信号"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="人员类型">
<el-select v-model="form.userMType" placeholder="请选择人员类型">
<el-option
v-for="dict in dict.type.m_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
@ -365,7 +377,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'],
dicts: ['sys_normal_disable', 'sys_user_sex','m_type'],
components: { Treeselect },
data() {
return {

Loading…
Cancel
Save