Merge remote-tracking branch 'origin/master'

yangwl
mengjiao 1 year ago
commit 5e4760e8be

@ -1,93 +0,0 @@
import request from '@/utils/request'
// 查询来料报告列表
export function listIncome(query) {
return request({
url: '/quality/qcFirstReport/list',
method: 'get',
params: query
});
}
// 查询来料报告详细
export function getIncome(recordId) {
return request({
url: '/quality/qcFirstReport/' + recordId,
method: 'get'
});
}
// 新增来料报告
export function addIncome(data) {
return request({
url: '/quality/qcFirstReport',
method: 'post',
data: data
});
}
// 修改来料报告
export function updateIncome(data) {
return request({
url: '/quality/qcFirstReport',
method: 'put',
data: data
});
}
// 删除来料报告
export function delIncome(recordId) {
return request({
url: '/quality/qcFirstReport/' + recordId,
method: 'delete'
});
}
// 查询BOM物料管理列表
export function getQcListBom(query) {
return request({
url: '/quality/qcFirstReport/getQcListBom',
method: 'get',
params: query
});
}
// 查询供应商管理列表
export function getQcListSupplier(query) {
return request({
url: '/quality/qcFirstReport/getQcListSupplier',
method: 'get',
params: query
});
}
// 查询人员列表
export function getQcListUser(query) {
return request({
url: '/quality/qcFirstReport/getQcListUser',
method: 'get',
params: query
});
}
//状态修改
export function changeIncomeStatus(recordId, status) {
const data = {
recordId,
status
}
return request({
url: '/quality/qcFirstReport/changeIncomeStatus',
method: 'put',
data: data
})
}
// 查询检测项列表
export function getCkeckProjectList(query) {
return request({
url: '/quality/qcFirstReport/getCkeckProjectList',
method: 'get',
params: query
});
}

@ -43,3 +43,13 @@ export function delProduce(recordId) {
}); });
} }
export function getProduceReportXJ(orderNo) {
const data = {
orderNo
}
return request({
url: '/quality/qcProduceReport/getProduceReportXJ',
method: 'post',
data: data
});
}

@ -42,3 +42,11 @@ export function delQcSampleRule(id) {
method: 'delete' method: 'delete'
}); });
} }
// 根据大节点获取检验节点类型
export function getCheckType(typeCode) {
return request({
url: '/quality/qcSampleRule/getCheckType/' + typeCode,
method: 'get',
})
}

@ -49,3 +49,25 @@ export function getXJChartData(query) {
params: query params: query
}); });
} }
export function getQmsRateTable(query) {
return request({
url: '/quality/staticTable/getQmsRateTable',
method: 'get',
params: query
});
}
export function getCheckTypeList(typeCode) {
return request({
url: '/quality/staticTable/getCheckTypeList/' + typeCode,
method: 'get'
});
}
export function getSupplierList(typeCode) {
return request({
url: '/quality/staticTable/getSupplierList/' + typeCode,
method: 'get'
});
}

@ -44,7 +44,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态" prop="orderStatus"> <el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable> <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
<el-option <el-option
v-for="dict in dict.type.device_order_status" v-for="dict in dict.type.device_order_status"
:key="dict.value" :key="dict.value"

@ -228,6 +228,8 @@
<el-table-column width="100" label="实际运行时间" align="center" prop="actualOperationTime" /> <el-table-column width="100" label="实际运行时间" align="center" prop="actualOperationTime" />
<el-table-column width="100" label="运行时间" align="center" prop="operationTime" /> <el-table-column width="100" label="运行时间" align="center" prop="operationTime" />
<el-table-column width="100" label="故障率" align="center" prop="failureRate" /> <el-table-column width="100" label="故障率" align="center" prop="failureRate" />
<el-table-column width="100" label="故障次数" align="center" prop="failureTimes" />
<el-table-column width="100" label="停机次数" align="center" prop="shutdownTimes" />
<el-table-column width="200" label="故障描述" align="center" prop="failureDescription" /> <el-table-column width="200" label="故障描述" align="center" prop="failureDescription" />
<el-table-column width="200" label="原因分析" align="center" prop="reasonAnalyze" /> <el-table-column width="200" label="原因分析" align="center" prop="reasonAnalyze" />
<el-table-column width="200" label="设备状态描述" align="center" prop="equStatusDes" /> <el-table-column width="200" label="设备状态描述" align="center" prop="equStatusDes" />

@ -139,17 +139,17 @@
<el-table-column label="备品备件号" align="center" prop="materialCode" width="120"/> <el-table-column label="备品备件号" align="center" prop="materialCode" width="120"/>
<el-table-column label="备品备件名称" align="center" prop="materialDesc" width="120"/> <el-table-column label="备品备件名称" align="center" prop="materialDesc" width="120"/>
<el-table-column label="规格型号" align="center" prop="spareMode" width="200"/> <el-table-column label="规格型号" align="center" prop="spareMode" width="200"/>
<el-table-column label="单机装配数量" align="center" prop="unitQuantity" width="50"/> <el-table-column label="单机装配数量" align="center" prop="unitQuantity" width="100"/>
<el-table-column label="单价" align="center" prop="unitPrice" width="50"/> <el-table-column label="单价" align="center" prop="unitPrice" width="50"/>
<el-table-column label="单位" align="center" prop="userDefined1" width="50"/> <el-table-column label="单位" align="center" prop="userDefined1" width="50"/>
<el-table-column label="代用件" align="center" prop="substituteParts" width="50"/> <el-table-column label="代用件" align="center" prop="substituteParts" width="80"/>
<el-table-column label="安全库存" align="center" prop="safeStock" width="50"/> <el-table-column label="安全库存" align="center" prop="safeStock" width="80"/>
<el-table-column label="现有库存" align="center" prop="amount" width="50"/> <el-table-column label="现有库存" align="center" prop="amount" width="80"/>
<el-table-column label="采购方式" align="center" prop="procurementMethod" width="150"/> <el-table-column label="采购方式" align="center" prop="procurementMethod" width="150"/>
<!-- 生产厂商暂时没有用 --> <!-- 生产厂商暂时没有用 -->
<!-- <el-table-column label="生产厂商" align="center" prop="spareManufacturer" width="200"/> --> <!-- <el-table-column label="生产厂商" align="center" prop="spareManufacturer" width="200"/> -->
<el-table-column label="更换周期(月)" align="center" prop="spareReplacementCycle"/> <el-table-column label="更换周期(月)" align="center" prop="spareReplacementCycle"width="120"/>
<el-table-column label="采购周期(天)" align="center" prop="procurementCycle"/> <el-table-column label="采购周期(天)" align="center" prop="procurementCycle"width="120"/>
<el-table-column label="期初结存" align="center" prop="openingBalance"/> <el-table-column label="期初结存" align="center" prop="openingBalance"/>
<el-table-column label="入库记录" align="center" prop="inputRecords"/> <el-table-column label="入库记录" align="center" prop="inputRecords"/>
<el-table-column label="出库记录" align="center" prop="outputRecords"/> <el-table-column label="出库记录" align="center" prop="outputRecords"/>

@ -44,7 +44,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态" prop="orderStatus"> <el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable> <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
<el-option <el-option
v-for="dict in dict.type.device_order_status" v-for="dict in dict.type.device_order_status"
:key="dict.value" :key="dict.value"
@ -318,6 +318,8 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="主键" align="center" prop="orderId" /> <el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId" /> <el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="150" label="计划编码" align="center" prop="planCode" /> <el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column width="150" label="计划名称" align="center" prop="planName" /> <el-table-column width="150" label="计划名称" align="center" prop="planName" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" /> <el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
@ -359,8 +361,6 @@
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" > <el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/> <dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>

@ -43,8 +43,8 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态" prop="planStatus"> <el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable> <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
<el-option <el-option
v-for="dict in dict.type.device_order_status" v-for="dict in dict.type.device_order_status"
:key="dict.value" :key="dict.value"

@ -1,10 +1,11 @@
<template> <template>
<div class="bottom-right-table-1"> <div class="bottom-right-table-1">
<dv-border-box-6> <dv-border-box-13 :key="borderBoxKey">
<div class="table-name"> <div class="table-name">
<dv-scroll-board :config="getScrollBoardConfig()" /> <dv-scroll-board :config="getScrollBoardConfig()" />
<!-- <dv-scroll-board :config="getScrollBoardConfig()" />-->
</div> </div>
</dv-border-box-6> </dv-border-box-13>
</div> </div>
</template> </template>
@ -19,6 +20,7 @@ export default {
}, },
data () { data () {
return { return {
borderBoxKey: 1, // key
config:{ config:{
header: ['工单号', '产线名称', '产品名称', '生产数量', '单位'], header: ['工单号', '产线名称', '产品名称', '生产数量', '单位'],
data: [ data: [
@ -37,6 +39,7 @@ export default {
tableData(newVal) { tableData(newVal) {
console.log("newVal-",newVal) console.log("newVal-",newVal)
this.config.data = this.formatTableData(newVal); this.config.data = this.formatTableData(newVal);
this.borderBoxKey += 1;
} }
}, },
methods: { methods: {
@ -100,5 +103,6 @@ export default {
.dv-scroll-board { .dv-scroll-board {
height: calc(~"100% - 0px"); height: calc(~"100% - 0px");
} }
} }
</style> </style>

@ -87,15 +87,15 @@ export default {
<style scoped> <style scoped>
.top-middle-cmp { .top-middle-cmp {
position: relative; position: relative;
padding: 0 50px; padding: 0 0px;
box-sizing: border-box; box-sizing: border-box;
.chart-name { /*.chart-name {*/
position: absolute; /* position: absolute;*/
right: 70px; /* right: 70px;*/
text-align: right; /* text-align: right;*/
font-size: 20px; /* font-size: 20px;*/
top: 10px; /* top: 10px;*/
} /*}*/
} }
</style> </style>

@ -1,32 +1,47 @@
<template> <template>
<div id="data-view"> <v-scale-screen width="1920" height="1080" :fullScreen="true">
<dv-full-screen-container> <div class="app-container home" style="">
<div class="main-header"> <div class="head">
<div class="mh-left"> <div class="head-content">
<div class="title">成品包装线生产看板</div>
</div>
<div class="head-logo">
<img src="../../../assets/images/logo.png" alt="" /> <img src="../../../assets/images/logo.png" alt="" />
</div> </div>
<div class="mh-middle">成品包装线生产看板</div> <div class="back">
<div class="mh-right">{{currentDateTime}} <el-button
@click="back()"
type="primary"
icon="el-icon-s-home"
></el-button>
</div> </div>
</div> </div>
<div class="content-top">
<dv-border-box-1 class="main-container"> <div class="timebox">
<div class="time">
{{ currentDateTime }}
</div>
</div>
</div>
<div class="content">
<div class="mc-top"> <div class="mc-top">
<Top-Left-Cmp :data="valueForTopLeftCmp"/> <div class="mc-left">
<Top-Middle-Cmp :data="valueForTopMiddleCmp" /> <Top-Left-Cmp :data="valueForTopLeftCmp"/>
<Top-right-Cmp /> </div>
<div class="mc-middle">
</div>
<div class="mc-right">
<Top-Middle-Cmp :data="valueForTopMiddleCmp" style="height: 100%;"/>
</div>
</div> </div>
<div class="mc-bottom"> <div class="mc-bottom">
<BottomRightTable1 :tableData="BottomRightTableValue"/> <BottomRightTable1 :tableData="BottomRightTableValue" style="height: 600px; margin-top: 50px"/>
<!-- 设置 .mc-bottom 的高度你可以根据实际情况调整 -->
</div> </div>
</div>
<!-- <div class="mc-bottom">--> </div>
<!-- <BottomRightTable1 v-for="index in 4" :key="index+4" :tableIndex="index" :tableData="BottomRightTable2Value"/>--> </v-scale-screen>
<!-- </div>-->
</dv-border-box-1>
</dv-full-screen-container>
</div>
</template> </template>
<script> <script>
@ -104,100 +119,92 @@ export default {
} }
</script> </script>
<style lang="less"> <style lang="scss" scoped>
#data-view {
.app-container {
padding: 0px 24px;
color: #fff;
}
.home {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #030409; background: url("../../../assets/images/bg-finishproduct.png") no-repeat;
color: #fff; background-size: 100% 100%;
background-color: #050711;
#dv-full-screen-container { .head {
background-image: url("../../../assets/images/bg-finishproduct.png"); width: 100%;
background-size: 100% 100%; height: 74px;
box-shadow: 0 0 3px blue; position: relative;
display: flex; .head-content {
flex-direction: column; height: 74px;
} background-image: url("../../../assets/images/bg-head.png");
background-repeat: no-repeat;
.main-header { background-size: 100% 100%;
height: 80px; text-align: center;
display: flex; .title {
justify-content: space-between; font-size: 42px;
align-items: flex-end; font-weight: 400;
color: #ffffff;
.mh-left { }
margin-top: 10px;
} }
.head-logo {
.mh-middle { position: absolute;
font-size: 30px; left: 0px;
top: 1px;
img {
height: 38px;
// width: ;
}
} }
.back {
.mh-left, .mh-right { position: absolute;
width: 200px; right: 0px;
top: 5px;
} }
} }
.content-top {
.main-container { display: flex;
height: calc(~"100% - 80px"); justify-content: space-between;
margin-left:0px; position: relative;
.mc-top, .mc-bottom ,mc-bottom-1 { .timebox {
box-sizing: border-box; width: 480px;
padding: 30px; height: 100px;
display: flex;
background-size: 100% 100%;
text-align: center;
position: absolute;
top: -17px;
right: 0px;
.time {
font-size: 30px;
font-weight: 400;
color: #ffffff;
line-height: 71px;
}
} }
}
.content {
margin-top: 63px;
display: block;
justify-content: space-between;
.mc-top { .mc-top {
height: 40%;
}
.mc-bottom-1, .mc-bottom-2 {
height: 100%; height: 100%;
} width: 100%;
display: flex;
.top-left-cmp, .bottom-left-container { .mc-left {
width: 32%; flex: 2; //
}
.top-middle-cmp, .top-right-cmp {
width: 34%;
}
.bottom-left-container {
position: relative;
.border-box-content {
display: flex;
}
.mcb-decoration-1, .mcb-decoration-2 {
position: absolute;
left: 50%;
margin-left: -2px;
}
.mcb-decoration-1 {
top: 5%;
transform: rotate(180deg);
} }
.mcb-decoration-2 { .mc-middle {
top: 50%; flex: 1; //
} }
.mc-right {
.bottom-left-chart-1, .bottom-left-chart-2 { flex: 2; //
width: 50%;
height: 100%;
} }
} }
.bottom-right-container {
width: 68%;
padding-left: 30px;
box-sizing: border-box;
display: flex;
}
} }
} }
</style> </style>

@ -106,9 +106,9 @@
<el-table-column label="物料描述" align="center" prop="productName" /> <el-table-column label="物料描述" align="center" prop="productName" />
<el-table-column label="产线编码" align="center" prop="lineCode" /> <el-table-column label="产线编码" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" prop="lineName" /> <el-table-column label="产线名称" align="center" prop="lineName" />
<el-table-column label="子工序编码" align="center" prop="childprocessCode" /> <el-table-column label="子工序编码" align="center" prop="childprocessCode" />
<el-table-column label="子工序名称" align="center" prop="childprocessName" /> <el-table-column label="子工序名称" align="center" prop="childprocessName" />
<el-table-column label="工序单价(元/pc" align="center" prop="attr1" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -256,7 +256,7 @@
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip"> <div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip"> <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据 <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据
</div> </div>
<span>仅允许导入xlsxlsx格式文件</span> <span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link> <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate"></el-link>
@ -340,7 +340,7 @@ export default {
// //
headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()}, headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()},
// //
url: process.env.VUE_APP_BASE_API + "/mes/unitprice/importData" url: process.env.VUE_APP_BASE_API + "/mes/unitPrice/importData"
}, },
// //
queryParams: { queryParams: {
@ -543,7 +543,7 @@ export default {
/** 导入按钮操作 */ /** 导入按钮操作 */
handleImport() { handleImport() {
this.upload.title = "子工序导入"; this.upload.title = "导入";
this.upload.open = true; this.upload.open = true;
}, },

@ -1,516 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="任务编号" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
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="checkResult">
<el-select
v-model="queryParams.checkResult"
placeholder="检验结果"
clearable
>
<el-option
v-for="dict in dict.type.check_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
placeholder="请输入检测地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker
v-model="queryParams.checkTimeArray"
format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</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:qcIncome:add']"
>新增</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['quality:incomeReport:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult">
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.checkResult"/>
</template>
</el-table-column>
<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="handleLook(scope.row)"
v-hasPermi="['quality:incomeReport:edit']"
>查看</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="1200px" append-to-body>
<el-row>
<el-col :span="20">
<el-button
class="print-btn"
size="mini"
type="primary"
icon="el-icon-edit"
@click="handlePrint(form)"
>打印</el-button>
</el-col>
</el-row>
<!-- 打印整个printFrom区域 -->
<div id="printFrom">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :offset="8" :span="8">
<h1 style="align-content: center;">中山榄菊日化实业有限公司</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="8" :span="8">
<h3 style="align-content: center;">黑蚊香首检确认表</h3>
</el-col>
</el-row>
<el-row>
<el-col :offset="16" :span="8">
<el-form-item label="检验标准" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="产品名称" prop="materialName">
<el-input v-model="form.materialName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品编码" prop="materialCode">
<el-input v-model="form.materialCode" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="首检日期" prop="checkTime">
<el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="首检原因" >
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="100"/>
<el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="内容" align="center" prop="checkStandard" width="200"/>
<el-table-column label="实际检验结果" align="center" prop="propertyCode" width="200">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="判定" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="20">
<el-form-item label="备注:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="综合结论:" label-width="160px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="车间组长/机管员签名" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="质量管理部品管员签名" prop="checkManName" label-width="160px">
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listIncome, getIncome, delIncome, addIncome, updateIncome,getCkeckProjectList} from "@/api/quality/firstReport";
import { getCheckTypes } from "@/api/quality/qcProduce";
import moment from 'moment';
export default {
name: "First",
dicts: ["unit","check_status","check_result","qc_rule_prop"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
formRef: 'form',
validateRules: [],
printData: {
printable: 'printFrom',
ignore: ['no-print'],
workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null,
factory: null,
productDate: null,
workTable: [],
},
printDialogVisible: false,
//
incomeList: [],
//
checkProjectList: [],
//
title: "",
//
open: false,
//
queryParams: {
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
factoryCode: null,
},
//
form: {},
checkTypes:[],
//
rules: {
/* incomeBatchNo: [
{ required: true, message: "来料批次号不能为空", trigger: "blur" }
], */
}
};
},
created() {
this.getDate();
this.getList();
this.getCheckTypes();
},
methods: {
/****/
getCheckTypes() {
getCheckTypes('material').then(response => {
this.checkTypes = response;
});
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
let end = this.Fungetdate (1)
//this.queryParams.incomeTimeArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end)
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00";
},
/** 查询首检列表 */
getList() {
this.loading = true;
if(this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}
listIncome(this.queryParams).then(response => {
this.incomeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
recordId: null,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: 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.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加首检";
},
/** 查看按钮操作 */
handleLook(row) {
this.reset();
const recordId = row.recordId || this.ids
this.queryParams.recordId = recordId;
getIncome(recordId).then(response => {
this.form = response.data;
this.form.printable = 'printFrom'; //
this.form.ignore = ['no-print'];//
this.open = true;
this.title = "查看首检报告";
});
this.getCheckedProjectList();
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordId != null) {
updateIncome(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addIncome(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const recordIds = row.recordId || this.ids;
this.$modal.confirm('是否确认删除首检编号为"' + recordIds + '"的数据项?').then(function() {
return delIncome(recordIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/qcIncome/export', {
...this.queryParams
}, `income_${new Date().getTime()}.xlsx`)
},
/**获取检验项目列表 */
getCheckedProjectList(){
this.loading = true;
getCkeckProjectList(this.queryParams).then((response) => {
this.checkProjectList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// -
handlePrint(params) {
console.log(this.form);
printJS({
printable: params.printable, // 'printFrom', // id
type: params.type || 'html',
maxWidth: 1500, //
font_size: "",//
header: "首检结果报告",//params.header, // '',
targetStyles: ['*'],
style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print']
properties: params.properties || null
})
},
}
};
</script>
<style scoped>
.print-btn{
margin-bottom: 15px;
margin-left: 10px;
}
</style>

@ -120,7 +120,7 @@
/> />
<!-- 打印来料检验对话框 --> <!-- 打印来料检验对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
@ -134,124 +134,111 @@
</el-row> </el-row>
<!-- 打印整个printFrom区域 --> <!-- 打印整个printFrom区域 -->
<div id="printFrom"> <div id="printFrom">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="7">
<el-form-item label="OEM厂名" prop="supplierName"> <img src="@/assets/logo/lanjv.png" class="report-logo"/>
<el-input v-model="form.supplierName" placeholder="请输入OEM厂名" disabled/>
</el-form-item>
</el-col> </el-col>
<el-col :span="10" class="center-text">
<h1>中山榄菊日化实业有限公司</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="8" :span="8" class="center-text">
<h2>白坯检验报告</h2>
</el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="来料类别" prop="factoryCode"> <el-form-item label="来料类别" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入来料类别" disabled/> <el-input v-model="form.factoryCode" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="生产批号" prop="incomeBatchNo"> <el-form-item label="生产批号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批号" disabled/> <el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="报告编号" prop="checkNo">
<el-input v-model="form.checkNo" disabled />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8">
<el-form-item label="物料编码" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请选择物料编码" disabled />
</el-form-item>
</el-col>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称" disabled /> <el-input v-model="form.materialName" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="物料编码" prop="materialCode">
<el-col :span="8"> <el-input v-model="form.materialCode" disabled />
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="16"> <el-col :span="16">
<el-form-item label="供应单位" prop="supplierName"> <el-form-item label="供应单位" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择供应商名称" disabled/> <el-input v-model="form.supplierName" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应编码" prop="supplierCode">
<el-input v-model="form.supplierCode" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="来料数量" prop="quality"> <el-form-item label="来料数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入物料数量" disabled/> <el-input type="number" v-model="form.quality" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unit" > <el-form-item label="单位" prop="unit" >
<el-input v-model="form.unit" placeholder="请输入单位" disabled/> <el-input v-model="form.unit" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="物料来源" prop="checkType" > <el-form-item label="物料来源" prop="checkType" >
<el-input v-model="form.checkType" placeholder="物料来源" disabled/> <el-input v-model="form.checkType" disabled/>
<!-- <el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="抽检数量" prop="sampleQuality"> <el-form-item label="抽检数量" prop="sampleQuality">
<el-input v-model="form.sampleQuality" placeholder="请选择抽样数量" disabled /> <el-input v-model="form.sampleQuality" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="报告编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请选择报告编号" disabled />
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="报检日期" prop="createTime"> <el-form-item label="报检日期" prop="createTime">
<el-input v-model="form.createTime" placeholder="请输入报检日期" disabled> <el-input v-model="form.createTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验日期" prop="checkTime"> <el-form-item label="检验日期" prop="checkTime">
<el-input v-model="form.checkTime" placeholder="请输入检验日期" disabled> <el-input v-model="form.checkTime" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }} {{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="8">
<el-form-item label="检验编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请输入检验编号" disabled/>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="产品提报人" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请输入OEM产品提报人" disabled/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<!-- 检验项目明细 --> <!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" > <el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="100"/> <el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="ruleName" /> <el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="标准要求" align="center" prop="checkStandard" width="200"/> <el-table-column label="标准要求" align="center" prop="checkStandard" width="200"/>
<el-table-column label="上差值" align="center" prop="upperDiff" /> <el-table-column label="抽检数" align="center" prop="sampleNum" />
<el-table-column label="下差值" align="center" prop="downDiff" />
<el-table-column label="抽检数量" align="center" prop="sampleNum" />
<el-table-column label="单位" align="center" prop="unitCode" /> <el-table-column label="单位" align="center" prop="unitCode" />
<el-table-column label="实测结果" align="center" prop="actualValue" width="200"/> <el-table-column label="实测结果" align="center" prop="actualValue" width="300"/>
<el-table-column label="判定" align="center" prop="status" > <el-table-column label="判定" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/> <dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
@ -259,7 +246,36 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col>
<el-form-item label="综合检验结论" prop="checkManName" label-width="100px">
<el-col offset="6" span="6">
<el-checkbox disabled>合格</el-checkbox>
</el-col>
<el-col offset="3" span="6">
<el-checkbox disabled>不合格</el-checkbox>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="品管经理/主任:" label-width="120px">
<el-input disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="品质主管:" label-width="100px">
<el-input disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="品管员:" prop="checkManName">
<el-input v-model="form.checkManName" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
@ -526,9 +542,9 @@ export default {
printJS({ printJS({
printable: params.printable, // 'printFrom', // id printable: params.printable, // 'printFrom', // id
type: params.type || 'html', type: params.type || 'html',
maxWidth: 1500, // maxWidth: 1600, //
font_size: "",// font_size: "",//
header: "来料检验结果报告",//params.header, // '', //header: "",//params.header, // '',
targetStyles: ['*'], targetStyles: ['*'],
style: '@page {margin:0 10mm};', // - style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print'] ignoreElements: params.ignore || [], // ['no-print']
@ -543,4 +559,12 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 10px; margin-left: 10px;
} }
.center-text {
text-align: center;
}
.report-logo {
margin-top: 15px;
margin-left: 15px;
height: 38px;
}
</style> </style>

@ -1,18 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="任务编号" prop="checkNo"> <el-form-item label="订单编码" prop="orderNo">
<el-input <el-input
v-model="queryParams.checkNo" v-model="queryParams.orderNo"
placeholder="请输入检验任务编号" placeholder="请输入物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料编码" prop="materialCode">
<el-input <el-input
v-model="queryParams.materialName" v-model="queryParams.materialCode"
placeholder="请输入物料名称" placeholder="请输入物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -56,16 +56,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <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:qcIncome:add']"
>新增</el-button>
</el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -82,6 +72,7 @@
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/> <el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="任务日期" align="center" prop="createTimeStr" width="100"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/> <el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150"/> <el-table-column label="订单号" align="center" prop="orderNo" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/> <el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
@ -107,7 +98,7 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleLook(scope.row)" @click="handleLook(scope.row)"
v-hasPermi="['quality:qcIncomeReport:edit']" v-hasPermi="['quality:qcIncomeReport:edit']"
>查看</el-button> >查看报告</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -120,8 +111,8 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改来料检验对话框 --> <!-- 产品巡检报告 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1370px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
@ -134,124 +125,82 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 打印整个printFrom区域 --> <!-- 打印整个printFrom区域 -->
<div id="printFrom"> <div id="printForm">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form :ref="formRef" :model="form">
<!-- 表头-工单信息 -->
<el-row> <el-row>
<el-col :span="8"> <el-col :offset="7" :span="10" class="center-text">
<el-form-item label="OEM厂名" prop="supplierName"> <span style="font-size: 20px;padding: 13px;">中山榄菊日化实业有限公司</span>
<el-input v-model="form.supplierName" placeholder="请输入OEM厂名" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来料类别" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来料批号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批号" disabled/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :offset="8" :span="8" class="center-text">
<el-form-item label="物料编码" prop="materialCode"> <span style="font-size: 18px;padding: 6px;">产品巡检记录表</span>
<el-input v-model="form.materialCode" placeholder="请选择物料编码" disabled />
</el-form-item>
</el-col> </el-col>
<el-col :span="16">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称" disabled />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <!-- 导航栏 -->
<el-col :span="8"> <el-row class="my-print-nav">
<el-form-item label="产线编码" prop="supplierCode"> <el-col :span="3">生成车间:{{form.supplierName}}</el-col>
<el-input v-model="form.supplierCode" placeholder="请输入产线编码" disabled/> <el-col :span="3">生成线体:{{form.lineName}}</el-col>
</el-form-item> <el-col :span="3">检查日期:{{form.checkTimeStart}}</el-col>
</el-col> <el-col :span="4">产品名称:{{form.materialName}}</el-col>
<el-col :span="16"> <el-col :span="6">批次号:{{form.incomeBatchNo}}</el-col>
<el-form-item label="产线名称" prop="supplierName"> <el-col :span="4">生产类型:
<el-input v-model="form.supplierName" placeholder="请选择产线名称" disabled/> <el-checkbox-group v-model="checkList">
</el-form-item> <el-checkbox label="正常"></el-checkbox>
<el-checkbox label="返修"></el-checkbox>
<el-checkbox label="试产"></el-checkbox>
</el-checkbox-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- 主数据 -->
<el-col :span="8"> <el-table
<el-form-item label="物料数量" prop="quality"> v-if="refreshNewWorkerTable"
<el-input type="number" v-model="form.quality" placeholder="请输入物料数量" disabled/> v-loading="newWorkerLoading"
</el-form-item> class="my-print-table"
</el-col> :data="form.checkInfos"
<el-col :span="8"> border
<el-form-item label="单位" prop="unit" > style="width: 100%">
<el-input v-model="form.unit" placeholder="请输入单位" disabled/> <el-table-column label="id" align="center" prop="recordId" v-if="false"/>
</el-form-item> <el-table-column label="序号" type="index" align="center" :index="indexMethod"/>
</el-col> <el-table-column label="项目名称" width="155" align="left" prop="ruleName" />
<el-col :span="8"> <el-table-column label="上午" align="center" >
<el-form-item label="物料来源" prop="checkType" > <el-table-column prop="column080090" label="8:00-9:00" width="80" align="center"/>
<el-input v-model="form.checkType" placeholder="物料来源" disabled/> <el-table-column prop="column090100" label="9:00-10:00" width="95" align="center"/>
<!-- <el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;"> <el-table-column prop="column100110" label="10:00-11:00" width="95" align="center"/>
<el-option <el-table-column prop="column110120" label="11:00-12:00" width="95" align="center"/>
v-for="dict in checkTypes" </el-table-column>
:key="dict.id" <el-table-column label="下午" align="center" >
:label="dict.checkName" <el-table-column prop="column123133" label="13:30-14:30" width="95" align="center"/>
:value="dict.id" <el-table-column prop="column133143" label="14:30-15:30" width="95" align="center"/>
></el-option> <el-table-column prop="column143153" label="15:30-16:30" width="95" align="center"/>
</el-select> --> <el-table-column prop="column153163" label="16:30-17:30" width="95" align="center"/>
</el-form-item> </el-table-column>
</el-col> <el-table-column label="加班" align="center" >
<el-table-column prop="column163173" label="12:30-13:30" width="95" align="center"/>
<el-table-column prop="column180190" label="18:00-19:00" width="95" align="center"/>
<el-table-column prop="column190200" label="19:00-20:00" width="95" align="center"/>
<el-table-column prop="column200210" label="20:00-21:00" width="95" align="center"/>
</el-table-column>
</el-table>
<br/>
<!-- 底部 -->
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">检查人:</el-col>
<el-col :offset="2" :span="3">品质主管:</el-col>
</el-row> </el-row>
<el-row> </el-form>
<el-col :span="8">
<el-form-item label="检验日期" prop="checkTime">
<el-input v-model="form.checkTime" placeholder="请输入检验日期" disabled>
{{ parseTime(form.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请输入检验编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品提报人" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请输入OEM产品提报人" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<!-- 检验项目明细 -->
<el-table v-loading="loading" :data="checkProjectList" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则编号" align="center" type="index" width="100"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" />
<el-table-column label="标准值" align="center" prop="checkStandard" />
<el-table-column label="上差值" align="center" prop="upperDiff" />
<el-table-column label="下差值" align="center" prop="downDiff" />
<el-table-column label="单位" align="center" prop="unitCode" />
<el-table-column label="检验值" align="center" prop="actualValue" />
<el-table-column label="结果" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag :options="dict.type.check_result" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 打印首检对话框 --> <!-- 打印首检对话框 -->
<el-dialog :title="title" :visible.sync="firstReportOpen" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="firstReportOpen" width="1000px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
@ -265,15 +214,15 @@
</el-row> </el-row>
<!-- 打印整个firstReportPrint区域 --> <!-- 打印整个firstReportPrint区域 -->
<div id="firstReportPrint"> <div id="firstReportPrint">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-row> <el-row>
<el-col :offset="8" :span="8"> <el-col :offset="7" :span="10" class="center-text">
<h1 style="align-content: center;">中山榄菊日化实业有限公司</h1> <h1>中山榄菊日化实业有限公司</h1>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="8" :span="8"> <el-col :offset="8" :span="8" class="center-text">
<h3 style="align-content: center;">黑蚊香首检确认表</h3> <h2>黑蚊香首检确认表</h2>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -372,7 +321,7 @@
</template> </template>
<script> <script>
import { listProduce, getProduce, delProduce, addProduce, updateIncome} from "@/api/quality/produceReport"; import { listProduce, getProduce, delProduce, addProduce, updateIncome,getProduceReportXJ} from "@/api/quality/produceReport";
import { getCkeckProjectList} from "@/api/quality/incomeReport"; import { getCkeckProjectList} from "@/api/quality/incomeReport";
import { getCheckTypes } from "@/api/quality/qcProduce"; import { getCheckTypes } from "@/api/quality/qcProduce";
import moment from 'moment'; import moment from 'moment';
@ -395,9 +344,12 @@ export default {
total: 0, total: 0,
// //
formRef: 'form', formRef: 'form',
newWorkerLoading: false,
refreshNewWorkerTable:true,
validateRules: [], validateRules: [],
checkList: [],
printData: { printData: {
printable: 'printFrom', printable: 'printForm',
ignore: ['no-print'], ignore: ['no-print'],
workCenter: "暂无数据", workCenter: "暂无数据",
SAPNo: null, SAPNo: null,
@ -406,7 +358,12 @@ export default {
printDate: null, printDate: null,
factory: null, factory: null,
productDate: null, productDate: null,
workTable: [], supplierName:null,
lineName:null,
checkTimeStart:null,
materialName:null,
incomeBatchNo:null,
checkInfos:[]
}, },
printDialogVisible: false, printDialogVisible: false,
// //
@ -464,6 +421,10 @@ export default {
this.getCheckTypes(); this.getCheckTypes();
}, },
methods: { methods: {
//
indexMethod(index) {
return index + 1;
},
/****/ /****/
getCheckTypes() { getCheckTypes() {
getCheckTypes('material').then(response => { getCheckTypes('material').then(response => {
@ -474,7 +435,7 @@ export default {
getDate() { getDate() {
let start = this.Fungetdate (0) let start = this.Fungetdate (0)
let end = this.Fungetdate (1) let end = this.Fungetdate (1)
this.queryParams.incomeTimeArray.push(start,end) //this.queryParams.incomeTimeArray.push(start,end)
this.queryParams.checkTimeArray.push(start,end) this.queryParams.checkTimeArray.push(start,end)
}, },
Fungetdate (num) { Fungetdate (num) {
@ -567,25 +528,33 @@ export default {
handleLook(row) { handleLook(row) {
this.reset(); this.reset();
const recordId = row.recordId || this.ids const recordId = row.recordId || this.ids
this.queryParams.recordId = recordId;
getProduce(recordId).then(response => { if(row.checkType =='checkTypeSC') {
this.form = response.data; getProduce(recordId).then(response => {
if(this.form.checkType =='checkTypeSC') { this.form = response.data;
// //
this.form.printable = 'firstReportPrint'; // this.form.printable = 'firstReportPrint'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//
this.firstReportOpen = true; this.firstReportOpen = true;
this.title = "首检检验报告"; this.title = "首检检验报告";
}else { })
this.queryParams.recordId = recordId;
this.getCheckedProjectList();
}else {
const orderNo = row.orderNo;
getProduceReportXJ(orderNo).then(response => {
this.form = response;
// //
this.form.printable = 'printForm'; // this.form.printable = 'printForm'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//
this.open = true; this.open = true;
this.title = "巡检检验报告"; this.title = "巡检检验报告";
} this.refreshNewWorkerTable = true // refreshProTabletrue
this.newWorkerLoading = false // false
}); })
this.getCheckedProjectList(); }
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
@ -634,13 +603,13 @@ export default {
}, },
// - // -
handlePrint(params) { handlePrint(params) {
console.log(this.form);
printJS({ printJS({
printable: params.printable, // 'printFrom', // id printable: params.printable, // id
type: params.type || 'html', type: params.type || 'html',
maxWidth: 1500, // maxWidth: 1500, //
font_size: "",// font_size: "",//
header: "生产过程检验结果报告",//params.header, // '', //header: "",//params.header, // '',
targetStyles: ['*'], targetStyles: ['*'],
style: '@page {margin:0 10mm};', // - style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print'] ignoreElements: params.ignore || [], // ['no-print']
@ -659,4 +628,11 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 10px; margin-left: 10px;
} }
.center-text {
text-align: center;
}
.my-print-nav {
margin-top: 15px;
margin-bottom: 15px;
}
</style> </style>

@ -56,16 +56,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <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:qcIncome:add']"
>新增</el-button>
</el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -120,7 +110,7 @@
/> />
<!-- 打印成品检验对话框 --> <!-- 打印成品检验对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-row> <el-row>
<el-col :span="20"> <el-col :span="20">
<el-button <el-button
@ -136,85 +126,61 @@
<div id="printFrom"> <div id="printFrom">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="7">
<el-form-item label="OEM厂名" prop="supplierName"> <img src="@/assets/logo/lanjv.png" class="report-logo"/>
<el-input v-model="form.supplierName" placeholder="请输入OEM厂名" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来料类别" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="10" class="center-text">
<el-form-item label="生产批号" prop="incomeBatchNo"> <h1>中山榄菊日化实业有限公司</h1>
<el-input v-model="form.incomeBatchNo" placeholder="请输入生产批号" disabled/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :offset="8" :span="8" class="center-text">
<el-form-item label="产品编码" prop="materialCode"> <h2>成品检验报告</h2>
<el-input v-model="form.materialCode" placeholder="请选择物料编码" disabled />
</el-form-item>
</el-col> </el-col>
<el-col :span="16">
<el-form-item label="产品名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称" disabled />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="16">
<el-form-item label="仓库编码" prop="supplierCode"> <el-form-item label="产品名称" prop="materialName">
<el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/> <el-input v-model="form.materialName" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="8">
<el-form-item label="仓库名称" prop="supplierName"> <el-form-item label="产品编码" prop="materialCode">
<el-input v-model="form.supplierName" placeholder="请选择仓库名称" disabled/> <el-input v-model="form.materialCode" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="生产数量" prop="quality"> <el-form-item label="生产数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入物料数量" disabled/> <el-input type="number" v-model="form.quality" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位" prop="unit" > <el-form-item label="单位" prop="unit" >
<el-input v-model="form.unit" placeholder="请输入单位" disabled/> <el-input v-model="form.unit" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="物料来源" prop="checkType" > <el-form-item label="检验编号" prop="checkNo">
<el-input v-model="form.checkType" placeholder="物料来源" disabled/> <el-input v-model="form.checkNo" disabled/>
<!-- <el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="抽样地点" prop="checkLoc"> <el-form-item label="生产批号" prop="incomeBatchNo">
<el-input v-model="form.checkNo" placeholder="请输入检验编号" disabled/> <el-input v-model="form.incomeBatchNo" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验依据" prop="checkNo"> <el-form-item label="抽样地点" prop="checkLoc">
<el-input v-model="form.checkManName" placeholder="请输入检验依据" disabled/> <el-input v-model="form.checkLoc" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验编号" prop="checkNo"> <el-form-item label="检验依据" prop="standardNo">
<el-input v-model="form.checkNo" placeholder="请输入检验编号" disabled/> <el-input v-model="form.standardNo" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -247,8 +213,6 @@
<el-table-column label="序号" align="center" type="index" width="100"/> <el-table-column label="序号" align="center" type="index" width="100"/>
<el-table-column label="检验项目" align="center" prop="ruleName" /> <el-table-column label="检验项目" align="center" prop="ruleName" />
<el-table-column label="标准要求" align="center" prop="checkStandard" width="200"/> <el-table-column label="标准要求" align="center" prop="checkStandard" width="200"/>
<el-table-column label="上差值" align="center" prop="upperDiff" />
<el-table-column label="下差值" align="center" prop="downDiff" />
<el-table-column label="抽检数量" align="center" prop="sampleNum" /> <el-table-column label="抽检数量" align="center" prop="sampleNum" />
<el-table-column label="单位" align="center" prop="unitCode" /> <el-table-column label="单位" align="center" prop="unitCode" />
<el-table-column label="实测结果" align="center" prop="actualValue" width="200"/> <el-table-column label="实测结果" align="center" prop="actualValue" width="200"/>
@ -259,7 +223,38 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col>
<el-form-item label="综合检验结论" prop="checkManName" label-width="100px">
<el-col offset="6" span="6">
<el-checkbox disabled>合格</el-checkbox>
</el-col>
<el-col offset="3" span="6">
<el-checkbox disabled>不合格</el-checkbox>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="备注:" label-width="120px">
<el-input type="textarea" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="品检主管:" label-width="100px">
<el-input disabled/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="品管员:" >
<el-input disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
@ -505,6 +500,7 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -529,7 +525,7 @@ export default {
type: params.type || 'html', type: params.type || 'html',
maxWidth: 1500, // maxWidth: 1500, //
font_size: "",// font_size: "",//
header: "成品入库检验结果报告",//params.header, // '', //header: "",//params.header, // '',
targetStyles: ['*'], targetStyles: ['*'],
style: '@page {margin:0 10mm};', // - style: '@page {margin:0 10mm};', // -
ignoreElements: params.ignore || [], // ['no-print'] ignoreElements: params.ignore || [], // ['no-print']
@ -544,4 +540,12 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 10px; margin-left: 10px;
} }
.center-text {
text-align: center;
}
.report-logo {
margin-top: 15px;
margin-left: 15px;
height: 38px;
}
</style> </style>

@ -0,0 +1,358 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px" class="edit-el-form">
<el-form-item label="订单编码" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次编码" prop="incomeBatchNo">
<el-input
v-model="queryParams.incomeBatchNo"
placeholder="请选择批次编码"
clearable
@keyup.enter.native="handleQuery"
/>
</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="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="supplierCode">
<el-select v-model="queryParams.supplierCode" clearable placeholder="请选择统计单位" filterable clearable>
<el-option
v-for="dict in workCenterList"
:key="dict.supplierCode"
:label="dict.supplierName"
:value="dict.supplierCode"
></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="incomeTimeArray">
<el-date-picker
v-model="queryParams.incomeTimeArray"
format="yyyy-MM-dd"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</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="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:prepare:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="单位编码" align="center" prop="supplierCode" width="80"/>
<el-table-column prop="supplierName" label="单位名称" width="100" align="center"/>
<el-table-column prop="orderNo" label="订单编码" width="160" align="center"/>
<el-table-column prop="incomeBatchNo" label="批次" width="220" align="center"/>
<el-table-column prop="materialName" label="产品名称"align="center" width="180" :show-overflow-tooltip="true"/>
<el-table-column prop="materialCode" label="产品编码" width="130" align="center"
:formatter="productCodeFormate"/>
<el-table-column prop="quality" label="数量" width="80" align="center"/>
<el-table-column prop="unit" label="单位" width="80" align="center"/>
<el-table-column prop="sampleQuality" label="抽样数量" width="80" align="center"/>
<el-table-column prop="noOkNums" label="不良数量" width="80" align="center"/>
<el-table-column prop="noOkNumRate" label="不良率(%)" width="80" align="center"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getQmsRateTable,getWorkcenterList,getCheckTypeList,getSupplierList} from "@/api/quality/qcTable";
import moment from "moment/moment";
export default {
name: "qcAnalysis",
dicts: ["check_type"],
data() {
return {
newWorkerLoading: false,
refreshNewWorkerTable:true,
//
selectPrepare:[],
//
formRef: 'form',
validateRules: [],
printDialogVisible: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
checkNo: null,
typeCode:null,
checkType:null,
orderNo: null,
productId: null,
materialCode: null,
prodType: null,
materialName: null,
productSpc: null,
wetDetailPlanId: null,
incomeTime: null,
incomeBatchNo:null,
incomeTimeArray: [],
ymArrayStart:null,
ymArrayEnd:null
},
workCenterList:[],
checkTypeList:[],
//
form: {},
//
rules: {},
openReport : false,
titleReport : "工单报工详情"
};
},
created() {
this.getWorkCenterList();
this.getDate();
this.getList();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0);
let end = this.Fungetdate (1);
this.queryParams.incomeTimeArray.push(start,end);
},
Fungetdate (num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
/**获取车间数据**/
getWorkCenterList(){
getWorkcenterList(this.queryParams).then(response => {
this.workCenterList = response
})
},
getCheckTypeList(val){
//
getCheckTypeList(val).then(response => {
this.checkTypeList = response
});
//
getSupplierList(val).then(response => {
this.workCenterList = response
});
},
indexMethod(index){
return index+1 ;
},
/** 查询备料单列表 */
getList() {
this.loading = true;
if(this.queryParams.incomeTimeArray.length>0){
this.queryParams.ymArrayStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD');
this.queryParams.ymArrayEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD');
}
getQmsRateTable(this.queryParams).then(response => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.openReport = false;
this.reset();
},
//
reset() {
this.form = {
prepareId: null,
checkNo: null,
workorderName: null,
parentOrder: null,
orderId: null,
orderNo: null,
productId: null,
materialCode: null,
prodType: null,
materialName: null,
productSpc: null,
wetDetailPlanId: null,
incomeTime: null,
incomeBatchNo:null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.getDate();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.prepareId)
this.single = selection.length!==1
this.multiple = !selection.length
this.selectPrepare = selection
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加备料单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const prepareId = row.prepareId || this.ids
getPrepare(prepareId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改备料单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.prepareId != null) {
updatePrepare(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPrepare(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
//
productCodeFormate(row, column, cellValue){
return cellValue.slice(7,18); //
},
/** 报工详情按钮操作 */
handleDetail(row) {
this.reset();
let sr = row;
this.queryParams.orderNo = sr.orderNo;
getXJCheckTableDetail(this.queryParams).then(response => {
this.pOrderTableList = response;
this.openReport = true;
this.titleReport = "过程巡检详情";
});
},
/** 导出按钮操作 */
handleExport() {
this.download('quality/staticTable/exportProduceAnalysis', {
...this.queryParams
}, `noOkRate_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style>
.my-print-head {
margin-top: 20px;
font-weight: bold;
}
.my-print-nav {
margin-top: 15px;
margin-bottom: 15px;
}
.my-print-table {
}
.my-print-foot {
margin-top: 20px;
}
</style>

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px">
<el-form-item label="开始值" prop="startValue"> <el-form-item label="开始值" prop="startValue">
<el-input <el-input
v-model="queryParams.startValue" v-model="queryParams.startValue"
@ -26,7 +26,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="检验类型" prop="typeCode"> <el-form-item label="检验类型" prop="typeCode">
<el-select v-model="form.typeCode" placeholder="请选择检验类型" clearable style="width:100%"> <el-select v-model="queryParams.typeCode" placeholder="请选择检验类型" clearable style="width:100%">
<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"
@ -35,16 +35,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="检验类型子项目" prop="checkType">
<el-select v-model="form.checkType" placeholder="请选择检验类型子项目" clearable style="width:100%">
<el-option
v-for="item in checkTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<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>
@ -143,16 +133,17 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="开始值" prop="startValue"> <el-form-item label="开始值" prop="startValue">
<el-input v-model="form.startValue" placeholder="请输入开始值" /> <el-input v-model="form.startValue" placeholder="请输入数字" />
</el-form-item> </el-form-item>
<el-form-item label="结束值" prop="endValue"> <el-form-item label="结束值" prop="endValue">
<el-input v-model="form.endValue" placeholder="请输入检测项方案名称" /> <el-input v-model="form.endValue" placeholder="请输入数字" />
</el-form-item> </el-form-item>
<el-form-item label="抽样数量" prop="sampleQuality"> <el-form-item label="抽样数量" prop="sampleQuality">
<el-input v-model="form.sampleQuality" placeholder="请输入抽样数量" /> <el-input v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item> </el-form-item>
<el-form-item label="检验类型" prop="typeCode"> <el-form-item label="检验类型" prop="typeCode">
<el-select v-model="form.typeCode" placeholder="请选择检验类型" style="width:100%"> <el-select v-model="form.typeCode" placeholder="请选择检验类型"
@change="handleGetCheckType" clearable style="width:100%">
<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"
@ -162,12 +153,12 @@
</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="form.checkType" placeholder="请选择检验类型子项目" style="width:100%"> <el-select v-model="form.checkType" placeholder="请先选择检验类型" :disabled="!(form.typeCode)" style="width:100%">
<el-option <el-option
v-for="item in checkTypeList" v-for="item in addCheckTypeList"
:key="item.value" :key="item.id"
:label="item.label" :label="item.checkName"
:value="item.value" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -181,8 +172,8 @@
</template> </template>
<script> <script>
import { listQcSampleRule, getQcSampleRule, delQcSampleRule, addQcSampleRule, updateQcSampleRule } from "@/api/quality/qcSampleRule"; import { listQcSampleRule, getQcSampleRule, delQcSampleRule, addQcSampleRule, updateQcSampleRule, getCheckType } from "@/api/quality/qcSampleRule";
import { listCheckType,} from "@/api/quality/checkType";
export default { export default {
name: "QcSampleRule", name: "QcSampleRule",
dicts: ["check_type"], dicts: ["check_type"],
@ -206,24 +197,8 @@ export default {
title: "", title: "",
// //
open: false, open: false,
checkTypeList: [ checkTypeList: [],
{ addCheckTypeList: [],
value: 'checkTypeCP',
label: '成品入库检验',
},
{
value: 'checkTypeLL',
label: '来料检验',
},
{
value: 'checkTypeSC',
label: '首件检验',
},
{
value: 'checkTypeSCXJ',
label: '过程巡检',
},
],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -240,14 +215,31 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
factoryCode: [ startValue: [
{ required: true, message: "工厂编码不能为空", trigger: "blur" } { required: true, message: "开始值不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
],
endValue: [
{ required: true, message: "结束值不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
],
sampleQuality: [
{ required: true, message: "抽样数量不能为空", trigger: "blur" },
{ pattern: /^[1-9]\d*$/, message: "请输入正整数,且开头不能为0", trigger: "blur"}
],
typeCode: [
{ required: true, message: "检验类型不能为空", trigger: "blur" }
], ],
checkType: [
{ required: true, message: "检验类型子项目不能为空", trigger: "blur" }
],
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getCheckTypeList();
}, },
methods: { methods: {
/** 查询来料抽样规则列表 */ /** 查询来料抽样规则列表 */
@ -259,6 +251,11 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getCheckTypeList() {
listCheckType().then(response => {
this.checkTypeList = response.rows
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -313,6 +310,7 @@ export default {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改来料抽样规则"; this.title = "修改来料抽样规则";
this.handleGetCheckType(this.form.typeCode);
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -352,9 +350,15 @@ export default {
}, `qcSampleRule_${new Date().getTime()}.xlsx`) }, `qcSampleRule_${new Date().getTime()}.xlsx`)
}, },
formatCheckType(checkType) { formatCheckType(checkType) {
const checkTypeBody = this.checkTypeList.find((item) => item.value === checkType); const checkTypeBody = this.checkTypeList.find((item) => item.id === checkType);
return checkTypeBody ? checkTypeBody.label : '——'; return checkTypeBody ? checkTypeBody.checkName : '';
} },
handleGetCheckType(value) {
this.form.checkType = '';
getCheckType(value).then(response => {
this.addCheckTypeList = response.rows
});
},
} }
}; };
</script> </script>

@ -110,7 +110,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
datasourceId: undefined, datasourceId: undefined,
userName: undefined, userName: null,
phonenumber: undefined phonenumber: undefined
} }
}; };
@ -180,4 +180,4 @@ export default {
} }
} }
}; };
</script> </script>

@ -221,6 +221,13 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
width="100"
>
</el-table-column>
<el-table-column <el-table-column
label="设备类型编码" label="设备类型编码"
align="center" align="center"
@ -1306,6 +1313,7 @@ export default {
label: response.rows[i].materialCode + response.rows[i].materialDesc, label: response.rows[i].materialCode + response.rows[i].materialDesc,
}); });
} }
console.log(this.auxiliaryEquipmentRightList)
for (let i in response.selected) { for (let i in response.selected) {
this.rightList.push(response.selected[i].key); this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList; this.form.rightData = this.rightList;
@ -1460,6 +1468,7 @@ export default {
this.queryAuxiliaryEquipmentParams.equipmentCategory = '0'; this.queryAuxiliaryEquipmentParams.equipmentCategory = '0';
listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => { listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => {
console.log("listEquipment")
this.auxiliaryEquipmentLeftList = []; this.auxiliaryEquipmentLeftList = [];
for (let i in response.rows) { for (let i in response.rows) {
// 穿 // 穿
@ -1468,9 +1477,11 @@ export default {
label: response.rows[i].equipmentCode + response.rows[i].equipmentName + response.rows[i].remark, label: response.rows[i].equipmentCode + response.rows[i].equipmentName + response.rows[i].remark,
}); });
} }
console.log(this.auxiliaryEquipmentRightList)
}); });
getEquipment(equipmentId).then((response) => { getEquipment(equipmentId).then((response) => {
console.log("getEquipment")
this.form = response.data; this.form = response.data;
this.rightList = []; this.rightList = [];
for (let i in response.data.selectedData) { for (let i in response.data.selectedData) {
@ -1478,12 +1489,14 @@ export default {
this.rightList.push(response.data.selectedData[i].spareCode); this.rightList.push(response.data.selectedData[i].spareCode);
} }
this.auxiliaryEquipmentRightList = []; this.auxiliaryEquipmentRightList = [];
console.log(this.auxiliaryEquipmentRightList)
for (let i in response.data.selectedEquipmentData) { for (let i in response.data.selectedEquipmentData) {
// 穿 // 穿
this.auxiliaryEquipmentRightList.push( this.auxiliaryEquipmentRightList.push(
response.data.selectedEquipmentData[i].auxiliaryEquipmentCode response.data.selectedEquipmentData[i].auxiliaryEquipmentCode
); );
} }
console.log(this.auxiliaryEquipmentRightList)
if (response.data.imageFiles != null) { if (response.data.imageFiles != null) {
var newFiles = []; var newFiles = [];

@ -16,6 +16,7 @@
<el-table-column <el-table-column
label="设备编码" label="设备编码"
align="center" align="center"
width="120"
prop="equipmentCode" prop="equipmentCode"
fixed fixed
/> />
@ -27,6 +28,7 @@
<el-table-column <el-table-column
label="设备状态" label="设备状态"
align="center" align="center"
width="150"
prop="equipmentStatus" prop="equipmentStatus"
> >
<template slot-scope="scope"> <template slot-scope="scope">

@ -67,6 +67,14 @@
> >
<el-table-column label="组织名称" align="center" prop="factoryName" width="350"/> <el-table-column label="组织名称" align="center" prop="factoryName" width="350"/>
<el-table-column label="组织编码" align="center" prop="factoryCode" /> <el-table-column label="组织编码" align="center" prop="factoryCode" />
<el-table-column prop="ftype" label="工厂建模类型" width="100" align="center">
<template slot-scope="scope">
<dict-tag
:options="dict.type.f_type"
:value="scope.row.ftype"
/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy" /> <el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column prop="status" label="是否启用" align="center" > <el-table-column prop="status" label="是否启用" align="center" >
@ -103,30 +111,45 @@
<!-- 添加或修改工厂模型对话框 --> <!-- 添加或修改工厂模型对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="父组织名" prop="parentId" style="width:430px"> <el-form-item label="父组织名" prop="parentId" style="width:350px">
<treeselect v-model="form.parentId" :options="factoryOptions" :normalizer="normalizer" placeholder="请选择父组织id" /> <treeselect v-model="form.parentId" :options="factoryOptions" :normalizer="normalizer" placeholder="请选择父组织id" />
</el-form-item> </el-form-item>
<el-form-item label="组织名称" prop="factoryName" style="width:430px"> <el-form-item label="组织名称" prop="factoryName" style="width:350px">
<el-input v-model="form.factoryName" placeholder="请输入组织名称" /> <el-input v-model="form.factoryName" placeholder="请输入组织名称" />
</el-form-item> </el-form-item>
<el-form-item label="组织编码" prop="factoryCode" style="width:430px"> <el-form-item label="组织编码" prop="factoryCode" style="width:350px">
<el-input v-model="form.factoryCode" placeholder="请输入组织编码" /> <el-input v-model="form.factoryCode" placeholder="请输入组织编码" />
</el-form-item> </el-form-item>
<el-form-item label="负责人" prop="leader" style="width:430px"> <el-form-item label="工厂建模分类" prop="ftype">
<el-select
v-model="form.ftype"
placeholder="请选择设备类型"
filterable
style="width: 230px"
>
<el-option
v-for="dict in dict.type.f_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="负责人" prop="leader" style="width:350px">
<el-input v-model="form.leader" placeholder="请输入负责人" /> <el-input v-model="form.leader" placeholder="请输入负责人" />
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="phone" style="width:430px"> <el-form-item label="联系电话" prop="phone" style="width:350px">
<el-input v-model="form.phone" placeholder="请输入联系电话" /> <el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item> </el-form-item>
<el-form-item label="邮箱" prop="email" style="width:430px"> <el-form-item label="邮箱" prop="email" style="width:350px">
<el-input v-model="form.email" placeholder="请输入邮箱" /> <el-input v-model="form.email" placeholder="请输入邮箱" />
</el-form-item> </el-form-item>
<el-form-item label="是否启用" prop="status" > <el-form-item label="是否启用" prop="status" >
<el-select v-model="form.status" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:350px"> <el-select v-model="form.status" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:230px">
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option> <el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</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>
@ -143,6 +166,9 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "Factory", name: "Factory",
dicts: [
"f_type",
],
components: { components: {
Treeselect Treeselect
}, },
@ -185,7 +211,6 @@ export default {
// //
form: {}, form: {},
// //
//
rules: { rules: {
factoryCode: [ factoryCode: [
{ required: true, message: "组织编码不能为空", trigger: "blur" } { required: true, message: "组织编码不能为空", trigger: "blur" }

Loading…
Cancel
Save