Commit 114c91e3 authored by lujunye's avatar lujunye

待办常用位置交换

parent 7b5956c6
......@@ -1935,6 +1935,13 @@
path = "换绑支付账号(绑定,换绑)";
sourceTree = "<group>";
};
E09662CB2599807600893CAE /* 分销员收益 */ = {
isa = PBXGroup;
children = (
);
path = "分销员收益";
sourceTree = "<group>";
};
E09B039E2445AEF800211A51 /* Appdelegate */ = {
isa = PBXGroup;
children = (
......@@ -2029,6 +2036,7 @@
E09B03AD2445B0BA00211A51 /* ViewController */ = {
isa = PBXGroup;
children = (
E09662CB2599807600893CAE /* 分销员收益 */,
E077DC6725512E73000B0DA5 /* 分销商品管理 */,
E077DC5C25512489000B0DA5 /* 供应商合作管理 */,
E0AD92E62550E4DD00D82C17 /* 供应商分销商品管理 */,
......
......@@ -298,15 +298,15 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
cell.frame = tableView.bounds
cell.delegate = self
cell.layoutIfNeeded()
let arr = ["常用功能","代办事项","功能列表"]
if indexPath.row == 1{
let arr = ["待办事项","常用功能","功能列表"]
if indexPath.row == 2{
cell.gotoImgV.isHidden = false
}else{
cell.gotoImgV.isHidden = true
}
cell.dataIndexSection = indexPath.row
switch indexPath.row {
case 1:
case 2:
var tempArr:[String] = []
self.oftenArr?.forEach({ (md) in
tempArr.append(md.auth_name!)
......@@ -315,7 +315,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
cell.itemDataArrs = self.oftenArr!
cell.reloadData(title: arr[indexPath.row - 1], items: tempArr)
break
case 2:
case 1:
let tempArr:[String] = ["未发货订单","待确认订单","入库申请","出库申请","采购入库"]
cell.dataModel = self.dataModel //对本地数据库进行更新,每次进入工作中心就可以刷新啦
cell.isOften = false
......@@ -351,7 +351,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("点中cell--\(indexPath.row)")
if indexPath.row == 1 {
if indexPath.row == 2 {
let vc = EditWorkCViewController()
vc.delegate = self
vc.oftenArr = self.oftenArr
......
......@@ -64,7 +64,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
func collectionView(_ collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int {
if dataIndexSection == 1 && itemArrs.count == 0{
if dataIndexSection == 2 && itemArrs.count == 0{
return 1
}
return itemArrs.count
......@@ -79,7 +79,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
cell.bgImV.isHidden = true
//常用功能无数据处理
if dataIndexSection == 1 && itemArrs.count == 0{
if dataIndexSection == 2 && itemArrs.count == 0{
cell.itemImgV.image = UIImage.init(named: "workshangchuan")
cell.bgImV.image = UIImage.init(named: "workkuang")
cell.itemNameLbl.text = "添加"
......@@ -87,7 +87,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
return cell
}
if dataIndexSection == 2 {
if dataIndexSection == 1 {
cell.itemImgV.image = UIImage.init(named: ("work" + itemArrs[indexPath.row]))
switch indexPath.row {
case 0:
......@@ -139,11 +139,11 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if dataIndexSection == 2 {
if dataIndexSection == 1 {
delegate?.WorkItemTableViewCellBtnClick?(sender: self, idx: indexPath)
}else{
//常用功能无数据处理
if dataIndexSection == 1 && itemArrs.count == 0{
if dataIndexSection == 2 && itemArrs.count == 0{
delegate?.WorkItemNoDataTableViewCell?()
}else{
let rowModel = self.itemDataArrs[indexPath.row]
......
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