Commit 295ca6c3 authored by lujunye's avatar lujunye

阿斯顿发送到发斯蒂芬43423422

parent 718794e3
......@@ -282,8 +282,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont
let v2 = GoodsManageListVC()
// let v3 = WorkCViewController()
let v3 = FX_Product_GuanLiVC()
let v3 = WorkCViewController()
// let v3 = RetailListMgVC()
let v4 = WarehoseMangementListVC()
......
......@@ -8,6 +8,56 @@
import Foundation
import ObjectMapper
//商品入库
class goodsInputModel: Mappable {
var code:Int?
var message : String?
var data : Array<goodsInputDataModel>?
required init?( map: Map) {
}
func mapping(map: Map) {
code <- map["code"]
message <- map["message"]
data <- map["data"]
}
}
class goodsInputDataModel: Mappable {
var goods_name:String?
var goods_spec : String?
var sku_id:Int?
var batch_info:Array<goodsInputBatchData>?
required init?( map: Map) {
}
func mapping(map: Map) {
goods_name <- map["goods_name"]
goods_spec <- map["goods_spec"]
sku_id <- map["sku_id"]
batch_info <- map["batch_info"]
}
}
class goodsInputBatchData: Mappable {
var status:String?
var inventory:Int?
var batch_sn:String?
var batch_id : String?
required init?( map: Map) {
}
func mapping(map: Map) {
batch_sn <- map["batch_sn"]
batch_id <- map["batch_id"]
status <- map["status"]
inventory <- map["inventory"]
}
}
//新增商品-获取基本信息
class GeneralInfoModel: Mappable {
var code:Int?
......
......@@ -8,7 +8,7 @@
import Foundation
import ObjectMapper
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库审核,商品入库,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,
//发送验证码,验证短信验证码,修改登录密码,绑定、更换绑定格利支付账号,简单通用操作接口,普通订单发货,预售订单发货,订单绑定/更换绑定客户,确认订单,订单取消,修改订单商品价格,订单退款,普通订单退货,预售订单退货,修改订单支付方式(状态),商家仓库添加,商家仓库修改,商家仓库删除,提交下单,商品入库申请,商品出库,商品申请出库,商品审核出库,出库入库审核不通过,编辑地址,删除地址,新增采购单,审核采购单,撤销入库,采购单修改支付状态,供应商编辑,新增供应商,编辑客户,新增客户,应收账款收款,设为未收,取消采购单,修改采购订单,新增品牌,拒绝退款,确认用户退款到账,拒绝接单,审核同意退货退款,取消订单审核,确认收到退货,审核同意退货或退款,订单确认收货,取消运单,支付运费,选定地址添加收发货历史,取消货拉拉订单,货拉拉二次支付,货拉拉格利支付,发票消息短信通知,修改电子发票链接地址,分销分账设置,供应商新增店铺,标记已人工结算,铺货与取消铺货,终止合作,分销商品管理,分销商新增供应商,审核操作(通过和不通过),删除客户,新增分销员,删除分销员,修改不二制油订单打印,店长审核通过、审核通过待补齐资料、不通过,保存店长审核信息(商家信息),拼拼货取消订单,
class UpDataModel: Mappable {
......
......@@ -148,7 +148,7 @@ func OutputInitInfo(_ params:[String:Any],success:@escaping (_ res:Any)->(),fail
iog_id(出/入库商品id )
*/
func GoodsInputAudit(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("商品入库审核", params, { (rep:DataResponse<UpDataModel>) in
NetworkRequest.sharedInstance.postRequest("商品入库审核", params, { (rep:DataResponse<goodsInputModel>) in
}, success: { (data) in
success(data)
}) { (error) in
......@@ -183,7 +183,7 @@ func GoodsInputAudit(_ params:[String:Any],success:@escaping (_ res:Any)->(),fai
g_type 商品类型:1直销商品,2代销商品
*/
func GoodsInput(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@escaping(_ error:Error)->()) {
NetworkRequest.sharedInstance.postRequest("商品入库", params, { (rep:DataResponse<UpDataModel>) in
NetworkRequest.sharedInstance.postRequest("商品入库", params, { (rep:DataResponse<goodsInputModel>) in
}, success: { (data) in
success(data)
}) { (error) in
......
//
// SY_GYS_GL_Cell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/12.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
class SY_GYS_GL_Cell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
//
// SY_GYS_GL_VC.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/12.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
class SY_GYS_GL_VC: BaseViewController , UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource {
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var keyword = ""
//MARK: - TABLEVIEWDELEGATE
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 125
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SY_GYS_GL_Cell") as! SY_GYS_GL_Cell
return cell
}
@IBOutlet weak var list_view: UITableView!
@IBOutlet weak var contentV: UIView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "上游供应商管理"
self.view.addSubview(navbar)
SetTopFrame(view: contentV, height: 45)
let searchBr = SearchBarView.init()
searchV = searchBr
self.contentV.addSubview(searchBr)
searchV?.changecornerRadius(cornerRadius: 35*0.5)
searchBr.placeholderStr = "请输入供应商名称"
searchBr.delegate = self
searchBr.delegateL = self
searchBr.snp.makeConstraints { (make) in
make.left.equalTo(0)
make.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
list_view.separatorStyle = .none
list_view.register(UINib(nibName: "SY_GYS_GL_Cell", bundle: nil), forCellReuseIdentifier: "SY_GYS_GL_Cell")
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
list_view.mj_header = self.headerMJ
list_view.mj_header?.beginRefreshing()
footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
list_view.mj_footer = self.footerMJ
}
@objc func loadData(){}
@objc func loadMoreData(){}
var blackBtnView:UIButton! = nil
@objc func removeBlackBtnView(){
if blackBtnView != nil {
blackBtnView.removeFromSuperview()
searchV!.resignFirstResponder()
}
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
blackBtnView = UIButton ()
blackBtnView.backgroundColor = UIColor.init(named: "提示视图背景色")
self.view.addSubview(blackBtnView)
blackBtnView.snp.makeConstraints { (make) in
make.top.equalTo(contentV!.snp_bottom)
make.left.right.bottom.equalToSuperview()
}
blackBtnView.addTarget(self, action: #selector(removeBlackBtnView), for: .touchUpInside)
blackBtnView.isUserInteractionEnabled = false
return true
}
weak var searchV: SearchBarView? = nil
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
removeBlackBtnView()
if keyword.count > 0 {
list_view.mj_header?.beginRefreshing()
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
removeBlackBtnView()
if keyword.count > 0 {
keyword = searchBar.text!
if keyword.count == 0 {
list_view.mj_header?.beginRefreshing()
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.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="SY_GYS_GL_VC" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="contentV" destination="01x-lO-EMw" id="uNT-qL-nGL"/>
<outlet property="list_view" destination="diP-eG-1kB" id="DTO-rw-dvc"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="01x-lO-EMw">
<rect key="frame" x="0.0" y="44" width="414" height="45"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="FPA-gh-8KA"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="diP-eG-1kB">
<rect key="frame" x="0.0" y="89" width="414" height="807"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="F94-ai-rol"/>
<outlet property="delegate" destination="-1" id="dJL-oT-1vb"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="diP-eG-1kB" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="7P9-Ik-O8g"/>
<constraint firstItem="01x-lO-EMw" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="OTD-md-vTP"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="diP-eG-1kB" secondAttribute="trailing" id="Ugy-VT-9cF"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="01x-lO-EMw" secondAttribute="trailing" id="lN3-Oa-8BX"/>
<constraint firstItem="01x-lO-EMw" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="oA9-ZQ-Yub"/>
<constraint firstAttribute="bottom" secondItem="diP-eG-1kB" secondAttribute="bottom" id="oDP-Gu-uBk"/>
<constraint firstItem="diP-eG-1kB" firstAttribute="top" secondItem="01x-lO-EMw" secondAttribute="bottom" id="wDq-kU-NkL"/>
</constraints>
<point key="canvasLocation" x="141" y="94"/>
</view>
</objects>
<resources>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
//
// Cancel_Action_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/13.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol Cancel_Action_View_Delegate {
func Cancel_Action_View_Action(view:Cancel_Action_View)
}
class Cancel_Action_View: UIView {
var delegate:Cancel_Action_View_Delegate?
@IBAction func close_action(_ sender: Any) {
self.removeFromSuperview()
}
@IBAction func submit_action(_ sender: Any) {
delegate?.Cancel_Action_View_Action(view: self)
self.removeFromSuperview()
}
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
......@@ -8,7 +8,22 @@
import UIKit
class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource {
class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelegate,UITableViewDelegate,UITableViewDataSource,SY_SLS_GL_VC_Cell_Delegate,Cancel_Action_View_Delegate{
func Cancel_Action_View_Action(view: Cancel_Action_View) {
print(view.tag)
}
func SY_SLS_GL_VC_Cell_Action(btn: UIButton, cell: SY_SLS_GL_VC_Cell) {
if btn.titleLabel?.text == "终止合作" {
let view = Cancel_Action_View(frame: self.view.bounds)
view.delegate = self
view.tag = cell.tag
self.view.addSubview(view)
}else{
}
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
var keyword = ""
......@@ -23,6 +38,9 @@ class SY_DLS_GL_VC: BaseViewController, UISearchBarDelegate, SearchBarViewDelega
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SY_SLS_GL_VC_Cell") as! SY_SLS_GL_VC_Cell
cell.delegate = self
cell.tag = indexPath.row
return cell
}
......
......@@ -7,8 +7,14 @@
//
import UIKit
protocol SY_SLS_GL_VC_Cell_Delegate {
func SY_SLS_GL_VC_Cell_Action(btn:UIButton,cell:SY_SLS_GL_VC_Cell)
}
class SY_SLS_GL_VC_Cell: UITableViewCell {
var delegate:SY_SLS_GL_VC_Cell_Delegate?
@IBAction func btn_action(_ sender: UIButton) {
delegate?.SY_SLS_GL_VC_Cell_Action(btn: sender, cell: self)
}
@IBOutlet weak var icon: UIImageView!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var income: UILabel!
......@@ -21,7 +27,7 @@ class SY_SLS_GL_VC_Cell: UITableViewCell {
self.selectionStyle = .none
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
......
......@@ -107,11 +107,17 @@
<state key="normal" title="终止合作">
<color key="titleColor" name="#999999"/>
</state>
<state key="selected" title="重新合作">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btn_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="2qE-ag-Hvq"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
......@@ -159,7 +165,7 @@
<outlet property="status" destination="U3m-7P-Wf4" id="CK7-e1-kxZ"/>
<outlet property="time" destination="tPj-OA-asA" id="cX8-Bh-Qpx"/>
</connections>
<point key="canvasLocation" x="141" y="80"/>
<point key="canvasLocation" x="139.85507246376812" y="79.352678571428569"/>
</tableViewCell>
</objects>
<resources>
......
//
// XY_FX_Setting_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/13.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
class XY_FX_Setting_View: UIView {
@IBOutlet weak var fxj_btn: UIButton!
@IBOutlet weak var ghj_btn: UIButton!
@IBOutlet weak var btm_view: UIView!
@IBAction func select_action(_ sender: UIButton) {
view_height.constant = 255
btm_view.isHidden = true
ghj_btn.isSelected = false
fxj_btn.isSelected = true
if sender.tag == 1 {
view_height.constant = 288
btm_view.isHidden = false
ghj_btn.isSelected = true
fxj_btn.isSelected = false
}
}
@IBAction func close_action(_ sender: Any) {
self.removeFromSuperview()
}
@IBOutlet weak var view_height: NSLayoutConstraint!
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
......@@ -9,6 +9,7 @@
import UIKit
class DistributorSettingViewController: BaseViewController {
@IBOutlet weak var topView: UIView!
@IBAction func select_ac(_ sender: UIButton) {
if sender.tag == 2 {
btm_h.constant = 0
......@@ -27,7 +28,24 @@ class DistributorSettingViewController: BaseViewController {
}
select_type = sender.tag
}
@IBOutlet weak var leftBtn: UIButton!
@IBOutlet weak var rightBtn: UIButton!
@IBAction func top_btn_click(_ sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender == leftBtn {
rightBtn.backgroundColor = UIColor.clear
leftBtn.backgroundColor = UIColor.white
rightBtn.isSelected = !sender.isSelected
dl_setting_view.isHidden = false
}else{
leftBtn.isSelected = !sender.isSelected
leftBtn.backgroundColor = UIColor.clear
rightBtn.backgroundColor = UIColor.white
dl_setting_view.isHidden = true
}
}
var select_type = 2
@IBOutlet weak var dl_setting_view: UIView!
@IBOutlet weak var top_lbl: UILabel!
@IBOutlet weak var btm_lbl: UILabel!
@IBOutlet weak var btm_h: NSLayoutConstraint!
......@@ -42,15 +60,18 @@ class DistributorSettingViewController: BaseViewController {
var share_type = "2"
override func viewDidLoad() {
super.viewDidLoad()
leftBtn.backgroundColor = UIColor.white
navbar.title = "分销商分账设置"
self.view.addSubview(navbar)
self.view.backgroundColor = .white
// Do any additional setup after loading the view.
SetTopFrame(view: topView, height: 57)
topLbl.snp.makeConstraints { (make) in
make.top.equalTo(NavCGRect.height+20)
make.top.equalTo(topView.snp_bottom).offset(10)
make.left.equalTo(15)
}
if dataM != nil {
if dataM?.commission_time == 2 {
btm_h.constant = 0
......
......@@ -80,13 +80,15 @@ class FX_Product_GuanLiVC: BaseViewController,UITableViewDelegate,UITableViewDat
case 1:
break
default:
//分销设置
let data = datas[cell.tag]
let view = FXSZ_View(frame: self.view.bounds)
view.delegate = self
view.FX_Price_Tf.text = data.dbt_price
view.commission_tf.text = data.commission_val
let view = XY_FX_Setting_View(frame: self.view.bounds)
self.view.addSubview(view)
//分销设置
// let data = datas[cell.tag]
// let view = FXSZ_View(frame: self.view.bounds)
// view.delegate = self
// view.FX_Price_Tf.text = data.dbt_price
// view.commission_tf.text = data.commission_val
// self.view.addSubview(view)
break
}
}
......
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