Ver código fonte

存粮人剩余页面

ydf 1 ano atrás
pai
commit
9282e96540

+ 8 - 0
api/grainDepositor.js

@@ -39,4 +39,12 @@ export function getStoreroom(data) {
39 39
     method: "POST",
40 40
     data
41 41
   });
42
+}
43
+
44
+// 获取货位卡信息
45
+export function getInfoByCfId(caId) {
46
+  return request({
47
+    url: `/admin-api/coding/hwk/getInfoByCfId?caId=${caId}`,
48
+    method: "GET"
49
+  });
42 50
 }

+ 18 - 0
pages.json

@@ -82,6 +82,24 @@
82 82
 	    "navigationBarTitleText": "存粮人交收库"
83 83
 	  }
84 84
 	},
85
+	{
86
+	  "path": "pages/infoDetails/infoDetailsLayout",
87
+	  "style": {
88
+	    "navigationBarTitleText": "仓房详情"
89
+	  }
90
+	},
91
+	{
92
+	  "path": "pages/infoDetails/crk/detail",
93
+	  "style": {
94
+	    "navigationBarTitleText": "出入库记录"
95
+	  }
96
+	},
97
+	{
98
+	  "path": "pages/infoDetails/zj/detail",
99
+	  "style": {
100
+	    "navigationBarTitleText": "质检记录"
101
+	  }
102
+	},
85 103
     {
86 104
       "path": "pages/warehouse-detail-verification/warehouseDetail",
87 105
       "style": {

pages/warehouse/components/warehouseInfo/InfoItem.vue → pages/components/InfoItem.vue


+ 1 - 1
pages/grainDepositor/components/myWarehouse.vue

@@ -42,7 +42,7 @@ onMounted(async () => {
42 42
 
43 43
 const goDetailPage = (info) => {
44 44
   uni.navigateTo({
45
-    url: `/pages/warehouse/warehouse?kqId=${info.kqId}`
45
+    url: `/pages/warehouse/warehouse?kqId=${info.kqId}&source=self`
46 46
   });
47 47
 };
48 48
 

+ 1 - 1
pages/grainDepositor/components/selectWarehouse.vue

@@ -42,7 +42,7 @@ onMounted(async () => {
42 42
 
43 43
 const goDetailPage = (info) => {
44 44
   uni.navigateTo({
45
-    url: `/pages/warehouse/warehouse?kqId=${info.kqId}`
45
+    url: `/pages/warehouse/warehouse?kqId=${info.kqId}&source=all`
46 46
   });
47 47
 };
48 48
 

+ 43 - 0
pages/infoDetails/crk/detail.vue

@@ -0,0 +1,43 @@
1
+<template>
2
+  <view class="content">
3
+    <!-- 第一个信息框 -->
4
+    <view class="base-info-box">
5
+      <info-item isFirst="true" label="业务时间" :value="baseInfo.kqmc" />
6
+      <info-item label="粮食品种" :value="baseInfo.kqmc" />
7
+      <info-item label="粮食等级" :value="baseInfo.kqmc" />
8
+      <info-item label="净重(吨)" :value="baseInfo.kqmc" />
9
+      <info-item label="结算单价(元)" :value="baseInfo.kqmc" />
10
+	  <info-item label="车船号" :value="baseInfo.kqmc" />
11
+	  <info-item isImage="true" label="出库照片" :value="baseInfo.kqmc" />
12
+    </view>
13
+
14
+    
15
+  </view>
16
+</template>
17
+
18
+<script setup>
19
+import { ref } from 'vue';
20
+import { onLoad } from '@dcloudio/uni-app';
21
+import InfoItem from "@/pages/components/InfoItem.vue";
22
+const baseInfo = ref({
23
+	kqmc: ""
24
+})
25
+onLoad(async (options) => {
26
+  if (options) {
27
+	baseInfo.value = options
28
+  }
29
+});
30
+</script>
31
+
32
+<style lang="scss" scoped>
33
+.content {
34
+  padding: 20rpx;
35
+}
36
+
37
+.base-info-box {
38
+  background: #ffffff;
39
+  border-radius: 20rpx;
40
+  margin-bottom: 40rpx;
41
+  padding: 20rpx;
42
+}
43
+</style>

+ 246 - 0
pages/infoDetails/crk/index.vue

@@ -0,0 +1,246 @@
1
+<template>
2
+	<view class="page">
3
+		<view class="navbar">
4
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
5
+				:class="{current: tabCurrentIndex === index}" @click="tabClick(index)">
6
+				{{item.text}}
7
+			</view>
8
+		</view>
9
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
10
+			<swiper-item class="tab-content">
11
+				<scroll-view class="list-scroll-content" scroll-y>
12
+					<view class="warehouse-list">
13
+						<view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item" @click="goPage(warehouse)">
14
+							
15
+							<view class="warehouse-details">
16
+								<view class="detail-row">
17
+									<text class="label">业务时间:<text class="blackValue">{{ warehouse.emptyRooms }}</text></text>
18
+									<text class="label">粮食品种:<text class="blackValue">{{ warehouse.selected ? '1个' : '0个' }}</text></text>
19
+								</view>
20
+								<view class="detail-row">
21
+									<text class="label">粮食等级:<text class="blackValue">{{ warehouse.capacity }}</text></text>
22
+									<text class="label">净重(吨):<text class="blackValue">{{ warehouse.rooms }}</text></text>
23
+								</view>
24
+							</view>
25
+						</view>
26
+					</view>
27
+				</scroll-view>
28
+			</swiper-item>
29
+			<swiper-item class="tab-content">
30
+				<scroll-view class="list-scroll-content" scroll-y>
31
+					<view class="warehouse-list">
32
+						<view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item" @click="goPage(warehouse)">
33
+							
34
+							<view class="warehouse-details">
35
+								<view class="detail-row">
36
+									<text class="label">业务时间:<text class="blackValue">{{ warehouse.emptyRooms }}</text></text>
37
+									<text class="label">粮食品种:<text class="blackValue">{{ warehouse.selected ? '1个' : '0个' }}</text></text>
38
+								</view>
39
+								<view class="detail-row">
40
+									<text class="label">粮食等级:<text class="blackValue">{{ warehouse.capacity }}</text></text>
41
+									<text class="label">净重(吨):<text class="blackValue">{{ warehouse.rooms }}</text></text>
42
+								</view>
43
+							</view>
44
+						</view>
45
+					</view>
46
+				</scroll-view>
47
+			</swiper-item>
48
+		</swiper>
49
+
50
+	</view>
51
+</template>
52
+
53
+<script setup>
54
+	import {
55
+		ref
56
+	} from 'vue';
57
+	const navList = [{
58
+			state: 0,
59
+			text: '出库',
60
+			loadingType: 'more',
61
+			orderList: []
62
+		},
63
+		{
64
+			state: 1,
65
+			text: '入库',
66
+			loadingType: 'more',
67
+			orderList: []
68
+		}
69
+	]
70
+	const tabCurrentIndex = ref(0)
71
+	const tabClick = (index) => {
72
+		tabCurrentIndex.value = index;
73
+	}
74
+	const warehouses = ref([{
75
+			name: '1-1',
76
+			address: 'XXXXXXXXXX',
77
+			capacity: '1500吨',
78
+			rooms: '10个',
79
+			emptyRooms: '5个',
80
+			selected: false
81
+		},
82
+		{
83
+			name: 'XXXXX',
84
+			address: 'XXXXXXXXXX',
85
+			capacity: '1500吨',
86
+			rooms: '10个',
87
+			emptyRooms: '5个',
88
+			selected: false
89
+		},
90
+		{
91
+			name: 'XXXXX',
92
+			address: 'XXXXXXXXXX',
93
+			capacity: '1500吨',
94
+			rooms: '10个',
95
+			emptyRooms: '5个',
96
+			selected: false
97
+		}
98
+	]);
99
+
100
+	const toggleSelection = (index) => {
101
+		warehouses.value[index].selected = !warehouses.value[index].selected;
102
+	};
103
+	
104
+	
105
+	const changeTab = () => {
106
+
107
+	};
108
+
109
+	const selectAll = () => {
110
+		warehouses.value.forEach(warehouse => {
111
+			warehouse.selected = true;
112
+		});
113
+	};
114
+
115
+	const confirmSelection = () => {
116
+		// Implement confirmation logic here
117
+	};
118
+	
119
+	const goPage = async (warehouseItem) => {
120
+		// if(sourcePage.value === 'self'){
121
+			uni.navigateTo({
122
+			  url: `/pages/infoDetails/crk/detail?caId=${warehouseItem}`
123
+			});
124
+		// }
125
+	};
126
+</script>
127
+
128
+<style lang="scss" scoped>
129
+	.page {
130
+		position: relative; // 确保伪元素相对于 .page 定位
131
+	}
132
+
133
+	.page::before {
134
+		content: '';
135
+		position: absolute;
136
+		top: 0;
137
+		left: 0;
138
+		width: 100%;
139
+		height: 200rpx; // 设置渐变的高度
140
+		background: linear-gradient(180deg, #cfddfc, #eff2f5);
141
+		z-index: -1; // 确保它在内容之下
142
+	}
143
+
144
+	.warehouse-list {
145
+		padding: 40rpx 40rpx 20rpx;
146
+
147
+		.warehouse-item {
148
+			border-left: 2px solid #3872E3;
149
+			background: linear-gradient(180deg, #ffffff, #F5F8FF);
150
+			border-radius: 10px;
151
+			padding: 10px 0 10px 20px;
152
+			margin-bottom: 20px;
153
+			box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
154
+
155
+			.warehouse-details {
156
+				padding-top: 30rpx;
157
+				font-size: 30rpx;
158
+				color: #747476;
159
+
160
+				.detail-row {
161
+					margin-bottom: 10px;
162
+					text.label{
163
+						width: 50%;
164
+						display: inline-flex;
165
+						.blackValue{ color: #000000;}
166
+					}
167
+				}
168
+			}
169
+		}
170
+	}
171
+	.button-container {
172
+		position: fixed;
173
+		bottom: 0;
174
+		background-color: #ffffff;
175
+		width: 100vw;
176
+		padding: 40rpx 0;
177
+
178
+		.button-pad {
179
+			padding: 0 40rpx;
180
+			display: flex;
181
+			justify-content: space-between;
182
+		}
183
+
184
+
185
+		.select-all,
186
+		.confirm {
187
+			width: 44%;
188
+			height: 70rpx;
189
+			line-height: 70rpx;
190
+			border-radius: 10rpx;
191
+			background-color: #1E5FDF;
192
+			color: #fff;
193
+			font-size: 28rpx;
194
+			text-align: center;
195
+
196
+		}
197
+	}
198
+	
199
+	.warehouse-info{
200
+		padding-top: 20rpx;
201
+	}
202
+
203
+	.navbar {
204
+		display: flex;
205
+		height: 40px;
206
+		padding: 0 5px;
207
+		position: relative;
208
+		z-index: 10;
209
+	
210
+		.nav-item {
211
+			flex: 1;
212
+			display: flex;
213
+			justify-content: center;
214
+			align-items: center;
215
+			height: 100%;
216
+			font-size: 35rpx;
217
+			position: relative;
218
+			color: #334b68;
219
+	
220
+			&.current {
221
+				color: #0f2239;
222
+				&:after {
223
+					content: '';
224
+					position: absolute;
225
+					left: 50%;
226
+					bottom: 0;
227
+					transform: translateX(-50%);
228
+					width: 60%;
229
+					height: 0;
230
+					border-bottom: 4px solid #789fec;
231
+				}
232
+			}
233
+		}
234
+	}
235
+	
236
+	.swiper-box {
237
+		height: calc(100vh - 80rpx);
238
+	}
239
+	
240
+	.list-scroll-content {
241
+		height: calc(100vh - 200rpx);
242
+	}
243
+	.info-scroll-content{
244
+		height: calc(100vh - 120rpx);
245
+	}
246
+</style>

+ 39 - 0
pages/infoDetails/hwk/index.vue

@@ -0,0 +1,39 @@
1
+<template>
2
+  <view class="content">
3
+    <!-- 第一个信息框 -->
4
+    <view class="base-info-box">
5
+      <info-item isFirst="true" label="仓房名称" :value="baseInfo.kqmc" />
6
+      <info-item label="货位名称" :value="baseInfo.dwmc" />
7
+      <info-item label="粮食品种" :value="baseInfo.tyxydm" />
8
+      <info-item label="粮食等级" :value="baseInfo.qyxz" />
9
+      <info-item label="收获年度" :value="baseInfo.jtdz" />
10
+      <info-item label="粮食产地" :value="baseInfo.kqfzr" />
11
+      <info-item label="入库时间" :value="baseInfo.lxdh" />
12
+      <info-item label="实际数量(吨)" :value="baseInfo.lxdh" />
13
+      <info-item label="计价数量(吨)" :value="baseInfo.lxdh" />
14
+	  <info-item label="保管方式" :value="baseInfo.lxdh" />
15
+	  <info-item label="保管员" :value="baseInfo.lxdh" />
16
+    </view>
17
+
18
+    
19
+  </view>
20
+</template>
21
+
22
+<script setup>
23
+import { ref } from 'vue';
24
+import InfoItem from "@/pages/components/InfoItem.vue";
25
+const props = defineProps(['baseInfo']);
26
+</script>
27
+
28
+<style lang="scss" scoped>
29
+.content {
30
+  padding: 20rpx;
31
+}
32
+
33
+.base-info-box {
34
+  background: #ffffff;
35
+  border-radius: 20rpx;
36
+  margin-bottom: 40rpx;
37
+  padding: 20rpx;
38
+}
39
+</style>

+ 121 - 0
pages/infoDetails/infoDetailsLayout.vue

@@ -0,0 +1,121 @@
1
+<template>
2
+  <view class="container">
3
+    <hwk :baseInfo="hwkInfo" v-if="currentTab == 0"></hwk>
4
+    <crk :kqInfo="1" v-if="currentTab == 1"></crk>
5
+    <zj :kqInfo="1" v-if="currentTab == 2"></zj>
6
+    <lqjc :kqInfo="1" v-if="currentTab == 3"></lqjc>
7
+    <sy :kqInfo="1" v-if="currentTab == 4"></sy>
8
+    <!-- 底部导航栏 -->
9
+    <view class="tab-bar">
10
+      <view
11
+        class="tab-item"
12
+        :class="{ active: currentTab == 0 }"
13
+        @click="switchTab(0)"
14
+      >
15
+		<text class="iconfont icon-huoweika" :style="{ color: currentTab === 0 ? '#1d5fdf' : '748498' }"></text>
16
+        <text>货位卡</text>
17
+      </view>
18
+      <view
19
+        class="tab-item"
20
+        :class="{ active: currentTab == 1 }"
21
+        @click="switchTab(1)"
22
+      >
23
+		<text class="iconfont icon-churuku" :style="{ color: currentTab === 1 ? '#1d5fdf' : '748498' }"></text>
24
+        <text>出入库</text>
25
+      </view>
26
+      <view
27
+        class="tab-item"
28
+        :class="{ active: currentTab == 2 }"
29
+        @click="switchTab(2)"
30
+      >
31
+		<text class="iconfont icon-zhijiandaibanrenwu" :style="{ color: currentTab === 2 ? '#1d5fdf' : '748498' }"></text>
32
+        <text>质检</text>
33
+      </view>
34
+	  <view
35
+	    class="tab-item"
36
+	    :class="{ active: currentTab == 3 }"
37
+	    @click="switchTab(3)"
38
+	  >
39
+	  		<text class="iconfont icon-liangqingjiance" :style="{ color: currentTab === 3 ? '#1d5fdf' : '748498' }"></text>
40
+	    <text>粮情监测</text>
41
+	  </view>
42
+	  <view
43
+	    class="tab-item"
44
+	    :class="{ active: currentTab == 4 }"
45
+	    @click="switchTab(4)"
46
+	  >
47
+	  		<text class="iconfont icon-sunyi" :style="{ color: currentTab === 4 ? '#1d5fdf' : '748498' }"></text>
48
+	    <text>损益</text>
49
+	  </view>
50
+    </view>
51
+  </view>
52
+</template>
53
+
54
+<script setup>
55
+import hwk from "./hwk/index.vue";
56
+import crk from "./crk/index.vue";
57
+import zj from "./zj/index.vue";
58
+import lqjc from "./lqjc/index.vue";
59
+import sy from "./sy/index.vue";
60
+import { ref, reactive, onMounted } from 'vue';
61
+import { onLoad } from '@dcloudio/uni-app';
62
+import { getInfoByCfId } from "@/api/grainDepositor";
63
+	
64
+const currentTab = ref(0);
65
+const caId = ref("");
66
+const hwkInfo = ref({})
67
+
68
+const switchTab = (index) => {
69
+  currentTab.value = index;
70
+}
71
+
72
+onLoad(async (options) => {
73
+  if (options && options.caId) {
74
+	  caId.value = options.caId
75
+	  hwkInfo.value = await getInfoByCfId(caId.value);
76
+  }
77
+})
78
+</script>
79
+
80
+<style lang="scss" scoped>
81
+.container {
82
+  display: flex;
83
+  flex-direction: column;
84
+  height: 100vh;
85
+  box-sizing: border-box;
86
+  background: linear-gradient(180deg, #cfddfc 0%, #eff2f5 30%);
87
+  position: relative;
88
+  padding-bottom: 100rpx;
89
+}
90
+
91
+.tab-bar {
92
+  height: 100rpx;
93
+  display: flex;
94
+  background-color: #FFFFFF;
95
+  border-top: 1rpx solid #BDC1C4;
96
+  position: fixed;
97
+  bottom: 0;
98
+  left: 0;
99
+  right: 0;
100
+  z-index: 999;
101
+
102
+  .tab-item {
103
+    flex: 1;
104
+    display: flex;
105
+    flex-direction: column;
106
+    align-items: center;
107
+    justify-content: center;
108
+    font-size: 24rpx;
109
+    color: #738598;
110
+	.iconfont{ font-size: 44rpx;}
111
+	
112
+    &.active {
113
+      color: #1E60DC;
114
+    }
115
+
116
+    text {
117
+      margin-top: 4rpx;
118
+    }
119
+  }
120
+}
121
+</style>

+ 36 - 0
pages/infoDetails/lqjc/index.vue

@@ -0,0 +1,36 @@
1
+<template>
2
+  <view class="content">
3
+    <!-- 第一个信息框 -->
4
+    <view class="base-info-box">
5
+      <info-item isFirst="true" label="粮食品种" :value="kqInfo.kqmc" />
6
+      <info-item label="粮食等级" :value="kqInfo.dwmc" />
7
+      <info-item label="仓房外温(℃)" :value="kqInfo.tyxydm" />
8
+      <info-item label="仓房外湿(%)" :value="kqInfo.qyxz" />
9
+      <info-item label="仓房内温(℃)" :value="kqInfo.tyxydm" />
10
+      <info-item label="仓房内湿(%)" :value="kqInfo.qyxz" />
11
+      <info-item label="粮食最高温(℃)" :value="kqInfo.tyxydm" />
12
+      <info-item label="粮食最低温(℃)" :value="kqInfo.tyxydm" />
13
+      <info-item label="粮食平均温(℃)" :value="kqInfo.tyxydm" />
14
+      <info-item isImage="true" label="附件" :value="kqInfo.resid" />
15
+    </view>
16
+  </view>
17
+</template>
18
+
19
+<script setup>
20
+import { ref } from 'vue';
21
+import InfoItem from "@/pages/components/InfoItem.vue";
22
+const props = defineProps(['kqInfo']);
23
+</script>
24
+
25
+<style lang="scss" scoped>
26
+.content {
27
+  padding: 20rpx;
28
+}
29
+
30
+.base-info-box {
31
+  background: #ffffff;
32
+  border-radius: 20rpx;
33
+  margin-bottom: 120rpx;
34
+  padding: 20rpx;
35
+}
36
+</style>

+ 39 - 0
pages/infoDetails/sy/index.vue

@@ -0,0 +1,39 @@
1
+<template>
2
+  <view class="content">
3
+    <!-- 第一个信息框 -->
4
+    <view class="base-info-box">
5
+      <info-item isFirst="true" label="入库净重(吨)" :value="kqInfo.kqmc" />
6
+      <info-item label="入库水分(%)" :value="kqInfo.kqmc" />
7
+      <info-item label="入库杂质(%)" :value="kqInfo.kqmc" />
8
+      <info-item label="出库净重(吨)" :value="kqInfo.kqmc" />
9
+      <info-item label="出库水分(%)" :value="kqInfo.kqmc" />
10
+      <info-item label="出库杂质(%)" :value="kqInfo.kqmc" />
11
+	  <info-item label="损益是否正常" :value="kqInfo.dwmc" />
12
+      <info-item label="水杂减量(吨)" :value="kqInfo.tyxydm" />
13
+      <info-item label="自然耗定额(吨)" :value="kqInfo.tyxydm" />
14
+      <info-item label="超耗数量(吨)" :value="kqInfo.tyxydm" />
15
+      <info-item label="损益数量(吨)" :value="kqInfo.tyxydm" />
16
+	  <info-item isImage="true" label="损益照片" :value="kqInfo.resid" />
17
+    </view>
18
+
19
+  </view>
20
+</template>
21
+
22
+<script setup>
23
+import { ref } from 'vue';
24
+import InfoItem from "@/pages/components/InfoItem.vue";
25
+const props = defineProps(['kqInfo']);
26
+</script>
27
+
28
+<style lang="scss" scoped>
29
+.content {
30
+  padding: 20rpx;
31
+}
32
+
33
+.base-info-box {
34
+  background: #ffffff;
35
+  border-radius: 20rpx;
36
+  margin-bottom: 120rpx;
37
+  padding: 20rpx;
38
+}
39
+</style>

+ 40 - 0
pages/infoDetails/zj/detail.vue

@@ -0,0 +1,40 @@
1
+<template>
2
+  <view class="content">
3
+    <!-- 第一个信息框 -->
4
+    <view class="base-info-box">
5
+      <info-item isFirst="true" label="检测类型" :value="baseInfo.kqmc" />
6
+      <info-item label="检测时间" :value="baseInfo.dwmc" />
7
+      <info-item label="粮食品种" :value="baseInfo.tyxydm" />
8
+      <info-item label="粮食等级" :value="baseInfo.qyxz" />
9
+      <info-item label="检测人员姓名" :value="baseInfo.jtdz" />
10
+	  <info-item isImage="true" label="质检码单照片" :value="baseInfo.resid" />
11
+    </view>
12
+    
13
+  </view>
14
+</template>
15
+
16
+<script setup>
17
+import { ref } from 'vue';
18
+import { onLoad } from '@dcloudio/uni-app';
19
+import InfoItem from "@/pages/components/InfoItem.vue";
20
+const props = defineProps(['baseInfo']);
21
+const baseInfo = ref({})
22
+onLoad(async (options) => {
23
+  if (options) {
24
+	baseInfo.value = options
25
+  }
26
+});
27
+</script>
28
+
29
+<style lang="scss" scoped>
30
+.content {
31
+  padding: 20rpx;
32
+}
33
+
34
+.base-info-box {
35
+  background: #ffffff;
36
+  border-radius: 20rpx;
37
+  margin-bottom: 40rpx;
38
+  padding: 20rpx;
39
+}
40
+</style>

+ 192 - 0
pages/infoDetails/zj/index.vue

@@ -0,0 +1,192 @@
1
+<template>
2
+	<view class="page">
3
+		<view class="warehouse-list">
4
+			<view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item" @click="goPage(warehouse)">
5
+				
6
+				<view class="warehouse-details">
7
+					<view class="detail-row">
8
+						<text class="label">业务时间:<text class="blackValue">{{ warehouse.emptyRooms }}</text></text>
9
+						<text class="label">粮食品种:<text class="blackValue">{{ warehouse.selected ? '1个' : '0个' }}</text></text>
10
+					</view>
11
+					<view class="detail-row">
12
+						<text class="label">检测类型:<text class="blackValue">{{ warehouse.capacity }}</text></text>
13
+						<text class="label">是否合格:<text class="blackValue">{{ warehouse.rooms }}</text></text>
14
+					</view>
15
+				</view>
16
+			</view>
17
+		</view>
18
+
19
+	</view>
20
+</template>
21
+
22
+<script setup>
23
+	import {
24
+		ref
25
+	} from 'vue';
26
+	const warehouses = ref([{
27
+			name: '1-1',
28
+			address: 'XXXXXXXXXX',
29
+			capacity: '1500吨',
30
+			rooms: '10个',
31
+			emptyRooms: '5个',
32
+			selected: false
33
+		},
34
+		{
35
+			name: 'XXXXX',
36
+			address: 'XXXXXXXXXX',
37
+			capacity: '1500吨',
38
+			rooms: '10个',
39
+			emptyRooms: '5个',
40
+			selected: false
41
+		},
42
+		{
43
+			name: 'XXXXX',
44
+			address: 'XXXXXXXXXX',
45
+			capacity: '1500吨',
46
+			rooms: '10个',
47
+			emptyRooms: '5个',
48
+			selected: false
49
+		}
50
+	]);
51
+
52
+	
53
+	const changeTab = () => {
54
+
55
+	};
56
+
57
+	const selectAll = () => {
58
+		warehouses.value.forEach(warehouse => {
59
+			warehouse.selected = true;
60
+		});
61
+	};
62
+
63
+	const confirmSelection = () => {
64
+		// Implement confirmation logic here
65
+	};
66
+	
67
+	const goPage = async (warehouseItem) => {
68
+		uni.navigateTo({
69
+		  url: `/pages/infoDetails/zj/detail?caId=${warehouseItem}`
70
+		});
71
+	};
72
+</script>
73
+
74
+<style lang="scss" scoped>
75
+	.page {
76
+		position: relative; // 确保伪元素相对于 .page 定位
77
+	}
78
+
79
+	.page::before {
80
+		content: '';
81
+		position: absolute;
82
+		top: 0;
83
+		left: 0;
84
+		width: 100%;
85
+		height: 200rpx; // 设置渐变的高度
86
+		background: linear-gradient(180deg, #cfddfc, #eff2f5);
87
+		z-index: -1; // 确保它在内容之下
88
+	}
89
+
90
+	.warehouse-list {
91
+		padding: 40rpx 40rpx 20rpx;
92
+
93
+		.warehouse-item {
94
+			border-left: 2px solid #3872E3;
95
+			background: linear-gradient(180deg, #ffffff, #F5F8FF);
96
+			border-radius: 10px;
97
+			padding: 10px 0 10px 20px;
98
+			margin-bottom: 20px;
99
+			box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
100
+
101
+			.warehouse-details {
102
+				padding-top: 30rpx;
103
+				font-size: 30rpx;
104
+				color: #747476;
105
+
106
+				.detail-row {
107
+					margin-bottom: 10px;
108
+					text.label{
109
+						width: 50%;
110
+						display: inline-flex;
111
+						.blackValue{ color: #000000;}
112
+					}
113
+				}
114
+			}
115
+		}
116
+	}
117
+	.button-container {
118
+		position: fixed;
119
+		bottom: 0;
120
+		background-color: #ffffff;
121
+		width: 100vw;
122
+		padding: 40rpx 0;
123
+
124
+		.button-pad {
125
+			padding: 0 40rpx;
126
+			display: flex;
127
+			justify-content: space-between;
128
+		}
129
+
130
+
131
+		.select-all,
132
+		.confirm {
133
+			width: 44%;
134
+			height: 70rpx;
135
+			line-height: 70rpx;
136
+			border-radius: 10rpx;
137
+			background-color: #1E5FDF;
138
+			color: #fff;
139
+			font-size: 28rpx;
140
+			text-align: center;
141
+
142
+		}
143
+	}
144
+	
145
+	.warehouse-info{
146
+		padding-top: 20rpx;
147
+	}
148
+
149
+	.navbar {
150
+		display: flex;
151
+		height: 40px;
152
+		padding: 0 5px;
153
+		position: relative;
154
+		z-index: 10;
155
+	
156
+		.nav-item {
157
+			flex: 1;
158
+			display: flex;
159
+			justify-content: center;
160
+			align-items: center;
161
+			height: 100%;
162
+			font-size: 35rpx;
163
+			position: relative;
164
+			color: #334b68;
165
+	
166
+			&.current {
167
+				color: #0f2239;
168
+				&:after {
169
+					content: '';
170
+					position: absolute;
171
+					left: 50%;
172
+					bottom: 0;
173
+					transform: translateX(-50%);
174
+					width: 60%;
175
+					height: 0;
176
+					border-bottom: 4px solid #789fec;
177
+				}
178
+			}
179
+		}
180
+	}
181
+	
182
+	.swiper-box {
183
+		height: calc(100vh - 80rpx);
184
+	}
185
+	
186
+	.list-scroll-content {
187
+		height: calc(100vh - 200rpx);
188
+	}
189
+	.info-scroll-content{
190
+		height: calc(100vh - 120rpx);
191
+	}
192
+</style>

+ 1 - 1
pages/warehouse/components/warehouseInfo/warehouseInfo.vue

@@ -23,7 +23,7 @@
23 23
 
24 24
 <script setup>
25 25
 import { ref } from 'vue';
26
-import InfoItem from "./InfoItem.vue";
26
+import InfoItem from "@/pages/components/InfoItem.vue";
27 27
 const props = defineProps(['kqInfo']);
28 28
 </script>
29 29
 

+ 17 - 5
pages/warehouse/warehouse.vue

@@ -10,7 +10,7 @@
10 10
 			<swiper-item class="tab-content">
11 11
 				<scroll-view class="list-scroll-content" scroll-y>
12 12
 					<view class="warehouse-list">
13
-						<view v-for="(warehouseItem, index) in warehousesList" :key="index" class="warehouse-item">
13
+						<view v-for="(warehouseItem, index) in warehousesList" :key="index" class="warehouse-item" @click="goPage(warehouseItem)">
14 14
 							<view class="warehouse-header">
15 15
 								<view class="info-container">
16 16
 									<view class="warehouse-name">
@@ -18,7 +18,7 @@
18 18
 										<text>仓房名称:{{ warehouseItem.cfmc }}</text>
19 19
 									</view>
20 20
 								</view>
21
-								<view class="select-button">
21
+								<view class="select-button" v-if="sourcePage!='self'">
22 22
 									<checkbox :checked="warehouseItem.checked" @click.stop="handleCheck(index)" />
23 23
 								</view>
24 24
 							</view>
@@ -40,7 +40,7 @@
40 40
 					</view>
41 41
 
42 42
 				</scroll-view>
43
-				<view class="button-container">
43
+				<view class="button-container" v-if="sourcePage!='self'">
44 44
 					<view class="button-pad">
45 45
 						<button class="confirm" @click="confirmSelection">确认选择</button>
46 46
 					</view>
@@ -64,6 +64,7 @@
64 64
 	import { dictData } from "@/api/user";
65 65
 	import { getCaxxByKqIdForClr, getKqxxByKqId, getStoreroom } from "@/api/grainDepositor";
66 66
 	import warehouseInfo from "./components/warehouseInfo/warehouseInfo.vue";
67
+	const sourcePage = ref('all')
67 68
 	const navList = [{
68 69
 			state: 0,
69 70
 			text: '仓房基本信息',
@@ -89,14 +90,18 @@
89 90
 	
90 91
 	onLoad(async (options) => {
91 92
 	  if (options && options.kqId) {
93
+		sourcePage.value = options.source
94
+		
92 95
 		caztList.value = await dictData('system_cazt');
93
-			
94 96
 	    detailkqId.value = options.kqId;
95 97
 		
96
-		const postData = {
98
+		let postData = {
97 99
 			'listType': 3,
98 100
 			'kqId': detailkqId.value,
99 101
 		}
102
+		if(sourcePage.value === 'self'){
103
+			postData.listType = 4
104
+		}
100 105
 		const getData = await getCaxxByKqIdForClr(postData);
101 106
 		warehousesList.value = getData.data
102 107
 		
@@ -138,6 +143,13 @@
138 143
 		    console.warn('未选择任何仓库');
139 144
 		  }
140 145
 	};
146
+	const goPage = async (warehouseItem) => {
147
+		if(sourcePage.value === 'self'){
148
+			uni.navigateTo({
149
+			  url: `/pages/infoDetails/infoDetailsLayout?caId=${warehouseItem.caId}`
150
+			});
151
+		}
152
+	};
141 153
 </script>
142 154
 
143 155
 <style lang="scss" scoped>

+ 23 - 3
static/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "iconfont"; /* Project id 4818032 */
3
-  src: url('iconfont.woff2?t=1739415710571') format('woff2'),
4
-       url('iconfont.woff?t=1739415710571') format('woff'),
5
-       url('iconfont.ttf?t=1739415710571') format('truetype');
3
+  src: url('iconfont.woff2?t=1739771470876') format('woff2'),
4
+       url('iconfont.woff?t=1739771470876') format('woff'),
5
+       url('iconfont.ttf?t=1739771470876') format('truetype');
6 6
 }
7 7
 
8 8
 .iconfont {
@@ -13,6 +13,26 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.icon-huoweika:before {
17
+  content: "\e754";
18
+}
19
+
20
+.icon-sunyi:before {
21
+  content: "\e6e1";
22
+}
23
+
24
+.icon-liangqingjiance:before {
25
+  content: "\e7a3";
26
+}
27
+
28
+.icon-zhijiandaibanrenwu:before {
29
+  content: "\e686";
30
+}
31
+
32
+.icon-churuku:before {
33
+  content: "\e6e0";
34
+}
35
+
16 36
 .icon-shezhi:before {
17 37
   content: "\e62c";
18 38
 }

BIN
static/iconfont.ttf


BIN
static/iconfont.woff


BIN
static/iconfont.woff2