质量检测项明细报表开发

master
zhaoxiaolin 9 months ago
parent c27b55e50b
commit ad2090ebb1

@ -0,0 +1,28 @@
@echo off
echo --------------------------------自定义参数,启动前先修改--------------------------------------
set imageURI=140.249.53.142:30002/op-lanju/ld-op-front
::echo 获取当前日期字符串
for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c
::echo 获取当前时间字符串
for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b
::echo 如当前小时小于10将空格替换为0
set T=%T: =0%
::echo 显示输出日期时间字符串
set imageVersion=%D%%T%
::输出发版信息
echo 镜像库地址:%imageURI%
echo 镜像版本:%imageVersion%
echo --------------------------------执行打包--------------------------------
call npm run build:prod
dir
echo --------------------------------docker login...-------------------------------
docker logout 140.249.53.142:30002
docker login 140.249.53.142:30002 -u deploy -p Deploy@2022
echo --------------------------------docker build...-------------------------------
docker build -t %imageURI%:%imageVersion% .
echo --------------------------------docker push...--------------------------------
docker push %imageURI%:%imageVersion%
@pause
::docker pull 192.168.3.157:8001/library/nginx:1.20-alpine

@ -1,6 +1,6 @@
@echo off @echo off
echo --------------------------------自定义参数,启动前先修改-------------------------------------- echo --------------------------------自定义参数,启动前先修改--------------------------------------
set imageURI=140.249.53.142:30002/op-lanju/ld-op-front set imageURI=192.168.202.36:30002/op-lanju/op-ui-test
::echo 获取当前日期字符串 ::echo 获取当前日期字符串
for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c
::echo 获取当前时间字符串 ::echo 获取当前时间字符串
@ -17,8 +17,7 @@ call npm run build:prod
dir dir
echo --------------------------------docker login...------------------------------- echo --------------------------------docker login...-------------------------------
docker logout 140.249.53.142:30002 docker login 192.168.202.36:30002 -u deploy -p Deploy@2023
docker login 140.249.53.142:30002 -u deploy -p Deploy@2022
echo --------------------------------docker build...------------------------------- echo --------------------------------docker build...-------------------------------
docker build -t %imageURI%:%imageVersion% . docker build -t %imageURI%:%imageVersion% .
echo --------------------------------docker push...-------------------------------- echo --------------------------------docker push...--------------------------------

@ -168,3 +168,20 @@ export function getIncomeChartList(query) {
data: query data: query
}); });
} }
//定量值明细报表
export function getDLTableMXTitle(query) {
return request({
url: '/quality/staticTable/getDLTableMXTitle',
method: 'get',
params: query
});
}
export function getDLTableMXList(query) {
return request({
url: '/quality/staticTable/getDLTableMXList',
method: 'get',
params: query
});
}

@ -321,6 +321,7 @@ export default {
setTimeout(this.getUnReadList(), 30000); setTimeout(this.getUnReadList(), 30000);
}, 30000); }, 30000);
}, },
components: { components: {
Breadcrumb, Breadcrumb,

@ -54,8 +54,8 @@
<el-row class="my-print-foot"> <el-row class="my-print-foot">
<el-col :offset="1" :span="13"> <el-col :offset="1" :span="13">
<div class="card-div2">产品名称: {{ item.productName }}</div><br /> <div class="card-div2">产品名称: {{ item.productName }}</div><br />
<div class="card-div2">产品编码: {{ item.productCode }}</div><br />
<div class="card-div2">批次号: {{ item.batchCode }}</div><br /> <div class="card-div2">批次号: {{ item.batchCode }}</div><br />
<div class="card-div2">生产日期: {{ item.productDateStr }}</div><br />
<div class="card-div2">板次: {{ item.palletNo }}</div><br /> <div class="card-div2">板次: {{ item.palletNo }}</div><br />
<div class="card-div2"><span>数量: {{ item.batchQuantity }}&nbsp;{{ item.unit }}</span> <div class="card-div2"><span>数量: {{ item.batchQuantity }}&nbsp;{{ item.unit }}</span>
<span style="margin-left: 15%;">子单数量: {{ item.umrez }}&nbsp;PC</span></div><br /> <span style="margin-left: 15%;">子单数量: {{ item.umrez }}&nbsp;PC</span></div><br />

@ -1323,12 +1323,14 @@ export default {
handleDelete(row) { handleDelete(row) {
var statusesArray = this.statuses; var statusesArray = this.statuses;
/**
for (var i = 0; i < statusesArray.length; i++) { for (var i = 0; i < statusesArray.length; i++) {
if (statusesArray[i] == 'w2') { if (statusesArray[i] == 'w2') {
this.$modal.msgError("已经活动的订单不允许操作"); this.$modal.msgError("已经活动的订单不允许操作");
return return
} }
} }
**/
const workorderIds = row.workorderId || this.ids; const workorderIds = row.workorderId || this.ids;

@ -0,0 +1,473 @@
<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="workorderCodeSap">
<el-input
v-model="queryParams.workorderCodeSap"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="线体" prop="checkLoc">
<el-select clearable v-model="queryParams.checkLoc">
<el-option
v-for="item in prodLineList"
:key="item.lineCode"
:label="item.lineName"
:value="item.lineCode"
></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="typeCode">
<el-select
v-model="queryParams.typeCode"
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"
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-form-item label="定量检测项" prop="projectId">
<el-select
v-model="queryParams.projectId"
collapse-tags
placeholder="必选定量检测项"
>
<el-option
v-for="item in projectNoOptions"
:key="item.recordId"
:label="item.ruleName"
:value="item.recordId"
></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"
>导出</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" height="450">
<el-table-column type="index" width="50" align="center" :index="indexMethod" label="序号"fixed/>
<!--<el-table-column label="线体编码" align="center" prop="checkLoc" width="90" />-->
<el-table-column label="线体名称" align="center" prop="equipmentName" width="90" />
<el-table-column label="产品编码" align="center" prop="materialCode" width="110" :formatter="productCodeFormate"/>
<el-table-column label="产品名称" align="center" prop="materialName" width="180" :show-overflow-tooltip="true"/>
<el-table-column label="订单号" align="center" prop="workorderCodeSap" width="100" :formatter="orderCodeFormate"/>
<!--<el-table-column label="工单号" align="center" prop="workorderCode" width="130"/>-->
<el-table-column label="批次号" align="center" prop="batchNo" width="150" />
<el-table-column label="检测项" align="center" prop="ruleName" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="测量值" align="center">
<template v-for="(column, index) in showTitles">
<el-table-column align="center" width="70" :prop="column.id" :key="column.id" :label="column.titleName"/>
</template>
</el-table-column>
<el-table-column label="CPK品类" align="center" prop="cpkTypeName" width="100" />
<el-table-column label="日期" align="center" prop="incomeTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</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="1300px"
append-to-body
>
<el-button type="primary" round v-if="title == 'CPK分析'" @click="handleExportCPK">CPK</el-button>
<div
class="echartbox"
id="echart1"
style="margin: auto; margin-top: 20px; width: 1220px; height: 545px"
></div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getDLTableMXTitle,
getDLTableMXList,
getCheckTypeList,
getSupplierList,
getProjectOptionList,
} from "@/api/quality/qcTable";
import {
getProdLineList
} from '@/api/plan/workorder'
import * as echarts from "echarts";
import moment from "moment/moment";
export default {
name: "qcTableDLReport",
dicts: ["check_type"],
data() {
return {
prodLineList:[],
detailListLoading: true,
refreshNewWorkerTable: true,
//
selectPrepare: [],
//
formRef: "form",
validateRules: [],
printDialogVisible: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableList: [],
showTitles:[],
detailTitleCol2: [],
//
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: [],
projectNoOptions: [],
//
form: {},
//
rules: {},
openReport: false,
titleReport: "工单报工详情",
legenddata: [],
seriesdata: [],
xAxisdata: [],
detailechartslist: [],
titledata: "",
};
},
created() {
getProdLineList().then(response => {
this.prodLineList = response
})
this.getDate();
this.getList();
},
methods: {
//
productCodeFormate(row, column, cellValue) {
return cellValue.slice(7, 18); //
},
//
orderCodeFormate(row, column, cellValue) {
if (cellValue != null) {
return cellValue.slice(3, 18); //
}
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate(0);
let end = this.Fungetdate(0);
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;
});
},
//
getProjectListFunc(val) {
getProjectOptionList(val).then((response) => {
this.projectNoOptions = 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");
}
getDLTableMXTitle(this.queryParams).then((response) => {
this.showTitles = [];
let col1 = response.titleCol1;
if(col1 != null){
for (let i = 1; i <= col1.length; i++) {
var titleobj1 = {};
titleobj1.id = "act" + i;
titleobj1.titleName = col1[i-1];
this.showTitles.push(titleobj1);
}
}
getDLTableMXList(this.queryParams);
});
getDLTableMXList(this.queryParams).then((response) => {
this.tableList = response//.rows;
//this.total = response.total;
this.loading = false;
});
},
//
productCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(7,18); //
}
},
//
orderCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(3,18); //
}
},
//
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;
},
/** 提交按钮 */
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();
});
}
}
});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"quality/staticTable/exportDLTableMXList",
{
...this.queryParams,
},
`DLMxTable_${new Date().getTime()}.xlsx`
);
},
//
cancel() {
this.open = false;
}
},
};
</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;
}
#.el-table .cell {
white-space: pre-line !important;
}
.el-table .cell.el-tooltip {
white-space: pre-wrap; /*这是重点。文本换行*/
}
/deep/ .el-table__expand-icon {
display: none;
}
.expandClass .el-table__expand-icon {
display: none;
}
</style>

@ -681,9 +681,9 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('qcWarehousing/warehousing/export', { this.download('quality/qcWarehousing/export', {
...this.queryParams ...this.queryParams
}, `warehousing_${new Date().getTime()}.xlsx`) }, `product_${new Date().getTime()}.xlsx`)
}, },
// //
handleStatusChange(row) { handleStatusChange(row) {

@ -32,6 +32,19 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="CPK品类" prop="cpkType">
<el-select
v-model="queryParams.cpkType"
placeholder="请选择品类"
>
<el-option
v-for="dict in dict.type.qms_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -186,6 +199,12 @@
prop="mvgr5" prop="mvgr5"
width="150" width="150"
/> />
<el-table-column
label="CPK品类"
align="center"
prop="cpkTypeName"
width="150"
/>
<!-- 中文描述也就是产品名称 --> <!-- 中文描述也就是产品名称 -->
<!-- <el-table-column label="英文描述" align="center" prop="productDescEn" /> <!-- <el-table-column label="英文描述" align="center" prop="productDescEn" />
<el-table-column label="产品类别" align="center" prop="productGroup"> <el-table-column label="产品类别" align="center" prop="productGroup">
@ -522,9 +541,9 @@
</el-form-item> </el-form-item>
<el-form-item label="CPK品类" prop="other"> <el-form-item label="CPK品类" prop="cpkType">
<el-select <el-select
v-model="form.other" v-model="form.cpkType"
placeholder="请选择质量品类" placeholder="请选择质量品类"
style="width: 320px" style="width: 320px"
> >

Loading…
Cancel
Save