Commit a3fcb8d9 authored by lujunye's avatar lujunye

调整出入库列表,详情

parent 8462c71b
......@@ -2,7 +2,7 @@
"images" : [
{
"extent" : "full-screen",
"filename" : "1242*2688@1x.png",
"filename" : "1242*2688.png",
"idiom" : "iphone",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
......@@ -19,7 +19,7 @@
},
{
"extent" : "full-screen",
"filename" : "828*1792@1x.png",
"filename" : "828*1792.png",
"idiom" : "iphone",
"minimum-system-version" : "12.0",
"orientation" : "portrait",
......@@ -36,7 +36,7 @@
},
{
"extent" : "full-screen",
"filename" : "1125*2436@1x.png",
"filename" : "1125*2436.png",
"idiom" : "iphone",
"minimum-system-version" : "11.0",
"orientation" : "portrait",
......@@ -70,7 +70,7 @@
},
{
"extent" : "full-screen",
"filename" : "750*1334@1x.png",
"filename" : "750*1334.png",
"idiom" : "iphone",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
......
......@@ -122,6 +122,8 @@
<string>Warehouse/warehouseIoList</string>
<key>查看出入库单详情(已审核)</key>
<string>Warehouse/IoGoodsDetail</string>
<key>商品入库审核详情(未审核状态)</key>
<string>Warehouse/InGoodsDetail</string>
<key>商品出库审核详情(未审核状态)</key>
<string>Warehouse/OutGoodsDetail</string>
<key>手机号登录</key>
......
......@@ -12,7 +12,7 @@ import ObjectMapper
class IoGoodsDetailModel: Mappable {
var code:Int?
var message : String?
var data : Array<IoGoodsDetailDataModel>?
var data : IoGoodsDetailDataModel?
required init?( map: Map) {
......@@ -55,23 +55,23 @@ class IoGoodsDetailDataIoResModel: Mappable {
class IoGoodsDetailDataGoodsResModel: Mappable {
var iog_id:Int?
var sku_id : String?//商品sku_id
var goods_name:Int? //商品名
var sku_id : Int?//商品sku_id
var goods_name:String? //商品名
var goods_spec : String?//商品规格
var number:Int?//数量
var production_data : String? //生产日期
var valid_date:Int? //过期时间
var shelf_life : String? //保质期(单位:天)
var production_data : Double? //生产日期
var valid_date:Double? //过期时间
var shelf_life : Int? //保质期(单位:天)
var report_id:Int? //商品报告id
var amount : String?
var subtotal:Int?
var subtotal:String?
var report_sn : String? //商品报告sn
var file_url:String?//商品报告文件
var w_name : String?//仓库
var p_name:Int?//仓库
var p_name:String?//库位
......
......@@ -67,6 +67,11 @@ class OutGoodsDetailDataGoodsResModel: Mappable {
var batch_id : Int?
var inventory : Int?
var p_name:String?
var w_name:String?
var file_url:String?
var report_sn:String?
required init?( map: Map) {
}
......
......@@ -83,16 +83,30 @@ class AddImgCell: UITableViewCell {
addBtn.isHidden = true
}
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: CGFloat(arr.count)*105, height:h)
addBtnX.constant = (scrollView?.frame.maxX)!
if isAllEditing {
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: CGFloat(arr.count)*105, height:h)
addBtnX.constant = (scrollView?.frame.maxX)!
}else{
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30,height:h)
}
}else if arr.count == 5 {
addBtn.isHidden = true
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30, height:h)
if isAllEditing {
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-30, height:h)
}else{
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)
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)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: fullScreenWidth-130, height:h)
addBtnX.constant = fullScreenWidth-105
}
}
for i in 0 ..< arr.count {
......
......@@ -16,22 +16,28 @@ class CRKCell: UITableViewCell {
@IBAction func btnClick(_ sender: UIButton) {
delegate?.CRKCellBtnClick(sender: sender,cell:self)
}
@IBOutlet weak var rightBtn: UIButton!
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var timeLbl: UILabel!
@IBOutlet weak var countLbl: UILabel!
@IBOutlet weak var statusNameLbl: UILabel!
@IBOutlet weak var statusLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel!
@IBOutlet weak var btmH: NSLayoutConstraint!
var status:Int?
var isGm:Bool?
var dataArr:Array<WarehouseIoListDataResModel>? = []
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func layoutIfNeeded() {
detialView.subviews.forEach { (view) in
view.removeFromSuperview()
}
if dataArr != nil {
var num = 0
if dataArr!.count > 4 {
......@@ -82,8 +88,27 @@ class CRKCell: UITableViewCell {
}
}
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) {
super.setSelected(selected, animated: animated)
......
......@@ -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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......@@ -73,10 +74,7 @@
<color key="backgroundColor" name="白色背景色"/>
</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">
<rect key="frame" x="15" y="61" width="307" height="18.5"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="0IJ-F8-53V"/>
</constraints>
<rect key="frame" x="295" y="63.5" width="27" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
......@@ -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="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 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="uLZ-ZH-Ei8" secondAttribute="trailing" id="IsJ-kc-4gZ"/>
<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="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="b9u-3C-XDx" secondAttribute="trailing" constant="15" id="SYT-LR-Wyq"/>
<constraint firstItem="b9u-3C-XDx" firstAttribute="top" secondItem="oLa-7N-YOz" secondAttribute="bottom" constant="10" id="YGs-AG-KQt"/>
<constraint firstAttribute="bottom" secondItem="b9u-3C-XDx" secondAttribute="bottom" constant="60" id="VY6-bw-wQ0"/>
<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="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="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"/>
......@@ -175,9 +172,12 @@
<color key="backgroundColor" name="app底色"/>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<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="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="rightBtn" destination="7d3-0e-5Mj" id="tV2-xz-kLA"/>
<outlet property="statusLbl" destination="93P-aM-ST1" id="ch8-CG-bZc"/>
<outlet property="statusNameLbl" destination="Xmr-eU-LIr" id="xLJ-gj-9Ck"/>
<outlet property="timeLbl" destination="65j-rW-XU4" id="pUb-93-V9a"/>
......
......@@ -12,7 +12,7 @@ import ViewAnimator //cell动效
class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate {
var page = 0
var isGm = false
private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)]
@IBOutlet weak var topBtn: UIButton!
......@@ -124,6 +124,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
//MARK: - 通过,不通过方法
func CRKCellBtnClick(sender: UIButton, cell: CRKCell) {
if sender.tag == 0 {//通过
print("1",cell.tag)
}else{//不通过
......@@ -136,16 +137,21 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
//MARK: - 跳转详情
let model = datas![indexPath.row]
let vc = CRKXiangQVC()
vc.isGm = isGm
vc.model = model
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 {
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKCell") as! CRKCell
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKCell") as!
CRKCell
cell.isGm = isGm
let model = datas![indexPath.row]
cell.status = model.status
cell.dataArr = model.goods_res
cell.delegate = self
cell.tag = indexPath.row
......@@ -164,6 +170,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
cell.countLbl.text = "出库总数:" + "\(count)"
}
cell.timeLbl.text = dayAndTimeByDouble(sender: model.add_time!)
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
......@@ -176,7 +183,12 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
num = 4
}
}
return 174.5 + CGFloat(num * 49)
if model.status == 1 && isGm == false {
return 174.5 + CGFloat(num * 49) - 45
}else{
return 174.5 + CGFloat(num * 49)
}
}
//MARK: - searchView delegate
func clearSearchAction() {
......
......@@ -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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......
......@@ -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">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
......@@ -10,6 +11,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CRKXiangQVC" customModule="TestClass" customModuleProvider="target">
<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="btmViewH" destination="9Zg-jL-ofh" id="NLT-V0-Qye"/>
<outlet property="listView" destination="w5k-1L-VKh" id="Y7w-Rk-zRm"/>
......
......@@ -10,6 +10,15 @@ import UIKit
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() {
super.awakeFromNib()
self.selectionStyle = .none
......
......@@ -384,15 +384,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
case "入库":
HUD.flash(.label("敬请期待"),delay: 1.2)
return
// let vc = RuKuViewController()
// vc.barTitle = "入库"
// self.navigationController?.pushViewController(vc, animated: true)
// let vc = RuKuViewController()
// vc.barTitle = "入库"
// self.navigationController?.pushViewController(vc, animated: true)
break
case "出库":
HUD.flash(.label("敬请期待"),delay: 1.2)
return
// let vc = ChuKuViewController()
// self.navigationController?.pushViewController(vc, animated: true)
// let vc = ChuKuViewController()
// self.navigationController?.pushViewController(vc, animated: true)
break
case "上架":
//提示是否上架
......@@ -505,10 +505,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
self.pinPai_id = (model.data?.goods_res!.brand_id)!
if (model.data?.goods_res!.brand_name) != nil{
self.pinPai = (model.data?.goods_res!.brand_name)!
}else{
self.pinPai = ""
}
self.tishixxArr.insert(self.pinPai, at: 3)
self.tishixxArr.remove(at: 4)
......@@ -609,19 +609,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
if model.data?.goods_res?.set_time != nil {
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!
if imgArr!.count > 0 {
for i in 0 ..< imgArr!.count {
if i < 5 {
let imgData = imgArr![i]
self.maxFiveImgsArr.append(imgData.img_original!)
self.goods_banner?.insert(imgData.img_original!, at: i)
self.goods_banner?.remove(at: i+1)
}
}
}
......@@ -697,7 +696,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
func getResponseArr(str:String)->Array<String>{
let dict = getDictionaryFromJSONString(jsonString: str)
var arr:Array<String> = []
for key in dict.allKeys{
......
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