Browse Source

确认收货按钮增加确认弹框

zhanghe 7 years ago
parent
commit
7085c13ac3
1 changed files with 17 additions and 10 deletions
  1. 17 10
      src/routes/Order/Edit/SubOrderProfile.js

+ 17 - 10
src/routes/Order/Edit/SubOrderProfile.js

@@ -69,16 +69,23 @@ export default class SubOrderProfile extends Component {
    * 点击确认收货
    */
   confirmReceipt = () => {
-    const { dispatch, orderDetail } = this.props;
-    const { currentItem, filters } = orderDetail;
-    const { id } = currentItem;
-    dispatch({
-      type: 'orderDetail/orderReceive',
-      payload: { id },
-      callback: () => dispatch(routerRedux.push({
-        pathname: `/trade/order/sub/profile/${id}`,
-        search: queryString.stringify(filters),
-      })),
+    Modal.confirm({
+      title: '是否确认收货?',
+      okText: '确定',
+      cancelText: '取消',
+      onOk: () => {
+        const { dispatch, orderDetail } = this.props;
+        const { currentItem, filters } = orderDetail;
+        const { id } = currentItem;
+        dispatch({
+          type: 'orderDetail/orderReceive',
+          payload: { id },
+          callback: () => dispatch(routerRedux.push({
+            pathname: `/trade/order/sub/profile/${id}`,
+            search: queryString.stringify(filters),
+          })),
+        });
+      },
     });
   }