Commit 088b29d8 authored by lujunye's avatar lujunye

hgklhlkhjkl

parent 476412c2
......@@ -501,6 +501,8 @@
E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */; };
E0F503E02648DE52000F9633 /* SY_DLS_GL_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F503DE2648DE52000F9633 /* SY_DLS_GL_VC.swift */; };
E0F503E12648DE52000F9633 /* SY_DLS_GL_VC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F503DF2648DE52000F9633 /* SY_DLS_GL_VC.xib */; };
E0F5044C264913E6000F9633 /* NewPrintItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F5044A264913E6000F9633 /* NewPrintItemCell.swift */; };
E0F5044D264913E6000F9633 /* NewPrintItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F5044B264913E6000F9633 /* NewPrintItemCell.xib */; };
E0F83BA925F7085400D31672 /* NewPiCiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F83BA725F7085400D31672 /* NewPiCiCell.swift */; };
E0F83BAA25F7085400D31672 /* NewPiCiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0F83BA825F7085400D31672 /* NewPiCiCell.xib */; };
E0F8E91B248737F100817A08 /* NewOnlyRKCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */; };
......@@ -1330,6 +1332,8 @@
E0F3C2CA24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XinZengAndBianJiKeHuViewController.xib; sourceTree = "<group>"; };
E0F503DE2648DE52000F9633 /* SY_DLS_GL_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SY_DLS_GL_VC.swift; sourceTree = "<group>"; };
E0F503DF2648DE52000F9633 /* SY_DLS_GL_VC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SY_DLS_GL_VC.xib; sourceTree = "<group>"; };
E0F5044A264913E6000F9633 /* NewPrintItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPrintItemCell.swift; sourceTree = "<group>"; };
E0F5044B264913E6000F9633 /* NewPrintItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewPrintItemCell.xib; sourceTree = "<group>"; };
E0F83BA725F7085400D31672 /* NewPiCiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPiCiCell.swift; sourceTree = "<group>"; };
E0F83BA825F7085400D31672 /* NewPiCiCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewPiCiCell.xib; sourceTree = "<group>"; };
E0F8E919248737F100817A08 /* NewOnlyRKCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewOnlyRKCell.swift; sourceTree = "<group>"; };
......@@ -1880,6 +1884,8 @@
E095C42924874E6100922571 /* CKGmCell.xib */,
E095C42424874BDA00922571 /* CKNonGmCell.swift */,
E095C42524874BDA00922571 /* CKNonGmCell.xib */,
E0F5044A264913E6000F9633 /* NewPrintItemCell.swift */,
E0F5044B264913E6000F9633 /* NewPrintItemCell.xib */,
);
path = "出库";
sourceTree = "<group>";
......@@ -4233,6 +4239,7 @@
E056960526243AE800CC7431 /* GL_PAY_Cell.xib in Resources */,
E0CACE8425FF0A3D00ED7998 /* DZSH_UPLOAD_IMG_CELL.xib in Resources */,
E02392072490819600C4C632 /* CGDListCell.xib in Resources */,
E0F5044D264913E6000F9633 /* NewPrintItemCell.xib in Resources */,
F970B3682550F5AA0026F9D5 /* RetailManageViewController.xib in Resources */,
E0F3C2CC24590C86006F0D1F /* XinZengAndBianJiKeHuViewController.xib in Resources */,
E0272A86259C2525008142BB /* FXYGL_ViewController.xib in Resources */,
......@@ -4476,6 +4483,7 @@
E0EFB9C624930C0D005FB0CD /* CGDListViewController.swift in Sources */,
E0D197C02448431C002B080C /* BabyCentralManager.m in Sources */,
F956D5A9246A2D9C003FF510 /* LMNLineChain.m in Sources */,
E0F5044C264913E6000F9633 /* NewPrintItemCell.swift in Sources */,
E030DF362485DD3E002764D3 /* NewRKCell.swift in Sources */,
E06B3FCE2601A70D0004C05C /* DZSH_Upload_Cer_Cell.swift in Sources */,
E02EE125259AD6FB00733764 /* FXSY_Cell.swift in Sources */,
......
......@@ -282,8 +282,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate,UITabBarCont
let v2 = GoodsManageListVC()
// let v3 = WorkCViewController()
let v3 = SY_DLS_GL_VC()
let v3 = WorkCViewController()
// let v3 = SY_DLS_GL_VC()
let v4 = WarehoseMangementListVC()
......
{
"images" : [
{
"filename" : "编组.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -10,7 +10,12 @@ import UIKit
import LGButton
import WebKit
class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNonGmCellDelegate,CKGmCellDelegate, PiCiXuanZeViewControllerDelegate,GLAlertSelectViewDelegate,NewSelectItemVcDelegate,GeliAlertTextViewDelegate, Print_Gprinter_View_Delegate,WKNavigationDelegate{
class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNonGmCellDelegate,CKGmCellDelegate, PiCiXuanZeViewControllerDelegate,GLAlertSelectViewDelegate,NewSelectItemVcDelegate,GeliAlertTextViewDelegate, Print_Gprinter_View_Delegate,WKNavigationDelegate, NewPrintItemCell_Delegate{
func NewPrintItemCell_delAction(cell: NewPrintItemCell) {
printData.remove(at: cell.tag)
print_list.reloadData()
}
func NewSelectItemVcSelect(datas: Array<InputInitInfoGoodsInfoModel>, pici: Array<Array<GetGoodBatchDataModel>>,select:Array<Int>,str:Array<String>,typeArr:Array<Int>,imgArr:Array<String>) {
rkSelectArr.removeAll()
datas.forEach { (item) in
......@@ -24,26 +29,66 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
listView.reloadData()
}
let printBG = UIView()
let title_Lbl = UILabel()
let print_list = UITableView()
var printData: Array<Dictionary<String, Any>> = []
func Print_Gprinter_View_Print(data: Array<Dictionary<String, Any>>) {
printData.removeAll()
data.forEach { (dict) in
printData.append(dict)
}
print("打印")
printBG.backgroundColor = UIColor.black
printBG.alpha = 0.4
self.view.addSubview(printBG)
printBG.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
self.view.addSubview(title_Lbl)
title_Lbl.text = "打印列表"
title_Lbl.backgroundColor = UIColor.white
title_Lbl.textAlignment = .center
title_Lbl.font = UIFont(name: "PingFangSC-Medium", size: 15)
title_Lbl.textColor = UIColor(named: "标题字颜色")
title_Lbl.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.bottom.equalTo(-391)
make.height.equalTo(49)
}
// let dict = [
// "user_token":UserToken as Any,
// "o_type":typeSelect! + 1 as Any,
// "audit_remark":remark as Any,
// "goods_info":dataChangeString(sender: goodsInfoArr) as Any
// ]
// HUD.show(.progress)
// GoodsOutput(dict, success: { (data) in
// HUD.hide()
// HUD.flash(.labeledSubSuccess(subtitle: "出库成功"), delay: 1.2)
// self.navigationController?.popViewController(animated: true)
// }) { (error) in
//
// }
self.view.addSubview(print_list)
print_list.separatorStyle = .none
print_list.register(UINib(nibName: "NewPrintItemCell", bundle: nil), forCellReuseIdentifier: "NewPrintItemCell")
print_list.delegate = self
print_list.dataSource = self
print_list.snp.makeConstraints { (make) in
make.left.right.bottom.equalTo(0)
make.top.equalTo(title_Lbl.snp_bottom)
}
printData(idx: printIdx)
}
func printData(idx:Int){
let model = printData[idx]["goods_data"] as! GetGoodBatchDataModel
//测试
let urlStr = "http://z.gelifood.com/static/url/label.html?goods_name=\(printData[idx]["goods_name"] as! String)&spec_str=\(printData[idx]["spec_str"] as! String)&batch_sn=\(model.batch_sn!)&batch_id=\(model.batch_id!)&iscs=1"
//online
// let urlStr = "http://zx.gelifood.com/static/url/label.html?goods_name=\(printData[idx]["goods_name"] as! String)&spec_str=\(printData[idx]["spec_str"] as! String)&batch_sn=\(model.batch_sn!)&batch_id=\(model.batch_id!)&iscs=0"
print("url == ",urlStr)
let urlString = urlStr.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
let url = URL(string: urlString)
let request = URLRequest.init(url: url!, cachePolicy: .reloadRevalidatingCacheData, timeoutInterval: 10)
wkWebView.navigationDelegate = self
wkWebView.load(request)
wkWebView.bounds = CGRect(x: 0, y: 0, width: 230, height: 230*0.75)
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
......@@ -199,43 +244,43 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}
var goodsInfoArr:Array<Any> = []
@IBOutlet weak var gm_view: UIView!
let wkWebView = WKWebView()
// 页面加载完成之后调用
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!){
print("页面加载完成...")
webView.takeScreenshotOfFullContent { (img) in
let imgV = UIImageView(frame: CGRect(x: 0, y: 0, width: 230, height: 230*0.75))
self.view.addSubview(imgV)
imgV.image = img
let command = TscCommand()
command.addSize(40, 30)
command.addGap(withM: 2, withN: 0)
command.addReference(0, 0)
command.addTear("ON")
command.addQueryPrinterStatus(Response(rawValue: 1)!)
command.addCls()
command.addBitmapwithX(0, withY: 0, withMode: 0, withWidth: 400, with: img)
command.addPrint(1, 1)
ConnecterManager.sharedInstance()?.write(command.getCommand())
let wkWebView = WKWebView()
// 页面加载完成之后调用
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!){
print("页面加载完成...")
webView.takeScreenshotOfFullContent {[self] (img) in
let command = TscCommand()
command.addSize(40, 30)
command.addGap(withM: 2, withN: 0)
command.addReference(0, 0)
command.addTear("ON")
command.addQueryPrinterStatus(Response(rawValue: 1)!)
command.addCls()
command.addBitmapwithX(0, withY: 0, withMode: 0, withWidth: 400, with: img)
let num = printData[printIdx]["print_counts"] as! Int
command.addPrint(Int32(num), 1)
ConnecterManager.sharedInstance()?.write(command.getCommand(), progress: { (total, part) in
let cell = print_list.cellForRow(at: IndexPath(row: printIdx, section: 0)) as! NewPrintItemCell
cell.progress.progress = Float(part)/Float(total)
if Float(part)/Float(total) == 1 {
printIdx += 1
if printIdx != printData.count - 1 {
printData(idx: printIdx)
print_list.reloadData()
}else{
printIdx = 0
title_Lbl.removeFromSuperview()
print_list.removeFromSuperview()
printBG.removeFromSuperview()
}
}
})
}
}
}
@IBAction func ck_action(_ sender: UIButton) {
let urlStr = "http://z.gelifood.com/static/url/label.html?goods_name=破军碎星锤魔女斗篷反甲&spec_str=住宅就拉萨京东破军碎星锤魔女斗篷反甲方开始了大舅父&batch_sn=12312312313123&batch_id=444"
// let urlStr = "https://www.baidu.com"
let urlString = urlStr.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
let url = URL(string: urlString)
let request = URLRequest.init(url: url!, cachePolicy: .reloadRevalidatingCacheData, timeoutInterval: 10)
wkWebView.navigationDelegate = self
wkWebView.load(request)
wkWebView.bounds = CGRect(x: 0, y: 0, width: 230, height: 230*0.75)
return
if isGm {
if typeSelect == nil {
HUD.flash(.label("请选择出库类型"),delay: 1.2)
......@@ -401,77 +446,100 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}
}
var printIdx = 0
//MARK: - cell delegate
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1 {
if isGm {
let cell = tableView.dequeueReusableCell(withIdentifier: "CKGmCell") as! CKGmCell
if tableView == print_list {
let cell = tableView.dequeueReusableCell(withIdentifier: "NewPrintItemCell") as! NewPrintItemCell
cell.tag = indexPath.row
cell.delegate = self
let dict = printData[indexPath.row]
cell.name_lbl.text = dict["goods_name"] as! String
if indexPath.row > printIdx {
cell.status_lbl.isHidden = false
cell.btn.setTitle("取消打印", for: .normal)
cell.btn.setTitleColor(UIColor(named: "#F57575"), for: .normal)
cell.btn.isUserInteractionEnabled = true
}else{
cell.status_lbl.isHidden = true
cell.btn.setTitle("正在打印", for: .normal)
cell.btn.isUserInteractionEnabled = false
cell.btn.setTitleColor(UIColor(named: "个人中心灰色字体"), for: .normal)
}
return cell
}else{
if indexPath.section == 1 {
if isGm {
let cell = tableView.dequeueReusableCell(withIdentifier: "CKGmCell") as! CKGmCell
cell.tag = indexPath.row
let data = rkSelectArr[cell.tag]
cell.delegate = self
cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str! + " ¥" + data.price!
let arr = piCiArr?[cell.tag]
if arr!.count > 0 {
cell.dataArr = arr
cell.scrollView.isHidden = false
cell.remind_lbl.isHidden = false
}else{
cell.scrollView.isHidden = true
cell.remind_lbl.isHidden = true
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "CKNonGmCell") as! CKNonGmCell
cell.tag = indexPath.row
let data = rkSelectArr[cell.tag]
cell.delegate = self
cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str! + " ¥" + data.price!
let arr = piCiArr?[cell.tag]
if arr!.count > 0 {
cell.dataArr = arr
cell.scrollView.isHidden = false
cell.remind_lbl.isHidden = false
cell.detailLbl.text = data.spec_str
if data.chuKuLiang != nil {
cell.ckCountTf.text = "\(data.chuKuLiang!)"
}else{
cell.scrollView.isHidden = true
cell.remind_lbl.isHidden = true
cell.ckCountTf.text = "1"
data.chuKuLiang = 1
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "CKNonGmCell") as! CKNonGmCell
cell.tag = indexPath.row
let data = rkSelectArr[cell.tag]
cell.delegate = self
cell.nameLbl.text = data.goods_name
cell.detailLbl.text = data.spec_str
if data.chuKuLiang != nil {
cell.ckCountTf.text = "\(data.chuKuLiang!)"
}else{
cell.ckCountTf.text = "1"
data.chuKuLiang = 1
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row]
cell.btmW.constant = 0
cell.contentRight.constant = 0
cell.imgRight.constant = 15
cell.contentLbl.textColor = UIColor(named: "#999999")
if remark.count != 0 {
cell.contentLbl.text = remark
cell.btmW.constant = 15
cell.contentRight.constant = 5
cell.imgRight.constant = 22
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
}
return cell
}
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKBtnCell") as! CRKBtnCell
cell.tag = indexPath.row
cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row]
cell.btmW.constant = 0
cell.contentRight.constant = 0
cell.imgRight.constant = 15
cell.contentLbl.textColor = UIColor(named: "#999999")
if remark.count != 0 {
cell.contentLbl.text = remark
cell.btmW.constant = 15
cell.contentRight.constant = 5
cell.imgRight.constant = 22
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
cell.mustLbl.isHidden = true
cell.mustWidth.constant = 0
cell.nameLeft.constant = 0
if indexPath.row == 1 {
setCellUI(cell: cell)
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "CRKBtnCell") as! CRKBtnCell
cell.tag = indexPath.row
cell.nameLbl.text = titleArr[indexPath.row]
cell.contentLbl.text = holderArr[indexPath.row]
cell.mustLbl.isHidden = true
cell.mustWidth.constant = 0
cell.nameLeft.constant = 0
if indexPath.row == 1 {
setCellUI(cell: cell)
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if tableView == print_list {
return 83
}
if indexPath.section == 0 {
if indexPath.row == 4 {
return UITableView.automaticDimension
......@@ -495,6 +563,9 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
if tableView == print_list {
return UIView()
}
if section == 0 {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 10))
view.backgroundColor = UIColor(named: "app底色")
......@@ -557,13 +628,20 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
}
func numberOfSections(in tableView: UITableView) -> Int {
if tableView == print_list {
return 1
}
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == print_list {
return printData.count
}else{
if section == 0 {
return titleArr.count
}
return rkSelectArr.count
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 0 {
......
//
// NewPrintItemCell.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/5/10.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol NewPrintItemCell_Delegate {
func NewPrintItemCell_delAction(cell:NewPrintItemCell)
}
class NewPrintItemCell: UITableViewCell {
var delegate:NewPrintItemCell_Delegate?
@IBOutlet weak var status_lbl: UILabel!
@IBOutlet weak var btn: UIButton!
@IBOutlet weak var progress: UIProgressView!
@IBOutlet weak var name_lbl: UILabel!
@IBAction func del_print_data_action(_ sender: Any) {
delegate?.NewPrintItemCell_delAction(cell: self)
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
self.selectionStyle = .none
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="NewPrintItemCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="83"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eE0-Wr-sMN">
<rect key="frame" x="20" y="15" width="335" height="68"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="print_cell_icon" translatesAutoresizingMaskIntoConstraints="NO" id="3km-kj-zCW">
<rect key="frame" x="15" y="20.5" width="26" height="27"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="XxS-Qn-oai"/>
<constraint firstAttribute="width" constant="26" id="YvF-4s-MpJ"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ecb-Ag-qm5">
<rect key="frame" x="245" y="0.0" width="90" height="68"/>
<constraints>
<constraint firstAttribute="width" constant="90" id="VJ8-ax-6Zj"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<state key="normal" title="正在打印">
<color key="titleColor" name="个人中心灰色字体"/>
</state>
<connections>
<action selector="del_print_data_action:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="fA1-fp-fk0"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kvu-Qy-bpA">
<rect key="frame" x="51" y="20.5" width="28" height="15.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="11"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="ivI-eU-vNC">
<rect key="frame" x="51" y="37" width="189" height="4"/>
<color key="backgroundColor" red="0.81568627450980391" green="0.90588235294117647" blue="0.98431372549019602" alpha="1" colorSpace="calibratedRGB"/>
<color key="tintColor" red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="calibratedRGB"/>
</progressView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="等待发送-已连接打印机" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DDY-y9-SDR">
<rect key="frame" x="51" y="44" width="95.5" height="13"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="9"/>
<color key="textColor" name="#999999"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="ivI-eU-vNC" firstAttribute="top" secondItem="kvu-Qy-bpA" secondAttribute="bottom" constant="1" id="3Xk-nk-Ak5"/>
<constraint firstItem="DDY-y9-SDR" firstAttribute="top" secondItem="ivI-eU-vNC" secondAttribute="bottom" constant="3" id="7os-2x-Xis"/>
<constraint firstAttribute="trailing" secondItem="ecb-Ag-qm5" secondAttribute="trailing" id="C8Y-mc-UDi"/>
<constraint firstItem="ecb-Ag-qm5" firstAttribute="leading" secondItem="ivI-eU-vNC" secondAttribute="trailing" constant="5" id="DCN-02-hNU"/>
<constraint firstItem="3km-kj-zCW" firstAttribute="centerY" secondItem="eE0-Wr-sMN" secondAttribute="centerY" id="Ihg-Ba-Wkh"/>
<constraint firstItem="DDY-y9-SDR" firstAttribute="leading" secondItem="ivI-eU-vNC" secondAttribute="leading" id="TKN-hO-5UV"/>
<constraint firstItem="kvu-Qy-bpA" firstAttribute="leading" secondItem="3km-kj-zCW" secondAttribute="trailing" constant="10" id="ZoA-NJ-Z9L"/>
<constraint firstAttribute="bottom" secondItem="ecb-Ag-qm5" secondAttribute="bottom" id="jlA-Ym-E2f"/>
<constraint firstItem="kvu-Qy-bpA" firstAttribute="top" secondItem="3km-kj-zCW" secondAttribute="top" id="kyi-dZ-8fc"/>
<constraint firstItem="ivI-eU-vNC" firstAttribute="leading" secondItem="kvu-Qy-bpA" secondAttribute="leading" id="nYE-jP-5qs"/>
<constraint firstItem="ecb-Ag-qm5" firstAttribute="top" secondItem="eE0-Wr-sMN" secondAttribute="top" id="vnn-6U-Zn1"/>
<constraint firstItem="3km-kj-zCW" firstAttribute="leading" secondItem="eE0-Wr-sMN" secondAttribute="leading" constant="15" id="wsG-Nm-8gb"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="搜索框背景色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="eE0-Wr-sMN" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="BRn-6c-4zf"/>
<constraint firstItem="eE0-Wr-sMN" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="Dk5-hE-97B"/>
<constraint firstAttribute="bottom" secondItem="eE0-Wr-sMN" secondAttribute="bottom" id="L3v-Cg-ndd"/>
<constraint firstAttribute="trailing" secondItem="eE0-Wr-sMN" secondAttribute="trailing" constant="20" id="vxR-CU-8pQ"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="btn" destination="ecb-Ag-qm5" id="rbZ-Hu-f6x"/>
<outlet property="name_lbl" destination="kvu-Qy-bpA" id="Xdx-OZ-VCN"/>
<outlet property="progress" destination="ivI-eU-vNC" id="kq9-bf-8Rw"/>
<outlet property="status_lbl" destination="DDY-y9-SDR" id="vfS-ef-XCE"/>
</connections>
<point key="canvasLocation" x="142" y="82"/>
</tableViewCell>
</objects>
<resources>
<image name="print_cell_icon" width="27" height="26.5"/>
<namedColor name="#999999">
<color red="0.60000002384185791" green="0.60000002384185791" blue="0.60000002384185791" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="个人中心灰色字体">
<color red="0.38823529411764707" green="0.38823529411764707" blue="0.38823529411764707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="搜索框背景色">
<color red="0.9137254901960784" green="0.90588235294117647" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -98,6 +98,7 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
dict["goods_data"] = p
let n = print_num_arr[item][i]
dict["print_counts"] = n
dict["spec_str"] = model.spec_str
print_data.append(dict)
}
}
......@@ -105,6 +106,7 @@ class Print_Gprinter_View: UIView,UITableViewDelegate,UITableViewDataSource, GPr
let data = item["goods_data"] as! GetGoodBatchDataModel
print("print_target = ",item["goods_name"],data.batch_id,item["print_counts"])
}
self.removeFromSuperview()
//连接打印机
delegate?.Print_Gprinter_View_Print(data: print_data)
}
......
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