From 9597b1df912c1ca4401a74970d9472e268b3a9c2 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周六, 07 12月 2024 15:12:59 +0800 Subject: [PATCH] 33 --- LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/manualFeed/index.vue | 329 ++++++++++++++++++++++++++++++------------------------ 1 files changed, 181 insertions(+), 148 deletions(-) diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/manualFeed/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/manualFeed/index.vue index f57499c..f4984ff 100644 --- a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/manualFeed/index.vue +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/manualFeed/index.vue @@ -1,19 +1,27 @@ 锘�<template> <div class="wmsSubstituteGood-container"> - <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> - <el-form :model="queryParams" ref="queryForm" labelWidth="100"> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-form :model="queryParams" @submit.native.prevent ref="queryForm" labelWidth="100"> <el-row> - <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="4" class="mb10"> - <el-form-item label="閮ㄤ欢鏉$爜"> - <el-input v-model="queryParams.upi" ref="materialCodeInput" clearable="" placeholder="璇锋壂閮ㄤ欢鏉$爜" /> + <el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="10" class="mb10"> + <el-form-item label="閮ㄤ欢鏉$爜" size="large"> + <el-input + size="large" + v-model="queryParams.upi" + ref="materialCodeInput" + clearable="" + placeholder="璇锋壂閮ㄤ欢鏉$爜" + @keyup.enter.prevent="handleEnter" + @confirm.enter.prevent="handleEnter" + /> </el-form-item> </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6" class="mb10"> <el-form-item> <el-button-group style="display: flex; align-items: center"> - <el-button type="primary" icon="ele-Search" @click="handleQuery"> 鏌ヨ </el-button> - <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 閲嶇疆 </el-button> + <el-button size="large" type="primary" icon="ele-Search" @click="handleQuery"> 鏌ヨ </el-button> + <el-button size="large" icon="ele-Refresh" @click="reset"> 閲嶇疆 </el-button> <!-- <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 闅愯棌 </el-button> --> @@ -23,32 +31,34 @@ </el-col> </el-row> </el-form> - </el-card> - <el-card class="full-table" shadow="hover" style="margin-top: 5px"> - <div class="detailBox"> + <br /> + <div class="detailBox" style="height: calc(65vh)"> + <div class="titleTip"> + <div class="" v-show="isSuccess == '鎴愬姛'"> + <svg t="1732788314050" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11359" width="100" height="100"> + <path + d="M874.119618 149.859922A510.816461 510.816461 0 0 0 511.997 0.00208a509.910462 509.910462 0 0 0-362.119618 149.857842c-199.817789 199.679789-199.817789 524.581447 0 724.260236a509.969462 509.969462 0 0 0 362.119618 149.857842A508.872463 508.872463 0 0 0 874.119618 874.120158c199.836789-199.679789 199.836789-524.581447 0-724.260236zM814.94268 378.210681L470.999043 744.132295a15.359984 15.359984 0 0 1-5.887994 4.095996c-1.751998 1.180999-2.913997 2.362998-5.276994 2.913997a34.499964 34.499964 0 0 1-13.469986 2.914997 45.547952 45.547952 0 0 1-12.897986-2.303998l-4.095996-2.363997a45.291952 45.291952 0 0 1-7.009992-4.095996l-196.902793-193.789796a34.126964 34.126964 0 0 1-10.555989-25.186973c0-9.37399 3.583996-18.74698 9.98399-25.186974a36.429962 36.429962 0 0 1 50.372947 0l169.98382 167.423824L763.389735 330.220732a37.059961 37.059961 0 0 1 50.371947-1.732998 33.647965 33.647965 0 0 1 11.165988 25.186973 35.544963 35.544963 0 0 1-9.98399 24.575974v-0.04z m0 0" + fill="#52C41A" + p-id="11360" + ></path> + </svg> + <p class="okText">琛ヤ欢璇锋眰鎴愬姛锛�</p> + </div> + <div class="" v-show="isSuccess && isSuccess != '鎴愬姛'"> + <svg t="1732842594517" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4303" width="100" height="100"> + <path + d="M549.044706 512l166.189176-166.249412a26.383059 26.383059 0 0 0 0-36.98447 26.383059 26.383059 0 0 0-37.044706 0L512 475.015529l-166.249412-166.249411a26.383059 26.383059 0 0 0-36.98447 0 26.383059 26.383059 0 0 0 0 37.044706L475.015529 512l-166.249411 166.249412a26.383059 26.383059 0 0 0 0 36.98447 26.383059 26.383059 0 0 0 37.044706 0L512 548.984471l166.249412 166.249411a26.383059 26.383059 0 0 0 36.98447 0 26.383059 26.383059 0 0 0 0-37.044706L548.984471 512zM512 1024a512 512 0 1 1 0-1024 512 512 0 0 1 0 1024z" + fill="#E84335" + p-id="4304" + ></path> + </svg> + <p class="no_okText">{{ isSuccess }}</p> + </div> + </div> <ul> - <!-- <li v-for="(item,index) in sourceEnum" :key="index"> - {{ titleP[index] }} : {{ warehousOrderDetails[item] }} - </li> --> <li> - <span class="text_left">鐗╂枡缂栧彿:</span> - <span class="text_rt">{{ tableData.Info16 }}</span> - </li> - <li> - <span class="text_left">鏄惁榻愬寘:</span> - <span class="text_rt"></span> - </li> - <li> - <span class="text_left">鏄惁榻愬:</span> - <span class="text_rt"></span> - </li> - <li> - <span class="text_left">鎵规鍙�:</span> - <span class="text_rt">{{ tableData.planNo }}</span> - </li> - <li> - <span class="text_left">璁㈠崟鍙�:</span> - <span class="text_rt">{{ tableData.OrderId }}</span> + <span class="text_left">鍖呰缂栧彿:</span> + <span class="text_rt">{{ tableData.packageCode }}</span> </li> <li> <span class="text_left">閮ㄤ欢鏉$爜:</span> @@ -57,14 +67,57 @@ <li> <span class="text_left">閮ㄤ欢鍚嶇О:</span> - <span class="text_rt">{{ tableData.DetailName }}</span> - </li> - <li> - <span class="text_left">瀹㈡埛鍚嶇О:</span> - <span class="text_rt">{{ tableData.Info10 }}</span> + <span class="text_rt">{{ tableData.detailName }}</span> </li> <li> + <span class="text_left">鎵规鍙�:</span> + <span class="text_rt">{{ tableData.planNo }}</span> + </li> + <li> + <span class="text_left">璁㈠崟鍙�:</span> + <span class="text_rt">{{ tableData.orderId }}</span> + </li> + <li> + <span class="text_left">闀�:</span> + <span class="text_rt">{{ tableData.length }}</span> + </li> + <li> + <span class="text_left">瀹�:</span> + <span class="text_rt">{{ tableData.width }}</span> + </li> + <li> + <span class="text_left">鍘�:</span> + <span class="text_rt">{{ tableData.thk }}</span> + </li> + + <li> + <span class="text_left">閿�鍞悎鍚屽崟鍙�:</span> + <span class="text_rt">{{ tableData.info4 }}</span> + </li> + + <li> + <span class="text_left">瀹㈡埛鍚嶇О:</span> + <span class="text_rt">{{ tableData.info10 }}</span> + </li> + <li> + <span class="text_left">鑷彁鎴栧彂璐�:</span> + <span class="text_rt">{{ tableData.info11 }}</span> + </li> + <li> + <span class="text_left">鍖呰閮ㄤ欢鎬绘暟閲�:</span> + <span class="text_rt">{{ tableData.info12 }}</span> + </li> + <li> + <span class="text_left">鍖呰闈㈢Н:</span> + <span class="text_rt">{{ tableData.info13 }}</span> + </li> + <!-- <li> + <span class="text_left">瀹㈡埛鍚嶇О:</span> + <span class="text_rt">{{ tableData.Info10 }}</span> + </li> --> + + <!-- <li> <span class="text_left">闀�:</span> <span class="text_rt">{{ tableData.length }}</span> </li> @@ -87,7 +140,7 @@ <li> <span class="text_left">鎵撳瓟璁惧缂栧彿:</span> <span class="text_rt">{{ tableData.dRNum }}</span> - </li> + </li> --> </ul> </div> <!-- 鐢熸垚form 榻愬 榻愬寘 璁剧疆ng鍖� --> @@ -120,144 +173,96 @@ </template> <script lang="ts" setup="" name="wmsSubstituteGood"> -import { onMounted, ref } from 'vue'; +import { onBeforeUnmount, onMounted, ref } from 'vue'; import { ElMessageBox, ElMessage } from 'element-plus'; import { auth } from '/@/utils/authFunction'; import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; import { formatDate } from '/@/utils/formatTime'; -import { listMes_BatchOrderUPI_New, deleteMes_BatchOrderUPI_New, importExcelMes_BatchOrderUPI_New, downloadExcelTemplateMes_BatchOrderUPI_New } from '/@/api/main/WmsOrder/mes_BatchOrderUPI_New'; -import printDialog from '/@/views/system/print/component/hiprint/preview.vue'; -import editDialog from '/@/views/main/WmsBase/wmsSubstituteGood/component/editDialog.vue'; -import { pageWmsSubstituteGood, deleteWmsSubstituteGood } from '/@/api/main/WmsBase/wmsSubstituteGood'; +import { ShortageList } from '/@/api/main/ReportCenter/wmsStockQuan_new'; const showAdvanceQueryUI = ref(false); -const printDialogRef = ref(); -const editDialogRef = ref(); const loading = ref(false); -const tableData = ref<any>([]); +const tableData = ref<any>({}); const queryParams = ref<any>({ - upi:"" - + upi: '', }); const tableParams = ref({ page: 1, pageSize: 10, total: 0, }); -const getIsDisabledData = [ - { - value: true, - text: '鏄�', - }, - { - value: false, - text: '鍚�', - }, -]; -const printWmsSubstituteGoodTitle = ref(''); -const editWmsSubstituteGoodTitle = ref(''); -// 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� -const changeAdvanceQueryUI = () => { - showAdvanceQueryUI.value = !showAdvanceQueryUI.value; +//=======================榧犳爣瀹氫綅 鐢ㄤ簬寮曠敤杈撳叆妗�===================== +let materialCodeInput = ref(null); +let inactivityTimer = null; + +// 澶勭悊鐢ㄦ埛娲诲姩鐨勫嚱鏁� +const handleUserActivity = () => { + if (inactivityTimer) { + clearTimeout(inactivityTimer); + } + inactivityTimer = setTimeout(() => { + // 娓呯┖杈撳叆妗嗙殑鍊� + materialCodeInput.value.$el.querySelector('input').value = ''; + materialCodeInput.value.$el.querySelector('input').focus(); + }, 2000); // 璁惧畾2绉掓湭鎿嶄綔鍒欒嚜鍔ㄨ仛鐒� }; -// 鐢ㄤ簬寮曠敤杈撳叆妗� -const materialCodeInput = ref(null); onMounted(() => { // 鍦ㄧ粍浠舵寕杞藉悗杩涜鑱氱劍 - materialCodeInput.value.$el.querySelector('input').focus(); + materialCodeInput.value.$el.querySelector('input').focus(); + document.addEventListener('mousemove', handleUserActivity); + document.addEventListener('keydown', handleUserActivity); }); +onBeforeUnmount(() => { + clearTimeout(inactivityTimer); + document.removeEventListener('mousemove', handleUserActivity); + document.removeEventListener('keydown', handleUserActivity); +}); + +//=======================end榧犳爣瀹氫綅 鐢ㄤ簬寮曠敤杈撳叆妗�===================== +const isSuccess = ref(''); // 鏌ヨ鎿嶄綔 888888888 const handleQuery = async () => { - console.log("鏌ヨ"); - loading.value = true; - var res = await listMes_BatchOrderUPI_New(Object.assign(queryParams.value, tableParams.value)); - if (res.data.result.length != 1) { - ElMessage.warning('娌℃湁鏌ヨ鍒版暟鎹�'); - tableData.value = [] - return; + console.log('8888888杩涘叆鏂规硶', queryParams.value); + if (!queryParams.value.upi) { + return; } - tableData.value = res.data.result[0] ?? []; - loading.value = false; + loading.value = true; + var res = await ShortageList(Object.assign(queryParams.value, tableParams.value)); + + queryParams.value.upi = ''; + handleResponse(res); +}; +const reset = async () => { + queryParams.value={}; + tableData.value ={}; + isSuccess.value =''; }; -// 鍒楁帓搴� -const sortChange = async (column: any) => { - queryParams.value.field = column.prop; - queryParams.value.order = column.order; - await handleQuery(); -}; +function handleResponse(res: any) { + tableData.value = res.data.result ?? {}; + materialCodeInput.value.$el.querySelector('input').value = ''; + materialCodeInput.value.$el.querySelector('input').focus(); + if (res.data.code == 200) { + isSuccess.value = res.data.result ? '鎴愬姛' : res.data.message || '鏈煡璇㈠埌鏁版嵁'; + } else if (res.data.code == 400) { + loading.value = false; + isSuccess.value = res.data.message || '鏈煡璇㈠埌鏁版嵁'; + return; + } else { + loading.value = false; + isSuccess.value = ''; + ElMessage.warning('缃戠粶寮傚父 璇锋眰澶辫触'); + return; + } +} -// 鎵撳紑鏂板椤甸潰 -const openAddWmsSubstituteGood = () => { - editWmsSubstituteGoodTitle.value = '娣诲姞鏇夸唬鍝佺鐞�'; - editDialogRef.value.openDialog({}); -}; - -// 鎵撳紑鎵撳嵃椤甸潰 -const openPrintWmsSubstituteGood = async (row: any) => { - printWmsSubstituteGoodTitle.value = '鎵撳嵃鏇夸唬鍝佺鐞�'; -}; - -// 鎵撳紑缂栬緫椤甸潰 -const openEditWmsSubstituteGood = (row: any) => { - editWmsSubstituteGoodTitle.value = '缂栬緫鏇夸唬鍝佺鐞�'; - editDialogRef.value.openDialog(row); -}; - -// 鍒犻櫎 -const delWmsSubstituteGood = (row: any) => { - ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', - }) - .then(async () => { - var ret = await deleteWmsSubstituteGood(row); - if (ret.data.type == 'success') { - handleQuery(); - ElMessage.success('鍒犻櫎鎴愬姛'); - } - }) - .catch(() => {}); -}; - -// 鏀瑰彉椤甸潰瀹归噺 -const handleSizeChange = (val: number) => { - tableParams.value.pageSize = val; +const handleEnter = (event: Event) => { + event.preventDefault(); // 闃绘榛樿浜嬩欢 handleQuery(); }; - -// 鏀瑰彉椤电爜搴忓彿 -const handleCurrentChange = (val: number) => { - tableParams.value.page = val; - handleQuery(); -}; - -// handleQuery(); - -const rules = { - // 杩欓噷瀹氫箟琛ㄥ崟楠岃瘉瑙勫垯 - completeSet: [{ required: true, message: '璇烽�夋嫨榻愬', trigger: 'change' }], - packageSetup: [{ required: true, message: '璇疯緭鍏ラ綈鍖呰缃�', trigger: 'blur' }], - ngPackage: [{ required: true, message: '璇疯緭鍏g鍖�', trigger: 'blur' }], -}; - -const ruleForm = ref({ - id: '', - completeSet: '', - packageSetup: '', - ngPackage: '', -}); - -const sourceEnum: any = ref([ - { - value: 'id', - text: 'ID', - }, -]); </script> <style scoped> :deep(.el-input), @@ -275,13 +280,41 @@ margin: 0; padding: 0; li { + margin-top: 20px; display: block; line-height: 30px; text-align: left; list-style-type: none; - width: 25%; + width: 48%; + display: inline-block; word-wrap: break-word; } } } +.text_left { + font-weight: 700; + font-size: 40px; /* 璋冩暣瀛椾綋澶у皬 */ +} +.text_rt { + font-weight: 700; + color: #00B2EE; /* 璁剧疆鍥炬爣棰滆壊 */ + font-size: 40px; /* 璋冩暣瀛椾綋澶у皬 */ +} +.my-icon { + font-size: 36px; /* 璋冩暣瀛椾綋澶у皬 */ + color: #00ff11; /* 璁剧疆鍥炬爣棰滆壊 */ +} +.titleTip { + font-weight: 700; + text-align: center; + font-size: 60px; /* 璋冩暣瀛椾綋澶у皬 */ + .okText { + margin-bottom: 20px; + color: #52C41A; /* 璁剧疆鍥炬爣棰滆壊 */ + } + .no_okText { + margin-bottom: 20px; + color: #E84335; /* 璁剧疆鍥炬爣棰滆壊 */ + } +} </style> -- Gitblit v1.9.3