Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ZhongW
9 years ago
Commit
67890162deffed701e32f2fae4e54871875f8b08
1 parent
511211d4
隐掉BLK
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
233 additions
and
1 deletions
code/apps/goods/controllers/basegoods.js
code/apps/goods/views/batchSetPortal/Batch.html
code/static/js.jquery/module/goods/basegoods/Edit.js
code/static/js.jquery/module/goods/batchSetPortal/Batch.js
code/apps/goods/controllers/basegoods.js
View file @
6789016
...
...
@@ -99,4 +99,15 @@ module.exports=function(app) {
/*通过任务ID查看任务是否被执行完*/
app
.
post
(
"/product/queryBatchImportResult"
,
"basegoods_queryBatchImportResult"
);
/*批量*/
app
.
get
(
"/supplier/baseproduct/batchSetPortal"
,
"goods.batchSetPortal.Batch"
,
function
(){
this
.
$extend
=
{
moduleName
:
"基础商品"
,
pageName
:
"批量功能"
,
isPL
:
true
}
});
}
\ No newline at end of file
...
...
code/apps/goods/views/batchSetPortal/Batch.html
0 → 100644
View file @
6789016
<
%include '../../../common/views/__ui/header'%>
<
%include '../../../common/views/__partail/ListHeader'%>
<
%if isPL%>
<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=
"appTypeModify"
name=
"file"
data-type=
""
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=
"/ajax/link/batchModifyAppType"
>
下载样例
</a>
</td>
</tr>
</table>
</div>
<div
class=
"panel-body red"
id=
"message"
>
</div>
</div>
</div>
<
%else%>
<div
class=
"contentpanel"
>
<div
class=
"panel panel-default"
style=
"margin-bottom:10px;"
>
<div
class=
"panel-body"
>
<div
class=
"rows"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-1 control-label"
>
品牌
<span
class=
"red"
>
*
</span></label>
<div
class=
"col-sm-2"
>
<select
id=
"brandId"
class=
"form-control"
required
>
<option
value=
"-1"
>
选择品牌
</option>
</select>
</div>
<label
class=
"col-sm-1 control-label"
>
管理店铺
<span
class=
"red"
>
*
</span></label>
<div
class=
"col-sm-2"
>
<select
id=
"shopId"
class=
"form-control"
>
<option
value=
"-1"
>
选择店铺
</option>
</select>
</div>
<label
class=
"col-sm-1 control-label"
>
JIT供应商
</label>
<div
class=
"col-sm-2"
>
<select
id=
"supplierId"
class=
"form-control"
>
<option
value=
"-1"
>
选择JIT供应商
</option>
</select>
</div>
</div>
</div>
<table
class=
"table table-bordered"
>
<tr>
<td
rowspan=
"2"
>
基础商品
</td>
<td>
上传EXCEL:
</td>
<td
>
<div
class=
"panel-col"
style=
"position: relative;"
>
<input
id=
"baseProduct"
name=
"file"
data-type=
"baseProduct"
type=
"file"
style=
"cursor: pointer; height: 37px; top: 8px;"
>
</div>
<div
class=
"panel-col"
style=
"line-height: 40px;position: relative;left: -60px;"
>
<span
class=
"red"
>
必须输入品牌、店铺
</span>
</div>
</td>
</tr>
<tr>
<td>
说明:
</td>
<td
colspan=
"2"
>
1、上传文件必须是
<span
style=
"color:red;"
>
.xlsx
</span>
文件
<br>
2、第一行标题栏:
<span
style=
"color: #67D267;"
>
货品名称、厂家编号、一级分类、二级分类、三级分类、四级分类、性别、货品年、货品季、商品属性、吊牌价、销售价、色系、厂家颜色、款型、尺码、条码、能否补货、SKN计数,年龄层(成人,大童,中童,小童,幼童),重点款,预计上架时间、upm条码
</span><br>
3、
<a
href=
"/ajax/link/baseproduct"
style=
"margin: 0; text-decoration: underline"
>
下载样例.xlsx
</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div
class=
"panel panel-primary-head"
>
<div
class=
"panel-body red"
id=
"message"
>
</div>
</div>
<
%/if%>
<
%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
...
...
code/static/js.jquery/module/goods/basegoods/Edit.js
View file @
6789016
...
...
@@ -102,7 +102,7 @@ var tabTree=new common.tabTree("#tree",SORTDATA);
tabTree
.
isfeeze
=
true
;
if
(
ACTION
==
1
){
//编辑页面显示展示平台
$
(
'.showPlatform'
).
show
();
/*$('.showPlatform').show();*/
}
if
(
ACTION
==
1
&&
canEditSort
){
...
...
code/static/js.jquery/module/goods/batchSetPortal/Batch.js
0 → 100644
View file @
6789016
'use strict'
;
var
$
=
require
(
'jquery'
),
common
=
require
(
'../../../common/common'
);
new
common
.
dropDown
({
el
:
"#brandId"
,
ajax
:
"brand"
,
params
:
function
(){
return
{
status
:
1
,
userLimitFlag
:
true
}
}});
new
common
.
dropDown
({
el
:
"#shopId"
,
ajax
:
"sortbybrand"
,
params
:
function
(){
return
{
brandId
:
$
(
"#brandId"
).
val
()}
}});
new
common
.
dropDown
({
el
:
"#supplierId"
,
ajax
:
"getjitSup"
,
params
:
function
(){
return
{
brandId
:
$
(
"#brandId"
).
val
(),
shopId
:
$
(
"#shopId"
).
val
()}
}});
$
(
'input[type="file"]'
).
after
(
'<div class="file-name btn btn-default">请选择文件</div>'
);
var
loadModal
=
null
;
function
batchExport
(
el
,
type
)
{
return
{
params
:
{
type
:
type
,
brandId
:
common
.
util
.
__input
(
"brandId"
),
shopId
:
common
.
util
.
__input
(
"shopId"
),
supplierId
:
common
.
util
.
__input
(
"supplierId"
),
__type
:
"batch-import"
},
onStart
:
function
(
params
)
{
params
.
brandId
=
common
.
util
.
__input
(
"brandId"
);
params
.
shopsId
=
common
.
util
.
__input
(
"shopId"
);
params
.
supplierId
=
common
.
util
.
__input
(
"supplierId"
);
params
.
brandName
=
params
.
brandId
?
$
(
"#brandId"
).
find
(
"option[value="
+
$
(
"#brandId"
).
val
()
+
"]"
).
text
():
""
;
params
.
shopsName
=
params
.
shopsId
?
$
(
"#shopId"
).
find
(
"option[value="
+
$
(
"#shopId"
).
val
()
+
"]"
).
text
():
""
;
params
.
supplierName
=
params
.
supplierId
?
$
(
"#supplierId"
).
find
(
"option[value="
+
$
(
"#supplierId"
).
val
()
+
"]"
).
text
():
""
;
console
.
log
(
"params"
,
params
);
loadModal
=
common
.
dialog
.
load
();
$
(
"#message"
).
html
(
''
);
//$(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", ""));
},
onComplete
:
function
(
response
)
{
console
.
log
(
"批量接口返回数据"
,
response
);
$
(
"#message"
).
html
(
''
);
if
(
response
.
code
==
200
&&
response
.
data
.
taskId
)
{
__ajaxExeclById
(
response
.
data
.
taskId
);
// common.util.__tip(response.message, 'success');
return
;
}
if
(
loadModal
)
{
loadModal
.
close
();
}
if
(
response
.
data
&&
response
.
data
.
failFileReason
.
length
){
$
(
"#message"
).
html
(
response
.
data
.
failFileReason
.
join
(
'<br/>'
));
return
false
;
}
common
.
util
.
__tip
(
response
.
message
,
'warning'
);
}
}
}
/*展示平台*/
common
.
edit
.
ajaxfileupload
(
'#appTypeModify'
,
batchExport
(
'#sort-file'
,
'appTypeModify'
));
/*奥莱*/
common
.
edit
.
ajaxfileupload
(
'#outletModify'
,
batchExport
(
'#sort-file'
,
'outletModify'
));
/*补货*/
common
.
edit
.
ajaxfileupload
(
'#supplyModify'
,
batchExport
(
'#brand-file'
,
'supplyModify'
));
/*修改条码*/
common
.
edit
.
ajaxfileupload
(
'#factoryCodeModify'
,
batchExport
(
'#brand-file'
,
'skuFactoryCodeModify'
));
/*基础商品导入*/
$
(
"#baseProduct"
).
prop
(
"disabled"
,
true
);
common
.
edit
.
ajaxfileupload
(
'#baseProduct'
,
batchExport
(
'#sort-file'
,
'baseProduct'
));
var
isbrandId
=
false
,
isshops
=
false
;
function
jiekai
(){
if
(
isbrandId
&&
isshops
){
$
(
"#baseProduct"
).
prop
(
"disabled"
,
false
);
}
else
{
$
(
"#baseProduct"
).
prop
(
"disabled"
,
true
);
}
}
$
(
document
).
on
(
"change"
,
"#brandId"
,
function
(){
if
(
$
(
this
).
val
()
>
0
){
isbrandId
=
true
;
}
else
{
isbrandId
=
false
;
}
jiekai
();
$
(
"#shopId"
).
val
(
-
1
).
trigger
(
"change"
);
$
(
"#supplierId"
).
val
(
-
1
).
trigger
(
"change"
);
});
$
(
document
).
on
(
"change"
,
"#shopId"
,
function
(){
if
(
$
(
this
).
val
()
>
0
){
isshops
=
true
;
}
else
{
isshops
=
false
;
}
jiekai
();
$
(
"#supplierId"
).
val
(
-
1
).
trigger
(
"change"
);
})
function
__ajaxExeclById
(
unquid
){
var
params
=
{
param
:
unquid
};
common
.
util
.
__ajax
({
url
:
'/product/queryBatchImportResult'
,
data
:
params
},
function
(
res
){
if
(
res
.
data
.
length
){
//成功操作
if
(
loadModal
)
{
loadModal
.
close
();
}
common
.
util
.
__tip
(
res
.
message
,
'success'
);
}
else
{
setTimeout
(
function
(){
__ajaxExeclById
.
call
(
null
,
unquid
);
},
5000
);
}
$
(
"#message"
).
html
(
res
.
message
);
},
true
);
}
// __ajaxExeclById("batchBasePrd1459835824928");
...
...
Please
register
or
login
to post a comment