Commit bb13af3b authored by lujunye's avatar lujunye

1231adsfgasfdsafdsafd

parent 5ff9014e
...@@ -284,9 +284,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont ...@@ -284,9 +284,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont
let v2 = GoodsManageListVC() let v2 = GoodsManageListVC()
let v3 = DZSH_Mg_ViewController() let v3 = WorkCViewController()
// let v3 = WorkCViewController()1234
let v4 = WarehoseMangementListVC() let v4 = WarehoseMangementListVC()
......
...@@ -318,6 +318,8 @@ func dateConvertString(date:Date, dateFormat:String="yyyy-MM-dd") -> String { ...@@ -318,6 +318,8 @@ func dateConvertString(date:Date, dateFormat:String="yyyy-MM-dd") -> String {
// let formatValue = format.string(from: NSNumber(value: (interceptValue as NSString).doubleValue)) // let formatValue = format.string(from: NSNumber(value: (interceptValue as NSString).doubleValue))
// return formatValue! // return formatValue!
//} //}
//MARK:--数组转字符串 //MARK:--数组转字符串
func dataChangeString(sender:Array<Any>) -> String{ func dataChangeString(sender:Array<Any>) -> String{
var str = "" var str = ""
......
...@@ -24,7 +24,6 @@ class TitleAndTFCell: UITableViewCell { ...@@ -24,7 +24,6 @@ class TitleAndTFCell: UITableViewCell {
@objc func textChange(textField:UITextField){ @objc func textChange(textField:UITextField){
print("te == ",textField.text)
delegate?.textFieldContent?(content: textField.text!, cell: self) delegate?.textFieldContent?(content: textField.text!, cell: self)
} }
......
...@@ -346,8 +346,6 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -346,8 +346,6 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
HUD.flash(.label("请填写备注"), delay: 1.2) HUD.flash(.label("请填写备注"), delay: 1.2)
return return
} }
if isPass {//通过 if isPass {//通过
let data = datas![selectIdx!] let data = datas![selectIdx!]
let batchInfo:Array<Any> = [] let batchInfo:Array<Any> = []
......
...@@ -691,6 +691,10 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -691,6 +691,10 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
let vc = GYS_FX_Product_ListVc() let vc = GYS_FX_Product_ListVc()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 146://店长申请审核
let vc = DZSH_Mg_ViewController()
self.navigationController?.pushViewController(vc, animated: true)
return
default: default:
break; break;
} }
......
...@@ -7,8 +7,11 @@ ...@@ -7,8 +7,11 @@
// //
import UIKit import UIKit
import Photos
class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource, GeliAlertTextViewDelegate { class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource, GeliAlertTextViewDelegate {
var shop_id = -1 var shop_id = -1
var user_token = "" var user_token = ""
...@@ -39,28 +42,28 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -39,28 +42,28 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
var action = -1 //1为审核通过,2为审核不通过,3为审核通过待补齐资料 var action = -1 //1为审核通过,2为审核不通过,3为审核通过待补齐资料
@IBOutlet weak var list_view: UITableView! @IBOutlet weak var list_view: UITableView!
@IBAction func btm_action(_ sender: UIButton) { @IBAction func btm_action(_ sender: UIButton) {
let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.delegate = self
alterView.tag = 99
self.view.window?.addSubview(alterView)
switch sender.tag { switch sender.tag {
case 0://通过 case 0://通过
action = 1 action = 1
alterView.titleLbl.text = "请填写通过原因"
alterView.placerLbl.text = "请填写通过原因"
break break
case 1://补资料 case 1://补资料
action = 3 action = 3
alterView.titleLbl.text = "请填写需要补充的资料"
alterView.placerLbl.text = "请填写需要补充的资料"
break break
default://不通过 default://不通过
action = 2 action = 2
let alterView = GeliAlertTextView(frame: self.view.window!.bounds) alterView.tag = 992
alterView.tag = 2
alterView.delegate = self
alterView.titleLbl.text = "请填写不通过原因" alterView.titleLbl.text = "请填写不通过原因"
alterView.placerLbl.text = "请填写不通过原因(必填)" alterView.placerLbl.text = "请填写不通过原因(必填)"
self.view.window?.addSubview(alterView)
break break
} }
if action == 2 {
return
}
} }
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -159,9 +162,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -159,9 +162,9 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
return 183.5 return 183.5
} }
case 2: case 2:
if indexPath.row == 1 { // if indexPath.row == 1 {
return UITableView.automaticDimension // return UITableView.automaticDimension
} // }
if indexPath.row > 1 { if indexPath.row > 1 {
return 183.5 return 183.5
} }
...@@ -227,10 +230,10 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -227,10 +230,10 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
} }
case 1: case 1:
cell.nameLbl.text = part2[indexPath.row] cell.nameLbl.text = part2[indexPath.row]
if indexPath.row == 1{ if indexPath.row == 0{
cell.textTF.text = conect_num_str cell.textTF.text = conect_num_str
} }
if indexPath.row == 0{ if indexPath.row == 1{
cell.textTF.text = conect_name cell.textTF.text = conect_name
} }
if indexPath.row == 2 { if indexPath.row == 2 {
...@@ -253,18 +256,21 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -253,18 +256,21 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
cell.textTF.text = zhizhao_str cell.textTF.text = zhizhao_str
} }
if indexPath.row == 1 { if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell cell.textTF.text = jing_ying_fan_wei_str
cell.imgRight.constant = 0 }
cell.nameLbl.text = part3[indexPath.row] // if indexPath.row == 1 {
if jing_ying_fan_wei_str.count == 0 { // let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
cell.contentLbl.text = "等待填写" // cell.imgRight.constant = 0
cell.contentLbl.textColor = UIColor(named: "提示语字体颜色") // cell.nameLbl.text = part3[indexPath.row]
}else{ // if jing_ying_fan_wei_str.count == 0 {
cell.contentLbl.text = jing_ying_fan_wei_str // cell.contentLbl.text = "等待填写"
cell.contentLbl.textColor = UIColor(named: "标题字颜色") // cell.contentLbl.textColor = UIColor(named: "提示语字体颜色")
} // }else{
return cell // cell.contentLbl.text = jing_ying_fan_wei_str
} // cell.contentLbl.textColor = UIColor(named: "标题字颜色")
// }
// return cell
// }
if indexPath.row > 1 { if indexPath.row > 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "DZSH_UPLOAD_IMG_CELL") as! DZSH_UPLOAD_IMG_CELL let cell = tableView.dequeueReusableCell(withIdentifier: "DZSH_UPLOAD_IMG_CELL") as! DZSH_UPLOAD_IMG_CELL
cell.nameLbl.text = part3[indexPath.row] cell.nameLbl.text = part3[indexPath.row]
...@@ -312,19 +318,101 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -312,19 +318,101 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
alterView.content = intro_str alterView.content = intro_str
self.view.window?.addSubview(alterView) self.view.window?.addSubview(alterView)
} }
if indexPath.row == 6 {
_ = self.presentHGImagePicker(maxSelected:1) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
self.uploadImg(imge: image!, isOriginal: true, tag: 6)
})
}
self.list_view.reloadData()
}
}
break
case 1:
if indexPath.row == 2 {
_ = self.presentHGImagePicker(maxSelected:1) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
self.uploadImg(imge: image!, isOriginal: true, tag: 12)
})
}
self.list_view.reloadData()
}
}
break break
case 2 : case 2 :
if indexPath.row == 1 { // if indexPath.row == 1 {
let alterView = GeliAlertTextView(frame: self.view.window!.bounds) // let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.tag = 11 // alterView.tag = 11
alterView.delegate = self // alterView.delegate = self
alterView.titleLbl.text = "请填写法定经营范围" // alterView.titleLbl.text = "请填写法定经营范围"
alterView.placerLbl.text = "请填写法定经营范围..." // alterView.placerLbl.text = "请填写法定经营范围..."
alterView.content = jing_ying_fan_wei_str // alterView.content = jing_ying_fan_wei_str
self.view.window?.addSubview(alterView) // self.view.window?.addSubview(alterView)
// }
if indexPath.row == 2 {
_ = self.presentHGImagePicker(maxSelected:1) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
self.uploadImg(imge: image!, isOriginal: true, tag: 22)
})
}
self.list_view.reloadData()
}
}
if indexPath.row == 3 {
_ = self.presentHGImagePicker(maxSelected:1) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
self.uploadImg(imge: image!, isOriginal: true, tag: 23)
})
}
self.list_view.reloadData()
}
} }
break break
default: default:
_ = self.presentHGImagePicker(maxSelected:1) { (assets) in
//结果处理
print("共选择了\(assets.count)张图片,分别如下:")
let option = PHImageRequestOptions()
option.isSynchronous = true
option.isNetworkAccessAllowed = true
for asset in assets {
PHImageManager.default().requestImage(for: asset, targetSize: PHImageManagerMaximumSize , contentMode: .default , options: option, resultHandler: { (image, _: [AnyHashable : Any]?) in
// print("上传图片==\(image)")
self.uploadImg(imge: image!, isOriginal: true, tag: 0)
})
}
self.list_view.reloadData()
}
break break
} }
} }
...@@ -353,26 +441,95 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -353,26 +441,95 @@ class DZSH_Detail_ViewController: BaseViewController,UITableViewDelegate,UITable
} }
//MARK: - 不通过原因 //MARK: - 不通过原因
func sureGeliAlertTextViewAction(sender: String, view: GeliAlertTextView) { func sureGeliAlertTextViewAction(sender: String, view: GeliAlertTextView) {
let shops = [
"shop_id":shop_id as Any,
"shop_name":name as Any,
"shop_img":logo_url_str as Any,
"address":adr_str as Any,
"shop_tel":phone_str as Any,
"shop_intro":intro_str as Any,
"shop_scale":size_str as Any,
"contacts_name":conect_name as Any,
"identity_card_front":conect_id_url_str as Any,
"agreement":ruzhu_url_str as Any,
"business_licence_number":zhizhao_str as Any,
"business_sphere":jing_ying_fan_wei_str as Any,
"zhizhao":zhizhao_url_str as Any,
"food_production_license":xuke_url_str as Any
]
let shops_info = dictChangeString(sender:shops)
let dic = ["user_token":user_token as Any,
"action":action as Any,
"shop_id":shop_id as Any,
"vendor_audit_desc":sender as Any,
"reason":sender as Any,
"shop_info":shops_info as Any]
switch view.tag { switch view.tag {
case 2://不通过原因 case 99://通过,补齐资料
storeExamineOperation(dic) { (data) in
} failture: { (err) in
}
return
case 992://不通过原因
if sender.count == 0 { if sender.count == 0 {
HUD.flash(.label("请填写不通过原因"), delay: 1.2) HUD.flash(.label("请填写不通过原因"), delay: 1.2)
return return
} }
storeExamineOperation(dic) { (data) in
} failture: { (err) in
}
return return
case 4://公司简介 case 4://公司简介
intro_str = sender intro_str = sender
break break
case 11: // case 11:
jing_ying_fan_wei_str = sender // jing_ying_fan_wei_str = sender
break // break
default: default:
break break
} }
list_view.reloadData() list_view.reloadData()
} }
func uploadImg (imge:UIImage,isOriginal:Bool,tag:Int){
let upLoadImg = imge as! UIImage
HUD.show(.progress)
saveFile(image: upLoadImg, ["user_token":user_token as Any,"path":"shops" as Any], success: { (data) in
let dataM = data as! SaveFileModel
if dataM.code == 1 {
print("图片上传成功\(dataM.data?.url)")
switch tag {
case 6:
self.logo_url_str = (dataM.data?.url)!
break
case 12:
self.conect_id_url_str = (dataM.data?.url)!
break
case 22:
self.zhizhao_url_str = (dataM.data?.url)!
break
case 23:
self.xuke_url_str = (dataM.data?.url)!
break
default:
self.ruzhu_url_str = (dataM.data?.url)!
break
}
self.list_view.reloadData()
HUD.hide()
}
}) { (error) in
print("图片上传失败\(error)")
}
}
} }
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