Commit c39d63de authored by 刘俊宏's avatar 刘俊宏

修正编辑商品

parent 90c4990f
...@@ -134,8 +134,8 @@ class GoodsDetailSkuResModel: Mappable { ...@@ -134,8 +134,8 @@ class GoodsDetailSkuResModel: Mappable {
var is_tiered : Int? //是否开启阶梯价 1开启 0关闭 var is_tiered : Int? //是否开启阶梯价 1开启 0关闭
var is_open_adsale : Int? //是否开启预售 1是 0否 var is_open_adsale : Int? //是否开启预售 1是 0否
var adsale_pri : String? //预售价格 var adsale_pri : String? //预售价格
var adsale_inventory : String? //预售库存 var adsale_inventory : Int? //预售库存
var pct : String? //定金比例(百分比) 例如填12即是定金比例为12% var pct : Int? //定金比例(百分比) 例如填12即是定金比例为12%
var adsale_tiered_pri : String? //预售阶梯价 var adsale_tiered_pri : String? //预售阶梯价
var is_adsale_tiered : Int? //是否开启预售阶梯价 1开启 0关闭 var is_adsale_tiered : Int? //是否开启预售阶梯价 1开启 0关闭
......
...@@ -177,12 +177,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -177,12 +177,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
getUpSkuInfoEditByData(dataArr: guiGeArr) getUpSkuInfoEditByData(dataArr: guiGeArr)
let dic = ["user_token":UserToken as Any, //验证token let dic = ["user_token":UserToken as Any, //验证token
"goods_id":goods_id,//修改的商品ID "goods_id":goods_id as Any,//修改的商品ID
"cat_id":selectGoodsClassModel.cat_id as Any, //分类ID "cat_id":selectGoodsClassModel.cat_id as Any, //分类ID
"brand_id":pinPai_id as Any, // 品牌ID "brand_id":pinPai_id as Any, // 品牌ID
"goods_name":itemName, //商品名称 "goods_name":itemName as Any, //商品名称
"is_qz":is_qz as Any, //是否清真商品,1是0非 "is_qz":is_qz as Any, //是否清真商品,1是0非
"goods_type":goods_type, //商品类型,普通2现货3期货4团购 "goods_type":goods_type as Any, //商品类型,普通2现货3期货4团购
"is_adsale":is_adsale as Any, //商品类型字段,预售专用,选定”预售”则值为1,否则值为0 "is_adsale":is_adsale as Any, //商品类型字段,预售专用,选定”预售”则值为1,否则值为0
"is_inquiry":is_inquiry as Any, //是否询价:1是0非 "is_inquiry":is_inquiry as Any, //是否询价:1是0非
"need_check":need_check as Any, //付款是否需要审核, 1是0非 "need_check":need_check as Any, //付款是否需要审核, 1是0非
...@@ -194,18 +194,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -194,18 +194,18 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
"keywords":keyWord as Any, //关键字 "keywords":keyWord as Any, //关键字
"logistics":wuLiuPrice as Any, //物流费用 "logistics":wuLiuPrice as Any, //物流费用
"origin_number":qiMaiShuLiang as Any, //起购数量 "origin_number":qiMaiShuLiang as Any, //起购数量
"coun_id":"1", //国家id 1(中国) "coun_id":"1" as Any, //国家id 1(中国)
"gs_id":gs_id as Any, //商品状态 "gs_id":gs_id as Any, //商品状态
"transportation":transportation as Any, //运输方式,1冷链,2常温,3热链 "transportation":transportation as Any, //运输方式,1冷链,2常温,3热链
"goods_desc":goodsDesc, //商品详情 html p标签 "goods_desc":goodsDesc as Any, //商品详情 html p标签
"specifications":specifications as Any, //默认规格,选sku中最低价格(需判定阶梯价)的 规格值 "specifications":specifications as Any, //默认规格,选sku中最低价格(需判定阶梯价)的 规格值
"shop_price":shop_price as Any, //默认售价,选sku中最低价格(需判定阶梯价)的价格 "shop_price":shop_price as Any, //默认售价,选sku中最低价格(需判定阶梯价)的价格
"goods_unit":goods_unit as Any, //默认商品单位,选sku中最低价格(需判定阶梯价)的单位 "goods_unit":goods_unit as Any, //默认商品单位,选sku中最低价格(需判定阶梯价)的单位
"original_img":original_img as Any, //商品封面图 "original_img":original_img as Any, //商品封面图
"original_img_edit":original_img_edit,//商品封面图是否有修改,1是0非 "original_img_edit":original_img_edit as Any,//商品封面图是否有修改,1是0非
"goods_banner":goods_bannerStr as Any, //商品副图,多张,最多5张,使用一维数组转json格式 "goods_banner":goods_bannerStr as Any, //商品副图,多张,最多5张,使用一维数组转json格式
"sku_info":sku_info as Any] "sku_info":sku_info as Any]
print(goods_bannerStr) print(sku_info)
//MARK:--修改商品接口 //MARK:--修改商品接口
goodsEdit(dic, success: { (data) in goodsEdit(dic, success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交修改成功"), delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "提交修改成功"), delay: 1.2)
...@@ -499,13 +499,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -499,13 +499,10 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
//预售价格 //预售价格
data.yuShouPrice = dataSource.adsale_pri! data.yuShouPrice = dataSource.adsale_pri!
//预售库存 //预售库存
if dataSource.adsale_inventory != nil { data.ysKuCun = StringByInt(number: dataSource.adsale_inventory!)
data.ysKuCun = dataSource.adsale_inventory!
}
//百分比 //百分比
if dataSource.pct != nil { data.DJBiLi = StringByInt(number: dataSource.pct!)
data.DJBiLi = dataSource.pct!
}
//阶梯价 //阶梯价
if dataSource.tiered_pri!.count > 0 { if dataSource.tiered_pri!.count > 0 {
data.jieTiArr = self.getResponseArr(str: dataSource.tiered_pri!) data.jieTiArr = self.getResponseArr(str: dataSource.tiered_pri!)
...@@ -1589,13 +1586,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -1589,13 +1586,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var is_open_adsale = 0 var is_open_adsale = 0
var adsale_pri = "" var adsale_pri = ""
var adsale_inventory = "" var adsale_inventory = "0"
var pct = "" var pct = ""
if item.isOpenYSSetting { if item.isOpenYSSetting {
is_open_adsale = 1 is_open_adsale = 1
adsale_pri = item.yuShouPrice adsale_pri = item.yuShouPrice
adsale_inventory = item.ysKuCun if item.ysKuCun.count != 0{
adsale_inventory = item.ysKuCun
}
pct = item.DJBiLi pct = item.DJBiLi
} }
......
...@@ -212,7 +212,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -212,7 +212,6 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
dataModel.jieTiArr = jieTiArr as! Array<Any> dataModel.jieTiArr = jieTiArr as! Array<Any>
dataModel.specalArr = specalArr as! Array<Any> dataModel.specalArr = specalArr as! Array<Any>
dataModel.yuShouPrice = yuShouPrice dataModel.yuShouPrice = yuShouPrice
print("save == ",selectYuShou)
dataModel.selectYuShou = selectYuShou dataModel.selectYuShou = selectYuShou
dataModel.itemDanWeiSelect = itemDanWeiSelect dataModel.itemDanWeiSelect = itemDanWeiSelect
dataModel.tempSelect = tempSelect dataModel.tempSelect = tempSelect
......
<?xml version="1.0" encoding="UTF-8"?> <?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="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <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="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......
...@@ -146,15 +146,15 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT ...@@ -146,15 +146,15 @@ class BluetoothConnectViewController: BaseViewController,UITableViewDelegate,UIT
@IBAction func searchAction(_ sender: Any) { @IBAction func searchAction(_ sender: Any) {
print("搜索") print("搜索")
//临时处理给外设写入数据 //临时处理给外设写入数据
let byte = [0x1B,0x68] // let byte = [0x1B,0x68]
let data = Data.init(bytes: byte, count: 3) // let data = Data.init(bytes: byte, count: 3)
let currPeripheral:CBPeripheral = self.selectDataArray[0] // let currPeripheral:CBPeripheral = self.selectDataArray[0]
//写入数据 //写入数据
// currPeripheral.writeValue(data, for: <#T##CBCharacteristic#>, type: CBCharacteristicWriteType) // currPeripheral.writeValue(data, for: <#T##CBCharacteristic#>, type: CBCharacteristicWriteType)
// baby?.scanForPeripherals() baby?.scanForPeripherals()
// baby?.begin() baby?.begin()
} }
//MARK: -Cell delegate //MARK: -Cell delegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
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