From 1d4a28988b14b464e8325e1197b908714f15af7e Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 20 Nov 2024 10:20:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=98=B2=E6=8A=96=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E7=AD=89=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 8 ++++++ src/pages/login/index.vue | 2 +- src/pages/picking/outbound/code-outbound.vue | 20 +++++++++---- src/pages/picking/outbound/details.vue | 30 ++++++++++---------- src/pages/picking/outbound/index.vue | 8 +++--- src/utils/http.js | 2 +- vite.config.js | 2 +- 8 files changed, 46 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index d8eff57..ccfa0da 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001", "@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001", "@rollup/rollup-darwin-arm64": "^4.27.2", + "lodash-es": "^4.17.21", "pinia": "^2.2.2", "pinia-plugin-persistedstate": "^3.2.3", "sass": "^1.32.13", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f875e58..297e976 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: '@rollup/rollup-darwin-arm64': specifier: ^4.27.2 version: 4.27.2 + lodash-es: + specifier: ^4.17.21 + version: 4.17.21 pinia: specifier: ^2.2.2 version: 2.2.6(vue@3.5.13) @@ -2748,6 +2751,9 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} @@ -7555,6 +7561,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash-es@4.17.21: {} + lodash.camelcase@4.3.0: {} lodash.debounce@4.0.8: {} diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index fc535a0..36ae7c7 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -39,7 +39,7 @@ const loginForm = reactive({ // 登录按钮 const onHandleLogin = async () => { const res = await appLoginAPI(loginForm) - console.log(res) + console.log(res) if (res.code === 200) { // 1. 获取 token 并存储 memberStore.setToken(res.data.access_token) diff --git a/src/pages/picking/outbound/code-outbound.vue b/src/pages/picking/outbound/code-outbound.vue index 19a80c6..a2b3bef 100644 --- a/src/pages/picking/outbound/code-outbound.vue +++ b/src/pages/picking/outbound/code-outbound.vue @@ -62,8 +62,9 @@ background-color: #fff7eb; border: 1px solid #fe9a09; " - >编码检索 + @tap="onCodeSearch" + >编码检索 + @@ -150,13 +151,22 @@ const getCodeDeviceListData = async () => { // console.log('queryCodeParams', queryCodeParams) const res = await getCodeDeviceListAPI(queryCodeParams.value) codeDeviceList.value.push(...res.rows) - codeDeviceList.value = codeDeviceList.value.map((e) => { - return { ...e, checked: false } - }) + + if (codeDeviceList.value.length > 0) { + codeDeviceList.value = codeDeviceList.value.map((e) => { + return { ...e, checked: false } + }) + } total.value = res.total } getCodeDeviceListData() +// 编码搜索按钮 +const onCodeSearch = () => { + codeDeviceList.value = [] + getCodeDeviceListData() +} + // 滚动触底事件 const onScrollTolower = () => { console.log('滚动触底--') diff --git a/src/pages/picking/outbound/details.vue b/src/pages/picking/outbound/details.vue index 3d4bcbd..610020d 100644 --- a/src/pages/picking/outbound/details.vue +++ b/src/pages/picking/outbound/details.vue @@ -19,47 +19,47 @@ class="table-list-item" @tap="onCodingItem(item)" > -
+