Commit a3fcb8d9 authored by lujunye's avatar lujunye

调整出入库列表,详情

parent 8462c71b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"extent" : "full-screen", "extent" : "full-screen",
"filename" : "1242*2688@1x.png", "filename" : "1242*2688.png",
"idiom" : "iphone", "idiom" : "iphone",
"minimum-system-version" : "12.0", "minimum-system-version" : "12.0",
"orientation" : "portrait", "orientation" : "portrait",
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
{ {
"extent" : "full-screen", "extent" : "full-screen",
"filename" : "828*1792@1x.png", "filename" : "828*1792.png",
"idiom" : "iphone", "idiom" : "iphone",
"minimum-system-version" : "12.0", "minimum-system-version" : "12.0",
"orientation" : "portrait", "orientation" : "portrait",
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
}, },
{ {
"extent" : "full-screen", "extent" : "full-screen",
"filename" : "1125*2436@1x.png", "filename" : "1125*2436.png",
"idiom" : "iphone", "idiom" : "iphone",
"minimum-system-version" : "11.0", "minimum-system-version" : "11.0",
"orientation" : "portrait", "orientation" : "portrait",
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
}, },
{ {
"extent" : "full-screen", "extent" : "full-screen",
"filename" : "750*1334@1x.png", "filename" : "750*1334.png",
"idiom" : "iphone", "idiom" : "iphone",
"minimum-system-version" : "8.0", "minimum-system-version" : "8.0",
"orientation" : "portrait", "orientation" : "portrait",
......
...@@ -122,6 +122,8 @@ ...@@ -122,6 +122,8 @@
<string>Warehouse/warehouseIoList</string> <string>Warehouse/warehouseIoList</string>
<key>查看出入库单详情(已审核)</key> <key>查看出入库单详情(已审核)</key>
<string>Warehouse/IoGoodsDetail</string> <string>Warehouse/IoGoodsDetail</string>
<key>商品入库审核详情(未审核状态)</key>
<string>Warehouse/InGoodsDetail</string>
<key>商品出库审核详情(未审核状态)</key> <key>商品出库审核详情(未审核状态)</key>
<string>Warehouse/OutGoodsDetail</string> <string>Warehouse/OutGoodsDetail</string>
<key>手机号登录</key> <key>手机号登录</key>
......
...@@ -12,7 +12,7 @@ import ObjectMapper ...@@ -12,7 +12,7 @@ import ObjectMapper
class IoGoodsDetailModel: Mappable { class IoGoodsDetailModel: Mappable {
var code:Int? var code:Int?
var message : String? var message : String?
var data : Array<IoGoodsDetailDataModel>? var data : IoGoodsDetailDataModel?
required init?( map: Map) { required init?( map: Map) {
...@@ -55,23 +55,23 @@ class IoGoodsDetailDataIoResModel: Mappable { ...@@ -55,23 +55,23 @@ class IoGoodsDetailDataIoResModel: Mappable {
class IoGoodsDetailDataGoodsResModel: Mappable { class IoGoodsDetailDataGoodsResModel: Mappable {
var iog_id:Int? var iog_id:Int?
var sku_id : String?//商品sku_id var sku_id : Int?//商品sku_id
var goods_name:Int? //商品名 var goods_name:String? //商品名
var goods_spec : String?//商品规格 var goods_spec : String?//商品规格
var number:Int?//数量 var number:Int?//数量
var production_data : String? //生产日期 var production_data : Double? //生产日期
var valid_date:Int? //过期时间 var valid_date:Double? //过期时间
var shelf_life : String? //保质期(单位:天) var shelf_life : Int? //保质期(单位:天)
var report_id:Int? //商品报告id var report_id:Int? //商品报告id
var amount : String? var amount : String?
var subtotal:Int? var subtotal:String?
var report_sn : String? //商品报告sn var report_sn : String? //商品报告sn
var file_url:String?//商品报告文件 var file_url:String?//商品报告文件
var w_name : String?//仓库 var w_name : String?//仓库
var p_name:Int?//仓库 var p_name:String?//库位
......
...@@ -67,6 +67,11 @@ class OutGoodsDetailDataGoodsResModel: Mappable { ...@@ -67,6 +67,11 @@ class OutGoodsDetailDataGoodsResModel: Mappable {
var batch_id : Int? var batch_id : Int?
var inventory : Int? var inventory : Int?
var p_name:String?
var w_name:String?
var file_url:String?
var report_sn:String?
required init?( map: Map) { required init?( map: Map) {
} }
......
...@@ -83,16 +83,30 @@ class AddImgCell: UITableViewCell { ...@@ -83,16 +83,30 @@ class AddImgCell: UITableViewCell {
addBtn.isHidden = true addBtn.isHidden = true
} }
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0) scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
if isAllEditing {
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: CGFloat(arr.count)*105, height:h) scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: CGFloat(arr.count)*105, height:h)
addBtnX.constant = (scrollView?.frame.maxX)! addBtnX.constant = (scrollView?.frame.maxX)!
}else{
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30,height:h)
}
}else if arr.count == 5 { }else if arr.count == 5 {
addBtn.isHidden = true addBtn.isHidden = true
if isAllEditing {
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0) scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30, height:h) scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30, height:h)
}else{ }else{
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0) scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30,height:h)
}
}else{
if isAllEditing {
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-130, height:h) scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-130, height:h)
addBtnX.constant = fullScreenWidth-105 addBtnX.constant = fullScreenWidth-105
}else{
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30,height:h)
}
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
} }
} }
for i in 0 ..< arr.count { for i in 0 ..< arr.count {
......
...@@ -16,22 +16,28 @@ class CRKCell: UITableViewCell { ...@@ -16,22 +16,28 @@ class CRKCell: UITableViewCell {
@IBAction func btnClick(_ sender: UIButton) { @IBAction func btnClick(_ sender: UIButton) {
delegate?.CRKCellBtnClick(sender: sender,cell:self) delegate?.CRKCellBtnClick(sender: sender,cell:self)
} }
@IBOutlet weak var rightBtn: UIButton!
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var timeLbl: UILabel! @IBOutlet weak var timeLbl: UILabel!
@IBOutlet weak var countLbl: UILabel! @IBOutlet weak var countLbl: UILabel!
@IBOutlet weak var statusNameLbl: UILabel! @IBOutlet weak var statusNameLbl: UILabel!
@IBOutlet weak var statusLbl: UILabel! @IBOutlet weak var statusLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel! @IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var btmH: NSLayoutConstraint!
var status:Int?
var isGm:Bool?
var dataArr:Array<WarehouseIoListDataResModel>? = [] var dataArr:Array<WarehouseIoListDataResModel>? = []
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
// Initialization code // Initialization code
} }
override func layoutIfNeeded() { override func layoutIfNeeded() {
detialView.subviews.forEach { (view) in
view.removeFromSuperview()
}
if dataArr != nil { if dataArr != nil {
var num = 0 var num = 0
if dataArr!.count > 4 { if dataArr!.count > 4 {
...@@ -82,6 +88,25 @@ class CRKCell: UITableViewCell { ...@@ -82,6 +88,25 @@ class CRKCell: UITableViewCell {
} }
} }
super.layoutIfNeeded() super.layoutIfNeeded()
if status == 1 && isGm == false {
leftBtn.isHidden = true
rightBtn.isHidden = true
btmH.constant = 15
}else{
if status! > 1 {
rightBtn.isHidden = true
leftBtn.isHidden = false
leftBtn.backgroundColor = UIColor.white
leftBtn.setTitle("查看详情", for: .normal)
leftBtn.setTitleColor(UIColor(named: "蓝色字体颜色"), for: .normal)
leftBtn.isUserInteractionEnabled = false
leftBtn.layer.cornerRadius = 3
leftBtn.layer.masksToBounds = true
leftBtn.layer.borderColor = UIColor(named: "蓝色字体颜色")?.cgColor
leftBtn.layer.borderWidth = 1
}
btmH.constant = 60
}
} }
override func setSelected(_ selected: Bool, animated: Bool) { override func setSelected(_ selected: Bool, animated: Bool) {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
...@@ -73,10 +74,7 @@ ...@@ -73,10 +74,7 @@
<color key="backgroundColor" name="白色背景色"/> <color key="backgroundColor" name="白色背景色"/>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b9u-3C-XDx"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="数量" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b9u-3C-XDx">
<rect key="frame" x="15" y="61" width="307" height="18.5"/> <rect key="frame" x="295" y="63.5" width="27" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="0IJ-F8-53V"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -132,18 +130,17 @@ ...@@ -132,18 +130,17 @@
<constraint firstItem="FEl-Gz-NfW" firstAttribute="top" secondItem="RWk-dO-ESH" secondAttribute="top" constant="15" id="1pe-bO-neq"/> <constraint firstItem="FEl-Gz-NfW" firstAttribute="top" secondItem="RWk-dO-ESH" secondAttribute="top" constant="15" id="1pe-bO-neq"/>
<constraint firstItem="oLa-7N-YOz" firstAttribute="top" secondItem="uLZ-ZH-Ei8" secondAttribute="bottom" id="98X-pk-dIJ"/> <constraint firstItem="oLa-7N-YOz" firstAttribute="top" secondItem="uLZ-ZH-Ei8" secondAttribute="bottom" id="98X-pk-dIJ"/>
<constraint firstItem="Xmr-eU-LIr" firstAttribute="centerY" secondItem="C1r-Lj-aue" secondAttribute="centerY" id="ACb-Mm-FbD"/> <constraint firstItem="Xmr-eU-LIr" firstAttribute="centerY" secondItem="C1r-Lj-aue" secondAttribute="centerY" id="ACb-Mm-FbD"/>
<constraint firstAttribute="bottom" secondItem="oLa-7N-YOz" secondAttribute="bottom" constant="88.5" id="BYB-fc-ezY"/> <constraint firstItem="b9u-3C-XDx" firstAttribute="bottom" secondItem="oLa-7N-YOz" secondAttribute="bottom" constant="28.5" id="BYB-fc-ezY"/>
<constraint firstAttribute="trailing" secondItem="Jiv-tY-lF3" secondAttribute="trailing" constant="15" id="H1o-wf-8S7"/> <constraint firstAttribute="trailing" secondItem="Jiv-tY-lF3" secondAttribute="trailing" constant="15" id="H1o-wf-8S7"/>
<constraint firstAttribute="trailing" secondItem="uLZ-ZH-Ei8" secondAttribute="trailing" id="IsJ-kc-4gZ"/> <constraint firstAttribute="trailing" secondItem="uLZ-ZH-Ei8" secondAttribute="trailing" id="IsJ-kc-4gZ"/>
<constraint firstAttribute="trailing" secondItem="oLa-7N-YOz" secondAttribute="trailing" id="Jhq-n0-Wgl"/> <constraint firstAttribute="trailing" secondItem="oLa-7N-YOz" secondAttribute="trailing" id="Jhq-n0-Wgl"/>
<constraint firstItem="C1r-Lj-aue" firstAttribute="leading" secondItem="FEl-Gz-NfW" secondAttribute="trailing" constant="5" id="LfO-Es-RWl"/> <constraint firstItem="C1r-Lj-aue" firstAttribute="leading" secondItem="FEl-Gz-NfW" secondAttribute="trailing" constant="5" id="LfO-Es-RWl"/>
<constraint firstItem="93P-aM-ST1" firstAttribute="centerY" secondItem="Xmr-eU-LIr" secondAttribute="centerY" id="QFY-ae-VVs"/> <constraint firstItem="93P-aM-ST1" firstAttribute="centerY" secondItem="Xmr-eU-LIr" secondAttribute="centerY" id="QFY-ae-VVs"/>
<constraint firstAttribute="trailing" secondItem="AWh-Nq-y1a" secondAttribute="trailing" id="SOr-Ut-4la"/> <constraint firstAttribute="trailing" secondItem="AWh-Nq-y1a" secondAttribute="trailing" id="SOr-Ut-4la"/>
<constraint firstAttribute="trailing" secondItem="b9u-3C-XDx" secondAttribute="trailing" constant="15" id="SYT-LR-Wyq"/> <constraint firstAttribute="bottom" secondItem="b9u-3C-XDx" secondAttribute="bottom" constant="60" id="VY6-bw-wQ0"/>
<constraint firstItem="b9u-3C-XDx" firstAttribute="top" secondItem="oLa-7N-YOz" secondAttribute="bottom" constant="10" id="YGs-AG-KQt"/> <constraint firstAttribute="trailing" secondItem="b9u-3C-XDx" secondAttribute="trailing" constant="15" id="aPm-BP-xdL"/>
<constraint firstItem="AWh-Nq-y1a" firstAttribute="top" secondItem="RWk-dO-ESH" secondAttribute="top" constant="49" id="ad7-x5-ous"/> <constraint firstItem="AWh-Nq-y1a" firstAttribute="top" secondItem="RWk-dO-ESH" secondAttribute="top" constant="49" id="ad7-x5-ous"/>
<constraint firstItem="uLZ-ZH-Ei8" firstAttribute="leading" secondItem="RWk-dO-ESH" secondAttribute="leading" id="aiT-ou-y2v"/> <constraint firstItem="uLZ-ZH-Ei8" firstAttribute="leading" secondItem="RWk-dO-ESH" secondAttribute="leading" id="aiT-ou-y2v"/>
<constraint firstItem="b9u-3C-XDx" firstAttribute="leading" secondItem="RWk-dO-ESH" secondAttribute="leading" constant="15" id="c0K-jq-RWX"/>
<constraint firstItem="uLZ-ZH-Ei8" firstAttribute="top" secondItem="AWh-Nq-y1a" secondAttribute="bottom" id="hLi-SP-4ql"/> <constraint firstItem="uLZ-ZH-Ei8" firstAttribute="top" secondItem="AWh-Nq-y1a" secondAttribute="bottom" id="hLi-SP-4ql"/>
<constraint firstItem="C1r-Lj-aue" firstAttribute="centerY" secondItem="FEl-Gz-NfW" secondAttribute="centerY" id="j6j-fc-xBS"/> <constraint firstItem="C1r-Lj-aue" firstAttribute="centerY" secondItem="FEl-Gz-NfW" secondAttribute="centerY" id="j6j-fc-xBS"/>
<constraint firstItem="Xmr-eU-LIr" firstAttribute="leading" secondItem="93P-aM-ST1" secondAttribute="trailing" id="jNe-Sq-T4m"/> <constraint firstItem="Xmr-eU-LIr" firstAttribute="leading" secondItem="93P-aM-ST1" secondAttribute="trailing" id="jNe-Sq-T4m"/>
...@@ -175,9 +172,12 @@ ...@@ -175,9 +172,12 @@
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections> <connections>
<outlet property="btmH" destination="VY6-bw-wQ0" id="TUp-7g-nvg"/>
<outlet property="countLbl" destination="b9u-3C-XDx" id="yT9-z9-cgA"/> <outlet property="countLbl" destination="b9u-3C-XDx" id="yT9-z9-cgA"/>
<outlet property="detialView" destination="uLZ-ZH-Ei8" id="EGh-uQ-tHf"/> <outlet property="detialView" destination="uLZ-ZH-Ei8" id="EGh-uQ-tHf"/>
<outlet property="leftBtn" destination="Jiv-tY-lF3" id="f2U-1a-kjI"/>
<outlet property="nameLbl" destination="C1r-Lj-aue" id="LhE-FE-60d"/> <outlet property="nameLbl" destination="C1r-Lj-aue" id="LhE-FE-60d"/>
<outlet property="rightBtn" destination="7d3-0e-5Mj" id="tV2-xz-kLA"/>
<outlet property="statusLbl" destination="93P-aM-ST1" id="ch8-CG-bZc"/> <outlet property="statusLbl" destination="93P-aM-ST1" id="ch8-CG-bZc"/>
<outlet property="statusNameLbl" destination="Xmr-eU-LIr" id="xLJ-gj-9Ck"/> <outlet property="statusNameLbl" destination="Xmr-eU-LIr" id="xLJ-gj-9Ck"/>
<outlet property="timeLbl" destination="65j-rW-XU4" id="pUb-93-V9a"/> <outlet property="timeLbl" destination="65j-rW-XU4" id="pUb-93-V9a"/>
......
...@@ -12,7 +12,7 @@ import ViewAnimator //cell动效 ...@@ -12,7 +12,7 @@ import ViewAnimator //cell动效
class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate { class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate {
var page = 0 var page = 0
var isGm = false
private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)] private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)]
@IBOutlet weak var topBtn: UIButton! @IBOutlet weak var topBtn: UIButton!
...@@ -124,6 +124,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -124,6 +124,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
//MARK: - 通过,不通过方法 //MARK: - 通过,不通过方法
func CRKCellBtnClick(sender: UIButton, cell: CRKCell) { func CRKCellBtnClick(sender: UIButton, cell: CRKCell) {
if sender.tag == 0 {//通过 if sender.tag == 0 {//通过
print("1",cell.tag) print("1",cell.tag)
}else{//不通过 }else{//不通过
...@@ -136,16 +137,21 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -136,16 +137,21 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
//MARK: - 跳转详情 //MARK: - 跳转详情
let model = datas![indexPath.row] let model = datas![indexPath.row]
let vc = CRKXiangQVC() let vc = CRKXiangQVC()
vc.isGm = isGm
vc.model = model vc.model = model
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return datas!.count func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas!.count
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKCell") as! CRKCell let cell = tableView.dequeueReusableCell(withIdentifier: "CRKCell") as!
CRKCell
cell.isGm = isGm
let model = datas![indexPath.row] let model = datas![indexPath.row]
cell.status = model.status
cell.dataArr = model.goods_res cell.dataArr = model.goods_res
cell.delegate = self cell.delegate = self
cell.tag = indexPath.row cell.tag = indexPath.row
...@@ -164,6 +170,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -164,6 +170,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
cell.countLbl.text = "出库总数:" + "\(count)" cell.countLbl.text = "出库总数:" + "\(count)"
} }
cell.timeLbl.text = dayAndTimeByDouble(sender: model.add_time!) cell.timeLbl.text = dayAndTimeByDouble(sender: model.add_time!)
return cell return cell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
...@@ -176,8 +183,13 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -176,8 +183,13 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
num = 4 num = 4
} }
} }
if model.status == 1 && isGm == false {
return 174.5 + CGFloat(num * 49) - 45
}else{
return 174.5 + CGFloat(num * 49) return 174.5 + CGFloat(num * 49)
} }
}
//MARK: - searchView delegate //MARK: - searchView delegate
func clearSearchAction() { func clearSearchAction() {
print("取消搜索代理了--") print("取消搜索代理了--")
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
......
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,NewCKCellDelegate,PiCiXuanZeViewControllerDelegate{ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,NewCKCellDelegate,PiCiXuanZeViewControllerDelegate{
var isGm:Bool?
var piCiArr:Array<GetGoodBatchDataModel> = [] var piCiArr:Array<GetGoodBatchDataModel> = []
@IBOutlet weak var btmView: UIView! @IBOutlet weak var btmView: UIView!
@IBOutlet weak var listView: UITableView! @IBOutlet weak var listView: UITableView!
...@@ -19,32 +19,91 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -19,32 +19,91 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
var inGoodsModels:Array<InGoodsDetailDataGoodsResModel>? = [] var inGoodsModels:Array<InGoodsDetailDataGoodsResModel>? = []
var outGoodsModels:Array<OutGoodsDetailDataGoodsResModel>? = [] var outGoodsModels:Array<OutGoodsDetailDataGoodsResModel>? = []
var ioGoodsModels:Array<IoGoodsDetailDataGoodsResModel>? = []
var titleArr:Array<String>? @IBOutlet weak var btmColor: UIView!
var holderArr:Array<String>? var titleArr:Array<String>? = []
var holderArr:Array<String>? = []
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
let dict = ["user_token":UserToken as Any,"io_id":model?.io_id as Any] let dict = ["user_token":UserToken as Any,"io_id":model?.io_id as Any]
let strs = model!.io_type_cn?.components(separatedBy: ":") let strs = model!.io_type_cn?.components(separatedBy: ":")
let str = strs?.last! as! String let str = strs?.last! as! String
HUD.flash(.progress) if model?.status != 1 || isGm == false{//非审核中状态,不可点击
btmView.isHidden = true
btmColor.isHidden = true
btmViewH.constant = 0
}
if model?.status == 2 {//通过审核
IoGoodsDetail(dict, success: { (data) in
let model = data as! IoGoodsDetailModel
model.data?.goods_res?.forEach({ (item) in
self.ioGoodsModels?.append(item)
})
let data = self.ioGoodsModels?.first
if self.model?.io_type == 1 {
self.titleArr = ["仓库","库位","入库类型","审核人","备注"]
self.holderArr = [(data?.w_name)! as String,(data?.p_name)! as String
,str,(self.model?.auditor)! as String,(model.data?.io_res?.apply_remark)! as String]
self.navbar.title = "商品入库详情"
}else{
self.titleArr = ["出库类型","审核人","备注"]
self.holderArr = [str,(self.model?.auditor)! as String,(model.data?.io_res?.apply_remark)! as String]
self.navbar.title = "商品出库详情"
}
self.listView.reloadData()
}) { (error) in
}
}else if model?.status == 3 {//不通过
IoGoodsDetail(dict, success: { (data) in
let model = data as! IoGoodsDetailModel
model.data?.goods_res?.forEach({ (item) in
self.ioGoodsModels?.append(item)
})
let data = self.ioGoodsModels?.first
if self.model?.io_type == 1 {
self.titleArr = ["入库类型","审核人","备注","未通过原因"]
self.holderArr = [str,(self.model?.auditor)! as String,(model.data?.io_res?.apply_remark)! as String,(model.data?.io_res?.audit_remark)! as String]
self.navbar.title = "商品入库详情"
}else{
self.titleArr = ["出库类型","审核人","备注","未通过原因"]
self.holderArr = [str,(self.model?.auditor)! as String,(model.data?.io_res?.apply_remark)! as String,(model.data?.io_res?.audit_remark)! as String]
self.navbar.title = "商品出库详情"
}
self.listView.reloadData()
}) { (error) in
}
}else{
if model?.io_type == 1 { if model?.io_type == 1 {
titleArr = ["仓库","库位","入库类型"] titleArr = ["仓库","库位","入库类型"]
holderArr = ["默认仓库","默认库位",str] holderArr = ["默认仓库","默认库位",str]
navbar.title = "商品入库详情" navbar.title = "商品入库详情"
InGoodsDetail(dict, success: { (data) in InGoodsDetail(dict, success: { (data) in
let model = data as! InGoodsDetailModel let model = data as! InGoodsDetailModel
model.data?.goods_res?.forEach({ (item) in model.data?.goods_res?.forEach({ (item) in
self.inGoodsModels?.append(item) self.inGoodsModels?.append(item)
}) })
if self.isGm == false {
self.titleArr = ["入库类型","备注"]
self.holderArr = [str,(model.data?.io_res?.apply_remark)! as String]
}
self.listView.reloadData() self.listView.reloadData()
HUD.hide()
}) { (error) in }) { (error) in
} }
} }
if model?.io_type == 2 { if model?.io_type == 2 {
titleArr = ["出库类型","出库日期","出库商品"] titleArr = ["出库类型","出库日期","出库商品"]
...@@ -55,17 +114,22 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -55,17 +114,22 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
model.data?.goods_res!.forEach({ (item) in model.data?.goods_res!.forEach({ (item) in
self.outGoodsModels?.append(item) self.outGoodsModels?.append(item)
}) })
if self.isGm == false {
self.titleArr = ["出库类型","备注"]
self.holderArr = [str,(model.data?.io_res?.apply_remark)! as String]
}
self.listView.reloadData() self.listView.reloadData()
HUD.hide()
}) { (error) in }) { (error) in
} }
} }
}
self.view.addSubview(navbar) self.view.addSubview(navbar)
listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell") listView.register(UINib(nibName: "CRKBtnCell", bundle: nil), forCellReuseIdentifier: "CRKBtnCell")
listView.separatorStyle = .none listView.separatorStyle = .none
SetTopFrameView(view: listView, btmView: btmView) SetTopFrameView(view: listView, btmView: btmView)
listView.register(UINib(nibName: "NewCKCell", bundle: nil), forCellReuseIdentifier: "NewCKCell") listView.register(UINib(nibName: "NewCKCell", bundle: nil), forCellReuseIdentifier: "NewCKCell")
listView.register(UINib(nibName: "NewRKCell", bundle: nil), forCellReuseIdentifier: "NewRKCell")
} }
...@@ -89,9 +153,16 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -89,9 +153,16 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 { if section == 0 {
return 3 return titleArr!.count
}
if (model?.status)! > 1 {
return ioGoodsModels!.count
}
if model?.io_type == 1 {
return inGoodsModels!.count
} }
return (model?.goods_res?.count)! return outGoodsModels!.count
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
...@@ -109,10 +180,69 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -109,10 +180,69 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
} }
return cell return cell
} }
if model?.io_type == 1 { //入库
if model?.io_type == 1 || (model?.status!)! > 1 { //入库
let cell = tableView.dequeueReusableCell(withIdentifier: "NewRKCell") as! NewRKCell
if inGoodsModels!.count > 0 || ioGoodsModels!.count > 0{
if self.model!.status! > 1 {
let data = ioGoodsModels![indexPath.row]
cell.nameLbl.text = data.goods_name
cell.guiGe.text = data.goods_spec
cell.rukuShu.text = "入库数量:" + "\(data.number!)"
cell.scrq.text = "生产日期:" + dayByDouble(sender: data.production_data!)
cell.gqrq.text = "过期日期:" + dayByDouble(sender:data.valid_date!)
cell.rkjg.text = "入库价格:¥" + data.amount!
cell.rkzj.text = "入库总价:¥" + data.subtotal!
cell.baozhiQ.text = "保质期:" + "\(data.shelf_life!)天"
cell.baogao.text = "报告:无"
if data.report_sn != nil {
cell.baogao.text = "报告:" + "\(data.report_sn!)"
}
return cell
}else{
let model = inGoodsModels![indexPath.row]
cell.nameLbl.text = model.goods_name
cell.guiGe.text = model.goods_spec
cell.rukuShu.text = "入库数量:" + "\(model.number!)"
cell.scrq.text = "生产日期:" + dayByDouble(sender: model.production_data!)
cell.gqrq.text = "过期日期:" + dayByDouble(sender: model.valid_date!)
cell.rkjg.text = "入库价格:¥" + "\(model.amount!)"
cell.rkzj.text = "入库总价:¥" + "\(model.subtotal!)"
cell.baozhiQ.text = "保质期:" + "\(model.shelf_life!)天"
cell.baogao.text = "报告:无"
if model.report_sn != nil {
cell.baogao.text = "报告:" + "\(model.report_sn!)"
}
return cell
}
} }
}
if isGm == false {
let cell = tableView.dequeueReusableCell(withIdentifier: "NewRKCell") as! NewRKCell
let model = outGoodsModels![indexPath.row]
cell.nameLbl.text = model.goods_name
cell.guiGe.text = model.goods_spec
cell.rukuShu.text = "仓库名:---"
if model.w_name != nil {
cell.rukuShu.text = "仓库名:" + "\(model.w_name!)"
}
cell.scrq.text = "生产日期:" + dayByDouble(sender: model.production_data!)
cell.gqrq.text = "过期日期:" + dayByDouble(sender: model.valid_date!)
cell.rkjg.text = "库位名:---"
if model.p_name != nil {
cell.rkjg.text = "库位名:" + "\(model.p_name!)"
}
cell.rkzj.text = "保质期:" + "\(model.shelf_life!)天"
cell.baozhiQ.text = "报告:无"
if model.report_sn != nil {
cell.baozhiQ.text = "报告:" + "\(model.report_sn!)"
}
cell.baogao.isHidden = true
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "NewCKCell") as! NewCKCell let cell = tableView.dequeueReusableCell(withIdentifier: "NewCKCell") as! NewCKCell
cell.delegate = self cell.delegate = self
cell.tag = indexPath.row cell.tag = indexPath.row
...@@ -156,6 +286,12 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource, ...@@ -156,6 +286,12 @@ class CRKXiangQVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,
if model?.io_type == 1 {//入库 if model?.io_type == 1 {//入库
return 264 return 264
} }
if (model?.status)! > 1 {
return 264
}
if isGm == false {
return 264
}
if piCiArr.count > 0 { if piCiArr.count > 0 {
return CGFloat(214 + 35 + piCiArr.count * 43) return CGFloat(214 + 35 + piCiArr.count * 43)
}else{ }else{
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
...@@ -10,6 +11,7 @@ ...@@ -10,6 +11,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CRKXiangQVC" customModule="TestClass" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CRKXiangQVC" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="btmColor" destination="WaS-5d-gVj" id="eLi-c1-v7O"/>
<outlet property="btmView" destination="EBn-Ps-D90" id="WGL-Ly-iBo"/> <outlet property="btmView" destination="EBn-Ps-D90" id="WGL-Ly-iBo"/>
<outlet property="btmViewH" destination="9Zg-jL-ofh" id="NLT-V0-Qye"/> <outlet property="btmViewH" destination="9Zg-jL-ofh" id="NLT-V0-Qye"/>
<outlet property="listView" destination="w5k-1L-VKh" id="Y7w-Rk-zRm"/> <outlet property="listView" destination="w5k-1L-VKh" id="Y7w-Rk-zRm"/>
......
...@@ -10,6 +10,15 @@ import UIKit ...@@ -10,6 +10,15 @@ import UIKit
class NewRKCell: UITableViewCell { class NewRKCell: UITableViewCell {
@IBOutlet weak var baogao: UILabel!
@IBOutlet weak var rkzj: UILabel!
@IBOutlet weak var gqrq: UILabel!
@IBOutlet weak var rkjg: UILabel!
@IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var guiGe: UILabel!
@IBOutlet weak var baozhiQ: UILabel!
@IBOutlet weak var rukuShu: UILabel!
@IBOutlet weak var scrq: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
......
...@@ -40,14 +40,156 @@ ...@@ -40,14 +40,156 @@
<constraint firstAttribute="height" constant="1" id="IyY-OQ-Mdt"/> <constraint firstAttribute="height" constant="1" id="IyY-OQ-Mdt"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lj5-Mb-C9e">
<rect key="frame" x="172" y="65" width="1" height="20"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="CI2-k7-07c"/>
<constraint firstAttribute="height" constant="20" id="i8w-kC-EsH"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JKO-tV-H9B">
<rect key="frame" x="15" y="65" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nOp-YD-cpI">
<rect key="frame" x="188" y="65" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I6G-xu-wpE">
<rect key="frame" x="15" y="99" width="315" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="A3q-bK-Ouj"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Rc-US-JnT">
<rect key="frame" x="172" y="115" width="1" height="20"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="4qK-WB-fC1"/>
<constraint firstAttribute="width" constant="1" id="A2l-Cf-VoX"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bic-P2-HL8">
<rect key="frame" x="15" y="115" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Kz-gN-GMZ">
<rect key="frame" x="188" y="115" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x0h-5q-GA1">
<rect key="frame" x="15" y="149" width="315" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="iEp-4q-NJL"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iwO-yB-ZhI">
<rect key="frame" x="172" y="165" width="1" height="20"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="WGw-6F-CCb"/>
<constraint firstAttribute="width" constant="1" id="jaQ-WL-im6"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QRv-d2-EeB">
<rect key="frame" x="15" y="165" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OEe-w4-yCp">
<rect key="frame" x="188" y="165" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qkx-Dl-3Ez">
<rect key="frame" x="15" y="199" width="315" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="hiZ-FJ-Rez"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oSJ-CB-VC4">
<rect key="frame" x="172" y="215" width="1" height="20"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="knN-f7-WAo"/>
<constraint firstAttribute="height" constant="20" id="o1G-0e-FRg"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yiE-6M-zSZ">
<rect key="frame" x="15" y="215" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Gc-bl-ZRI">
<rect key="frame" x="188" y="215" width="142" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="个人中心灰色字体"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints> <constraints>
<constraint firstItem="yiE-6M-zSZ" firstAttribute="top" secondItem="qkx-Dl-3Ez" secondAttribute="bottom" constant="15" id="0OQ-xg-XXW"/>
<constraint firstItem="lj5-Mb-C9e" firstAttribute="top" secondItem="oaS-sH-AUl" secondAttribute="bottom" constant="15" id="0eZ-UH-8YC"/>
<constraint firstItem="lUj-PO-NbV" firstAttribute="top" secondItem="mgx-Me-Rl0" secondAttribute="top" constant="15" id="2Cc-ES-Egr"/> <constraint firstItem="lUj-PO-NbV" firstAttribute="top" secondItem="mgx-Me-Rl0" secondAttribute="top" constant="15" id="2Cc-ES-Egr"/>
<constraint firstItem="I6G-xu-wpE" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="2xx-Jp-Vdx"/>
<constraint firstItem="OEe-w4-yCp" firstAttribute="leading" secondItem="iwO-yB-ZhI" secondAttribute="trailing" constant="15" id="3V0-8y-PTZ"/>
<constraint firstItem="7Gc-bl-ZRI" firstAttribute="leading" secondItem="oSJ-CB-VC4" secondAttribute="trailing" constant="15" id="75I-OR-ZHW"/>
<constraint firstItem="lj5-Mb-C9e" firstAttribute="centerX" secondItem="mgx-Me-Rl0" secondAttribute="centerX" id="8JL-OJ-xH6"/>
<constraint firstAttribute="trailing" secondItem="I6G-xu-wpE" secondAttribute="trailing" constant="15" id="9ZQ-88-Oj5"/>
<constraint firstAttribute="trailing" secondItem="lUj-PO-NbV" secondAttribute="trailing" constant="15" id="CaC-XB-nEX"/> <constraint firstAttribute="trailing" secondItem="lUj-PO-NbV" secondAttribute="trailing" constant="15" id="CaC-XB-nEX"/>
<constraint firstItem="7Kz-gN-GMZ" firstAttribute="top" secondItem="I6G-xu-wpE" secondAttribute="bottom" constant="15" id="Ckw-Ee-2ym"/>
<constraint firstItem="6Rc-US-JnT" firstAttribute="leading" secondItem="bic-P2-HL8" secondAttribute="trailing" constant="15" id="Csj-Fh-5a5"/>
<constraint firstItem="QRv-d2-EeB" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="DYG-aW-rtF"/>
<constraint firstItem="I6G-xu-wpE" firstAttribute="bottom" secondItem="lj5-Mb-C9e" secondAttribute="bottom" constant="15" id="DiT-jh-g6C"/>
<constraint firstItem="nOp-YD-cpI" firstAttribute="top" secondItem="oaS-sH-AUl" secondAttribute="bottom" constant="15" id="EZc-5E-N97"/>
<constraint firstItem="x0h-5q-GA1" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="EvN-zZ-uLu"/>
<constraint firstItem="JKO-tV-H9B" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="FIM-5u-XK2"/>
<constraint firstItem="iwO-yB-ZhI" firstAttribute="leading" secondItem="QRv-d2-EeB" secondAttribute="trailing" constant="15" id="JnM-B6-mdT"/>
<constraint firstItem="oSJ-CB-VC4" firstAttribute="leading" secondItem="yiE-6M-zSZ" secondAttribute="trailing" constant="15" id="MEt-Lh-8nq"/>
<constraint firstItem="iwO-yB-ZhI" firstAttribute="centerX" secondItem="mgx-Me-Rl0" secondAttribute="centerX" id="QdQ-77-SpU"/>
<constraint firstItem="oaS-sH-AUl" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="R3o-qb-WIU"/> <constraint firstItem="oaS-sH-AUl" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="R3o-qb-WIU"/>
<constraint firstAttribute="trailing" secondItem="qkx-Dl-3Ez" secondAttribute="trailing" constant="15" id="RSc-df-bD1"/>
<constraint firstItem="6Rc-US-JnT" firstAttribute="centerX" secondItem="mgx-Me-Rl0" secondAttribute="centerX" id="Rea-Zo-jPZ"/>
<constraint firstAttribute="trailing" secondItem="oaS-sH-AUl" secondAttribute="trailing" id="UC8-BN-19a"/> <constraint firstAttribute="trailing" secondItem="oaS-sH-AUl" secondAttribute="trailing" id="UC8-BN-19a"/>
<constraint firstItem="oaS-sH-AUl" firstAttribute="top" secondItem="mgx-Me-Rl0" secondAttribute="top" constant="49" id="Uti-r7-2gm"/> <constraint firstItem="oaS-sH-AUl" firstAttribute="top" secondItem="mgx-Me-Rl0" secondAttribute="top" constant="49" id="Uti-r7-2gm"/>
<constraint firstAttribute="trailing" secondItem="7Kz-gN-GMZ" secondAttribute="trailing" constant="15" id="Y8B-KZ-Sl9"/>
<constraint firstAttribute="trailing" secondItem="7Gc-bl-ZRI" secondAttribute="trailing" constant="15" id="YAO-gA-zQo"/>
<constraint firstItem="QRv-d2-EeB" firstAttribute="top" secondItem="x0h-5q-GA1" secondAttribute="bottom" constant="15" id="YlI-5t-mRb"/>
<constraint firstItem="yiE-6M-zSZ" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="Yv1-aX-N8N"/>
<constraint firstItem="oSJ-CB-VC4" firstAttribute="centerX" secondItem="mgx-Me-Rl0" secondAttribute="centerX" id="Z41-1Y-ILZ"/>
<constraint firstAttribute="trailing" secondItem="nOp-YD-cpI" secondAttribute="trailing" constant="15" id="aEC-7z-TA9"/>
<constraint firstItem="x0h-5q-GA1" firstAttribute="bottom" secondItem="6Rc-US-JnT" secondAttribute="bottom" constant="15" id="b9w-LL-lQI"/>
<constraint firstItem="bic-P2-HL8" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="bef-sr-H0Q"/>
<constraint firstItem="qkx-Dl-3Ez" firstAttribute="bottom" secondItem="iwO-yB-ZhI" secondAttribute="bottom" constant="15" id="cH0-AV-w6P"/>
<constraint firstItem="oSJ-CB-VC4" firstAttribute="top" secondItem="qkx-Dl-3Ez" secondAttribute="bottom" constant="15" id="cOo-Bn-d7C"/>
<constraint firstItem="OEe-w4-yCp" firstAttribute="top" secondItem="x0h-5q-GA1" secondAttribute="bottom" constant="15" id="eSU-eK-iek"/>
<constraint firstItem="7Gc-bl-ZRI" firstAttribute="top" secondItem="qkx-Dl-3Ez" secondAttribute="bottom" constant="15" id="f0W-fd-B1V"/>
<constraint firstItem="JKO-tV-H9B" firstAttribute="top" secondItem="oaS-sH-AUl" secondAttribute="bottom" constant="15" id="f50-Bl-pMX"/>
<constraint firstAttribute="trailing" secondItem="OEe-w4-yCp" secondAttribute="trailing" constant="15" id="fXy-1a-0A3"/>
<constraint firstItem="qkx-Dl-3Ez" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="iAC-pE-KCB"/>
<constraint firstItem="iwO-yB-ZhI" firstAttribute="top" secondItem="x0h-5q-GA1" secondAttribute="bottom" constant="15" id="jOs-yM-dIK"/>
<constraint firstAttribute="trailing" secondItem="x0h-5q-GA1" secondAttribute="trailing" constant="15" id="l4e-YW-AMw"/>
<constraint firstItem="bic-P2-HL8" firstAttribute="top" secondItem="I6G-xu-wpE" secondAttribute="bottom" constant="15" id="leq-Kg-MY4"/>
<constraint firstItem="lj5-Mb-C9e" firstAttribute="leading" secondItem="JKO-tV-H9B" secondAttribute="trailing" constant="15" id="mfF-mD-bfG"/>
<constraint firstItem="6Rc-US-JnT" firstAttribute="top" secondItem="I6G-xu-wpE" secondAttribute="bottom" constant="15" id="rdm-Mv-20R"/>
<constraint firstItem="7Kz-gN-GMZ" firstAttribute="leading" secondItem="6Rc-US-JnT" secondAttribute="trailing" constant="15" id="t7W-2e-yTZ"/>
<constraint firstItem="nOp-YD-cpI" firstAttribute="leading" secondItem="lj5-Mb-C9e" secondAttribute="trailing" constant="15" id="xNy-nM-6Xz"/>
<constraint firstItem="lUj-PO-NbV" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="xWs-xw-v1W"/> <constraint firstItem="lUj-PO-NbV" firstAttribute="leading" secondItem="mgx-Me-Rl0" secondAttribute="leading" constant="15" id="xWs-xw-v1W"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
...@@ -66,6 +208,17 @@ ...@@ -66,6 +208,17 @@
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="baogao" destination="7Gc-bl-ZRI" id="5Fu-dg-XlH"/>
<outlet property="baozhiQ" destination="yiE-6M-zSZ" id="wtG-GR-v4E"/>
<outlet property="gqrq" destination="QRv-d2-EeB" id="C2M-hO-OXp"/>
<outlet property="guiGe" destination="JKO-tV-H9B" id="IV8-y3-lhT"/>
<outlet property="nameLbl" destination="lUj-PO-NbV" id="lxc-dd-qQ7"/>
<outlet property="rkjg" destination="7Kz-gN-GMZ" id="dxL-Ks-BB2"/>
<outlet property="rkzj" destination="OEe-w4-yCp" id="ABZ-VX-Agb"/>
<outlet property="rukuShu" destination="nOp-YD-cpI" id="kUO-Un-hZP"/>
<outlet property="scrq" destination="bic-P2-HL8" id="Vry-2O-147"/>
</connections>
<point key="canvasLocation" x="132.60869565217394" y="111.83035714285714"/> <point key="canvasLocation" x="132.60869565217394" y="111.83035714285714"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
...@@ -73,6 +226,9 @@ ...@@ -73,6 +226,9 @@
<namedColor name="app底色"> <namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.3919999897480011" green="0.3919999897480011" blue="0.3919999897480011" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
...@@ -384,15 +384,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -384,15 +384,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
case "入库": case "入库":
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
return return
// let vc = RuKuViewController() // let vc = RuKuViewController()
// vc.barTitle = "入库" // vc.barTitle = "入库"
// self.navigationController?.pushViewController(vc, animated: true) // self.navigationController?.pushViewController(vc, animated: true)
break break
case "出库": case "出库":
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
return return
// let vc = ChuKuViewController() // let vc = ChuKuViewController()
// self.navigationController?.pushViewController(vc, animated: true) // self.navigationController?.pushViewController(vc, animated: true)
break break
case "上架": case "上架":
//提示是否上架 //提示是否上架
...@@ -609,19 +609,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -609,19 +609,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
if model.data?.goods_res?.set_time != nil { if model.data?.goods_res?.set_time != nil {
self.faHuoTime = "\(model.data!.goods_res!.set_time!)" self.faHuoTime = "\(model.data!.goods_res!.set_time!)"
} }
//商品主图
self.maxFiveImgsArr.removeAll()
for item in model.data!.banner_res! {
self.maxFiveImgsArr.append(item.img_original!)
}
//商品附图 //商品附图
self.maxFiveImgsArr.removeAll()
let imgArr = model.data?.banner_res! let imgArr = model.data?.banner_res!
if imgArr!.count > 0 { if imgArr!.count > 0 {
for i in 0 ..< imgArr!.count { for i in 0 ..< imgArr!.count {
if i < 5 { if i < 5 {
let imgData = imgArr![i] let imgData = imgArr![i]
self.maxFiveImgsArr.append(imgData.img_original!)
self.goods_banner?.insert(imgData.img_original!, at: i) self.goods_banner?.insert(imgData.img_original!, at: i)
self.goods_banner?.remove(at: i+1) self.goods_banner?.remove(at: i+1)
} }
} }
} }
......
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