@@ -84,6 +89,13 @@
+
+
+
+
+
+
+
@@ -397,6 +409,11 @@
+
+
+
+
+
@@ -417,23 +434,7 @@
-
-
-
-
-
-
-
- {{ option.label }}
-
-
-
-
-
-
+
@@ -445,7 +446,6 @@ import { listChemicalItem } from "@/api/mes/qc/chemicalItem";
import { listPhysicalItem } from "@/api/mes/qc/physicalItem";
import CoilSelector from "@/components/CoilSelector/index.vue";
import CertificatePrintPreview from "./components/CertificatePrintPreview.vue";
-import { templateOptions } from "./components/templates";
import { print as printPdf } from "./lib/printUtils";
export default {
@@ -461,7 +461,13 @@ export default {
},
data() {
return {
- templateOptions,
+ certificateTypeOptions: [
+ { value: '冷硬', label: '冷硬' },
+ { value: '镀锌', label: '镀锌' },
+ { value: '镀铬', label: '镀铬' },
+ { value: '原料', label: '原料' }
+ ],
+ certificateTypeFilter: undefined,
buttonLoading: false,
loading: false,
certificateLoading: false,
@@ -480,9 +486,7 @@ export default {
printComponentVisible: false,
printCertificateData: {},
printItemsData: [],
- templateDialogVisible: false,
selectedTemplateType: 'chromium',
- templateDialogResolve: null,
certificateForm: {
certificateNo: '',
contractNo: '',
@@ -491,6 +495,7 @@ export default {
consignee: '',
manufacturer: '',
issueDate: '',
+ certificateType: undefined,
remark: ''
},
coilLoading: false,
@@ -508,7 +513,8 @@ export default {
pageSize: 10,
certificateNo: undefined,
contractNo: undefined,
- productName: undefined
+ productName: undefined,
+ certificateType: undefined
},
coilQueryParams: {
pageNum: 1,
@@ -540,6 +546,15 @@ export default {
.replace('{i}', minute.toString().padStart(2, '0'))
.replace('{s}', second.toString().padStart(2, '0'));
},
+ getTemplateType(certificateType) {
+ const map = {
+ '冷硬': 'coldHard',
+ '镀锌': 'galvanizing',
+ '镀铬': 'chromium',
+ '原料': 'rawMaterial'
+ };
+ return map[certificateType] || 'chromium';
+ },
getCertificateList() {
this.certificateLoading = true;
listCertificate(this.certificateQueryParams).then(response => {
@@ -559,8 +574,15 @@ export default {
pageSize: 10,
certificateNo: undefined,
contractNo: undefined,
- productName: undefined
+ productName: undefined,
+ certificateType: undefined
};
+ this.certificateTypeFilter = undefined;
+ this.getCertificateList();
+ },
+ handleCertificateTypeFilterChange(val) {
+ this.certificateQueryParams.certificateType = val || undefined;
+ this.certificateQueryParams.pageNum = 1;
this.getCertificateList();
},
handleTabClick(certificate) {
@@ -730,6 +752,7 @@ export default {
consignee: '',
manufacturer: '',
issueDate: '',
+ certificateType: this.certificateTypeFilter || undefined,
note: 'D.T=Denu_Test \t T.S=Tensile Strength \t D=弯心直径MandrelDiameter \n Strength \t G.L=拉伸标距GaugeLength \t EL=Percentage Elongation After Fracture',
remark: '1.本产品经检验满足订货标准要求。The material has been tested with satisfactory resultsin accordance with the speciicatication \n 2.本质量证明书中空白项目均不作为交货条件。The blank items shouldn’tbe regarded as delivery conditions. \n 3.盖章后生效。The quality certificate willcome into force with a valid stamp.',
};
@@ -823,30 +846,13 @@ export default {
});
},
async handlePrint() {
- const confirmed = await this.showTemplateDialog();
- if (!confirmed) return;
-
+ this.selectedTemplateType = this.getTemplateType(this.currentCertificateInfo.certificateType);
this.printCertificateData = this.currentCertificateInfo;
this.printItemsData = this.certificateItemList || [];
- this.$nextTick(() => {
- const el = this.$refs.certificatePrint.$refs.certificateContent;
- console.log(el);
- printPdf(el);
- });
+ await this.$nextTick();
+ const el = this.$refs.certificatePrint.$refs.certificateContent;
+ printPdf(el);
},
- showTemplateDialog() {
- return new Promise((resolve) => {
- this.templateDialogResolve = resolve;
- this.templateDialogVisible = true;
- });
- },
- confirmTemplate() {
- this.templateDialogVisible = false;
- if (this.templateDialogResolve) {
- this.templateDialogResolve(true);
- this.templateDialogResolve = null;
- }
- }
}
};
@@ -858,27 +864,49 @@ export default {
margin-bottom: 20px;
}
-.select-button {
+.filter-group {
display: flex;
align-items: center;
- gap: 8px;
- padding: 10px 16px;
border: 1px solid #e4e7ed;
border-radius: 4px;
+ overflow: hidden;
+ margin-right: 10px;
+ background-color: #f9f9f9;
+}
+
+.filter-group:hover {
+ border-color: #c6e2ff;
+}
+
+.filter-group .select-button {
+ display: flex;
+ align-items: center;
+ padding: 10px 12px;
cursor: pointer;
transition: all 0.3s ease;
background-color: #f9f9f9;
- color: #606266;
+ color: #409eff;
font-size: 14px;
user-select: none;
- margin-right: 10px;
- color: #409eff;
+ border-right: 1px solid #e4e7ed;
}
-.select-button:hover {
+.filter-group .select-button:hover {
background-color: #ecf5ff;
- border-color: #c6e2ff;
- color: #409eff;
+}
+
+.filter-group .el-select {
+ width: 140px;
+}
+
+.filter-group .el-select >>> .el-input__inner {
+ border: none;
+ background: transparent;
+ border-radius: 0;
+}
+
+.filter-group .el-select >>> .el-input__suffix {
+ right: 8px;
}
.custom-tabs {
@@ -1021,45 +1049,5 @@ export default {
padding: 0;
}
-.template-selection {
- padding: 20px;
-}
-.template-radio-group {
- display: flex;
- flex-direction: column;
- gap: 15px;
-}
-
-.template-radio {
- display: flex;
- align-items: center;
- margin: 0;
- padding: 15px;
- border: 1px solid #e4e7ed;
- border-radius: 8px;
- transition: all 0.3s ease;
-}
-
-.template-radio:hover {
- border-color: #409eff;
- background-color: #ecf5ff;
-}
-
-.template-radio.is-checked {
- border-color: #409eff;
- background-color: #ecf5ff;
-}
-
-.template-option {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 14px;
-}
-
-.template-option i {
- font-size: 20px;
- color: #409eff;
-}
diff --git a/klp-ui/src/views/mes/roll/grind/index.vue b/klp-ui/src/views/mes/roll/grind/index.vue
index b9ea6df5..32082c53 100644
--- a/klp-ui/src/views/mes/roll/grind/index.vue
+++ b/klp-ui/src/views/mes/roll/grind/index.vue
@@ -109,7 +109,7 @@