Merge remote-tracking branch 'origin/master'

yangwl
mengjiao 2 months ago
commit 33ecf626fd

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

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

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

@ -131,6 +131,11 @@
label="人均效率达成率" label="人均效率达成率"
width="120"> width="120">
</el-table-column> </el-table-column>
<el-table-column
prop="reason"
label="影响效率原因"
width="120" :show-overflow-tooltip="true">
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" 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="productName" width="350" />
<el-table-column label="标准用人" align="center" prop="useMan" width="100"/> <el-table-column label="标准用人" align="center" prop="useMan" width="100"/>
<el-table-column label="标准效率" align="center" prop="efficiency" 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="center" prop="attr1" width="100"/>
<!--<el-table-column label="产品列表" align="left" prop="productList" :formatter="formatProductNames" :show-overflow-tooltip="true"/>--> <!--<el-table-column label="产品列表" align="left" prop="productList" :formatter="formatProductNames" :show-overflow-tooltip="true"/>-->
<el-table-column width="120" <el-table-column width="120"
@ -215,6 +216,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>

@ -226,16 +226,14 @@
<el-dialog <el-dialog
title="备料信息" title="备料信息"
:visible.sync="printDialogVisible" :visible.sync="printDialogVisible"
:width="shengchan?'821px':'721px'" :width="shengchan?'731px':'721px'"
> >
<div id="printFrom" class="my-print-box"> <div id="printFrom" class="my-print-box">
<el-form :model="form"> <el-form :model="form">
<!-- 表头-工单信息 --> <!-- 表头-工单信息 -->
<div class="my-print-barcode" :width="shengchan?'821px':'721px'">
<svg id="barcode"></svg>
</div>
<el-row> <el-row>
<div class="my-print-head"> <div class="my-print-head">
<el-col>生产订单备料单({{printData.printTitle}})</el-col> <el-col>生产订单备料单({{printData.printTitle}})</el-col>
@ -243,40 +241,45 @@
</el-row> </el-row>
<!-- 导航栏 --> <!-- 导航栏 -->
<el-row class="my-print-nav"> <el-row class="my-print-nav">
<el-col :span="8">工厂:{{printData.factory}}</el-col> <el-col :span="6">工厂:{{printData.factory}}</el-col>
<el-col :span="8">工作中心:{{printData.workCenter}}</el-col> <el-col :span="6">工作中心:{{printData.workCenter}}</el-col>
<el-col :span="8" v-if="printData.prodLineCode!=null">线:{{printData.prodLineCode}}</el-col> <el-col :span="4" v-if="printData.prodLineCode!=null">线:{{printData.prodLineCode}}</el-col>
<el-col style="position: absolute;right: 0px;" :span="8">
<div class="my-print-barcode" :width="shengchan?'631px':'621px'">
<svg id="barcode"></svg>
</div>
</el-col>
</el-row> </el-row>
<el-row class="my-print-nav"> <el-row class="my-print-nav">
<el-col :span="8">生产日期:{{printData.productDate}}</el-col> <el-col :span="6">生产日期:{{printData.productDate}}</el-col>
<el-col :span="8">打印日期:{{printData.printDate}}</el-col> <el-col :span="6">打印日期:{{printData.printDate}}</el-col>
<el-col :span="8">页次: 1/ 1</el-col> <el-col :span="6">页次: 1/ 1</el-col>
</el-row> </el-row>
<!-- 主数据 --> <!-- 主数据 -->
<div v-for="(item,index) in printData.workTable" :key="index"> <div v-for="(item,index) in printData.workTable" :key="index">
<el-table <el-table
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" :data="item" v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" :data="item"
border style="width: 100%"> border style="width: 100%;">
<el-table-column label="序号" width="40"> <el-table-column label="序号" width="40">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- scope.$index 是当前行的索引 0 开始 1 后乘以 2 --> <!-- scope.$index 是当前行的索引 0 开始 1 后乘以 2 -->
{{ (scope.$index + 1) + fenyeNumber* index}} {{ (scope.$index + 1) + (index==0?fenyeNumber* index:fenyeNumberTwo* index-2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="materialCode" label="料号" width="120" :formatter="productCodeFormate"></el-table-column> <el-table-column prop="materialCode" label="料号" :width="shengchan?85:125" :formatter="productCodeFormate"></el-table-column>
<el-table-column prop="materialName" label="物料描述" width="250"></el-table-column> <el-table-column prop="materialName" label="物料描述" :width="shengchan?200:240"></el-table-column>
<el-table-column prop="unit" width="50" label="单位"></el-table-column> <el-table-column prop="unit" width="60" label="单位"></el-table-column>
<el-table-column v-if="showWorkorderCode" prop="workorderCode" width="100" label="生产订单" :formatter="orderCodeFormate"></el-table-column> <el-table-column v-if="showWorkorderCode" prop="workorderCode" width="90" label="生产订单" :formatter="orderCodeFormate"></el-table-column>
<el-table-column prop="quantity" label="请领数量" width="100"></el-table-column> <el-table-column prop="quantity" label="请领数量" width="80"></el-table-column>
<el-table-column prop="routeCode" width="60" label="实发数量"></el-table-column> <el-table-column prop="routeCode" width="60" label="实发数量"></el-table-column>
<el-table-column prop="routeCode" width="60" label="实发数量2"></el-table-column> <el-table-column prop="routeCode" width="75" label="实发数量2"></el-table-column>
</el-table> </el-table>
<div class="fy" v-if="index!=printData.workTable.length-1"></div> <div class="fy" v-if="index!=printData.workTable.length-1"></div>
</div> </div>
<!-- 底部 --> <!-- 底部 -->
<el-row class="my-print-foot"> <el-row class="my-print-foot">
<el-col :offset="1" :span="3">发料人:</el-col> <el-col :offset="1" :span="3">发料人:</el-col>
@ -303,7 +306,6 @@ import { listPrepare, getPrepare, delPrepare, addPrepare, updatePrepare } from "
import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail"; import {printPrepareByCode,printPrepareXByCode} from "@/api/mes/prepareDetail";
import moment from "moment/moment"; import moment from "moment/moment";
import JsBarcode from 'jsbarcode'; import JsBarcode from 'jsbarcode';
// import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail"; // import { listPrepareDetail, getPrepareDetail, delPrepareDetail, addPrepareDetail, updatePrepareDetail } from "@/api/mes/prepareDetail";
// import Detail from "./prepareDetail.vue"; // import Detail from "./prepareDetail.vue";
export default { export default {
@ -311,7 +313,8 @@ export default {
// components: {Detail}, // components: {Detail},
data() { data() {
return { return {
fenyeNumber:13, fenyeNumber:4,
fenyeNumberTwo:6,
shengchan:true, shengchan:true,
newWorkerLoading: false, newWorkerLoading: false,
refreshNewWorkerTable:true, refreshNewWorkerTable:true,
@ -408,9 +411,9 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
mounted() { mounted() {
this.generateBarcode(); this.generateBarcode();
}, },
methods: { methods: {
// //
productCodeFormate(row, column, cellValue){ productCodeFormate(row, column, cellValue){
@ -433,8 +436,10 @@ export default {
targetStyles: ['*'], targetStyles: ['*'],
style: ` style: `
body {margin: 5mm;padding: 0;} body {margin: 3mm;padding: 0;}
.fy{page-break-after: always;} .fy{page-break-after: always;}
table { border-collapse: collapse; } table, th, td { border: 2px solid black; }
.el-table .cell{padding-left:5px;padding-right:5px;}
`, `,
ignoreElements: params.ignore || [], // ['no-print'] ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null properties: params.properties || null
@ -464,9 +469,9 @@ export default {
let chunkedArray = []; let chunkedArray = [];
// this.printData.workTable // this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) { for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) {
// 使slicei1010 // 使slicei1010
let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber); let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray // chunkedArray
chunkedArray.push(chunk); chunkedArray.push(chunk);
} }
@ -507,9 +512,9 @@ export default {
let chunkedArray = []; let chunkedArray = [];
// this.printData.workTable // this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) { for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) {
// 使slicei1010 // 使slicei1010
let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber); let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray // chunkedArray
chunkedArray.push(chunk); chunkedArray.push(chunk);
} }
@ -523,10 +528,10 @@ export default {
// //
generateBarcode(barcode){ generateBarcode(barcode){
JsBarcode("#barcode", barcode, { JsBarcode("#barcode", barcode, {
format: "CODE128", format: "CODE128",
height:75, height:35,
width:2, width:1.5,
displayValue: true, displayValue: true,
}); });
}, },
@ -654,7 +659,25 @@ export default {
}; };
</script> </script>
<style> <style>
.my-print-table .el-table {
border-collapse: collapse;
border-spacing: 0;
}
.my-print-table .el-table__header-wrapper th {
border: 1px solid black !important;
}
.my-print-table .el-table__body-wrapper td {
border: 1px solid black !important;
}
.my-print-head { .my-print-head {
margin-top: 2px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
@ -666,8 +689,8 @@ export default {
} }
.my-print-nav { .my-print-nav {
margin-top: 15px; margin-top: 10px;
margin-bottom: 15px; margin-bottom: 20px;
} }
.my-print-foot { .my-print-foot {
@ -677,13 +700,12 @@ export default {
body { body {
font-family: 'Arial', sans-serif; /* 设置字体为'Arial'或其他清晰的无衬线字体 */ font-family: 'Arial', sans-serif; /* 设置字体为'Arial'或其他清晰的无衬线字体 */
font-size: 14px; /* 设置字体大小 */ font-size: 14px; /* 设置字体大小 */
-webkit-print-color-adjust: exact;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
font-size: 14px; /* 确保表格内字体大小一致 */
} }
.my-print-table .el-table {
border-collapse: collapse; /* 合并表格边框 */
}
} }
.fy{ .fy{
page-break-after: always; page-break-after: always;

@ -112,11 +112,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品描述" align="center" width="250" prop="productName" /> <el-table-column label="产品描述" align="center" width="250" prop="productName" />
<el-table-column label="带线组长" align="center" width="250" prop="lineLeader" />
<el-table-column label="产线编码" align="center" prop="lineCode" /> <el-table-column label="产线编码" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" width="250" prop="equipmentName" /> <el-table-column label="产线名称" align="center" width="250" prop="equipmentName" />
<el-table-column label="工号" width="110" align="center" prop="userName" /> <el-table-column label="工号" width="110" align="center" prop="userName" />
<el-table-column label="操作者" width="110" align="center" prop="nickName" /> <el-table-column label="操作者" width="110" align="center" prop="nickName" />
<el-table-column label="职位" width="110" align="center" prop="post" /> <el-table-column label="职位" width="110" align="center" prop="post" />
<el-table-column label="工时" width="110" align="center" prop="attr2" />
<el-table-column label="子工序名称" width="110" align="center" prop="childprocessName" /> <el-table-column label="子工序名称" width="110" align="center" prop="childprocessName" />
<el-table-column label="当日工单报工总数" width="110" align="center" prop="orderQuantityP" /> <el-table-column label="当日工单报工总数" width="110" align="center" prop="orderQuantityP" />
<el-table-column label="规格" width="50" align="center" prop="umrez" /> <el-table-column label="规格" width="50" align="center" prop="umrez" />
@ -124,7 +126,7 @@
<el-table-column label="工序单价" width="110" align="center" prop="attr1" /> <el-table-column label="工序单价" width="110" align="center" prop="attr1" />
<el-table-column label="个人产量" width="100" align="center" prop="totalQuantity" /> <el-table-column label="个人产量" width="100" align="center" prop="totalQuantity" />
<el-table-column label="计件薪酬(元)" width="110" align="center" prop="result" /> <el-table-column label="计件薪酬(元)" width="110" align="center" prop="result" />
<el-table-column label="工时" width="110" align="center" prop="attr2" />
<el-table-column label="扣款" width="110" align="center" prop="kk" /> <el-table-column label="扣款" width="110" align="center" prop="kk" />
<el-table-column label="保底" width="110" align="center" prop="bd" /> <el-table-column label="保底" width="110" align="center" prop="bd" />

@ -55,7 +55,8 @@
<div class="card-div2">批次号: {{ item.batchCode }}</div><br /> <div class="card-div2">批次号: {{ item.batchCode }}</div><br />
<div class="card-div2">生产日期: {{ item.productDateStr }}</div><br /> <div class="card-div2">生产日期: {{ item.productDateStr }}</div><br />
<div class="card-div2">板次: {{ item.palletNo }}</div><br /> <div class="card-div2">板次: {{ item.palletNo }}</div><br />
<div class="card-div2">数量: {{ item.batchQuantity }}</div> <div class="card-div2"><span>数量: {{ item.batchQuantity }}&nbsp;{{ item.unit }}</span>
<span style="margin-left: 15%;">子单数量: {{ item.umrez }}&nbsp;PC</span></div><br />
</el-col> </el-col>
<el-col :offset="1" :span="9"> <el-col :offset="1" :span="9">
<canvas :id="'qrcode-' + index" class="qrcode"></canvas> <canvas :id="'qrcode-' + index" class="qrcode"></canvas>

@ -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-form-item label="不良类型" prop="defectType">
<el-select v-model="queryParams.defectType" placeholder="请选择不良类型" clearable> <el-select v-model="queryParams.defectType" placeholder="请选择不良类型" clearable>
<el-option <el-option
v-for="dict in dict.type.quc_defect_type" v-for="dict in defectTypes"
:key="dict.value" :key="dict.id"
:label="dict.label" :label="dict.checkName"
:value="dict.value" :value="dict.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -81,6 +81,17 @@
v-hasPermi="['quality:defectType:export']" v-hasPermi="['quality:defectType:export']"
>导出</el-button> >导出</el-button>
</el-col> </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> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -89,13 +100,10 @@
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column> <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 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="defectCode" />
<el-table-column width="150" label="不良类型" align="center" prop="defectType" > <el-table-column width="150" label="不良类型" align="center" prop="defectType" />
<template slot-scope="scope"> <el-table-column width="150" label="不良名称" align="center" prop="checkName" />
<dict-tag :options="dict.type.quc_defect_type" :value="scope.row.defectType"/> <el-table-column width="150" label="不良分类" align="center" prop="defectSubclass" />
</template> <el-table-column width="150" label="不良系数" align="center" prop="ratio" />
</el-table-column>
<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="180" label="备注" align="center" prop="defectRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" /> <el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime"> <el-table-column width="180" label="创建时间" align="center" prop="createTime">
@ -146,10 +154,10 @@
<el-form-item label="不良类型" prop="defectType"> <el-form-item label="不良类型" prop="defectType">
<el-select v-model="form.defectType" placeholder="请选择不良类型" clearable style="width:100%"> <el-select v-model="form.defectType" placeholder="请选择不良类型" clearable style="width:100%">
<el-option <el-option
v-for="dict in dict.type.quc_defect_type" v-for="dict in defectTypes"
:key="dict.value" :key="dict.id"
:label="dict.label" :label="dict.checkName"
:value="dict.value" :value="dict.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -168,17 +176,22 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 不良分类缺陷分配对话框 -->
<CodeContent ref="itemDefectTypeClass"></CodeContent>
</div> </div>
</template> </template>
<script> <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 { export default {
name: "DefectType", name: "DefectType",
components: {CodeContent},
dicts: ['quc_defect_type'], dicts: ['quc_defect_type'],
data() { data() {
return { return {
defectTypes:[],
// //
pickerOptions: { pickerOptions: {
shortcuts: [{ shortcuts: [{
@ -209,8 +222,12 @@ export default {
}, },
// //
loading: true, loading: true,
openCode: false,
selectedDefectId: null, // null
// //
ids: [], ids: [],
//
selectedRows:[],
// //
single: true, single: true,
// //
@ -263,6 +280,9 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
getCheckTypes().then(response => {
this.defectTypes = response;
});
}, },
methods: { methods: {
/** 查询不良类型维护列表 */ /** 查询不良类型维护列表 */
@ -278,6 +298,7 @@ export default {
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); this.reset();
this.openCode = false;
}, },
// //
reset() { reset() {
@ -304,6 +325,14 @@ export default {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); 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() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
@ -314,6 +343,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.selectedRows = selection;
this.ids = selection.map(item => item.defectId) this.ids = selection.map(item => item.defectId)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
@ -326,13 +356,13 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const defectId = row.defectId || this.ids const defectId = row.defectId || this.ids
getDefectType(defectId).then(response => { getDefectType(defectId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改不良类型维护"; this.title = "修改不良类型维护";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
@ -361,24 +391,24 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const defectIds = row.defectId || this.ids; const defectIds = row.defectId || this.ids;
var defectCodes = ''; var defectCodes = '';
// //
for (let i = 0; i < this.defectTypeList.length; i++) { for (let i = 0; i < this.defectTypeList.length; i++) {
for (let j = 0; j < defectIds.length; j++) { for (let j = 0; j < defectIds.length; j++) {
if (defectIds[j] == this.defectTypeList[i].defectId) { if (defectIds[j] == this.defectTypeList[i].defectId) {
defectCodes = defectCodes + this.defectTypeList[i].defectCode + ','; defectCodes = defectCodes + this.defectTypeList[i].defectCode + ',';
} }
} }
} }
if (defectCodes == '') { if (defectCodes == '') {
for (let i = 0; i < this.defectTypeList.length; i++) { for (let i = 0; i < this.defectTypeList.length; i++) {
if (defectIds == this.defectTypeList[i].defectId) { if (defectIds == this.defectTypeList[i].defectId) {
defectCodes = this.defectTypeList[i].defectCode; defectCodes = this.defectTypeList[i].defectCode;
} }
} }
} }
this.$modal.confirm('是否确认删除不良类型维护编号为"' + defectCodes + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除不良类型维护编号为"' + defectCodes + '"的数据项?').then(function() {
return delDefectType(defectIds); return delDefectType(defectIds);
}).then(() => { }).then(() => {

@ -43,7 +43,9 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-form-item> </el-form-item>
</el-row>
</el-form> </el-form>
<div class="top-table"> <div class="top-table">
@ -490,6 +492,12 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 导出按钮操作 */
handleExport() {
this.download('quality/staticTable/exportIncomeDetail', {
...this.queryParams
}, `incomeNoOkList_${new Date().getTime()}.xlsx`)
},
} }
}; };
</script> </script>

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

@ -43,6 +43,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -490,6 +491,12 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 导出按钮操作 */
handleExport() {
this.download('quality/staticTable/exportXJDetail', {
...this.queryParams
}, `XJList_${new Date().getTime()}.xlsx`)
},
} }
}; };
</script> </script>

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

@ -43,6 +43,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -488,6 +489,12 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 导出按钮操作 */
handleExport() {
this.download('quality/staticTable/exportIncomeDetail', {
...this.queryParams
}, `scNoOkList_${new Date().getTime()}.xlsx`)
},
} }
}; };
</script> </script>

@ -310,6 +310,18 @@
<el-input v-model="form.wxId" placeholder="请输入微信号"></el-input> <el-input v-model="form.wxId" placeholder="请输入微信号"></el-input>
</el-form-item> </el-form-item>
</el-col> </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-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -365,7 +377,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "User", name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'], dicts: ['sys_normal_disable', 'sys_user_sex','m_type'],
components: { Treeselect }, components: { Treeselect },
data() { data() {
return { return {

Loading…
Cancel
Save