Commit d8a56224 authored by lujunye's avatar lujunye

规格编辑完成

parent b6e10e1a
...@@ -17,6 +17,17 @@ protocol EPViewControllerDelegate { ...@@ -17,6 +17,17 @@ protocol EPViewControllerDelegate {
} }
class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate, LMNoteViewControllerDelegate,GeliAlertViewDelegate{ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate, LMNoteViewControllerDelegate,GeliAlertViewDelegate{
func CreatNewSpecsViewControllerCreateNew(datas: Array<GuiGeModel>, selectIdx: IndexPath) {
let vc = CreatNewSpecsViewController()
vc.barTitle = "新增规格"
vc.delegate = self
vc.danWeiArr = generalInfoModel?.data!.unit
vc.isYuShouSetting = isYuShouShangPin!
vc.datasArr = guiGeArr
vc.selectIdx = selectIdx
self.navigationController?.pushViewController(vc, animated: false)
}
func CheckCellBtnClick(sender: UIButton, cell: AddImgCell) { func CheckCellBtnClick(sender: UIButton, cell: AddImgCell) {
let browser = JXPhotoBrowser() let browser = JXPhotoBrowser()
browser.numberOfItems = { browser.numberOfItems = {
......
...@@ -18,6 +18,10 @@ protocol ProductDetailViewControllerDelegate { ...@@ -18,6 +18,10 @@ protocol ProductDetailViewControllerDelegate {
} }
class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate,LMNoteViewControllerDelegate, GeliAlertViewDelegate{ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate,LMNoteViewControllerDelegate, GeliAlertViewDelegate{
func CreatNewSpecsViewControllerCreateNew(datas: Array<GuiGeModel>, selectIdx: IndexPath) {
//此处无用
}
func CheckCellBtnClick(sender: UIButton, cell: AddImgCell) { func CheckCellBtnClick(sender: UIButton, cell: AddImgCell) {
} }
......
...@@ -13,6 +13,7 @@ import IQKeyboardManagerSwift ...@@ -13,6 +13,7 @@ import IQKeyboardManagerSwift
protocol CreatNewSpecsViewControllerDelegate { protocol CreatNewSpecsViewControllerDelegate {
func CreatNewSpecsViewControllerSaveAction(datas:Array<GuiGeModel>,selectIdx:IndexPath) func CreatNewSpecsViewControllerSaveAction(datas:Array<GuiGeModel>,selectIdx:IndexPath)
func CreatNewSpecsViewControllerDeleteAction(datas:Array<GuiGeModel>,selectIdx:IndexPath) func CreatNewSpecsViewControllerDeleteAction(datas:Array<GuiGeModel>,selectIdx:IndexPath)
func CreatNewSpecsViewControllerCreateNew(datas:Array<GuiGeModel>,selectIdx:IndexPath)
} }
class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndTFCellDelegate,TitleAndBtnCellDelegate,TitleAndSwitchCellDelegate,TitleAndSwitchHeaderViewDelegate,NewCreateHeaderDelegate,NewCreateFooterDelegate,YuShouCellDelegate,GLAlertSelectViewDelegate,PuTongJieTiCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,UITextFieldDelegate{ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndTFCellDelegate,TitleAndBtnCellDelegate,TitleAndSwitchCellDelegate,TitleAndSwitchHeaderViewDelegate,NewCreateHeaderDelegate,NewCreateFooterDelegate,YuShouCellDelegate,GLAlertSelectViewDelegate,PuTongJieTiCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,UITextFieldDelegate{
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) { func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
...@@ -27,6 +28,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -27,6 +28,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
view.removeFromSuperview() view.removeFromSuperview()
selectView = nil selectView = nil
} }
func rightBtnClick() {
self.navigationController?.popViewController(animated: false)
delegate?.CreatNewSpecsViewControllerCreateNew(datas: datasArr, selectIdx: selectIdx!)
}
var ysKuCun:String = ""//预售库存 var ysKuCun:String = ""//预售库存
var DJBiLi:String = ""//定金比例(最低1%,最高20%) var DJBiLi:String = ""//定金比例(最低1%,最高20%)
var yuShouPrice:String = ""//预售价格 var yuShouPrice:String = ""//预售价格
...@@ -97,7 +102,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -97,7 +102,10 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
btmLbl.isHidden = true btmLbl.isHidden = true
btmLblH.constant = 0 btmLblH.constant = 0
} }
if datasArr.count > 1 && barTitle!.contains("编辑") == true {//展示topbar if barTitle!.contains("编辑") {
navbar.rightTitle = "新增"
}
if datasArr.count > 1 && barTitle!.contains("新增") == false {//展示topbar
SetTopFrame(view: topBarView, height: 41) SetTopFrame(view: topBarView, height: 41)
if collectView == nil { if collectView == nil {
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" 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"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<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"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
......
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