Bladeren bron

fix:下拉刷新

zhangxin 1 maand geleden
bovenliggende
commit
502fa3069d

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

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

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

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

+ 4 - 4
pages.json

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

+ 5 - 1
pages/inquiry/index.vue

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

+ 5 - 1
pages/verification/index.vue

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

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

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

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

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

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

@@ -211,11 +211,11 @@ export default {
211
    onLoad() {
211
    onLoad() {
212
       const params = this.$route.query.params
212
       const params = this.$route.query.params
213
       if (params) {
213
       if (params) {
214
-         this.openOrderForm = JSON.parse(params)
214
+         // this.openOrderForm = 
215
          this.openOrderForm.quantity = 1
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
    methods: {
221
    methods: {

+ 6 - 0
pages/wareHouse/index.vue

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