Commit f671323e authored by lujunye's avatar lujunye

点击查看大图

parent 2f5b1dcc
...@@ -273,6 +273,36 @@ class OrderDetailSaleResModel: Mappable { ...@@ -273,6 +273,36 @@ class OrderDetailSaleResModel: Mappable {
wk_pay_type_cn <- map["wk_pay_type_cn"] wk_pay_type_cn <- map["wk_pay_type_cn"]
} }
}
class OrderDetailGoodsSourceModel: Mappable {
var ven_id:Int?//供应商的ven_id
var batch_id : Int?//产品批次号
var add_time : String? //入库时间
var production_data : String? //生产日期
var valid_date : String? //有效日期
var report_id:Int?//检测报告id
var ven_name : String? //供应商名称
var report_picture : String?//检测报告
var product_origin : String? //产品产地
required init?( map: Map) {
}
func mapping(map: Map) {
ven_id <- map["ven_id"]
batch_id <- map["batch_id"]
add_time <- map["add_time"]
production_data <- map["production_data"]
valid_date <- map["valid_date"]
report_id <- map["report_id"]
ven_name <- map["ven_name"]
report_picture <- map["report_picture"]
product_origin <- map["product_origin"]
}
} }
class OrderDetailGoodsModel: Mappable { class OrderDetailGoodsModel: Mappable {
...@@ -289,11 +319,13 @@ class OrderDetailGoodsModel: Mappable { ...@@ -289,11 +319,13 @@ class OrderDetailGoodsModel: Mappable {
var is_edit : Int? = 0 //订单商品是否有修改,1是0非--前端自主添加的字段 var is_edit : Int? = 0 //订单商品是否有修改,1是0非--前端自主添加的字段
var commission_val:String? //这个商品的总佣金 var commission_val:String? //这个商品的总佣金
var remark:String?//商品备注 var remark:String?//商品备注
var goods_source:OrderDetailGoodsSourceModel?//溯源信息
required init?( map: Map) { required init?( map: Map) {
} }
func mapping(map: Map) { func mapping(map: Map) {
commission_val <- map["commission_val"] commission_val <- map["commission_val"]
goods_source <- map["goods_source"]
og_id <- map["og_id"] og_id <- map["og_id"]
goods_id <- map["goods_id"] goods_id <- map["goods_id"]
goods_name <- map["goods_name"] goods_name <- map["goods_name"]
......
...@@ -137,6 +137,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega ...@@ -137,6 +137,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
pageIndicator?.reloadData(numberOfItems: numberOfItems(), pageIndex: pageIndex) pageIndicator?.reloadData(numberOfItems: numberOfItems(), pageIndex: pageIndex)
} }
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
open override func viewDidLoad() { open override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -156,6 +157,11 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega ...@@ -156,6 +157,11 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
self.didChangedPageIndex(index) self.didChangedPageIndex(index)
} }
lbl.text = "返回"
lbl.textColor = UIColor.white
view.addSubview(lbl)
view.setNeedsLayout() view.setNeedsLayout()
view.layoutIfNeeded() view.layoutIfNeeded()
} }
...@@ -279,6 +285,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega ...@@ -279,6 +285,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
deinit { deinit {
JXPhotoBrowserLog.low("deinit - \(self.classForCoder)") JXPhotoBrowserLog.low("deinit - \(self.classForCoder)")
lbl.removeFromSuperview()
navigationController?.delegate = previousNavigationControllerDelegate navigationController?.delegate = previousNavigationControllerDelegate
} }
......
...@@ -388,7 +388,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo ...@@ -388,7 +388,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
if isGm { if isGm {
let arr = piCiArr![indexPath.row] let arr = piCiArr![indexPath.row]
if arr.count > 0 { if arr.count > 0 {
return CGFloat(140 + arr.count * 30 + 35) return CGFloat(140 + arr.count * 30 + 40)
}else{ }else{
return 140 return 140
} }
......
...@@ -9,10 +9,29 @@ ...@@ -9,10 +9,29 @@
import UIKit import UIKit
class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate{ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate{
func S_Y_View_Check_Detail() { func S_Y_View_Check_Detail(view: S_Y_View) {
print("查看溯源") print("查看溯源")
if view.data == nil {
return
}
let browser = JXPhotoBrowser()
browser.numberOfItems = {
1
}
browser.pageIndex = 0
browser.reloadCellAtIndex = { context in
let browserCell = context.cell as? JXPhotoBrowserImageCell
let url = URL(string:SERVERCE_ImageHost + (view.data?.report_picture)!)
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
browserCell?.setNeedsLayout()
})
}
browser.show()
} }
func DaiKeXiaDanGouWuCellDelAction(cell: DaiKeXiaDanGouWuCell) { func DaiKeXiaDanGouWuCellDelAction(cell: DaiKeXiaDanGouWuCell) {
//此处无用 //此处无用
} }
...@@ -26,6 +45,10 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate, ...@@ -26,6 +45,10 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
print("check S_Y") print("check S_Y")
let vc = S_Y_View(frame: self.view.bounds) let vc = S_Y_View(frame: self.view.bounds)
vc.delegate = self vc.delegate = self
if (dataMdoel?.order_goods!.count)! > 0 {
let target = dataMdoel?.order_goods![cell.tag]
vc.data = target?.goods_source
}
self.view.addSubview(vc) self.view.addSubview(vc)
} }
......
...@@ -148,13 +148,15 @@ class RetailManageViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -148,13 +148,15 @@ class RetailManageViewController: BaseViewController,UITableViewDelegate,UITable
if self.title == "代销订单" { if self.title == "代销订单" {
let vc = RetailManageDetailViewController() let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[indexPath.section] let goodArrModel = self.dataArr[indexPath.section]
vc.orderId = goodArrModel.order_id // vc.orderId = goodArrModel.order_id
vc.orderId = 12637
vc.dbt_shop_id = goodArrModel.shop_id vc.dbt_shop_id = goodArrModel.shop_id
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
}else{ }else{
let vc = RetailManageDetailViewController() let vc = RetailManageDetailViewController()
let goodArrModel = self.dataArr[indexPath.section] let goodArrModel = self.dataArr[indexPath.section]
vc.orderId = goodArrModel.order_id // vc.orderId = goodArrModel.order_id
vc.orderId = 12637
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
......
...@@ -38,10 +38,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -38,10 +38,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let browserCell = context.cell as? JXPhotoBrowserImageCell let browserCell = context.cell as? JXPhotoBrowserImageCell
let url = URL(string:SERVERCE_ImageHost + cell.imgs[context.index]) let url = URL(string:SERVERCE_ImageHost + cell.imgs[context.index])
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
lbl.text = "返回"
lbl.textColor = UIColor.white
browserCell?.scrollView.addSubview(lbl)
browserCell?.setNeedsLayout() browserCell?.setNeedsLayout()
}) })
} }
......
...@@ -80,10 +80,7 @@ class ShopInfoViewController: BaseViewController { ...@@ -80,10 +80,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载 // 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
lbl.text = "返回"
lbl.textColor = UIColor.white
browserCell?.scrollView.addSubview(lbl)
browserCell?.setNeedsLayout() browserCell?.setNeedsLayout()
}) })
} }
...@@ -95,10 +92,7 @@ class ShopInfoViewController: BaseViewController { ...@@ -95,10 +92,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载 // 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
lbl.text = "返回"
lbl.textColor = UIColor.white
browserCell?.scrollView.addSubview(lbl)
browserCell?.setNeedsLayout() browserCell?.setNeedsLayout()
}) })
} }
...@@ -109,10 +103,7 @@ class ShopInfoViewController: BaseViewController { ...@@ -109,10 +103,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载 // 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
lbl.text = "返回"
lbl.textColor = UIColor.white
browserCell?.scrollView.addSubview(lbl)
browserCell?.setNeedsLayout() browserCell?.setNeedsLayout()
}) })
} }
......
...@@ -37,6 +37,11 @@ class S_Y_Detail_Vc: BaseViewController ,UITableViewDataSource,UITableViewDelega ...@@ -37,6 +37,11 @@ class S_Y_Detail_Vc: BaseViewController ,UITableViewDataSource,UITableViewDelega
} }
return 114 return 114
} }
var data : OrderDetailGoodsSourceModel?{
didSet{
}
}
var two_titles = ["","","","","","","","供货单位名称"] var two_titles = ["","","","","","","","供货单位名称"]
let titles = ["","商品名称","商品规格","产品产地","商品条码","生产日期","保质期","","","",""] let titles = ["","商品名称","商品规格","产品产地","商品条码","生产日期","保质期","","","",""]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......
...@@ -8,11 +8,24 @@ ...@@ -8,11 +8,24 @@
import UIKit import UIKit
protocol S_Y_View_Delegate { protocol S_Y_View_Delegate {
func S_Y_View_Check_Detail() func S_Y_View_Check_Detail(view:S_Y_View)
} }
class S_Y_View: UIView { class S_Y_View: UIView {
var contentView:UIView! var contentView:UIView!
var delegate:S_Y_View_Delegate? var delegate:S_Y_View_Delegate?
var data:OrderDetailGoodsSourceModel? {
didSet{
if data != nil {
bao_zhi_qi_lbl.text = data?.valid_date
sheng_chan_ri_qi_lbl.text = data?.production_data
chan_di_lbl.text = data?.product_origin
ru_ku_time_lbl.text = data?.add_time
pi_ci_number_lbl.text = StringByInt(number:(data?.batch_id)!)
gys_name_lbl.text = data?.ven_name
check_img.sd_setImage(with:URL(string:SERVERCE_ImageHost + ((data?.report_picture)!)!))
}
}
}
@IBOutlet weak var bao_zhi_qi_lbl: UILabel! @IBOutlet weak var bao_zhi_qi_lbl: UILabel!
@IBOutlet weak var sheng_chan_ri_qi_lbl: UILabel! @IBOutlet weak var sheng_chan_ri_qi_lbl: UILabel!
@IBOutlet weak var chan_di_lbl: UILabel! @IBOutlet weak var chan_di_lbl: UILabel!
...@@ -20,9 +33,10 @@ class S_Y_View: UIView { ...@@ -20,9 +33,10 @@ class S_Y_View: UIView {
@IBOutlet weak var pi_ci_number_lbl: UILabel! @IBOutlet weak var pi_ci_number_lbl: UILabel!
@IBOutlet weak var gys_name_lbl: UILabel! @IBOutlet weak var gys_name_lbl: UILabel!
@IBAction func check_detail(_ sender: UIButton) { @IBAction func check_detail(_ sender: UIButton) {
delegate?.S_Y_View_Check_Detail() delegate?.S_Y_View_Check_Detail(view:self)
} }
@IBOutlet weak var check_detail_btn: UIButton!
@IBOutlet weak var check_img: UIImageView!
@IBAction func close_action(_ sender: UIButton) { @IBAction func close_action(_ sender: UIButton) {
self.removeFromSuperview() self.removeFromSuperview()
} }
...@@ -34,6 +48,12 @@ class S_Y_View: UIView { ...@@ -34,6 +48,12 @@ class S_Y_View: UIView {
contentView.snp.makeConstraints { (make) in contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview() make.left.top.right.bottom.equalToSuperview()
} }
bao_zhi_qi_lbl.text = "-"
sheng_chan_ri_qi_lbl.text = "-"
chan_di_lbl.text = "-"
ru_ku_time_lbl.text = "-"
pi_ci_number_lbl.text = "-"
gys_name_lbl.text = "-"
} }
// /初始化时将xib中的view添加进来 // /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
...@@ -43,6 +63,12 @@ class S_Y_View: UIView { ...@@ -43,6 +63,12 @@ class S_Y_View: UIView {
contentView.snp.makeConstraints { (make) in contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview() make.left.top.right.bottom.equalToSuperview()
} }
bao_zhi_qi_lbl.text = "-"
sheng_chan_ri_qi_lbl.text = "-"
chan_di_lbl.text = "-"
ru_ku_time_lbl.text = "-"
pi_ci_number_lbl.text = "-"
gys_name_lbl.text = "-"
} }
//加载xib //加载xib
func loadViewFromNib() -> UIView { func loadViewFromNib() -> UIView {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<connections> <connections>
<outlet property="bao_zhi_qi_lbl" destination="oK3-v4-fM5" id="XCf-Xz-eP1"/> <outlet property="bao_zhi_qi_lbl" destination="oK3-v4-fM5" id="XCf-Xz-eP1"/>
<outlet property="chan_di_lbl" destination="YhV-Hc-qgt" id="RIa-9z-Oz7"/> <outlet property="chan_di_lbl" destination="YhV-Hc-qgt" id="RIa-9z-Oz7"/>
<outlet property="check_detail_btn" destination="6Md-jt-BE3" id="6LK-SL-s2G"/> <outlet property="check_img" destination="g7c-Hg-37A" id="efP-H9-mCQ"/>
<outlet property="gys_name_lbl" destination="S0r-Yy-7uV" id="eYU-j8-rPV"/> <outlet property="gys_name_lbl" destination="S0r-Yy-7uV" id="eYU-j8-rPV"/>
<outlet property="pi_ci_number_lbl" destination="Nhb-9N-Ghw" id="zYt-JF-NqD"/> <outlet property="pi_ci_number_lbl" destination="Nhb-9N-Ghw" id="zYt-JF-NqD"/>
<outlet property="ru_ku_time_lbl" destination="2hu-oz-DAD" id="M4i-sj-7Ip"/> <outlet property="ru_ku_time_lbl" destination="2hu-oz-DAD" id="M4i-sj-7Ip"/>
...@@ -147,6 +147,9 @@ ...@@ -147,6 +147,9 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="g7c-Hg-37A">
<rect key="frame" x="114" y="256.5" width="106" height="74.5"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Md-jt-BE3"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Md-jt-BE3">
<rect key="frame" x="114" y="256.5" width="106" height="74.5"/> <rect key="frame" x="114" y="256.5" width="106" height="74.5"/>
<constraints> <constraints>
...@@ -160,7 +163,9 @@ ...@@ -160,7 +163,9 @@
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstItem="g7c-Hg-37A" firstAttribute="centerX" secondItem="6Md-jt-BE3" secondAttribute="centerX" id="24H-sE-EF2"/>
<constraint firstItem="PZb-IT-gNN" firstAttribute="top" secondItem="PCS-cE-KjY" secondAttribute="bottom" constant="15" id="4D6-EQ-70K"/> <constraint firstItem="PZb-IT-gNN" firstAttribute="top" secondItem="PCS-cE-KjY" secondAttribute="bottom" constant="15" id="4D6-EQ-70K"/>
<constraint firstItem="g7c-Hg-37A" firstAttribute="centerY" secondItem="6Md-jt-BE3" secondAttribute="centerY" id="4a0-2Q-Wm3"/>
<constraint firstAttribute="trailing" secondItem="oK3-v4-fM5" secondAttribute="trailing" constant="15" id="5ql-c1-d6s"/> <constraint firstAttribute="trailing" secondItem="oK3-v4-fM5" secondAttribute="trailing" constant="15" id="5ql-c1-d6s"/>
<constraint firstItem="PCS-cE-KjY" firstAttribute="top" secondItem="dGh-Dd-DM6" secondAttribute="bottom" constant="15" id="7Vo-HF-vox"/> <constraint firstItem="PCS-cE-KjY" firstAttribute="top" secondItem="dGh-Dd-DM6" secondAttribute="bottom" constant="15" id="7Vo-HF-vox"/>
<constraint firstItem="6Md-jt-BE3" firstAttribute="centerX" secondItem="91i-Pc-519" secondAttribute="centerX" id="9U4-ou-Q3Y"/> <constraint firstItem="6Md-jt-BE3" firstAttribute="centerX" secondItem="91i-Pc-519" secondAttribute="centerX" id="9U4-ou-Q3Y"/>
...@@ -168,6 +173,7 @@ ...@@ -168,6 +173,7 @@
<constraint firstItem="gOe-TM-QuF" firstAttribute="top" secondItem="V04-rj-IfP" secondAttribute="bottom" constant="15" id="C9C-Ir-lRb"/> <constraint firstItem="gOe-TM-QuF" firstAttribute="top" secondItem="V04-rj-IfP" secondAttribute="bottom" constant="15" id="C9C-Ir-lRb"/>
<constraint firstAttribute="trailing" secondItem="Fpi-Qx-vzu" secondAttribute="trailing" constant="15" id="EgP-32-mAm"/> <constraint firstAttribute="trailing" secondItem="Fpi-Qx-vzu" secondAttribute="trailing" constant="15" id="EgP-32-mAm"/>
<constraint firstItem="oK3-v4-fM5" firstAttribute="top" secondItem="vGw-L2-745" secondAttribute="bottom" constant="15" id="FLh-tt-xgW"/> <constraint firstItem="oK3-v4-fM5" firstAttribute="top" secondItem="vGw-L2-745" secondAttribute="bottom" constant="15" id="FLh-tt-xgW"/>
<constraint firstItem="g7c-Hg-37A" firstAttribute="height" secondItem="6Md-jt-BE3" secondAttribute="height" id="GNH-PL-jsP"/>
<constraint firstItem="21E-nO-je8" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" id="HkZ-zw-Tst"/> <constraint firstItem="21E-nO-je8" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" id="HkZ-zw-Tst"/>
<constraint firstItem="dGh-Dd-DM6" firstAttribute="top" secondItem="gOe-TM-QuF" secondAttribute="bottom" constant="15" id="JDv-3E-8aE"/> <constraint firstItem="dGh-Dd-DM6" firstAttribute="top" secondItem="gOe-TM-QuF" secondAttribute="bottom" constant="15" id="JDv-3E-8aE"/>
<constraint firstItem="Nhb-9N-Ghw" firstAttribute="top" secondItem="S0r-Yy-7uV" secondAttribute="bottom" constant="15" id="K1L-Fy-sxo"/> <constraint firstItem="Nhb-9N-Ghw" firstAttribute="top" secondItem="S0r-Yy-7uV" secondAttribute="bottom" constant="15" id="K1L-Fy-sxo"/>
...@@ -177,6 +183,7 @@ ...@@ -177,6 +183,7 @@
<constraint firstItem="KoV-8K-ohF" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" constant="15" id="SKe-Do-SSS"/> <constraint firstItem="KoV-8K-ohF" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" constant="15" id="SKe-Do-SSS"/>
<constraint firstItem="S0r-Yy-7uV" firstAttribute="top" secondItem="21E-nO-je8" secondAttribute="bottom" constant="15" id="Uac-jq-Ioj"/> <constraint firstItem="S0r-Yy-7uV" firstAttribute="top" secondItem="21E-nO-je8" secondAttribute="bottom" constant="15" id="Uac-jq-Ioj"/>
<constraint firstItem="Fpi-Qx-vzu" firstAttribute="top" secondItem="91i-Pc-519" secondAttribute="top" constant="15" id="V0K-QY-yvT"/> <constraint firstItem="Fpi-Qx-vzu" firstAttribute="top" secondItem="91i-Pc-519" secondAttribute="top" constant="15" id="V0K-QY-yvT"/>
<constraint firstItem="g7c-Hg-37A" firstAttribute="width" secondItem="6Md-jt-BE3" secondAttribute="width" id="V4b-Vz-6dD"/>
<constraint firstAttribute="trailing" secondItem="PI4-cK-Eme" secondAttribute="trailing" id="WZM-NR-zS0"/> <constraint firstAttribute="trailing" secondItem="PI4-cK-Eme" secondAttribute="trailing" id="WZM-NR-zS0"/>
<constraint firstAttribute="trailing" secondItem="vGw-L2-745" secondAttribute="trailing" constant="15" id="YM6-hE-vF8"/> <constraint firstAttribute="trailing" secondItem="vGw-L2-745" secondAttribute="trailing" constant="15" id="YM6-hE-vF8"/>
<constraint firstItem="PZb-IT-gNN" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" constant="15" id="YzV-KN-5dq"/> <constraint firstItem="PZb-IT-gNN" firstAttribute="leading" secondItem="91i-Pc-519" secondAttribute="leading" constant="15" id="YzV-KN-5dq"/>
......
...@@ -701,7 +701,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -701,7 +701,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
let rowModel = self.dataArr[indexPath.row] let rowModel = self.dataArr[indexPath.row]
let vc = OrderDViewController() let vc = OrderDViewController()
vc.delegate = self vc.delegate = self
vc.orderId = rowModel.order_id! vc.orderId = 12637
// vc.orderId = rowModel.order_id!
vc.lmIdx = orderStatus vc.lmIdx = orderStatus
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
......
...@@ -28,16 +28,16 @@ ...@@ -28,16 +28,16 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </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="Kh6-Hv-73X"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kh6-Hv-73X">
<rect key="frame" x="260" y="14" width="33" height="16"/> <rect key="frame" x="272" y="14" width="33" height="16"/>
<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"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinru" translatesAutoresizingMaskIntoConstraints="NO" id="mzP-Q2-sl2"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jinru" translatesAutoresizingMaskIntoConstraints="NO" id="mzP-Q2-sl2">
<rect key="frame" x="298" y="18.5" width="7" height="7"/> <rect key="frame" x="305" y="18.5" width="0.0" height="7"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="7" id="FSH-Hc-tdw"/> <constraint firstAttribute="height" constant="7" id="FSH-Hc-tdw"/>
<constraint firstAttribute="width" constant="7" id="yZh-Lv-ehr"/> <constraint firstAttribute="width" id="yZh-Lv-ehr"/>
</constraints> </constraints>
</imageView> </imageView>
</subviews> </subviews>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<constraint firstItem="xEs-UK-3s6" firstAttribute="leading" secondItem="fBF-NP-iMf" secondAttribute="trailing" constant="5" id="D6K-zk-JBP"/> <constraint firstItem="xEs-UK-3s6" firstAttribute="leading" secondItem="fBF-NP-iMf" secondAttribute="trailing" constant="5" id="D6K-zk-JBP"/>
<constraint firstItem="fBF-NP-iMf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="FpE-1G-mMn"/> <constraint firstItem="fBF-NP-iMf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="FpE-1G-mMn"/>
<constraint firstItem="mzP-Q2-sl2" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="J4C-zD-iCt"/> <constraint firstItem="mzP-Q2-sl2" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="J4C-zD-iCt"/>
<constraint firstItem="mzP-Q2-sl2" firstAttribute="leading" secondItem="Kh6-Hv-73X" secondAttribute="trailing" constant="5" id="XE7-sQ-ZSj"/> <constraint firstItem="mzP-Q2-sl2" firstAttribute="leading" secondItem="Kh6-Hv-73X" secondAttribute="trailing" id="XE7-sQ-ZSj"/>
<constraint firstItem="Kh6-Hv-73X" firstAttribute="centerY" secondItem="mzP-Q2-sl2" secondAttribute="centerY" id="dn7-vm-wJh"/> <constraint firstItem="Kh6-Hv-73X" firstAttribute="centerY" secondItem="mzP-Q2-sl2" secondAttribute="centerY" id="dn7-vm-wJh"/>
<constraint firstAttribute="trailing" secondItem="mzP-Q2-sl2" secondAttribute="trailing" constant="15" id="i0h-HK-f57"/> <constraint firstAttribute="trailing" secondItem="mzP-Q2-sl2" secondAttribute="trailing" constant="15" id="i0h-HK-f57"/>
<constraint firstItem="fBF-NP-iMf" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="zuD-Li-8Vr"/> <constraint firstItem="fBF-NP-iMf" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="zuD-Li-8Vr"/>
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
<resources> <resources>
<image name="jinru" width="13" height="23"/> <image name="jinru" width="13" height="23"/>
<image name="kehu" width="17" height="18.5"/> <image name="kehu" width="17" height="18.5"/>
<namedColor name="多选按钮字体颜色">
<color red="0.41176470588235292" green="0.41176470588235292" blue="0.41176470588235292" 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>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources> </resources>
</document> </document>
...@@ -12,14 +12,27 @@ protocol OrderDViewControllerDelegate { ...@@ -12,14 +12,27 @@ protocol OrderDViewControllerDelegate {
func refishingOrderDchange() func refishingOrderDchange()
} }
class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate { class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate {
func S_Y_View_Check_Detail(view: S_Y_View) {
func S_Y_View_Check_Detail() {
print("查看溯源") print("查看溯源")
let vc = S_Y_Detail_Vc() let browser = JXPhotoBrowser()
vc.user_type = 1 browser.numberOfItems = {
self.navigationController?.pushViewController(vc, animated: true) 1
}
browser.pageIndex = 0
browser.reloadCellAtIndex = { context in
let browserCell = context.cell as? JXPhotoBrowserImageCell
let url = URL(string:SERVERCE_ImageHost + (view.data?.report_picture)!)
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
browserCell?.setNeedsLayout()
})
}
browser.show()
} }
func DaiKeXiaDanGouWuCellDelAction(cell: DaiKeXiaDanGouWuCell) { func DaiKeXiaDanGouWuCellDelAction(cell: DaiKeXiaDanGouWuCell) {
//此处无用 //此处无用
} }
...@@ -33,6 +46,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -33,6 +46,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
print("check S_Y") print("check S_Y")
let vc = S_Y_View(frame: self.view.bounds) let vc = S_Y_View(frame: self.view.bounds)
vc.delegate = self vc.delegate = self
if (dataMdoel?.order_goods!.count)! > 0 {
let target = dataMdoel?.order_goods![cell.tag]
vc.data = target?.goods_source
}
self.view.addSubview(vc) self.view.addSubview(vc)
} }
...@@ -68,8 +85,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -68,8 +85,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
var nonYuShouTitleArr = ["商品合计:","物流费用:","其它费用:"] var nonYuShouTitleArr = ["商品合计:","物流费用:","其它费用:"]
//旧的 //旧的
// let YuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","支付方式","支付状态","买家留言","订单备注"] // let YuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","支付方式","支付状态","买家留言","订单备注"]
// let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"] // let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","提货方式","物流公司","运单号","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"]
//新的 //新的
let YuShouPart3Arr = ["订单编号","下单时间","订单来源","关联凭证","提货方式","支付方式","支付状态","买家留言","订单备注"] let YuShouPart3Arr = ["订单编号","下单时间","订单来源","关联凭证","提货方式","支付方式","支付状态","买家留言","订单备注"]
let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","关联凭证","提货方式","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"] let isYuShouPart3Arr = ["订单编号","下单时间","订单来源","关联凭证","提货方式","定金支付方式","定金支付状态","尾款支付方式","尾款支付状态","买家留言","订单备注"]
...@@ -408,15 +425,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -408,15 +425,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
return return
} }
if indexPath.section == 0 { // if indexPath.section == 0 {
let vc = GuanLianKehuVC() // let vc = GuanLianKehuVC()
vc.delegate = self // vc.delegate = self
vc.order_id = self.orderId // vc.order_id = self.orderId
if self.dataMdoel?.order_res?.cus_id != 0 { // if self.dataMdoel?.order_res?.cus_id != 0 {
vc.cus_id = self.dataMdoel?.order_res?.cus_id // vc.cus_id = self.dataMdoel?.order_res?.cus_id
} // }
self.navigationController?.pushViewController(vc, animated: true) // self.navigationController?.pushViewController(vc, animated: true)
} // }
//订单信息操作 //订单信息操作
if indexPath.section == 5 { if indexPath.section == 5 {
...@@ -440,16 +457,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -440,16 +457,18 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let cell = tableView.dequeueReusableCell(withIdentifier: "GLKHCell") as! GLKHCell let cell = tableView.dequeueReusableCell(withIdentifier: "GLKHCell") as! GLKHCell
cell.nameLbl.text = self.dataMdoel?.order_res?.user_name cell.nameLbl.text = self.dataMdoel?.order_res?.user_name
if self.dataMdoel?.order_res?.order_status != nil && self.dataMdoel?.order_res?.order_status_d != nil && self.dataMdoel?.order_res!.goods_before_pay != nil {
if self.dataMdoel?.order_res?.cus_id != 0 { cell.contentLbl.text = orderStatusStrByInt(statusNumber: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!, isBfPay:(self.dataMdoel?.order_res!.goods_before_pay)! , LmIdx: lmIdx)
cell.contentLbl.text = self.dataMdoel?.order_res?.cus_name }
}else{ // if self.dataMdoel?.order_res?.cus_id != 0 {
//如果不刷新请求,那么就更新本地,建议还是刷新,暂不刷 // cell.contentLbl.text = self.dataMdoel?.order_res?.cus_name
cell.contentLbl.text = "请选择关联客户" // }else{
if !isCaneditLatsData { // //如果不刷新请求,那么就更新本地,建议还是刷新,暂不刷
cell.contentLbl.text = "-" // cell.contentLbl.text = "请选择关联客户"
} // if !isCaneditLatsData {
} // cell.contentLbl.text = "-"
// }
// }
return cell return cell
case 1: case 1:
...@@ -792,9 +811,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -792,9 +811,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
check_all = !check_all check_all = !check_all
self.listView.reloadData() self.listView.reloadData()
// let vc = ShowAlGoodsViewController() // let vc = ShowAlGoodsViewController()
// vc.order_goods = self.dataMdoel?.order_goods // vc.order_goods = self.dataMdoel?.order_goods
// self.navigationController?.pushViewController(vc, animated: true) // self.navigationController?.pushViewController(vc, animated: true)
} }
//MARK:--选择的关联客户返回数据 //MARK:--选择的关联客户返回数据
...@@ -1157,6 +1176,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1157,6 +1176,8 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
switch section { switch section {
case 0:
return 1
case 1: case 1:
if isYuShou == false { if isYuShou == false {
if (self.dataMdoel?.order_goods?.count)! > 2 { if (self.dataMdoel?.order_goods?.count)! > 2 {
...@@ -1202,14 +1223,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1202,14 +1223,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
switch section { switch section {
case 1: case 1:
let view1 = TitleAndLblView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view1.nameLbl.text = "订单状态" // let view1 = TitleAndLblView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
//订单状态 // view1.nameLbl.text = "订单状态"
if self.dataMdoel?.order_res?.order_status != nil && self.dataMdoel?.order_res?.order_status_d != nil && self.dataMdoel?.order_res!.goods_before_pay != nil { // //订单状态
view1.contentLbl.text = orderStatusStrByInt(statusNumber: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!, isBfPay:(self.dataMdoel?.order_res!.goods_before_pay)! , LmIdx: lmIdx) // if self.dataMdoel?.order_res?.order_status != nil && self.dataMdoel?.order_res?.order_status_d != nil && self.dataMdoel?.order_res!.goods_before_pay != nil {
view.addSubview(view1) // view1.contentLbl.text = orderStatusStrByInt(statusNumber: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!, isBfPay:(self.dataMdoel?.order_res!.goods_before_pay)! , LmIdx: lmIdx)
} // view.addSubview(view1)
return view // }
return UIView()
case 3: case 3:
let view1 = HeaderOnlyTitleView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 39)) let view1 = HeaderOnlyTitleView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 39))
view1.nameLbl.text = "收货信息" view1.nameLbl.text = "收货信息"
...@@ -1240,8 +1262,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1240,8 +1262,9 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
switch section { switch section {
case 0:return 1
case 1: case 1:
return 49 return 0.001
case 2: case 2:
return 1 return 1
case 3: case 3:
...@@ -1411,7 +1434,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1411,7 +1434,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
break break
case "打印": case "打印":
// orderId = 12599 // orderId = 12599
printOrder(["user_token":UserToken as Any,"order_id":orderId as Any]) { [self] (data) in printOrder(["user_token":UserToken as Any,"order_id":orderId as Any]) { [self] (data) in
let d = data as! printOrder_model let d = data as! printOrder_model
let vc = PrintListMgVc() let vc = PrintListMgVc()
......
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