From 2f93b5a6157c3752230485e5aa56f79fdabd5fb4 Mon Sep 17 00:00:00 2001
From: 周宾 <2802492122@qq.com>
Date: 星期三, 24 十二月 2025 17:43:47 +0800
Subject: [PATCH] 天津双奇点-开发仓储物流板块

---
 src/pages/index.vue                                       |   60 +++
 src/pages/inventoryManagement/receiptManagement/index.vue |  218 +++++++++++++
 src/api/inventoryManagement/receiptManagement.js          |   28 +
 src/pages.json                                            |   39 ++
 src/pages/inventoryManagement/issueManagement/index.vue   |  221 +++++++++++++
 src/pages/inventoryManagement/issueManagement/edit.vue    |  114 +++++++
 src/api/inventoryManagement/issueManagement.js            |   28 +
 src/config.js                                             |    3 
 src/pages/inventoryManagement/receiptManagement/edit.vue  |  209 +++++++++++++
 9 files changed, 917 insertions(+), 3 deletions(-)

diff --git a/src/api/inventoryManagement/issueManagement.js b/src/api/inventoryManagement/issueManagement.js
new file mode 100644
index 0000000..09212bc
--- /dev/null
+++ b/src/api/inventoryManagement/issueManagement.js
@@ -0,0 +1,28 @@
+// 宸℃涓婁紶
+import request from '@/utils/request'
+
+// 閲囪喘鍑哄簱鍒楄〃
+export function listPage(query) {
+    return request({
+        url: '/stockin/listPage',
+        method: 'get',
+        params: query
+    })
+}
+//鑷畾涔夊嚭搴撳垪琛�
+export function listPageByCustom(query) {
+    return request({
+        url: '/stockin/listPageByCustom',
+        method: 'get',
+        params: query
+    })
+}
+//棰嗙敤
+export function stockout(query) {
+  return request({
+    url: '/stockmanagement/stockout',
+    method: 'post',
+    data: query
+  })
+}
+
diff --git a/src/api/inventoryManagement/receiptManagement.js b/src/api/inventoryManagement/receiptManagement.js
new file mode 100644
index 0000000..3f25d66
--- /dev/null
+++ b/src/api/inventoryManagement/receiptManagement.js
@@ -0,0 +1,28 @@
+// 宸℃涓婁紶
+import request from '@/utils/request'
+
+// 閲囪喘鍏ュ簱鍒楄〃
+export function listPage(query) {
+    return request({
+        url: '/stockin/listPage',
+        method: 'get',
+        params: query
+    })
+}
+//鑷畾涔夊叆搴撳垪琛�
+export function listPageByCustom(query) {
+    return request({
+        url: '/stockin/listPageByCustom',
+        method: 'get',
+        params: query
+    })
+}
+//鏂板鑷畾涔夊叆搴�
+// 鑾峰彇鐢ㄦ埛淇℃伅
+export function addCustom(query) {
+  return request({
+    url: '/stockin/addCustom',
+    method: 'post',
+    data: query
+  })
+}
diff --git a/src/config.js b/src/config.js
index 135cce3..a7d2575 100644
--- a/src/config.js
+++ b/src/config.js
@@ -2,7 +2,8 @@
 const config = {
   //  baseUrl: 'https://vue.ruoyi.vip/prod-api',
   // baseUrl: 'http://localhost/prod-api',
-  baseUrl: 'http://114.132.189.42:9066', // 瀹佸娑︽嘲
+	baseUrl: 'http://192.168.1.211:8888', // 澶╂触鍙屽鐐�
+  // baseUrl: 'http://114.132.189.42:9066', // 瀹佸娑︽嘲
   // baseUrl: 'http://114.132.189.42:9068', // 鏂扮枂娴峰窛寮�蹇�
   // baseUrl: 'http://192.168.1.147:9036',
    //cloud鍚庡彴缃戝叧鍦板潃
diff --git a/src/pages.json b/src/pages.json
index 4151447..f6fb3eb 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -610,7 +610,44 @@
           "path": "code/index"
         }
       ]
-    }
+    },
+		{
+			"root": "pages/inventoryManagement",
+			"pages": [
+				{
+					"path": "receiptManagement/index",
+					"style": {
+						"navigationBarTitleText": "鍏ュ簱绠$悊",
+            "navigationStyle": "custom",
+            "enablePullDownRefresh": true,
+            "backgroundColor": "#f8f8f8"
+					}
+				},
+        {
+					"path": "receiptManagement/edit",
+					"style": {
+						"navigationBarTitleText": "鑷畾涔夊叆搴�",
+            "navigationStyle": "custom"
+					}
+				},
+        {
+					"path": "issueManagement/index",
+					"style": {
+						"navigationBarTitleText": "鍑哄簱绠$悊",
+            "navigationStyle": "custom",
+            "enablePullDownRefresh": true,
+            "backgroundColor": "#f8f8f8"
+					}
+				},
+        {
+					"path": "issueManagement/edit",
+					"style": {
+						"navigationBarTitleText": "鑷畾涔夊嚭搴�",
+            "navigationStyle": "custom"
+					}
+				}
+			]
+		}
   ],
   "tabBar": {
     "color": "#000000",
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 617ce21..7964b47 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -31,7 +31,35 @@
 		<!--				</view>-->
 		<!--			</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 warehousingLogisticsItems"
+						: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 marketing-module">
 			<view class="module-header">
@@ -213,6 +241,26 @@
 		currentStatus.value = statusList[statusIndex]
 	}, 3000)
 }
+
+//浠撳偍鐗╂祦鍔熻兘鏁版嵁
+const warehousingLogisticsItems = reactive([
+	{
+		icon: '/static/images/icon/xiaoshoutaizhang@2x.png',
+		label: '鍏ュ簱绠$悊',
+	},
+	{
+		icon: '/static/images/icon/kaipiaodengji@2x.png',
+		label: '鍑哄簱绠$悊',
+	},
+	{
+		icon: '/static/images/icon/kaipiaotaizhang@2x.png',
+		label: '鍑哄簱鍙拌处',
+	},
+	{
+		icon: '/static/images/icon/huikuandengji@2x.png',
+		label: '搴撳瓨绠$悊',
+	}
+]);
 
 // 钀ラ攢绠$悊鍔熻兘鏁版嵁
 const marketingItems = reactive([
@@ -490,6 +538,16 @@
 				url: '/pages/equipmentManagement/verification/index'
 			});
 			break;
+		case '鍏ュ簱绠$悊':
+			uni.navigateTo({
+				url: '/pages/inventoryManagement/receiptManagement/index'
+			});
+			break
+		case '鍑哄簱绠$悊':
+			uni.navigateTo({
+				url: '/pages/inventoryManagement/issueManagement/index'
+			});
+			break
 		default:
 			uni.showToast({
 				title: `鐐瑰嚮浜�${item.label}`,
diff --git a/src/pages/inventoryManagement/issueManagement/edit.vue b/src/pages/inventoryManagement/issueManagement/edit.vue
new file mode 100644
index 0000000..a98d6d8
--- /dev/null
+++ b/src/pages/inventoryManagement/issueManagement/edit.vue
@@ -0,0 +1,114 @@
+<template>
+    <PageHeader :title="pageTitle" @back="goBack" />
+    <view class="account-detail">
+        <view class="box">
+            <view class="form-box">
+                <uni-forms :key="index" label-position="top" label-width="400rpx">
+
+                    <uni-forms-item label="鍚嶇О" required>
+                        <uni-easyinput v-model="productCategory" placeholder="" disabled />
+                    </uni-forms-item>
+                    <uni-forms-item label="鍑哄簱鏁伴噺/浠�" required>
+                        <uni-number-box v-model="goods.quantity" :min="0"></uni-number-box>
+                    </uni-forms-item>
+                    <uni-forms-item label="鍑哄簱鏃ユ湡" required>
+                        <uni-datetime-picker type="date" :clear-icon="false" v-model="goods.time" />
+                    </uni-forms-item>
+                    <uni-forms-item label="鍑哄簱浜�" required>
+                        <picker :range="userList" @change="swichUser" range-key="nickName">
+                            <text>{{ userName||'璇烽�夋嫨' }}</text>
+                        </picker>
+                    </uni-forms-item>
+                </uni-forms>
+            </view>
+            <view style="display: flex;justify-content: flex-end;">
+                <button class="mini-btn" type="primary" size="mini"
+                    style="margin-left: 0;margin-right: 0;margin-right: 20rpx;" @click="submitForm">纭畾</button>
+                <button class="mini-btn" size="mini" style="margin-left: 0;margin-right: 0;" @click="goBack">鍙栨秷</button>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script setup>
+import { onMounted, ref } from 'vue'
+import { stockout } from '@/api/inventoryManagement/issueManagement.js'
+const productCategory = ref('')
+import { userListNoPageByTenantId } from "@/api/system/user"
+const pageTitle = ref('棰嗙敤浜у搧')
+const userList = ref([])
+const userName = ref('')
+const goods = ref({
+    id: 0,
+    quantity: 0,
+    salesLedgerProductId: 0,
+    time: "",
+    type: 3,
+    userId: undefined
+})
+const props = defineProps(['goods'])
+
+const goBack = () => {
+    uni.navigateBack()
+}
+const submitForm = async () => {
+    let res = await stockout(goods.value)
+    if (res.code !== 200) {
+        uni.showToast({
+            title: res.msg,
+            icon: 'none'
+        })
+        return
+    }
+    uni.showToast({
+        title: '鎴愬姛棰嗙敤',
+        icon: 'none'
+    })
+    goBack()
+}
+const initContacts = () => {
+  userListNoPageByTenantId().then((res) => {
+    console.log('userListNoPageByTenantId',res.data)
+    userList.value = res.data
+  })
+}
+
+const swichUser = (e) => {
+    goods.value.userId = userList.value[e.detail.value].userId
+    userName.value = userList.value[e.detail.value].nickName
+}
+
+
+onMounted(() => {
+    let _goods = JSON.parse(props.goods)
+    goods.value.id = _goods.id
+    productCategory.value = _goods.productCategory
+    initContacts()
+})
+</script>
+<style lang="scss" scoped>
+.box {
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: 20rpx;
+    min-height: 80rpx;
+    padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
+}
+
+.form-box {
+    box-sizing: border-box;
+    margin-bottom: 20rpx;
+    padding: 20rpx;
+    background-color: #f5f5f5;
+    border-radius: 20rpx;
+}
+
+.add-img {
+    .img {
+        background-color: #efefef;
+        border-radius: 10rpx;
+        width: 200rpx;
+        height: 200rpx;
+    }
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/inventoryManagement/issueManagement/index.vue b/src/pages/inventoryManagement/issueManagement/index.vue
new file mode 100644
index 0000000..73243c8
--- /dev/null
+++ b/src/pages/inventoryManagement/issueManagement/index.vue
@@ -0,0 +1,221 @@
+<template>
+	<view>
+		<PageHeader title="鍑哄簱绠$悊" @back="goBack" />
+		<view class="tabs">
+			<uni-segmented-control :current="tabCurrent" :values="tabItems" @clickItem="switchTab" />
+		</view>
+		<view v-if="contentList?.length !== 0" class="content">
+			<view v-if="tabCurrent === 0">
+				<block v-for="item in contentList" :key="item.id">
+					<view class="item-box item-box0"></view>
+				</block>
+				<uni-load-more :status="loadMoreStatus"></uni-load-more>
+			</view>
+			<view v-if="tabCurrent === 1">
+				<block v-for="item in contentList" :key="item.id">
+					<view class="item-box item-box1">
+						<view class="item">
+							<view class="label">浜у搧鍥剧墖</view>
+							<view class="value">
+								<image class="img" :src="baseUrl + item.url" mode="aspectFill鈥�" lazy-load></image>
+							</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱鏃堕棿</view>
+							<view class="value">{{ item.inboundDate }}</view>
+						</view>
+						<view class="item">
+							<view class="label">浜у搧鍚嶇О</view>
+							<view class="value">{{ item.productCategory }}</view>
+						</view>
+						<view class="item">
+							<view class="label">浜у搧楂樺害</view>
+							<view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱鏁伴噺/浠�</view>
+							<view class="value">{{ item.inboundNum }}</view>
+						</view>
+						<view class="item">
+							<view class="label">搴撳瓨鏁伴噺/浠�</view>
+							<view class="value">{{ item.inboundNum0 }}</view>
+						</view>
+						<view class="item">
+							<view class="label">姣忎欢鏁伴噺/鏀�</view>
+							<view class="value">{{ item.boxNum }}</view>
+						</view>
+						<view class="item">
+							<view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+							<view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+						</view>
+						<view class="item">
+							<view class="label">绾哥瑙勬牸</view>
+							<view class="value">{{ item.cartonSpecifications }}cm</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱浜�</view>
+							<view class="value">{{ item.createBy }}</view>
+						</view>
+						<view class="item" style="justify-content: flex-end;">
+							<button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+								@click="openForm(item, 'edit')">棰嗙敤</button>
+						</view>
+					</view>
+				</block>
+				<uni-load-more :status="loadMoreStatus"></uni-load-more>
+			</view>
+		</view>
+		<view v-if="contentList?.length === 0" class="no-data">
+			<text>鏆傛棤鏁版嵁</text>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { ref, reactive, computed } from 'vue'
+import { listPage, listPageByCustom } from '@/api/inventoryManagement/issueManagement.js'
+import { onShow, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
+import config from '@/config'
+const baseUrl = config.baseUrl
+// tab鐩稿叧
+const tabItems = reactive(['閲囪喘鍑哄簱', '鎴愬搧鍑哄簱'])
+const tabCurrent = ref(0)
+
+const switchTab = (e) => {
+	if (tabCurrent.value !== e.currentIndex) {
+		tabCurrent.value = e.currentIndex
+	}
+	reloadPage()
+}
+
+// 杩斿洖涓婁竴椤�
+const goBack = () => {
+	uni.navigateBack()
+}
+
+// 鎵撳紑缂栬緫/鏂板
+const openForm = (goods, type) => {
+	uni.navigateTo({
+		url: '/pages/inventoryManagement/issueManagement/edit?goods=' + JSON.stringify(goods)
+	})
+}
+
+// 鍒嗛〉鐩稿叧
+const pageParams = reactive({
+	size: 10,
+	current: 1
+})
+const totalSize = ref(0)
+const noMore = computed(() => {
+	return contentList.value.length >= totalSize.value
+})
+const loading = ref(false)
+const contentList = ref([])
+const loadMoreStatus = computed(() => {
+	if (loading.value) {
+		return 'loading'
+	}
+	if (noMore.value) {
+		return 'noMore'
+	}
+	return 'more'
+})
+const loadPage = () => {
+	if (noMore.value || loading.value) {
+		return
+	}
+	pageParams.current += 1
+	getList()
+}
+const reloadPage = () => {
+	pageParams.current = 1
+	contentList.value = []
+	getList()
+}
+const getList = async () => {
+	let getListApi = null
+	if (tabCurrent.value == 1) {
+		getListApi = listPageByCustom
+	} else if (tabCurrent.value == 0) {
+		getListApi = listPage
+	}
+	loading.value = true
+	let resp = await getListApi(pageParams)
+	loading.value = false
+	if (resp.code != 200 || !resp.data) {
+		contentList.value = []
+		totalSize.value = 0
+		return
+	}
+	contentList.value = [...contentList.value, ...resp.data.records]
+	console.log(resp.data.records)
+	totalSize.value = resp.data.total
+}
+
+onReachBottom(() => {
+	loadPage()
+})
+onPullDownRefresh(() => {
+	reloadPage()
+	uni.stopPullDownRefresh()
+})
+onShow(() => {
+	reloadPage()
+})
+
+</script>
+
+<style lang='scss' scoped>
+.tabs {
+	box-sizing: border-box;
+	padding: 20rpx 40rpx;
+}
+
+.no-data {
+	text-align: center;
+	padding: 40px 20px;
+	color: #999;
+	font-size: 14px;
+}
+
+.item-box {
+	box-sizing: border-box;
+	margin: 20rpx;
+	padding: 20rpx;
+	border-radius: 10rpx;
+	background-color: #f5f5f5;
+}
+
+.item {
+	display: flex;
+	justify-content: space-between;
+	margin: 10rpx 0;
+
+	.label {}
+
+	.value {
+		.img {
+			width: 200rpx;
+			height: 200rpx;
+			background-color: #999;
+			border-radius: 10rpx;
+		}
+	}
+}
+
+// 娴姩鎸夐挳鏍峰紡
+.fab-button {
+	position: fixed;
+	bottom: calc(30px + env(safe-area-inset-bottom));
+	right: 30px;
+	width: 56px;
+	height: 56px;
+	background: #2979ff;
+	border-radius: 50%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3);
+	z-index: 1000;
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/inventoryManagement/receiptManagement/edit.vue b/src/pages/inventoryManagement/receiptManagement/edit.vue
new file mode 100644
index 0000000..4a2438d
--- /dev/null
+++ b/src/pages/inventoryManagement/receiptManagement/edit.vue
@@ -0,0 +1,209 @@
+<template>
+    <PageHeader :title="pageTitle" @back="goBack" />
+    <view class="account-detail">
+        <view class="box">
+            <view v-if="type == 'add'">
+                <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;"
+                    @click="addItem">鏂板</button>
+            </view>
+            <view v-for="(item, index) in goodsList" class="form-box">
+                <uni-forms :key="index" label-position="top" label-width="400rpx">
+                    <uni-forms-item label="浜у搧鍥剧墖" required>
+                        <view class="add-img">
+                            <image v-if="item.url" class="img" :src="baseUrl + item.url" mode="aspectFill" />
+                            <uni-icons v-else type="camera-filled" size="56" style="color: #8a8a8a"
+                                @click="addImg(index)"></uni-icons>
+                        </view>
+                    </uni-forms-item>
+                    <uni-forms-item label="鍚嶇О" required>
+                        <uni-easyinput v-model="item.productCategory" placeholder="璇疯緭鍏ュ悕绉�" />
+                    </uni-forms-item>
+                    <uni-forms-item label="楂樺害" required>
+                        <uni-easyinput v-model="item.specificationModel" type="number" placeholder="璇疯緭鍏ラ珮搴�" />
+                    </uni-forms-item>
+                    <uni-forms-item label="楂樺害鍗曚綅" required>
+                        <uni-easyinput v-model="item.unit" placeholder="璇疯緭鍏ラ珮搴﹀崟浣�" />
+                    </uni-forms-item>
+                    <uni-forms-item label="绾哥瑙勬牸" required>
+                        <uni-easyinput v-model="item.cartonSpecifications" placeholder="璇疯緭鍏ョ焊绠辫鏍�" />
+                    </uni-forms-item>
+                    <uni-forms-item label="鍏ュ簱鏁伴噺/浠�" required>
+                        <uni-number-box v-model="item.inboundNum" :min="0"></uni-number-box>
+                    </uni-forms-item>
+                    <uni-forms-item label="姣忎欢鏁伴噺/鏀�" required>
+                        <uni-number-box v-model="item.boxNum" :min="0"></uni-number-box>
+                    </uni-forms-item>
+                    <uni-forms-item label="鍗曚环锛堝厓锛�/鏀�" required>
+                        <uni-number-box v-model="item.taxInclusiveUnitPrice" :min="0" :step="0.01"></uni-number-box>
+                    </uni-forms-item>
+                    <uni-forms-item label="鍏ュ簱鏃ユ湡" required>
+                        <uni-datetime-picker type="date" :clear-icon="false" v-model="item.inboundDate" />
+                    </uni-forms-item>
+                </uni-forms>
+            </view>
+            <view style="display: flex;justify-content: flex-end;">
+                <button class="mini-btn" type="primary" size="mini"
+                    style="margin-left: 0;margin-right: 0;margin-right: 20rpx;" @click="submitForm">纭畾</button>
+                <button class="mini-btn" size="mini" style="margin-left: 0;margin-right: 0;" @click="goBack">鍙栨秷</button>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script setup>
+import { onMounted, ref } from 'vue'
+import { getToken } from "@/utils/auth";
+import { addCustom } from '@/api/inventoryManagement/receiptManagement.js'
+import config from '@/config'
+const baseUrl = config.baseUrl
+const pageTitle = ref('鏂板鑷畾涔夊叆搴�')
+const goodsList = ref([])
+const type = ref('add')
+const props = defineProps(['goods'])
+const defaultGoods = {
+    boxNum: 0,
+    cartonSpecifications: "",
+    id: null,
+    inboundDate: "",
+    inboundNum: 0,
+    itemType: "",
+    productCategory: "",
+    specificationModel: "",
+    supplierName: "",
+    taxExclusiveTotalPrice: 0,
+    taxInclusiveTotalPrice: 0,
+    taxInclusiveUnitPrice: 0,
+    taxRate: 0,
+    unit: "",
+    url: "",
+}
+
+const goBack = () => {
+    uni.navigateBack()
+}
+const submitForm = async() => {
+    let res = await addCustom(goodsList.value)
+    if(res.code !== 200){
+        uni.showToast({
+            title: res.msg,
+            icon: 'none'
+        })
+        return
+    }
+    uni.showToast({
+        title: '鏂板鎴愬姛',
+        icon: 'none'
+    })
+    goBack()
+}
+
+const addImg = (index) => {
+    uni.chooseMedia({
+        count: 1,
+        mediaType: ['image'],
+        sourceType: ['album', 'camera'],
+        sizeType: ['original', 'compressed'],
+        success: (res) => {
+            let imgList = []
+            let isHeGe = true
+            if (res.tempFiles && res.tempFiles.length) {
+                res.tempFiles.forEach(item => {
+                    imgList.push(item.tempFilePath)
+                    if (item.size > 10000000) {
+                        isHeGe = false
+                    }
+                })
+            }
+            if (!isHeGe) {
+                uni.showToast({
+                    title: "鍥剧墖涓嶈兘澶т簬10M",
+                    icon: "none"
+                })
+                return
+            }
+            UploadImage(imgList[0], index)
+        },
+        fail: (e) => {
+            console.log('chooseMedia:fail', e)
+            if (e.errMsg == 'chooseMedia:fail cancel') {
+                return
+            }
+            uni.showToast({
+                title: "涓婁紶澶辫触",
+                icon: 'none',
+                duration: 1500
+            })
+        }
+    })
+}
+const UploadImage = (url, index) => {
+    uni.uploadFile({
+        url: baseUrl + '/file/upload', // 鏇挎崲涓哄疄闄呯殑涓婁紶鎺ュ彛
+        filePath: url,
+        name: 'file',
+        header: { Authorization: 'Bearer ' + getToken() },
+        success: (res) => {
+            const data = JSON.parse(res.data)
+            if (data.code === 200) {
+                goodsList.value[index].url = data.data.tempPath
+                uni.showToast({
+                    title: '涓婁紶鎴愬姛',
+                    icon: 'none',
+                    duration: 1500
+                })
+            } else {
+                console.log('涓婁紶澶辫触', res)
+                uni.showToast({
+                    title: '涓婁紶澶辫触',
+                    icon: 'none'
+                })
+            }
+        },
+        fail: (e) => {
+            console.log('uploadFile:fail', e)
+            uni.showToast({
+                title: '涓婁紶澶辫触',
+                icon: 'none'
+            })
+        }
+    })
+}
+
+onMounted(() => {
+    let _goods = JSON.parse(props.goods)
+    if (_goods.id) {
+        pageTitle.value = '缂栬緫鑷畾涔夊叆搴�'
+        type.value = 'edit'
+    }
+    goodsList.value.push({...defaultGoods,..._goods})
+})
+const addItem = () => {
+    goodsList.value.push({...defaultGoods})
+}
+</script>
+<style lang="scss" scoped>
+.box {
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: 20rpx;
+    min-height: 80rpx;
+    padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
+}
+
+.form-box {
+    box-sizing: border-box;
+    margin-bottom: 20rpx;
+    padding: 20rpx;
+    background-color: #f5f5f5;
+    border-radius: 20rpx;
+}
+
+.add-img {
+    .img {
+        background-color: #efefef;
+        border-radius: 10rpx;
+        width: 200rpx;
+        height: 200rpx;
+    }
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/inventoryManagement/receiptManagement/index.vue b/src/pages/inventoryManagement/receiptManagement/index.vue
new file mode 100644
index 0000000..369b1f4
--- /dev/null
+++ b/src/pages/inventoryManagement/receiptManagement/index.vue
@@ -0,0 +1,218 @@
+<template>
+	<view>
+		<PageHeader title="鍏ュ簱绠$悊" @back="goBack" />
+		<view class="tabs">
+			<uni-segmented-control :current="tabCurrent" :values="tabItems" @clickItem="switchTab" />
+		</view>
+		<!-- <button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;" @click="openForm({},'add')">鏂板鍏ュ簱</button> -->
+		<view v-if="contentList?.length !== 0" class="content">
+			<view v-if="tabCurrent === 0">
+				<block v-for="item in contentList" :key="item.id">
+					<view class="item-box item-box0"></view>
+				</block>
+				<uni-load-more :status="loadMoreStatus"></uni-load-more>
+			</view>
+			<view v-if="tabCurrent === 1">
+				<block v-for="item in contentList" :key="item.id">
+					<view class="item-box item-box1">
+						<view class="item">
+							<view class="label">浜у搧鍥剧墖</view>
+							<view class="value">
+								<image class="img" :src="baseUrl + item.url" mode="aspectFill鈥�" lazy-load></image>
+							</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱鏃堕棿</view>
+							<view class="value">{{ item.inboundDate }}</view>
+						</view>
+						<view class="item">
+							<view class="label">浜у搧鍚嶇О</view>
+							<view class="value">{{ item.productCategory }}</view>
+						</view>
+						<view class="item">
+							<view class="label">浜у搧楂樺害</view>
+							<view class="value">{{ item.specificationModel }}{{ item.unit }}</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱鏁伴噺/浠�</view>
+							<view class="value">{{ item.inboundNum }}</view>
+						</view>
+						<view class="item">
+							<view class="label">姣忎欢鏁伴噺/鏀�</view>
+							<view class="value">{{ item.boxNum }}</view>
+						</view>
+						<view class="item">
+							<view class="label">鍗曚环锛堝厓锛�/鏀�</view>
+							<view class="value">{{ item.taxInclusiveUnitPrice }}</view>
+						</view>
+						<view class="item">
+							<view class="label">绾哥瑙勬牸</view>
+							<view class="value">{{ item.cartonSpecifications }}cm</view>
+						</view>
+						<view class="item">
+							<view class="label">鍏ュ簱浜�</view>
+							<view class="value">{{ item.createBy }}</view>
+						</view>
+						<view class="item" style="justify-content: flex-end;">
+							<button class="mini-btn" type="primary" size="mini" style="margin-left: 0;margin-right: 0;" @click="openForm(item,'edit')">缂栬緫</button>
+						</view>
+					</view>
+				</block>
+				<uni-load-more :status="loadMoreStatus"></uni-load-more>
+			</view>
+		</view>
+		<view class="fab-button" @click="openForm({},'add')">
+			<up-icon name="plus" size="24" color="#ffffff"></up-icon>
+		</view>
+		<view v-if="contentList?.length === 0" class="no-data">
+			<text>鏆傛棤鏁版嵁</text>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { ref, reactive, computed } from 'vue'
+import { listPage, listPageByCustom } from '@/api/inventoryManagement/receiptManagement.js'
+import { onShow, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
+import config from '@/config'
+const baseUrl = config.baseUrl
+// tab鐩稿叧
+const tabItems = reactive(['閲囪喘鍏ュ簱', '鎴愬搧鍏ュ簱'])
+const tabCurrent = ref(0)
+
+const switchTab = (e) => {
+	if (tabCurrent.value !== e.currentIndex) {
+		tabCurrent.value = e.currentIndex
+	}
+	reloadPage()
+}
+
+// 杩斿洖涓婁竴椤�
+const goBack = () => {
+	uni.navigateBack()
+}
+
+// 鎵撳紑缂栬緫/鏂板
+const openForm = (goods,type) => {
+	uni.navigateTo({
+		url: '/pages/inventoryManagement/receiptManagement/edit?goods=' + JSON.stringify(goods)
+	})
+}
+
+// 鍒嗛〉鐩稿叧
+const pageParams = reactive({
+	size: 10,
+	current: 1
+})
+const totalSize = ref(0)
+const noMore = computed(() => {
+	return contentList.value.length >= totalSize.value
+})
+const loading = ref(false)
+const contentList = ref([])
+const loadMoreStatus = computed(() => {
+	if (loading.value) {
+		return 'loading'
+	}
+	if (noMore.value) {
+		return 'noMore'
+	}
+	return 'more'
+})
+const loadPage = () => {
+	if (noMore.value || loading.value) {
+		return
+	}
+	pageParams.current += 1
+	getList()
+}
+const reloadPage = () => {
+	pageParams.current = 1
+	contentList.value = []
+	getList()
+}
+const getList = async () => {
+	let getListApi = null
+	if (tabCurrent.value == 1) {
+		getListApi = listPageByCustom
+	} else if (tabCurrent.value == 0) {
+		getListApi = listPage
+	}
+	loading.value = true
+	let resp = await getListApi(pageParams)
+	loading.value = false
+	if (resp.code != 200 || !resp.data) {
+		contentList.value = []
+		totalSize.value = 0
+		return
+	}
+	contentList.value = [...contentList.value, ...resp.data.records]
+	console.log(resp.data.records)
+	totalSize.value = resp.data.total
+}
+
+onReachBottom(() => {
+	loadPage()
+})
+onPullDownRefresh(() => {
+	reloadPage()
+	uni.stopPullDownRefresh()
+})
+onShow(() => {
+	reloadPage()
+})
+
+</script>
+
+<style lang='scss' scoped>
+.tabs {
+	box-sizing: border-box;
+	padding: 20rpx 40rpx;
+}
+
+.no-data {
+	text-align: center;
+	padding: 40px 20px;
+	color: #999;
+	font-size: 14px;
+}
+.item-box{
+	box-sizing: border-box;
+	margin: 20rpx;
+	padding: 20rpx;
+	border-radius: 10rpx;
+	background-color: #f5f5f5;
+}
+
+.item {
+	display: flex;
+	justify-content: space-between;
+	margin: 10rpx 0;
+
+	.label {}
+
+	.value {
+		.img {
+			width: 200rpx;
+			height: 200rpx;
+			background-color: #999;
+			border-radius: 10rpx;
+		}
+	}
+}
+// 娴姩鎸夐挳鏍峰紡
+.fab-button {
+	position: fixed;
+	bottom: calc(30px + env(safe-area-inset-bottom));
+	right: 30px;
+	width: 56px;
+	height: 56px;
+	background: #2979ff;
+	border-radius: 50%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3);
+	z-index: 1000;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3