魏熙美 5 年前
父节点
当前提交
ad7b6a1dbb

+ 2
- 2
src/pages/building/list/add/components/imageSet.jsx 查看文件

85
     // 网路请求
85
     // 网路请求
86
     request({ ...apis.building.buildingApartmentDelete, urlData: { id: record.apartmentId } }).then(res => {
86
     request({ ...apis.building.buildingApartmentDelete, urlData: { id: record.apartmentId } }).then(res => {
87
       getList()
87
       getList()
88
-      openNotificationWithIcon('error', '操作成功')
88
+      openNotificationWithIcon('success', '操作成功')
89
     }).catch(err => {
89
     }).catch(err => {
90
-      openNotificationWithIcon('error', err.message)
90
+      // openNotificationWithIcon('error', err.message)
91
     })
91
     })
92
   }
92
   }
93
 
93
 

+ 9
- 3
src/pages/building/list/add/components/modalImage.jsx 查看文件

163
                   {getFieldDecorator('apartmentId')(<Input />)}
163
                   {getFieldDecorator('apartmentId')(<Input />)}
164
               </Form.Item>
164
               </Form.Item>
165
               <Form.Item label="名称">
165
               <Form.Item label="名称">
166
-                {getFieldDecorator('apartmentName')(<Input />)}
166
+                {getFieldDecorator('apartmentName', {
167
+                  rules: [{ required: true, message: '请输入名称' }],
168
+                })(<Input />)}
167
               </Form.Item>
169
               </Form.Item>
168
               <Form.Item label="类型">
170
               <Form.Item label="类型">
169
-                {getFieldDecorator('apartmentType')(
171
+                {getFieldDecorator('apartmentType', {
172
+                  rules: [{ required: true, message: '请选择类型' }],
173
+                })(
170
                   <Select placeholder="类型">
174
                   <Select placeholder="类型">
171
                     <Option value="apart">户型</Option>
175
                     <Option value="apart">户型</Option>
172
                     <Option value="photo">相册</Option>
176
                     <Option value="photo">相册</Option>
183
                 )}
187
                 )}
184
               </Form.Item>
188
               </Form.Item>
185
               <Form.Item label="图片">
189
               <Form.Item label="图片">
186
-              {getFieldDecorator('img')(
190
+              {getFieldDecorator('img', {
191
+                  rules: [{ required: true, message: '请选择图片' }],
192
+              })(
187
                 <ImageListUpload />,
193
                 <ImageListUpload />,
188
               )}
194
               )}
189
               </Form.Item>
195
               </Form.Item>

+ 3
- 2
src/pages/building/type/edi.jsx 查看文件

59
       openNotificationWithIcon('success', '操作成功')
59
       openNotificationWithIcon('success', '操作成功')
60
       router.go(-1)
60
       router.go(-1)
61
     }).catch(err => {
61
     }).catch(err => {
62
-      // eslint-disable-next-line no-unused-expressions
63
-      openNotificationWithIcon('error', err)
62
+      
64
     })
63
     })
65
   }
64
   }
66
 
65
 
76
         // eslint-disable-next-line no-unused-expressions
75
         // eslint-disable-next-line no-unused-expressions
77
         openNotificationWithIcon('success', '操作成功')
76
         openNotificationWithIcon('success', '操作成功')
78
         router.go(-1)
77
         router.go(-1)
78
+      }).catch(err => {
79
+        
79
       })
80
       })
80
     }
81
     }
81
 
82
 

+ 8
- 2
src/pages/building/type/index.jsx 查看文件

42
             删除
42
             删除
43
             <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
43
             <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
44
           </Button>
44
           </Button>
45
+          <Button type="link" style={{
46
+            color: '#FF4A4A', right: '0',
47
+          }} onClick={() => toEdi(record.buildingTypeId)}>
48
+            编辑
49
+            <Icon type="copy" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
50
+          </Button>
45
         </span>
51
         </span>
46
       ),
52
       ),
47
     },
53
     },
65
       setData(res)
71
       setData(res)
66
     }).catch(err => {
72
     }).catch(err => {
67
       // eslint-disable-next-line no-unused-expressions
73
       // eslint-disable-next-line no-unused-expressions
68
-      openNotificationWithIcon('error', err)
74
+      // openNotificationWithIcon('error', err)
69
     })
75
     })
70
   }
76
   }
71
 
77
 
84
     }).then(() => {
90
     }).then(() => {
85
       openNotificationWithIcon('success', '操作成功')
91
       openNotificationWithIcon('success', '操作成功')
86
     }).catch(err => {
92
     }).catch(err => {
87
-      //openNotificationWithIcon('error', err.message)
93
+      // openNotificationWithIcon('error', err.message)
88
     })
94
     })
89
   }
95
   }
90
 
96
 

+ 2
- 1
src/pages/integralMall/GoodsList.jsx 查看文件

43
 
43
 
44
   function handleReset() {
44
   function handleReset() {
45
     props.form.resetFields();
45
     props.form.resetFields();
46
+    getList({ pageNum: 1, pageSize: 10 });
46
   }
47
   }
47
 
48
 
48
   // 跳转到编辑商品
49
   // 跳转到编辑商品
64
       onOk() {
65
       onOk() {
65
         request({ ...apis.integralMall.changeTaGoods, data: { ...row },}).then((data) => {
66
         request({ ...apis.integralMall.changeTaGoods, data: { ...row },}).then((data) => {
66
           message.info('操作成功!')
67
           message.info('操作成功!')
67
-          getList({ pageNum: 1, pageSize: 10 });
68
+          getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
68
         })
69
         })
69
       }
70
       }
70
     });
71
     });

+ 4
- 4
src/utils/request.js 查看文件

86
       if (code != 1000) {
86
       if (code != 1000) {
87
         if (code === 1001) {
87
         if (code === 1001) {
88
           notification.error({
88
           notification.error({
89
-            message: `请求错误`,
90
-            description: '请登录系统',
89
+            message: `请登录系统`,
90
+            // description: '请登录系统',
91
           });
91
           });
92
           throw new Error('请登录系统');
92
           throw new Error('请登录系统');
93
         } else {
93
         } else {
94
           notification.error({
94
           notification.error({
95
-            message: `请求错误`,
96
-            description: message,
95
+            message,
96
+            // description: message,
97
           });
97
           });
98
           throw new Error(message);
98
           throw new Error(message);
99
         }
99
         }