From f398ddd14530d2f0695865c8a4dede6205d91d09 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期二, 09 十二月 2025 11:07:25 +0800
Subject: [PATCH] 提交 app 初始化设计
---
qrcodeScaner/package.json | 1
qrcodeScaner/pages.json | 7 +
qrcodeScaner/pages/mainView/mainView.vue | 59 +++++----
qrcodeScaner/utils/config.js | 2
qrcodeScaner/pages/login/login.vue | 62 ++++++---
qrcodeScaner/pages/warehouseOut/warehouseOut.vue | 117 +++++++++++++++++++
qrcodeScaner/pages/statement/deliveryList.vue | 16 ++
qrcodeScaner/pages/statement/orderList.vue | 20 +++
qrcodeScaner/pages/reportingWork/reportingWork.vue | 21 +-
qrcodeScaner/pages/statement/originalGlassList.vue | 8
qrcodeScaner/pages/glassFinishToStore/glassFinishToStore.vue | 8
qrcodeScaner/pages/index/index.vue | 9
qrcodeScaner/package-lock.json | 14 +-
13 files changed, 264 insertions(+), 80 deletions(-)
diff --git a/qrcodeScaner/package-lock.json b/qrcodeScaner/package-lock.json
index 887b139..7402991 100644
--- a/qrcodeScaner/package-lock.json
+++ b/qrcodeScaner/package-lock.json
@@ -6,9 +6,9 @@
"": {
"dependencies": {
"@dcloudio/uni-ui": "^1.5.7",
- "@qiun/ucharts": "^2.5.0-20230101",
"axios": "^1.5.1",
"axios-adapter-uniapp": "^0.1.4",
+ "lodash": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^3.2.0"
},
@@ -441,12 +441,6 @@
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
- },
- "node_modules/@qiun/ucharts": {
- "version": "2.5.0-20230101",
- "resolved": "https://registry.npmmirror.com/@qiun/ucharts/-/ucharts-2.5.0-20230101.tgz",
- "integrity": "sha512-C7ccBgfPuGF6dxTRuMW0NPPMSCf1k/kh3I9zkRVBc5PaivudX/rPL+jd2Wty6gn5ya5L3Ob+YmYe09V5xw66Cw==",
- "license": "Apache"
},
"node_modules/@types/eslint": {
"version": "9.6.1",
@@ -1390,6 +1384,12 @@
"node": ">=8.9.0"
}
},
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "license": "MIT"
+ },
"node_modules/magic-string": {
"version": "0.30.17",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
diff --git a/qrcodeScaner/package.json b/qrcodeScaner/package.json
index 0e07403..0fce42d 100644
--- a/qrcodeScaner/package.json
+++ b/qrcodeScaner/package.json
@@ -3,6 +3,7 @@
"@dcloudio/uni-ui": "^1.5.7",
"axios": "^1.5.1",
"axios-adapter-uniapp": "^0.1.4",
+ "lodash": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^3.2.0"
},
diff --git a/qrcodeScaner/pages.json b/qrcodeScaner/pages.json
index 3625a37..a5def8e 100644
--- a/qrcodeScaner/pages.json
+++ b/qrcodeScaner/pages.json
@@ -90,6 +90,13 @@
{
"navigationBarTitleText" : ""
}
+ },
+ {
+ "path" : "pages/warehouseOut/warehouseOut",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
}
],
"globalStyle": {
diff --git a/qrcodeScaner/pages/glassFinishToStore/glassFinishToStore.vue b/qrcodeScaner/pages/glassFinishToStore/glassFinishToStore.vue
index 3a8a874..7e345a0 100644
--- a/qrcodeScaner/pages/glassFinishToStore/glassFinishToStore.vue
+++ b/qrcodeScaner/pages/glassFinishToStore/glassFinishToStore.vue
@@ -73,7 +73,6 @@
</uni-row>
</view>
<view>
-
<uni-row>
<uni-col :span='12'>
<button @click="open(0)">鍙栨秷</button>
@@ -91,6 +90,7 @@
import { onLoad } from '@dcloudio/uni-app'
import request from '../../utils/request'
import userInfo from '@/stores/userInfo'
+ import { debounce } from 'lodash'
const user=userInfo()
const message = ref(null)
const msgType=ref('success')
@@ -125,7 +125,6 @@
const para = {
processId:processIdVal
}
-
await request.post(`/app/getSelectWarehousingList`,para).then(res => {
if(res.data.data.length===0){
uni.showModal({
@@ -147,7 +146,7 @@
table.value.selectionAll()
}
- const glassToStore = () => {
+ const glassToStore = debounce(() => {
subLoading.value = true
checkList.value.sort()
const arr = []
@@ -169,7 +168,7 @@
url: `/pages/mainView/mainView`
})
})
- }
+ },200)
const change = (e,item) => {
const quantity = item.orderDetail.quantity*1 - item.receivedQuantity*1
@@ -194,7 +193,6 @@
}else{
alertDialog.value.close()
}
-
}
</script>
diff --git a/qrcodeScaner/pages/index/index.vue b/qrcodeScaner/pages/index/index.vue
index aa4d479..9c10e7d 100644
--- a/qrcodeScaner/pages/index/index.vue
+++ b/qrcodeScaner/pages/index/index.vue
@@ -6,7 +6,7 @@
<text class="title">NorthGlass</text>
</view>
<view class="text-area">
- <text class="title">{{ip}}({{store.version}})</text>
+ <text class="title">{{ip+":"+port}}({{store.version}})</text>
</view>
<view class="text-area" >
<uni-data-select style="width:40vw;text-align: center;"
@@ -64,7 +64,8 @@
import {onMounted, reactive,ref} from "vue"
import userInfo from '@/stores/userInfo'
import request from '@/utils/request'
- import {ip,webPort} from '@/utils/config.js'
+ import {ip,webPort,port} from '@/utils/config.js'
+ import { debounce } from 'lodash'
const store=userInfo()
let searchUserList = ref({
@@ -135,7 +136,7 @@
message.value.open()
}
- const login = async () => {
+ const login = debounce(async () => {
await getAppVersion()
userForm.pass = btoa(userForm.pass)
store.cleanInfo()
@@ -162,7 +163,7 @@
}).then(() => {
userForm.pass = atob(userForm.pass)
})
- }
+ },400)
const initApp = () => {
uni.removeStorage({
diff --git a/qrcodeScaner/pages/login/login.vue b/qrcodeScaner/pages/login/login.vue
index 03ad647..f6b4961 100644
--- a/qrcodeScaner/pages/login/login.vue
+++ b/qrcodeScaner/pages/login/login.vue
@@ -1,6 +1,3 @@
-
-
-
<template>
<view class="content" >
<image class="logo" src="/static/favicon.ico"></image>
@@ -8,16 +5,28 @@
<text class="title">NorthGlass_Scaner 鍒濆鍖�</text>
</view>
-
<view class="text-area" >
<uni-easyinput
- @blur="changeIP"
class='input_1'
style="text-align: center;"
placeholder="璇疯緭鍏ユ湇鍔″櫒ip"
:passwordIcon='false'
- v-model="ipVal"
+ v-model.trim="ipVal"
type="input" />
+
+ </view>
+ <view class="text-area" >
+ <uni-easyinput
+ class='input_1'
+ style="text-align: center;"
+ placeholder="璇疯緭鍏ョ鍙e彿"
+ :passwordIcon='false'
+ v-model="portVal"
+ type="number" />
+ </view>
+
+ <view class="text-area" >
+ <button @click="save" type="primary" size="mini">淇濆瓨</button>
</view>
<view>
@@ -34,6 +43,7 @@
import userInfo from '@/stores/userInfo'
import request from '@/utils/request'
import {ip,webPort} from '@/utils/config.js'
+ import { debounce } from 'lodash'
const store=userInfo()
let searchUserList = ref({
@@ -46,15 +56,15 @@
const messageText=ref('')
const viewShow = ref(false)
let ipVal = ref(null)
+ let portVal = ref(null)
- onMounted(async()=>{
+ onMounted(() => {
- /* if(ip===null){
- return
+ if(uni.getStorageSync('port') === ""){
+ portVal.value = 8086
+ }else{
+ portVal.value = uni.getStorageSync('port')
}
- uni.reLaunch({
- url: `/pages/login/login`
- }) */
})
@@ -67,17 +77,27 @@
}
- const changeIP =async () => {
- const ipRegex = /^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
- if(ipRegex.test(ipVal.value)){
- await uni.setStorageSync('ip', ipVal.value);
- plus.runtime.restart()
+ // const changeIP =async () => {
+ // const ipRegex = /^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
+ // if(ipRegex.test(ipVal.value)){
+ // await uni.setStorageSync('ip', ipVal.value);
+ // plus.runtime.restart()
- }else{
- messageToggle('error','璇疯緭鍏P鑼冨洿锛�0.0.0.0~255.255.255.255')
- }
- }
+ // }else{
+ // messageToggle('error','璇疯緭鍏P鑼冨洿锛�0.0.0.0~255.255.255.255')
+ // }
+ // }
+const save = debounce(async() => {
+ if(portVal.value === null || portVal.value === "" || ipVal === null || ipVal === ""){
+ messageToggle('error','ip鎴栫鍙e彿涓嶈兘涓虹┖')
+ return
+ }
+ await uni.setStorageSync('ip', ipVal.value);
+ await uni.setStorageSync('port', portVal.value);
+ plus.runtime.restart()
+
+},200)
</script>
<style>
diff --git a/qrcodeScaner/pages/mainView/mainView.vue b/qrcodeScaner/pages/mainView/mainView.vue
index c1c5e60..5fe1907 100644
--- a/qrcodeScaner/pages/mainView/mainView.vue
+++ b/qrcodeScaner/pages/mainView/mainView.vue
@@ -25,27 +25,27 @@
</uni-col>
- <uni-col :span="12">
+ <uni-col :span="12" v-if="store.user.permissions.includes('createProductStock.search')">
<button @click="glassFinishToStore" type="primary" size="mini">鎴愬搧鍏ュ簱</button>
</uni-col>
- <uni-col :span="12">
- <button type="primary" size="mini">鎴愬搧鍑哄簱</button>
+ <uni-col :span="12" v-if="store.user.permissions.includes('qualityInspectionReview.edit')">
+ <button @click="changePage('warehouseOut')" type="primary" size="mini">鎴愬搧鍑哄簱</button>
</uni-col>
- <!-- <uni-col :span="24" v-if="store.user.permissions.includes('qualityInspectionReview.edit')">
+ <!-- <uni-col :span="24" v-if="store.user.permissions.includes('finishedProductOut.search')">
<navigator url="/pages/ReviewReporitingWork/ReviewReporitingWork" open-type="navigate">
<button type="primary" size="mini">璐ㄦ瀹℃牳</button>
</navigator>
</uni-col> -->
- <!-- <uni-col :span="24">
+ <uni-col :span="24">
<uni-data-select
placeholder="鎶ヨ〃"
v-model="report"
:localdata="reports"
- @change="changePage"
+ @change="changePage('report')"
></uni-data-select>
- </uni-col> -->
+ </uni-col>
<uni-col :span="12">
<uni-data-select
@@ -82,16 +82,17 @@
</uni-popup>
</view>
</view>
-
+
</template>
-<script setup>
+<script setup lang="ts">
import userInfo from '@/stores/userInfo'
import { onLoad } from '@dcloudio/uni-app'
- import request from '@/utils/request'
- import mpaasScan from '@/utils/scanner.js'
+import request from '@/utils/request'
+import mpaasScan from '@/utils/scanner.js'
import { ref, watch,onUnmounted, warn } from 'vue'
+import { debounce } from 'lodash'
const store=userInfo()
const message= ref(null)
const type=ref('center')
@@ -237,7 +238,7 @@
const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- const scannerGetGlassInfo = () =>{
+ const scannerGetGlassInfo = debounce(() =>{
if(uni.getSystemInfoSync().platform==='android'){
mpaasScan().then(val => {
@@ -251,9 +252,9 @@
url: `/pages/glassInfo/glassInfo?projectNo=25031302009005`
})
}
- }
+ },200)
- const scanerCode = () => {
+ const scanerCode = debounce(() => {
if(device.value === null){
messageToggle('warn','鏈�夋嫨璁惧锛岃閫夋嫨鎶ュ伐璁惧锛�')
return
@@ -272,15 +273,15 @@
url: `/pages/reportingWork/reportingWork?processId=NG24111542A012/1`
})
}
- }
+ },200)
- const glassFinishToStore = () => {
+ const glassFinishToStore = debounce(() => {
mpaasScan().then(val => {
uni.navigateTo({
url: `/pages/glassFinishToStore/glassFinishToStore?processId=${val}`
})
})
- }
+ },200)
@@ -294,17 +295,27 @@
}
//鎵撳紑褰撶彮浜ч噺
- const quantityCompletion1 = () => {
+ const quantityCompletion1 = debounce(() => {
uni.navigateTo({
url: `/pages/QuantityCompletion/QuantityCompletion`
})
- }
+ },200)
- const changePage = () => {
- uni.navigateTo({
- url: `/pages/statement/${report.value}`
- })
- }
+ const changePage = debounce((type) => {
+ switch (type){
+ case "warehouseOut":
+ uni.navigateTo({
+ url: `/pages/warehouseOut/warehouseOut`
+ })
+ break
+ case "report":
+ uni.navigateTo({
+ url: `/pages/statement/${report.value}`
+ })
+ break
+ }
+
+ },200)
</script>
diff --git a/qrcodeScaner/pages/reportingWork/reportingWork.vue b/qrcodeScaner/pages/reportingWork/reportingWork.vue
index 32f53db..512536b 100644
--- a/qrcodeScaner/pages/reportingWork/reportingWork.vue
+++ b/qrcodeScaner/pages/reportingWork/reportingWork.vue
@@ -178,6 +178,7 @@
import userInfo from '@/stores/userInfo'
import request from '@/utils/request'
import mpaasScan from '@/utils/scanner.js'
+import { debounce } from 'lodash'
const store=userInfo()
let processId = ref(null)
let process = ref(null)
@@ -293,7 +294,7 @@
})
}
//鎶ュ伐淇濆瓨
- const saveReportForWork = () => {
+ const saveReportForWork = debounce(() => {
for (let item of reportworkList.value) {
const finishNumVal = finishNum(item.processList)
if(finishNumVal===0){
@@ -386,19 +387,19 @@
}).finally(() => {
buttonLoading.value = false
})
- }
+ },200)
//寮瑰嚭妗嗙‘璁�
- const dialogConfirm = () => {
+ const dialogConfirm = debounce(() => {
uni.reLaunch({
url: `/pages/mainView/mainView?state=success`
})
- }
- const dialogClose = () => {
+ },200)
+ const dialogClose = debounce(() => {
uni.redirectTo({
url: `/pages/reportingWork/reportingWork?processId=${processId.value}`
});
- }
+ },200)
//涓嬪伐搴忓鏍�
const reviewReportForWork = () => {
@@ -617,7 +618,7 @@
}
- const scannerCode = () => {
+ const scannerCode = debounce(() => {
if(reportworkList.length>6){
messageToggle('error','鏈�澶氭敮鎸�6涓祦绋嬪崱鍚屾椂鎶ュ伐')
}
@@ -634,12 +635,12 @@
getProcessCardList(val,process.value)
})
- }
+ },200)
//绉婚櫎娴佺▼鍗�
- const deleteProcess = (indexVal) => {
+ const deleteProcess = debounce((indexVal) => {
reportworkList.value.splice(indexVal, 1)
- }
+ },200)
</script>
diff --git a/qrcodeScaner/pages/statement/deliveryList.vue b/qrcodeScaner/pages/statement/deliveryList.vue
index 5671594..5f47c57 100644
--- a/qrcodeScaner/pages/statement/deliveryList.vue
+++ b/qrcodeScaner/pages/statement/deliveryList.vue
@@ -9,7 +9,7 @@
<uni-th align="center">椤圭洰鍚嶇О</uni-th>
<uni-th align="center">鏁伴噺</uni-th>
<uni-th align="center">闈㈢Н</uni-th>
- <uni-th align="center">閲戦</uni-th>
+ <!-- <uni-th align="center">閲戦</uni-th> -->
<uni-th align="center">鍒涘缓鏃堕棿</uni-th>
</uni-tr>
@@ -19,9 +19,19 @@
<uni-td align="center">{{ item.project }}</uni-td>
<uni-td align="center">{{ item.quantity }}</uni-td>
<uni-td align="center">{{ item.area }}</uni-td>
- <uni-td align="center">{{ item.money }}</uni-td>
+ <!-- <uni-td align="center">{{ item.money }}</uni-td> -->
<uni-td align="center">{{ item.createTime }}</uni-td>
</uni-tr>
+
+ <!-- <uni-tr >
+ <uni-td align="center">鍚堣:</uni-td>
+ <uni-td align="center"></uni-td>
+ <uni-td align="center"></uni-td>
+ <uni-td align="center">{{ totalSum.quantity }}</uni-td>
+ <uni-td align="center">{{ totalSum.area }}</uni-td>
+ <uni-td align="center">{{ totalSum.money }}</uni-td>
+ <uni-td align="center"></uni-td>
+ </uni-tr> -->
</uni-table>
</view>
</view>
@@ -34,6 +44,7 @@
import request from '../../utils/request'
const dates = ref([null,null])
const deliverys = ref([])
+const totalSum = ref({})
onMounted(()=>{
getDeliverys()
@@ -43,6 +54,7 @@
request.post("/app/getDeliveryList",dates.value).then(res => {
deliverys.value = res.data.data
dates.value = res.data.date
+ totalSum.value = res.data.totalSum
})
}
diff --git a/qrcodeScaner/pages/statement/orderList.vue b/qrcodeScaner/pages/statement/orderList.vue
index 6360e73..c44941f 100644
--- a/qrcodeScaner/pages/statement/orderList.vue
+++ b/qrcodeScaner/pages/statement/orderList.vue
@@ -2,7 +2,7 @@
<view style="width: 100%;height: 100%;">
- <!-- <uni-datetime-picker v-model="dates" type="daterange" @change="maskClick" />
+ <uni-datetime-picker v-model="dates" type="daterange" @change="maskClick" />
<view id='data'>
<uni-table border stripe style='width:100%;height: 100%;overflow: auto;'>
<uni-tr>
@@ -32,8 +32,22 @@
<uni-td align="center">{{ item.createTime }}</uni-td>
<uni-td align="center">{{ item.deliveryDate }}</uni-td>
</uni-tr>
+
+ <uni-tr>
+ <uni-td align="center">鍚堣:</uni-td>
+ <uni-td align="center"></uni-td>
+ <uni-td align="center"></uni-td>
+ <uni-td align="center"></uni-td>
+ <uni-td align="center">{{ totalSum.quantity }}</uni-td>
+ <uni-td align="center">{{ totalSum.area }}</uni-td>
+ <uni-td align="center">{{ totalSum.perimeter }}</uni-td>
+ <uni-td align="center" />
+ <uni-td align="center" />
+ <uni-td align="center" />
+ <uni-td align="center" />
+ </uni-tr>
</uni-table>
- </view> -->
+ </view>
</view>
</template>
@@ -42,6 +56,7 @@
import request from '../../utils/request'
const dates = ref([null,null])
const orders = ref([])
+const totalSum = ref({})
onMounted(()=>{
getOrderList()
@@ -51,6 +66,7 @@
request.post("/app/getOrderList",dates.value).then(res => {
orders.value = res.data.data
dates.value = res.data.date
+ totalSum.value = res.data.totalSum
})
}
diff --git a/qrcodeScaner/pages/statement/originalGlassList.vue b/qrcodeScaner/pages/statement/originalGlassList.vue
index bb9172b..0f78278 100644
--- a/qrcodeScaner/pages/statement/originalGlassList.vue
+++ b/qrcodeScaner/pages/statement/originalGlassList.vue
@@ -1,13 +1,13 @@
<template>
<view style="width: 100%;height: 100%;">
- <view class="charts-box">
+ <!-- <view class="charts-box">
<qiun-data-charts
type="pie"
:opts="opts"
:chartData="chartData"
/>
- </view>
- <!-- <uni-table border stripe style='width:100%;height: 100%;overflow: auto;'>
+ </view> -->
+ <uni-table border stripe style='width:100%;height: 100%;overflow: auto;'>
<uni-tr>
<uni-th align="center">ID</uni-th>
<uni-th align="center">鐗╂枡</uni-th>
@@ -31,7 +31,7 @@
<uni-td align="center">{{ item.producer }}</uni-td>
<uni-td align="center">{{ item.remarks }}</uni-td>
</uni-tr>
- </uni-table> -->
+ </uni-table>
</view>
</template>
diff --git a/qrcodeScaner/pages/warehouseOut/warehouseOut.vue b/qrcodeScaner/pages/warehouseOut/warehouseOut.vue
new file mode 100644
index 0000000..e336eee
--- /dev/null
+++ b/qrcodeScaner/pages/warehouseOut/warehouseOut.vue
@@ -0,0 +1,117 @@
+<template>
+ <view style="margin-bottom: 2rem;">
+ <uni-section
+ title="鍙戣揣鍗曞嚭搴�"
+ padding="0 0 5px 10px">
+
+ <template v-slot:right>
+ <button @click="warehouseOut" type="primary" size='mini'>鍑哄簱</button>
+ </template>
+ </uni-section>
+ </view>
+
+ <view>
+ <uni-table ref="table" border stripe type="selection" emptyText="鏆傛棤鏇村鏁版嵁" @selection-change="selectionChange">
+ <uni-tr>
+ <uni-th align="center">鍙戣揣鏁伴噺</uni-th>
+ <uni-th align="center">搴撳瓨鏁伴噺</uni-th>
+ <uni-th align="center">瀹�*楂�</uni-th>
+ <!-- <uni-th align="center" width='150'>浜у搧鍚嶇О</uni-th> -->
+ <uni-th align="center">鍙戣揣鍗曞彿</uni-th>
+ <uni-th align="center">鍙戣揣搴忓彿</uni-th>
+ <uni-th align="center">璁㈠崟鍙�</uni-th>
+
+ <uni-th align="center">瀹㈡埛鍚嶇О</uni-th>
+ <uni-th align="center">椤圭洰鍚嶇О</uni-th>
+ <uni-th align="center">鍙戣揣鏃ユ湡</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item, index) in tableData" :key="index">
+ <uni-td align="center">{{ item.deliveryDetail.quantity }}</uni-td>
+ <uni-td align="center">{{ item.warehouseNum }}</uni-td>
+ <uni-td align="center">{{ item.width }}*{{ item.height }}</uni-td>
+
+ <!-- <uni-td align="center">{{ item.productName }}</uni-td> -->
+ <uni-td align="center">{{ item.deliveryDetail.deliveryId }}</uni-td>
+ <uni-td align="center">{{ item.deliveryDetail.orderNumber }}</uni-td>
+
+ <uni-td align="center">{{ item.deliveryDetail.orderId }}</uni-td>
+ <uni-td align="center">{{ item.delivery.customerName }}</uni-td>
+ <uni-td align="center">{{ item.order.project }}</uni-td>
+ <uni-td align="center">{{ item.deliveryDetail.createTime }}</uni-td>
+ </uni-tr>
+ </uni-table>
+ </view>
+ <view>
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType" :message="messageText" :duration="3000"></uni-popup-message>
+ </uni-popup>
+ </view>
+</template>
+
+<script setup>
+ import { onMounted, ref } from 'vue';
+ import { onLoad } from '@dcloudio/uni-app'
+ import request from '../../utils/request'
+ import userInfo from '@/stores/userInfo'
+ import { debounce } from 'lodash'
+ const user=userInfo()
+ const tableData = ref([])
+ const checkList = ref([])
+ const table = ref(null)
+ const message = ref(null)
+ const msgType=ref('success')
+ const messageText=ref('')
+
+
+ onLoad(()=>{
+ getSelectDeliveryDetailList()
+ })
+
+
+ const selectionChange = (e) => {
+ checkList.value = e.detail.index
+ }
+
+ const getSelectDeliveryDetailList = () => {
+ request.post(`/app/getSelectDeliveryDetailList`).then(res => {
+ tableData.value = res.data.data
+ })
+ }
+
+
+ //鍑哄簱鏂规硶
+ const warehouseOut = debounce(() => {
+ if(checkList.value.length === 0){
+ messageToggle('warn',"鏈�夋嫨鍑哄簱鏁版嵁")
+ }
+ checkList.value.sort()
+ const arr = []
+ checkList.value.forEach(item => {
+ arr.push(tableData.value[item])
+ })
+ const para = {
+ userId:user.user.userId,
+ userName: user.user.userName,
+ orderDetail:arr
+ }
+
+ request.post(`/app/addDeliveryDetail`,para).then(res => {
+ messageToggle('success',"鍑哄簱鎴愬姛")
+ table.value.clearSelection()
+ getSelectDeliveryDetailList()
+ })
+ },200)
+
+ const messageToggle = (type,msg) => {
+ msgType.value = type
+ messageText.value = msg
+ message.value.open()
+ }
+
+</script>
+
+<style>
+
+
+</style>
diff --git a/qrcodeScaner/utils/config.js b/qrcodeScaner/utils/config.js
index bdb0b51..2423d9b 100644
--- a/qrcodeScaner/utils/config.js
+++ b/qrcodeScaner/utils/config.js
@@ -1,6 +1,6 @@
let ip =uni.getStorageSync('ip') || null
const webPort = 5173
-const port = 8086
+const port = uni.getStorageSync('port') || 8086
export {
ip,
--
Gitblit v1.8.0