Commit a8f75854 authored by lujunye's avatar lujunye

修复禅道已知bug

parent b6eab630
...@@ -223,7 +223,6 @@ ...@@ -223,7 +223,6 @@
</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">
......
...@@ -42,8 +42,11 @@ class NewSelectItemVc: BaseViewController,UITableViewDelegate,UITableViewDataSou ...@@ -42,8 +42,11 @@ 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.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 {
cell.selectBtn.isSelected = true cell.selectBtn.isSelected = true
......
...@@ -13,10 +13,11 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -13,10 +13,11 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
//MARK: - 提交申请 //MARK: - 提交申请
func sureGeliAlertTextViewAction(sender: String) { func sureGeliAlertTextViewAction(sender: String) {
if isGm {
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) HUD.show(.progress)
...@@ -26,8 +27,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -26,8 +27,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
var goodsInfoArr:Array<Any>? = [] var goodsInfoArr:Array<Any>? = []
rkSelectArr.forEach { (model) in rkSelectArr.forEach { (model) in
var total:Float = 0 var total:Float = 0
total = model.RKJG! * Float(model.RKSL!) total = model.RKJG! * Float(model.RKSL!)
var shelf_life = model.BZQ var shelf_life = model.BZQ
if model.DayType == 0 { if model.DayType == 0 {
shelf_life = model.BZQ! * 30 shelf_life = model.BZQ! * 30
...@@ -121,13 +122,15 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -121,13 +122,15 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
} }
@IBAction func gmAction(_ sender: Any) { @IBAction func gmAction(_ sender: Any) {
if holderArr[0] == "请选择仓库" { if gmNumber == nil {
HUD.flash(.label("请选择仓库"), delay: 1.2) if holderArr[0] == "请选择仓库" {
return HUD.flash(.label("请选择仓库"), delay: 1.2)
} return
if holderArr[1] == "请选择库位" { }
HUD.flash(.label("请选择库位"), delay: 1.2) if holderArr[1] == "请选择库位" {
return HUD.flash(.label("请选择库位"), delay: 1.2)
return
}
} }
if holderArr[2] == "请选择入库类型" { if holderArr[2] == "请选择入库类型" {
HUD.flash(.label("请选择入库类型"), delay: 1.2) HUD.flash(.label("请选择入库类型"), delay: 1.2)
...@@ -342,7 +345,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -342,7 +345,7 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
} }
}else{//待 }else{//待
if w_id != nil { if w_id != nil {
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
WarehouseDetail(["user_token":UserToken as Any,"w_id":w_id as Any], success: { (data) in WarehouseDetail(["user_token":UserToken as Any,"w_id":w_id as Any], success: { (data) in
let model = data as! ShopWarehouseDetailModel let model = data as! ShopWarehouseDetailModel
model.data?.position_res?.forEach({ (item) in model.data?.position_res?.forEach({ (item) in
...@@ -458,9 +461,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -458,9 +461,9 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
let time = TimeInterval(exactly: data.createDay!) let time = TimeInterval(exactly: data.createDay!)
timeSelectV.BeginDate = Date(timeIntervalSince1970: time!) timeSelectV.BeginDate = Date(timeIntervalSince1970: time!)
timeSelectV.EndDate = Date(timeIntervalSince1970: time!)//无用处 timeSelectV.EndDate = Date(timeIntervalSince1970: time!)//无用处
} }
timeSelectV.endDateByWork = Date() timeSelectV.endDateByWork = Date()
timeSelectV.titleLbl.text = "请选择生产日期" timeSelectV.titleLbl.text = "请选择生产日期"
timeSelectV.delegate = self timeSelectV.delegate = self
......
...@@ -119,7 +119,6 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo ...@@ -119,7 +119,6 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
HUD.hide() HUD.hide()
HUD.flash(.labeledSubSuccess(subtitle: "出库成功"), delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "出库成功"), delay: 1.2)
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
}) { (error) in }) { (error) in
} }
...@@ -233,9 +232,9 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo ...@@ -233,9 +232,9 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}else{ }else{
self.btmLbl.text = "提交申请" self.btmLbl.text = "提交申请"
if self.authArr.contains("64"){ if self.authArr.contains("64"){
self.isGm = true self.isGm = true
self.btmLbl.text = "直接出库" self.btmLbl.text = "直接出库"
} }
} }
self.listView.reloadData() self.listView.reloadData()
self.listView.isHidden = false self.listView.isHidden = false
...@@ -266,7 +265,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo ...@@ -266,7 +265,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
cell.delegate = self cell.delegate = self
cell.nameLbl.text = data.goods_name cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str cell.detailLbl.text = data.spec_str
let arr = piCiArr?[cell.tag] let arr = piCiArr?[cell.tag]
if arr!.count > 0 { if arr!.count > 0 {
cell.dataArr = arr cell.dataArr = arr
......
...@@ -54,6 +54,9 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -54,6 +54,9 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
listView.register(UINib(nibName: "CRKSumCell", bundle: nil), forCellReuseIdentifier: "CRKSumCell") listView.register(UINib(nibName: "CRKSumCell", bundle: nil), forCellReuseIdentifier: "CRKSumCell")
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dic = ["user_token":UserToken as Any,"sku_id":sku_id as Any] let dic = ["user_token":UserToken as Any,"sku_id":sku_id as Any]
listView.isHidden = true
HUD.flash(.progress)
GetGoodBatch(dic, success: { (data) in GetGoodBatch(dic, success: { (data) in
let model = data as! GetGoodBatchModel let model = data as! GetGoodBatchModel
model.data?.forEach({ (item) in model.data?.forEach({ (item) in
...@@ -69,6 +72,8 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi ...@@ -69,6 +72,8 @@ class PiCiXuanZeViewController: BaseViewController,UITableViewDelegate,UITableVi
} }
} }
self.listView.reloadData() self.listView.reloadData()
self.listView.isHidden = false
HUD.hide()
}) { (error) in }) { (error) in
} }
......
...@@ -470,7 +470,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -470,7 +470,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
let data = ioGoodsModels![indexPath.row] let data = ioGoodsModels![indexPath.row]
cell.nameLbl.text = data.goods_name cell.nameLbl.text = data.goods_name
cell.guiGe.text = "规格:---" cell.guiGe.text = "规格:---"
if data.goods_spec != nil { if data.goods_spec!.count > 0{
cell.guiGe.text = data.goods_spec cell.guiGe.text = data.goods_spec
} }
cell.rukuShu.text = "入库数量:" + "\(data.number!)" cell.rukuShu.text = "入库数量:" + "\(data.number!)"
...@@ -485,7 +485,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -485,7 +485,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
cell.rkjg.text = "入库价格:¥" + data.amount! cell.rkjg.text = "入库价格:¥" + data.amount!
cell.rkzj.text = "入库总价:¥" + data.subtotal! cell.rkzj.text = "入库总价:¥" + data.subtotal!
cell.baozhiQ.text = "保质期:---" cell.baozhiQ.text = "保质期:---"
if data.shelf_life != nil { if data.shelf_life != 0 {
cell.baozhiQ.text = "保质期:" + "\(data.shelf_life!)天" cell.baozhiQ.text = "保质期:" + "\(data.shelf_life!)天"
let month = data.shelf_life!/30 let month = data.shelf_life!/30
let day = data.shelf_life! % 30 let day = data.shelf_life! % 30
...@@ -500,7 +500,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -500,7 +500,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
} }
cell.baogao.text = "报告:无" cell.baogao.text = "报告:无"
if data.report_sn != nil { if data.report_sn != nil {
cell.baogao.text = "报告:" + "\(data.report_sn!)" cell.baogao.text = "报告:" + "\(data.report_sn!)"
} }
return cell return cell
...@@ -508,7 +508,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -508,7 +508,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
let model = inGoodsModels![indexPath.row] let model = inGoodsModels![indexPath.row]
cell.nameLbl.text = model.goods_name cell.nameLbl.text = model.goods_name
cell.guiGe.text = "规格:---" cell.guiGe.text = "规格:---"
if model.goods_spec != nil { if model.goods_spec!.count > 0 {
cell.guiGe.text = model.goods_spec cell.guiGe.text = model.goods_spec
} }
...@@ -524,7 +524,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -524,7 +524,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
cell.rkjg.text = "入库价格:¥" + "\(model.amount!)" cell.rkjg.text = "入库价格:¥" + "\(model.amount!)"
cell.rkzj.text = "入库总价:¥" + "\(model.subtotal!)" cell.rkzj.text = "入库总价:¥" + "\(model.subtotal!)"
cell.baozhiQ.text = "保质期:---" cell.baozhiQ.text = "保质期:---"
if model.shelf_life != nil { if model.shelf_life != 0 {
cell.baozhiQ.text = "保质期:" + "\(model.shelf_life!)天" cell.baozhiQ.text = "保质期:" + "\(model.shelf_life!)天"
let month = model.shelf_life!/30 let month = model.shelf_life!/30
let day = model.shelf_life! % 30 let day = model.shelf_life! % 30
...@@ -554,7 +554,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -554,7 +554,7 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
cell.nameLbl.text = model.goods_name cell.nameLbl.text = model.goods_name
cell.guiGe.text = model.goods_spec cell.guiGe.text = model.goods_spec
cell.rukuShu.text = "仓库名:---" cell.rukuShu.text = "仓库名:---"
if model.w_name != nil { if model.w_name!.count > 0 {
cell.rukuShu.text = "仓库名:" + "\(model.w_name!)" cell.rukuShu.text = "仓库名:" + "\(model.w_name!)"
} }
cell.scrq.text = "生产日期:---" cell.scrq.text = "生产日期:---"
...@@ -566,11 +566,11 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -566,11 +566,11 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
cell.gqrq.text = "过期日期:" + dayByDouble(sender: model.valid_date!) cell.gqrq.text = "过期日期:" + dayByDouble(sender: model.valid_date!)
} }
cell.rkjg.text = "库位名:---" cell.rkjg.text = "库位名:---"
if model.p_name != nil { if model.p_name!.count > 0 {
cell.rkjg.text = "库位名:" + "\(model.p_name!)" cell.rkjg.text = "库位名:" + "\(model.p_name!)"
} }
cell.rkzj.text = "保质期:---" cell.rkzj.text = "保质期:---"
if model.shelf_life != nil { if model.shelf_life != 0 {
cell.rkzj.text = "保质期:" + "\(model.shelf_life!)天" cell.rkzj.text = "保质期:" + "\(model.shelf_life!)天"
let month = model.shelf_life!/30 let month = model.shelf_life!/30
let day = model.shelf_life!%30 let day = model.shelf_life!%30
......
...@@ -128,7 +128,6 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -128,7 +128,6 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
// cell.contentLbl.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25)) // cell.contentLbl.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25))
// } // }
// } // }
let rowModel = self.dataModelArr[indexPath.row] let rowModel = self.dataModelArr[indexPath.row]
cell.titleLbl.text = rowModel.title cell.titleLbl.text = rowModel.title
......
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