From 536b053bbd574bab1b5179eccb962c3ad322c382 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 06 一月 2026 14:38:14 +0800
Subject: [PATCH] 双奇点: 1.app仓储物流字段调整
---
src/pages/index.vue | 272 +++++++++++++++++++++---------------------------------
1 files changed, 106 insertions(+), 166 deletions(-)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 7964b47..c83160f 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -11,26 +11,11 @@
<view class="hero-section">
<view class="bg-img">
<view class="hero-content">
- <text class="hero-title">娑︽嘲鐢熺墿绉戞妧</text>
+ <text class="hero-title">鍙屽鐐�</text>
</view>
<view class="hero-wave"></view>
</view>
</view>
-
- <!-- <view class="notice-section">-->
- <!-- <view class="notice">-->
- <!-- <view class="notice-content">-->
- <!-- <view class="notice-left">-->
- <!-- <text class="notice-status">閫氱煡</text>-->
- <!-- </view>-->
- <!-- <view class="notice-separator"></view>-->
- <!-- <view class="notice-right">-->
- <!-- <text class="notice-label">{{currentStatus}}</text>-->
- <!-- <text class="notice-text">褰撴棩閿�鍞澶囨暟:<text class="notice-number">{{number}}<text class="notice-unit">涓�</text></text></text>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
<!-- 浠撳偍鐗╂祦妯″潡 -->
<view class="common-module marketing-module">
<view class="module-header">
@@ -60,163 +45,17 @@
</up-grid>
</view>
</view>
- <!-- 钀ラ攢绠$悊妯″潡 -->
- <view class="common-module marketing-module">
- <view class="module-header">
- <view class="module-title-container">
- <text class="module-title">钀ラ攢绠$悊</text>
- </view>
- </view>
- <view class="module-content">
- <up-grid
- :border="false"
- col="4"
- >
- <up-grid-item
- v-for="(item, index) in marketingItems"
- :key="index"
- @click="handleCommonItemClick(item)"
- >
- <view class="icon-container" :style="{ background: item.bgColor }">
- <up-icon
- :name="item.icon"
- :size="58"
- color="#ffffff"
- ></up-icon>
- </view>
- <text class="item-label">{{item.label}}</text>
- </up-grid-item>
- </up-grid>
- </view>
- </view>
-
- <!-- 閲囪喘绠$悊妯″潡 -->
- <view class="common-module purchase-module">
- <view class="module-header">
- <view class="module-title-container">
- <text class="module-title">閲囪喘绠$悊</text>
- </view>
- </view>
- <view class="module-content">
- <up-grid
- :border="false"
- col="4"
- >
- <up-grid-item
- v-for="(item, index) in purchaseItems"
- :key="index"
- @click="handleCommonItemClick(item)"
- >
- <view class="icon-container" :style="{ background: item.bgColor }">
- <up-icon
- :name="item.icon"
- :size="58"
- color="#ffffff"
- ></up-icon>
- </view>
- <text class="item-label">{{item.label}}</text>
- </up-grid-item>
- </up-grid>
- </view>
- </view>
-
- <!-- 鍗忓悓鍔炲叕妯″潡 -->
- <view class="common-module collaboration-module">
- <view class="module-header">
- <view class="module-title-container">
- <text class="module-title">鍗忓悓鍔炲叕</text>
- </view>
- </view>
- <view class="module-content">
- <up-grid
- :border="false"
- col="4"
- >
- <up-grid-item
- v-for="(item, index) in collaborationItems"
- :key="index"
- @click="handleCommonItemClick(item)"
- >
- <view class="icon-container" :style="{ background: item.bgColor }">
- <up-icon
- :name="item.icon"
- :size="58"
- color="#ffffff"
- ></up-icon>
- </view>
- <text class="item-label">{{item.label}}</text>
- </up-grid-item>
- </up-grid>
- </view>
- </view>
-
- <!-- 鐢熶骇绠℃帶妯″潡 -->
- <view class="common-module production-module">
- <view class="module-header">
- <view class="module-title-container">
- <text class="module-title">鐢熶骇绠℃帶</text>
- </view>
- </view>
- <view class="module-content">
- <up-grid
- :border="false"
- col="4"
- >
- <up-grid-item
- v-for="(item, index) in productionItems"
- :key="index"
- @click="handleCommonItemClick(item)"
- >
- <view class="icon-container" :style="{ background: item.bgColor }">
- <up-icon
- :name="item.icon"
- :size="58"
- color="#ffffff"
- ></up-icon>
- </view>
- <text class="item-label">{{item.label}}</text>
- </up-grid-item>
- </up-grid>
- </view>
- </view>
-
- <!-- 璁惧绠$悊妯″潡 -->
- <view class="common-module equipment-module">
- <view class="module-header">
- <view class="module-title-container">
- <text class="module-title">璁惧绠$悊</text>
- </view>
- </view>
- <view class="module-content">
- <up-grid
- :border="false"
- col="4"
- >
- <up-grid-item
- v-for="(item, index) in equipmentItems"
- :key="index"
- @click="handleCommonItemClick(item)"
- >
- <view class="icon-container" :style="{ background: item.bgColor }">
- <up-icon
- :name="item.icon"
- :size="58"
- color="#ffffff"
- ></up-icon>
- </view>
- <text class="item-label">{{item.label}}</text>
- </up-grid-item>
- </up-grid>
- </view>
- </view>
+ <GoodsDetailPopup ref="refGoodsDetailPopup"></GoodsDetailPopup>
</view>
</template>
<script setup>
import {ref, onMounted, nextTick, reactive} from 'vue';
import {userLoginFacotryList} from "@/api/login";
+import { stockinDetail, detailManagementByCustom } from '@/api/inventoryManagement/receiptManagement'
import modal from "@/plugins/modal";
import useUserStore from "@/store/modules/user";
+import GoodsDetailPopup from './components/GoodsDetailPopup.vue';
const userStore = useUserStore()
const factoryId = ref('');
@@ -259,6 +98,10 @@
{
icon: '/static/images/icon/huikuandengji@2x.png',
label: '搴撳瓨绠$悊',
+ },
+ {
+ icon: '/static/images/icon/huikuandengji@2x.png',
+ label: '浜у搧鎵爜',
}
]);
@@ -548,6 +391,19 @@
url: '/pages/inventoryManagement/issueManagement/index'
});
break
+ case '鍑哄簱鍙拌处':
+ uni.navigateTo({
+ url: '/pages/inventoryManagement/dispatchLog/index'
+ });
+ break
+ case '搴撳瓨绠$悊':
+ uni.navigateTo({
+ url: '/pages/inventoryManagement/stockManagement/index'
+ });
+ break
+ case '浜у搧鎵爜':
+ scanQRCode()
+ break
default:
uni.showToast({
title: `鐐瑰嚮浜�${item.label}`,
@@ -582,7 +438,7 @@
show.value = false;
const factoryId = factoryListTem.value[arr.indexs[0]].deptId
const loginForm = {
- username: userStore.name,
+ userName: userStore.name,
password: uni.getStorageSync('remembered_password'),
factoryId: factoryId,
}
@@ -602,6 +458,90 @@
});
}
+
+//寮�濮嬫壂鐮�
+const scanQRCode = ()=>{
+ uni.scanCode({
+ onlyFromCamera:true,
+ scanType:['barCode','qrCode'],
+ success(res) {
+ console.log(res)
+ searchDetail(res.result||'')
+ },
+ fail(res) {
+ uni.showToast({
+ title: '鍙栨秷鎵爜',
+ icon: 'none',
+ duration: 1500
+ })
+ }
+ })
+}
+
+//璋堟鐩稿叧
+const refGoodsDetailPopup = ref(null)
+
+
+//鏌ョ湅璇︽儏
+const searchDetail = (barcode)=>{
+ if(!barcode||barcode.indexOf(',')==-1){
+ uni.showToast({
+ title:"璇锋壂鎻忔纭殑浜岀淮鐮�",
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ let barcodeList = barcode.split(",")
+ let barcodeId = barcodeList[0]
+ let type = barcodeList[1]
+ let detailApi = null
+ if(type==1){
+ detailApi = stockinDetail
+ }else if(type==2){
+ detailApi = detailManagementByCustom
+ }
+
+ if(!detailApi){
+ uni.showToast({
+ title:"璇锋壂鎻忔纭殑浜岀淮鐮�",
+ icon: 'none',
+ duration: 1500
+ })
+ return
+ }
+ detailApi({id:barcodeId}).then((resp) => {
+
+ if(resp.code!=200){
+ uni.showToast({
+ title:resp.msg,
+ icon:"none",
+ duration: 1500
+ })
+ return
+ }
+ if(!resp.data){
+ uni.showToast({
+ title:'鍟嗗搧涓嶅瓨鍦�',
+ icon:"none",
+ duration: 1500
+ })
+ return
+ }
+ // barcodeDetail.value = resp.data
+ refGoodsDetailPopup.value.open({
+ type: type,
+ ...resp.data
+ })
+ }).catch(() => {
+ uni.showToast({
+ title: "鑾峰彇鏁版嵁澶辫触",
+ icon: 'none',
+ duration: 1500
+ });
+ })
+}
+
// 瀹氫箟鏂规硶
const click = (name) => {
if (uToastRef.value) {
--
Gitblit v1.9.3