Commit ddbe5d2e authored by lujunye's avatar lujunye

595

parent 327bb1ca
......@@ -31,6 +31,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var titleStrArr:Array<String>? = []
var goods_id:Int?
var goodsDetailModel:GoodsDetailModel? = nil
var editActionArr = ["保存"]
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
if view.titleLbl.text == "请选择商品类型" {
print(itemTypeArr,selectArr)
......@@ -112,6 +113,19 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
self.editBtn!.setTitle("保存", for: .normal)
self.isAllEditing = true
self.listTbv.reloadData()
self.btmBtnBGView.subviews.forEach { (view) in
view.removeFromSuperview()
}
for i in 0 ..< self.editActionArr.count {
let btn = UIButton(frame: CGRect(x: 0 , y: 1, width:fullScreenWidth, height: 49))
self.btmBtnBGView.addSubview(btn)
btn.setTitle(self.editActionArr[i], for: .normal)
btn.setTitleColor(UIColor(named: "蓝色字体颜色"), for: .normal)
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 13)
btn.addTarget(self, action: #selector(self.btmBtnClick(sender:)), for: .touchUpInside)
}
}) { (error) in
}
......@@ -215,7 +229,11 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
//MARK:--修改商品接口
goodsEdit(dic, success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交修改成功"), delay: 1.2)
self.editBtn!.setTitle("编辑", for: .normal)
self.btmBtnBGView.subviews.forEach { (view) in
view.removeFromSuperview()
}
self.setBtmBtnUi()
self.isAllEditing = false
self.listTbv.reloadData()
self.delegate?.EPViewControllerFinishEdit()
......@@ -588,10 +606,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
}
override func viewDidLoad() {
super.viewDidLoad()
//MARK:--获取新增商品的基本信息(品牌和分类等)
HUD.flash(.progress)
func setBtmBtnUi(){
titleStrArr?.insert("编辑", at: 0)
titleStrArr?.append("删除")
let w = fullScreenWidth / 4
......@@ -604,6 +619,13 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 13)
btn.addTarget(self, action: #selector(btmBtnClick(sender:)), for: .touchUpInside)
}
}
override func viewDidLoad() {
super.viewDidLoad()
//MARK:--获取新增商品的基本信息(品牌和分类等)
HUD.flash(.progress)
setBtmBtnUi()
// }
//是否为预售商品
isYuShouShangPin = false
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" 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"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="EPViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="EPViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btmBtnBGView" destination="H2x-8q-Enj" id="zfZ-07-szf"/>
<outlet property="btmBtnViewH" destination="zvU-A1-Wlq" id="gZn-F8-1hh"/>
......@@ -35,9 +35,19 @@
<constraint firstAttribute="height" constant="1" id="2vd-kV-jwa"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Ws-Uv-Zxg">
<rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="gxN-NS-GWS"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="2Ws-Uv-Zxg" firstAttribute="leading" secondItem="H2x-8q-Enj" secondAttribute="leading" id="8pM-Ud-n3l"/>
<constraint firstAttribute="trailing" secondItem="2Ws-Uv-Zxg" secondAttribute="trailing" id="Bav-AY-AsO"/>
<constraint firstItem="2Ws-Uv-Zxg" firstAttribute="top" secondItem="H2x-8q-Enj" secondAttribute="top" id="PmK-ut-SI7"/>
<constraint firstAttribute="trailing" secondItem="H4T-Vc-LT1" secondAttribute="trailing" id="gMO-l5-X4c"/>
<constraint firstItem="H4T-Vc-LT1" firstAttribute="leading" secondItem="H2x-8q-Enj" secondAttribute="leading" id="gji-ae-evc"/>
<constraint firstItem="H4T-Vc-LT1" firstAttribute="top" secondItem="H2x-8q-Enj" secondAttribute="top" id="mt4-fp-PTo"/>
......
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