Commit 0860a9f3 authored by 刘俊宏's avatar 刘俊宏

工作中心+出库记录完善ing

parent 21ea9098
...@@ -81,6 +81,7 @@ class WorkcenterIndexAuthResModel: Mappable { ...@@ -81,6 +81,7 @@ class WorkcenterIndexAuthResModel: Mappable {
ranges <- map["ranges"] ranges <- map["ranges"]
platforms <- map["platforms"] platforms <- map["platforms"]
auth_pid <- map["auth_pid"] auth_pid <- map["auth_pid"]
app_icon <- map["app_icon"]
} }
......
...@@ -18,6 +18,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -18,6 +18,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
var contentView:UIView! var contentView:UIView!
var delegate:MoreAndTimeSelectViewDelegate? var delegate:MoreAndTimeSelectViewDelegate?
@IBOutlet weak var scrollview: UIScrollView!
@IBOutlet weak var showViewHeight: NSLayoutConstraint! @IBOutlet weak var showViewHeight: NSLayoutConstraint!
@IBAction func resetAction(_ sender: UIButton) { @IBAction func resetAction(_ sender: UIButton) {
//重置 //重置
...@@ -29,7 +30,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -29,7 +30,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
EndDate = nil EndDate = nil
paySArr = [false,false,false,false] paySArr = [false,false,false,false]
bugSArr = [false,false,false] bugSArr = [false,false,false]
sendSArr = [false,false,false,false] sendSArr = []
setUI() setUI()
self.delegate?.sureActionMoreAndTimeSelectView(beginDate: BeginDate, endginDate: EndDate, paySelectArr: paySArr, bugSelectArr: bugSArr, sendSelectArr: sendSArr) self.delegate?.sureActionMoreAndTimeSelectView(beginDate: BeginDate, endginDate: EndDate, paySelectArr: paySArr, bugSelectArr: bugSArr, sendSelectArr: sendSArr)
...@@ -56,13 +57,14 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -56,13 +57,14 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
var EndDate: Date! = nil var EndDate: Date! = nil
var paySArr:Array<Bool> = [false,false,false,false] var paySArr:Array<Bool> = [false,false,false,false]
var bugSArr:Array<Bool> = [false,false,false] var bugSArr:Array<Bool> = [false,false,false]
var sendSArr:Array<Bool> = [false,false,false,false] var sendSArr:Array<Bool> = []
var contentH = 360*glscale var contentH = 320*glscale
let line1 = UIView() let line1 = UIView()
let timeTilelV = TitleAndSelCalendarView() let timeTilelV = TitleAndSelCalendarView()
let calendarV = TimeSelectView(frame: CGRect(x: 0, y: 85*glscale, width: fullScreenWidth, height: 235*glscale)) let calendarV = TimeSelectView(frame: CGRect(x: 0, y: 85*glscale, width: fullScreenWidth, height: 235*glscale))
let line3 = UIView()
func setUI(){ func setUI(){
contentWidht.constant = 375*glscale contentWidht.constant = 375*glscale
...@@ -114,7 +116,6 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -114,7 +116,6 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
make.height.equalTo(60*glscale) make.height.equalTo(60*glscale)
} }
//分界线3 //分界线3
let line3 = UIView()
line3.backgroundColor = UIColor.init(named: "灰色分界线") line3.backgroundColor = UIColor.init(named: "灰色分界线")
contenV.addSubview(line3) contenV.addSubview(line3)
line3.snp.makeConstraints { (make) in line3.snp.makeConstraints { (make) in
...@@ -122,21 +123,24 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -122,21 +123,24 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
make.height.equalTo(1) make.height.equalTo(1)
make.top.equalTo(typeV.snp_bottom).offset(15*glscale) make.top.equalTo(typeV.snp_bottom).offset(15*glscale)
} }
let statusV = addTitleAndMoreBtn(title: "具体类型", arrStr: ["调入","退货","生产","调出被拒绝"], btnTag: 3000) let statusV = addTitleAndMoreBtn(title: "具体类型", arrStr: [], btnTag: 3000)
contenV.addSubview(statusV) contenV.addSubview(statusV)
statusV.tag = 10086
statusV.snp.makeConstraints { (make) in statusV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale) make.left.equalTo(15*glscale)
make.top.equalTo(line3.snp_bottom).offset(15*glscale) make.top.equalTo(line3.snp_bottom).offset(15*glscale)
make.right.equalTo(0) make.right.equalTo(0)
make.height.equalTo(60*glscale) make.height.equalTo(20*glscale)
} }
} }
//如果展示时间选择器,就 + 235*glscale //如果展示时间选择器,就 + 235*glscale
//MARK:--展示日历选择器 //MARK:--展示日历选择器
func isShowCalendarV(isShow: Bool) { func isShowCalendarV(isShow: Bool) {
if isShow { if isShow {
contentHeight.constant = contentH + 235*glscale contentH = contentH + 235*glscale
contentHeight.constant = contentH
calendarV.moreSelection = true calendarV.moreSelection = true
contenV.addSubview(calendarV) contenV.addSubview(calendarV)
calendarV.delegate = self calendarV.delegate = self
...@@ -149,6 +153,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -149,6 +153,7 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
calendarV.setOldDate(beginD: BeginDate!, endD: EndDate!) calendarV.setOldDate(beginD: BeginDate!, endD: EndDate!)
} }
}else{ }else{
contentH = contentH - 235*glscale
contentHeight.constant = contentH contentHeight.constant = contentH
calendarV.removeFromSuperview() calendarV.removeFromSuperview()
line1.snp.remakeConstraints { (make) in line1.snp.remakeConstraints { (make) in
...@@ -184,6 +189,24 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -184,6 +189,24 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
make.left.top.equalTo(0) make.left.top.equalTo(0)
} }
titleLbl.text = title titleLbl.text = title
if title == "具体类型" {
let tishiLbl = UILabel()
tishiLbl.textColor = UIColor.init(named: "灰色字体颜色")
tishiLbl.font = UIFont.systemFont(ofSize: 11)
conView.addSubview(tishiLbl)
tishiLbl.snp.makeConstraints { (make) in
make.bottom.equalTo(titleLbl)
make.left.equalTo(titleLbl.snp_right).offset(3)
}
tishiLbl.text = "(需选择出入库类型)"
let tempBtnArr = allSelectBtn
allSelectBtn.removeAll()
tempBtnArr.forEach { (sender) in
if sender.tag < 3000 {
allSelectBtn.append(sender)
}
}
}
weak var btn:UIButton? = nil weak var btn:UIButton? = nil
for i in 0 ..< arrStr.count { for i in 0 ..< arrStr.count {
let str = arrStr[i] let str = arrStr[i]
...@@ -199,9 +222,15 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -199,9 +222,15 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
make.left.equalTo(CGFloat(CGFloat(i * (73 + 15)) * glscale)) make.left.equalTo(CGFloat(CGFloat(i * (73 + 15)) * glscale))
make.top.equalTo(titleLbl.snp_bottom).offset(10*glscale) make.top.equalTo(titleLbl.snp_bottom).offset(10*glscale)
btn = selectBtn btn = selectBtn
}else{ }else if i < 8 {
make.left.equalTo(CGFloat(CGFloat((i - 4) * (73 + 15)) * glscale)) make.left.equalTo(CGFloat(CGFloat((i - 4) * (73 + 15)) * glscale))
make.top.equalTo(btn!.snp_bottom).offset(10*glscale) make.top.equalTo(btn!.snp_bottom).offset(10*glscale)
if i == 7 {
btn = selectBtn
}
}else{
make.left.equalTo(CGFloat(CGFloat((i - 8) * (73 + 15)) * glscale))
make.top.equalTo(btn!.snp_bottom).offset(10*glscale)
} }
make.width.equalTo(73*glscale) make.width.equalTo(73*glscale)
make.height.equalTo(30*glscale) make.height.equalTo(30*glscale)
...@@ -251,9 +280,73 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect ...@@ -251,9 +280,73 @@ class MoreAndTimeSelectView: UIView, TitleAndSelCalendarViewDelegate, TimeSelect
} }
} }
bugSArr[index] = sender.isSelected bugSArr[index] = sender.isSelected
let suv = contenV.viewWithTag(10086)
suv?.removeFromSuperview()
if index > 0 && sender.isSelected{
//选择了出入库
print("选择了出入库")
if sendSArr.count == 0 {
contentH = contentH + 120*glscale
contentHeight.constant = contentH
}
if index == 1{
let arrStr = ["全部","采购","调入","退货","生产","调出被拒绝","外采","其他","固定采购","临时采购"]
sendSArr.removeAll()
arrStr.forEach { (str) in
sendSArr.append(false)
}
let statusV = addTitleAndMoreBtn(title: "具体类型", arrStr: arrStr, btnTag: 3000)
contenV.addSubview(statusV)
statusV.tag = 10086
statusV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line3.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(140*glscale)
}
}else{
let arrStr = ["全部","销售","调出","报损","赠品","自用","生产使用","过期处理","用户试用","采购退货","其他"]
sendSArr.removeAll()
arrStr.forEach { (str) in
sendSArr.append(false)
}
let statusV = addTitleAndMoreBtn(title: "具体类型", arrStr:arrStr, btnTag: 3000)
contenV.addSubview(statusV)
statusV.tag = 10086
statusV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line3.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(140*glscale)
}
}
}else{
print("选择全部")
let statusV = addTitleAndMoreBtn(title: "具体类型", arrStr: [], btnTag: 3000)
sendSArr = []
contenV.addSubview(statusV)
statusV.tag = 10086
statusV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line3.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(20*glscale)
}
contentH = contentH - 120*glscale
contentHeight.constant = contentH
}
}else{ }else{
let index = sender.tag - 3000 let index = sender.tag - 3000
sendSArr = [false,false,false,false] var tmpeArr:[Bool] = []
sendSArr.forEach { (isb) in
tmpeArr.append(false)
}
sendSArr = tmpeArr
allSelectBtn.forEach { (btn) in allSelectBtn.forEach { (btn) in
if btn.tag < 4000 && btn.tag > 2999 { if btn.tag < 4000 && btn.tag > 2999 {
if btn.tag != sender.tag { if btn.tag != sender.tag {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<outlet property="contenV" destination="vHv-I4-dmk" id="WbO-6S-e3L"/> <outlet property="contenV" destination="vHv-I4-dmk" id="WbO-6S-e3L"/>
<outlet property="contentHeight" destination="fb3-1v-gnz" id="Wvf-2H-zNw"/> <outlet property="contentHeight" destination="fb3-1v-gnz" id="Wvf-2H-zNw"/>
<outlet property="contentWidht" destination="Ui1-5n-gGg" id="EH0-e8-5Gv"/> <outlet property="contentWidht" destination="Ui1-5n-gGg" id="EH0-e8-5Gv"/>
<outlet property="scrollview" destination="dH1-9z-HTC" id="ZCH-Yf-jLE"/>
<outlet property="showViewHeight" destination="e8t-mB-tnZ" id="dat-TC-NVN"/> <outlet property="showViewHeight" destination="e8t-mB-tnZ" id="dat-TC-NVN"/>
</connections> </connections>
</placeholder> </placeholder>
......
...@@ -9,11 +9,30 @@ ...@@ -9,11 +9,30 @@
import UIKit import UIKit
import ViewAnimator //cell动效 import ViewAnimator //cell动效
class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate,CRKXiangQVCDelegate { class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CRKCellDelegate,UISearchBarDelegate, SearchBarViewDelegate,CRKXiangQVCDelegate ,MoreAndTimeSelectViewDelegate{
//刷新???
func CRKXiangQVCFinishAction() { func CRKXiangQVCFinishAction() {
listView.mj_header?.beginRefreshing() listView.mj_header?.beginRefreshing()
} }
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
if moreTimeSelectView != nil {
moreTimeSelectView.removeFromSuperview()
moreTimeSelectView = nil
}
return true
}
//MARK: - searchView delegate
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
}
var page = 0 var page = 0
var isGm = true var isGm = true
...@@ -21,18 +40,37 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -21,18 +40,37 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
@IBOutlet weak var topBtn: UIButton! @IBOutlet weak var topBtn: UIButton!
var moreTimeSelectView:MoreAndTimeSelectView! = nil
@IBAction func openViewAction(_ sender: Any) { @IBAction func openViewAction(_ sender: Any) {
print("筛选选项") print("筛选选项")
let moreTimeSelectView = MoreAndTimeSelectView() if moreTimeSelectView == nil {
moreTimeSelectView = MoreAndTimeSelectView()
moreTimeSelectView.delegate = self
self.view.addSubview(moreTimeSelectView) self.view.addSubview(moreTimeSelectView)
moreTimeSelectView.snp.makeConstraints { (make) in moreTimeSelectView.snp.makeConstraints { (make) in
make.left.bottom.right.equalTo(0) make.left.bottom.right.equalTo(0)
make.top.equalTo(100*glscale) make.top.equalTo(searchBgView.snp_bottom)
} }
moreTimeSelectView.setUI() moreTimeSelectView.setUI()
}else{
moreTimeSelectView.removeFromSuperview()
moreTimeSelectView = nil
}
}
//MARK:--筛选回调数据
func sureActionMoreAndTimeSelectView(beginDate: Date?, endginDate: Date?, paySelectArr: Array<Bool>, bugSelectArr: Array<Bool>, sendSelectArr: Array<Bool>) {
print(beginDate,endginDate,paySelectArr,bugSelectArr,sendSelectArr)
}
//MARK:--筛选回调数据
func colseActionMoreAndTimeSelectView() {
moreTimeSelectView = nil
} }
@IBOutlet weak var searchBG: UIView! @IBOutlet weak var searchBG: UIView!
...@@ -206,12 +244,5 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -206,12 +244,5 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
} }
} }
//MARK: - searchView delegate
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
}
} }
...@@ -186,7 +186,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -186,7 +186,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
oldOftenArr?.forEach({ (md) in oldOftenArr?.forEach({ (md) in
var isAdd = false var isAdd = false
self.dataModel?.auth_res?.forEach({ (pmd) in self.dataModel?.auth_res?.forEach({ (pmd) in
if md.auth_id == pmd.auth_id && pmd.is_often == 1 { if md.auth_id == pmd.auth_id {
//存在且还常用 //存在且还常用
isAdd = true isAdd = true
} }
...@@ -266,7 +266,6 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -266,7 +266,6 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
cell.dataIndexSection = indexPath.row cell.dataIndexSection = indexPath.row
switch indexPath.row { switch indexPath.row {
case 1: case 1:
cell.itemDataArrs = self.oftenArr!
var tempArr:[String] = [] var tempArr:[String] = []
self.oftenArr?.forEach({ (md) in self.oftenArr?.forEach({ (md) in
tempArr.append(md.auth_name!) tempArr.append(md.auth_name!)
...@@ -505,14 +504,14 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -505,14 +504,14 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
case 116: //字段列表 case 116: //字段列表
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
return return
case 117: //新增商品 case 118: //新增商品
let vc = ProductDetailViewController() let vc = ProductDetailViewController()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 118: //新增采购单 case 119: //新增采购单
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
return return
case 119: //商品毛利统计 case 120: //商品毛利统计
HUD.flash(.label("敬请期待"),delay: 1.2) HUD.flash(.label("敬请期待"),delay: 1.2)
return return
default: default:
......
...@@ -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"/>
...@@ -27,7 +28,11 @@ ...@@ -27,7 +28,11 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="qfI-0k-kQG"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bianji" translatesAutoresizingMaskIntoConstraints="NO" id="qfI-0k-kQG">
<rect key="frame" x="41.5" y="18" width="17" height="16.5"/> <rect key="frame" x="37" y="6.5" width="26" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="26" id="AKt-O2-9tI"/>
<constraint firstAttribute="height" constant="28" id="mL5-ZO-3vy"/>
</constraints>
</imageView> </imageView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ajc-oX-hvc"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ajc-oX-hvc">
<rect key="frame" x="74" y="0.0" width="16" height="16"/> <rect key="frame" x="74" y="0.0" width="16" height="16"/>
......
...@@ -111,11 +111,14 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle ...@@ -111,11 +111,14 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
}else{ }else{
cell.countLbl.isHidden = true cell.countLbl.isHidden = true
let rowModel = self.itemDataArrs[indexPath.row] let rowModel = self.itemDataArrs[indexPath.row]
if rowModel.app_icon != nil {
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"))
}else{ if rowModel.app_icon == nil {
cell.itemImgV.image = UIImage.init(named: "worktest1") cell.itemImgV.image = UIImage.init(named: "worktest1")
}else{
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"))
} }
} }
cell.itemNameLbl.text = itemArrs[indexPath.row] cell.itemNameLbl.text = itemArrs[indexPath.row]
......
...@@ -151,11 +151,12 @@ class EditWorkCViewController: BaseViewController, UICollectionViewDelegate, UIC ...@@ -151,11 +151,12 @@ class EditWorkCViewController: BaseViewController, UICollectionViewDelegate, UIC
} }
}) })
let rowModel = chlicdAuthResModelArr[indexPath.row] let rowModel = chlicdAuthResModelArr[indexPath.row]
if rowModel.app_icon != nil { if rowModel.app_icon == nil {
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1")) cell.itemImgV.image = UIImage.init(named: "worktest1")
}else{ }else{
cell.itemImgV.image = UIImage.init(named: "worktest1") cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"))
} }
cell.itemNameLbl.text = rowModel.auth_name cell.itemNameLbl.text = rowModel.auth_name
...@@ -176,14 +177,13 @@ class EditWorkCViewController: BaseViewController, UICollectionViewDelegate, UIC ...@@ -176,14 +177,13 @@ class EditWorkCViewController: BaseViewController, UICollectionViewDelegate, UIC
cell.itemNameLbl.isHidden = false cell.itemNameLbl.isHidden = false
cell.itemImgV.isHidden = false cell.itemImgV.isHidden = false
let rowModel = oftenArr![indexPath.row] let rowModel = oftenArr![indexPath.row]
if rowModel.app_icon != nil { if rowModel.app_icon == nil {
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1")) cell.itemImgV.image = UIImage.init(named: "worktest1")
}else{ }else{
cell.itemImgV.image = UIImage.init(named: "worktest1") cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"))
} }
cell.itemNameLbl.text = rowModel.auth_name cell.itemNameLbl.text = rowModel.auth_name
cell.bgImV.image = UIImage.init(named: "workjian") cell.bgImV.image = UIImage.init(named: "workjian")
} }
......
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