TradeViewController.swift 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. //
  2. // TradeViewController.swift
  3. // MTP2_iOS
  4. //
  5. // Created by Handy_Cao on 2020/10/29.
  6. // Copyright © 2020 Muchinfo. All rights reserved.
  7. //
  8. import UIKit
  9. import SDWebImage
  10. import NVActivityIndicatorView
  11. import WHToast
  12. /// 购买视图容器控制类
  13. class TradeViewController: BaseViewController {
  14. // MARK: - 属性列表
  15. /// 公司名称
  16. @IBOutlet weak var company: UILabel!
  17. /// 标题
  18. @IBOutlet weak var goodsName: UILabel!
  19. /// 商品图片
  20. @IBOutlet weak var goodsImage: UIImageView!
  21. /// 单号
  22. @IBOutlet weak var orderNo: UILabel!
  23. /// 资金提示信息
  24. @IBOutlet weak var amountTips: UILabel!
  25. /// 提示信息
  26. @IBOutlet weak var tips: UILabel!
  27. /// 金额范围
  28. @IBOutlet weak var priceRange: UILabel!
  29. /// 价格
  30. @IBOutlet weak var price: UILabel!
  31. /// 购买价格
  32. @IBOutlet weak var priceField: IBNumberEditText! {
  33. didSet {
  34. priceField.valueType = 2
  35. priceField.delegate = self
  36. }
  37. }
  38. /// 购买数量
  39. @IBOutlet weak var qtyField: IBNumberEditText! {
  40. didSet {
  41. qtyField.valueType = 1
  42. qtyField.delegate = self
  43. }
  44. }
  45. /// 卖家列表
  46. @IBOutlet weak var tableView: UITableView!
  47. /// 高度
  48. @IBOutlet weak var tableViewHeightConstraint: NSLayoutConstraint!
  49. /// 提交
  50. @IBOutlet weak var submit: UIButton!
  51. /// 提交
  52. @IBOutlet weak var refresh: UIButton!
  53. /// CellIdentifier
  54. let CellIdentifier = "Trade_Cell"
  55. /// 商品数据
  56. override var takeInfo: Any? {
  57. didSet {
  58. guard let obj = takeInfo as? MoGoodsInfo else { return }
  59. DispatchQueue.main.asyncAfter(deadline: DispatchTime.now()+0.5) {
  60. /// 显示商品详情数据信息
  61. self.showGoodsDetailInfo(obj)
  62. /// 行情订阅
  63. self.subscriptQuote()
  64. }
  65. }
  66. }
  67. /// 卖家挂牌委托单数据
  68. var orderDetails: [MoHsbyGoodsOrderDetail] = [] {
  69. didSet {
  70. /// 刷新列表数据
  71. self.tableView.reloadData()
  72. /// 重新设置高度约束
  73. self.tableViewHeightConstraint.constant = CGFloat(orderDetails.count)*50.0
  74. /// 是否隐藏提示
  75. self.tips.isHidden = orderDetails.count != 0
  76. /// setTitle
  77. self.submit.setTitle(orderDetails.count == 0 ? "发布求购" : "提交订单", for: .normal)
  78. /// orderTips
  79. orderTips.isHidden = orderDetails.count == 0
  80. }
  81. }
  82. /// 提示信息
  83. @IBOutlet weak var orderTips: UILabel!
  84. /// 委托数量
  85. var orderQty: Int = 0 {
  86. didSet {
  87. qtyField.currentIntNumbers = orderQty
  88. /// 计算购买金额
  89. self.calculate()
  90. }
  91. }
  92. // MARK: - 生命周期相关
  93. override func viewDidLoad() {
  94. super.viewDidLoad()
  95. // Do any additional setup after loading the view.
  96. /// UI界面初始化
  97. buildView()
  98. }
  99. override func viewWillAppear(_ animated: Bool) {
  100. super.viewWillAppear(animated)
  101. /// 隐藏导航栏
  102. self.navigationController?.setNavigationBarHidden(false, animated: true)
  103. /// 侦听行情推送广播
  104. MTP2BusinessCore.shared.broadcastManager?.addBroadcastListener(owner: self, action: .ReceiveTradeQuote) { [unowned self] in
  105. /// 异常情况
  106. guard let goodsQuoteInfo = $0.object as? [(goodsHqCode: String, exchHqCode: String)],
  107. goodsQuoteInfo.count != 0,
  108. let goodsManager = MTP2BusinessCore.shared.goodsManager,
  109. let goods = self.takeInfo as? MoGoodsInfo else { return }
  110. /// 更新商品行情信息
  111. goodsQuoteInfo.forEach {
  112. if $0.goodsHqCode == goods.goodscode {
  113. DispatchQueue.main.async {
  114. /// 更新价格
  115. self.price.text = "\(goods.currencysign)"+(goodsManager.goodsInfos.first(where: {$0.goodsid == (takeInfo as? MoGoodsInfo)?.goodsid})?.getLast().toDownString(reserve: goods.decimalplace) ?? "")
  116. /// 当前价格
  117. self.priceField.currentDoubleNumbers = goodsManager.goodsInfos.first(where: {$0.goodsid == (takeInfo as? MoGoodsInfo)?.goodsid})?.getLast() ?? 0.0
  118. }
  119. }
  120. }
  121. }
  122. }
  123. deinit {
  124. /// 移出行情广播
  125. MTP2BusinessCore.shared.broadcastManager?.removeBroadcastListener(owner: self, forName: .ReceiveTradeQuote)
  126. }
  127. // MARK: - 数据初始化
  128. /// UI界面初始化
  129. fileprivate func buildView() {
  130. /// addLoadingView
  131. self.addLoadingView()
  132. }
  133. /// 显示商品详情数据信息
  134. /// - Parameter obj: obj
  135. fileprivate func showGoodsDetailInfo(_ obj: MoGoodsInfo) {
  136. /// 异常
  137. guard let accountManager = MTP2BusinessCore.shared.accountManager else { return }
  138. /// 商品名称
  139. self.goodsName.text = obj.goodsname
  140. /// 商品代码
  141. self.orderNo.text = obj.goodscode
  142. /// 商品价格
  143. self.price.text = "\(obj.currencysign) \(obj.getLast() == 0.0 ? obj.last : obj.getLast())"
  144. /// 价格范围
  145. priceRange.text = "\(obj.limitdown)<= 价格范围 <= \(obj.limitup)"
  146. /// 供应商名称
  147. company.text = obj.vendorname
  148. /// 输入框价格
  149. priceField.incrementDoubleNum = obj.stepvalue
  150. priceField.minDoubleNum = obj.limitdown
  151. priceField.maxDoubleNum = obj.limitup
  152. priceField.decimalPlace = obj.decimalplace
  153. priceField.currentDoubleNumbers = obj.last
  154. /// 查询对手买家挂牌信息
  155. self.requestQueryHsbyGoodsOrderDetails(obj.last.toString(reserve: 2))
  156. /// 输入步进值
  157. qtyField.incrementIntNum = obj.lotsize
  158. qtyField.minIntNum = obj.lotsize
  159. qtyField.currentIntNumbers = obj.lotsize
  160. qtyField.maxIntNum = obj.buymaxqty == 0 ? Int.max : obj.buymaxqty
  161. /// 查询资金信息
  162. accountManager.loginQueryReq(queryItem: "1,2") { (isComplete, error) in
  163. DispatchQueue.main.async {
  164. /// 计算购买金额
  165. self.calculate()
  166. }
  167. }
  168. /// 商品图片
  169. guard let url = StringUtils.getImageUrl(obj.picurls) else { return }
  170. goodsImage.sd_setImage(with: url, placeholderImage: UIImage(named: "placeholder_image"), options: .queryDiskDataSync, context: nil)
  171. }
  172. // MARK: - 交互相关
  173. /// UITextField输入值发生改变响应事件
  174. /// - Parameter sender: sender
  175. @IBAction func onValueChanged(_ sender: UITextField) {
  176. }
  177. /// onButtonPressed
  178. /// - Parameter sender: sender
  179. @IBAction fileprivate func onButtonPressed(_ sender: UIControl) {
  180. switch sender {
  181. case submit:
  182. let isListing = !tableView.visibleCells.contains { (cell) -> Bool in
  183. return (cell as? TradeCell)?.isCheck ?? false
  184. }
  185. /// 有对手委托单得时候必须选一个
  186. if isListing, orderDetails.count != 0 {
  187. WHToast.showError(withMessage: "请选择卖家", duration: 1.5, finishHandler: {})
  188. return
  189. }
  190. if isListing {
  191. /// 买挂牌
  192. doListingTrade()
  193. } else {
  194. /// 买摘牌
  195. doDeListingTrade()
  196. }
  197. case refresh: /// 刷新按钮
  198. /// 更新单据
  199. self.requestQueryHsbyGoodsOrderDetails(priceField.currentDoubleNumbers.toString(reserve: 2))
  200. default:
  201. break
  202. }
  203. }
  204. // MARK: - 接口请求
  205. /// 买挂牌提交请求方法
  206. fileprivate func doListingTrade() {
  207. /// 异常
  208. guard let tradeManager = MTP2BusinessCore.shared.tradeManager,
  209. let obj = takeInfo as? MoGoodsInfo,
  210. check() else { return }
  211. /// 构建交易参数
  212. let tradeParam = MoTradeParam()
  213. /// 买卖方向
  214. tradeParam.buyOrSell = .ORDERDIRECTION_BUY
  215. /// 数量
  216. tradeParam.orderQty = Double(qtyField.currentIntNumbers)
  217. /// 挂牌价格
  218. tradeParam.orderPrice = priceField.currentDoubleNumbers
  219. /// 挂牌点选类型
  220. tradeParam.delistingType = .DELISTINGTYPE_SELECTED
  221. /// 点选成交
  222. tradeParam.listingSelectType = .LISTINGSELECTTYPE_LISTING
  223. /// 有效类型
  224. tradeParam.validType = .VALIDTYPE_DR
  225. /// 下单类型
  226. tradeParam.buildType = .BUILDTYPE_OPEN
  227. /// 时间有效类型
  228. tradeParam.timevalidType = .VALIDTYPE_DR
  229. /// 市场编号
  230. tradeParam.marketID = obj.marketid
  231. /// 商品ID
  232. tradeParam.goodsID = obj.goodsid
  233. /// 开启Loading
  234. NVActivityIndicatorPresenter.sharedInstance.startAnimating(ActivityData(message: "购买中......", type: .ballClipRotate, color: UIColor.loding(), backgroundColor: .clear), NVActivityIndicatorView.DEFAULT_FADE_IN_ANIMATION)
  235. tradeManager.tradeCommision(tradeParam: tradeParam) { [weak self] (isSuccess, error, orderNo) in
  236. DispatchQueue.main.async {
  237. /// dismisss loding.....
  238. NVActivityIndicatorPresenter.sharedInstance.stopAnimating(NVActivityIndicatorView.DEFAULT_FADE_OUT_ANIMATION)
  239. if isSuccess {
  240. /// 返回上次视图
  241. WHToast.showSuccess(withMessage: "请求成功", duration: 1.5) {
  242. self?.navigationController?.popViewController(animated: true)
  243. }
  244. } else {
  245. WHToast.showError(withMessage: "请求失败,\(ErrorUtils.getDesc(errorCode: error?.retCode ?? -99999) ?? "未知错误")", duration: 1.5, finishHandler: {})
  246. }
  247. }
  248. }
  249. }
  250. /// 买摘牌提交请求方法
  251. fileprivate func doDeListingTrade() {
  252. /// 异常
  253. guard let tradeManager = MTP2BusinessCore.shared.tradeManager,
  254. let obj = takeInfo as? MoGoodsInfo,
  255. check() else { return }
  256. let group = DispatchGroup()
  257. /// 开启Loading
  258. NVActivityIndicatorPresenter.sharedInstance.startAnimating(ActivityData(message: "购买中......", type: .ballClipRotate, color: UIColor.loding(), backgroundColor: .clear), NVActivityIndicatorView.DEFAULT_FADE_IN_ANIMATION)
  259. /// 构建交易参数
  260. let tradeParam = MoTradeParam()
  261. /// 买卖方向
  262. tradeParam.buyOrSell = .ORDERDIRECTION_BUY
  263. /// 挂牌点选类型
  264. tradeParam.delistingType = .DELISTINGTYPE_SELECTED
  265. /// 点选成交
  266. tradeParam.listingSelectType = .LISTINGSELECTTYPE_DELISTING
  267. /// 有效类型
  268. tradeParam.validType = .VALIDTYPE_DR
  269. /// 下单类型
  270. tradeParam.buildType = .BUILDTYPE_OPEN
  271. /// 时间有效类型
  272. tradeParam.timevalidType = .VALIDTYPE_DR
  273. /// 市场编号
  274. tradeParam.marketID = obj.marketid
  275. /// 商品ID
  276. tradeParam.goodsID = obj.goodsid
  277. for cell in tableView.visibleCells {
  278. if let cell = cell as? TradeCell, cell.isCheck {
  279. /// 挂牌价格
  280. tradeParam.orderPrice = cell.model?.orderprice ?? 0.0
  281. /// 关联单号
  282. tradeParam.relatedID = UInt64(cell.model?.orderid ?? "0") ?? 0
  283. /// 数量
  284. tradeParam.orderQty = Double(cell.qtyField.currentIntNumbers)
  285. group.enter()
  286. tradeManager.tradeCommision(tradeParam: tradeParam) { (isSuccess, error, orderNo) in
  287. group.leave()
  288. }
  289. }
  290. }
  291. group.notify(queue: DispatchQueue.main) {
  292. /// dismisss loding.....
  293. NVActivityIndicatorPresenter.sharedInstance.stopAnimating(NVActivityIndicatorView.DEFAULT_FADE_OUT_ANIMATION)
  294. WHToast.showSuccess(withMessage: "委托已提交,请前往我的单据页面查看!", duration: 1.5, finishHandler: {
  295. self.navigationController?.popViewController(animated: true)
  296. })
  297. }
  298. }
  299. /// 查询商品对应委托单的数据信息
  300. /// - Parameter price: 价格
  301. fileprivate func requestQueryHsbyGoodsOrderDetails(_ price: String?) {
  302. /// 异常
  303. guard let orderManager = MTP2BusinessCore.shared.orderManager,
  304. let obj = takeInfo as? MoGoodsInfo else { return }
  305. /// startAnimating
  306. self._anim?.startAnimating()
  307. /// 发送请求
  308. orderManager.requestQueryHsbyGoodsOrderDetails(obj.goodsid, price) { (isComplete, error, orderDetails) in
  309. DispatchQueue.main.async {
  310. /// stopAnimating
  311. self._anim?.stopAnimating()
  312. if isComplete {
  313. /// 更新数据
  314. self.orderDetails = orderDetails ?? []
  315. } else {
  316. self.orderDetails = []
  317. WHToast.showError(withMessage: "数据更新失败,原因:\(error?.retMsg ?? "未知错误")", duration: 1.5, finishHandler: {})
  318. }
  319. }
  320. }
  321. }
  322. /// 合规性校验
  323. /// - Returns: Bool
  324. fileprivate func check() -> Bool {
  325. /// 请输入委托价格
  326. guard priceField.currentDoubleNumbers != 0.0 else {
  327. WHToast.showError(withMessage: "请输入委托价格", duration: 1.5, finishHandler: {})
  328. return false
  329. }
  330. /// 委托价格不在范围内
  331. let detail = takeInfo as? MoGoodsInfo
  332. if priceField.currentDoubleNumbers < (detail?.limitdown ?? 0.0) || (priceField.currentDoubleNumbers > detail?.limitup ?? 0.0) {
  333. WHToast.showError(withMessage: "\(detail?.limitdown ?? 0.0)<=委托价格<=\(detail?.limitup ?? 0.0)", duration: 1.5, finishHandler: {})
  334. return false
  335. }
  336. /// 请输入交易数量
  337. if qtyField.currentIntNumbers == 0 {
  338. WHToast.showError(withMessage: "请输入交易数量", duration: 1.5, finishHandler: {})
  339. return false
  340. }
  341. /// 委托数量不能大于
  342. if qtyField.currentIntNumbers > qtyField.maxIntNum {
  343. WHToast.showError(withMessage: "交易数量应小于等于\(qtyField.maxIntNum)", duration: 1.5, finishHandler: {})
  344. return false
  345. }
  346. return true
  347. }
  348. // MARK: - 订阅行情相关
  349. var uuid: String = UUID().uuidString
  350. /// 行情订阅
  351. private func subscriptQuote() {
  352. var goodsCodes = Set<String>()
  353. if let goods = self.takeInfo as? MoGoodsInfo {
  354. goodsCodes.insert(goods.goodscode)
  355. }
  356. guard let quoteSubscriptManager = MTP2BusinessCore.shared.quoteSubscriptManager else { return }
  357. quoteSubscriptManager.updateQuoteSubcriptGoods(uuid: uuid, goodsCode: goodsCodes)
  358. }
  359. // MARK: - 计算相关
  360. /// 计算相关
  361. fileprivate func calculate() {
  362. /// 异常
  363. guard let obj = takeInfo as? MoGoodsInfo,
  364. let accountManager = MTP2BusinessCore.shared.accountManager,
  365. let taAccountInfo = accountManager.getCurrentTAAccountInfo() else {
  366. return
  367. }
  368. let amount = (priceField.currentDoubleNumbers*Double(qtyField.currentIntNumbers)*obj.agreeUnit).toDownString(reserve: obj.decimalplace)
  369. /// 期末余额
  370. let blance = taAccountInfo.currentBalance-(taAccountInfo.freezeMargin+taAccountInfo.otherFreezeMargin+taAccountInfo.freezeCharge)
  371. amountTips.text = "购买金额:\(amount) 可用金额:\(blance.toDownString(reserve: 2))"
  372. }
  373. }
  374. extension TradeViewController: UITableViewDelegate, UITableViewDataSource {
  375. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  376. return orderDetails.count
  377. }
  378. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  379. let cell = tableView.dequeueReusableCell(withIdentifier: CellIdentifier, for: indexPath) as! TradeCell
  380. cell.model = orderDetails[indexPath.row]
  381. cell.isCheck = false
  382. cell.block = { (_ model: MoHsbyGoodsOrderDetail?, _ isCheck: Bool, _ qty: Int) in
  383. var qty: Int = 0
  384. self.tableView.visibleCells.forEach { (cell) in
  385. if (cell as! TradeCell).isCheck {
  386. qty += (cell as! TradeCell).qtyField.currentIntNumbers
  387. }
  388. }
  389. self.orderQty = qty
  390. /// 输入框是否可用
  391. self.qtyField.isUserInteractionEnabled = !self.tableView.visibleCells.contains(where: { (cell) -> Bool in
  392. return ((cell as? TradeCell)?.isCheck ?? false)
  393. })
  394. }
  395. /// 最小交易数量
  396. if let obj = takeInfo as? MoGoodsInfo {
  397. cell.qtyField.incrementIntNum = obj.lotsize
  398. cell.qtyField.minIntNum = obj.lotsize
  399. }
  400. return cell
  401. }
  402. func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  403. return 50.0
  404. }
  405. }
  406. extension TradeViewController: IBNumberEditTextDelegate {
  407. func numberInputViewDidEndEditing(_ numberInputView: IBNumberEditText) {
  408. if numberInputView == priceField {
  409. let orderPrice = numberInputView.currentDoubleNumbers
  410. /// 更新单据
  411. self.requestQueryHsbyGoodsOrderDetails(orderPrice.toString(reserve: 2))
  412. } else {
  413. calculate()
  414. }
  415. }
  416. func numberInputView(_ numberInputView: IBNumberEditText, _ buttonType: NumberInputViewButtonType) {
  417. if numberInputView == priceField {
  418. let orderPrice = numberInputView.currentDoubleNumbers
  419. /// 更新单据
  420. self.requestQueryHsbyGoodsOrderDetails(orderPrice.toString(reserve: 2))
  421. }
  422. calculate()
  423. }
  424. func IBNumberEditText(textField: UITextField) {}
  425. }
  426. class TradeCell: BaseTableViewCell<MoHsbyGoodsOrderDetail> {
  427. // MARK: - 属性列表
  428. /// bgView
  429. @IBOutlet weak var bgView: UIView!
  430. /// checkBox
  431. @IBOutlet weak var checkBox: UIButton!
  432. /// accountName
  433. @IBOutlet weak var accountName: UILabel!
  434. /// price
  435. @IBOutlet weak var price: UILabel!
  436. /// qty
  437. @IBOutlet weak var qty: UILabel!
  438. /// checkBox
  439. @IBOutlet weak var qtyField: IBNumberEditText! {
  440. didSet {
  441. qtyField.valueType = 1
  442. qtyField.delegate = self
  443. }
  444. }
  445. /// 数据模型
  446. override var model: MoHsbyGoodsOrderDetail? {
  447. didSet {
  448. /// 异常
  449. guard let obj = model else { return }
  450. /// 数量范围
  451. qtyField.maxIntNum = obj.enableqty
  452. if let vc = self.superController() as? MyUnusedViewController { /// 我的闲置
  453. qtyField.minIntNum = vc.myGoods?.lotsize ?? 1
  454. qtyField.incrementIntNum = vc.myGoods?.lotsize ?? 1
  455. qtyField.currentIntNumbers = obj.enableqty
  456. } else {
  457. let lotSize = ((self.superController() as? TradeViewController)?.takeInfo as? MoGoodsInfo)?.lotsize ?? 1
  458. qtyField.minIntNum = lotSize
  459. qtyField.incrementIntNum = lotSize
  460. qtyField.currentIntNumbers = lotSize
  461. }
  462. /// 客户名称
  463. accountName.text = obj.customername
  464. /// 委托价格
  465. price.text = "\(obj.currencysign)\(obj.orderprice)"
  466. /// 委托数量
  467. qty.text = "\(obj.enableqty)\(obj.goodunit)"
  468. }
  469. }
  470. /// 是否勾选
  471. var isCheck: Bool = false {
  472. didSet {
  473. /// 异常
  474. guard let obj = model else { return }
  475. /// setImage
  476. checkBox.setImage(UIImage(named: isCheck ? "check_selected" : "check_normal"), for: .normal)
  477. /// 执行回调
  478. if let callBack = block { callBack(obj, isCheck, qtyField.currentIntNumbers) }
  479. /// 设置交互色
  480. bgView.backgroundColor = UIColorFromHex(rgbValue: isCheck ? 0xecf3fd : 0xf7f7f7)
  481. /// 是否可用
  482. qtyField.isUserInteractionEnabled = isCheck
  483. }
  484. }
  485. /// 回调块
  486. var block: ((_ model: MoHsbyGoodsOrderDetail?, _ isCheck: Bool, _ qty: Int) -> Void)?
  487. /// onButtonPressed
  488. /// - Parameter sender: sender
  489. @IBAction func onButtonPressed(_ sender: UIButton) {
  490. switch sender {
  491. case checkBox:
  492. isCheck = !isCheck
  493. default:
  494. return
  495. }
  496. }
  497. }
  498. extension TradeCell: IBNumberEditTextDelegate {
  499. /// 不做任何处理
  500. func IBNumberEditText(textField: UITextField) {}
  501. func numberInputView(_ numberInputView: IBNumberEditText, _ buttonType: NumberInputViewButtonType) {
  502. isCheck = true
  503. }
  504. func numberInputViewDidEndEditing(_ numberInputView: IBNumberEditText) {
  505. isCheck = true
  506. }
  507. }