Commit 8e7dcfda authored by lujunye's avatar lujunye

634

parent 3fc82d7c
......@@ -10,7 +10,7 @@ import UIKit
@objc protocol TitleAndTFCellDelegate {
@objc optional func textFieldContent(content:String,cell:TitleAndTFCell)
}
class TitleAndTFCell: UITableViewCell {
class TitleAndTFCell: UITableViewCell,UITextFieldDelegate {
@IBOutlet weak var line: UIView!
var delegate:TitleAndTFCellDelegate?
@IBOutlet weak var textTF: UITextField!
......@@ -18,11 +18,12 @@ class TitleAndTFCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
textTF.addTarget(self, action: #selector(textEditing(sender:)), for: .allEditingEvents)
// Initialization code
textTF.delegate = self
}
@objc func textEditing(sender:UITextField){
delegate?.textFieldContent?(content: sender.text!, cell: self)
func textFieldDidEndEditing(_ textField: UITextField) {
delegate?.textFieldContent?(content: textField.text!, cell: self)
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
......
......@@ -440,6 +440,8 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndSwitch") as! TitleAndSwitchCell
cell.namelbl.text = ysszArr[indexPath.row]
cell.contentLbl.isHidden = false
cell.contentLbl.text = "无需审核"
cell.delegate = self
cell.infoSw.isOn = shiFouSH
return cell
......@@ -558,7 +560,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
view.isShangPinType = true
view.titleLbl.text = "请选择商品类型"
view.delegate = self
view.dataArr = leiXingArr
view.dataArr = leiXingArr
view.selectArray = itemTypeArr
view.tempArr = itemTypeArr
self.view.addSubview(view)
......@@ -1012,6 +1014,11 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
break
case "用户付款是否需要审核":
shiFouSH = content.isOn
if shiFouSH {
cell.contentLbl.text = "需要审核"
}else{
cell.contentLbl.text = "无需审核"
}
break
default:
break
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ShopInfoViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ShopInfoViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="accoutLbl" destination="3sz-EZ-mKJ" id="DS0-be-V1p"/>
<outlet property="addressDetLbl" destination="iWE-lB-xqz" id="bvT-LV-gCa"/>
......@@ -88,6 +88,16 @@
<nil key="highlightedColor"/>
<size key="shadowOffset" width="0.0" height="0.0"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="如需修改,请登录cms.gelifood.com/market进行修改" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ieo-7F-16V">
<rect key="frame" x="0.0" y="0.0" width="375" height="15"/>
<color key="backgroundColor" name="蓝色字体颜色"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="vCm-SL-NPm"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="白色背景色"/>
<constraints>
......@@ -98,6 +108,7 @@
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="bottom" secondItem="gzL-IC-aNG" secondAttribute="bottom" id="E3U-kM-UK4"/>
<constraint firstItem="Ieo-7F-16V" firstAttribute="leading" secondItem="lhX-H9-Xkn" secondAttribute="leading" id="HMo-WH-lgi"/>
<constraint firstItem="ukA-ny-pCw" firstAttribute="leading" secondItem="7hF-Wd-wdk" secondAttribute="trailing" constant="15" id="IYR-Zt-kgy"/>
<constraint firstAttribute="height" constant="100" id="J4s-BJ-7E0">
<userDefinedRuntimeAttributes>
......@@ -110,7 +121,9 @@
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstItem="7hF-Wd-wdk" firstAttribute="centerY" secondItem="lhX-H9-Xkn" secondAttribute="centerY" id="Tdu-NR-xhT"/>
<constraint firstAttribute="trailing" secondItem="Ieo-7F-16V" secondAttribute="trailing" id="Vkv-uP-Jnd"/>
<constraint firstAttribute="trailing" secondItem="ukA-ny-pCw" secondAttribute="trailing" constant="15" id="e5M-yO-wdC"/>
<constraint firstItem="Ieo-7F-16V" firstAttribute="top" secondItem="lhX-H9-Xkn" secondAttribute="top" id="eJY-pf-GDR"/>
<constraint firstAttribute="trailing" secondItem="gzL-IC-aNG" secondAttribute="trailing" id="y5U-aW-hp0"/>
</constraints>
</view>
......@@ -578,14 +591,14 @@
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z2W-C4-bTR">
<rect key="frame" x="32" y="79.5" width="28" height="52"/>
<rect key="frame" x="46" y="92.5" width="14" height="26"/>
<state key="normal" image="idCard1"/>
<connections>
<action selector="previousAction:" destination="-1" eventType="touchUpInside" id="dyV-e4-TCQ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iyE-E4-Dko">
<rect key="frame" x="315" y="79.5" width="28" height="52"/>
<rect key="frame" x="315" y="92.5" width="14" height="26"/>
<state key="normal" image="idCard2"/>
<connections>
<action selector="nextAction:" destination="-1" eventType="touchUpInside" id="RFo-kU-6z8"/>
......@@ -981,7 +994,7 @@
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -35,7 +35,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var collectView:UICollectionView?
var datasArr:Array<GuiGeModel> = []
var dataModel = GuiGeModel()
var firstTimeSetting = true
let titleArray = ["售价:","规格:","重量(kg):","温藏:","单位:"]
let pliceHolderArr = ["请输入商品售价","请输入商品规格","请输入商品重量","常温","请选择商品单位"]
@IBOutlet weak var btmLbl: UILabel!
......@@ -48,7 +48,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
var isJieTiOpen = false//控制阶梯价是否打开
var isYsJieTiOpen = false//控制预售阶梯是否打开
// var isOpenYSSetting = false//是否打开预售设置
// var isOpenYSSetting = false//是否打开预售设置
var selectYuShou = false//是否选择设置预售价格
......@@ -200,7 +200,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
dataModel.itemDanWeiSelect = itemDanWeiSelect
dataModel.tempSelect = tempSelect
dataModel.isJieTiOpen = isJieTiOpen
// dataModel.isOpenYSSetting = isOpenYSSetting
// dataModel.isOpenYSSetting = isOpenYSSetting
if DJBiLi.count == 0 {
DJBiLi = "0"
}
......@@ -225,6 +225,13 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
if isPurnNumber(str: textField.text!) {
textField.text = formatShowNumber(value: textField.text!)
price = textField.text!
if isYuShouSetting && firstTimeSetting{
yuShouPrice = price
let idx = IndexPath(row: 0, section: 1)
let cell = listTbv.cellForRow(at: idx) as! YuShouCell
cell.inputTF1.text = yuShouPrice
firstTimeSetting = false
}
}else{
HUD.flash(.label("请输入正确的价格"), delay: 1.2)
textField.text = ""
......@@ -377,7 +384,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
cell.inputTF3.isUserInteractionEnabled = isAllEditing
cell.tag = indexPath.row
cell.infoSw.isUserInteractionEnabled = isAllEditing
// cell.infoSw.isOn = isOpenYSSetting
// cell.infoSw.isOn = isOpenYSSetting
cell.delegate = self
cell.inputTF1.text = yuShouPrice
cell.inputTF2.text = ysKuCun
......@@ -443,11 +450,11 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
if isYuShouSetting == false{
return 0.001
}else{
return 184.5
return 184.5
}
// if isOpenYSSetting {
//
// }
// if isOpenYSSetting {
//
// }
}
if indexPath.section == 2 {
if isJieTiOpen && selectYuShou == false {
......@@ -549,19 +556,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
ysKuCun = arr[1]
DJBiLi = arr[2]
}
func textFieldContent(content: String, cell: TitleAndTFCell) {
switch cell.tag {
case 0:
price = content
break
case 1:
guiGe = content
break
default:
weight = content
break
}
}
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
let cell = listTbv.cellForRow(at: IndexPath(row: view.tag, section: 0)) as! TitleAndBtnCell
if view.tag == 3 {
......@@ -672,7 +667,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
func YuShouCellSwitchStatus(sender: UISwitch) {
//控制
// isYuShouSetting = sender.isOn
// isOpenYSSetting = sender.isOn
// isOpenYSSetting = sender.isOn
listTbv.reloadData()
}
func PuTongJieTiDelAction(sender: PuTongJieTiCell) {
......@@ -740,7 +735,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
specalArr = dataDict.specalArr
jieTiArr = dataDict.jieTiArr
isJieTiOpen = dataDict.isJieTiOpen
// isOpenYSSetting = dataDict.isOpenYSSetting
// isOpenYSSetting = dataDict.isOpenYSSetting
DJBiLi = dataDict.DJBiLi
isYsJieTiOpen = dataDict.isYsJieTiOpen
ysKuCun = dataDict.ysKuCun
......
......@@ -162,7 +162,7 @@
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="蓝色字体颜色">
<color red="0.27799999713897705" green="0.56099998950958252" blue="0.88999998569488525" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -38,6 +38,8 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
super.viewDidLoad()
passTF.isSecureTextEntry = true
shBtn.isSelected = false
bannerImg.snp.makeConstraints { (make) in
make.top.left.right.equalTo(0)
make.height.equalTo(234*glscale)
......@@ -68,7 +70,11 @@ class LoginViewController: BaseViewController, CodeViewDelegate,GeliAlertViewDel
@IBAction func shPassAction(_ sender: UIButton) {
shBtn.isSelected = !shBtn.isSelected
passTF.isSecureTextEntry = !shBtn.isSelected
if shBtn.isSelected {
passTF.isSecureTextEntry = false
}else{
passTF.isSecureTextEntry = true
}
}
func getCodeNum(num: String) {
codeNum = num
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LoginViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LoginViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="bannerImg" destination="AdE-4p-9iF" id="Eub-F8-pfv"/>
<outlet property="codeTF" destination="qfV-go-Nf1" id="dsy-cS-dte"/>
......@@ -139,9 +139,6 @@
</constraints>
<state key="normal" image="guanbi"/>
<state key="selected" image="xianshi "/>
<connections>
<action selector="shPassAction:" destination="-1" eventType="touchUpInside" id="S3P-pI-hyJ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="49B-fO-IDj">
<rect key="frame" x="291" y="5" width="46" height="46"/>
......
......@@ -13,9 +13,12 @@ import LGButton
protocol GuanLianKehuVCDelegate {
func GuanLianKehuSelect(keHuData:CusListAllDataModel)
}
class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataSource,GuanLianKeHuCellDelegate{
class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataSource,GuanLianKeHuCellDelegate,GeliAlertViewDelegate{
var delegate:GuanLianKehuVCDelegate?
@IBOutlet weak var btnLblH: NSLayoutConstraint!
@IBOutlet weak var btn: LGButton!
var selectIdx:Int? = nil//暂代关联客户数据
var order_id:Int? = 0
......@@ -24,6 +27,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
print("确定")
if order_id == 0 {
//MARK:--代客下单流程的关联客服
self.delegate?.GuanLianKehuSelect(keHuData: self.dataArr[self.selectIdx!])
self.navigationController?.popViewController(animated: true)
return
......@@ -55,6 +59,7 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
super.viewDidLoad()
navbar.title = "关联客户"
self.view.addSubview(navbar)
self.view.backgroundColor = UIColor.white
setTabv()
}
//MARK:--传入已选客户
......@@ -70,12 +75,33 @@ class GuanLianKehuVC: BaseViewController , UITableViewDelegate, UITableViewDataS
dataM.data?.forEach({ (model) in
self.dataArr.append(model)
})
if self.dataArr.count == 0 {
self.btn.isHidden = true
self.btnLblH.constant = 0
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
alertView.titileLbl.text = "请登录cms.gelifood.com/market进行添加"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "跳转"), for: .normal)
self.view.window?.addSubview(alertView)
}else{
self.btn.isHidden = false
self.btnLblH.constant = 49
}
self.tableV.reloadData()
self.tableV?.mj_header?.endRefreshing()
}) { (error) in
}
}
//MARK: - alertView delegate
func sureGeliAlertViewAction(sender: UIButton) {
let url:URL?=URL.init(string: "https://cms.gelifood.com/market/")
UIApplication.shared.open(url!, options: [:], completionHandler: nil)
}
var tableV :UITableView!
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
......@@ -8,8 +8,10 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GuanLianKehuVC" customModule="GeliBusinessPlatform" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GuanLianKehuVC" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="btn" destination="YKd-bD-avz" id="VhA-JC-bJ0"/>
<outlet property="btnLblH" destination="A03-0x-HL7" id="IqC-VA-juZ"/>
<outlet property="contentView" destination="3TM-jG-VM2" id="MXs-d9-jVo"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
......@@ -23,7 +25,7 @@
<rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" name="白色背景色"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YKd-bD-avz" customClass="LGButton" customModule="LGButton">
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YKd-bD-avz" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
......
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