Authored by dongjunjie

商家端代销变价一期优化

... ... @@ -47,9 +47,14 @@ new common.dropDown({
el: "#sex"
});
//多级菜单
var tabTree = new common.tabTree("#sortTree");
tabTree.init();
var g = new common.grid({
el: "#basicTable",
parms: function() {
var select = tabTree.getAddress();
return {
shop_id: common.util.__input("shopId"),
product_skn: common.util.__input("skn"),
... ... @@ -59,7 +64,9 @@ var g = new common.grid({
is_auditing: common.util.__input("status"),
stock: common.util.__input("stock"),
gender: common.util.__input("sex"),
max_sort_id: common.util.__input("cate")
max_sort_id: select[0] ? select[0].id : "",
middle_sort_id: select[1] ? select[1].id : "",
small_sort_id: select[2] ? select[2].id : ""
};
},
columns: [{
... ... @@ -244,12 +251,16 @@ $("#all-btn").click(function() {
//批量导入按钮点击事件
$('#import-btn').on('click', function() {
if ($('#basicTable').css('display') == 'none') {
location.reload();
}
$('#basicTable, .bulk-import').toggle();
$('.panel-default a').not('#import-btn').addClass('disabled');
$('.panel-default input, .panel-default select').attr('disabled', true);
$('#basicTable').hide();
$('#priceChangeSearch').hide();
$('.bulk-import').show();
});
//返回列表
$('#return-btn').on('click', function() {
$('.bulk-import').hide();
$('#basicTable').show();
$('#priceChangeSearch').show();
});
//批量导入
... ...
... ... @@ -161,7 +161,7 @@
line-height: 48px;
padding: 0 0 0 50px;
margin: 0 200px;
background: url(../images/excel.png) no-repeat left center;
background: url(../assets/images/excel.png) no-repeat left center;
}
.load {
... ...
<!-- {{# headerTab}}
<div class="tabheader">
<ul class="nav nav-tabs">
<li {{# changePrice}}class="active"{{/ changePrice}}><a href="/goods/pricechange/index">代销变价</a></li>
<li {{# brandCooperation}}class="active"{{/ brandCooperation}}><a href="/goods/brandCooperation/index">品牌合作模式设置</a></li>
</ul>
</div>
{{/ headerTab}} -->
<div class="pageheader">
<div class="media">
... ... @@ -13,13 +22,12 @@
{{^ secondTitle}}{{pageTitle}}{{/ secondTitle}}
</li>
</ul>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel panel-default" id="priceChangeSearch" style="margin-bottom:10px;">
<div class="panel-body">
{{# filter}}
<div class="row">
... ... @@ -32,30 +40,30 @@
{{# store}}
<div class="panel-col">
<select name="shop" id="shop" tabindex="-1" title="" class="form-control">
<option value="-1">请选择店铺</option>
</select>
<option value="-1">请选择店铺</option>
</select>
</div>
{{/ store}}
{{# brand}}
<div class="panel-col">
<select name="brand" id="brand" tabindex="-1" title="" class="form-control">
<option value="-1">请选择品牌</option>
</select>
<option value="-1">请选择品牌</option>
</select>
</div>
{{/ brand}}
{{# brandInput}}
<div class="panel-col">
<input id="brand" class="form-control panel-input height40" type="text" placeholder="请输入品牌名称">
<input id="brandInput" class="form-control panel-input height40" type="text" placeholder="请输入品牌名称">
</div>
{{/ brandInput}}
{{# supplier}}
<div class="panel-col">
<select name="supplier" id="supplier" tabindex="-1" title="" class="form-control">
<option value="-1">请选择供应商</option>
</select>
<option value="-1">请选择供应商</option>
</select>
</div>
{{/ supplier}}
... ... @@ -65,7 +73,7 @@
<option value="-1">是否JIT商品</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</select>
</div>
{{/ jit}}
... ... @@ -75,7 +83,7 @@
<option value="-1">上架状态</option>
<option value="200">上架</option>
<option value="0">下架</option>
</select>
</select>
</div>
{{/ onStatus}}
... ... @@ -85,7 +93,7 @@
<option value="-1">库存情况</option>
<option value="1">有库存</option>
<option value="0">无库存</option>
</select>
</select>
</div>
{{/ stock}}
... ... @@ -96,15 +104,13 @@
<option value="1"></option>
<option value="2"></option>
<option value="3">通用</option>
</select>
</select>
</div>
{{/ gender}}
{{# aCate}}
<div class="panel-col">
<select name="cate" id="cate" tabindex="-1" title="" class="form-control">
<option value="-1">请选择一级类目</option>
</select>
<div class="panel-col2">
<div id="sortTree"></div>
</div>
{{/ aCate}}
... ... @@ -115,7 +121,7 @@
<option value="1">代销</option>
<option value="2">经销</option>
<option value="3">自主</option>
</select>
</select>
</div>
{{/ brandCooperation}}
... ... @@ -125,39 +131,43 @@
<option value="0">未设置</option>
<option value="-1">全部</option>
<option value="1">已设置</option>
</select>
</select>
</div>
{{/ brandCooperationSet}}
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
</div>
{{/ filter}}
{{# bulkImport}}
<div class="row" style="margin: 0 0 0 -5px;">
<a id="import-btn" href="javascript:;" class="btn btn-info">批量导入</a>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
</div>
<div class="panel-col" style="margin: 0 0 0 -5px;">
<a id="import-btn" href="javascript:;" class="btn btn-info">批量导入</a>
</div>
</div>
{{/ bulkImport}}
{{/ filter}}
</div>
</div>
<div class="panel">
<div class="dataTables_wrapper no-footer" id="basicTable"></div>
{{# bulkImport}}
<div class="panel bulk-import">
<div class="import-hd">
<div class="panel bulk-import" style='padding:20px'>
<a id="return-btn" href="javascript:;" class="btn btn-info" style="margin-bottom: 10px">返回列表</a>
<div class="import-hd" style="padding: 10px 20px; border: 1px solid #cccccc">
<span class="excel-upload-wrap">
<label>选择文件</label>
<input id="upload-input" name="file" class="btn btn-default excel-upload" type="file">
</span>
<a class="excel-model" href="{{download}}">表头下载</a>
<input id="sure-change" class="btn btn-primary" type="button" value="确定变价">
<a class="excel-model" href="/ajax/link/{{download}}">表头下载</a>
<input id="sure-change" class="btn btn-primary" type="button" value="确定变价">
</div>
<ol id="error-msg" class="error-msg" style="color: red"></ol>
<div class="priceTable-wrap">
<div class="panel panel-warning" style="margin: 0;">
<div class="panel-heading">SKN变价<a id="delete-all" class="btn btn-danger" style="margin-left: 50px;" href="javascript:;">全部删除</a></div>
... ... @@ -169,30 +179,26 @@
<a id="download-btn" class="btn btn-success" data-domain="{{domain}}" href="javascript:;">下载导入结果</a>
</div>
</div>
{{/ bulkImport}}
</div>
</div>
<input type="hidden" id="btnAuthority" value="{{bottons}}">
<input type="hidden" id="gridurl" value="{{gridurl}}">
<input type="hidden" id="shopId" value="{{auth.shopId}}">
<script id="template" type="text/template">
<tr class="product-detail">
<td colspan="15">
<form>
<table class="table table-striped table-bordered">
<tr>
<th>SKN</th>
<th>SKN</th>
<th>销售价</th>
<th>VIP折扣类型</th>
<th>VIP</th>
<th>白金价</th>
<th>金卡价</th>
<th>银卡价</th>
<th>YOHO</th>
<th>进货价</th>
<th>进货折扣</th>
<th>成本</th>
... ... @@ -201,7 +207,7 @@
<tr>
<td class="skn-value"></td>
<td>
<input class="sale-price" type="text" value="[[sales_price]]">
<input class="sale-price" type="text" value="{sales_price}">
</td>
<td>
<select class="discount-select">
... ... @@ -213,26 +219,24 @@
</select>
</td>
<td>
<input class="vip-price" type="text" value="[[vip_price]]">
</td>
<td>
<input class="vip3-price" type="text" value="[[vip3_price]]" disabled>
<input class="vip-price" type="text" value="{vip_price}">
</td>
<td>
<input class="vip2-price" type="text" value="[[vip2_price]]" disabled>
<input class="vip3-price" type="text" value="{vip3_price}" disabled>
</td>
<td>
<input class="vip1-price" type="text" value="[[vip1_price]]" disabled>
<input class="vip2-price" type="text" value="{vip2_price}" disabled>
</td>
<td>
<input class="return-coin" type="text" value="[[return_coin]]">
<input class="vip1-price" type="text" value="{vip1_price}" disabled>
</td>
<td>[[purchase_price]]</td>
<td>[[purchase_discount]]</td>
<td>[[cost_price]]</td>
<td>{purchase_price}</td>
<td>{purchase_discount}</td>
<td>{cost_price}</td>
<td><a class="sure-modify" href="javascript:;">确认修改</a></td>
</tr>
</table>
</form>
</td>
</tr>
</script>
\ No newline at end of file
... ...