Commit e2b91bcc authored by lujunye's avatar lujunye

修复出库bug

parent 915bddf3
...@@ -48,6 +48,7 @@ class XuanZeShangPinCell: UITableViewCell{ ...@@ -48,6 +48,7 @@ class XuanZeShangPinCell: UITableViewCell{
} }
delegate?.XuanZeShangPinCellCountChange?(sender: self, senderTF: countTF) delegate?.XuanZeShangPinCellCountChange?(sender: self, senderTF: countTF)
} }
@IBOutlet weak var tapBtn: UIButton!
@IBOutlet weak var priceTF: UITextField! @IBOutlet weak var priceTF: UITextField!
@IBOutlet weak var countTF: UITextField! @IBOutlet weak var countTF: UITextField!
...@@ -62,6 +63,7 @@ class XuanZeShangPinCell: UITableViewCell{ ...@@ -62,6 +63,7 @@ class XuanZeShangPinCell: UITableViewCell{
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
selectBtn.isUserInteractionEnabled = false
priceTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents) priceTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
countTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents) countTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
......
...@@ -223,6 +223,7 @@ ...@@ -223,6 +223,7 @@
</constraints> </constraints>
<connections> <connections>
<action selector="btnClickAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="lAu-Sj-JCd"/> <action selector="btnClickAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="lAu-Sj-JCd"/>
<action selector="tapBtn:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="buY-0L-HGa"/>
</connections> </connections>
</button> </button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="trg-dk-v2W"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="trg-dk-v2W">
...@@ -276,6 +277,7 @@ ...@@ -276,6 +277,7 @@
<outlet property="priceLbl" destination="trg-dk-v2W" id="kzY-o0-2WS"/> <outlet property="priceLbl" destination="trg-dk-v2W" id="kzY-o0-2WS"/>
<outlet property="priceTF" destination="jP7-f2-sjI" id="x6R-5h-cov"/> <outlet property="priceTF" destination="jP7-f2-sjI" id="x6R-5h-cov"/>
<outlet property="selectBtn" destination="Mdz-mb-FFq" id="wm1-L1-fpE"/> <outlet property="selectBtn" destination="Mdz-mb-FFq" id="wm1-L1-fpE"/>
<outlet property="tapBtn" destination="7TH-eJ-iAq" id="bF1-im-3zl"/>
<outlet property="yuShouImg" destination="Rub-Pk-cR7" id="8XF-VZ-5rv"/> <outlet property="yuShouImg" destination="Rub-Pk-cR7" id="8XF-VZ-5rv"/>
</connections> </connections>
<point key="canvasLocation" x="131.15942028985509" y="121.875"/> <point key="canvasLocation" x="131.15942028985509" y="121.875"/>
......
...@@ -42,6 +42,7 @@ class NewSelectItemVc: BaseViewController,UITableViewDelegate,UITableViewDataSou ...@@ -42,6 +42,7 @@ class NewSelectItemVc: BaseViewController,UITableViewDelegate,UITableViewDataSou
let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell
cell.tag = indexPath.row cell.tag = indexPath.row
let cellData = rkDatas[indexPath.row] let cellData = rkDatas[indexPath.row]
cell.tapBtn.isUserInteractionEnabled = false
cell.selectBtn.isSelected = false cell.selectBtn.isSelected = false
for item in rkSelectArr { for item in rkSelectArr {
if item.sku_id == cellData.sku_id { if item.sku_id == cellData.sku_id {
......
...@@ -10,14 +10,16 @@ import UIKit ...@@ -10,14 +10,16 @@ import UIKit
import LGButton import LGButton
class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate,NewSelectItemVcDelegate,NewSelectWarehouseVCDelegate,GLAlertSelectViewDelegate,GeliAlertTextViewDelegate{ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate,NewSelectItemVcDelegate,NewSelectWarehouseVCDelegate,GLAlertSelectViewDelegate,GeliAlertTextViewDelegate{
//MARK: - 提交申请 //MARK: - 提交申请
func sureGeliAlertTextViewAction(sender: String) { func sureGeliAlertTextViewAction(sender: String) {
HUD.show(.progress)
if sender.count == 0 { if sender.count == 0 {
HUD.flash(.label("请填写备注"), delay: 1.2) HUD.flash(.label("请填写备注"), delay: 1.2)
return return
} }
HUD.show(.progress)
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
let warehouse = poiArr[selectIdx!] let warehouse = poiArr[selectIdx!]
if lgBtnTitLbl.text == "提交申请" { if lgBtnTitLbl.text == "提交申请" {
...@@ -126,6 +128,19 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -126,6 +128,19 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
} }
@IBAction func gmAction(_ sender: Any) { @IBAction func gmAction(_ sender: Any) {
if holderArr[0] == "默认仓库" {
HUD.flash(.label("请选择仓库"), delay: 1.2)
return
}
if holderArr[1] == "默认库位" {
HUD.flash(.label("请选择库位"), delay: 1.2)
return
}
if holderArr[2] == "请选择入库类型" {
HUD.flash(.label("请选择入库类型"), delay: 1.2)
return
}
let alterView = GeliAlertTextView(frame: self.view.window!.bounds) let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.delegate = self alterView.delegate = self
alterView.titleLbl.text = "请填写入库备注" alterView.titleLbl.text = "请填写入库备注"
...@@ -190,10 +205,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -190,10 +205,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
} }
self.lgBtnTitLbl.text = "提交申请" self.lgBtnTitLbl.text = "提交申请"
if self.authArr.contains("63"){ if self.authArr.contains("63"){
self.isGm = true self.isGm = true
self.lgBtnTitLbl.text = "直接入库" self.lgBtnTitLbl.text = "直接入库"
} }
model.data?.warehouse_res?.forEach({ (item) in model.data?.warehouse_res?.forEach({ (item) in
self.rkWareHouseArr.append(item) self.rkWareHouseArr.append(item)
...@@ -212,7 +227,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -212,7 +227,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 1 { if indexPath.section == 1 {
...@@ -274,23 +289,22 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -274,23 +289,22 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
let data = rkSelectArr[indexPath.row] let data = rkSelectArr[indexPath.row]
cell.nameLbl.text = data.goods_name cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str! + " " + \(data.price!)" cell.detailLbl.text = data.spec_str! + " " + \(data.price!)"
cell.rkPriceTf.text = ""
cell.rkCountTf.text = ""
cell.bzqTf.text = ""
if data.RKJG != nil { if data.RKJG != nil {
cell.rkPriceTf.text = "\(data.RKJG!)" cell.rkPriceTf.text = "\(data.RKJG!)"
} }
if data.RKSL != nil { if data.RKSL != nil {
cell.rkCountTf.text = "\(data.RKSL!)" cell.rkCountTf.text = "\(data.RKSL!)"
} }
if data.BZQ != nil { if data.BZQ != nil {
cell.bzqTf.text = "\(data.BZQ!)" cell.bzqTf.text = "\(data.BZQ!)"
} }
if data.DayType == 1 { if data.DayType == 0 {
cell.rightBtn.isSelected = false
cell.leftBtn.isSelected = true
}else{
cell.rightBtn.isSelected = true cell.rightBtn.isSelected = true
cell.leftBtn.isSelected = false cell.leftBtn.isSelected = false
} }
return cell return cell
} }
......
...@@ -415,6 +415,8 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo ...@@ -415,6 +415,8 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
func CKGmCellDelAction(cell: CKGmCell) { func CKGmCellDelAction(cell: CKGmCell) {
//删除 //删除
piCiArr?.remove(at: cell.tag) piCiArr?.remove(at: cell.tag)
piCiArr?.append([])
rkSelectArr.remove(at: cell.tag) rkSelectArr.remove(at: cell.tag)
listView.reloadData() listView.reloadData()
} }
......
...@@ -274,7 +274,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -274,7 +274,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
} }
//MARK: - 通过审核 //MARK: - 通过审核
func sureGeliAlertTextViewAction(sender: String) { func sureGeliAlertTextViewAction(sender: String) {
if sender.count == 0 {
HUD.flash(.label("请填写备注"), delay: 1.2)
return
}
if sender.count > 0 { if sender.count > 0 {
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
if isFailAction {//不通过 if isFailAction {//不通过
...@@ -332,8 +335,6 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -332,8 +335,6 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
}) { (error) in }) { (error) in
} }
}else{
HUD.flash(.label("请填写备注"), delay: 1.2)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment