| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div class="search-row"> |
| | | <div class="search-item"> |
| | | <span class="search_title">å·¥åç¼å·ï¼</span> |
| | | <el-input v-model="searchForm.workOrderNo" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" /> |
| | | </div> |
| | | <div class="search-item"> |
| | | <el-button type="primary" |
| | | @click="handleQuery">æç´¢</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" /> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | |
| | | <!-- æµè½¬å¡å¼¹çª --> |
| | | <el-dialog v-model="transferCardVisible" |
| | | title="æµè½¬å¡" |
| | | width="1000px"> |
| | | <div class="transfer-card-title">å·¥åæµè½¬å¡</div> |
| | | <div class="transfer-card-container"> |
| | | <div class="transfer-card-info"> |
| | | <div class="info-group"> |
| | | <div class="info-item"> |
| | | <span class="info-label">å·¥åç¼å·</span> |
| | | <span class="info-value">{{ transferCardRowData.workOrderNo }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">产ååç§°</span> |
| | | <span class="info-value">{{ transferCardRowData.productName }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">产åè§æ ¼</span> |
| | | <span class="info-value">{{ transferCardRowData.model }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">计åå¼å§æ¶é´</span> |
| | | <span class="info-value">{{ transferCardRowData.planStartTime }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">计åç»ææ¶é´</span> |
| | | <span class="info-value">{{ transferCardRowData.planEndTime }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">夿³¨</span> |
| | | <span class="info-value">{{ transferCardRowData.remark }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="info-group"> |
| | | <div class="info-item"> |
| | | <span class="info-label">éæ±æ°é</span> |
| | | <span class="info-value">{{ transferCardRowData.planQuantity }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-value">{{ transferCardRowData.completeQuantity }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">è¯åæ°é</span> |
| | | <span class="info-value">0</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">ä¸è¯åæ°</span> |
| | | <span class="info-value">0</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">å®é
å¼å§æ¶é´</span> |
| | | <span class="info-value">{{ transferCardRowData.actualStartTime }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">å®é
ç»ææ¶é´</span> |
| | | <span class="info-value">{{ transferCardRowData.actualEndTime }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="transfer-card-qr"> |
| | | <div class="qr-container"> |
| | | <img :src="transferCardQrUrl" |
| | | alt="æµè½¬å¡äºç»´ç " |
| | | style="width: 200px; height: 200px;" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="print-button-container" |
| | | style=" text-align: center; |
| | | margin-bottom: 40px;"> |
| | | <el-button type="primary" |
| | | style="margin-top: 20px;" |
| | | @click="printTransferCard">æå°æµè½¬å¡</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- æ¥å·¥å¼¹çª --> |
| | | <el-dialog v-model="reportDialogVisible" |
| | | title="æ¥å·¥" |
| | | width="500px"> |
| | | <el-form ref="reportFormRef" |
| | | :model="reportForm" |
| | | :rules="reportFormRules" |
| | | label-width="120px"> |
| | | <el-form-item label="å¾
ç产æ°é"> |
| | | <el-input v-model="reportForm.planQuantity" |
| | | readonly |
| | | style="width: 300px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¬æ¬¡ç产æ°é" |
| | | prop="quantity"> |
| | | <el-input v-model.number="reportForm.quantity" |
| | | type="number" |
| | | min="1" |
| | | step="1" |
| | | style="width: 300px" |
| | | placeholder="请è¾å
¥æ¬æ¬¡ç产æ°é" |
| | | @input="handleQuantityInput" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥åºæ°é" |
| | | prop="scrapQty"> |
| | | <el-input v-model.number="reportForm.scrapQty" |
| | | type="number" |
| | | min="0" |
| | | step="1" |
| | | style="width: 300px" |
| | | placeholder="请è¾å
¥æ¥åºæ°é" |
| | | @input="handleScrapQtyInput" /> |
| | | </el-form-item> |
| | | <el-form-item label="çç»ä¿¡æ¯"> |
| | | <el-select v-model="reportForm.userId" |
| | | style="width: 300px" |
| | | placeholder="è¯·éæ©çç»ä¿¡æ¯" |
| | | clearable |
| | | filterable |
| | | @change="handleUserChange"> |
| | | <el-option v-for="user in userOptions" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="user.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="handleReport">ç¡®å®</el-button> |
| | | <el-button @click="reportDialogVisible = false">åæ¶</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <FilesDia ref="workOrderFilesRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, nextTick } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | productWorkOrderPage, |
| | | addProductMain, |
| | | downProductWorkOrder, |
| | | } from "@/api/productionManagement/workOrder.js"; |
| | | import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import QRCode from "qrcode"; |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | | import FilesDia from "./components/filesDia.vue"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å·¥åç±»å", |
| | | prop: "workOrderType", |
| | | width: "80", |
| | | }, |
| | | { |
| | | label: "å·¥åç¼å·", |
| | | prop: "workOrderNo", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "ç产订åå·", |
| | | prop: "productOrderNpsNo", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "产ååç§°", |
| | | prop: "productName", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "å·¥åºåç§°", |
| | | prop: "processName", |
| | | }, |
| | | { |
| | | label: "éæ±æ°é", |
| | | prop: "planQuantity", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "宿æ°é", |
| | | prop: "completeQuantity", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "宿è¿åº¦", |
| | | prop: "completionStatus", |
| | | dataType: "slot", |
| | | slot: "completionStatus", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "计åå¼å§æ¶é´", |
| | | prop: "planStartTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "计åç»ææ¶é´", |
| | | prop: "planEndTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "å®é
å¼å§æ¶é´", |
| | | prop: "actualStartTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "å®é
ç»ææ¶é´", |
| | | prop: "actualEndTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "æä½", |
| | | width: "200", |
| | | align: "center", |
| | | dataType: "action", |
| | | fixed: "right", |
| | | operation: [ |
| | | { |
| | | name: "æµè½¬å¡", |
| | | clickFun: row => { |
| | | downloadAndPrintWorkOrder(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "éä»¶", |
| | | clickFun: row => { |
| | | openWorkOrderFiles(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¥å·¥", |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const transferCardVisible = ref(false); |
| | | const transferCardData = ref([]); |
| | | const transferCardQrUrl = ref(""); |
| | | const transferCardRowData = ref(null); |
| | | const reportDialogVisible = ref(false); |
| | | const workOrderFilesRef = ref(null); |
| | | const reportFormRef = ref(null); |
| | | const userOptions = ref([]); |
| | | const reportForm = reactive({ |
| | | planQuantity: 0, |
| | | quantity: null, |
| | | scrapQty: null, |
| | | userName: "", |
| | | workOrderId: "", |
| | | reportWork: "", |
| | | productProcessRouteItemId: "", |
| | | userId: "", |
| | | productMainId: null, |
| | | }); |
| | | |
| | | // æ¬æ¬¡ç产æ°ééªè¯è§å |
| | | const validateQuantity = (rule, value, callback) => { |
| | | if (value === null || value === undefined || value === "") { |
| | | callback(new Error("请è¾å
¥æ¬æ¬¡ç产æ°é")); |
| | | return; |
| | | } |
| | | const num = Number(value); |
| | | // æ´æ°ä¸å¤§äºçäº1 |
| | | if (isNaN(num) || !Number.isInteger(num) || num < 1) { |
| | | callback(new Error("æ¬æ¬¡ç产æ°éå¿
须大äºçäº1")); |
| | | return; |
| | | } |
| | | callback(); |
| | | }; |
| | | |
| | | // æ¥åºæ°ééªè¯è§å |
| | | const validateScrapQty = (rule, value, callback) => { |
| | | if (value === null || value === undefined || value === "") { |
| | | callback(); |
| | | return; |
| | | } |
| | | const num = Number(value); |
| | | // æ´æ°ä¸å¤§äºçäº0 |
| | | if (isNaN(num) || !Number.isInteger(num) || num < 0) { |
| | | callback(new Error("æ¥åºæ°éå¿
须大äºçäº0")); |
| | | return; |
| | | } |
| | | callback(); |
| | | }; |
| | | |
| | | // éªè¯è§å |
| | | const reportFormRules = { |
| | | quantity: [{ required: true, validator: validateQuantity, trigger: "blur" }], |
| | | scrapQty: [{ validator: validateScrapQty, trigger: "blur" }], |
| | | }; |
| | | |
| | | // å¤çæ¬æ¬¡ç产æ°éè¾å
¥ï¼éå¶å¿
须大äºçäº1 |
| | | const handleQuantityInput = value => { |
| | | if (value === "" || value === null || value === undefined) { |
| | | reportForm.quantity = null; |
| | | return; |
| | | } |
| | | const num = Number(value); |
| | | if (isNaN(num)) { |
| | | return; |
| | | } |
| | | // 妿å°äº1ï¼æ¸
é¤ |
| | | if (num < 1) { |
| | | reportForm.quantity = null; |
| | | return; |
| | | } |
| | | // 妿æ¯å°æ°åæ´æ°é¨å |
| | | if (!Number.isInteger(num)) { |
| | | const intValue = Math.floor(num); |
| | | // 妿忴åå°äº1ï¼æ¸
é¤ |
| | | if (intValue < 1) { |
| | | reportForm.quantity = null; |
| | | return; |
| | | } |
| | | reportForm.quantity = intValue; |
| | | return; |
| | | } |
| | | reportForm.quantity = num; |
| | | }; |
| | | |
| | | // å¤çæ¥åºæ°é |
| | | const handleScrapQtyInput = value => { |
| | | if (value === "" || value === null || value === undefined) { |
| | | reportForm.scrapQty = null; |
| | | return; |
| | | } |
| | | const num = Number(value); |
| | | // 妿æ¯NaNï¼ä¿æåå¼ |
| | | if (isNaN(num)) { |
| | | return; |
| | | } |
| | | // 妿æ¯è´æ°ï¼æ¸
é¤è¾å
¥ |
| | | if (num < 0) { |
| | | reportForm.scrapQty = null; |
| | | return; |
| | | } |
| | | // 妿æ¯å°æ°ï¼åæ´æ°é¨å |
| | | if (!Number.isInteger(num)) { |
| | | reportForm.scrapQty = Math.floor(num); |
| | | return; |
| | | } |
| | | // ææçéè´æ´æ°ï¼å
æ¬0ï¼ |
| | | reportForm.scrapQty = num; |
| | | }; |
| | | |
| | | const currentReportRowData = ref(null); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | workOrderNo: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const toProgressPercentage = val => { |
| | | const n = Number(val); |
| | | if (!Number.isFinite(n)) return 0; |
| | | if (n <= 0) return 0; |
| | | if (n >= 100) return 100; |
| | | return Math.round(n); |
| | | }; |
| | | const progressColor = percentage => { |
| | | const p = toProgressPercentage(percentage); |
| | | if (p < 30) return "#f56c6c"; |
| | | if (p < 50) return "#e6a23c"; |
| | | if (p < 80) return "#409eff"; |
| | | return "#67c23a"; |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | const pagination = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const params = { ...searchForm.value, ...page }; |
| | | productWorkOrderPage(params) |
| | | .then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // ä¸è½½å¹¶æå°å·¥åæµè½¬å¡ï¼æä»¶æµï¼ |
| | | const downloadAndPrintWorkOrder = async row => { |
| | | if (!row || !row.id) { |
| | | proxy.$modal.msgError("缺å°å·¥åIDï¼æ æ³ä¸è½½æµè½¬å¡"); |
| | | return; |
| | | } |
| | | const fileName = row.workOrderNo |
| | | ? `å·¥åæµè½¬å¡_${row.workOrderNo}.xlsx` |
| | | : "å·¥åæµè½¬å¡.xlsx"; |
| | | try { |
| | | // è°ç¨æ¥å£ï¼ä»¥ responseType: 'blob' è·åæä»¶æµ |
| | | const blob = await downProductWorkOrder(row.id); |
| | | |
| | | if (!blob) { |
| | | proxy.$modal.msgError("æªè·åå°æµè½¬å¡æä»¶"); |
| | | return; |
| | | } |
| | | |
| | | // å建 Blob URL |
| | | const fileBlob = |
| | | blob instanceof Blob |
| | | ? blob |
| | | : new Blob([blob], { type: blob.type || "application/octet-stream" }); |
| | | const url = window.URL.createObjectURL(fileBlob); |
| | | |
| | | // å建éè iframeï¼ç¨äºè§¦åæµè§å¨æå° |
| | | const iframe = document.createElement("iframe"); |
| | | iframe.style.position = "fixed"; |
| | | iframe.style.right = "0"; |
| | | iframe.style.bottom = "0"; |
| | | iframe.style.width = "0"; |
| | | iframe.style.height = "0"; |
| | | iframe.style.border = "0"; |
| | | iframe.src = url; |
| | | document.body.appendChild(iframe); |
| | | |
| | | iframe.onload = () => { |
| | | try { |
| | | iframe.contentWindow?.focus(); |
| | | iframe.contentWindow?.print(); |
| | | } catch (e) { |
| | | console.error("èªå¨è°ç¨æå°å¤±è´¥", e); |
| | | // éèæ±å
¶æ¬¡ï¼æå¼æ°çªå£ç±ç¨æ·æå¨æå° |
| | | window.open(url); |
| | | } |
| | | }; |
| | | } catch (e) { |
| | | console.error("ä¸è½½å·¥åæµè½¬å¡å¤±è´¥", e); |
| | | proxy.$modal.msgError("ä¸è½½å·¥åæµè½¬å¡å¤±è´¥"); |
| | | } |
| | | }; |
| | | |
| | | const showTransferCard = async row => { |
| | | transferCardRowData.value = row; |
| | | const qrContent = String(row.id); |
| | | |
| | | transferCardQrUrl.value = await QRCode.toDataURL(qrContent); |
| | | transferCardVisible.value = true; |
| | | }; |
| | | |
| | | const printTransferCard = () => { |
| | | window.print(); |
| | | }; |
| | | |
| | | const openWorkOrderFiles = row => { |
| | | workOrderFilesRef.value?.openDialog(row); |
| | | }; |
| | | |
| | | const showReportDialog = row => { |
| | | currentReportRowData.value = row; |
| | | reportForm.planQuantity = row.planQuantity; |
| | | reportForm.quantity = |
| | | row.quantity !== undefined && row.quantity !== null ? row.quantity : null; |
| | | reportForm.productProcessRouteItemId = row.productProcessRouteItemId; |
| | | reportForm.workOrderId = row.id; |
| | | reportForm.reportWork = row.reportWork; |
| | | reportForm.productMainId = row.productMainId; |
| | | reportForm.scrapQty = |
| | | row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null; |
| | | nextTick(() => { |
| | | reportFormRef.value?.clearValidate(); |
| | | }); |
| | | // è·åå½åç»å½ç¨æ·ä¿¡æ¯ï¼è®¾ç½®ä¸ºé»è®¤éä¸ |
| | | getUserProfile() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | reportForm.userId = res.data.userId; |
| | | reportForm.userName = res.data.nickName; |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | console.error("è·åç¨æ·ä¿¡æ¯å¤±è´¥", err); |
| | | }); |
| | | |
| | | reportDialogVisible.value = true; |
| | | }; |
| | | |
| | | const handleReport = () => { |
| | | reportFormRef.value?.validate(valid => { |
| | | if (!valid) { |
| | | return false; |
| | | } |
| | | |
| | | if (reportForm.planQuantity <= 0) { |
| | | ElMessageBox.alert("å¾
ç产æ°é为0ï¼æ æ³æ¥å·¥", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // éªè¯æ¬æ¬¡ç产æ°é |
| | | if ( |
| | | reportForm.quantity === null || |
| | | reportForm.quantity === undefined || |
| | | reportForm.quantity === "" |
| | | ) { |
| | | ElMessageBox.alert("请è¾å
¥æ¬æ¬¡ç产æ°é", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | const quantity = Number(reportForm.quantity); |
| | | |
| | | if (isNaN(quantity) || quantity <= 0) { |
| | | ElMessageBox.alert("æ¬æ¬¡ç产æ°éå¿
须大äº0", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (quantity > reportForm.planQuantity) { |
| | | ElMessageBox.alert("æ¬æ¬¡ç产æ°éä¸è½è¶
è¿å¾
ç产æ°é", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // éªè¯æ¥åºæ°é |
| | | const scrapQty = Number(reportForm.scrapQty); |
| | | if (!isNaN(scrapQty) && scrapQty < 0) { |
| | | ElMessageBox.alert("æ¥åºæ°éä¸è½å°äº0", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (!isNaN(scrapQty) && scrapQty > quantity) { |
| | | ElMessageBox.alert("æ¥åºæ°éä¸è½å¤§äºæ¬æ¬¡ç产æ°é", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | const params = { |
| | | quantity: quantity, |
| | | scrapQty: isNaN(scrapQty) ? 0 : scrapQty, |
| | | userId: reportForm.userId, |
| | | userName: reportForm.userName, |
| | | workOrderId: reportForm.workOrderId, |
| | | productProcessRouteItemId: reportForm.productProcessRouteItemId, |
| | | reportWork: reportForm.reportWork, |
| | | productMainId: reportForm.productMainId, |
| | | }; |
| | | |
| | | addProductMain(params) |
| | | .then(res => { |
| | | proxy.$modal.msgSuccess("æ¥å·¥æå"); |
| | | reportDialogVisible.value = false; |
| | | getList(); |
| | | }) |
| | | .catch(() => { |
| | | ElMessageBox.alert("æ¥å·¥å¤±è´¥", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | }); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | const handleUserChange = val => { |
| | | const user = userOptions.value.find(item => item.userId === val); |
| | | reportForm.userName = user ? user.nickName : ""; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | // è·åç¨æ·å表 |
| | | userListNoPageByTenantId().then(res => { |
| | | if (res.code === 200) { |
| | | userOptions.value = res.data; |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .search-row { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | .search-item { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .search_title { |
| | | margin-right: 8px; |
| | | font-size: 14px; |
| | | color: #606266; |
| | | } |
| | | .transfer-card-title { |
| | | text-align: center; |
| | | font-size: 24px; |
| | | font-weight: bold; |
| | | margin-bottom: 20px; |
| | | color: #303133; |
| | | } |
| | | .transfer-card-container { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 20px; |
| | | } |
| | | .transfer-card-info { |
| | | flex: 1; |
| | | margin-right: 20px; |
| | | } |
| | | .info-group { |
| | | margin-bottom: 20px; |
| | | } |
| | | .info-item { |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | | } |
| | | .info-label { |
| | | width: 100px; |
| | | font-weight: bold; |
| | | color: #606266; |
| | | } |
| | | .info-value { |
| | | flex: 1; |
| | | color: #303133; |
| | | } |
| | | .transfer-card-qr { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | .qr-container { |
| | | text-align: center; |
| | | } |
| | | .print-button-container { |
| | | text-align: center; |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss"> |
| | | @media print { |
| | | @page { |
| | | size: landscape; |
| | | } |
| | | body * { |
| | | visibility: hidden; |
| | | } |
| | | .el-dialog__wrapper, |
| | | .el-dialog, |
| | | .el-dialog__body, |
| | | .transfer-card-title, |
| | | .transfer-card-container, |
| | | .transfer-card-container *, |
| | | .info-item, |
| | | .info-label, |
| | | .info-value { |
| | | visibility: visible; |
| | | } |
| | | .print-button-container { |
| | | visibility: hidden; |
| | | } |
| | | .el-dialog__wrapper { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | margin: 0; |
| | | } |
| | | .el-dialog { |
| | | width: 100% !important; |
| | | max-width: 800px; |
| | | margin: 0 auto !important; |
| | | } |
| | | .el-dialog__header, |
| | | .el-dialog__footer { |
| | | display: none; |
| | | } |
| | | .el-dialog__body { |
| | | padding: 20px; |
| | | } |
| | | .transfer-card-container { |
| | | height: auto; |
| | | display: flex; |
| | | gap: 20px; |
| | | } |
| | | .transfer-card-info { |
| | | flex: 1; |
| | | .info-group { |
| | | width: 100%; |
| | | float: none; |
| | | margin-bottom: 20px; |
| | | } |
| | | .info-item { |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | | .info-label { |
| | | width: 100px; |
| | | font-weight: bold; |
| | | margin-right: 15px; |
| | | white-space: nowrap; |
| | | } |
| | | .info-value { |
| | | flex: 1; |
| | | word-break: break-word; |
| | | } |
| | | } |
| | | } |
| | | .transfer-card-qr { |
| | | width: 160px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: flex-start; |
| | | } |
| | | .qr-container img { |
| | | width: 140px !important; |
| | | height: 140px !important; |
| | | } |
| | | } |
| | | </style> |