Commit 00729cb8 by 梁建民

css

parent 6e4f4da0
......@@ -26,8 +26,8 @@
<span class="icon iconfont iconjuxing19 va-m"></span>
<span>上传的商品有图片,搜索排名会优先排前</span>
</div>
<div class="form_content layui-form clr">
<div class="form_left fl layui-form">
<div class="form_content layui-form clr" lay-filter="goodsave">
<div class="form_left fl">
<div class="xh input_div ">
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
......
......@@ -19,6 +19,39 @@
},
mounted: function (opt) {
var id = Util.getRequest('id'), text = '';
//编辑
if (id) {
IcController.getData(apis.goodsInfo, 'GET', {token: opt.token, 'goods_id/eq': id}, function (res) {
if(res.errcode === 0){
layui.form.val("goodsave", {
"goods_name": res['goods_list'][id].goods_name,
"brand_name": res['goods_list'][id].brand_name,
"encap": res['goods_list'][id].encap,
"stock": res['goods_list'][id].stock,
"price": res['goods_list'][id].price,
"day": res['goods_list'][id].delivery_time,
"currency": res['goods_list'][id].currency,
"delivery_time": res['goods_list'][id].delivery_time
});
setTimeout(function () {
$('.hq').find('.layui-form-radioed').trigger('click');
},500)
}
});
}
return this;
},
......@@ -55,13 +88,18 @@
$(data.elem).addClass("layui-btn-disabled");
var id = Util.getRequest('id'), params = {}, url = '';
if (!opt.isClick) {
opt.isClick = true;
var params = $.extend({}, data.field, {token: opt.token});
id ? params = $.extend({}, data.field, {token: opt.token, 'goods_id': id}) : $.extend({}, data.field, {token: opt.token});
id ? url = apis.goodsSave : url = apis.goodsAdd;
IcController.getData(apis.goodsAdd, 'POST', params, function (res) {
IcController.getData(url, 'GET', params, function (res) {
if (res.errcode === 0) {
......
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 sign in to comment