Authored by dongjunjie

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

... ... @@ -41,8 +41,8 @@ console.log(RESPONSEDATA);
$("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA));
/*类目配置*/
var ENUM={
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"N","presaleStorageNum":""}
var ENUM={//"presaleStorageNum":""
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"Y"}
}
/*公共模块*/
... ... @@ -184,17 +184,17 @@ if(!param){//RESPONSEDATA.isAuditing!=200
var g=new common.grid({
el:"#basicTable",
columns:[
{display:"分类名称",render:function(item){
{display:"颜色",render:function(item){
var html=[];
var txt=item.factoryGoodsName?item.factoryGoodsName:"";
html.push("<p>名称:<input type='text' class='w-goods-text' data-index="+item.__index+" value='"+txt+"' placeholder='分类名称' required/><p>");
html.push("<p>厂家颜色:<input type='text' class='w-goods-text' data-index="+item.__index+" value='"+txt+"' placeholder='分类名称' required/><p>");
html.push("<p>色系:"+item.goodsName+"<p>");
html.push('<button type="button" data-index='+item.__index+' class="sortdelete btn btn-danger btn-xs">删除</button>');
return html.join("");
}},
{
display:"分类图片",render:function(item){
display:"图片",render:function(item){
//goodsColorImage
return "<input type=file name='goodsColorImage' id='file__"+item.__index+"' value='"+item.goodsColorImage+"' />";
}
... ... @@ -206,10 +206,12 @@ var g=new common.grid({
}
var html=[];
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push("<dov class='rows'><div class='form-group'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-2'>是否补货</div></div></div>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
html.push(common.util.__template2($("#template").html(),{index:item.__index,ISXIANGO:ISXIANGO,goodsSizeList:item.goodsSizeList}));
// var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
//ISXIANGO:ISXIANGO
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
html.push('</div>');
return html.join('');
}
... ... @@ -313,12 +315,12 @@ $(document).on("change",":radio[name=gender]",function(){
});
$(document).on("change",":radio[name=isAdvance]",function(){
g.reload();
$("#stock").val("");
$.each(g.__rows,function(inex,item){
$.each(item.goodsSizeList,function(inex1,item1){
item1.presaleStorageNum="";
});
});
// $("#stock").val("");
// $.each(g.__rows,function(inex,item){
// $.each(item.goodsSizeList,function(inex1,item1){
// item1.presaleStorageNum="";
// });
// });
if($(this).val()=="Y"){
$("#expectArrivalTimeStr").attr("required","required");
$("#expectArrivalTimeStrTxt").html("预计到货时间<span class='red'>*</span>");
... ... @@ -383,19 +385,19 @@ $(document).on("change",".btn-sort-kebu",function(){
var item=g.__rows[_index].goodsSizeList[_eq];
item.isSuppled=$(this).val();
});
$(document).on("change",".btn-sort-kucun",function(){
var _index=$(this).data("index");
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.presaleStorageNum=$(this).val();
var total=0;
$.each(g.__rows,function(index,item1){
$.each(item1.goodsSizeList,function(index,item2){
total+=(+item2.presaleStorageNum);
});
});
$("#stock").val(total);
});
// $(document).on("change",".btn-sort-kucun",function(){
// var _index=$(this).data("index");
// var _eq=$(this).data("eq");
// var item=g.__rows[_index].goodsSizeList[_eq];
// item.presaleStorageNum=$(this).val();
// var total=0;
// $.each(g.__rows,function(index,item1){
// $.each(item1.goodsSizeList,function(index,item2){
// total+=(+item2.presaleStorageNum);
// });
// });
// $("#stock").val(total);
// });
$(document).on("change",".w-goods-text",function(){
var item=g.__rows[$(this).data("index")];
item.factoryGoodsName=$(this).val();
... ...
... ... @@ -39,7 +39,8 @@ grid.prototype = {
init: function(url, second) {
var g = this,
p = this.options;
p.page = 1;
g.destory();
p.url = url;
p.second = second;
... ... @@ -58,6 +59,21 @@ grid.prototype = {
g.renderBody();
g.bindEvent();
},
destory:function() {
var g = this,
p = this.options;
if (g.grid) {
g.grid.html("");
g.grid = null;
g.table = null;
g.thead = null;
g.pagination = null;
g.clear();
}
},
renderBody: function() {
var g = this,
p = this.options;
... ... @@ -181,6 +197,11 @@ grid.prototype = {
if (column.width) {
c.attr("width", column.width);
}
if (column.style) {
c.attr("style", column.style);
}
if (column.name) c.attr({
columnname: column.name
});
... ...
/**
* Created by wangqianjun on 16/5/4.
*/
var $ = require('jquery');
common = require('../common/common');
datepicker = require('../util/datepicker');
var ENUM = {
AuditEnum: {
'0': '待审核',
'1': '审核通过',
'2': '审核失败',
},
RecommendEnum: {
true: '已推荐',
false: '未推荐',
},
RewardEnum: {
false: '未发送奖励',
true: '奖励已发放',
},
}
//下拉框
new common.dropDown({
el: "#status"
});
new common.dropDown({
el: "#recomReward"
});
new common.dropDown({
el: "#hasImage"
});
//日期插件
$('.hasDatepicker').fdatepicker({
format: 'yyyy-mm-dd'
});
var g = new common.grid({
el: '#basicTable',
size: 10,
parms: function () {
return {
status:$('#status').val(),
recomReward:$('#recomReward').val(),
hasImage:$('#hasImage').val(),
beginTime: common.util.__input('beginTime'),
endTime: common.util.__input('endTime'),
uid: common.util.__input('uid'),
productName: common.util.__input('productName'),
productSkn: common.util.__input('productSkn'),
orderCode: common.util.__input('orderCode')
};
},
columns: [{
display: '订单号',
name: "orderId"
}, {
display: '商品名称',
render: function (item) {
var goods = item.goods;
if (goods != null) {
productHref = "http://item.yohobuy.com/product/pro_" + item.productId + "_" + goods.goodsId + "/" + goods.cnAlphabet + ".html";
}
return '<a href="' + item.productHref + '">' + item.productName + '</a>'
}
}, {
display: '用户id',
name: "uid"
}, {
display: '商品图片',
render: function (item) {
var goods = item.goods;
var goodImgUrl = "";
if (goods != null && goods.goodsImg != null && goods.goodsImg.length > 0) {
goodImgUrl = goods.goodsImg[0].imageUrl;
}
return '<img src="' + goodImgUrl + '" width="100" height="60"/>'
}
}, {
display: "评价图片",
render: function (item) {
//item.url = common.util.__template(item.url,{mode:2,width:100,height:100});
return '<img src="' + item.url + '" width="100" height="60"/>'
}
}, {
display: '评价内容',
name: "content",
//width:'15%',
style:"width:15%; word-break:break-all;"}
, {
display: '评价星级',
name: "satisfied"
}, {
display: '审核状态',
render: function (item) {
return "<p>" + ENUM.AuditEnum[item.status] + "</p>";
}
},
{
display: '审核返币',
render: function (item) {
return "<p>" + ENUM.RewardEnum[item.shareReward] + "</p>";
}
},
{
display: '推荐状态',
render: function (item) {
return "<p>" + ENUM.RecommendEnum[item.recomReward] + "</p>";
}
}, {
display: "创建时间",
render: function (item) {
var t = new Date(item.createTime * 1000);
var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
return "<p>" + formatted + "</p>";
}
}, {
display: '备注',
name: "remark"
}, {
display: '审核操作',
//}
render: function (items) {
var HtmArr = [];
if (items.status == 0) {
HtmArr.push('<a data-index="' + items.__index + '" data-type="pass" href="JavaScript:;" class="btn btn-success btn-xs aud">审核通过</a>');
HtmArr.push('<a data-index="' + items.__index + '" data-type="fail" href="JavaScript:;" class="btn btn-danger btn-xs aud">审核不通过</a>');
} else if (items.status == 1) {
HtmArr.push('<a data-index="' + items.__index + '" data-type="cancelpass" href="JavaScript:;" class="btn btn-warning btn-xs aud">取消审核通过</a>');
} else if (items.status == 2) {
HtmArr.push('<a data-index="' + items.__index + '" data-type="cancelpass" href="JavaScript:;" class="btn btn-warning btn-xs aud">取消审核不通过</a>');
}
return HtmArr.join('');
}
}, {
display: '推荐操作',
//}
render: function (items) {
var HtmArr = [];
if (items.recomReward == 0) {
HtmArr.push('<a data-index="' + items.__index + '" data-type="pass" href="JavaScript:;" class="btn btn-success btn-xs recomment">推荐</a>');
} else {
HtmArr.push('<a data-index="' + items.__index + '" data-type="fail" href="JavaScript:;" class="btn btn-danger btn-xs recomment">取消推荐</a>');
}
return HtmArr.join('');
}
}
]
});
g.init('/shareOrder/shareOrderList');
// 审核
$(document).on('click', '.aud', function () {
var item = g.rows[$(this).data("index")];
var type = $(this).data('type');
common.util.__ajax({
url:'/shareOrder/aud',
data: {
commentId: item.id,
result: type,
uid: item.uid
}
}, function (res) {
if (res.code == 200) {
common.util.__tip('操作成功', 'success');
g.reload();
} else {
common.util.__tip(res.message);
}
}, true);
});
// 推荐
$(document).on('click', '.recomment', function () {
var item = g.rows[$(this).data("index")];
var type = $(this).data('type');
common.util.__ajax({
url:'/shareOrder/recommend',
data: {
commentId: item.id,
recomReward: type,
uid: item.uid
}
}, function (res) {
if (res.code == 200) {
common.util.__tip('操作成功', 'success');
g.reload();
} else {
common.util.__tip(res.message);
}
}, true);
});
$(document).on('click', '#filter', function () {
g.reload();
});
... ...
... ... @@ -66,8 +66,13 @@ var g = new common.grid({
return "<p>" + formatted + "</p>";
}
},
{display: "回复内容", name: "content"},
{display: "回复文章", name: "articleTitle"},
{
display: "回复内容",
name: "content",
width:'15%',
},
{display: "回复文章", name: "articleTitle", width:'15%',},
{display: "编辑", name: "editorName"},
... ... @@ -239,6 +244,7 @@ $(document).on('click', '#pass-btn', function() {
g.options.columns[8].hidden = false;
$('#filter-div').hide();
g.init('/guang/comment/getList');
//g.distroy
});
//全部
... ... @@ -258,27 +264,6 @@ $(document).on('click', '#filter-btn', function() {
});
//
////删除
//$(document).on('click', '.info-del', function() {
// var item = g.rows[$(this).data("index")];
//
// common.dialog.confirm("温馨提示","确定要删除该作者?" , function() {
// common.util.__ajax({
// url: '/guang/author/delAuthor',
// data: {
// uid: item.uid,
// }
// }, function(res) {
// if (res.code == 200) {
// g.reload();
// } else {
// common.util.__tip(res.message);
// }
// });
// });
//});
function commentOP(prefix, url, item) {
... ...
... ... @@ -39,7 +39,7 @@ var g = new common.grid({
tagName: common.util.__input('articleTitle'),
classifyId: common.util.__input('maxSortId'),
isHot: common.util.__input('articleGender'),
status: common.util.__input('status1'),
status: common.util.__input('status'),
};
},
columns: [
... ...
... ... @@ -25,16 +25,16 @@ var edit=require('../common/edit');
}
return true;
});
e.on("validate",function(){
//registeredCapital
var registeredCapital=$.trim($("#registeredCapital").val());
//+registeredCapital<999999999.99
if(!/^(([0-9]{1,9})(\.[0-9]{1,2}){0,1})$/.test(registeredCapital)){
return "注册资本格式无效(0~999999999.99)";
}
//phone
return true;
});
// e.on("validate",function(){
// //registeredCapital
// var registeredCapital=$.trim($("#registeredCapital").val());
// //+registeredCapital<999999999.99
// if(!/^(([0-9]{1,9})(\.[0-9]{1,2}){0,1})$/.test(registeredCapital)){
// return "注册资本格式无效(0~999999999.99)";
// }
// //phone
// return true;
// });
e.init();
var submit=function(callback,config){
e.submit($("#basicForm").attr("action"),function(option){
... ...
... ... @@ -15,13 +15,14 @@ var config = {
//domain:'http://172.16.6.140:8088/platform', // Object
//domain: 'http://172.16.6.236:8088/platform',// 钱军
// domain:'http://172.16.6.240:8088/platform',// 王书生
// domain:'http://172.16.6.176:8088/platform',// 王书生
domain:'http://172.16.6.141:9090/',// 赵琪
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
// domain: 'http://192.168.102.216:8086/platform',
domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://192.168.102.202:8088/platform',
//domain:'http://172.16.6.120:8088/platform',//曹艳
//domain:'http://172.16.6.231:8080/platform',//王伟
//domain: 'http://172.16.6.239:8080', //孙杰翔
... ...
/**
* Created by wangqianjun on 16/5/4.
*/
exports.domain = require('../config/common.js').domain;
//=================================【资讯管理】
exports.res = [
{//逛-> 资讯管理 空白页
route: '/goods/auditing/index',
method: 'GET',
view: 'pages/goods/auditing',
src: '/goods/auditing',
data: {
iscreate: true
}
}, {
// 资讯管理列表数据
route: '/shareOrder/shareOrderList',
method: 'POST',
url: '/shareOrder/shareOrderList',
params: [
{name: 'status', type: 'String'},
{name: 'recomReward', type: 'String'},
{name: 'hasImage', type: 'String'},
{name: 'beginTime', type: 'String'},
{name: 'endTime', type: 'String'},
{name: 'uid', type: 'String'},
{name: 'productName', type: 'String'},
{name: 'productSkn', type: 'String'},
{name: 'orderCode', type: 'String'},
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'},
]
}, {
route: '/shareOrder/queryShareOrderNum',
method: 'POST',
url: '/shareOrder/queryShareOrderNum',
params: [
{name: 'orderCode', type: 'Number'},
{name: 'productId', type: 'String'},
{name: 'uid', type: 'Number'},
]
}, {
route: '/shareOrder/aud',
method: 'POST',
url: '/shareOrder/aud',
params: [
{name: 'commentId', type: 'Number'},
{name: 'result', type: 'String'},
{name: 'uid', type: 'String'},
]
}, {
route: '/shareOrder/recommend',
method: 'POST',
url: '/shareOrder/recommend',
params: [
{name: 'commentId', type: 'Number'},
{name: 'recomReward', type: 'String'},
{name: 'uid', type: 'String'},
]
}
];
\ No newline at end of file
... ...
... ... @@ -33,7 +33,9 @@ exports.res = [
{name: 'size', type: 'Number'},
]
}, {
},
{
// 资讯管理-列表操作(修改、发布、关闭、推荐、取消推荐)
route: '/guang/article/operation',
... ...
... ... @@ -91,16 +91,12 @@
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
<option value="Y">可补货</option>
</select>
</div>
[[if ISXIANGO]]
<div class="col-sm-2">
<input type="text" class="form-control btn-sort-kucun" value="[[item.presaleStorageNum]]" placeholder="预售库存" data-index=[[index]] data-eq=[[__index]] required></input>
</div>
[[/if]]
<div class="col-sm-2">
[[if __index==goodsSizeList.length-1]]
<button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
... ... @@ -312,11 +308,6 @@
<input type="radio" name="isVip" value="N">关闭</label>
<input type="hidden" id="isVip" value="[[isVip||'B']]" for="radio" />
</div>
<label class="col-sm-2 control-label">预售库存</label>
<div class="col-sm-2">
<input type="number" id="stock" class="form-control" value="[[stock]]" readonly="readonly" />
</div>
</div>
[[/if]]
... ...
<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>
<div>
<div style="width: 30%;float: left;">
<h4>晒单评价审核</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="form-inline">
<div class="form-group">
<!--<label for="status">审核状态 </label>-->
<select id="status" class="form-control" style="width:110px">
<option value="0">待审核</option>
<option value="1">审核通过</option>
<option value="2">审核失败</option>
</select>
</div>
<div class="form-group" >
<!--<label for="recomReward">推荐状态</label>-->
<select id="recomReward" class="form-control" style="width:120px">
<option value="">推荐状态</option>
<option value="0">未推荐</option>
<option value="1">已推荐</option>
</select>
</div>
<div class="form-group">
<!--<label for="hasImage">图片筛选</label>-->
<select id="hasImage" class="form-control" style="width:120px">
<option value="">图片筛选</option>
<option value="0">无图</option>
<option value="1">有图</option>
</select>
</div>
<div class="form-group">
<input type="text" id="beginTime" class="form-control panel-input hasDatepicker" name="start_time" placeholder="开始时间" value="" kl_vkbd_parsed="true">
</div>
<div class="form-group">
<input type="text" id="endTime" class="form-control panel-input hasDatepicker" name="end_time" placeholder="结束时间" value="" kl_vkbd_parsed="true">
</div>
</div>
<div class="form-inline" style="margin-top:10px">
<div class="form-group">
<!--<label for="uid">用户UID</label>-->
<input type="text" id="uid" class="form-control" placeholder="用户UID"/>
<!--</label>-->
</div>
<div class="form-group">
<!--<label for="goodsname">商品名称</label>-->
<input type="text" id="productName" class="form-control" placeholder="商品名称"/>
<!--</label>-->
</div>
<div class="form-group">
<!--<label for="skn">SKN</label>-->
<input type="number" id="productSkn" class="form-control" placeholder="SKN"/>
<!--</label>-->
</div>
<div class="form-group">
<!--<label for="order">订单编号</label>-->
<input type="text" id="orderCode" class="form-control" placeholder="订单编号"/>
<!--</label>-->
</div>
<button type="submit" id="filter" class="btn btn-info">搜索</button>
</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable_wrapper" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="basicTable">
</div>
<nav>
<ul id="pagination" class="pagination pagination-lg"></ul>
</nav>
</div>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -52,7 +52,7 @@
</div>
<div class="panel-col">
<select id="status" class="form-control">
<option value="-1">请选择状态</option>
<option value="">请选择状态</option>
<option value="1">已发布</option>
<option value="0">未发布</option>
<option value="-1">已关闭</option>
... ...
... ... @@ -83,7 +83,8 @@
<div class="col-sm-10">
<input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title="">
<select id="classifyId" value="[[classifyId]]" required="required" class="form-control">
<option value="-1">请选择分类</option>
<!--<option value="-1">请选择分类</option>-->
<option value="[[classifyId||-1]]">[[classifyName||"请选择分类"]]</option>
</select>
</div>
</div>
... ... @@ -98,12 +99,12 @@
</div>
<div class="form-group">
<label for="status1" class="col-sm-2 control-label">是否启用:</label>
<label for="status" class="col-sm-2 control-label">是否启用:</label>
<div class="radio">
<label><input type="radio" value="1" name="status1" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="0" name="status1" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="1" name="status" kl_vkbd_parsed="true"></label>
<label><input type="radio" value="0" name="status" kl_vkbd_parsed="true"></label>
</div>
<input id="status1" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true">
<input id="status" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true">
</div>
</script>
... ...
... ... @@ -90,7 +90,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">注册资本 <span class="red">*</span></label>
<div class="col-sm-8">
<input id="registeredCapital" placeholder="请填写注册资本" class="form-control" required value="{{registeredCapital}}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
<input id="registeredCapital" placeholder="请填写注册资本" class="form-control" required value="{{registeredCapital}}">
</div>
</div>
... ...