Commit 536446e3 authored by lujunye's avatar lujunye

更新下运单样式,重开京东

parent e5f5a236
...@@ -129,6 +129,7 @@ extension NetworkRequest { ...@@ -129,6 +129,7 @@ extension NetworkRequest {
UserDefaults.standard.removeObject(forKey: "WorkDataModel") UserDefaults.standard.removeObject(forKey: "WorkDataModel")
UserDefaults.standard.removeObject(forKey: "user_token") UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.removeObject(forKey: "userName")
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil) NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
JPUSHService.deleteAlias({ (resCode, alias, num) in JPUSHService.deleteAlias({ (resCode, alias, num) in
......
...@@ -526,9 +526,10 @@ ...@@ -526,9 +526,10 @@
[[PHImageManager defaultManager] requestImageForAsset:asset targetSize:targetSize contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage *result, NSDictionary *info) { [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:targetSize contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage *result, NSDictionary *info) {
//请求上传图片 //请求上传图片
NSString *token = [[NSUserDefaults standardUserDefaults]stringForKey:@"user_token"];
TestClass *model = [[TestClass alloc]init]; TestClass *model = [[TestClass alloc]init];
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:10]; NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:10];
[dict setValue:@"RQdwz5QKpeg=" forKey:@"user_token"]; [dict setValue:token forKey:@"user_token"];
[model saveFileWithImage:result params:dict success:^(NSDictionary<NSString *,id> * data) { [model saveFileWithImage:result params:dict success:^(NSDictionary<NSString *,id> * data) {
if ([[NSString stringWithFormat:@"%@",data[@"code"]]isEqualToString:@"1"]) { if ([[NSString stringWithFormat:@"%@",data[@"code"]]isEqualToString:@"1"]) {
......
...@@ -39,6 +39,8 @@ class LogisticalSelectView: UIView { ...@@ -39,6 +39,8 @@ class LogisticalSelectView: UIView {
@IBOutlet weak var xyAgreeLbl: UILabel! @IBOutlet weak var xyAgreeLbl: UILabel!
@IBOutlet weak var sfPriceLbl: UILabel! @IBOutlet weak var sfPriceLbl: UILabel!
@IBOutlet weak var jdPriceLbl: UILabel! @IBOutlet weak var jdPriceLbl: UILabel!
var SFtempArr:Array<UILabel> = [] var SFtempArr:Array<UILabel> = []
var SFfuTitleArr:Array<String> = [] { var SFfuTitleArr:Array<String> = [] {
didSet { didSet {
...@@ -46,7 +48,7 @@ class LogisticalSelectView: UIView { ...@@ -46,7 +48,7 @@ class LogisticalSelectView: UIView {
SFtempArr.forEach { (item) in SFtempArr.forEach { (item) in
item.removeFromSuperview() item.removeFromSuperview()
} }
selectBgHeight.constant = CGFloat(270) selectBgHeight.constant = CGFloat(340)
xyTop.constant = CGFloat(0) xyTop.constant = CGFloat(0)
sflineBottom.constant = CGFloat(0) sflineBottom.constant = CGFloat(0)
...@@ -67,7 +69,7 @@ class LogisticalSelectView: UIView { ...@@ -67,7 +69,7 @@ class LogisticalSelectView: UIView {
xyTop.constant = CGFloat(SFfuTitleArr.count * 19) xyTop.constant = CGFloat(SFfuTitleArr.count * 19)
sflineBottom.constant = CGFloat(-(SFfuTitleArr.count * 19)) sflineBottom.constant = CGFloat(-(SFfuTitleArr.count * 19))
selectBgHeight.constant = CGFloat(270 + SFfuTitleArr.count * 19) selectBgHeight.constant = CGFloat(340 + SFfuTitleArr.count * 19)
} }
} }
...@@ -78,7 +80,7 @@ class LogisticalSelectView: UIView { ...@@ -78,7 +80,7 @@ class LogisticalSelectView: UIView {
XYtempArr.forEach { (item) in XYtempArr.forEach { (item) in
item.removeFromSuperview() item.removeFromSuperview()
} }
selectBgHeight.constant = CGFloat(270) selectBgHeight.constant = CGFloat(340)
return return
} }
for i in 0..<XYfuTitleArr.count { for i in 0..<XYfuTitleArr.count {
...@@ -93,7 +95,7 @@ class LogisticalSelectView: UIView { ...@@ -93,7 +95,7 @@ class LogisticalSelectView: UIView {
} }
XYtempArr.append(lbl) XYtempArr.append(lbl)
} }
selectBgHeight.constant = CGFloat(270 + XYfuTitleArr.count * 19) selectBgHeight.constant = CGFloat(340 + XYfuTitleArr.count * 19)
} }
} }
...@@ -167,7 +169,7 @@ class LogisticalSelectView: UIView { ...@@ -167,7 +169,7 @@ class LogisticalSelectView: UIView {
func setJD(){ func setJD(){
jdBgViewH.constant = 0 jdBgViewH.constant = 0
jdBgView.isHidden = true jdBgView.isHidden = true
selectBgHeight.constant = CGFloat(270) selectBgHeight.constant = CGFloat(340)
} }
func setSF(){ func setSF(){
......
...@@ -22,26 +22,26 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{ ...@@ -22,26 +22,26 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{
} }
@IBOutlet weak var countTf: UITextField! @IBOutlet weak var countTf: UITextField!
@IBOutlet weak var weightTf: UITextField! @IBOutlet weak var weightTf: UITextField!
@IBOutlet weak var gaoTf: UITextField! // @IBOutlet weak var gaoTf: UITextField!
@IBOutlet weak var kuanTf: UITextField! // @IBOutlet weak var kuanTf: UITextField!
@IBOutlet weak var changTf: UITextField! // @IBOutlet weak var changTf: UITextField!
@IBOutlet weak var itemBaoTf: UITextField!//寄托物品包装 @IBOutlet weak var itemBaoTf: UITextField!//寄托物品包装
@IBAction func jiaJianMethod(_ sender: UIButton) { @IBAction func jiaJianMethod(_ sender: UIButton) {
switch sender.tag { switch sender.tag {
case 0: case 0:
changTf.text = "" // changTf.text = ""
kuanTf.text = "" // kuanTf.text = ""
gaoTf.text = "" // gaoTf.text = ""
var str = tiJiTF.text as! NSString var str = tiJiTF.text as! NSString
str = "\(str.integerValue + 1)" as NSString str = "\(str.integerValue + 1)" as NSString
tiJiTF.text = str as String tiJiTF.text = str as String
break break
case 1: case 1:
changTf.text = "" // changTf.text = ""
kuanTf.text = "" // kuanTf.text = ""
gaoTf.text = "" // gaoTf.text = ""
var str = tiJiTF.text as! NSString var str = tiJiTF.text as! NSString
if str.integerValue > 1 { if str.integerValue > 1 {
str = "\(str.integerValue - 1)" as NSString str = "\(str.integerValue - 1)" as NSString
...@@ -84,7 +84,7 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{ ...@@ -84,7 +84,7 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{
let tiji = tiJiTF.text as! NSString let tiji = tiJiTF.text as! NSString
let weight = weightTf.text as! NSString let weight = weightTf.text as! NSString
let count = countTf.text as! NSString let count = countTf.text as! NSString
delegate?.JiTuoWuXinXiViewSubmit(itemName: itemNameTF.text!,itemBaoName:itemBaoTf.text!, tiJi: tiji.floatValue, weight: weight.floatValue, count: count.integerValue, isCheck: infoSw.isOn,chang: changTf.text,kuang: kuanTf.text,gao: gaoTf.text) delegate?.JiTuoWuXinXiViewSubmit(itemName: itemNameTF.text!,itemBaoName:itemBaoTf.text!, tiJi: tiji.floatValue, weight: weight.floatValue, count: count.integerValue, isCheck: infoSw.isOn,chang: "",kuang: "",gao: "")
} }
@IBOutlet weak var tiJiTF: UITextField! @IBOutlet weak var tiJiTF: UITextField!
@IBOutlet weak var itemNameTF: UITextField! @IBOutlet weak var itemNameTF: UITextField!
...@@ -100,30 +100,30 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{ ...@@ -100,30 +100,30 @@ class JiTuoWuXinXiView: UIView,UITextFieldDelegate{
masklayer.path = maskPath.cgPath masklayer.path = maskPath.cgPath
bottomView.layer.mask = masklayer bottomView.layer.mask = masklayer
changTf.delegate = self // changTf.delegate = self
kuanTf.delegate = self // kuanTf.delegate = self
gaoTf.delegate = self // gaoTf.delegate = self
tiJiTF.delegate = self tiJiTF.delegate = self
changTf.keyboardType = .numberPad // changTf.keyboardType = .numberPad
kuanTf.keyboardType = .numberPad // kuanTf.keyboardType = .numberPad
gaoTf.keyboardType = .numberPad // gaoTf.keyboardType = .numberPad
} }
func textFieldDidEndEditing(_ textField: UITextField) { func textFieldDidEndEditing(_ textField: UITextField) {
if textField == tiJiTF { // if textField == tiJiTF {
changTf.text = "" // changTf.text = ""
kuanTf.text = "" // kuanTf.text = ""
gaoTf.text = "" // gaoTf.text = ""
} // }
if changTf.text!.count > 0 && kuanTf.text!.count > 0 && gaoTf.text!.count > 0 { // if changTf.text!.count > 0 && kuanTf.text!.count > 0 && gaoTf.text!.count > 0 {
let chang = changTf.text as! NSString // let chang = changTf.text as! NSString
let kuan = kuanTf.text as! NSString // let kuan = kuanTf.text as! NSString
let gao = gaoTf.text as! NSString // let gao = gaoTf.text as! NSString
let c = chang.floatValue / 100 // let c = chang.floatValue / 100
let k = kuan.floatValue / 100 // let k = kuan.floatValue / 100
let g = gao.floatValue / 100 // let g = gao.floatValue / 100
tiJiTF.text = String(format: "%.2f", c * k * g) // tiJiTF.text = String(format: "%.2f", c * k * g)
} // }
} }
//初始化时将xib中的view添加进来 //初始化时将xib中的view添加进来
......
...@@ -670,7 +670,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -670,7 +670,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
let alertView = LogisticalSelectView(frame: self.view.window!.bounds) let alertView = LogisticalSelectView(frame: self.view.window!.bounds)
alertView.delegate = self alertView.delegate = self
if logPayPriceModel?.price_jd != nil {
alertView.jdPriceLbl.text = "京东物流(预估运费" + String(format: "%.2f", (logPayPriceModel?.price_jd)!) + "元)"
}
if logPayPriceModel?.price_sf != nil { if logPayPriceModel?.price_sf != nil {
alertView.sfPriceLbl.text = "顺丰冷运(预估运费" + String(format: "%.2f", (logPayPriceModel?.price_sf)!) + "元)" alertView.sfPriceLbl.text = "顺丰冷运(预估运费" + String(format: "%.2f", (logPayPriceModel?.price_sf)!) + "元)"
} }
...@@ -681,7 +683,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -681,7 +683,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
alertView.setJD() // alertView.setJD()
weak_alertView = alertView weak_alertView = alertView
} }
...@@ -689,6 +691,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -689,6 +691,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
func LogisticalSelectViewBtnclick(idx:Int){ func LogisticalSelectViewBtnclick(idx:Int){
weak_alertView?.SFfuTitleArr = [] weak_alertView?.SFfuTitleArr = []
weak_alertView?.XYfuTitleArr = [] weak_alertView?.XYfuTitleArr = []
if idx == 1{ if idx == 1{
var futitleArr:Array<String> = [] var futitleArr:Array<String> = []
logPayPriceModel?.sf_data?.forEach({ (model) in logPayPriceModel?.sf_data?.forEach({ (model) in
...@@ -1486,9 +1489,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -1486,9 +1489,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
jtwxxView?.weightTf.text = String(format: "%.f", (weight)!) jtwxxView?.weightTf.text = String(format: "%.f", (weight)!)
jtwxxView?.countTf.text = String(format: "%.d", (count)!) jtwxxView?.countTf.text = String(format: "%.d", (count)!)
jtwxxView?.infoSw.isOn = isCheck! jtwxxView?.infoSw.isOn = isCheck!
jtwxxView?.changTf.text = chang // jtwxxView?.changTf.text = chang
jtwxxView?.kuanTf.text = kuang // jtwxxView?.kuanTf.text = kuang
jtwxxView?.gaoTf.text = gao // jtwxxView?.gaoTf.text = gao
jtwxxView?.itemBaoTf.text = self.itemBaoName jtwxxView?.itemBaoTf.text = self.itemBaoName
} }
} }
......
...@@ -66,6 +66,7 @@ class ChangePassViewController: BaseViewController { ...@@ -66,6 +66,7 @@ class ChangePassViewController: BaseViewController {
HUD.flash(.label("请重新登录"), delay: 1.5) HUD.flash(.label("请重新登录"), delay: 1.5)
delay(1.5){ delay(1.5){
UserDefaults.standard.removeObject(forKey: "user_token") UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.removeObject(forKey: "userName")
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil) NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
} }
......
...@@ -109,6 +109,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -109,6 +109,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
super.viewDidLoad() super.viewDidLoad()
navbar.title = "地址管理" navbar.title = "地址管理"
self.view.addSubview(navbar) self.view.addSubview(navbar)
self.holder_view.isHidden = true
if isSelectlogAddress { if isSelectlogAddress {
navbar.title = "地址选择" navbar.title = "地址选择"
HUD.flash(.progress) HUD.flash(.progress)
...@@ -116,6 +117,9 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -116,6 +117,9 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
getAddr(["user_token":UserToken as Any], success: { (data) in getAddr(["user_token":UserToken as Any], success: { (data) in
self.adrInfo = (data as! GetAddrsInfoModel) self.adrInfo = (data as! GetAddrsInfoModel)
if self.adrInfo?.data?.count == 0 {
self.holder_view.isHidden = false
}
self.listView.reloadData() self.listView.reloadData()
HUD.hide() HUD.hide()
}) { (error) in }) { (error) in
...@@ -127,6 +131,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData ...@@ -127,6 +131,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
searchBgH.constant = 0 searchBgH.constant = 0
getAddrsInfo(["user_token":UserToken as Any,"cus_id":cus_id as Any], success: { (data) in getAddrsInfo(["user_token":UserToken as Any,"cus_id":cus_id as Any], success: { (data) in
self.adrInfo = (data as! GetAddrsInfoModel) self.adrInfo = (data as! GetAddrsInfoModel)
if self.adrInfo?.data?.count == 0 {
self.holder_view.isHidden = false
}
self.listView.reloadData() self.listView.reloadData()
HUD.hide() HUD.hide()
}) { (error) in }) { (error) in
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<constraint firstAttribute="trailing" secondItem="4o7-3y-vAM" secondAttribute="trailing" id="kNH-yD-Ob3"/> <constraint firstAttribute="trailing" secondItem="4o7-3y-vAM" secondAttribute="trailing" id="kNH-yD-Ob3"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DR7-L3-keQ"> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DR7-L3-keQ">
<rect key="frame" x="0.0" y="89" width="414" height="724"/> <rect key="frame" x="0.0" y="89" width="414" height="724"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="无数据2" translatesAutoresizingMaskIntoConstraints="NO" id="EVe-xn-vda"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="无数据2" translatesAutoresizingMaskIntoConstraints="NO" id="EVe-xn-vda">
......
...@@ -443,8 +443,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -443,8 +443,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 53: //销售下单-代客下单 case 53: //销售下单-代客下单
let vc = DaiKeXiaDanGouWuViewController() // let vc = DaiKeXiaDanGouWuViewController()
// let vc = PrintListMgVc() let vc = PrintListMgVc()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
case 54: //扫码下单 case 54: //扫码下单
......
...@@ -11,13 +11,20 @@ import Parchment ...@@ -11,13 +11,20 @@ import Parchment
import LGButton import LGButton
class PrintListMgVc: BaseViewController, PagingViewControllerDelegate { class PrintListMgVc: BaseViewController, PagingViewControllerDelegate {
@IBAction func check_detail(_ sender: UIButton) {
print("check_detail")
}
@IBAction func print_action(_ sender: LGButton) { @IBAction func print_action(_ sender: LGButton) {
if userName != "不二制油" { //普通
let vc = viewControllers[selectIndex]
if selectIndex != 0 { }else{//不二
print(vc.FM_str,vc.detail_adr_str,vc.phone_str,vc.contect_str) let vc = viewControllers[selectIndex]
if selectIndex != 0 {
print(vc.FM_str,vc.detail_adr_str,vc.phone_str,vc.contect_str)
}
} }
} }
@IBOutlet weak var contentV: UIView! @IBOutlet weak var contentV: UIView!
...@@ -39,6 +46,11 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate { ...@@ -39,6 +46,11 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate {
//头部滚动视图 //头部滚动视图
weak var pagingVC : PagingViewController? weak var pagingVC : PagingViewController?
@IBOutlet weak var holder_img: UIImageView!
let UserToken = UserDefaults.standard.value(forKey: "user_token")
let userName = UserDefaults.standard.string(forKey: "userName")
@IBOutlet weak var normal_type_btn: UIButton!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
navbar.title = "打印模版确认" navbar.title = "打印模版确认"
...@@ -46,25 +58,35 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate { ...@@ -46,25 +58,35 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate {
self.view.addSubview(navbar) self.view.addSubview(navbar)
SetTopFrameView(view: contentV, btmView: self.view) SetTopFrameView(view: contentV, btmView: self.view)
let pagingViewController = PagingViewController(viewControllers: viewControllers) if userName != "不二制油" {
pagingViewController.indicatorColor = UIColor.init(named: "蓝色字体颜色")! normal_type_btn.isHidden = false
pagingViewController.menuItemSize = .fixed(width: 0, height: 44*glscale) }else{
pagingViewController.font = UIFont.systemFont(ofSize: 13) normal_type_btn.isHidden = true
pagingViewController.selectedFont = UIFont.systemFont(ofSize: 13) let pagingViewController = PagingViewController(viewControllers: viewControllers)
pagingViewController.textColor = UIColor.init(named: "灰色字体颜色")! pagingViewController.indicatorColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.selectedTextColor = UIColor.init(named: "蓝色字体颜色")! pagingViewController.menuItemSize = .fixed(width: 0, height: 44*glscale)
pagingViewController.delegate = self pagingViewController.font = UIFont.systemFont(ofSize: 13)
pagingViewController.dataSource = self pagingViewController.selectedFont = UIFont.systemFont(ofSize: 13)
pagingViewController.sizeDelegate = self pagingViewController.textColor = UIColor.init(named: "灰色字体颜色")!
addChild(pagingViewController) pagingViewController.selectedTextColor = UIColor.init(named: "蓝色字体颜色")!
contentV.addSubview(pagingViewController.view) pagingViewController.delegate = self
contentV.backgroundColor = UIColor(named: "app底色")! pagingViewController.dataSource = self
contentV.constrainToEdges(pagingViewController.view) pagingViewController.sizeDelegate = self
pagingViewController.didMove(toParent: self) addChild(pagingViewController)
pagingVC = pagingViewController contentV.addSubview(pagingViewController.view)
contentV.backgroundColor = UIColor(named: "app底色")!
contentV.constrainToEdges(pagingViewController.view)
pagingViewController.didMove(toParent: self)
pagingVC = pagingViewController
}
holder_img.isHidden = normal_type_btn.isHidden
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
@IBOutlet weak var btm_lbl: UILabel!
func pagingViewController( func pagingViewController(
_ pagingViewController: PagingViewController, _ pagingViewController: PagingViewController,
didScrollToItem pagingItem: PagingItem, didScrollToItem pagingItem: PagingItem,
...@@ -75,7 +97,7 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate { ...@@ -75,7 +97,7 @@ class PrintListMgVc: BaseViewController, PagingViewControllerDelegate {
guard let item = pagingItem as? PagingIndexItem else { return} guard let item = pagingItem as? PagingIndexItem else { return}
if selectIndex != item.index { if selectIndex != item.index {
selectIndex = item.index selectIndex = item.index
} }
} }
} }
......
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PrintListMgVc" customModule="TestClass" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PrintListMgVc" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="btm_lbl" destination="GVM-RK-kDz" id="ylh-ra-iZO"/>
<outlet property="contentV" destination="csb-7S-KV5" id="Fc6-4G-C1V"/> <outlet property="contentV" destination="csb-7S-KV5" id="Fc6-4G-C1V"/>
<outlet property="holder_img" destination="YMY-lm-aa2" id="ozd-BX-aAI"/>
<outlet property="normal_type_btn" destination="dit-qO-w20" id="WUj-ye-kqr"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
</placeholder> </placeholder>
...@@ -23,7 +26,32 @@ ...@@ -23,7 +26,32 @@
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="csb-7S-KV5"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="csb-7S-KV5">
<rect key="frame" x="0.0" y="44" width="414" height="774"/> <rect key="frame" x="0.0" y="44" width="414" height="774"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="print_img" translatesAutoresizingMaskIntoConstraints="NO" id="YMY-lm-aa2">
<rect key="frame" x="8" y="15" width="398" height="212.5"/>
<constraints>
<constraint firstAttribute="width" secondItem="YMY-lm-aa2" secondAttribute="height" multiplier="15:8" id="M2P-wM-MmU"/>
</constraints>
</imageView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dit-qO-w20">
<rect key="frame" x="15" y="15" width="384" height="250.5"/>
<constraints>
<constraint firstAttribute="width" secondItem="dit-qO-w20" secondAttribute="height" multiplier="23:15" id="1p1-mq-wEu"/>
</constraints>
<connections>
<action selector="check_detail:" destination="-1" eventType="touchUpInside" id="0Ou-Vc-t2Y"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="dit-qO-w20" firstAttribute="leading" secondItem="csb-7S-KV5" secondAttribute="leading" constant="15" id="4Xf-RG-R2P"/>
<constraint firstAttribute="trailing" secondItem="YMY-lm-aa2" secondAttribute="trailing" constant="8" id="Dsu-uO-mpS"/>
<constraint firstItem="YMY-lm-aa2" firstAttribute="top" secondItem="csb-7S-KV5" secondAttribute="top" constant="15" id="Fzk-gI-t1a"/>
<constraint firstAttribute="trailing" secondItem="dit-qO-w20" secondAttribute="trailing" constant="15" id="cOk-zh-xKI"/>
<constraint firstItem="dit-qO-w20" firstAttribute="top" secondItem="csb-7S-KV5" secondAttribute="top" constant="15" id="f39-q1-ndD"/>
<constraint firstItem="YMY-lm-aa2" firstAttribute="leading" secondItem="csb-7S-KV5" secondAttribute="leading" constant="8" id="qiw-yV-pKq"/>
</constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zM2-Kx-oSf" customClass="LGButton" customModule="LGButton"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zM2-Kx-oSf" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="818" width="414" height="78"/> <rect key="frame" x="0.0" y="818" width="414" height="78"/>
...@@ -75,6 +103,7 @@ ...@@ -75,6 +103,7 @@
</designable> </designable>
</designables> </designables>
<resources> <resources>
<image name="print_img" width="355" height="210"/>
<namedColor name="按钮渐变色上"> <namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
...@@ -203,6 +203,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel ...@@ -203,6 +203,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
login(["user_name":phoneTF.text as Any,"pwd":passTF.text as Any], success: { (data) in login(["user_name":phoneTF.text as Any,"pwd":passTF.text as Any], success: { (data) in
let dataM = data as! LoginModel let dataM = data as! LoginModel
UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token") UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.set(dataM.data?.user_name, forKey: "userName")
UserDefaults.standard.synchronize() UserDefaults.standard.synchronize()
self.loginBtn.isLoading = false self.loginBtn.isLoading = false
self.delegate?.successLogin() self.delegate?.successLogin()
...@@ -232,6 +234,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel ...@@ -232,6 +234,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
mobileLogin(["mobile":phoneLogInputTF.text as Any,"auth_code":phoneLogCodeTF.text as Any], success: { (data) in mobileLogin(["mobile":phoneLogInputTF.text as Any,"auth_code":phoneLogCodeTF.text as Any], success: { (data) in
let dataM = data as! LoginModel let dataM = data as! LoginModel
UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token") UserDefaults.standard.set(dataM.data?.user_token, forKey: "user_token")
UserDefaults.standard.set(dataM.data?.user_name, forKey: "userName")
UserDefaults.standard.synchronize() UserDefaults.standard.synchronize()
self.loginBtn.isLoading = false self.loginBtn.isLoading = false
self.delegate?.successLogin() self.delegate?.successLogin()
......
...@@ -1218,58 +1218,58 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1218,58 +1218,58 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
switch status { switch status {
case 0: case 0:
// str = "未确定" "待付款" // str = "未确定" "待付款"
titleArr = ["修改价格","拒绝接单","先货后款","同意接单"] titleArr = ["打印","修改价格","拒绝接单","先货后款","同意接单"]
if self.dataMdoel!.order_res?.goods_before_pay == 1 { if self.dataMdoel!.order_res?.goods_before_pay == 1 {
titleArr = ["修改价格","拒绝接单","同意接单"] titleArr = ["打印","修改价格","拒绝接单","同意接单"]
} }
break break
case 1: case 1:
// str = "已确定" "待付款" // str = "已确定" "待付款"
titleArr = ["修改价格","付款码","取消订单"] titleArr = ["打印","修改价格","付款码","取消订单"]
if self.dataMdoel!.order_res?.shipping_status == 1 && self.dataMdoel!.order_res?.pay_status != 2 { if self.dataMdoel!.order_res?.shipping_status == 1 && self.dataMdoel!.order_res?.pay_status != 2 {
titleArr = ["修改价格","付款码","退货"] titleArr = ["打印","修改价格","付款码","退货"]
} }
break break
case 6: case 6:
// str = "待发货" // str = "待发货"
if self.dataMdoel?.order_res?.from == 3 || self.dataMdoel?.order_res?.from == 5 { if self.dataMdoel?.order_res?.from == 3 || self.dataMdoel?.order_res?.from == 5 {
titleArr = ["取消订单并退款","发货"] titleArr = ["打印","取消订单并退款","发货"]
if self.dataMdoel!.order_res?.pay_status != 2{ if self.dataMdoel!.order_res?.pay_status != 2{
titleArr = ["确认收款","取消订单","发货"] titleArr = ["打印","确认收款","取消订单","发货"]
} }
}else{ }else{
titleArr = ["退款","发货"] titleArr = ["打印","退款","发货"]
if self.dataMdoel!.order_res?.pay_status != 2{ if self.dataMdoel!.order_res?.pay_status != 2{
titleArr = ["取消订单","发货"] titleArr = ["打印","取消订单","发货"]
} }
if self.dataMdoel!.order_res?.goods_before_pay == 1 && lmIdx == 1{ if self.dataMdoel!.order_res?.goods_before_pay == 1 && lmIdx == 1{
titleArr.insert("付款码", at: 0) titleArr.insert("付款码", at: 0)
} }
} }
if self.dataMdoel?.order_res?.apply_cancel == 1 { if self.dataMdoel?.order_res?.apply_cancel == 1 {
titleArr = ["同意取消订单","拒绝取消订单"] titleArr = ["打印","同意取消订单","拒绝取消订单"]
} }
break break
case 7: case 7:
// str = "待收货" // str = "待收货"
if self.dataMdoel?.order_res?.from == 3 || self.dataMdoel?.order_res?.from == 5 { if self.dataMdoel?.order_res?.from == 3 || self.dataMdoel?.order_res?.from == 5 {
titleArr = ["退款","退款退货","确认收货"] titleArr = ["打印","退款","退款退货","确认收货"]
if self.dataMdoel?.order_res?.pay_status != 2{//未收款 if self.dataMdoel?.order_res?.pay_status != 2{//未收款
titleArr = ["取消订单","确认收款","确认收货"] titleArr = ["打印","取消订单","确认收款","确认收货"]
} }
}else{ }else{
titleArr = ["退款"] titleArr = ["打印","退款"]
if self.dataMdoel?.order_res?.pay_status != 2 { if self.dataMdoel?.order_res?.pay_status != 2 {
titleArr = ["取消订单"] titleArr = ["打印","取消订单"]
} }
if self.dataMdoel?.order_res?.goods_before_pay == 1 && lmIdx == 1{ if self.dataMdoel?.order_res?.goods_before_pay == 1 && lmIdx == 1{
titleArr = ["付款码","取消订单"] titleArr = ["打印","付款码","取消订单"]
} }
} }
if self.dataMdoel?.order_res?.apply_cancel == 1 { if self.dataMdoel?.order_res?.apply_cancel == 1 {
titleArr = ["同意取消订单","拒绝取消订单"] titleArr = ["打印","同意取消订单","拒绝取消订单"]
} }
break break
//订单完成 //订单完成
...@@ -1279,10 +1279,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1279,10 +1279,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case 9: case 9:
// 退款中 // 退款中
if self.dataMdoel!.order_res?.order_status_d == 91 && self.dataMdoel!.order_res?.from == 3 || self.dataMdoel!.order_res?.from == 5 { if self.dataMdoel!.order_res?.order_status_d == 91 && self.dataMdoel!.order_res?.from == 3 || self.dataMdoel!.order_res?.from == 5 {
titleArr = ["确认收到退款"] titleArr = ["打印","确认收到退款"]
} }
if self.dataMdoel!.order_res?.order_status_d == 93 { if self.dataMdoel!.order_res?.order_status_d == 93 {
titleArr = ["确认收到退货"] titleArr = ["打印","确认收到退货"]
} }
break break
//订单关闭 //订单关闭
...@@ -1290,10 +1290,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1290,10 +1290,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
titleArr = [] titleArr = []
break break
case 10: case 10:
titleArr = ["退款退货"] titleArr = ["打印","退款退货"]
if self.dataMdoel!.order_res?.pay_status != 2 { if self.dataMdoel!.order_res?.pay_status != 2 {
titleArr = ["取消订单"] titleArr = ["打印","取消订单"]
} }
if self.dataMdoel!.order_res?.from == 3 || self.dataMdoel!.order_res?.from == 5 { if self.dataMdoel!.order_res?.from == 3 || self.dataMdoel!.order_res?.from == 5 {
titleArr.append("确认收款") titleArr.append("确认收款")
...@@ -1305,15 +1305,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1305,15 +1305,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break break
case 11: case 11:
titleArr = ["查看订单"] titleArr = ["打印","查看订单"]
if self.dataMdoel!.order_res?.order_status_d == 111 || self.dataMdoel!.order_res?.order_status_d == 112 || self.dataMdoel!.order_res?.order_status_d == 113{ if self.dataMdoel!.order_res?.order_status_d == 111 || self.dataMdoel!.order_res?.order_status_d == 112 || self.dataMdoel!.order_res?.order_status_d == 113{
titleArr = ["同意退款","拒绝退款"] titleArr = ["打印","同意退款","拒绝退款"]
} }
if self.dataMdoel!.order_res?.order_status_d == 114 || self.dataMdoel!.order_res?.order_status_d == 115 { if self.dataMdoel!.order_res?.order_status_d == 114 || self.dataMdoel!.order_res?.order_status_d == 115 {
titleArr = ["同意退货","拒绝退货"] titleArr = ["打印","同意退货","拒绝退货"]
} }
if self.dataMdoel!.order_res?.order_status_d == 116 || self.dataMdoel!.order_res?.order_status_d == 117 { if self.dataMdoel!.order_res?.order_status_d == 116 || self.dataMdoel!.order_res?.order_status_d == 117 {
titleArr = ["同意退款退货","拒绝退款退货"] titleArr = ["打印","同意退款退货","拒绝退款退货"]
} }
break break
default: default:
...@@ -1367,7 +1367,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1367,7 +1367,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
case "打印": case "打印":
//暂无 //暂无
print("暂无") print("暂无")
HUD.flash(.label("打印功能开发中"),delay: 1.2) // HUD.flash(.label("打印功能开发中"),delay: 1.2)
let vc = PrintListMgVc()
self.navigationController?.pushViewController(vc, animated: true)
break break
case "确认订单": case "确认订单":
let alertView = GeliAlertView(frame: self.view.window!.bounds) let alertView = GeliAlertView(frame: self.view.window!.bounds)
......
...@@ -54,6 +54,7 @@ class AccountViewController: BaseViewController{ ...@@ -54,6 +54,7 @@ class AccountViewController: BaseViewController{
//模拟退出登录 //模拟退出登录
UserDefaults.standard.removeObject(forKey: "WorkDataModel") UserDefaults.standard.removeObject(forKey: "WorkDataModel")
UserDefaults.standard.removeObject(forKey: "user_token") UserDefaults.standard.removeObject(forKey: "user_token")
UserDefaults.standard.removeObject(forKey: "userName")
NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil) NotificationCenter.default.post(name: Notification.Name(rawValue: "logout"), object: nil)
JPUSHService.deleteAlias({ (resCode, alias, num) in JPUSHService.deleteAlias({ (resCode, alias, num) in
......
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