Commit e2b91bcc authored by lujunye's avatar lujunye

修复出库bug

parent 915bddf3
......@@ -48,6 +48,7 @@ class XuanZeShangPinCell: UITableViewCell{
}
delegate?.XuanZeShangPinCellCountChange?(sender: self, senderTF: countTF)
}
@IBOutlet weak var tapBtn: UIButton!
@IBOutlet weak var priceTF: UITextField!
@IBOutlet weak var countTF: UITextField!
......@@ -62,6 +63,7 @@ class XuanZeShangPinCell: UITableViewCell{
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
selectBtn.isUserInteractionEnabled = false
priceTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
countTF.addTarget(self, action: #selector(textChange(sender:)), for: .allEditingEvents)
......
......@@ -223,6 +223,7 @@
</constraints>
<connections>
<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>
</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">
......@@ -276,6 +277,7 @@
<outlet property="priceLbl" destination="trg-dk-v2W" id="kzY-o0-2WS"/>
<outlet property="priceTF" destination="jP7-f2-sjI" id="x6R-5h-cov"/>
<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"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="121.875"/>
......
......@@ -42,6 +42,7 @@ class NewSelectItemVc: BaseViewController,UITableViewDelegate,UITableViewDataSou
let cell = tableView.dequeueReusableCell(withIdentifier: "XuanZeShangPinCell") as! XuanZeShangPinCell
cell.tag = indexPath.row
let cellData = rkDatas[indexPath.row]
cell.tapBtn.isUserInteractionEnabled = false
cell.selectBtn.isSelected = false
for item in rkSelectArr {
if item.sku_id == cellData.sku_id {
......
......@@ -10,14 +10,16 @@ import UIKit
import LGButton
class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, NewOnlyRKCellDelegate,NewSelectItemVcDelegate,NewSelectWarehouseVCDelegate,GLAlertSelectViewDelegate,GeliAlertTextViewDelegate{
//MARK: - 提交申请
func sureGeliAlertTextViewAction(sender: String) {
HUD.show(.progress)
if sender.count == 0 {
HUD.flash(.label("请填写备注"), delay: 1.2)
return
}
HUD.flash(.label("请填写备注"), delay: 1.2)
return
}
HUD.show(.progress)
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let warehouse = poiArr[selectIdx!]
if lgBtnTitLbl.text == "提交申请" {
......@@ -126,6 +128,19 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
@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)
alterView.delegate = self
alterView.titleLbl.text = "请填写入库备注"
......@@ -190,10 +205,10 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}
self.lgBtnTitLbl.text = "提交申请"
if self.authArr.contains("63"){
self.isGm = true
self.lgBtnTitLbl.text = "直接入库"
}
if self.authArr.contains("63"){
self.isGm = true
self.lgBtnTitLbl.text = "直接入库"
}
model.data?.warehouse_res?.forEach({ (item) in
self.rkWareHouseArr.append(item)
......@@ -212,7 +227,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
// Do any additional setup after loading the view.
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 1 {
......@@ -274,23 +289,22 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
let data = rkSelectArr[indexPath.row]
cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str! + " " + \(data.price!)"
cell.rkPriceTf.text = ""
cell.rkCountTf.text = ""
cell.bzqTf.text = ""
if data.RKJG != nil {
cell.rkPriceTf.text = "\(data.RKJG!)"
}
if data.RKSL != nil {
cell.rkCountTf.text = "\(data.RKSL!)"
cell.rkCountTf.text = "\(data.RKSL!)"
}
if data.BZQ != nil {
cell.bzqTf.text = "\(data.BZQ!)"
}
if data.DayType == 1 {
cell.rightBtn.isSelected = false
cell.leftBtn.isSelected = true
}else{
if data.DayType == 0 {
cell.rightBtn.isSelected = true
cell.leftBtn.isSelected = false
}
return cell
}
......
......@@ -415,6 +415,8 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
func CKGmCellDelAction(cell: CKGmCell) {
//删除
piCiArr?.remove(at: cell.tag)
piCiArr?.append([])
rkSelectArr.remove(at: cell.tag)
listView.reloadData()
}
......
......@@ -274,7 +274,10 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
}
//MARK: - 通过审核
func sureGeliAlertTextViewAction(sender: String) {
if sender.count == 0 {
HUD.flash(.label("请填写备注"), delay: 1.2)
return
}
if sender.count > 0 {
let UserToken = UserDefaults.standard.value(forKey: "user_token")
if isFailAction {//不通过
......@@ -332,8 +335,6 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
}) { (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