From eaea3c175b98c5a5c4ab1b4a7b4a7eb34652308d Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Wed, 25 Jun 2025 18:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E5=AD=90=E6=A0=87=E7=AD=BE=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=BC=96=E7=A0=81=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/devicesSearch/codeSearch.vue | 190 ++- src/pages/devicesSearch/qrSearch.vue | 102 +- .../integratedQuery/electronicTag/index.vue | 1167 ++++++++--------- src/services/picking/outbound.js | 16 + 4 files changed, 778 insertions(+), 697 deletions(-) diff --git a/src/pages/devicesSearch/codeSearch.vue b/src/pages/devicesSearch/codeSearch.vue index 6d26c25..0784427 100644 --- a/src/pages/devicesSearch/codeSearch.vue +++ b/src/pages/devicesSearch/codeSearch.vue @@ -19,6 +19,15 @@ >编码检索 +
+ +
@@ -27,66 +36,66 @@ - - 激动角膜 + + {{formData?.maName ?? ''}} - - CJM-2 + + {{formData?.maModel ?? ''}} - - ceshi123 + + {{formData?.qrCode ?? ''}} - - ceshi123 + + {{formData?.maCode ?? ''}} - - 在用 + + {{formData?.maStatus ?? ''}} + + + {{formData?.thisCheckTime ?? ''}} + + + {{formData?.nextCheckTime ?? ''}} + + + {{formData?.inOutNum ?? ''}} + + + {{formData?.inTime ?? ''}} + + + {{formData?.serviceNum ?? ''}} + + + {{formData?.checkNum ?? ''}} + + + {{formData?.checkNum ?? ''}} + + + {{formData?.scrapTime ?? ''}} + + + {{}} + + + {{formData?.leaseUnit ?? ''}} + + + {{formData?.leaseProject ?? ''}} + + + {{formData?.leaseTime ?? ''}} + + + {{formData?.backUnit ?? ''}} + + + {{formData?.backProject ?? ''}} + + + {{formData?.backTime ?? ''}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -102,12 +111,36 @@ import { ref, computed, onUnmounted } from 'vue' import { onLoad, onShow, } from '@dcloudio/uni-app' import { debounce } from 'lodash-es' +import { getDeviceListAPI } from '@/services/picking/outbound.js' const queryParams = ref({}) -const formData = ref({}) +const formData = ref({ + maName: '', + maModel: '', + qrCode: '', + maCode: '', + maStatus: '', + thisCheckTime: '', + nextCheckTime: '', + inOutNum: '', + inTime: '', + serviceNum: '', + checkNum: '', + scrapTime: '', + statusName: '', + leaseUnit: '', + leaseProject: '', + leaseTime: '', + backUnit: '', + backProject: '', + backTime: '' +}) // 编码设备列表查询参数 const queryCodeParams = ref({ maCode: '', + maId:'', }) +const maId = ref('') +const optionList = ref([]) // 页面加载完毕 onLoad((options) => {}) @@ -121,12 +154,55 @@ const onCodeSearch = () => { const getCodeDeviceInfoData = async () => { console.log(queryCodeParams.value) // const res = await getCodeDeviceListAPI(queryCodeParams.value) - // console.log(res) + getDeviceListAPI({'maCode': queryCodeParams.value.maCode}).then(response => { + console.log("xxxxxxxxxxx",response) + if (response.data && response.data.length !== 0) { + optionList.value = response.data.map(option => ({ + value: option.maId, + text: option.maCode + })) + if(response.data.length === 1){ + formData.value = response.data[0] + } + }else{ + uni.showToast({ + title: '未查询到该编号信息', + icon: 'none', + duration: 2000 + }) + } + }) + console.log(res) } +// 标签变更处理 +const changeTag = async () => { + if (!maId.value) return + + try { + const response = await getDeviceListAPI({'maId': maId.value}) + if (response.data && response.data.length !== 0) { + formData.value = response.data[0] + } + } catch (error) { + console.error("获取编号信息失败", error) + uni.showToast({ + title: '获取信息失败', + icon: 'none', + duration: 2000 + }) + } +} + + + +.select-container { + margin-top: 10px; + + .data-select { + width: 100%; + z-index: 1000; + } +} + +.certificate-card { + width: 100%; + min-height: 300px; + margin-top: 15px; + position: relative; + border-radius: 8px; + overflow: visible; + + .certificate-content { + padding: 15px; + position: relative; + min-height: 300px; + } + + .title { + text-align: center; + font-weight: 500; + font-size: 18px; + margin-bottom: 15px; + letter-spacing: 2px; + } + + .info-row { + display: flex; + flex-wrap: wrap; + margin-bottom: 8px; + } + + .info-item { + display: flex; + align-items: center; + font-size: 14px; + padding: 4px 0; + min-height: 24px; + + &.full-width { + width: 100%; + } + + &.align-right { + justify-content: flex-end; + } + } + + .label { + font-weight: 500; + min-width: 90px; + } + + .value { + margin-left: 10px; + flex: 1; + } + + .conclusion { + color: #ef3e3e; + margin-right: 20px; + font-weight: bold; + } + + .report-link { + margin-left: 10px; + text-decoration: underline; + cursor: pointer; + font-weight: 500; + transition: all 0.3s; + + &:hover { + color: #0055aa; + transform: scale(1.05); + } + } + + .stamp-container { + position: absolute; + bottom: 10px; + left: 10px; + width: 140px; + height: 140px; + z-index: 10; + overflow: visible; /* 确保印章不会裁剪 */ + } + + .stamp-canvas { + width: 140px; + height: 140px; + } +} + +.green-certificate { + border: 6px solid #00904a; + + .title { + color: #00904a; + } + + .label { + color: #00904a; + } + + .report-link { + color: #00904a; + } +} + +.blue-certificate { + border: 6px solid #0055aa; + + .title { + color: #0055aa; + } + + .label { + color: #0055aa; + } + + .report-link { + color: #0055aa; + } +} + +:deep(.uni-select) { + z-index: 1001 !important; +} + \ No newline at end of file diff --git a/src/services/picking/outbound.js b/src/services/picking/outbound.js index 1e3bd9c..297e627 100644 --- a/src/services/picking/outbound.js +++ b/src/services/picking/outbound.js @@ -76,6 +76,22 @@ export const getCodeScanAPI = (data) => { data, }) } + +export const getScanCodeAPI = (data) => { + return http({ + method: 'GET', + url: '/material/ma_machine/getHisByQrcode', + data, + }) +} + +export const getDeviceListAPI = (data) => { + return http({ + method: 'GET', + url: '/material/ma_machine/getHisByCode', + data, + }) +} //出库退回 export const leaseOutBackApi = (data) => { return http({