提交 89912973 编写于 作者: D Devil

商品规格快捷操作优化

上级 556ef838
......@@ -186,6 +186,24 @@
<span class="business-operations-submit specifications-nav-title-add">+添加规格</span>
<div class="goods-specifications">
<!-- 规格批量操作弹层 -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="spec-modal-all-operation">
<div class="am-modal-dialog">
<div class="am-modal-hd">批量操作
<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
</div>
<div class="am-modal-bd">
<div class="am-input-group am-input-group-sm">
<input type="text" class="am-form-field" placeholder="批量设置的值" />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="button">确认</button>
</span>
</div>
</div>
</div>
</div>
<!-- 规格列表 -->
<table class="am-table am-table-bordered am-table-centered specifications-table am-margin-bottom-sm">
<thead class="title-nav">
<tr>
......@@ -197,12 +215,30 @@
</th>
{{/foreach}}
{{/if}}
<th class="title-start">价格(元)</th>
<th>库存</th>
<th>重量(kg)</th>
<th>规格编码</th>
<th>条形码</th>
<th>原价(元)</th>
<th class="title-start">
<span>价格(元)</span>
<i class="am-icon-edit"></i>
</th>
<th>
<span>库存</span>
<i class="am-icon-edit"></i>
</th>
<th>
<span>重量(kg)</span>
<i class="am-icon-edit"></i>
</th>
<th>
<span>规格编码</span>
<i class="am-icon-edit"></i>
</th>
<th>
<span>条形码</span>
<i class="am-icon-edit"></i>
</th>
<th>
<span>原价(元)</span>
<i class="am-icon-edit"></i>
</th>
<th class="extend-btn">扩展</th>
<th class="operation-btn">操作</th>
</tr>
......
......@@ -164,6 +164,10 @@
width: 100px;
margin: 5px 10px 10px 0;
}
.specifications-table thead th i {
cursor: pointer;
}
/**
* 属性
......
......@@ -204,6 +204,31 @@ $(function()
$(this).parents('li.spec-images-items').remove();
});
// 规格批量操作-开启
var $spec_modal = $('#spec-modal-all-operation');
$('.specifications-table thead th i').on('click', function()
{
$spec_modal.modal({
width: 200,
height: 100
});
$spec_modal.attr('data-index', $(this).parent().index());
$spec_modal.find('.am-input-group input').val('');
});
// 规格批量操作-确认
$spec_modal.find('.am-input-group button').on('click', function()
{
var index = $spec_modal.attr('data-index') || 0;
var value = $spec_modal.find('.am-input-group input').val() || '';
$('.specifications-table tbody tr').each(function(k, v)
{
$(this).find('td').eq(index).find('input').val(value);
});
$spec_modal.modal('close');
});
// 手机详情添加
$(document).on('click', '.content-app-items-add-sub', function()
{
......@@ -350,7 +375,7 @@ $(function()
return false;
}
// 移除规格列
// 移除所有规格列
$('.specifications-table .title-nav-remove').trigger('click');
// 添加规格列
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册