Ver código fonte

fix:下拉刷新

zhangxin 1 mês atrás
pai
commit
502fa3069d

+ 1 - 1
components/imgs-row-scroll/index.scss

@@ -1,5 +1,5 @@
1 1
 .imgs-row-scroll {
2
-	width: 100%;
2
+	max-width: 100%;
3 3
     overflow: auto;
4 4
 	::v-deep .uni-scroll-view {
5 5
 		height: 100% !important;

+ 5 - 0
components/inquiry-verification-list/mixins/inquiryVerificationList.js

@@ -19,7 +19,12 @@ export default {
19 19
     mounted() {
20 20
         this.getList();
21 21
     },
22
+    
22 23
     methods: {
24
+        onRefresh() {
25
+            this.queryParams.pageNum = 1;
26
+            this.getList();
27
+        },
23 28
         getList() {
24 29
             uni.$u.api.inquiryVerificationList(this.queryParams, {
25 30
                 type: this.type,

+ 4 - 4
pages.json

@@ -177,7 +177,7 @@
177 177
 			"path": "pages/wareHouse/components/add",
178 178
 			"style": {
179 179
 				"navigationBarTitleText": "仓库新增",
180
-				"enablePullDownRefresh": true,
180
+				"enablePullDownRefresh": false,
181 181
 				"navigationStyle": "custom"
182 182
 			}
183 183
 		},
@@ -185,7 +185,7 @@
185 185
 			"path" : "pages/wareHouse/components/openOrder",
186 186
 			"style": {
187 187
 				"navigationBarTitleText": "销售业务开单",
188
-				"enablePullDownRefresh": true,
188
+				"enablePullDownRefresh": false,
189 189
 				"navigationStyle": "custom"
190 190
 			}
191 191
 		},
@@ -297,7 +297,7 @@
297 297
 			"path": "pages/inquiry/index",
298 298
 			"style": {
299 299
 				"navigationBarTitleText": "询价中心",
300
-				"enablePullDownRefresh": false,
300
+				"enablePullDownRefresh": true,
301 301
 				"navigationBarBackgroundColor": "#108cff",
302 302
 				"navigationStyle": "custom"
303 303
 			}
@@ -306,7 +306,7 @@
306 306
 			"path": "pages/verification/index",
307 307
 			"style": {
308 308
 				"navigationBarTitleText": "核价中心",
309
-				"enablePullDownRefresh": false,
309
+				"enablePullDownRefresh": true,
310 310
 				"navigationBarBackgroundColor": "#108cff",
311 311
 				"navigationStyle": "custom"
312 312
 			}

+ 5 - 1
pages/inquiry/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
     <view class="page-container">
3
-        <inquiryVerificationList :type="type"></inquiryVerificationList>
3
+        <inquiryVerificationList :type="type" ref="inquiryVerificationListRef"></inquiryVerificationList>
4 4
     </view>
5 5
 </template>
6 6
 <script>
@@ -14,6 +14,10 @@
14 14
                 type:1//1:询价 2:核价
15 15
             }
16 16
         },
17
+        onPullDownRefresh() {
18
+            this.$refs.inquiryVerificationListRef.onRefresh();
19
+            uni.stopPullDownRefresh();
20
+        },
17 21
     }
18 22
 </script>
19 23
 

+ 5 - 1
pages/verification/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
     <view class="page-container">
3
-        <inquiryVerificationList :type="type"></inquiryVerificationList>
3
+        <inquiryVerificationList :type="type" ref="inquiryVerificationListRef"></inquiryVerificationList>
4 4
     </view>
5 5
 </template>
6 6
 <script>
@@ -14,6 +14,10 @@
14 14
                 type:2//1:询价 2:核价
15 15
             }
16 16
         },
17
+        onPullDownRefresh() {
18
+            this.$refs.inquiryVerificationListRef.onRefresh();
19
+            uni.stopPullDownRefresh();
20
+        },
17 21
     }
18 22
 </script>
19 23
 

+ 1 - 1
pages/wareHouse/components/add.vue

@@ -26,7 +26,7 @@
26 26
                                 @click="handlePasteRecognition(recognitionContent)"></u-button>
27 27
                         </view>
28 28
                     </u-form-item>
29
-                    <u-form-item label="商品图片" required prop="imgs" borderBottom>
29
+                    <u-form-item label="商品图片" prop="imgs" borderBottom>
30 30
                         <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
31 31
                             @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
32 32
                             :images="formData.goodPicFileList" :previewEnabled="true" :imageWidth="150"

+ 1 - 1
pages/wareHouse/components/detail.vue

@@ -312,7 +312,7 @@ export default {
312 312
             }
313 313
             const params = {
314 314
                 id: this.goodsId,
315
-                url: this.imgsUrl[0].url,
315
+                url: this.imgsUrl[0]?.url,
316 316
                 dictLabel: this.coreInfo.dictLabel,
317 317
                 dictValue: this.coreInfo.dictValue,
318 318
                 model: this.coreInfo.model,

+ 4 - 4
pages/wareHouse/components/openOrder.vue

@@ -211,11 +211,11 @@ export default {
211 211
    onLoad() {
212 212
       const params = this.$route.query.params
213 213
       if (params) {
214
-         this.openOrderForm = JSON.parse(params)
214
+         // this.openOrderForm = 
215 215
          this.openOrderForm.quantity = 1
216
-         // Object.keys(params).forEach(key => {
217
-         //    this.openOrderForm[key] = params[key]
218
-         // })
216
+         Object.keys(JSON.parse(params)).forEach(key => {
217
+            this.openOrderForm[key] = JSON.parse(params)[key]
218
+         })
219 219
       }
220 220
    },
221 221
    methods: {

+ 6 - 0
pages/wareHouse/index.vue

@@ -291,6 +291,12 @@ export default {
291 291
 		this.getList();
292 292
 		this.getCard();
293 293
 	},
294
+	onPullDownRefresh() {
295
+		this.pageNum = 1;
296
+		this.getList();
297
+		this.getCard();
298
+		uni.stopPullDownRefresh();
299
+	},
294 300
 };
295 301
 </script>
296 302