Commit 33587241 by 朱继来

品牌temp

parent 36b82f1a
...@@ -254,3 +254,17 @@ li { ...@@ -254,3 +254,17 @@ li {
.order_contain { margin-left: 80px !important; } .order_contain { margin-left: 80px !important; }
} }
.select-standard-brand {
float: right;
color: #ff8601;
cursor: pointer;
}
p, h4 {
margin-bottom: 10px !important;
}
.create-order span>a {
color: #337ab7 !important;
}
...@@ -884,6 +884,15 @@ ...@@ -884,6 +884,15 @@
'<td>'+list[i].goods_name+'</td>'+ '<td>'+list[i].goods_name+'</td>'+
'<td>'+list[i].brand_name+'</td>'; '<td>'+list[i].brand_name+'</td>';
if (goods_type == 1) { // 联营添加标准品牌列
if (list[i].standard_brand_name) {
html += '<td>'+list[i].standard_brand_name+'</td>';
} else {
html += '<td><input type="text" class="standard_brand_name" name="standard_brand_name" /><i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true"></i></td>';
}
}
if (goods_type == 2) { if (goods_type == 2) {
html += '<td><span class="goods_mpl">'+list[i].mpl+'</span></td>'; html += '<td><span class="goods_mpl">'+list[i].mpl+'</span></td>';
} }
......
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
standardBrand: {
index: function() {
// 选择标准品牌
$('.shop-table').delegate('.select-standard-brand', 'click', function() {
layer.open({
type: 1,
area: ['700px'],
title: '选择标准品牌',
content: $('#select-brand-pop'),
btn: ['确定带回', '取消'],
btn1: function () {
$.ajax({
type: "POST",
url: '/ajax/deleteGoods',
data: {uid : user_id, cart_id : cart_id},
dataType: "json",
success: function(resp){
layer.msg(resp.errmsg);
// self.parents('tr').remove();
loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
return false;
},
})
layer.msg('商品删除中...', {icon: 16, time: 0, shade: 0.3});
},
btn2: function (index) {
layer.close(index);
}
})
})
},
}
});
})(jQuery)
<link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/js/layui/css/layui.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet"> <link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet"> <link href="/css/style.css" rel="stylesheet">
<link href="/layer/skin/layer.css" rel="stylesheet"> <link href="/layer/skin/layer.css" rel="stylesheet">
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/inspinia.min.js"></script> <script src="/js/inspinia.min.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/common.js"></script> <script src="/js/common.js"></script>
<script src="/js/add_order.js?v=<?= time() ?>"></script> <script src="/js/add_order.js?v=<?= time() ?>"></script>
<script src="/js/plugins/DatePicker/WdatePicker.js"></script> <script src="/js/plugins/DatePicker/WdatePicker.js"></script>
<script src="/js/standardBrand.js"></script>
...@@ -390,6 +390,7 @@ ...@@ -390,6 +390,7 @@
<th width="10%">SKUID</th> <th width="10%">SKUID</th>
<th width="15%">商品名称</th> <th width="15%">商品名称</th>
<th width="10%">制造商</th> <th width="10%">制造商</th>
<th width="10%">标准品牌</th>
<th width="8%">采购数量</th> <th width="8%">采购数量</th>
<th width="7%">采购单价</th> <th width="7%">采购单价</th>
<th width="7%">小计</th> <th width="7%">小计</th>
...@@ -450,6 +451,8 @@ ...@@ -450,6 +451,8 @@
</div> </div>
</form> </form>
@include('common.selectBrand')
<script> <script>
var sale_id = "{{$sale_id}}"; var sale_id = "{{$sale_id}}";
var URL_api = "{{Config('website.api_domain')}}"; var URL_api = "{{Config('website.api_domain')}}";
...@@ -486,4 +489,5 @@ ...@@ -486,4 +489,5 @@
}) })
$.lie.add_order.lyorder(); $.lie.add_order.lyorder();
$.lie.standardBrand.index();
</script> </script>
\ No newline at end of file
<style>
#select-brand-pop{ display: none; }
.select-content{ margin: 10px; }
.confirm-standard-brand{ float: right; }
.brand-search{ margin-top: -3px; }
#select-brand-pop .label-prompt{ padding: 6px !important; }
</style>
<div class="shop-table">
<i class="fa fa-exclamation-triangle fa-2x select-standard-brand" aria-hidden="true"></i>
</div>
<div id="select-brand-pop" class="select-content">
<form class="layui-form layui-box" method="post">
<div class="layui-input-inline">
<input type="text" name="brand_name" placeholder="输入品牌名称" autocomplete="off">
<button lay-submit lay-filter="load" class="layui-btn layui-btn-sm brand-search">搜索</button>
</div>
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm confirm-standard-brand">确认带回</a> -->
</form>
<table id="brandList" lay-filter="brandList"></table>
</div>
<script>
layui.use(['table', 'form'], function() {
var table = layui.table;
var form = layui.form;
var renderTable = function () {
table.render({
id: 'list'
,elem: '#brandList'
,url: '/api/ApiBrandBlackList' //数据接口
,method:'post'
,cellMinWidth: 80 //全局定义常规单元格的最小宽度
,page: true //开启分页
,cols: [[ //表头
{type:'radio', width: 80}
,{field: 'brand_name', title: '品牌名称', width: 596}
]]
,limit: 10
,limits: [10, 20, 50,]
});
}
renderTable();
form.on('submit(load)', function(data) {
//执行重载
table.reload('list', {
page: {
curr: 1
}
,where: data.field
});
return false;
});
})
</script>
\ No newline at end of file
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