Просмотр исходного кода

feat: 软件锁 销售/借出/赠送 关联联系人,操作增加确认

outaozhen 5 лет назад
Родитель
Сommit
7293ce0d48

+ 19 - 7
src/pages/Product/Lock/Lockstore/components/LocksDetail/LockModal.jsx

@@ -1,5 +1,5 @@
 import React, { useState, useEffect, useRef } from 'react'
-import { Modal, Form, Select, Input, Spin, Button, Radio } from 'antd'
+import { Modal, Form, Select, Input, Spin, Button, Radio, Popconfirm } from 'antd'
 import styles from './index.less'
 import { SearchOutlined } from '@ant-design/icons'
 import { queryClient } from '@/services/customer'
@@ -260,9 +260,15 @@ const LockModal = props => {
                     <span className="w-1/6">{item.telephone}</span>
                     <span className="w-1/2 flex justify-between">
                       <span>{item.companyName}</span>
-                      <Button type="primary" size="small" onClick={() => connectClient(item.id)}>
-                        选择ta
-                      </Button>
+                      <Popconfirm
+                        title="确认选择ta"
+                        onConfirm={() => connectClient(item.id)}
+                        okText="确认"
+                        cancelText="取消">
+                        <Button type="primary" size="small">
+                          选择ta
+                        </Button>
+                      </Popconfirm>
                     </span>
                   </div>
                 ))}
@@ -272,9 +278,15 @@ const LockModal = props => {
                     <div className="w-1/3">{item.keyNum}</div>
                     <div className="w-2/3 flex justify-between">
                       <span>{item.product}</span>
-                      <Button type="primary" size="small" onClick={() => connectLongle(item.id)}>
-                        更换
-                      </Button>
+                      <Popconfirm
+                        title="确认选择ta"
+                        onConfirm={() => connectLongle(item.id)}
+                        okText="确认"
+                        cancelText="取消">
+                        <Button type="primary" size="small">
+                          更换
+                        </Button>
+                      </Popconfirm>
                     </div>
                   </div>
                 ))}