Commit 6ea18577 authored by 刘俊宏's avatar 刘俊宏

修改商品编辑跳转和提交信息

parent b7a206bd
......@@ -95,7 +95,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
tabBarController.viewControllers = [v1, v2, v3, v4, v5]
// tabBarController.selectedIndex = 2
tabBarController.selectedIndex = 1
......
......@@ -273,7 +273,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
"coun_id":"1", //国家id 1(中国)
"gs_id":gs_id as Any, //商品状态
"transportation":transportation as Any, //运输方式,1冷链,2常温,3热链
"goods_desc":"", //商品详情 html p标签
"goods_desc":goodsDesc, //商品详情 html p标签
"specifications":specifications as Any, //默认规格,选sku中最低价格(需判定阶梯价)的 规格值
"shop_price":shop_price as Any, //默认售价,选sku中最低价格(需判定阶梯价)的价格
"goods_unit":goods_unit as Any, //默认商品单位,选sku中最低价格(需判定阶梯价)的单位
......@@ -682,9 +682,11 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "AddGuiGe") as! AddGuiGeCell
cell.delegate = self
cell.tag = indexPath.section
cell.imgBtn.isUserInteractionEnabled = isAllEditing
cell.imgBtn.setImage(UIImage(named: "xinzeng"), for: .normal)
cell.imgBtn.addTarget(self, action: #selector(addGuiGe(sender:)), for: .touchUpInside)
return cell
case 3:
if indexPath.row == 0 {
......@@ -744,7 +746,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let cell = tableView.dequeueReusableCell(withIdentifier: "AddGuiGe") as! AddGuiGeCell
cell.imgBtn.isUserInteractionEnabled = isAllEditing
cell.imgBtn.tag = indexPath.row
cell.tag = indexPath.section
if goodsDesc.count > 0 {
cell.webView.isHidden = false
let headerString : String = "<header><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'><style>img{max-width:100%}</style></header>"
......@@ -754,7 +756,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
cell.imgBtn.setImage(UIImage(named: "tjxq"), for: .normal)
cell.btmH.constant = 25
cell.imgBtn.addTarget(self, action: #selector(AddGuiGeCellClick(cell:)), for: .touchUpInside)
cell.delegate = self
return cell
}
......@@ -773,11 +775,23 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
self.navigationController?.pushViewController(vc, animated: true)
}
func AddGuiGeCellClick(cell: AddGuiGeCell) {
print("akkd == ",cell.tag)
if cell.tag == 5 {
let vc = LMNoteViewController()
vc.htmlStr = goodsDesc;
vc.delegatedata = self
self.navigationController?.pushViewController(vc, animated: true)
}else{
print("新增规格")
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: true)
}
}
//MARK: -- 点击按钮事件,跳转或者展示选择界面
......@@ -1190,7 +1204,6 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
//MARK: - 新增规格
@objc func addGuiGe(sender:UIView){
print("新增规格")
let vc = CreatNewSpecsViewController()
vc.barTitle = "新增规格"
......@@ -1200,6 +1213,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
vc.datasArr = guiGeArr
vc.selectIdx = selectIdx
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK: - 新增、编辑规格数据返回
......
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