Merge remote-tracking branch 'origin/master'

yangwl
Yangwl 4 months ago
commit de4ed98e6c

@ -181,10 +181,7 @@ export function getProdLineList() {
params: {} params: {}
}); });
} }
export function getIdCardList(workorderCode){ export function getIdCardList(data){
const data={
workorderCode
}
return request({ return request({
url:'/plan/pro/workorder/getIdCardList', url:'/plan/pro/workorder/getIdCardList',
method:'post', method:'post',

@ -1314,6 +1314,22 @@ export default {
this.$modal.msgError(`请选择数据`); this.$modal.msgError(`请选择数据`);
return false; return false;
} }
// 使 for...of reportRows
for (const row of this.reportRows) {
console.log("当前行: ", row.batchSK); //
const batchSK = row.batchSK;
// 使
const isUpperCase = /^[A-Z0-9]+$/.test(batchSK);
if (isUpperCase) {
console.log("当前行的 batchSK (符合要求): ", batchSK); // batchSK
} else {
console.log("当前行的 batchSK 不符合要求 (应为大写): ", batchSK); // batchSK
this.$modal.msgError("批次不符合要求 (英文应为大写): " + batchSK); //
return; //
}
}
// 使 forEach reportRows
this.reportRows.forEach((row) => { this.reportRows.forEach((row) => {
this.$set(row, "whCode", this.selectedWarehouse); this.$set(row, "whCode", this.selectedWarehouse);
}); });

@ -1987,10 +1987,17 @@ export default {
/**打印标识卡弹出框**/ /**打印标识卡弹出框**/
printIdCard() { printIdCard() {
this.$refs.printID.init("20021221552");
this.$refs.printID.showPrint();
this.$refs.printID.printDialogVisible = true;
//var statusesArray = this.statuses;
//for (var i = 0; i < statusesArray.length; i++) {
// if (statusesArray[i] == 'w0') {//
// this.$modal.msgError("");
// return
// }
//}
this.$refs.printID.init(this.selectWork.workorderCode);
this.$refs.printID.printDialogVisible = true;
}, },
// //
printIdFunc(obj) { printIdFunc(obj) {

@ -1,6 +1,15 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-dialog title="" :visible.sync="printDialogVisible" width="990px"> <el-dialog title="" :visible.sync="printDialogVisible" width="1000px">
<div>
<el-form inline>
<el-form-item label="补打版次" prop="factory">
<el-input v-model="idCardsNum" placeholder="请输入补打版次" style="width:100px"/>
</el-form-item>
<el-button type="primary" icon="el-icon-check" circle @click="showPrint()"/>
</el-form>
</div>
<div id="printFrom" class="my-print-box"> <div id="printFrom" class="my-print-box">
<div v-for="(item, index) in printData.idCardList" :key="index"> <div v-for="(item, index) in printData.idCardList" :key="index">
<el-form class="print-card"> <el-form class="print-card">
@ -8,7 +17,9 @@
<el-col :span="7"> <el-col :span="7">
<img src="@/assets/logo/lanjv.png" class="report-logo" /> <img src="@/assets/logo/lanjv.png" class="report-logo" />
</el-col> </el-col>
<el-col :span="10" class="center-text"> </el-row>
<el-row>
<el-col class="center-text">
<span>产品标识卡</span> <span>产品标识卡</span>
</el-col> </el-col>
</el-row> </el-row>
@ -16,11 +27,11 @@
<el-row class="my-print-foot"> <el-row class="my-print-foot">
<el-col :offset="1" :span="10"> <el-col :offset="1" :span="10">
<div>产品名称: {{ printData.factory }}</div><br /> <div class="card-div1">产品名称: {{ item.productName }}</div><br />
<div>批次号: {{ printData.factory }}</div><br /> <div class="card-div1">批次号: {{ item.batchCode }}</div><br />
<div>生产日期: {{ printData.factory }}</div><br /> <div class="card-div2">生产日期: {{ item.productDateStr }}</div><br />
<div>板次: {{ printData.factory }}</div><br /> <div class="card-div2">板次: {{ item.palletNo }}</div><br />
<div>数量: {{ printData.factory }}</div> <div class="card-div2">数量: {{ item.batchQuantity }}</div>
</el-col> </el-col>
<el-col :offset="1" :span="10"> <el-col :offset="1" :span="10">
<canvas :id="'qrcode-' + index" class="qrcode"></canvas> <canvas :id="'qrcode-' + index" class="qrcode"></canvas>
@ -28,7 +39,7 @@
</el-row> </el-row>
</el-form> </el-form>
<div style="clear: both; margin-bottom: 30px;"></div> <div style="clear: both; margin-bottom: 30px;"></div>
<div v-if="(index + 1) % 2 === 0" class="print-page"></div> <div v-if="(index + 1) % 1 === 0" class="print-page"></div>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -51,7 +62,7 @@ export default {
}, },
data() { data() {
return { return {
idCardsNum: 1, idCardsNum: null,
optType: undefined, optType: undefined,
// //
loading: true, loading: true,
@ -89,12 +100,13 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
//this.showPrint();
}, },
methods: { methods: {
init(workorderCode){ init(workorderCode){
this.workorderCode = workorderCode; this.workorderCode = workorderCode;
this.showPrint();
}, },
// - // -
@ -107,7 +119,7 @@ export default {
header: params.header, // '', header: params.header, // '',
targetStyles: ['*'], targetStyles: ['*'],
style: ` style: `
@page { margin: 30mm 10mm; } @page { size: A5 landscape; } body { margin: 10mm; padding: 0; }
.print-page { page-break-after: always; } .print-page { page-break-after: always; }
`, `,
ignoreElements: params.ignore || [], ignoreElements: params.ignore || [],
@ -116,12 +128,17 @@ export default {
// - // -
async showPrint() { async showPrint() {
console.log('执行了打印预览'); console.log('执行了打印预览');
let response = await getIdCardList(this.workorderCode,this.idCardNum); let params = {
this.printData.idCardList = response.idCards; };
if(this.idCardsNum!=null){
params.palletNo=this.idCardsNum;
}
let response = await getIdCardList({workorderCode:this.workorderCode,...params});
this.printData.idCardList = response;
this.$nextTick(() => { this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => { this.printData.idCardList.forEach((item, index) => {
const canvas = document.getElementById('qrcode-' + index); const canvas = document.getElementById('qrcode-' + index);
QRCode.toCanvas(canvas, item, { width: 350,margin:1 }, function (error) { QRCode.toCanvas(canvas, item.palletCode, { width: 350,margin:1 }, function (error) {
if (error) console.error(error); if (error) console.error(error);
console.log('success!'); console.log('success!');
}); });
@ -138,7 +155,7 @@ export default {
} }
.center-text { .center-text {
text-align: left; text-align: center;
font-size: 63px; font-size: 63px;
font-weight: 800; font-weight: 800;
color: black; color: black;
@ -190,5 +207,14 @@ export default {
-webkit-print-color-adjust: exact; -webkit-print-color-adjust: exact;
} }
} }
.card-div1{
font-size: 20px;
font-weight: 600;
padding-top: 14px;
}
.card-div2{
font-size: 22px;
font-weight: 700;
padding-top: 14px;
}
</style> </style>

@ -210,8 +210,8 @@
</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="standardNo">
<el-input v-model="form.sampleQuality" disabled /> <el-input v-model="form.standardNo" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -238,7 +238,7 @@
<el-table-column label="序号" align="center" type="index" width="50"/> <el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="projectRuleName" /> <el-table-column label="检验项目" align="center" prop="projectRuleName" />
<el-table-column label="标准要求" align="center" prop="checkStandard" width="160"/> <el-table-column label="标准要求" align="center" prop="checkStandard" width="160"/>
<el-table-column label="抽检数" align="center" prop="sampleNum" width="60"/> <el-table-column label="抽检数" align="center" prop="samplePlan" width="60"/>
<el-table-column label="实测结果" align="center" prop="actualValue" width="180"/> <el-table-column label="实测结果" align="center" prop="actualValue" width="180"/>
<el-table-column label="判定" align="center" prop="status" width="70"> <el-table-column label="判定" align="center" prop="status" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
@ -265,14 +265,13 @@
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="综合检验结论" label-width="100px"> <el-form-item label="综合检验结论" label-width="100px">
<el-checkbox-group v-model="form.checkedValues"> <el-col :span="6">
<el-col offset="6" span="6"> <span v-if="this.checkResult=='Y'"></span>
<el-checkbox label="Y">合格</el-checkbox> <span label="N" v-else>×</span>
</el-col> </el-col>
<el-col offset="3" span="6"> <el-col :span="8">
<el-checkbox label="N">不合格</el-checkbox> 备注:判定合格打不合格打×
</el-col> </el-col>
</el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -330,6 +329,7 @@ export default {
// //
formRef: 'form', formRef: 'form',
validateRules: [], validateRules: [],
checkResult: 'Y',
printData: { printData: {
printable: 'printFrom', printable: 'printFrom',
ignore: ['no-print'], ignore: ['no-print'],
@ -424,9 +424,12 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
if(this.queryParams.checkTimeArray.length>0){ if(this.queryParams.checkTimeArray != null &&this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); 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'); this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
} }
listIncome(this.queryParams).then(response => { listIncome(this.queryParams).then(response => {
@ -505,9 +508,10 @@ export default {
getIncome(recordId).then(response => { getIncome(recordId).then(response => {
this.form = response.data; this.form = response.data;
let checkedValues0 =[]; //let checkedValues0 =[];
checkedValues0.push(response.data.checkResult) //checkedValues0.push(response.data.checkResult)
this.form.checkedValues = checkedValues0; //this.form.checkedValues = checkedValues0;
this.checkResult = response.data.checkResult;
this.form.printable = 'printFrom'; // this.form.printable = 'printFrom'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//

@ -521,9 +521,20 @@
<el-descriptions title="" border :column="1" :labelStyle="{width: '123px'}" :contentStyle="{width:'85%'}"> <el-descriptions title="" border :column="1" :labelStyle="{width: '123px'}" :contentStyle="{width:'85%'}">
<el-descriptions-item label="批量或致命性质量异常"></el-descriptions-item> <el-descriptions-item label="批量或致命性质量异常"></el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions title="" border :column="1" :labelStyle="{width:'100%'}" :contentStyle="{width:'0%'}"> <div style="display: flex;justify-content: space-between;">
<el-descriptions-item label="备注:无异常的打√,有异常的描述异常及数量比例,有数据的需要填写数据"></el-descriptions-item> <div style="width: 50%;">
<el-descriptions title="" border :span="2" :column="1" :labelStyle="{width:'50%'}" :contentStyle="{width:'0%'}">
<el-descriptions-item label="备注:无异常的打√,有异常的描述异常及数量比例,有数据的需要填写数据">
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div>
<div style="width: 50%;">
<el-descriptions title="" border :column="1" :labelStyle="{width:'5%'}" :contentStyle="{width:'50%'}">
<el-descriptions-item label="说明">{{form.bz}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<br/> <br/>
<!-- 底部 --> <!-- 底部 -->
<el-row class="my-print-foot"> <el-row class="my-print-foot">

@ -134,13 +134,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="8" :span="8" class="center-text"> <el-col class="center-text">
<h2>成品检验报告</h2> <h2>成品检验报告</h2>
</el-col> </el-col>
</el-row> </el-row>
<el-descriptions title="" border :column="3" :contentStyle="content_style" :label-style="label_style"> <el-descriptions title="" border :column="3" :contentStyle="content_style" :label-style="label_style">
<el-descriptions-item label="产品名称" class="my-description-item1">{{form.materialName}}</el-descriptions-item> <el-descriptions-item label="产品名称" class="my-description-item1">{{form.materialName}}</el-descriptions-item>
<el-descriptions-item label="生产数量" class="my-description-item2">{{form.quality}}</el-descriptions-item> <el-descriptions-item label="生产数量(单位/箱)" class="my-description-item2">{{form.quality}}</el-descriptions-item>
<el-descriptions-item label="检验编码" class="my-description-item3">{{form.checkNo}}</el-descriptions-item> <el-descriptions-item label="检验编码" class="my-description-item3">{{form.checkNo}}</el-descriptions-item>
<el-descriptions-item label="产品编码" class="my-description-item1">{{form.materialCode}}</el-descriptions-item> <el-descriptions-item label="产品编码" class="my-description-item1">{{form.materialCode}}</el-descriptions-item>
@ -161,7 +161,7 @@
<el-table-column label="序号" align="center" type="index" width="50"/> <el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="projectRuleName" width="100"/> <el-table-column label="检验项目" align="center" prop="projectRuleName" width="100"/>
<el-table-column label="标准要求" align="center" prop="checkStandard"/> <el-table-column label="标准要求" align="center" prop="checkStandard"/>
<el-table-column label="抽检数" align="center" prop="samplePlan" width="60"/> <el-table-column label="抽检数(PC)" align="center" prop="samplePlan" width="60"/>
<!--<el-table-column label="单位" align="center" prop="unitCode" width="50"/>--> <!--<el-table-column label="单位" align="center" prop="unitCode" width="50"/>-->
<el-table-column label="实测结果及判定" align="center"> <el-table-column label="实测结果及判定" align="center">
<el-table-column label="实测结果" align="center" prop="actualValue" width="120"/> <el-table-column label="实测结果" align="center" prop="actualValue" width="120"/>
@ -196,7 +196,7 @@
<el-table-column label="序号" align="center" type="index" width="50"/> <el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="检验项目" align="center" prop="projectRuleName" width="100"/> <el-table-column label="检验项目" align="center" prop="projectRuleName" width="100"/>
<el-table-column label="标准要求" align="center" prop="checkStandard"/> <el-table-column label="标准要求" align="center" prop="checkStandard"/>
<el-table-column label="抽检数" align="center" prop="samplePlan" width="60"/> <el-table-column label="抽检数(PC)" align="center" prop="samplePlan" width="60"/>
<el-table-column label="实测结果及判定" align="center"> <el-table-column label="实测结果及判定" align="center">
<el-table-column label="实测结果" align="center" prop="actualValue" width="120"/> <el-table-column label="实测结果" align="center" prop="actualValue" width="120"/>
<el-table-column label="判定" align="center" prop="status" width="110"/> <el-table-column label="判定" align="center" prop="status" width="110"/>
@ -206,19 +206,13 @@
</el-row> </el-row>
<el-descriptions title="" border :column="1"> <el-descriptions title="" border :column="1">
<el-descriptions-item label="综合检验结论"> <el-descriptions-item label="综合检验结论">
<el-col :span="6">
<el-col offset="1" span="6"> <span v-if="this.checkResult=='Y'"></span>
<el-checkbox-group v-model="form.checkedValues"> <span label="N" v-else>×</span>
<el-checkbox label="Y">合格</el-checkbox>
<el-checkbox label="N">不合格</el-checkbox>
</el-checkbox-group>
</el-col> </el-col>
<el-col span="8"> <el-col :span="8">
判定合格打不合格打× 备注:判定合格打不合格打×
</el-col> </el-col>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<!-- <!--
@ -279,6 +273,7 @@ export default {
// //
formRef: 'form', formRef: 'form',
validateRules: [], validateRules: [],
checkResult: 'Y',
printData: { printData: {
printable: 'printFrom', printable: 'printFrom',
ignore: ['no-print'], ignore: ['no-print'],
@ -296,6 +291,7 @@ export default {
incomeList: [], incomeList: [],
// //
checkProjectList: [], checkProjectList: [],
checkProjectList0:[],
defectList: [], defectList: [],
// //
title: "", title: "",
@ -389,9 +385,12 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
if(this.queryParams.checkTimeArray.length>0){ if(this.queryParams.checkTimeArray != null &&this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); 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'); this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
} }
listProduct(this.queryParams).then(response => { listProduct(this.queryParams).then(response => {
@ -470,9 +469,9 @@ export default {
this.queryParams.recordId = recordId; this.queryParams.recordId = recordId;
getProduct(recordId).then(response => { getProduct(recordId).then(response => {
this.form = response.data; this.form = response.data;
let checkedValues0 =[]; //let checkedValues0 =[];
checkedValues0.push(response.data.checkResult) this.checkResult = response.data.checkResult;
this.form.checkedValues = checkedValues0; //this.form.checkedValues = checkedValues0;
this.form.printable = 'printFrom'; // this.form.printable = 'printFrom'; //
this.form.ignore = ['no-print'];// this.form.ignore = ['no-print'];//
this.open = true; this.open = true;
@ -534,6 +533,8 @@ export default {
item.status = '合格'; item.status = '合格';
}else if(item.status == 'N'){ }else if(item.status == 'N'){
item.status = '不合格'; item.status = '不合格';
}else if(item.status == '未检验'){
item.status = '未检验';
}else{ }else{
item.status = '/'; item.status = '/';
} }

@ -384,6 +384,11 @@
style="width: 320px" style="width: 320px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="标准模板" prop="mvgr5">
<el-input v-model="form.mvgr5" placeholder="请输入建议标准模板" />
</el-form-item>
<el-form-item label="是否启用" prop="activeFlag"> <el-form-item label="是否启用" prop="activeFlag">
<el-select <el-select
v-model="form.activeFlag" v-model="form.activeFlag"
@ -448,22 +453,15 @@
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!-- <el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-form-item label="标准效率" prop="iei">
<el-input-number <el-input-number
v-model="form.iei" v-model="form.warehouseCycle"
style="width: 320px" style="width: 320px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="标准用人" prop="manStandar"> <el-form-item label="每托盘最大箱数" prop="palletNum">
<el-input-number <el-input-number
v-model="form.manStandar" v-model="form.palletNum"
style="width: 320px"
/>
</el-form-item>-->
<el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-input-number
v-model="form.warehouseCycle"
style="width: 320px" style="width: 320px"
/> />
</el-form-item> </el-form-item>

Loading…
Cancel
Save