Authored by weiqingting

提交

'use strict';
var $ = require('jquery'),
common = require('../common/common');
$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
function batchExport(el, type) {
var loadModal = null;
return {
params: {
type: type,
__type: "batch-import"
},
onStart: function() {
loadModal = common.dialog.load();
$(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", ""));
},
onComplete: function(response) {
console.log(response);
if (loadModal) {
loadModal.close();
}
if (response.code == 200) {
common.util.__tip(response.message, 'success');
} else {
common.util.__tip(response.message, 'warning');
}
}
}
}
common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'searchSort'));
common.edit.ajaxfileupload('#brand-file', batchExport('#brand-file', 'brandProperty'));
\ No newline at end of file
... ...
'use strict';
var $ = require('jquery'),
common = require('../common/common');
$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
function batchExport(el, type) {
var loadModal = null;
return {
params: {
type: type,
__type: "batch-import"
},
onStart: function() {
loadModal = common.dialog.load();
$(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", ""));
},
onComplete: function(response) {
console.log(response);
if (loadModal) {
loadModal.close();
}
if (response.code == 200) {
common.util.__tip(response.message, 'success');
} else {
common.util.__tip(response.message, 'warning');
}
}
}
}
common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'searchSort'));
common.edit.ajaxfileupload('#brand-file', batchExport('#brand-file', 'brandProperty'));
\ No newline at end of file
... ...
... ... @@ -18,8 +18,8 @@ var config = {
// domain: 'http://172.16.6.252:9080',//陈超
//domain: 'http://172.16.6.227:8088/platform', //玛丽
// domain: 'http://192.168.102.202:8088/platform',
domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.202:8088/platform',
// domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
loggers: {
api: {
level: 'verbose',
... ...
... ... @@ -287,5 +287,25 @@ exports.res = [
{name:"brandId",type:"Number"},
{name:"sortId",type:"Number"}
]
}
},
{
route:'/goods/piliang/batch',
method:'GET',
view:'pages/basegoods/batch',
src:'/basegoods/batch',
data:{
pageTitle:"批量功能",
secondTitle:"基础商品"
}
},
{
route:'/goods/base/batch',
method:'GET',
view:'pages/basegoods/basebatch',
src:'/basegoods/basegoods',
data:{
pageTitle:"基础商品导入",
secondTitle:"基础商品"
}
},
];
\ No newline at end of file
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">商品管理</a></li>
<li>
{{# secondTitle}}{{.}}{{/ secondTitle}}
{{^ secondTitle}}{{pageTitle}}{{/ secondTitle}}
</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">基础商品</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号、一级分类、二级分类、三级分类、四级分类、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型、尺码、条码、能否补货、SKN计数</span><br>
3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="panel-col">
<a id="pass-btn" href="javascript:;" class="btn btn-info">上传</a>
</div>
</td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div class="dataTab_wrapper" id="basicTable"></div>
</div>
\ No newline at end of file
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">商品管理</a></li>
<li>
{{# secondTitle}}{{.}}{{/ secondTitle}}
{{^ secondTitle}}{{pageTitle}}{{/ secondTitle}}
</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>{{pageTitle}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td rowspan="2">补货</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">SKU|补货</span><br>
3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a>
</td>
</tr>
<tr>
<td rowspan="2">奥莱</td>
<td>上传EXCEL:</td>
<td style="position: relative;"><input id="brand-file" name="file" data-type="brandProperty" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td>
</tr>
<tr>
<td>说明:</td>
<td colspan="2">
1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
2、第一行标题栏:<span style="color: #67D267;">SKU|奥莱</span><br>
3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a>
</td>
</tr>
</table>
</div>
</div>
</div>
\ No newline at end of file
... ...