Commit c2f0b580 authored by lujunye's avatar lujunye

修改规格完成

parent 54d9e033
......@@ -246,6 +246,17 @@ func dataChangeString(sender:Array<Any>) -> String{
return str
}
//MARK:--字符串转字典
func getDictionaryFromJSONString(jsonString:String) ->NSDictionary{
let jsonData:Data = jsonString.data(using: .utf8)!
let dict = try? JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers)
if dict != nil {
return dict as! NSDictionary
}
return NSDictionary()
}
//MARK:--字典转字符串
func dictChangeString(sender:Dictionary<String, String>) -> String{
var str = ""
......
......@@ -408,7 +408,9 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
print("选中===\(indexPath)")
let item = collection?.cellForItem(at: indexPath) as! GoodsCollectionViewCell
let vc = EPViewController()
vc.titleStrArr = [item.leftBtn.titleLabel!.text!,item.rightBtn.titleLabel!.text!]
let data = items[indexPath.row]
vc.goods_id = data.goods_id
self.navigationController?.pushViewController(vc, animated: true)
......
......@@ -75,10 +75,10 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var shiFouSH = false //是否审核
var faHuoTime = ""//发货时间
//预售时间段
var dj_time_start:Int? = 0
var dj_time_end:Int? = 0
var wk_time_start:Int? = 0
var wk_time_end:Int? = 0
var dj_time_start:Double? = 0
var dj_time_end:Double? = 0
var wk_time_start:Double? = 0
var wk_time_end:Double? = 0
//MARK:--保存按钮
@IBAction func submitAction(_ sender: Any) {
......@@ -590,13 +590,13 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
if isWeiTime {
ysszHolder.insert(timeStr, at: 2)
ysszHolder.remove(at: 3)
wk_time_start = Int(timeInterval)
wk_time_end = Int(timeIntervalEnd)
wk_time_start = Double(timeInterval)
wk_time_end = Double(timeIntervalEnd)
}else{
ysszHolder.insert(timeStr, at: 1)
ysszHolder.remove(at: 2)
dj_time_start = Int(timeInterval)
dj_time_end = Int(timeIntervalEnd)
dj_time_start = Double(timeInterval)
dj_time_end = Double(timeIntervalEnd)
}
listTbv.reloadData()
......@@ -653,7 +653,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
// print("上传图片==\(image)")
// self.maxFiveImgsArr.append(image!)
// let index = Dollar.indexOf(self.maxFiveImgsArr, value: image!)
self.uploadImg(imge: image!, isOriginal: false, tag: self.maxFiveImgsArr.count)
self.maxFiveImgsArr.append("insert")
self.uploadImg(imge: image!, isOriginal: false, tag: self.maxFiveImgsArr.count-1)
})
}
......
......@@ -44,6 +44,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var selectIdx:IndexPath?
var isYuShouSetting = false//打开预售
@IBOutlet weak var btmLblH: NSLayoutConstraint!
var isJieTiOpen = false//控制阶梯价是否打开
var isYsJieTiOpen = false//控制预售阶梯是否打开
......@@ -90,6 +91,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
isAllEditing = false
bottomBtn.isHidden = true
btmLbl.isHidden = true
btmLblH.constant = 0
}
if datasArr.count > 1 && barTitle!.contains("编辑") == true {//展示topbar
......@@ -422,7 +424,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
if isYsJieTiOpen && selectYuShou {
return 49
}
return 0.001
return 0.001
}
return 49
......@@ -467,15 +469,17 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
//footer
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
if section == 2 {
if isJieTiOpen && selectYuShou == false{
let view = NewCreateFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view.delegate = self
return view
}
if isYsJieTiOpen && selectYuShou{
let view = NewCreateFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view.delegate = self
return view
if barTitle?.contains("查看") == false {
if isJieTiOpen && selectYuShou == false{
let view = NewCreateFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view.delegate = self
return view
}
if isYsJieTiOpen && selectYuShou{
let view = NewCreateFooter(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view.delegate = self
return view
}
}
}
let view = UIView()
......
......@@ -8,10 +8,11 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CreatNewSpecsViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CreatNewSpecsViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="bottomBtn" destination="Y0N-V9-rbQ" id="cyL-aV-aEN"/>
<outlet property="btmLbl" destination="cfi-M7-imX" id="nul-AS-3bD"/>
<outlet property="btmLblH" destination="vek-sO-irU" id="oFb-8u-5yE"/>
<outlet property="listTbv" destination="bSh-mx-Kzg" id="xwd-1s-qv3"/>
<outlet property="topBarView" destination="58G-5f-0zb" id="HDH-SB-fbX"/>
<outlet property="topBarViewH" destination="BMm-7O-bZv" id="ygO-Sq-gGh"/>
......
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