Alex 1 год назад
Родитель
Сommit
d1acfb8a94

+ 1 - 1
pages.json

@@ -54,7 +54,7 @@
 				{
 					"path": "express/quick-unpack",
 					"style": {
-						"navigationBarTitleText": "快拆包"
+						"navigationBarTitleText": "快拆包"
 					}
 				},
 				{

+ 22 - 11
pages/index/detail/book-audit.vue

@@ -28,7 +28,7 @@
                 </view>
                 <view class="flex flex-a-c flex-1">
                     <text class="label">审核金额</text>
-                    <text class="content">¥{{ auditBook.finalMoney }}</text>
+                    <text class="content">¥{{ auditBook.finalMoney || 0 }}</text>
                 </view>
             </view>
         </view>
@@ -36,8 +36,9 @@
         <view class="mt-20">
             <u-subsection :list="list" mode="subsection" :current="current"
                 @change="handleSectionChange"></u-subsection>
-            <AuditInfo v-if="current == 0" :detail="auditBook" ref="auditInfoRef" />
-            <FileInfo v-if="current == 2" :orderId="orderId" :annexType="2" :isbn="auditBook.isbn" />
+            <AuditInfo v-show="current == 0" :detail="auditBook" :auditList="auditBook.auditCommentList"
+                ref="auditInfoRef" />
+            <FileInfo v-show="current == 2" :orderId="orderId" :annexType="2" :isbn="auditBook.isbn" />
         </view>
 
         <view class="fixed-bottom">
@@ -48,7 +49,7 @@
 </template>
 
 <script setup>
-import { ref } from 'vue'
+import { ref,nextTick } from 'vue'
 import { onLoad, onShow } from '@dcloudio/uni-app'
 import AuditInfo from './components/AuditInfo.vue'
 import FileInfo from './components/FileInfo.vue'
@@ -74,11 +75,9 @@ const auditData = ref([])
 const handleAuditSelected = (data) => {
     auditData.value = data.map((item, index) => {
         item.idx = index
-        console.log(index, item.com, 'item.com', Array.isArray(item.com))
         item.com = Array.isArray(item.com) ? item.com.join(',') : item.com
         return item
     })
-    console.log(auditData.value, 'auditData.value')
 }
 
 //存储已经扫码的图书
@@ -111,7 +110,7 @@ function handleScan(isbn) {
                 uni.$u.ttsModule.speak(text)
                 return
             }
-           
+
             //已审核数量
             let hasAuditNum = book.auditCommentList.filter(item => item.sts !== 0).length || 0
             //未审核数量
@@ -193,13 +192,19 @@ const checkUserId = ref()
 const orderId = ref()
 const orderDetail = ref({})
 
+let isbnScan = ref('')
 onLoad((options) => {
     options.isbn && getBookInfo(options.isbn)
-    scannedBooks.value = [options.isbn] //现存已扫描的图书,是否需要跳转批量审核
+    scannedBooks.value = [options.isbn]
+    isbnScan.value = options.isbn
     auditBook.value = uni.getStorageSync('auditBook')
     orderId.value = options.orderId
     orderDetail.value = uni.getStorageSync('orderDetail')
 
+    nextTick(() => {
+        auditInfoRef.value?.initAuditList(auditBook.value)
+    })
+
     // #ifdef APP-PLUS
     uni.$u.useGlobalEvent((e) => {
         if (e.barcode) {
@@ -209,9 +214,15 @@ onLoad((options) => {
     // #endif
 })
 onShow(() => {
-    checkUserId.value = uni.getStorageSync('userInfo')?.userId
-    auditBook.value = uni.getStorageSync('auditBook')
-    orderDetail.value = uni.getStorageSync('orderDetail')
+    if (isbnScan.value) {
+        checkUserId.value = uni.getStorageSync('userInfo')?.userId
+        auditBook.value = uni.getStorageSync('auditBook')
+        orderDetail.value = uni.getStorageSync('orderDetail')
+
+        nextTick(() => {
+            auditInfoRef.value?.initAuditList(auditBook.value)
+        })
+    }
 })
 </script>
 

+ 17 - 11
pages/index/detail/components/AuditInfo.vue

@@ -28,31 +28,37 @@
                 </view>
             </view>
         </view>
-
-
-
     </view>
 </template>
 
 <script setup>
-import { ref, watch } from 'vue';
+import { ref, watch, nextTick, onMounted } from 'vue';
 const props = defineProps({
     detail: {
         type: Object,
         default: () => ({})
     },
+    auditList: {
+        type: Array,
+        default: () => []
+    }
 })
 
 
 const auditCommentList = ref([])
-watch(() => props.detail?.auditCommentList, (newVal) => {
-    if (!newVal) return
-    auditCommentList.value = newVal.map(item => ({
+
+const initAuditList = (detail) => {
+    console.log(detail, 'detail')
+    if (!detail?.auditCommentList) return
+    auditCommentList.value = detail.auditCommentList.map(item => ({
         ...item,
-        isbn: props.detail.isbn,
+        isbn: detail.isbn,
         comList: item.com ? (typeof item.com === 'string' ? item.com.split(',') : item.com) : []
     }))
-}, { immediate: true, deep: true })
+}
+watch(() => props.detail, () => {
+    initAuditList(props.detail)
+}, { deep: true, immediate: true })
 
 const auditList = ref([{ sts: 1, label: '品相良好' }, { sts: 2, label: '品相一般', disabled: true }, { sts: 3, label: '品相极差' }])
 const emit = defineEmits(['selected'])
@@ -89,7 +95,6 @@ const formatReason = () => {
         idx: index,
         com: item.comList.join(',')
     }))
-    console.log(list, 'list')
     return list
 }
 
@@ -106,7 +111,8 @@ const toggleReason = (audit, index, item) => {
 }
 
 defineExpose({
-    formatReason
+    formatReason,
+    initAuditList
 })
 </script>
 

+ 0 - 3
pages/index/detail/index.vue

@@ -251,11 +251,9 @@ function handleScan(isbn) {
     }
 
     let isbns = orderDetail.value.detailVoList.map(item => item.isbn)
-    console.log(isbns.includes(isbn), 'isbns')
 
     if (isbns.includes(isbn)) {
         let book = orderDetail.value.detailVoList.find(item => item.isbn == isbn)
-        console.log(orderDetail.value.detailVoList, book, 'book')
         if (book.auditCommentList.every(item => item.sts == 1)) {
             let text = `${isbn}已审核为良好`
             return uni.$u.ttsModule.speak(text)
@@ -287,7 +285,6 @@ function handleScan(isbn) {
 function handleScanCode() {
     uni.scanCode({
         success: (res) => {
-            console.log(typeof res.result, 'res')
             res.result && handleScan(res.result)
         },
     })

+ 2 - 2
pages/index/express/quick-unpack.vue

@@ -8,7 +8,7 @@
             <view v-if="scanData">扫描结果: {{ scanData }}</view>
         </view> -->
 
-        <u-button type="primary" @click="goScan" text="扫码" />
+        <!-- <u-button type="primary" @click="goScan" text="扫码" /> -->
 
         <view class="main-content">
             <view class="input-group">
@@ -51,7 +51,7 @@ function confirmTrackingNumber(code) {
             let text = code + '拆包成功'
             uni.$u.ttsModule.speak(text)
         } else {
-            let text = code + '订单不存在'
+            let text = code + res.msg
             uni.$u.ttsModule.speak(text)
         }
     })

+ 1 - 1
pages/index/index.vue

@@ -100,7 +100,7 @@ const expressOperations = ref([{
     type: 'primary'
 },
 {
-    name: '快\n\r拆包',
+    name: '快\n\r拆包',
     path: '/pages/index/express/quick-unpack',
     type: 'warning'
 },

+ 5 - 1
pages/index/wms/bad-in.vue

@@ -195,8 +195,8 @@ const editOrder = (index) => {
 const openScan = () => {
     // 打开扫码器
     uni.scanCode({
-        scanType: ['barCode'],
         success: (res) => {
+            waybillCode.value = res.result
             getDetailByCode(res.result)
         },
         fail: (err) => {
@@ -230,6 +230,7 @@ onMounted(() => {
     // #ifdef APP-PLUS
     uni.$u.useGlobalEvent((e) => {
         if (e.barcode) {
+            waybillCode.value = e.barcode
             getDetailByCode(e.barcode)
         }
     })
@@ -281,6 +282,9 @@ const selectWarehouse = () => {
 .content {
     padding-top: 44px;
     border-radius: 0;
+    /* #ifdef APP-PLUS */
+    padding-top: 100px;
+    /* #endif */
 }
 
 .info-section {

+ 4 - 2
pages/index/wms/order-query-list.vue

@@ -10,7 +10,7 @@
             </view>
         </view>
 
-        <view style="background-color: #ffffff" class="pad-5 mt-20" v-if="detail.orderId">
+        <view style="background-color: #ffffff" class="pad-5 mt-20 content-info" v-if="detail.orderId">
             <u-tabs :list="list1" v-model="activeTab" :itemStyle="{ height: '44px', width: '48%' }"
                 @change="handleTabChange"></u-tabs>
 
@@ -138,7 +138,9 @@ onLoad((options) => {
 .status {
     color: green;
 }
-
+.content-info{
+    padding-bottom: 60px;
+}
 
 .log-item {
     display: flex;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


+ 61 - 40
unpackage/dist/dev/app-plus/app-service.js

@@ -4805,7 +4805,7 @@ if (uni.restoreGlobal) {
           type: "primary"
         },
         {
-          name: "快\n\r拆包",
+          name: "快\n\r拆包",
           path: "/pages/index/express/quick-unpack",
           type: "warning"
         }
@@ -12710,7 +12710,7 @@ This will fail in production.`);
             let text = code2 + "拆包成功";
             uni.$u.ttsModule.speak(text);
           } else {
-            let text = code2 + "订单不存在";
+            let text = code2 + res2.msg;
             uni.$u.ttsModule.speak(text);
           }
         });
@@ -12759,15 +12759,11 @@ This will fail in production.`);
     }
   };
   function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) {
-    const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
     const _component_u_input = resolveEasycom(vue.resolveDynamicComponent("u-input"), __easycom_0$f);
+    const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_3$6);
     return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
       vue.createCommentVNode(' <view class="container">\r\n            <button @click="initBluetooth" :disabled="isInitializing">初始化蓝牙</button>\r\n            <button @click="startDiscovery" :disabled="isDiscovering || !isBluetoothOpened">开始搜索设备</button>\r\n            <button @click="connectDevice" :disabled="!selectedDevice || isConnecting">连接设备</button>\r\n            <button @click="startDataMonitor" :disabled="!isConnected">开始监听数据</button>\r\n            <view v-if="scanData">扫描结果: {{ scanData }}</view>\r\n        </view> '),
-      vue.createVNode(_component_u_button, {
-        type: "primary",
-        onClick: $setup.goScan,
-        text: "扫码"
-      }),
+      vue.createCommentVNode(' <u-button type="primary" @click="goScan" text="扫码" /> '),
       vue.createElementVNode("view", { class: "main-content" }, [
         vue.createElementVNode("view", { class: "input-group" }, [
           vue.createVNode(_component_u_input, {
@@ -18410,10 +18406,8 @@ This will fail in production.`);
           return;
         }
         let isbns = orderDetail.value.detailVoList.map((item) => item.isbn);
-        formatAppLog("log", "at pages/index/detail/index.vue:254", isbns.includes(isbn), "isbns");
         if (isbns.includes(isbn)) {
           let book = orderDetail.value.detailVoList.find((item) => item.isbn == isbn);
-          formatAppLog("log", "at pages/index/detail/index.vue:258", orderDetail.value.detailVoList, book, "book");
           if (book.auditCommentList.every((item) => item.sts == 1)) {
             let text = `${isbn}已审核为良好`;
             return uni.$u.ttsModule.speak(text);
@@ -18439,7 +18433,6 @@ This will fail in production.`);
       function handleScanCode() {
         uni.scanCode({
           success: (res2) => {
-            formatAppLog("log", "at pages/index/detail/index.vue:290", typeof res2.result, "res");
             res2.result && handleScan(res2.result);
           }
         });
@@ -18651,24 +18644,29 @@ This will fail in production.`);
       detail: {
         type: Object,
         default: () => ({})
+      },
+      auditList: {
+        type: Array,
+        default: () => []
       }
     },
     emits: ["selected"],
     setup(__props, { expose: __expose, emit: __emit }) {
       const props2 = __props;
       const auditCommentList = vue.ref([]);
-      vue.watch(() => {
-        var _a;
-        return (_a = props2.detail) == null ? void 0 : _a.auditCommentList;
-      }, (newVal) => {
-        if (!newVal)
+      const initAuditList = (detail) => {
+        formatAppLog("log", "at pages/index/detail/components/AuditInfo.vue:51", detail, "detail");
+        if (!(detail == null ? void 0 : detail.auditCommentList))
           return;
-        auditCommentList.value = newVal.map((item) => ({
+        auditCommentList.value = detail.auditCommentList.map((item) => ({
           ...item,
-          isbn: props2.detail.isbn,
+          isbn: detail.isbn,
           comList: item.com ? typeof item.com === "string" ? item.com.split(",") : item.com : []
         }));
-      }, { immediate: true, deep: true });
+      };
+      vue.watch(() => props2.detail, () => {
+        initAuditList(props2.detail);
+      }, { deep: true, immediate: true });
       const auditList = vue.ref([{ sts: 1, label: "品相良好" }, { sts: 2, label: "品相一般", disabled: true }, { sts: 3, label: "品相极差" }]);
       const emit2 = __emit;
       const radioClick = (audit, index2, sts) => {
@@ -18703,7 +18701,6 @@ This will fail in production.`);
           idx: index2,
           com: item.comList.join(",")
         }));
-        formatAppLog("log", "at pages/index/detail/components/AuditInfo.vue:92", list, "list");
         return list;
       };
       const toggleReason = (audit, index2, item) => {
@@ -18716,13 +18713,14 @@ This will fail in production.`);
         auditCommentList.value[index2] = audit;
       };
       __expose({
-        formatReason
+        formatReason,
+        initAuditList
       });
-      const __returned__ = { props: props2, auditCommentList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
+      const __returned__ = { props: props2, auditCommentList, initAuditList, auditList, emit: emit2, radioClick, getAuditCateNum, get reasonList() {
         return reasonList;
       }, set reasonList(v) {
         reasonList = v;
-      }, formatReason, toggleReason, ref: vue.ref, watch: vue.watch };
+      }, formatReason, toggleReason, ref: vue.ref, watch: vue.watch, nextTick: vue.nextTick, onMounted: vue.onMounted };
       Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
       return __returned__;
     }
@@ -18832,11 +18830,9 @@ This will fail in production.`);
       const handleAuditSelected = (data) => {
         auditData.value = data.map((item, index2) => {
           item.idx = index2;
-          formatAppLog("log", "at pages/index/detail/book-audit.vue:77", index2, item.com, "item.com", Array.isArray(item.com));
           item.com = Array.isArray(item.com) ? item.com.join(",") : item.com;
           return item;
         });
-        formatAppLog("log", "at pages/index/detail/book-audit.vue:81", auditData.value, "auditData.value");
       };
       const scannedBooks = vue.ref([]);
       function checkIsbn(isbn) {
@@ -18930,12 +18926,18 @@ This will fail in production.`);
       const checkUserId = vue.ref();
       const orderId = vue.ref();
       const orderDetail = vue.ref({});
+      let isbnScan = vue.ref("");
       onLoad((options) => {
         options.isbn && getBookInfo(options.isbn);
         scannedBooks.value = [options.isbn];
+        isbnScan.value = options.isbn;
         auditBook.value = uni.getStorageSync("auditBook");
         orderId.value = options.orderId;
         orderDetail.value = uni.getStorageSync("orderDetail");
+        vue.nextTick(() => {
+          var _a;
+          (_a = auditInfoRef.value) == null ? void 0 : _a.initAuditList(auditBook.value);
+        });
         uni.$u.useGlobalEvent((e) => {
           if (e.barcode) {
             handleScan(e.barcode);
@@ -18944,11 +18946,21 @@ This will fail in production.`);
       });
       onShow(() => {
         var _a;
-        checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
-        auditBook.value = uni.getStorageSync("auditBook");
-        orderDetail.value = uni.getStorageSync("orderDetail");
+        if (isbnScan.value) {
+          checkUserId.value = (_a = uni.getStorageSync("userInfo")) == null ? void 0 : _a.userId;
+          auditBook.value = uni.getStorageSync("auditBook");
+          orderDetail.value = uni.getStorageSync("orderDetail");
+          vue.nextTick(() => {
+            var _a2;
+            (_a2 = auditInfoRef.value) == null ? void 0 : _a2.initAuditList(auditBook.value);
+          });
+        }
       });
-      const __returned__ = { detail, getBookInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, auditBook, checkUserId, orderId, orderDetail, ref: vue.ref, get onLoad() {
+      const __returned__ = { detail, getBookInfo, list, current, handleSectionChange, auditData, handleAuditSelected, scannedBooks, checkIsbn, handleScan, handleScanCode, auditInfoRef, handleAudit, auditBook, checkUserId, orderId, orderDetail, get isbnScan() {
+        return isbnScan;
+      }, set isbnScan(v) {
+        isbnScan = v;
+      }, ref: vue.ref, nextTick: vue.nextTick, get onLoad() {
         return onLoad;
       }, get onShow() {
         return onShow;
@@ -19052,7 +19064,7 @@ This will fail in production.`);
             vue.createElementVNode(
               "text",
               { class: "content" },
-              "¥" + vue.toDisplayString($setup.auditBook.finalMoney),
+              "¥" + vue.toDisplayString($setup.auditBook.finalMoney || 0),
               1
               /* TEXT */
             )
@@ -19066,17 +19078,20 @@ This will fail in production.`);
           current: $setup.current,
           onChange: $setup.handleSectionChange
         }, null, 8, ["list", "current"]),
-        $setup.current == 0 ? (vue.openBlock(), vue.createBlock($setup["AuditInfo"], {
-          key: 0,
+        vue.withDirectives(vue.createVNode($setup["AuditInfo"], {
           detail: $setup.auditBook,
+          auditList: $setup.auditBook.auditCommentList,
           ref: "auditInfoRef"
-        }, null, 8, ["detail"])) : vue.createCommentVNode("v-if", true),
-        $setup.current == 2 ? (vue.openBlock(), vue.createBlock($setup["FileInfo"], {
-          key: 1,
+        }, null, 8, ["detail", "auditList"]), [
+          [vue.vShow, $setup.current == 0]
+        ]),
+        vue.withDirectives(vue.createVNode($setup["FileInfo"], {
           orderId: $setup.orderId,
           annexType: 2,
           isbn: $setup.auditBook.isbn
-        }, null, 8, ["orderId", "isbn"])) : vue.createCommentVNode("v-if", true)
+        }, null, 8, ["orderId", "isbn"]), [
+          [vue.vShow, $setup.current == 2]
+        ])
       ]),
       vue.createElementVNode("view", { class: "fixed-bottom" }, [
         vue.createVNode(_component_u_button, {
@@ -25416,8 +25431,8 @@ This will fail in production.`);
       };
       const openScan = () => {
         uni.scanCode({
-          scanType: ["barCode"],
           success: (res2) => {
+            waybillCode.value = res2.result;
             getDetailByCode2(res2.result);
           },
           fail: (err) => {
@@ -25444,6 +25459,7 @@ This will fail in production.`);
       vue.onMounted(() => {
         uni.$u.useGlobalEvent((e) => {
           if (e.barcode) {
+            waybillCode.value = e.barcode;
             getDetailByCode2(e.barcode);
           }
         });
@@ -26780,7 +26796,7 @@ This will fail in production.`);
       $setup.detail.orderId ? (vue.openBlock(), vue.createElementBlock("view", {
         key: 1,
         style: { "background-color": "#ffffff" },
-        class: "pad-5 mt-20"
+        class: "pad-5 mt-20 content-info"
       }, [
         vue.createVNode(_component_u_tabs, {
           list: $setup.list1,
@@ -30534,9 +30550,14 @@ This will fail in production.`);
   }
   function useGlobalEvent(onChange) {
     var globalEvent = requireNativePlugin("globalEvent");
-    globalEvent.addEventListener("iDataBarcodeEvent", function(e) {
+    const handler = function(e) {
       onChange && onChange(e);
-    });
+    };
+    globalEvent.removeEventListener("iDataBarcodeEvent", handler);
+    globalEvent.addEventListener("iDataBarcodeEvent", handler);
+    return () => {
+      globalEvent.removeEventListener("iDataBarcodeEvent", handler);
+    };
   }
   function useGlobalEventRemove() {
     var globalEvent = requireNativePlugin("globalEvent");

+ 187 - 187
unpackage/dist/dev/app-plus/pages/index/express/quick-unpack.css

@@ -23,6 +23,193 @@
 /* 垂直间距 */
 /* 透明度 */
 /* 文章场景相关 */
+uni-view[data-v-ac70166d], uni-scroll-view[data-v-ac70166d], uni-swiper-item[data-v-ac70166d] {
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 0;
+  flex-grow: 0;
+  flex-basis: auto;
+  align-items: stretch;
+  align-content: flex-start;
+}
+@font-face {
+  font-family: "uicon-iconfont";
+  src: url("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf") format("truetype");
+}
+.u-icon[data-v-ac70166d] {
+  display: flex;
+  align-items: center;
+}
+.u-icon--left[data-v-ac70166d] {
+  flex-direction: row-reverse;
+  align-items: center;
+}
+.u-icon--right[data-v-ac70166d] {
+  flex-direction: row;
+  align-items: center;
+}
+.u-icon--top[data-v-ac70166d] {
+  flex-direction: column-reverse;
+  justify-content: center;
+}
+.u-icon--bottom[data-v-ac70166d] {
+  flex-direction: column;
+  justify-content: center;
+}
+.u-icon__icon[data-v-ac70166d] {
+  font-family: uicon-iconfont;
+  position: relative;
+
+  display: flex;
+
+  flex-direction: row;
+  align-items: center;
+}
+.u-icon__icon--primary[data-v-ac70166d] {
+  color: #22ac38;
+}
+.u-icon__icon--success[data-v-ac70166d] {
+  color: #22ac38;
+}
+.u-icon__icon--error[data-v-ac70166d] {
+  color: #f56c6c;
+}
+.u-icon__icon--warning[data-v-ac70166d] {
+  color: #f9ae3d;
+}
+.u-icon__icon--info[data-v-ac70166d] {
+  color: #909399;
+}
+.u-icon__img[data-v-ac70166d] {
+  height: auto;
+  will-change: transform;
+}
+.u-icon__label[data-v-ac70166d] {
+  line-height: 1;
+}
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+/* 颜色变量 */
+/* 行为相关颜色 */
+/* 文字基本颜色 */
+/* 背景颜色 */
+/* 边框颜色 */
+/* 尺寸变量 */
+/* 文字尺寸 */
+/* 图片尺寸 */
+/* Border Radius */
+/* 水平间距 */
+/* 垂直间距 */
+/* 透明度 */
+/* 文章场景相关 */
+uni-view[data-v-df79975b], uni-scroll-view[data-v-df79975b], uni-swiper-item[data-v-df79975b] {
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 0;
+  flex-grow: 0;
+  flex-basis: auto;
+  align-items: stretch;
+  align-content: flex-start;
+}
+.u-input[data-v-df79975b] {
+
+  display: flex;
+
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  flex: 1;
+}
+.u-input--radius[data-v-df79975b], .u-input--square[data-v-df79975b] {
+  border-radius: 4px;
+}
+.u-input--no-radius[data-v-df79975b] {
+  border-radius: 0;
+}
+.u-input--circle[data-v-df79975b] {
+  border-radius: 100px;
+}
+.u-input__content[data-v-df79975b] {
+  flex: 1;
+
+  display: flex;
+
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+.u-input__content__field-wrapper[data-v-df79975b] {
+  position: relative;
+
+  display: flex;
+
+  flex-direction: row;
+  margin: 0;
+  flex: 1;
+}
+.u-input__content__field-wrapper__field[data-v-df79975b] {
+  line-height: 26px;
+  text-align: left;
+  color: #303133;
+  height: 24px;
+  font-size: 15px;
+  flex: 1;
+}
+.u-input__content__clear[data-v-df79975b] {
+  width: 20px;
+  height: 20px;
+  border-radius: 100px;
+  background-color: #c6c7cb;
+
+  display: flex;
+
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.82);
+  margin-left: 4px;
+}
+.u-input__content__subfix-icon[data-v-df79975b] {
+  margin-left: 4px;
+}
+.u-input__content__prefix-icon[data-v-df79975b] {
+  margin-right: 4px;
+}
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+/* 颜色变量 */
+/* 行为相关颜色 */
+/* 文字基本颜色 */
+/* 背景颜色 */
+/* 边框颜色 */
+/* 尺寸变量 */
+/* 文字尺寸 */
+/* 图片尺寸 */
+/* Border Radius */
+/* 水平间距 */
+/* 垂直间距 */
+/* 透明度 */
+/* 文章场景相关 */
 uni-view[data-v-2af81691], uni-scroll-view[data-v-2af81691], uni-swiper-item[data-v-2af81691] {
   display: flex;
   flex-direction: column;
@@ -188,95 +375,6 @@ to {
 /* 垂直间距 */
 /* 透明度 */
 /* 文章场景相关 */
-uni-view[data-v-ac70166d], uni-scroll-view[data-v-ac70166d], uni-swiper-item[data-v-ac70166d] {
-  display: flex;
-  flex-direction: column;
-  flex-shrink: 0;
-  flex-grow: 0;
-  flex-basis: auto;
-  align-items: stretch;
-  align-content: flex-start;
-}
-@font-face {
-  font-family: "uicon-iconfont";
-  src: url("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf") format("truetype");
-}
-.u-icon[data-v-ac70166d] {
-  display: flex;
-  align-items: center;
-}
-.u-icon--left[data-v-ac70166d] {
-  flex-direction: row-reverse;
-  align-items: center;
-}
-.u-icon--right[data-v-ac70166d] {
-  flex-direction: row;
-  align-items: center;
-}
-.u-icon--top[data-v-ac70166d] {
-  flex-direction: column-reverse;
-  justify-content: center;
-}
-.u-icon--bottom[data-v-ac70166d] {
-  flex-direction: column;
-  justify-content: center;
-}
-.u-icon__icon[data-v-ac70166d] {
-  font-family: uicon-iconfont;
-  position: relative;
-
-  display: flex;
-
-  flex-direction: row;
-  align-items: center;
-}
-.u-icon__icon--primary[data-v-ac70166d] {
-  color: #22ac38;
-}
-.u-icon__icon--success[data-v-ac70166d] {
-  color: #22ac38;
-}
-.u-icon__icon--error[data-v-ac70166d] {
-  color: #f56c6c;
-}
-.u-icon__icon--warning[data-v-ac70166d] {
-  color: #f9ae3d;
-}
-.u-icon__icon--info[data-v-ac70166d] {
-  color: #909399;
-}
-.u-icon__img[data-v-ac70166d] {
-  height: auto;
-  will-change: transform;
-}
-.u-icon__label[data-v-ac70166d] {
-  line-height: 1;
-}
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
-/* 颜色变量 */
-/* 行为相关颜色 */
-/* 文字基本颜色 */
-/* 背景颜色 */
-/* 边框颜色 */
-/* 尺寸变量 */
-/* 文字尺寸 */
-/* 图片尺寸 */
-/* Border Radius */
-/* 水平间距 */
-/* 垂直间距 */
-/* 透明度 */
-/* 文章场景相关 */
 uni-view[data-v-5ce41ee6], uni-scroll-view[data-v-5ce41ee6], uni-swiper-item[data-v-5ce41ee6] {
   display: flex;
   flex-direction: column;
@@ -462,104 +560,6 @@ uni-view[data-v-5ce41ee6], uni-scroll-view[data-v-5ce41ee6], uni-swiper-item[dat
 /* 垂直间距 */
 /* 透明度 */
 /* 文章场景相关 */
-uni-view[data-v-df79975b], uni-scroll-view[data-v-df79975b], uni-swiper-item[data-v-df79975b] {
-  display: flex;
-  flex-direction: column;
-  flex-shrink: 0;
-  flex-grow: 0;
-  flex-basis: auto;
-  align-items: stretch;
-  align-content: flex-start;
-}
-.u-input[data-v-df79975b] {
-
-  display: flex;
-
-  flex-direction: row;
-  align-items: center;
-  justify-content: space-between;
-  flex: 1;
-}
-.u-input--radius[data-v-df79975b], .u-input--square[data-v-df79975b] {
-  border-radius: 4px;
-}
-.u-input--no-radius[data-v-df79975b] {
-  border-radius: 0;
-}
-.u-input--circle[data-v-df79975b] {
-  border-radius: 100px;
-}
-.u-input__content[data-v-df79975b] {
-  flex: 1;
-
-  display: flex;
-
-  flex-direction: row;
-  align-items: center;
-  justify-content: space-between;
-}
-.u-input__content__field-wrapper[data-v-df79975b] {
-  position: relative;
-
-  display: flex;
-
-  flex-direction: row;
-  margin: 0;
-  flex: 1;
-}
-.u-input__content__field-wrapper__field[data-v-df79975b] {
-  line-height: 26px;
-  text-align: left;
-  color: #303133;
-  height: 24px;
-  font-size: 15px;
-  flex: 1;
-}
-.u-input__content__clear[data-v-df79975b] {
-  width: 20px;
-  height: 20px;
-  border-radius: 100px;
-  background-color: #c6c7cb;
-
-  display: flex;
-
-  flex-direction: row;
-  align-items: center;
-  justify-content: center;
-  transform: scale(0.82);
-  margin-left: 4px;
-}
-.u-input__content__subfix-icon[data-v-df79975b] {
-  margin-left: 4px;
-}
-.u-input__content__prefix-icon[data-v-df79975b] {
-  margin-right: 4px;
-}
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
-/* 颜色变量 */
-/* 行为相关颜色 */
-/* 文字基本颜色 */
-/* 背景颜色 */
-/* 边框颜色 */
-/* 尺寸变量 */
-/* 文字尺寸 */
-/* 图片尺寸 */
-/* Border Radius */
-/* 水平间距 */
-/* 垂直间距 */
-/* 透明度 */
-/* 文章场景相关 */
 .main-content[data-v-cd1b3ab5] {
   padding: 20px;
   gap: 20px;

+ 2 - 0
unpackage/dist/dev/app-plus/pages/index/wms/bad-in.css

@@ -1746,6 +1746,8 @@ uni-view[data-v-05c24e9b], uni-scroll-view[data-v-05c24e9b], uni-swiper-item[dat
 .content[data-v-04095d32] {
     padding-top: 44px;
     border-radius: 0;
+
+    padding-top: 100px;
 }
 .info-section[data-v-04095d32] {
     background-color: #ffffff;

+ 3 - 0
unpackage/dist/dev/app-plus/pages/index/wms/order-query-list.css

@@ -434,6 +434,9 @@ uni-view[data-v-e082a34a], uni-scroll-view[data-v-e082a34a], uni-swiper-item[dat
 .status[data-v-13461b03] {
   color: green;
 }
+.content-info[data-v-13461b03] {
+  padding-bottom: 60px;
+}
 .log-item[data-v-13461b03] {
   display: flex;
   justify-content: space-between;

+ 14 - 4
utils/useBarcodeModule.js

@@ -13,15 +13,25 @@ export function useInit() {
 /**
  * 全局监听扫描后结果
  * @param onChange 回调函数
+ * @returns {Function} 返回移除监听器的函数
  */
 export function useGlobalEvent(onChange) {
 	//页面监听event事件,建议在页面onLoad方法里调用
 	var globalEvent = uni.requireNativePlugin('globalEvent');
-
-	globalEvent.addEventListener('iDataBarcodeEvent', function(e) {
+	
+	const handler = function(e) {
 		onChange && onChange(e)
-		//条码结果示例:{"barcode","条码数据"}
-	});
+	}
+	
+	// 先移除可能存在的旧监听器
+	globalEvent.removeEventListener('iDataBarcodeEvent', handler);
+	// 添加新的监听器
+	globalEvent.addEventListener('iDataBarcodeEvent', handler);
+	
+	// 返回一个清理函数,用于手动移除监听器
+	return () => {
+		globalEvent.removeEventListener('iDataBarcodeEvent', handler);
+	}
 }
 
 //全局卸载监听事件

Некоторые файлы не были показаны из-за большого количества измененных файлов