Pārlūkot izejas kodu

【优化】样式统一

xiangpengfei 1 gadu atpakaļ
vecāks
revīzija
11d2316bbd

+ 6 - 2
pages/myTask-verification/components/CheckInfo.vue

@@ -130,7 +130,11 @@ export default {
130 130
             this.clockInInfo = res.data;
131 131
             // 添加这行,向父组件发送打卡信息
132 132
             this.$emit("update-clock-info", this.clockInInfo);
133
-            if (this.clockInInfo.dkdd && this.clockInInfo.pzxx.length) {
133
+            if (
134
+              this.clockInInfo.dkdd &&
135
+              this.clockInInfo.pzxx &&
136
+              this.clockInInfo.pzxx.length
137
+            ) {
134 138
               getImageInfo({
135 139
                 ids: res.data.pzxx,
136 140
               }).then((res) => {
@@ -560,7 +564,7 @@ export default {
560 564
 }
561 565
 
562 566
 .preview-section {
563
-  height: 400rpx;
567
+  height: 540rpx;
564 568
   margin-top: 30rpx;
565 569
   width: 100%;
566 570
   display: flex;

+ 2 - 3
pages/myTask-verification/components/FinanceInfo.vue

@@ -64,14 +64,12 @@ export default {
64 64
     };
65 65
   },
66 66
   mounted() {
67
-    console.log("接收到的任务信息:", this.taskInfo);
68 67
     this.getFinanceInfo();
69 68
   },
70 69
   methods: {
71 70
     getFinanceInfo() {
72 71
       getFinanceInfoApi({
73 72
         kqId: this.taskInfo.kqId,
74
-        
75 73
       }).then((res) => {
76 74
         if (res.code === 0 && res.data && res.data.length > 0) {
77 75
           this.financeInfo = res.data;
@@ -91,6 +89,7 @@ export default {
91 89
     background-color: #fff;
92 90
     border-radius: 10rpx;
93 91
     padding: 20rpx;
92
+    box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
94 93
 
95 94
     .info-row {
96 95
       display: flex;
@@ -110,7 +109,7 @@ export default {
110 109
       }
111 110
 
112 111
       .value {
113
-        color: #333;
112
+        color: #000;
114 113
         font-size: 28rpx;
115 114
       }
116 115
     }

+ 17 - 5
pages/myTask-verification/components/StorageInfo.vue

@@ -46,7 +46,12 @@
46 46
       <view class="info-row">
47 47
         <text class="label">库区图:</text>
48 48
 
49
-        <image class="storage-image" :src="kqxx.resid" mode="aspectFit" />
49
+        <image
50
+          @click="handleImageClick(kqxx.resid)"
51
+          class="storage-image"
52
+          :src="kqxx.resid"
53
+          mode="aspectFit"
54
+        />
50 55
       </view>
51 56
     </view>
52 57
     <!-- margin预留空间不生效, 添加空的view元素 -->
@@ -73,16 +78,22 @@ export default {
73 78
   },
74 79
   async mounted() {
75 80
     this.qyxzList = await getDictOptions(DICT_TYPE.SYSTEM_QYXZ);
76
-   
77
-    this.getStorageInfo();
78
-
79 81
 
82
+    this.getStorageInfo();
80 83
   },
81 84
 
82 85
   methods: {
83 86
     filterXZ(value) {
84 87
       return this.qyxzList.find((item) => item.value == value)?.label;
85 88
     },
89
+
90
+    // 图片预览
91
+    handleImageClick(url) {
92
+      uni.previewImage({
93
+        urls: [url],
94
+      });
95
+    },
96
+
86 97
     getStorageInfo() {
87 98
       getKqxxByKqId({
88 99
         kqId: this.taskInfo.kqId,
@@ -114,6 +125,7 @@ export default {
114 125
     background-color: #fff;
115 126
     border-radius: 10rpx;
116 127
     padding: 20rpx;
128
+    box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
117 129
 
118 130
     .info-row {
119 131
       display: flex;
@@ -128,7 +140,7 @@ export default {
128 140
       }
129 141
 
130 142
       .value {
131
-        color: #333;
143
+        color: #000;
132 144
         font-size: 28rpx;
133 145
       }
134 146
     }

+ 6 - 2
pages/myTask-verification/components/WarehouseInfo.vue

@@ -268,6 +268,8 @@ export default {
268 268
       padding: 20rpx;
269 269
       margin-bottom: 20rpx;
270 270
       display: flex;
271
+      // 阴影
272
+      box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
271 273
 
272 274
       .warehouse-icon {
273 275
         width: 50rpx;
@@ -300,6 +302,8 @@ export default {
300 302
           justify-content: space-between;
301 303
           margin-bottom: 10rpx;
302 304
           flex-wrap: wrap;
305
+          font-size: 30rpx;
306
+
303 307
           .warehouse-name-container {
304 308
             display: flex;
305 309
             align-items: center;
@@ -307,13 +311,13 @@ export default {
307 311
 
308 312
           .label {
309 313
             color: #666;
310
-            font-size: 28rpx;
314
+            font-size: 30rpx;
311 315
             margin-right: 10rpx;
312 316
           }
313 317
 
314 318
           .value {
315 319
             color: #333;
316
-            font-size: 28rpx;
320
+            font-size: 30rpx;
317 321
             margin-right: 30rpx;
318 322
           }
319 323
 

+ 16 - 8
pages/myTask-verification/myTaskLayout.vue

@@ -126,6 +126,10 @@ export default {
126 126
     if (options.taskInfo) {
127 127
       try {
128 128
         this.taskInfo = JSON.parse(decodeURIComponent(options.taskInfo));
129
+
130
+        uni.setNavigationBarTitle({
131
+          title: this.taskInfo.kqmc || "我的任务",
132
+        });
129 133
         // console.log("接收到的任务信息:", this.taskInfo);
130 134
       } catch (error) {
131 135
         console.error("解析任务信息失败:", error);
@@ -202,7 +206,7 @@ export default {
202 206
     },
203 207
     // 判断是否为小程序
204 208
     isMiniProgram() {
205
-      console.log(uni.getSystemInfoSync().platform);
209
+      // console.log(uni.getSystemInfoSync().platform);
206 210
 
207 211
       return uni.getLaunchOptionsSync().query.miniProgram;
208 212
     },
@@ -292,7 +296,8 @@ export default {
292 296
   height: 88rpx;
293 297
   background-color: #cfddfc;
294 298
 
295
-  border-bottom: 1rpx solid #eee;
299
+  // border-bottom: 1rpx solid #eee;
300
+  background-color: #cfddfc;
296 301
 }
297 302
 
298 303
 .tab-item {
@@ -300,13 +305,16 @@ export default {
300 305
   display: flex;
301 306
   align-items: center;
302 307
   justify-content: center;
303
-  font-size: 28rpx;
308
+  padding: 20rpx 0;
309
+  font-size: 35rpx;
304 310
   color: #333;
305 311
   position: relative;
312
+  font-weight: 400;
306 313
 
307 314
   &.active {
308
-    color: #2979ff;
309
-    font-weight: bold;
315
+    color: #000;
316
+    position: relative;
317
+    font-weight: 500;
310 318
 
311 319
     &::after {
312 320
       content: "";
@@ -314,9 +322,9 @@ export default {
314 322
       bottom: 0;
315 323
       left: 50%;
316 324
       transform: translateX(-50%);
317
-      width: 40rpx;
318
-      height: 4rpx;
319
-      background-color: #2979ff;
325
+      width: 150rpx;
326
+      height: 10rpx;
327
+      background-color: #4185fa;
320 328
     }
321 329
   }
322 330
 }

+ 16 - 8
pages/taskList-verification/components/myTaskList.vue

@@ -1,9 +1,9 @@
1 1
 <template>
2 2
   <view class="my-task-container">
3 3
     <!-- 任务列表 -->
4
-    <scroll-view 
5
-      scroll-y 
6
-      @scrolltolower="loadMore" 
4
+    <scroll-view
5
+      scroll-y
6
+      @scrolltolower="loadMore"
7 7
       class="task-list"
8 8
       refresher-enabled
9 9
       :refresher-triggered="isRefreshing"
@@ -33,6 +33,7 @@
33 33
               <text class="warehouse-address">库区地址: {{ item.jtdz }}</text>
34 34
             </view>
35 35
           </view>
36
+          <view class="divider"></view>
36 37
           <view class="task-status">
37 38
             <text>通过数量: {{ item.hytgNum || "0" }}</text>
38 39
             <text>不通过数量: {{ item.hybtgNum || "0" }}</text>
@@ -101,8 +102,6 @@ export default {
101 102
     },
102 103
 
103 104
     async getTaskList() {
104
-      console.log("那你倒是触发啊");
105
-
106 105
       if (this.loading || !this.hasMore) return;
107 106
       try {
108 107
         this.loading = true;
@@ -156,7 +155,7 @@ export default {
156 155
       // 将对象转为 URL 参数
157 156
       const params = encodeURIComponent(
158 157
         JSON.stringify({
159
-          // name: item.name,
158
+          kqmc: item.kqmc,
160 159
           // address: item.address,
161 160
           // roomCount: item.roomCount,
162 161
           // status: item.status,
@@ -235,10 +234,12 @@ export default {
235 234
 }
236 235
 
237 236
 .task-item {
238
-  background-color: #fff;
237
+  // background-color: #;
238
+  background: linear-gradient(#fff 0%, #fff 80%, #f4f6fb 100%);
239 239
   border-radius: 12rpx;
240 240
   padding: 30rpx;
241 241
   margin-bottom: 20rpx;
242
+  box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, 0.1);
242 243
 }
243 244
 
244 245
 .warehouse-info {
@@ -249,7 +250,7 @@ export default {
249 250
 
250 251
     text {
251 252
       margin-left: 16rpx;
252
-      font-size: 28rpx;
253
+      font-size: 35rpx;
253 254
     }
254 255
   }
255 256
 }
@@ -352,4 +353,11 @@ export default {
352 353
     }
353 354
   }
354 355
 }
356
+
357
+.divider {
358
+  height: 1rpx; /* 分割线的高度 */
359
+  background-color: rgba(117, 117, 117, 0.1); /* 分割线的颜色 */
360
+  margin: 10rpx 0; /* 分割线的上下间距 */
361
+  width: 100%; /* 分割线的宽度 */
362
+}
355 363
 </style>

+ 14 - 4
pages/taskList-verification/components/taskList.vue

@@ -6,7 +6,7 @@
6 6
         {{ isAllSelected ? "取消全选" : "全选" }}
7 7
       </button>
8 8
       <button class="filter-btn" type="primary" @click="confirmSelection">
9
-        确认选择
9
+        确认领取
10 10
       </button>
11 11
       <!-- <button class="filter-btn" type="primary" @click="showAreaPicker">
12 12
         筛选
@@ -86,6 +86,7 @@
86 86
               <text class="warehouse-address">库区地址: {{ item.jtdz }}</text>
87 87
             </view>
88 88
           </view>
89
+          <view class="divider"></view>
89 90
           <view class="task-status">
90 91
             <text>核验仓房数量: {{ item.hyNum || "-" }}</text>
91 92
             <text>核验状态: {{ statusflutter(item.hyState) }}</text>
@@ -432,20 +433,22 @@ export default {
432 433
 }
433 434
 
434 435
 .task-item {
435
-  background-color: #fff;
436
+  background: linear-gradient(#fff 0%, #fff 80%, #f4f6fb 100%);
436 437
   border-radius: 12rpx;
437
-  padding: 20rpx;
438
+  padding: 30rpx;
438 439
   margin-bottom: 20rpx;
440
+  box-shadow: 0 10rpx 10rpx rgba(0, 0, 0, 0.1);
439 441
 }
440 442
 
441 443
 .warehouse-info {
442 444
   .info-row {
443 445
     display: flex;
444 446
     align-items: center;
445
-    margin-bottom: 10rpx;
447
+    margin-bottom: 20rpx;
446 448
 
447 449
     text {
448 450
       margin-left: 10rpx;
451
+      font-size: 35rpx;
449 452
     }
450 453
   }
451 454
 }
@@ -567,4 +570,11 @@ export default {
567 570
     }
568 571
   }
569 572
 }
573
+
574
+.divider {
575
+  height: 1rpx; /* 分割线的高度 */
576
+  background-color: rgba(117, 117, 117, 0.1); /* 分割线的颜色 */
577
+  margin: 10rpx 0; /* 分割线的上下间距 */
578
+  width: 100%; /* 分割线的宽度 */
579
+}
570 580
 </style>

+ 3 - 2
pages/taskList-verification/taskListLayout.vue

@@ -10,6 +10,7 @@
10 10
         :class="{ active: currentTab === 0 }"
11 11
         @click="switchTab(0)"
12 12
       >
13
+      <text class="iconfont icon-mrenwuliebiao" :style="{ color: currentTab === 0 ? '#1d5fdf' : '748498' }"></text>
13 14
         <text>任务列表</text>
14 15
       </view>
15 16
       <view
@@ -17,6 +18,7 @@
17 18
         :class="{ active: currentTab === 1 }"
18 19
         @click="switchTab(1)"
19 20
       >
21
+      <text class="iconfont icon-woderenwu" :style="{ color: currentTab === 1 ? '#1d5fdf' : '748498' }"></text>
20 22
         <text>我的任务</text>
21 23
       </view>
22 24
       <view
@@ -24,6 +26,7 @@
24 26
         :class="{ active: currentTab === 2 }"
25 27
         @click="switchTab(2)"
26 28
       >
29
+      <text class="iconfont icon-xitongshezhi" :style="{ color: currentTab === 2 ? '#1d5fdf' : '748498' }"></text>
27 30
         <text>系统设置</text>
28 31
       </view>
29 32
     </view>
@@ -54,8 +57,6 @@ export default {
54 57
   onShow() {
55 58
     if (this.currentTab === 1) {
56 59
       this.$nextTick(() => {
57
-        console.log(this.$refs.myTaskList, "看看");
58
-
59 60
         this.$refs.myTaskList.initTaskList();
60 61
       });
61 62
       // this.$refs.myTaskList && this.$refs.myTaskList.onShow();

+ 122 - 35
pages/warehouse-detail-verification/warehouseDetail.vue

@@ -45,11 +45,20 @@
45 45
                 v-for="(item, index) in warhouseList"
46 46
                 :key="index"
47 47
               >
48
-                <view class="info-item">
49
-                  <text class="label">仓房名称:</text>
48
+                <view class="info-item info-item-name">
49
+                  <image
50
+                    src="../../static/icons/warehouse-ico.png"
51
+                    mode="widthFix"
52
+                  ></image>
53
+                  <text class="label">
54
+                    <!-- <text class="iconfont icon-cangfangmingcheng"></text> -->
55
+                    <!-- <image src="/static/icons/warehouse-ico.png" alt="" /> -->
56
+
57
+                    仓房名称:</text
58
+                  >
50 59
                   <text class="value">{{ item.cfmc }}</text>
51 60
                 </view>
52
-                <view class="info-row">
61
+                <view class="info-row info-item-row">
53 62
                   <view class="info-item">
54 63
                     <text class="label">仓房类型:</text>
55 64
                     <text class="value">{{ filterLX(item.cflx) || "-" }}</text>
@@ -59,7 +68,7 @@
59 68
                     <text class="value">{{ filterZT(item.cazt) || "-" }}</text>
60 69
                   </view>
61 70
                 </view>
62
-                <view class="info-row">
71
+                <view class="info-row info-item-row">
63 72
                   <view class="info-item">
64 73
                     <text class="label">设计仓容:</text>
65 74
                     <text class="value">{{ item.sjcr + "吨" }}</text>
@@ -71,11 +80,13 @@
71 80
                     }}</text>
72 81
                   </view>
73 82
                 </view>
74
-                <view class="info-row">
83
+                <view class="info-row info-item-row">
75 84
                   <view class="info-item">
76 85
                     <text class="label">租仓参考价:</text>
77 86
                     <text class="value">{{ item.zcckj || "-" }} 元/月</text>
78 87
                   </view>
88
+                </view>
89
+                <view class="info-row info-item-row">
79 90
                   <view class="info-item">
80 91
                     <text class="label">委托保管参考价:</text>
81 92
                     <text class="value">{{ item.wbgcj || "-" }} 元/吨/月</text>
@@ -135,6 +146,7 @@
135 146
               <view class="info-row-cang">
136 147
                 <text class="label">附件</text>
137 148
                 <image
149
+                  @click="previewImage(kqxx.resid)"
138 150
                   class="storage-image"
139 151
                   :src="kqxx.resid"
140 152
                   mode="aspectFit"
@@ -174,20 +186,34 @@ export default {
174 186
     const eventChannel = this.getOpenerEventChannel();
175 187
     eventChannel.on("acceptData", (data) => {
176 188
       const taskInfo = JSON.parse(data.taskInfo);
189
+
190
+      console.log(taskInfo, "taskInfo??");
191
+
192
+      uni.setNavigationBarTitle({
193
+        title: taskInfo.kqmc || "库区信息",
194
+      });
195
+
177 196
       this.taskInfo = taskInfo;
197
+      uni.showLoading({
198
+        title: "加载中...",
199
+      });
178 200
       getCaxxByKqId({
179 201
         kqId: taskInfo.kqId,
180 202
         listType: 1,
181
-      }).then((res) => {
182
-        if (res.code === 0) {
183
-          this.warhouseList = res.data;
184
-        } else {
185
-          uni.showToast({
186
-            title: res.msg || "获取任务列表失败",
187
-            icon: "none",
188
-          });
189
-        }
190
-      });
203
+      })
204
+        .then((res) => {
205
+          if (res.code === 0) {
206
+            this.warhouseList = res.data;
207
+          } else {
208
+            uni.showToast({
209
+              title: res.msg || "获取任务列表失败",
210
+              icon: "none",
211
+            });
212
+          }
213
+        })
214
+        .finally(() => {
215
+          uni.hideLoading();
216
+        });
191 217
 
192 218
       getKqxxByKqId({
193 219
         kqId: taskInfo.kqId,
@@ -197,7 +223,7 @@ export default {
197 223
       });
198 224
     });
199 225
   },
200
-  async mounted() { 
226
+  async mounted() {
201 227
     // dictData("system_qyxz").then((res) => {
202 228
     //   this.qyxzList = res.data;
203 229
     // });
@@ -216,21 +242,44 @@ export default {
216 242
       return this.ztlxList.find((item) => item.value == value)?.label;
217 243
     },
218 244
 
245
+    previewImage(url) {
246
+      if (!url) {
247
+        uni.showToast({
248
+          title: "暂无附件",
249
+          icon: "none",
250
+        });
251
+        return;
252
+      }
253
+
254
+      uni.previewImage({
255
+        urls: [url],
256
+      });
257
+    },
258
+
219 259
     search() {
260
+      // 加载
261
+      uni.showLoading({
262
+        title: "加载中...",
263
+      });
264
+
220 265
       getCaxxByKqId({
221 266
         cfmc: this.searchValue,
222 267
         listType: 1,
223 268
         kqId: this.taskInfo.kqId,
224
-      }).then((res) => {
225
-        if (res.code === 0) {
226
-          this.warhouseList = res.data;
227
-        } else {
228
-          uni.showToast({
229
-            title: res.msg || "获取任务列表失败",
230
-            icon: "none",
231
-          });
232
-        }
233
-      });
269
+      })
270
+        .then((res) => {
271
+          if (res.code === 0) {
272
+            this.warhouseList = res.data;
273
+          } else {
274
+            uni.showToast({
275
+              title: res.msg || "获取任务列表失败",
276
+              icon: "none",
277
+            });
278
+          }
279
+        })
280
+        .finally(() => {
281
+          uni.hideLoading();
282
+        });
234 283
     },
235 284
     switchTab(index) {
236 285
       this.currentTab = index;
@@ -304,12 +353,14 @@ export default {
304 353
     flex: 1;
305 354
     text-align: center;
306 355
     padding: 20rpx 0;
307
-    font-size: 28rpx;
356
+    font-size: 35rpx;
308 357
     color: #333;
358
+    font-weight: 400;
309 359
 
310 360
     &.active {
311
-      color: #2979ff;
361
+      color: #000;
312 362
       position: relative;
363
+      font-weight: 500;
313 364
 
314 365
       &::after {
315 366
         content: "";
@@ -317,9 +368,9 @@ export default {
317 368
         bottom: 0;
318 369
         left: 50%;
319 370
         transform: translateX(-50%);
320
-        width: 120rpx;
321
-        height: 4rpx;
322
-        background-color: #2979ff;
371
+        width: 190rpx;
372
+        height: 10rpx;
373
+        background-color: #4185fa;
323 374
       }
324 375
     }
325 376
   }
@@ -377,6 +428,7 @@ export default {
377 428
   padding: 20rpx;
378 429
   border-radius: 8rpx;
379 430
   margin-bottom: 20rpx;
431
+  box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
380 432
 }
381 433
 
382 434
 .info-row {
@@ -387,16 +439,51 @@ export default {
387 439
 
388 440
 .info-item {
389 441
   flex: 1;
442
+  display: flex;
443
+  align-items: center;
444
+  // 文字不换行
445
+  // white-space: nowrap;
446
+  // overflow: hidden;
447
+  // text-overflow: ellipsis;
448
+
449
+  image {
450
+    width: 50rpx;
451
+    height: 50rpx;
452
+    margin-right: 10rpx;
453
+  }
390 454
 
391 455
   .label {
456
+    white-space: nowrap;
392 457
     color: #666;
393
-    font-size: 26rpx;
458
+    font-size: 30rpx;
394 459
     margin-right: 10rpx;
395 460
   }
396 461
 
397 462
   .value {
398
-    color: #333;
399
-    font-size: 26rpx;
463
+    color: #666;
464
+    font-size: 30rpx;
465
+  }
466
+}
467
+
468
+.info-item-row {
469
+  display: flex;
470
+  align-items: start;
471
+  .info-item {
472
+    display: flex;
473
+    align-items: start;
474
+    padding-right: 10rpx;
475
+    box-sizing: border-box;
476
+  }
477
+}
478
+
479
+.info-item-name {
480
+  color: #000 !important;
481
+  font-weight: 500 !important;
482
+  .label {
483
+    color: #000 !important;
484
+  }
485
+  .value {
486
+    color: #000 !important;
400 487
   }
401 488
 }
402 489
 
@@ -423,7 +510,7 @@ export default {
423 510
     }
424 511
 
425 512
     .value {
426
-      color: #333;
513
+      color: #000;
427 514
       font-size: 28rpx;
428 515
     }
429 516
 

+ 15 - 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=1739771470876') format('woff2'),
4
-       url('iconfont.woff?t=1739771470876') format('woff'),
5
-       url('iconfont.ttf?t=1739771470876') format('truetype');
3
+  src: url('iconfont.woff2?t=1740447040797') format('woff2'),
4
+       url('iconfont.woff?t=1740447040797') format('woff'),
5
+       url('iconfont.ttf?t=1740447040797') format('truetype');
6 6
 }
7 7
 
8 8
 .iconfont {
@@ -13,6 +13,18 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.icon-woderenwu:before {
17
+  content: "\e649";
18
+}
19
+
20
+.icon-mrenwuliebiao:before {
21
+  content: "\e690";
22
+}
23
+
24
+.icon-xitongshezhi:before {
25
+  content: "\e601";
26
+}
27
+
16 28
 .icon-huoweika:before {
17 29
   content: "\e754";
18 30
 }

BIN
static/iconfont.ttf


BIN
static/iconfont.woff


BIN
static/iconfont.woff2