Merge remote-tracking branch 'origin/master'

yangwl
陈恒杰 2 months ago
commit f76a9a937f

@ -188,6 +188,13 @@ export function getIdCardList(data){
data:data
})
}
export function getIdCardListRefresh(data){
return request({
url:'/plan/pro/workorder/getIdCardListRefresh',
method:'post',
data:data
})
}
export function getBatchCode(workorderId){
return request({

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询检验节点维护列表
export function listCpkUpdown(query) {
return request({
url: '/quality/cpkUpdown/list',
method: 'get',
params: query
});
}
// 查询检验节点维护详细
export function getCpkUpdown(id) {
return request({
url: '/quality/cpkUpdown/' + id,
method: 'get'
});
}
// 新增检验节点维护
export function addCpkUpdown(data) {
return request({
url: '/quality/cpkUpdown',
method: 'post',
data: data
});
}
// 修改检验节点维护
export function updateCpkUpdown(data) {
return request({
url: '/quality/cpkUpdown',
method: 'put',
data: data
});
}
// 删除检验节点维护
export function delCpkUpdown(id) {
return request({
url: '/quality/cpkUpdown/' + id,
method: 'delete'
});
}

@ -167,4 +167,4 @@ export function getIncomeChartList(query) {
method: 'post',
data: query
});
}
}

@ -313,14 +313,14 @@ export default {
setInterval(() => this.getAlarmData(), 1000 * 60);
this.poolNameList = JSON.parse(localStorage.getItem("POOL_NAME_LIST"));
this.poolName = localStorage.getItem("USER_POOL_NAME_CURRENT");
/**
//
this.getUnReadList();
//
this.timer = setInterval(() => {
setTimeout(this.getUnReadList(), 30000);
}, 30000);
**/
},
components: {
Breadcrumb,

@ -390,6 +390,7 @@
>
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="申领人" prop="applyPeople">
<el-input
v-model="form.applyPeople"
@ -408,6 +409,7 @@
>
</ItemSelectPerson>
</el-form-item>
-->
<!-- <el-form-item label="批准人" prop="applyApprovePeople">
<el-input v-model="form.applyApprovePeople" placeholder="请选择批准人" style="width: 280px"/>
</el-form-item> -->
@ -528,9 +530,6 @@ export default {
applyTime: [
{ required: true, message: "领用时间不能为空", trigger: "blur" },
],
applyPeople: [
{ required: true, message: "申领人不能为空", trigger: "blur" },
],
},
};
},

@ -403,6 +403,7 @@
type="primary"
plain
icon="el-icon-edit"
:disabled="single"
size="mini"
@click="handleUpdate"
v-hasPermi="['device:upkeepOrder:edit']"
@ -1581,6 +1582,7 @@ export default {
loading: true,
//
ids: [],
selsectOrderCode: [],
//
orderCodes: [],
//
@ -2173,6 +2175,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.orderId);
this.selsectOrderCode = selection.map((item) => item.orderCode);
this.orderCodes = selection.map((item) => item.orderCode);
console.log('this.ids',this.ids);
console.log('this.orderCodes',this.orderCodes);
@ -2190,7 +2193,7 @@ export default {
this.loading = true;
this.reset();
this.recordList = [];
const orderCode = row.orderCode || this.ids;
const orderCode = row.orderCode || this.selsectOrderCode;
getDeviceOrder(orderCode).then((response) => {
this.form = response.data;
if (response.data.timeArray[0] == null) {

@ -85,13 +85,13 @@
>
<el-table-column prop="factoryCode" label="工厂" width="90"/>
<el-table-column prop="workshopCode" label="车间编码" width="90"/>
<el-table-column prop="workshopName" label="车间名称" width="90"/>
<!--<el-table-column prop="workshopName" label="车间名称" width="90"/>-->
<el-table-column prop="productDate" label="日期" width="100"/>
<el-table-column prop="sapCode" label="产线编码" width="90"/>
<el-table-column prop="sapName" label="产线名称" width="160"/>
<!--<el-table-column prop="sapName" label="产线名称" width="160"/>-->
<el-table-column prop="equipmentName" label="组别" width="90"/>
<el-table-column prop="prodType" label="品类" width="80"/>
<el-table-column prop="teamLeaderName" label="组长" width="100"/>
<el-table-column prop="teamLeaderName" label="组长" width="100" :formatter="teamLeaderFormate"/>
<el-table-column prop="workorderCode" label="工单号" width="150"/>
<el-table-column prop="productCode" label="产品编码" width="120" :formatter="productCodeFormate"/>
<el-table-column prop="productName" label="产品名称" width="200"/>
@ -251,6 +251,11 @@ export default {
return cellValue.slice(7,18); //
}
},
teamLeaderFormate(row, column, cellValue){
if(cellValue != null){
return cellValue.split("-")[0]; //
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

@ -27,8 +27,7 @@
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
type="number"
placeholder="请输入标准用人"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
@ -36,8 +35,7 @@
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
type="number"
placeholder="请输入标准效率"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>

@ -226,62 +226,56 @@
<el-dialog
title="备料信息"
:visible.sync="printDialogVisible"
:width="shengchan?'731px':'721px'"
:width="shengchan?'861px':'871px'"
>
<div id="printFrom" class="my-print-box">
<el-form :model="form">
<!-- 表头-工单信息 -->
<!-- 导航栏 -->
<el-row class="my-print-nav">
<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>
<div class="my-print-head">
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
</div>
</el-row>
<!-- 导航栏 -->
<el-row class="my-print-nav">
<el-col :span="6">工厂:{{printData.factory}}</el-col>
<el-col :span="6">工作中心:{{printData.workCenter}}</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 class="my-print-nav">
<el-col :span="6">生产日期:{{printData.productDate}}</el-col>
<el-col :span="6">打印日期:{{printData.printDate}}</el-col>
<el-col :span="6">页次: 1/ 1</el-col>
</el-row>
<!-- 主数据 -->
<div v-for="(item,index) in printData.workTable" :key="index">
<!-- 表头-工单信息 -->
<el-row>
<div class="my-print-head">
<el-col>生产订单备料单({{printData.printTitle}})</el-col>
</div>
</el-row>
<!-- 导航栏 -->
<el-row class="my-print-nav">
<el-col :span="6">工厂:{{printData.factory}}</el-col>
<el-col :span="6">工作中心:{{printData.workCenter}}</el-col>
<el-col :span="4" v-if="printData.prodLineCode!=null">线:{{printData.prodLineCode}}</el-col>
</el-row>
<el-row class="my-print-nav">
<el-col :span="6">生产日期:{{printData.productDate}}</el-col>
<el-col :span="6">打印日期:{{printData.printDate}}</el-col>
<el-col :span="6">条数: {{printData.pageNo}}</el-col>
</el-row>
<el-table
v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table" :data="item"
border style="width: 100%;">
<el-table-column label="序号" width="40">
<template slot-scope="scope">
<!-- scope.$index 是当前行的索引 0 开始 1 后乘以 2 -->
{{ (scope.$index + 1) + (index==0?fenyeNumber* index:fenyeNumberTwo* index-2) }}
</template>
</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="shengchan?200:240"></el-table-column>
<el-table-column prop="unit" width="60" label="单位"></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="80"></el-table-column>
border style="width: 100%;padding-bottom: 1px;">
<el-table-column label="序号" prop="xh" width="55"></el-table-column>
<el-table-column prop="materialCode" label="料号" :width="shengchan?90:120" :formatter="productCodeFormate"></el-table-column>
<el-table-column prop="materialName" label="物料描述" :width="shengchan?245:290"></el-table-column>
<el-table-column prop="unit" width="55" label="单位"></el-table-column>
<el-table-column v-if="showWorkorderCode" prop="workorderCode" :width="shengchan?105:100" label="生产订单" :formatter="orderCodeFormate"></el-table-column>
<el-table-column prop="quantity" label="请领数量" width="100"></el-table-column>
<el-table-column prop="routeCode" width="60" label="实发数量"></el-table-column>
<el-table-column prop="routeCode" width="75" label="实发数量2"></el-table-column>
<el-table-column prop="routeCode" width="75" label="实发"></el-table-column>
<el-table-column prop="routeCode" width="75" label="数量2"></el-table-column>
</el-table>
<div class="fy" v-if="index!=printData.workTable.length-1"></div>
</div>
<!-- 底部 -->
<el-row class="my-print-foot">
<!-- 底部 -->
<el-row class="my-print-foot0">
<el-col :offset="1" :span="3">发料人:</el-col>
<el-col :offset="2" :span="3">收料人:</el-col>
<el-col :offset="2" :span="3">白色:车间联</el-col>
@ -290,8 +284,10 @@
</el-row>
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">SAP-No:{{printData.SAPNo}}</el-col>
<el-col :offset="1" :span="3">Z-PM-F-030-A.2</el-col>
<el-col :offset="1" :span="6">Z-PM-F-030-A.2</el-col>
</el-row>
<div class="fy" v-if="index!=printData.workTable.length-1"></div>
</div>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
@ -313,8 +309,8 @@ export default {
// components: {Detail},
data() {
return {
fenyeNumber:4,
fenyeNumberTwo:6,
fenyeNumber:5,
fenyeNumberTwo:7,
shengchan:true,
newWorkerLoading: false,
refreshNewWorkerTable:true,
@ -324,6 +320,7 @@ export default {
//
printData: {
printable: 'printFrom',
pageNo:1,
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
@ -430,17 +427,11 @@ export default {
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || 'html',
dpi: 300, //
dpi: 360, //
//font_size: "",//
header: params.header, // '',
targetStyles: ['*'],
style: `
body {margin: 3mm;padding: 0;}
.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;}
`,
////style:'body {margin: 2mm;padding: 0;}.fy{page-break-after: always;} table { width:100%;height:800px;border-collapse: collapse;} table, th, td { border: 2px solid black; white-space: pre-wrap; word-break: break-all;} .el-table .cell{padding-left:1px;padding-right:1px;border: 2px solid black;}',
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
@ -450,6 +441,7 @@ export default {
this.shengchan = true;
//
this.printData.workCenter = "暂无数据";
this.printData.pageNo =0 ;
this.printData.printDate = null;
this.printData.workTable = [];
this.printData.factory = null;
@ -466,16 +458,17 @@ export default {
this.printData.productDate = response.data.mesPrepareDetailList[0].productDate
this.printData.printDate = moment(new Date()).format('YYYY-MM-DD')
this.printData.workTable = response.data.mesPrepareDetailList;
this.printData.pageNo = response.data.mesPrepareDetailList.length;
let chunkedArray = [];
// this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) {
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray
chunkedArray.push(chunk);
}
this.printData.workTable = chunkedArray;
//this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) {
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray
chunkedArray.push(chunk);
}
this.printData.workTable = chunkedArray;
this.printData.prodLineCode = response.data.mesPrepare.prodLineCode
this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
@ -509,14 +502,17 @@ export default {
this.printData.productDate = moment(this.queryParams.productDate).format('YYYY-MM-DD')
this.printData.printDate = moment(new Date()).format('YYYY-MM-DD')
this.printData.workTable = response.data.mesPrepareDetailList
this.printData.pageNo = response.data.mesPrepareDetailList.length;
let chunkedArray = [];
// this.printData.workTable
// this.printData.workTable
for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) {
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray
chunkedArray.push(chunk);
// 使slicei1010
let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo));
// chunkedArray
chunkedArray.push(chunk);
}
this.printData.workTable = chunkedArray;
this.refreshNewWorkerTable = true // refreshProTabletrue
@ -672,12 +668,8 @@ export default {
border: 1px solid black !important;
}
.my-print-head {
margin-top: 2px;
margin-top: 5px;
font-weight: bold;
text-align: center;
}
@ -694,18 +686,17 @@ export default {
}
.my-print-foot {
margin-top: 20px;
margin-top: 10px;
}
@media print {
body {
font-family: 'Arial', sans-serif; /* 设置字体为'Arial'或其他清晰的无衬线字体 */
font-size: 14px; /* 设置字体大小 */
}
.my-print-table .el-table {
border-collapse: collapse; /* 合并表格边框 */
.my-print-foot0 {
margin-top: -1px;
padding-top:2px;
border-top: 1px solid black;
width: 94%;
}
@media print {
}
.fy{
page-break-after: always;

@ -3,6 +3,7 @@
<el-dialog title="" :visible.sync="printDialogVisible" width="1000px">
<div>
<el-form inline label-width="80px">
<el-form-item label="补打板次" prop="factory">
<el-input v-model="idCardsNum" placeholder="请输入" style="width:100px"/>
</el-form-item>
@ -31,6 +32,7 @@
<el-input v-model="batchQuantity" placeholder="请输入" style="width:100px"/>
</el-form-item>
<el-button type="primary" icon="el-icon-check" circle @click="showAddPrint()"/>
<el-button type="danger" icon="el-icon-refresh" round @click="refreshCards()"></el-button>
</el-form>
</div>
@ -85,6 +87,7 @@
import {
getIdCardList,
getBatchCode,
getIdCardListRefresh
} from '@/api/plan/workorder';
import QRCode from 'qrcode';
@ -198,6 +201,20 @@ export default {
})
},
async refreshCards(){
let response = await getIdCardListRefresh({workorderCode:this.workorderCode});
this.printData.idCardList = response;
this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => {
const canvas = document.getElementById('qrcode-' + index);
QRCode.toCanvas(canvas, item.palletCode, { width: 300 , margin:1 }, function (error) {
if (error) console.error(error);
console.log('success!');
});
});
})
},
// -
async showAddPrint() {
console.log('执行了新增打印预览');

@ -0,0 +1,442 @@
<template>
<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-option
v-for="dict in dict.type.check_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验节点" prop="checkType">
<el-select
v-model="queryParams.checkType"
clearable
placeholder="检验节点"
>
<el-option
v-for="dict in checkTypeList"
:key="dict.checkType"
:label="dict.checkName"
:value="dict.checkType"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="物料号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物料号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测项" prop="ruleName">
<el-input
v-model="queryParams.ruleName"
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="['quality:cpkUpDowConfig: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="['quality:cpkUpDowConfig: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="['quality:cpkUpDowConfig:remove']"
>删除
</el-button>
</el-col>
<!--
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
v-hasPermi="['mes:mesLine:export']"
>导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"></el-button>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="updownList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="物料号" width="150" align="center" prop="materialCode" :formatter="productCodeFormate"/>
<el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="检验类型" width="140" align="center" prop="typeCode">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_type" :value="scope.row.typeCode"/>
</template>
</el-table-column>
<el-table-column label="检验节点" width="140" align="center" prop="checkType"/>
<el-table-column label="检测项编码" width="140" align="center" prop="ruleCode"/>
<el-table-column label="检测项名称" width="140" align="center" prop="ruleName"/>
<el-table-column label="上限" width="120" align="center" prop="upVal"/>
<el-table-column label="下限" width="120" align="center" prop="downVal"/>
<el-table-column label="创建时间" width="150" align="center" prop="createTime"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改物料CPK上下限维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="检验类型" prop="typeCode">
<el-select
v-model="form.typeCode"
clearable
style="width:100%"
placeholder="请选择检验类型"
@change="getCheckTypeList"
>
<el-option
v-for="dict in dict.type.check_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验类型" prop="checkType">
<el-select
v-model="form.checkType"
clearable
style="width:100%"
placeholder="检验节点"
@change="getProjectListFunc"
>
<el-option
v-for="dict in checkTypeList"
:key="dict.checkType"
:label="dict.checkName"
:value="dict.checkType"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号">
<el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选择检测项" prop="ruleCode">
<el-select
v-model="form.ruleCode"
clearable
style="width:100%"
placeholder="检验节点"
filterable
@change="getProjectNameFunc"
>
<el-option
v-for="item in projectNoOptions"
:key="item.recordId"
:label="item.ruleName"
:value="item.recordId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检测项名称" prop="ruleName" >
<el-input v-model="form.ruleName" placeholder="请输入物料名称" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上限" prop="upVal">
<el-input v-model="form.upVal" type="number" placeholder="请输入上限" min="0"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="下限" prop="downVal">
<el-input v-model="form.downVal" type="number" placeholder="请输入下限" min="0"/>
</el-form-item>
</el-col>
</el-row>
</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>
<ItemSelectMaterial
ref="itemSelectMaterial"
@onSelected="onSelectMaterial"
></ItemSelectMaterial>
</div>
</template>
<script>
import {listCpkUpdown,getCpkUpdown, delCpkUpdown,addCpkUpdown,updateCpkUpdown } from "@/api/quality/cpkUpdown";
import ItemSelectMaterial from "@/views/quality/cpkUpDowConfig/selectMaterial";
import {getCheckTypeList,getProjectOptionList} from "@/api/quality/qcTable";
export default {
name: "Updown",
dicts: ["check_type"],
components: {ItemSelectMaterial},
data() {
return {
//
loading: true,
//
ids: [],
checkTypeList: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// CPK
updownList: [],
projectNoOptions: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
typeCode: null,
checkType: null,
factoryCode: null,
materialCode: null,
materialName: null,
upVal: null,
downVal: null
},
//
form: {downVal:0,upVal:0},
//
rules: {
typeCode: [{ required: true, message: "检验类型", trigger: "blur" }],
checkType: [{ required: true, message: "检验节点", trigger: "blur" }],
materialCode: [{ required: true, message: "物料名称", trigger: "blur" }],
ruleName: [{ required: true, message: "检测项名称", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询物料CPK上下限维护列表 */
getList() {
this.loading = true;
listCpkUpdown(this.queryParams).then(response => {
this.updownList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
typeCode: null,
checkType: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: null,
materialCode: null,
materialName: null,
upVal: null,
downVal: 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 = "添加物料CPK上下限维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id =
row.id || this.ids
getCpkUpdown(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改物料CPK上下限维护";
this.getCheckTypeList(this.form.typeCode);
this.getProjectListFunc(this.form.checkType)
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCpkUpdown(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCpkUpdown(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除数据项?').then(function() {
return delCpkUpdown(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/cpkUpdown/export', {
...this.queryParams
}, `cpkUpDow_${new Date().getTime()}.xlsx`)
},
getCheckTypeList(val) {
getCheckTypeList(val).then((response) => {
this.checkTypeList = response;
});
},
//
productCodeFormate(row, column, cellValue) {
if (cellValue != null) {
return cellValue.slice(7, 18); //
}
},
//
handleSelectProduct() {
this.$refs.itemSelectMaterial.showFlag = true;
},
//
onSelectMaterial(obj) {
this.form.materialName = obj[0].productName;
this.form.materialCode = obj[0].productCode;
},
//
getProjectListFunc(val) {
getProjectOptionList(val).then((response) => {
this.projectNoOptions = response;
});
},
getProjectNameFunc(value){
const selectedOption = this.projectNoOptions.find(option => option.recordId === value);
if (selectedOption) {
this.form.ruleName = selectedOption.ruleName;
}
}
}
};
</script>

@ -0,0 +1,153 @@
<template>
<el-dialog title="BOM物料选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<!--BOM数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="物料编码" prop="itemCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入物料编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="itemName">
<el-input
v-model="queryParams.productName"
placeholder="请输入物料名称"
clearable
style="width: 240px"
@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-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" label="序号"></el-table-column>
<el-table-column label="BOM物料组件编码" align="left" key="productCode" prop="productCode" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="BOM物料组件名称" align="left" key="productName" prop="productName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {getProductListBom } from "@/api/mes/mesLine";
export default {
name: "itemSelectMaterial",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: false,
//
showSearch: true,
selectedList: [],
//
total: 0,
// BOM
itemList: [],
productList:[],
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
productCode: '',
productName: ''
},
//
columns: [
{ key: 0, label: `BOM物料编码`, visible: true },
{ key: 1, label: `产品名称`, visible: true },
{ key: 2, label: `BOM物料组件编码`, visible: true },
{ key: 3, label: `BOM物料组件名称`, visible: true }
]
};
},
created() {
this.getList();
},
methods: {
handleEquipmentSelectionChange (val) {
this.itemList = val
},
/** 查询BOM列表*/
getList() {
this.loading = true;
getProductListBom(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
if(selection.length==1){
this.productList = selection;
}else{
this.$modal.msgSuccess("请选择一个产品");
}
},
submitBomForm() {
this.$emit('onSelected', this.productList);
this.showFlag = false;
}
}
};
</script>

@ -656,7 +656,13 @@
<el-row>
<el-col :span="20">
<el-form-item label="综合结论:" label-width="160px">
<el-input type="textarea" disabled/>
<el-col :span="6">
<span v-if="this.checkResult=='Y'"></span>
<span label="N" v-else>×</span>
</el-col>
<el-col :span="8">
备注:判定合格打不合格打×
</el-col>
</el-form-item>
</el-col>
</el-row>
@ -664,12 +670,17 @@
<el-col :span="20">
<el-form-item label="车间组长/机管员签名" label-width="160px">
<template >
<el-image
:src="form.jgy"
style="width: 260px; height: 100px"
:preview-src-list="form.jgy"
fit="fill" />
</template>
<el-image
:src="form.cxzz"
style="width: 260px; height: 100px"
:preview-src-list="form.cxzz"
fit="fill" />
<el-image
:src="form.jgy"
style="width: 260px; height: 100px"
:preview-src-list="form.jgy"
fit="fill" />
</template>
</el-form-item>
</el-col>
</el-row>
@ -680,7 +691,7 @@
<el-image
:src="form.pgy"
style="width: 260px; height: 100px"
:preview-src-list="form.jgy"
:preview-src-list="form.pgy"
fit="fill" />
</template>
</el-form-item>
@ -734,6 +745,7 @@ export default {
validateRules: [],
checkList: [],
standardNo: null,
checkResult: 'Y',
printData: {
printable: 'printForm',
ignore: ['no-print'],
@ -912,7 +924,7 @@ export default {
delFlag: null,
jgy: null,
pgy: null,
cxzz: null
};
this.spanArr = [];
this.position = 0;
@ -955,6 +967,7 @@ export default {
this.form.ignore = ['no-print'];//
this.firstReportOpen = true;
this.title = "首检检验报告";
this.checkResult = response.data.checkResult;
})
this.queryParams.recordId = recordId;
this.getCheckedProjectList();

@ -544,7 +544,7 @@ export default {
this.checkProjectList0 = itemType0s;
this.total = response.total;
this.loading = false;
this.form.standardNo = this.checkProjectList[0].standardNo;
//this.form.standardNo = this.checkProjectList[0].standardNo;
this.rowspan()
});

@ -9,10 +9,19 @@
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="单号">
<el-form-item label="物料名称">
<el-input
v-model="queryParams.orderNo"
placeholder="单号"
v-model="queryParams.materialName"
placeholder="物料名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编码">
<el-input
v-model="queryParams.materialCode"
placeholder="物料编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
@ -27,8 +36,8 @@
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="单号" align="left" prop="orderNo" width="120"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="物料编码" align="left" prop="materialCode" width="180" />
<el-table-column label="物料名称" align="left" prop="materialName" width="180"/>
<el-table-column label="数量" align="left" prop="quality" width="100" />
<el-table-column label="仓库编码" align="left" prop="supplierCode"/>
<el-table-column label="仓库编名称" align="left" prop="supplierName" width="120"/>

@ -223,7 +223,9 @@
:visible.sync="open"
width="1300px"
append-to-body
>
>
<el-button type="primary" round v-if="title == 'CPK分析'" @click="handleExportCPK">CPK</el-button>
<div
class="echartbox"
id="echart1"
@ -617,6 +619,16 @@ export default {
`DLTable_${new Date().getTime()}.xlsx`
);
},
/**导出CPK**/
handleExportCPK() {
this.download(
"quality/staticTable/exportCPK",
{
...this.queryParams,
},
`CPK_${new Date().getTime()}.xlsx`
);
},
//
handleAnalysis1() {
this.title = "柱状图表分析";

@ -596,7 +596,7 @@ export default {
/** SAP同步按钮操作 */
handleSyncSAP() {
this.$modal.confirm('是否确认SAP同步操作步骤').then(function() {
return syncSAP()
syncSAP();
}).then(() => {
this.getList()
this.$modal.msgSuccess('同步成功')

Loading…
Cancel
Save