Commit f671323e authored by lujunye's avatar lujunye

点击查看大图

parent 2f5b1dcc
......@@ -273,6 +273,36 @@ class OrderDetailSaleResModel: Mappable {
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 {
......@@ -289,11 +319,13 @@ class OrderDetailGoodsModel: Mappable {
var is_edit : Int? = 0 //订单商品是否有修改,1是0非--前端自主添加的字段
var commission_val:String? //这个商品的总佣金
var remark:String?//商品备注
var goods_source:OrderDetailGoodsSourceModel?//溯源信息
required init?( map: Map) {
}
func mapping(map: Map) {
commission_val <- map["commission_val"]
goods_source <- map["goods_source"]
og_id <- map["og_id"]
goods_id <- map["goods_id"]
goods_name <- map["goods_name"]
......
......@@ -137,6 +137,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
pageIndicator?.reloadData(numberOfItems: numberOfItems(), pageIndex: pageIndex)
}
let lbl = UILabel(frame: CGRect(x: 20, y: 0, width: 100, height: 100))
open override func viewDidLoad() {
super.viewDidLoad()
......@@ -156,6 +157,11 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
self.didChangedPageIndex(index)
}
lbl.text = "返回"
lbl.textColor = UIColor.white
view.addSubview(lbl)
view.setNeedsLayout()
view.layoutIfNeeded()
}
......@@ -279,6 +285,7 @@ open class JXPhotoBrowser: UIViewController, UIViewControllerTransitioningDelega
deinit {
JXPhotoBrowserLog.low("deinit - \(self.classForCoder)")
lbl.removeFromSuperview()
navigationController?.delegate = previousNavigationControllerDelegate
}
......
......@@ -388,7 +388,7 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
if isGm {
let arr = piCiArr![indexPath.row]
if arr.count > 0 {
return CGFloat(140 + arr.count * 30 + 35)
return CGFloat(140 + arr.count * 30 + 40)
}else{
return 140
}
......
......@@ -9,10 +9,29 @@
import UIKit
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("查看溯源")
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) {
//此处无用
}
......@@ -26,6 +45,10 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
print("check S_Y")
let vc = S_Y_View(frame: self.view.bounds)
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)
}
......
......@@ -148,13 +148,15 @@ class RetailManageViewController: BaseViewController,UITableViewDelegate,UITable
if self.title == "代销订单" {
let vc = RetailManageDetailViewController()
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
self.navigationController?.pushViewController(vc, animated: true)
}else{
let vc = RetailManageDetailViewController()
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)
}
......
......@@ -38,10 +38,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let browserCell = context.cell as? JXPhotoBrowserImageCell
let url = URL(string:SERVERCE_ImageHost + cell.imgs[context.index])
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()
})
}
......
......@@ -80,10 +80,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
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()
})
}
......@@ -95,10 +92,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
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()
})
}
......@@ -109,10 +103,7 @@ class ShopInfoViewController: BaseViewController {
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
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()
})
}
......
......@@ -37,6 +37,11 @@ class S_Y_Detail_Vc: BaseViewController ,UITableViewDataSource,UITableViewDelega
}
return 114
}
var data : OrderDetailGoodsSourceModel?{
didSet{
}
}
var two_titles = ["","","","","","","","供货单位名称"]
let titles = ["","商品名称","商品规格","产品产地","商品条码","生产日期","保质期","","","",""]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......
......@@ -8,11 +8,24 @@
import UIKit
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 {
var contentView:UIView!
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 sheng_chan_ri_qi_lbl: UILabel!
@IBOutlet weak var chan_di_lbl: UILabel!
......@@ -20,9 +33,10 @@ class S_Y_View: UIView {
@IBOutlet weak var pi_ci_number_lbl: UILabel!
@IBOutlet weak var gys_name_lbl: UILabel!
@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) {
self.removeFromSuperview()
}
......@@ -34,6 +48,12 @@ class S_Y_View: UIView {
contentView.snp.makeConstraints { (make) in
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添加进来
required init?(coder aDecoder: NSCoder) {
......@@ -43,6 +63,12 @@ class S_Y_View: UIView {
contentView.snp.makeConstraints { (make) in
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
func loadViewFromNib() -> UIView {
......
......@@ -14,7 +14,7 @@
<connections>
<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="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="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"/>
......@@ -147,6 +147,9 @@
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</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">
<rect key="frame" x="114" y="256.5" width="106" height="74.5"/>
<constraints>
......@@ -160,7 +163,9 @@
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<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="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 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"/>
......@@ -168,6 +173,7 @@
<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 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="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"/>
......@@ -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="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="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="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"/>
......
......@@ -701,7 +701,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
let rowModel = self.dataArr[indexPath.row]
let vc = OrderDViewController()
vc.delegate = self
vc.orderId = rowModel.order_id!
vc.orderId = 12637
// vc.orderId = rowModel.order_id!
vc.lmIdx = orderStatus
self.navigationController?.pushViewController(vc, animated: true)
}
......
......@@ -28,16 +28,16 @@
<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="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"/>
<color key="textColor" name="多选按钮字体颜色"/>
<color key="textColor" name="蓝色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<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>
<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>
</imageView>
</subviews>
......@@ -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="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="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 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"/>
......@@ -66,11 +66,11 @@
<resources>
<image name="jinru" width="13" height="23"/>
<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="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
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