Authored by liuyue

Merge branch 'develop' of git.dev.yoho.cn:platform/yohobuy-portal-fe into develop

... ... @@ -8,6 +8,10 @@ tabTree.init();
var ENUM={
/*
*colorId 颜色(主色调)
*goodsColorImage 商品名称
*/
/*
*marketPrice 市场价
*salePrice 销售价
*factoryCode 厂家编号
... ...
/**
* Created by wangqianjun on 16/3/9.
* 商品详情
*/
var $ = require('jquery'),
common = require('../common/common');
var a=common.dialog.__template2($("#template").html(),JSON.parse($("#data").val()));
$("#sale-prop").html(a);
\ No newline at end of file
... ...
... ... @@ -47,9 +47,12 @@ var GoodsTypeEnum = {
/*下拉选择*/
new common.dropDown({el:"#store",ajax:"queryShop"});
new common.dropDown({el:"#brand",ajax:"queryBrand"});
new common.dropDown({el:"#createor",ajax:"querySupplier"});
new common.dropDown({el:"#shopId",ajax:"queryShop"});
new common.dropDown({el:"#brandId",ajax:"queryBrand"});
new common.dropDown({el:"#founder",ajax:"querySupplier"});
var tabTree=new common.tabTree("#sort");
tabTree.init();
var t = new common.tab({
el:"#basicTab",
... ... @@ -75,11 +78,17 @@ var g = new common.grid({
brandId:common.util.__input("brandId"),
name:common.util.__input("filter-name"),
reqDepartment:common.util.__input("filter-dep"),
status: t.active
status: t.active,
sortId: tabTree.selected.length>0?tabTree.selected[tabTree.selected.length-1].id:""
};
},
columns:[
{display:"SKN",name:"productSkn"},
{display:"SKN",render:function(item){
var html=[];
html.push('<a data-index="'+ item.__index+ '" href="/base/goods/info/'+ item.productSkn +'" class="btn btn-info btn-xs edit-class-btn">'+item.productSkn+'</a>');
return html.join('');
}},
{display:"商品信息",render:function(item){
var html=[];
html.push("<p>名称:"+item.productName+"</p>");
... ... @@ -148,13 +157,10 @@ var g = new common.grid({
{display:"其他",render:function(item){
var html=[];
var grade = (item.grade == 1) ? "重点款" : "非重点款";
var limited = (item.isLimited == "Y")? "限量款" : "非限量款";
var limitedPurchase = (item.isLimitbuy == "Y")? "限购" : "非限购";
var replenishment = "暂无此字段";
var gender = GenderEnum.gender[item.gender];
html.push("<p>"+grade+"</p>");
... ... @@ -174,6 +180,14 @@ var g = new common.grid({
}},
{display:"创建人",name:"createUser"},
{display:"操作",render:function(item){
var html=[];
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn">修改</a>');
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn">通过</a>');
html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn">驳回</a>');
return html.join('');
}},
]
});
g.init('/base/goods/ajax/index');
... ...
'use strict';
var $ = require('jquery'),
common = require('../common/common');
require('../util/custom.js');
/*
* 获取业务数据
*/
window.NETSALEDATA=require('./partials/data.js');
console.log(window.NETSALEDATA);
/*加载其他模块*/
require('./partials/xiaobian');
var e = new common.edit('#basicForm');
e.init();
// var e = new common.edit('#basicForm');
// e.init();
common.edit.ajaxfileupload('.goods-img', {
action: '/ajax/upload',
onComplete: function() {
// common.edit.ajaxfileupload('.goods-img', {
// action: '/ajax/upload',
// onComplete: function() {
}
})
\ No newline at end of file
// }
// })
\ No newline at end of file
... ...
'use strict';
var $ = require('jquery'),
common = require('../../common/common');
var ENUM=null;
var param=location.href.match(/edit\/(\d+)/)[1];
common.util.__ajax({
url:'/goods/netsale/getdata',
async:false,
data:{
param:param
}
},function(res){
ENUM=res.data;
},true);
module.exports=ENUM;
... ...
console.log("小编SB ");
\ No newline at end of file
... ...
... ... @@ -7,6 +7,23 @@
var $ = require('jquery'),
common = require('../common/common');
var TypeEnum = {
enum: {
1:"品牌款型",
2:"品牌系列",
"":""
}
}
var StatusEnum = {
enum: {
1:"开启",
0:"关闭",
"":""
}
}
new common.dropDown({el: "#models-type"});
new common.dropDown({el: "#status"});
... ... @@ -20,6 +37,11 @@ new common.dropDown({
ajax:"brand"
});
var e = new common.edit('#form-base',{
"bucket" : "activity"
});
e.init();
var g = new common.grid({
el: "#basicTable",
parms: function() {
... ... @@ -29,8 +51,8 @@ var g = new common.grid({
shopsId: common.util.__input("shop"),
brandId: common.util.__input("brand"),
type: common.util.__input("productName"),
status: common.util.__input("status")
status: common.util.__input("status"),
bannarImg: common.util.__input("bannarImg")
};
},
columns: [{
... ... @@ -42,7 +64,7 @@ var g = new common.grid({
}, {
display: '店铺',
name: ''
name: 'shopsName'
}, {
display: '品牌',
name: 'brandName',
... ... @@ -52,7 +74,10 @@ var g = new common.grid({
name: 'seriesName'
}, {
display: '类型',
name:'type'
render: function(item) {
return '<p>"'+TypeEnum.enum[item.type] +'"<p>';
}
}, {
display: 'banner图片',
render: function(item) {
... ... @@ -64,13 +89,14 @@ var g = new common.grid({
name: 'orderBy'
}, {
display: '状态',
name: 'status'
render: function(item) {
return '<p>"'+TypeEnum.enum[item.status] +'"<p>';
}
}, {
display: '操作',
render: function(items) {
var HtmArr = [];
HtmArr.push('<a data-index="'+ items.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn">编辑</a>');
if (items.status === 0) {
... ...
... ... @@ -5,7 +5,9 @@ var $ = require('jquery');
var edit = require('../common/edit');
// 上传图片
var e = new edit('#form-base');
var e = new edit('#form-base',{
"bucket" : "activity"
});
e.init();
$('#save').on('click', function () {
... ...
... ... @@ -99,11 +99,17 @@ var e = new common.edit('#editor-group',ENMA.bucket);
e.on("render",function(){
var _um=$("#limitProductType").val();
$("#limitProductType_"+_um).show().find("input").attr("required",true);
if(_um=="2"){
$("#limitProductType_"+_um).show().find("input").attr("required",true);
}
$(":radio[name=limitProductType]").change(function(){
$(".limitProductType").hide().find("input").removeAttr("required");
var _um=$(this).val();
$("#limitProductType_"+_um).show().find("input").attr("required",true);
if(_um=="2"){
$("#limitProductType_2").show().find("input").attr("required",true);
}else{
$("#limitProductType_2").hide().find("input").removeAttr("required");
}
});
var _sm=$("#hotFlag").val();
... ... @@ -125,9 +131,9 @@ e.on("render",function(){
/*验证批次号*/
e.on("validate", function() {
var _um=$("#limitProductType").val();
if(_um=="2"){
return true;
}
// if(_um=="2"){
// return true;
// }
var param = {
batchNo: $('#batchNo').val(),
id: $("#id").val()
... ...
... ... @@ -67,6 +67,12 @@ var sortmenu=require('../common/sortmenu');
common.util.__tip("排序不可为空","warning");
return;
}
if (data.orderBy < 0) {
common.util.__tip("排序不可为负数", "warning");
return;
}
common.util.__ajax({
url:'/erpproduct/sortattribute/ajax/add',
data:data
... ...
... ... @@ -62,6 +62,11 @@ $(document).on("click", "#btn-add", function () {
common.util.__tip("排序不可为空", "warning");
return;
}
if (data.orderBy < 0) {
common.util.__tip("排序不可为负数", "warning");
return;
}
common.util.__ajax({
url: '/erpproduct/sortsize/ajax/add',
data: data
... ...
... ... @@ -29,7 +29,6 @@ var entry={index:[],libs:[]};
entry.libs=commons;
var readfile=function(dir,callback){
var files = fs.readdirSync(dir);
files.forEach(function (file) {
... ... @@ -37,7 +36,7 @@ var readfile=function(dir,callback){
if (fs.statSync(filePath).isFile() && /.*\.js$/i.test(file)) {
callback && callback(filePath);
}else{
if(file!="common"&&file!="util"){
if(file!="common"&&file!="util"&&file!="partials"){
readfile(filePath,callback);
}
}
... ...
... ... @@ -97,6 +97,7 @@ exports.res = [
view:'pages/basegoods/info',
params:[
{name:'productSkn',type:'Number'},
]
],
src:'/basegoods/goodsInfo'
}
];
\ No newline at end of file
... ...
... ... @@ -190,11 +190,20 @@ exports.res = [
route: '/goods/netsale/edit/:param',
method: 'GET',
view: 'pages/goods/netsale-edit',
url: '/product/getNetSaleInfo',
// url: '/product/getNetSaleInfo',
src: '/goods/netsale-edit',
data: {
action: ''
},
}//,
// params: [{
// name: 'param',
// type: 'number'
// }]
},{
route: '/goods/netsale/getdata',
method: 'POST',
url: '/product/getNetSaleInfo',
params: [{
name: 'param',
type: 'number'
... ...
... ... @@ -74,25 +74,9 @@
</select>
</div>
<div class="panel-col">
<select id="maxSortId" class="form-control">
<option value="-1">一级类目</option>
</select>
</div>
<div class="panel-col">
<select id="middleSortId" class="form-control">
<option value="-1">二级类目</option>
</select>
</div>
<div class="panel-col">
<select id="smallSortId" class="form-control">
<option value="-1">三级类目</option>
</select>
</div>
<div class="panel-col">
<select id="sortId" class="form-control">
<option value="-1">四级类目</option>
</select>
<div class="panel-col" style="width:300px">
<div id="sort"></div>
</div>
<div class="panel-col">
<select id="isJit" class="form-control">
... ...
<div class="container">
<div class="row">
{{#data}}
<div class="col-md-offset-1 col-xs-10 col-sm-10 col-md-10 col-lg-10">
<div class="page-header">
<h4>查看供应商信息</h4>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">公司名称 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ supplierName}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">注册号(营业执照号):</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ supplierCode}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">成立日期:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ foundTime}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">营业期限:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ beginOperateTime}} ~ {{ endOperateTime}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">注册所在地:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ registeredAddress}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">法人代表姓名:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ legalPerson}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">法人身份证电子版:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{legalIdentityCard}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">注册资本:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ registeredCapital}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">营业执照电子版:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{businessLicense}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">组织机构代码证:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{businessLicensePic}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">税务登记证:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{taxCertificate}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">开户许可证:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{accountOpeningLicense}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">纳税人资格证明:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{taxpayerQualificationCertificate}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">行业许可证:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8"><img width="60" height="60" src="{{industryLicense}}"/></div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">经营范围:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ businessRange}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">公司联系电话:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ contactPhone}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">公司联系地址:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ contactAddress}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">联系人:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ linkman}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">联系电话:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ phone}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">传真:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ fax}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">邮件地址:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ email}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">网址:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ url}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">开户行:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ bankName}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">开户账号:
</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ bankAccount}}</div>
</div>
<input type="hidden" id="status" value="{{status}}">
<input type="hidden" id="id" value="{{id}}">
<input type="hidden" id="operations" value="{{operations}}">
{{/data}}
<div class="row show-grid">
{{#edit}}
<button type="button" class="btn btn-success btn-submit" style="display:hidden">审核通过</button>
<button type="button" class="btn btn-danger btn-return" style="display:hidden">审核驳回</button>
{{/edit}}
<button type="button" id="return" class="btn btn-default" onclick="javascript:history.go(-1);">返回</button>
</div>
</div>
</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>基础商品</li>
</ul>
<h4>查看详情</h4>
</div>
</div>
</div>
<div class="contentpanel">
{{# data}}
<div class="panel-body">
<div class="panel panel-default">
<form class="form-horizontal form-bordered">
<div class="panel-heading">
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""
data-original-title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">基本信息</h2>
</div>
<div class="panel-body nopadding">
<div class="form-group">
<div class="col-sm-3">店铺:{{shopId}}</div>
<div class="col-sm-3">品牌:{{brandId}}</div>
<div class="col-sm-3">供应商:{{supplierId}}</div>
</div>
<div class="form-group">
<div class="col-sm-3">品类:{{sizeMaxSortId}}/{{sizeMaxSortId}}/{{sizeMaxSortId}}</div>
<div class="col-sm-3">货品年/季:{{goodsYears}} / {{goodsSeason}}</div>
<div class="col-sm-3">厂家编号:{{factoryCode}}</div>
</div>
<div class="form-group">
<div class="col-sm-2">SKN:{{productSkn}}</div>
<div class="col-sm-2">商品话题:{{shopId}}</div>
</div>
<div class="form-group">
<div class="col-sm-2">商品名称:{{productName}}</div>
<div class="col-sm-2">商品类型:{{shopId}}</div>
</div>
<div class="form-group">
<div class="col-sm-3">年龄层:{{ageLevel}}</div>
<div class="col-sm-3">性别:{{gender}}</div>
<div class="col-sm-3">重点款:{{shopId}}</div>
</div>
<div class="form-group">
<div class="col-sm-3">是否补货:{{shopId}}</div>
<div class="col-sm-3">促销礼品:{{shopId}}</div>
<div class="col-sm-3">限量款:{{shopId}}</div>
</div>
<div class="form-group">
<div class="col-sm-3">吊牌价:{{retailPrice}}</div>
<div class="col-sm-3">销售价:{{salesPrice}}</div>
<div class="col-sm-3">是否限购:{{isLimitbuy}}</div>
</div>
<div class="form-group">
<div class="col-sm-2">预计上架时间:</div>
<div class="col-sm-2">预计到货时间:</div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存文本</button>
</div>
</form>
</div>
</div>
<input type="hidden" id="data" value="{{baseGoodList}}">
<div id="sale-prop">
</div>
{{/ data}}
</div>
<script type="text/template" id="template">
<div class="form-group">
<div class="col-sm-12">
<h4>销售属性:</h4>
<table class="table table-bordered">
<thead>
<tr>
<th>SKC(厂家颜色)</th>
<th>SKU(尺码)</th>
<th>能否补货</th>
</tr>
</thead>
<tbody>
[[each baseGoodList in item i]]
[[each goodsSizeList in item1 j]]
<tr>
<td>[[item1.factoryCode]][[item.goodsName]]</td>
<td>104683747 1/2码)<br>104683846 1/3<br>104683946码)<br></td>
<td>Y<br>Y<br>Y<br></td>
</tr>
[[/each]]
[[/each]]
</tbody>
</table>
</div>
</div>
</script>
... ...
... ... @@ -194,7 +194,8 @@
</div>
</div>
<div class="panel-footer">
<button class="btn btn-primary">保存封面</button>
<button class="btn btn-pass">通过</button>
<button class="btn btn-reject">驳回</button>
</div>
</form>
</div>
... ...
... ... @@ -46,18 +46,21 @@
<input type="hidden" value="{{limitProductType}}" id="limitProductType" for="radio">
</div>
</div>
<div class="form-group limitProductType" id="limitProductType_1" style="display: none;">
<label class="col-sm-2 control-label">限购码批次<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="batchNo" placeholder="限购码批次" class="form-control" maxlength="30" value="{{batchNo}}">
</div>
</div>
<div class="form-group limitProductType" id="limitProductType_2" style="display: none;">
<label class="col-sm-2 control-label">排队限购ID:<span class="red">*</span></label>
<div class="col-sm-8">
<input id="activityId" type="text" class="form-control" value="{{activityId}}" placeholder="排队限购ID" />
</div>
</div>
<div class="form-group limitProductType" id="limitProductType_1">
<label class="col-sm-2 control-label">限购码批次<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="batchNo" placeholder="限购码批次" class="form-control" maxlength="30" value="{{batchNo}}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">发售日期<span class="red">*</span></label>
... ... @@ -151,10 +154,10 @@
<script type="text/template" id="vidioDialogTemp">
<!-- Mov avi rmvb mp4 -->
<div class="row">
<div id="upload-wrapper1" class="col-md-3">
<input id="videofile" name="videofile" type="file" extend="mp4" class="btn btn-primary ml10" value="{attachUrl}">
<input id="videofile" name="videofile" type="file" extend="mp4,rmvb,avi,mov" class="btn btn-primary ml10" value="{attachUrl}">
</div>
<div class="col-md-9">
<div class="row">
... ...
... ... @@ -22,7 +22,7 @@
</div>
</div>
<div class="contentpanel">
<div class="contentpanel" id="form-base">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
... ... @@ -128,6 +128,12 @@
</div>
<div class="form-group">
<label for="bannarImg" class="col-sm-3 control-label">banner图片:</label>
<div class="col-sm-6" id="colorUrlBox">
<input type="file" id="bannarImg" name="bannarImg">
</div>
</div>
<div class="form-group">
... ... @@ -145,3 +151,4 @@
</form>
</script>
... ...