Authored by weiqingting

Merge branch 'develop' into release/qqtest


'use strict';
var $ = require('jquery'),
common=require('../common/common');
var $ = require('jquery'),
common=require('../common/common');
var e = new common.edit("#activityForm", {
"bucket" : "activity"
});
... ... @@ -10,23 +8,23 @@ e.on("render", function() {
});
var bgStyle = $("#backgroundStyle").val();
var prizeList = $("#prizeList").val();
if (bgStyle) {
var arr = bgStyle.split(",");
$(arr).each(function(index, item) {
$("#backgroundStyle"+ (index + 1)).attr("value", item);
});
}
if (prizeList) {
var prizeObj = JSON.parse(prizeList)[0];
$("#prizeId").val(prizeObj.prizeId);
$("#prize").val(prizeObj.prize);
$("#whiteList").val(prizeObj.whiteList);
$("#realUserNum").val(prizeObj.realUserNum);
$("#sockUserNum").val(prizeObj.sockUserNum);
$("#prizeType").val(prizeObj.prizeType);
}
var bgStyle = $("#backgroundStyle").val();
var prizeList = $("#prizeList").val();
if (bgStyle) {
var arr = bgStyle.split(",");
$(arr).each(function(index, item) {
$("#backgroundStyle"+ (index + 1)).attr("value", item);
});
}
if (prizeList) {
var prizeObj = JSON.parse(prizeList)[0];
$("#prizeId").val(prizeObj.prizeId);
$("#prize").val(prizeObj.prize);
$("#whiteList").val(prizeObj.whiteList);
$("#realUserNum").val(prizeObj.realUserNum);
$("#sockUserNum").val(prizeObj.sockUserNum);
$("#prizeType").val(prizeObj.prizeType);
}
function dealTotalHours() {
var beginTimeStr = $("#beginTimeStr").val();
... ... @@ -69,20 +67,25 @@ e.on("validate",function() {
$("#prizeList").val(JSON.stringify(prizeObj));
return true;
});
$("#btnReview").click(function(){
e.submit($("#activityForm").attr("action"),function(option){
option.success=function(res){
res = res.data;
if(res.code == "200") {
e.$tip("提交成功", function() {
location.href="/activity/drawline/index"
}, 'growl-success');
}else{
e.$tip(res.message);
}
},
option.error=function(res){
e.$tip(res.message);
}
});
$("#btnReview").click(function(){
e.submit($("#activityForm").attr("action"),function(option){
option.success=function(res){
res = res.data;
if(res.code == "200") {
e.$tip("提交成功", function() {
location.href="/activity/drawline/index"
}, 'growl-success');
}else{
e.$tip(res.message);
}
},
option.error=function(res){
e.$tip(res.message);
}
});
});
//输入限制
$(".number").on("keyup", function() {
$(this).val($(this).val().replace(/\D/g, ''));
});
... ...
//商家管理
'use strict';
var $ = require('jquery'),
//商家管理
'use strict';
var $ = require('jquery'),
common=require('../common/common');
var ENUM={
status:{1:'开启',0:'关闭',2:'未过期'}
}
var ENUM={
status:{1:'开启',0:'关闭',2:'未过期'}
}
new common.dropDown({el:"#status"});
new common.dropDown({el:"#status"});
$('#filter-btn').on('click',function(){
g.reload(1);
});
$('#filter-btn').on('click',function(){
g.reload(1);
});
var g=new common.grid({
el:'#basicTable',
parms:function(){
return {
"status":common.util.__input("status"),
"activityName":common.util.__input("activityName")
};
},
columns:[
{display:"活动ID",name:"activityId"},
{display:"活动名称",name:"activityName"},
{display:"状态",name:"status",render:function(item){
var str = ENUM.status[item.status];
var now = parseInt(new Date().getTime() / 1000);
if (item.endTime < now) {
str += "&nbsp;&nbsp;已过期";
}
return str;
}},
{display:"活动时间",name:"createTime",render:function(item) {
return item.beginTimeStr + "&nbsp;-&nbsp;" + item.endTimeStr;
}},
{display:"中奖信息",name:"winInfo",render:function(item) {
var str = [];
str.push("参与人数:");
str.push(item.winInfo.totalAttend);
str.push("(");
str.push(item.winInfo.virtualNum);
str.push(")&nbsp;&nbsp;&nbsp;中奖人数:");
str.push(item.winInfo.totalWin);
str.push("(");
str.push(item.winInfo.virtualWinNum);
str.push(")&nbsp;&nbsp;&nbsp;<font color='red'>奖池剩余:");
str.push(item.winInfo.totalSurplus);
str.push("(");
str.push(item.winInfo.virtualSurplus);
str.push(")</font>");
return str.join("");
}},
{display:"操作",name:"",render:function(item){
var HtmArr=[];
HtmArr.push('<a href="/activity/drawline/update/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">编辑</a>');
if (item.status == 0) {
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="openshops btn btn-success btn-xs">开启</a>');
} else if (item.status == 1) {
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关闭</a>');
}
HtmArr.push('<a href="/activity/drawline/data/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">数据</a>');
return HtmArr.join('');
}}
]
})
g.init("/activity/drawline/indexPage");
var g=new common.grid({
el:'#basicTable',
parms:function(){
return {
"status":common.util.__input("status"),
"activityName":common.util.__input("activityName")
};
},
columns:[
{display:"活动ID",name:"activityId"},
{display:"活动名称",name:"activityName"},
{display:"状态",name:"status",render:function(item){
var str = ENUM.status[item.status];
var now = parseInt(new Date().getTime() / 1000);
if (item.endTime < now) {
str += "&nbsp;&nbsp;已过期";
}
return str;
}},
{display:"活动时间",name:"createTime",render:function(item) {
return item.beginTimeStr + "&nbsp;-&nbsp;" + item.endTimeStr;
}},
{display:"中奖信息",name:"winInfo",render:function(item) {
var str = [];
str.push("参与人数:");
str.push(item.winInfo.totalAttend);
str.push("(");
str.push(item.winInfo.virtualNum);
str.push(")&nbsp;&nbsp;&nbsp;中奖人数:");
str.push(item.winInfo.totalWin);
str.push("(");
str.push(item.winInfo.virtualWinNum);
str.push(")&nbsp;&nbsp;&nbsp;<font color='red'>奖池剩余:");
str.push(item.winInfo.totalSurplus);
str.push("(");
str.push(item.winInfo.virtualSurplus);
str.push(")</font>");
return str.join("");
}},
{display:"操作",name:"",render:function(item){
var HtmArr=[];
HtmArr.push('<a href="/activity/drawline/update/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">编辑</a>');
if (item.status == 0) {
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="openshops btn btn-success btn-xs">开启</a>');
} else if (item.status == 1) {
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关闭</a>');
}
HtmArr.push('<a href="/activity/drawline/data/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">数据</a>');
HtmArr.push('<a data-index="'+ item.__index +'" href="javascript:;" class="btn btn-info btn-xs export-btn">导出</a>');
HtmArr.push('<a data-index="'+ item.__index +'" href="javascript:;" class="btn btn-info btn-xs manualLottery">手动开奖</a>');
return HtmArr.join('');
}}
]
})
g.init("/DrawlineActivityRest/getDrawlineActivityList");
var Bll={
toast:function(content,url,id){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:url,
data:{activityId:id}
},function(){
g.reload();
});
var Bll={
toast:function(content,url,id){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:url,
data:{activityId:id}
},function(){
g.reload();
});
});
}
}
//关闭活动
$('#basicTable').on('click', '.closeshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要关闭此活动吗?","/DrawlineActivityRest/closeActivity",item.activityId);
});
//开启活动
$('#basicTable').on('click', '.openshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要开启此活动吗?","/DrawlineActivityRest/openActivity",item.activityId);
});
//shopsstatus
//导入
common.edit.ajaxfileupload("#importFile",{
params: {
type: "drawlineUserQueue",
__type: "batch-import"
},
onComplete:function(res){
if(res.code == 200) {
common.util.__tip(res.message, 'success');
g.reload();
} else {
common.util.__tip(res.message);
}
}
//关闭活动
$('#basicTable').on('click', '.closeshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要关闭此活动吗?","/activity/drawline/close",item.activityId);
});
//开启活动
$('#basicTable').on('click', '.openshops', function() {
var item=g.rows[$(this).data("index")];
Bll.toast("确定要开启此活动吗?","/activity/drawline/open",item.activityId);
});
//shopsstatus
\ No newline at end of file
});
$(document).on("click", "#uploadFile", function () {
$("#importFile").click();
});
//导出
$(document).on('click', '.export-btn', function() {
var item = g.rows[$(this).data("index")];
var queryConf = JSON.stringify({activityId:item.activityId});
window.open("/ajax/down?queryConf=" + queryConf + "&type=drawlineUserQueue");
});
//手动开奖
$(document).on("click", ".manualLottery", function() {
var item = g.rows[$(this).data("index")];
common.util.__ajax({
url:"/DrawlineActivityRest/luckyUserDraw",
data:{activityId:item.activityId}
},function(){
g.reload();
});
});
\ No newline at end of file
... ...
... ... @@ -89,12 +89,7 @@ new common.dropDown({
new common.dropDown({
el: "#brandId",
ajax: "brand",
hash: true,
params: function() {
return {
status: 1
};
}
hash: true
});
new common.dropDown({
el: "#isOutLets",
... ...
... ... @@ -6,7 +6,7 @@ require('../util/jquery.gritter');
var components=function(el,option){
this.registerEvent = {
this.registerEvent = {
validate: [],
render: []
};
... ... @@ -14,14 +14,14 @@ var components=function(el,option){
this.option = option || {};
}
components.prototype={
constructor:components,
on: function(name, callback) {
constructor:components,
on: function(name, callback) {
var __self = this;
var _e = __self.registerEvent[name];
if (_e&&{}.toString.call(_e)=="[object Array]") {
_e.push(callback);
}else{
__self.registerEvent[name]=callback;
__self.registerEvent[name]=callback;
}
return _e;
},
... ... @@ -65,7 +65,7 @@ components.prototype={
// required: true
// }
//}).validate(function(obj) {
err.push("<p>" + name + "不可为空</p>");
err.push("<p>" + name + "不可为空</p>");
//});
return false;
}
... ... @@ -96,58 +96,58 @@ components.prototype={
return true;
},
__fileRender:function(){
var that=this;
if ($('input[type="file"]', that.el).length > 0) {
var that=this;
if ($('input[type="file"]', that.el).length > 0) {
$('input[type="file"]', that.el).each(function() {
var bucket= $(this).data("bucket")||that.option.bucket;
var bucket= $(this).data("bucket")||that.option.bucket;
if(!bucket){
alert("bucket 不存在");
}
if(!bucket){
alert("bucket 不存在");
}
if($(this).hasClass("excel-upload")) {
return true ;
}
$(this).wrap("<div class='fileinput-button'></div>");
var parent=$(this).parent(".fileinput-button");
if($(this).attr("value")){
parent.append('<a class="fileinput-button-icon" href="javascript:void(0);"><img src="'+$(this).attr("value")+'" width=100 height=100/></a>');
}else{
parent.append('<a class="fileinput-button-icon" href="javascript:void(0);">+</a>');
}
$('input[type="file"]', that.el).ajaxfileupload({
'action': '/ajax/upload',
'params': {
"bucket": bucket,
__type: "upload"
},
'onComplete': function(response) {
if (response.status && response.code == 200) {
that.__listen("file_onComplete", {
field: $(this).data("field"),
data: response.data,
datas:response.datas
});
var parent=$(this).parent(".fileinput-button");
if(response.data){
parent.find(".fileinput-button-icon").html("<img src='"+response.data+"' width='100%' height='100%'/>");
$(this).attr("value", response.data);
}
} else {
that.$tip(response.message);
}
}
});
});
$(this).wrap("<div class='fileinput-button'></div>");
var parent=$(this).parent(".fileinput-button");
if($(this).attr("value")){
parent.append('<a class="fileinput-button-icon" href="javascript:void(0);"><img src="'+$(this).attr("value")+'" width=100 height=100/></a>');
}else{
parent.append('<a class="fileinput-button-icon" href="javascript:void(0);">+</a>');
}
$('input[type="file"]', that.el).ajaxfileupload({
'action': '/ajax/upload',
'params': {
"bucket": bucket,
__type: "upload"
},
'onComplete': function(response) {
if (response.status && response.code == 200) {
that.__listen("file_onComplete", {
field: $(this).data("field"),
data: response.data,
datas:response.datas
});
var parent=$(this).parent(".fileinput-button");
if(response.data){
parent.find(".fileinput-button-icon").html("<img src='"+response.data+"' width='100%' height='100%'/>");
$(this).attr("value", response.data);
}
} else {
that.$tip(response.message);
}
}
});
});
}
},
... ... @@ -221,7 +221,7 @@ components.prototype={
var __self = this;
if (typeof __self.registerEvent[key]=="function") {
__self.registerEvent[key](o);
}else{
for (_e in __self.registerEvent[key]) {
var a = __self.registerEvent[key][_e](o);
... ...
... ... @@ -6,7 +6,6 @@ var $ = require('jquery'),
var pricePercent = 0.2; //yoho币审核比例线
var loadModal = null;
var importYohoCoinData = null;
var isNeedAudit = false;
var ENUM = {
gender: {
1: '男',
... ... @@ -90,7 +89,7 @@ function ajaxSave(productSkn, yohoCoin, auditorId, salesPrice){
url:'/good/yohoCoin/set',
data: {
"productSkn": productSkn,
"returnCoin": yohoCoin,
"returnCoinMoney": yohoCoin,
"salesPrice": salesPrice,
"auditorId": auditorId
}
... ... @@ -150,7 +149,7 @@ function ajaxUploadSubmit(importAuditorId){
location.href = '';
}, 1000);
}else{
common.util.__tip(rs.data.message);
common.util.__tip(rs.message || rs.data.message);
}
},true);
}
... ... @@ -166,7 +165,6 @@ function showImportMessage(message, statue){
//显示批量导入数据表
function showImportTable(data){
importYohoCoinData = data.successList;
isNeedAudit = data.isNeedAudit;
$("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data));
$("#yohoCoinImportResultSet").show();
... ... @@ -186,9 +184,11 @@ function clearImportResult(){
//批量导入确认—校验审核人
function isNeedImportAuditor(){
$.each(importYohoCoinData, function(index,value){
if(value.isNeedAudit || value.salesPrice * pricePercent <= value.needAuditCoin) return true;
});
for(var i=0; i < importYohoCoinData.length; i++){
if((importYohoCoinData[i].salesPrice * pricePercent) <= importYohoCoinData[i].needAuditCoin){
return true;
}
}
return false;
}
... ... @@ -241,7 +241,7 @@ function checkAuditor(auditor){
//保存单行数据刷新
function freshYohoCoinRowData(data, needAuditCoin){
var productSkn = data.productSkn;
var yohoCoin = data.returnCoin;
var yohoCoin = data.returnCoinMoney;
var status = data.coinStatus;
var founderName = data.founderName;
var updateTime = getTime(data.auditDt);
... ... @@ -303,7 +303,8 @@ $(document).on('click', '.btn-delete-yohoCoin', function() {
//批量导入结果列表确定
$(document).on('click', '.btn-submit-yohoCoin', function() {
var importAuditorIdInput = $("#importAuditor");
if(isNeedImportAuditor()){
var isNeedAuditor = isNeedImportAuditor();
if(isNeedAuditor){
if(!checkAuditor(importAuditorIdInput)){
return false;
}
... ...
... ... @@ -60,7 +60,7 @@ var COLUMNS = {
{display: '吊牌价', name: 'retailPrice'},
{display: '销售价', name: 'salesPrice'},
{display: '执行返币金额', name: 'returnCoin', render: function(item) {
return item.productPrice.returnCoin;
return item.productPrice.returnCoinMoney;
}},
{display: '审核返币金额', name: 'needAuditCoin', render: function(item) {
return item.productPrice.needAuditCoin;
... ... @@ -102,7 +102,7 @@ var COLUMNS = {
{display: '吊牌价', name: 'retailPrice'},
{display: '销售价', name: 'salesPrice'},
{display: '执行返币金额', name: 'returnCoin', render: function(item) {
return item.productPrice.returnCoin;
return item.productPrice.returnCoinMoney;
}},
{display: '审核返币金额', name: 'needAuditCoin', render: function(item) {
return item.productPrice.needAuditCoin;
... ...
var $ = require('jquery');
var edit = require('../common/edit');
var e = new edit("#basicForm");
var type = $("#basicForm").attr("role");
if (type == 'edit') {
$('#name, #limitTimes, #userUseLimit, #department1, #department2, #limitDateFrom, #limitDateTo, #describe, #UID').prop('disabled', true);
$('input[name="userTypeLimit"]').prop('disabled', true);
}
e.on("render", function() {
if ($("#reqDepartment").val()) {
var departmentArr = String.prototype.split.call($("#reqDepartment").val(), '/'),
$department1 = $("#department1"),
$department2 = $("#department2");
$department1.val(departmentArr[0]);
if (departmentArr[1]) {
$department2.val(departmentArr[1]).show();
} else {
$department2.hide();
var common = require('../common/common');
var editBean = require('./partials/limitcode-edit-bean');
var e = new common.edit2("#basicForm");
var type = $("#basicForm").attr("role"),
action = $("#basicForm").data("action");
var Bll = {
__render:function() {
$("#basicForm").html(common.util.__template2($("#limitcodeEdit-template").html(), editBean));
e.init();
if(type == "edit") {
$('input[name="skn_sku"]').prop('disabled', true);
$(".noEdit").prop("disabled", true);
$('input[name="userTypeLimit"]').prop('disabled', true);
if(editBean.limitDateFrom <= new Date()) {
$("#limitDateFrom").prop("disabled", true);
}
}
}
});
e.on("bind", function() {
if ($("#reqDepartment").val()) {
var departmentArr = String.prototype.split.call($("#reqDepartment").val(), '/'),
$department1 = $("#department1"),
$department2 = $("#department2");
$("select").change(function() {
if ($(this).is($department1)) {
departmentArr.length = 0;
departmentArr[0] = $(this).val();
if ($(this).val() === "零售部") {
$department2.show();
departmentArr[1] = $department2.val();
} else {
$department2.hide();
},
__checkSkn:function(callback) {
var flag = false;
if(editBean.limitSkn) {
common.util.__ajax2({
async: false,
url: "/limitCode/checkSknValidity",
data: {
skn: editBean.limitSkn,
id: editBean.id
}
} else {
departmentArr[1] = $(this).val();
}
$("#reqDepartment").val(departmentArr.join('/'));
});
}, function (res) {
if (!res.data.isExist) {
flag = true;
common.util.__tip("SKN不存在");
} else if (res.data.isConflict) {
flag = true;
common.util.__tip("SKN与其他限购冲突");
} else if (res.data.isOnSales) {
flag = true;
common.util.__tip("SKN已上架,请先下架");
}
callback && callback(res);
}, function() {
flag = true;
common.util.__tip("网络请求异常");
});
}
return flag;
}
});
};
if(type != "add") {
var id = location.href.substring(location.href.lastIndexOf("/") + 1);
common.util.__ajax({
url: "/limitCode/getLimitCode",
data: {id: id}
}, function (res) {
editBean = res.data;
editBean.reqDepartment = editBean.reqDepartment.split("/");
if(!editBean.reqDepartment.length) {
editBean.reqDepartment = [
"零售部",
"营销策划"
];
}
editBean.selected = editBean.skus ? "SKU" : "SKN";
editBean.updateType = type == "edit" ? "1":"2";
editBean.skusInfo = [];
if(editBean.skus) {
var skuArr = editBean.skus.split(";");
var skuNumArr = editBean.skuTimes.split(";");
for(var i = 0; i < skuArr.length; i++) {
editBean.skusInfo.push({
"sku": skuArr[i],
"skuTimes": skuNumArr[i]
});
}
}
Bll.__render();
},true);
} else {
Bll.__render();
}
e.on("validate", function() {
var num = $.trim($("#limitTimes").val());
if (+num > 100000 || +num < 1) {
return "数量(范围:1-100000)";
}
return true;
});
e.on("validate", function() {
var skn = $.trim($("#limitSkn").val());
if (skn.length > 8) {
return "skn长度不能超过8位";
}
return true;
$(document).on("change", ".observe", function () {
var $this = $(this);
var name = $this.data("field");
editBean = common.util.__buildobj(name, '.', editBean, function (obj, name) {
obj[name] = $this.val();
});
//console.log(editBean);
});
e.on("validate", function() {
var startTime = $('#limitDateFrom').val(),
endTime = $('#limitDateTo').val();
if (startTime > endTime) {
return '结束时间不能小于开始时间';
}
//输入限制
$(document).on("keyup", ".number", function() {
$(this).val($(this).val().replace(/\D/g, ''));
});
e.init();
var submit = function(callback) {
//单选框点击事件
$(document).on("click", ".limitProduct", function() {
editBean.limitCodeType = $(this).val();
$("#limitSkn").attr("required", !(editBean.limitCodeType == "N"));
Bll.__render();
//console.log(editBean);
});
e.submit($("#basicForm").attr("action"), function(option) {
$("#save_brand").addClass('disabled');
option.success = function(res) {
res = res.data;
if (res.code == "200") {
e.$tip('提交成功', function() {
location.href = "/market/limitcode/index";
}, 'growl-success');
} else {
e.$tip(res.message);
$("#save_brand").removeClass('disabled');
};
$(document).on("click", ".delSku", function () {
var index = $(this).data("index");
editBean.skusInfo.splice(index, 1);
Bll.__render();
$(".addSku").attr("disabled", false);
});
$(document).on("click", ".addSku", function () {
editBean.skusInfo.push({
"sku": "",
"skuTimes": ""
});
Bll.__render();
});
return false;
};
option.error = function(res) {
$("#save_brand").removeClass('disabled');
e.$tip("提交失败");
$(document).on("blur", "#limitSkn", function() {
Bll.__checkSkn(function(res) {
if (res.data.skuList) {
editBean.skusInfo = [];
for (var i = 0; i < res.data.skuList.length; i++) {
editBean.skusInfo.push({
"sku": res.data.skuList[i],
"skuTimes": ""
});
}
Bll.__render();
$(".addSku").attr("disabled", false);
}
console.log(option.data);
callback && callback(option.data);
});
}
$("#save_brand").click(function() {
});
submit(function(data) {
// 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
if (+data.status == 1) {
//不改
} else {
data.status = 0;
$(document).on("click","#save_brand", function() {
// 限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
if(e.validate() && (type == "add" ? (!editBean.limitSkn || !Bll.__checkSkn()) : true)) {
editBean.reqDepartment = editBean.reqDepartment.join("/");
editBean.creatorId = $("#auth_id").val();
editBean.creatorName = $("#auth_name").val();
if (editBean.status != 1) {
editBean.status = 0;
}
});
if(editBean.limitCodeType == "U") {
editBean.skus = "";
editBean.skuTimes = "";
for(var item in editBean.skusInfo) {
if(item != 0) {
editBean.skus+=";";
editBean.skuTimes+=";";
}
editBean.skus += editBean.skusInfo[item].sku;
editBean.skuTimes+=editBean.skusInfo[item].skuTimes;
}
}
//console.log(JSON.stringify(editBean));
common.util.__ajax({
url: action,
data: editBean
}, function (res) {
location.href = "/market/limitcode/index";
});
}
return false;
});
\ No newline at end of file
... ...
... ... @@ -16,7 +16,7 @@ var t = new common.tab({
},
columns:[
{name:"0",display:"待审核({0})"},
{name:"1",display:"审核通过({1})"},
{name:"1",display:"审核通过({1})",active:true},
{name:"2",display:"驳回({2})"},
{name:"3",display:"过期({3})"},
{name:"4",display:"作废({4})"},
... ... @@ -27,32 +27,54 @@ var t = new common.tab({
var g = new common.grid({
el: '#basicTable',
parms:function(){
return {
return {
batchNo:common.util.__input("filter-id"),
name:common.util.__input("filter-name"),
reqDepartment:common.util.__input("filter-dep"),
status: t.active
status: t.active,
skn: common.util.__input("filter-skn"),
sku: common.util.__input("filter-sku")
};
},
columns:[
{display:"批次号",name:"batchNo", render: function(item) {
return '<a href="/market/limitcode/info/'+ item.id+'">' + item.batchNo + '</a>'
{display:"批次号",name:"batchNo", render: function(item) {
return '<a href="/market/limitcode/info/'+ item.id+'">' + item.batchNo + '</a>';
}},
{display:"基本信息",render:function(item){
var arr=[];
arr.push("<p>名称:"+item.name+"</p>");
{display:"基本信息",render:function(item){
var arr=[];
arr.push("<p>名称:"+item.name+"</p>");
arr.push("<p>数量:"+item.limitTimes+"</p>");
arr.push("<p>次数:"+item.userUseLimit+"</p>");
arr.push("<p>部门:"+item.reqDepartment+"</p>");
return arr.join('');
}},
{display:"使用日期",render:function(item){
return item.limitDateFrom+"</br> 至 "+item.limitDateTo;
}},
{display:"限购码使用说明",name:"describe", render: function(item) {
arr.push("<p>次数:"+item.userUseLimit+"</p>");
arr.push("<p>部门:"+item.reqDepartment+"</p>");
return arr.join('');
}},
{display:"使用日期",render:function(item){
return item.limitDateFrom+"</br> 至 "+item.limitDateTo;
}},
{display:"限购码使用说明",name:"describe", render: function(item) {
return '<p style="max-width: 200px;word-wrap: break-word;">' + item.describe + '</p>';
}},
{display:"申请人",name:"creatorName", render: function(item) {
{display:"SKN/SKU", render: function(item) {
var arr = [];
var skn = item.limitSkn?item.limitSkn:"";
arr.push('<p style="max-width: 200px;word-wrap: break-word;">SKN:' + skn + '</p>');
if(item.limitCodeType == "U" && item.skus) {
var skuArr = item.skus.split(";");
arr.push('<p style="max-width: 200px;word-wrap: break-word;">SKU:');
for(var i = 0; i < skuArr.length; i++) {
if(i>0) {
arr.push(";");
}
if(i != 0 && i%2 == 0) {
arr.push("<br>");
}
arr.push(skuArr[i]);
}
arr.push('</p>');
}
return arr.join("");
}},
{display:"申请人",name:"creatorName", render: function(item) {
return item.creatorName + '<br>' + item.createTime;
}},
{display: '状态', render: function(item) {
... ... @@ -64,11 +86,11 @@ var g = new common.grid({
}
return html;
}},
{display:"操作",render:function(item){
var HtmArr=[];
{display:"操作",render:function(item){
var HtmArr=[];
//限购码状态0:待审核 1:审核通过 2:驳回 3:过期 4:作废
HtmArr.push('<a href="/market/limitcode/info/'+ item.id+'" class="btn btn-info btn-xs">查看详情</a>');
if(item.status == 0){
HtmArr.push('<a href="/market/limitcode/info/'+ item.id+'" class="btn btn-info btn-xs">查看详情</a>');
if(item.status == 0){
HtmArr.push('<a class="btn btn-primary btn-xs apply-success" data-index="'+ item.__index+'" href="javascript:;">通过</a>');
HtmArr.push('<a class="btn btn-warning btn-xs apply-back" data-index="'+ item.__index+'" href="javascript:;">驳回</a>');
HtmArr.push('<a class="btn btn-danger btn-xs apply-cancel" data-index="'+ item.__index+'" href="javascript:;">作废</a>');
... ... @@ -79,7 +101,7 @@ var g = new common.grid({
HtmArr.push('<a class="btn btn-info btn-xs apply-modify" href="/market/limitcode/update/'+ item.id+'">修改</a>');
}
return HtmArr.join('');
}}
}}
]
});
g.init($("#gridurl").val());
... ... @@ -89,7 +111,7 @@ var loadtab=function(){
t.active=undefined;
setTimeout(function(){
common.util.__ajax({
url:'/market/limitcode/getCodeCount',
url:'/limitCode/getLimitCodeCountByStatus',
data:g.options.parms()
},function(res){
... ... @@ -101,7 +123,7 @@ var loadtab=function(){
loadtab();
$("#filter-btn").click(function(){
loadtab();
//loadtab();
g.reload(1);
});
... ... @@ -109,7 +131,7 @@ var Bll={
toast:function(content,fn){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:'/market/limitcode/auditLimitCode',
url:'/limitCode/auditLimitCode',
data:fn()
},function(){
loadtab();
... ... @@ -121,7 +143,7 @@ var Bll={
//审核通过
$('#basicTable').on('click', '.apply-success', function() {
var item=g.rows[$(this).data("index")];
var data=function(){
var data=function(){
return{
id:item.id,
status:1
... ...
... ... @@ -6,10 +6,9 @@ var Validate = require('./partials/Validate1');
var addObj = require('./partials/addObj');
/*获取数据*/
//var resources = [];
//var times = [];
//var currIndex = 0;
var ViewModel = {};
var resources = [];
var times = [];
var currIndex = 0;
//资源id
var param = location.href.substring(location.href.lastIndexOf("/") + 1);
common.util.__ajax({
... ... @@ -17,9 +16,8 @@ common.util.__ajax({
data: {id: param},
async: false
}, function (res) {
//resources = res.data;
ViewModel = res.data;
//console.log(resources);
resources = res.data;
console.log(resources);
}, true);
/*配置模块*/
... ... @@ -43,7 +41,6 @@ var Bll = {
//console.log("打开的数据module",module);
var d = new common.dialog({
title: (!!~index ? "修改" : "添加") + btn[0].button_name,
//content: common.util.__template2($("#" + module.contentData.dialog).html(), module),
content: common.util.__template2($("#" + btn[0].dialog).html(), module),
width: '50%',
button: [{
... ... @@ -60,10 +57,8 @@ var Bll = {
if (resourceObj[module.contentData.template_name]) {
resourceObj[module.contentData.template_name](module.contentData.data);
}
//!!~index ? Bll.contentDatas[currIndex][index] = module : Bll.contentDatas[currIndex].push(module);
//Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
!!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module);
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
!!~index ? Bll.contentDatas[currIndex][index] = module : Bll.contentDatas[currIndex].push(module);
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
d.close();
}
return false;
... ... @@ -180,71 +175,50 @@ var Bll = {
}
};
////初始化时间
//var statusArr = ["已过期", "进行中", "未发布"];
//for(var i = 0; i < resources.length; i++) {
// //status 0:已过期;1:进行中;2:未发布
// var time = resources[i].resource.publishTime==0?"":Bll.getLocalTime(resources[i].resource.publishTime);
// times[i] = {
// time:time,
// status:statusArr[resources[i].status]
// }
//}
//初始化时间
var statusArr = ["已过期", "进行中", "未发布"];
for(var i = 0; i < resources.length; i++) {
//status 0:已过期;1:进行中;2:未发布
var t = new Date(resources[i].resource.publishTime*1000);
var time = resources[i].resource.publishTime==0?"":common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss");
times[i] = {
time:time,
status:statusArr[resources[i].status]
}
}
/*第一步,基础模板*/
//Bll.__render("#content-list", "content-template", resources[currIndex]);
Bll.__render("#content-list", "content-template", ViewModel);
Bll.__render("#content-list", "content-template", resources[currIndex]);
Bll.__render(".contents", "template_content_btns", {btns: Button});
//Bll.__render("#times-list", "times-template", {times:times, selected:0});
Bll.__render("#times-list", "times-template", {times:times, selected:0});
/*第二部,把楼层数据转化成数组*/
//for(var i = 0; i < resources.length; i++) {
// Bll.contentDatas[i] = [];
// resources[i].contentData.forEach(function (item, index) {
// item.contentData = JSON.parse(item.contentData);
// var temp;
// if (item.contentData.template_name == "kidsBrands") {
// temp = item.contentData.data.params.more_url;
// item.contentData.data.params.more_url = {};
// item.contentData.data.params.more_url.action = JSON.parse(temp).action || "";
// item.contentData.data.params.more_url.url = JSON.parse(temp).url || "";
// }
// if (item.contentData.template_name == 'title') {
// temp = item.contentData.data.more_link;
// item.contentData.data.more_link = {};
// item.contentData.data.more_link.action = JSON.parse(temp).action || "";
// item.contentData.data.more_link.url = JSON.parse(temp).url || "";
// }
// item.contentData = JSON.stringify(item.contentData);
// item.contentData = item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g, '$1');
// item.contentData = common.util.__ObjToArray(JSON.parse(item.contentData));
// Bll.contentDatas[i].push(item);
// });
//}
ViewModel.contentData.forEach(function (item, index) {
item.contentData = JSON.parse(item.contentData);
var temp;
if (item.contentData.template_name == "kidsBrands") {
temp = item.contentData.data.params.more_url;
item.contentData.data.params.more_url = {};
item.contentData.data.params.more_url.action = JSON.parse(temp).action || "";
item.contentData.data.params.more_url.url = JSON.parse(temp).url || "";
}
if (item.contentData.template_name == 'title') {
temp = item.contentData.data.more_link;
item.contentData.data.more_link = {};
item.contentData.data.more_link.action = JSON.parse(temp).action || "";
item.contentData.data.more_link.url = JSON.parse(temp).url || "";
}
item.contentData = JSON.stringify(item.contentData);
item.contentData = item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g, '$1');
item.contentData = common.util.__ObjToArray(JSON.parse(item.contentData));
Bll.contentDatas.push(item);
});
for(var i = 0; i < resources.length; i++) {
Bll.contentDatas[i] = [];
resources[i].contentData.forEach(function (item, index) {
item.contentData = JSON.parse(item.contentData);
var temp;
if (item.contentData.template_name == "kidsBrands") {
temp = item.contentData.data.params.more_url;
item.contentData.data.params.more_url = {};
item.contentData.data.params.more_url.action = JSON.parse(temp).action || "";
item.contentData.data.params.more_url.url = JSON.parse(temp).url || "";
}
if (item.contentData.template_name == 'title') {
temp = item.contentData.data.more_link;
item.contentData.data.more_link = {};
item.contentData.data.more_link.action = JSON.parse(temp).action || "";
item.contentData.data.more_link.url = JSON.parse(temp).url || "";
}
item.contentData = JSON.stringify(item.contentData);
item.contentData = item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g, '$1');
item.contentData = common.util.__ObjToArray(JSON.parse(item.contentData));
Bll.contentDatas[i].push(item);
});
}
/*第三部解析楼层*/
//Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
/*第四部 操作按钮 添加 删除 修改*/
$(document).on("click", ".add_btn", function () {
... ... @@ -271,46 +245,29 @@ $(document).on("change", ".observe", function () {
});
/*删除*/
//$(document).on("click", ".del", function () {//删除
// var index = $(this).data("index");
// common.dialog.confirm("警告",
// common.util.__template2("是否确认删除?", {}),
// function () {
// if (Bll.contentDatas[currIndex][index].id) {
// common.util.__ajax({
// url: "/resources/delResContent",
// data: {id: Bll.contentDatas[currIndex][index].id}
// });
// }
// Bll.contentDatas[currIndex].splice(index, 1);
// Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
// });
//});
$(document).on("click", ".del", function () {//删除
var index = $(this).data("index");
console.log(Bll.contentDatas[currIndex][index]);
common.dialog.confirm("警告",
common.util.__template2("是否确认删除?", {}),
function () {
if (Bll.contentDatas[index].id) {
if (Bll.contentDatas[currIndex][index].id) {
common.util.__ajax({
url: "/resources/delResContent",
data: {id: Bll.contentDatas[index].id}
data: {id: Bll.contentDatas[currIndex][index].id}
});
}
Bll.contentDatas.splice(index, 1);
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
Bll.contentDatas[currIndex].splice(index, 1);
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
});
//$("#index_" + index).remove();
});
/*编辑*/
$(document).on("click", ".edit", function () {
var index = $(this).data("index");
//var item = Bll.contentDatas[currIndex][index];
var item = Bll.contentDatas[index];
var item = Bll.contentDatas[currIndex][index];
Bll.module = $.extend(true, {}, item);
console.log(Bll.module);
Bll.toast(index, Bll.module);
});
... ... @@ -423,77 +380,71 @@ $(document).on("click", '.is_show_name_brand', function () {
Bll.renderDialog("brands-template");
});
//**********************************************************************************/
////复制
//$(document).on("click", "#copyTab", function() {
// common.util.__ajax({
// url: "/resources/copyResContent",
// data: {rId:resources[currIndex].resource.id}
// }, function (res) {
// //setTimeout(function() {
// window.location.href = window.location.href;
// //}, 2000);
// });
//});
////保存时间
//$(document).on("click", "#saveTime", function() {
// if(times[currIndex].status == "进行中") {
// common.util.__tip("进行中的页面不能更改时间");
// return false;
// }
// if(!times[currIndex].time) {
// common.util.__tip("该页面不能更改时间");
// return;
// }
// common.util.__ajax({
// url: "/resources/updateResPublishTime",
// data: {
// id:resources[currIndex].resource.id,
// time:times[currIndex].time
// }
// }, function (res) {
// //setTimeout(function() {
// window.location.href = window.location.href;
// //}, 2000);
// });
//});
//new common.edit2("#times-list").init();
////切换预发布tab
//$(document).on("click", ".timesLi", function() {
// if(!$(this).hasClass("active")) {
// $(this).addClass("active").siblings().removeClass("active");
// currIndex = $(this).data("index");
// Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
// Bll.__render("#times-list", "times-template", {times: times, selected: currIndex});
// new common.edit2("#times-list").init();
// }
//});
//$(document).on("change", ".preTimes", function() {
// times[$(this).data("index")].time = $(this).val();
//});
////删除tab
//$(document).on("click", "#delTab", function() {
// if(times[currIndex].status == "进行中") {
// common.util.__tip("进行中的页面不能删除");
// return false;
// }
// if(!times[currIndex].time) {
// common.util.__tip("该页面不能删除");
// return false;
// }
// common.dialog.confirm("警告", "确定取消" + times[currIndex].time + "发布的页面吗?",function() {
// common.util.__ajax({
// url: "/resources/deleteResourceById",
// data: {
// id: resources[currIndex].resource.id
// }
// }, function (res) {
// //setTimeout(function() {
// window.location.href = window.location.href;
// //}, 2000);
//
// });
// });
//});
//复制
$(document).on("click", "#copyTab", function() {
common.util.__ajax({
url: "/resources/copyResContent",
data: {rId:resources[currIndex].resource.id}
}, function (res) {
window.location.href = window.location.href;
});
});
//保存时间
$(document).on("click", "#saveTime", function() {
if(times[currIndex].status == "进行中") {
common.util.__tip("进行中的页面不能更改时间");
return false;
}
if(!times[currIndex].time) {
common.util.__tip("该页面不能更改时间");
return;
}
common.util.__ajax({
url: "/resources/updateResPublishTime",
data: {
id:resources[currIndex].resource.id,
time:times[currIndex].time
}
}, function (res) {
window.location.href = window.location.href;
});
});
new common.edit2("#times-list").init();
//切换预发布tab
$(document).on("click", ".timesLi", function() {
if(!$(this).hasClass("active")) {
$(this).addClass("active").siblings().removeClass("active");
currIndex = $(this).data("index");
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
Bll.__render("#times-list", "times-template", {times: times, selected: currIndex});
new common.edit2("#times-list").init();
}
});
$(document).on("change", ".preTimes", function() {
times[$(this).data("index")].time = $(this).val();
});
//删除tab
$(document).on("click", "#delTab", function() {
if(times[currIndex].status == "进行中") {
common.util.__tip("进行中的页面不能删除");
return false;
}
if(!times[currIndex].time) {
common.util.__tip("该页面不能删除");
return false;
}
common.dialog.confirm("警告", "确定取消" + times[currIndex].time + "发布的页面吗?",function() {
common.util.__ajax({
url: "/resources/deleteResourceById",
data: {
id: resources[currIndex].resource.id
}
}, function (res) {
window.location.href = window.location.href;
});
});
});
/*保存事件*/
$(document).on("click", "#sub_btn", function () {
... ... @@ -502,10 +453,8 @@ $(document).on("click", "#sub_btn", function () {
"data_id": {},
"rId": ""
};
//for (var i = 0; i < Bll.contentDatas[currIndex].length; i++) {
// var contentData = Bll.contentDatas[currIndex][i].contentData;
for (var i = 0; i < Bll.contentDatas.length; i++) {
var contentData = Bll.contentDatas[i].contentData;
for (var i = 0; i < Bll.contentDatas[currIndex].length; i++) {
var contentData = Bll.contentDatas[currIndex][i].contentData;
var action;
var url;
var goodsSrc = "imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90";
... ... @@ -548,16 +497,12 @@ $(document).on("click", "#sub_btn", function () {
}
}
data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData));
//data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[currIndex][i].contentData));
//if (Bll.contentDatas[currIndex][i].id) {
// data.data_id[i] = "id_" + Bll.contentDatas[currIndex][i].id;
data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[i].contentData));
if (Bll.contentDatas[i].id) {
data.data_id[i] = "id_" + Bll.contentDatas[i].id;
data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[currIndex][i].contentData));
if (Bll.contentDatas[currIndex][i].id) {
data.data_id[i] = "id_" + Bll.contentDatas[currIndex][i].id;
}
}
//data.rId = resources[currIndex].resource.id;
data.rId = param;
data.rId = resources[currIndex].resource.id;
data.content = JSON.stringify(data.content);
data.data_id = JSON.stringify(data.data_id);
common.util.__ajax({
... ... @@ -741,20 +686,14 @@ $(document).on("click", ".removepic", function () {
datas: isg ? Bll.module.contentData.data[i].list : Bll.module.contentData.data
}));
});
//$(document).on("mouseover", "#add-content .dragItem", function () {
// var drag = new common.drag("#add-content", Bll.contentDatas[currIndex], function (data) {
// Bll.contentDatas[currIndex] = data;
// Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
// })
// drag.Initialize();
//});
$(document).on("mouseover", "#add-content .dragItem", function () {
var drag = new common.drag("#add-content", Bll.contentDatas, function (data) {
Bll.contentDatas = data;
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas});
var drag = new common.drag("#add-content", Bll.contentDatas[currIndex], function (data) {
Bll.contentDatas[currIndex] = data;
Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas[currIndex]});
})
drag.Initialize();
});
$(document).on("mouseleave", "#add-content .dragItem", function () {
new common.drag("#add-content").destroy();
});
... ...
... ... @@ -125,28 +125,15 @@ $(document).on("click", ".add2", function() {
item.resPlatforms = resPlatforms;
Bll.toast("/resources/saveResource", item, "编辑资源");
});
/**
* 预发布版本
*/
/*$(document).on("click", ".delbtn", function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("警告", "是否确认删除?",function() {
common.util.__ajax({
url: "/resources/deleteAllResourceByCode",
data: {code: item.code}
}, function () {
g.reload();
});
});
});*/
$(document).on("click", ".delbtn", function () {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("警告", "是否确认删除?", function () {
common.util.__ajax({
url: "/resources/deleteResourceById",
data: {id: item.id}
}, function () {
$(document).on("click", ".delbtn", function() {
var item = g.rows[$(this).data("index")];
common.dialog.confirm("警告", "是否确认删除?",function() {
common.util.__ajax({
url: "/resources/deleteAllResourceByCode",
data: {code: item.code}
}, function () {
g.reload();
});
});
});
\ No newline at end of file
});
});
});
\ No newline at end of file
... ...
... ... @@ -360,7 +360,7 @@ input[type=file] {
height: 60px;
width: 100px;
position: absolute;
z-index: 99;
z-index: 30;
}
.form-horizontal .form-group{
margin-left: 0px;
... ...
... ... @@ -5,6 +5,9 @@
//接口主域
exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.246:8081/platform/";
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
//路由配置
exports.res = [
{
... ... @@ -23,7 +26,7 @@ exports.res = [
}
}, {
//获取列表数据
route: '/activity/drawline/indexPage',
route: '/DrawlineActivityRest/getDrawlineActivityList',
method: 'POST',
url:"/DrawlineActivityRest/getDrawlineActivityList",
params:[
... ... @@ -33,30 +36,30 @@ exports.res = [
{name: 'page', type: 'Number'}
]
}, {
// 关闭活动
route: '/activity/drawline/close',
// 关闭活动
route: '/DrawlineActivityRest/closeActivity',
method: 'POST',
url : "/DrawlineActivityRest/closeActivity",
params:[
{name:"activityId",type:"Number"}
]
}, {
// 开启活动
route: '/activity/drawline/open',
// 开启活动
route: '/DrawlineActivityRest/openActivity',
method: 'POST',
url : "/DrawlineActivityRest/openActivity",
params:[
{name:"activityId",type:"Number"}
]
}, {
// 新增抽签活动页面渲染
// 新增抽签活动页面渲染
route: '/activity/drawline/add',
method: 'GET',
view: 'pages/activity/edit',
src:'/activity/edit',
data:{
pageTitel:"添加抽奖活动",
action:'/activity/drawline/addsave',
action:'/DrawlineActivityRest/addDrawlineActivity',
data:{
activityId:0,
backgroundStyle:"",
... ... @@ -64,8 +67,8 @@ exports.res = [
}
}
}, {
// 保存新增抽签活动
route: '/activity/drawline/addsave',
// 保存新增抽签活动
route: '/DrawlineActivityRest/addDrawlineActivity',
method: 'POST',
url: '/DrawlineActivityRest/addDrawlineActivity',
params:[
... ... @@ -75,10 +78,11 @@ exports.res = [
{name: 'topBanner',type: 'string'},
{name: 'backgroundStyle',type: 'string'},
{name: 'activityDesc',type: 'string'},
{name: 'prizeList',type: 'string'}
{name: 'prizeList',type: 'string'},
{name: 'numberLimit',type: 'number'},
]
}, {
// 修改活动页面渲染
// 修改活动页面渲染
route: '/activity/drawline/update/:activityId',
method: 'GET',
view: 'pages/activity/edit',
... ... @@ -89,16 +93,16 @@ exports.res = [
}],
data:{
pageTitel : "修改抽奖活动",
action : '/activity/drawline/updatesave'
action : '/DrawlineActivityRest/updateDrawlineActivity'
},
src:'/activity/edit'
}, {
// 保存修改抽签活动
route: '/activity/drawline/updatesave',
// 保存修改抽签活动
route: '/DrawlineActivityRest/updateDrawlineActivity',
method: 'POST',
url: '/DrawlineActivityRest/updateDrawlineActivity',
params:[
{name: 'activityId',type: 'Number'},
{name: 'activityId',type: 'Number'},
{name: 'activityName',type: 'string'},
{name: 'beginTimeStr',type: 'string'},
{name: 'endTimeStr',type: 'string'},
... ... @@ -106,10 +110,11 @@ exports.res = [
{name: 'backgroundStyle',type: 'string'},
{name: 'activityDesc',type: 'string'},
{name: 'prizeList',type: 'string'},
{name: 'status',type: 'Number'}
{name: 'status',type: 'Number'},
{name: 'numberLimit',type: 'number'}
]
}, {
// 数据查询页面渲染
// 数据查询页面渲染
route: '/activity/drawline/data/:activityId',
method: 'GET',
view: 'pages/activity/data',
... ... @@ -119,5 +124,21 @@ exports.res = [
type:'Number'
}],
src:'/activity/data'
},
{
route:"/DrawlineActivityRest/getDrawlineActivityDetail",
method:"POST",
url:"/DrawlineActivityRest/getDrawlineActivityDetail",
params:[
{name: 'activityId', type:"number"}
]
},
{
route:"/DrawlineActivityRest/luckyUserDraw",
method:"POST",
url:"/DrawlineActivityRest/luckyUserDraw",
params:[
{name: 'activityId', type: "number"}
]
}
];
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.240:8088/platform';
//exports.domain = 'http://172.16.6.162:8088/platform';
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
//营销管理路由配置
exports.res = [
{
//营销码管理 -> 页面渲染
route: '/market/coupon/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/coupon',
noApi: true,
data: {
pageTitle: '优惠码列表',
filter: true,
createUrl: '/market/coupon/add',
gridurl: '/market/coupon/getPromotion'
{
//营销码管理 -> 页面渲染
route: '/market/coupon/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/coupon',
noApi: true,
data: {
pageTitle: '优惠码列表',
filter: true,
createUrl: '/market/coupon/add',
gridurl: '/market/coupon/getPromotion'
// tabUrl: '/getCodeCount',
// sendUrl: '/sendPromotion',
// auditUrl: '/auditPromotion'
}
},
{
//营销码管理 -> 列表数据
route: '/market/coupon/getPromotion',
method: 'POST',
url: '/promotioncode/getPromotionCodeList',
isJsonRaw: true,
params: [{
name: 'status',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'batchNo',
type: 'Number'
}, {
name: 'name',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}]
}, {
//营销码管理 -> 列表操作
route: '/market/coupon/auditPromotion',
method: 'POST',
url: '/promotioncode/auditPromotionCode',
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'status',
type: 'Number'
}, {
name: 'reason',
type: 'String'
}]
}, {
//营销码管理 -> 发放列表
route: '/market/coupon/sendPromotion',
method: 'POST',
url: '/promotioncode/getPromotionCodeSendList',
isJsonRaw: true,
params: [{
name: 'auditTime',
type: 'String'
}]
}, {
//营销码管理 -> tab卡数据
route: '/market/coupon/getCodeCount',
method: 'POST',
url: '/promotioncode/getPromotionCodeCountByStatus',
isJsonRaw: true,
params: [{
name: 'reqDepartment',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'batchNo',
type: 'Number'
}]
}, {
//营销码管理 -> 添加优惠码页面渲染
route: '/market/coupon/add',
method: 'GET',
view: 'pages/market/coupon-edit',
src: '/market/coupon-edit',
data: {
action: "/market/coupon/addCode",
type: "add",
}
},
{
//营销码管理 -> 列表数据
route: '/market/coupon/getPromotion',
method: 'POST',
url: '/promotioncode/getPromotionCodeList',
isJsonRaw: true,
params: [{
name: 'status',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'batchNo',
type: 'Number'
}, {
name: 'name',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}]
}, {
//营销码管理 -> 列表操作
route: '/market/coupon/auditPromotion',
method: 'POST',
url: '/promotioncode/auditPromotionCode',
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'status',
type: 'Number'
}, {
name: 'reason',
type: 'String'
}]
}, {
//营销码管理 -> 发放列表
route: '/market/coupon/sendPromotion',
method: 'POST',
url: '/promotioncode/getPromotionCodeSendList',
isJsonRaw: true,
params: [{
name: 'auditTime',
type: 'String'
}]
}, {
//营销码管理 -> tab卡数据
route: '/market/coupon/getCodeCount',
method: 'POST',
url: '/promotioncode/getPromotionCodeCountByStatus',
isJsonRaw: true,
params: [{
name: 'reqDepartment',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'batchNo',
type: 'Number'
}]
}, {
//营销码管理 -> 添加优惠码页面渲染
route: '/market/coupon/add',
method: 'GET',
view: 'pages/market/coupon-edit',
src: '/market/coupon-edit',
data: {
limitTimes: "0",
reqDepartment: "零售部/营销策划",
userSourceLimit: "1",
userTypeLimit: "1",
userUseLimit: "1",
staff: "admin",
status: "0"
action: "/market/coupon/addCode",
type: "add",
data: {
limitTimes: "0",
reqDepartment: "零售部/营销策划",
userSourceLimit: "1",
userTypeLimit: "1",
userUseLimit: "1",
staff: "admin",
status: "0"
}
}
}
}, {
//营销码管理 -> 添加优惠码
route: '/market/coupon/addCode',
method: 'POST',
url: '/promotioncode/addPromotionCode',
isJsonRaw: true,
params: [{
name: 'name',
type: 'String'
}, {
name: 'limitTimes',
type: 'String'
}, {
name: 'code',
type: 'String'
}, {
name: 'describe',
type: 'String'
}, {
name: 'promotionInfo',
type: 'String'
}, {
name: 'userSourceLimit',
type: 'String'
}, {
name: 'userTypeLimit',
type: 'String'
}, {
name: 'creatorId',
type: 'String'
}, {
name: 'limitDateFrom',
type: 'String'
}, {
name: 'limitDateTo',
type: 'String'
}, {
name: 'createTime',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}, {
name: 'status',
type: 'String'
}, {
name: 'staff',
type: 'String'
}]
}, {
//营销码管理 -> 编辑优惠码页面渲染
route: '/market/coupon/update/:id',
method: 'GET',
view: 'pages/market/coupon-edit',
url: '/promotioncode/getPromotionCode',
isJsonRaw: true,
data: {
action: "/market/coupon/updateCode",
type: "update"
},
src: '/market/coupon-edit',
params: [{
name: "id",
type: "String"
}]
}, {
//营销码管理 -> 优惠码详情
route: '/market/coupon/info/:id',
method: 'GET',
view: 'pages/market/coupon-edit',
url: '/promotioncode/getPromotionCode',
isJsonRaw: true,
src: '/market/coupon-edit',
data: {
type: "info"
//营销码管理 -> 添加优惠码
route: '/market/coupon/addCode',
method: 'POST',
url: '/promotioncode/addPromotionCode',
isJsonRaw: true,
params: [{
name: 'name',
type: 'String'
}, {
name: 'limitTimes',
type: 'String'
}, {
name: 'code',
type: 'String'
}, {
name: 'describe',
type: 'String'
}, {
name: 'promotionInfo',
type: 'String'
}, {
name: 'userSourceLimit',
type: 'String'
}, {
name: 'userTypeLimit',
type: 'String'
}, {
name: 'creatorId',
type: 'String'
}, {
name: 'limitDateFrom',
type: 'String'
}, {
name: 'limitDateTo',
type: 'String'
}, {
name: 'createTime',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}, {
name: 'status',
type: 'String'
}, {
name: 'staff',
type: 'String'
}]
}, {
//营销码管理 -> 编辑优惠码页面渲染
route: '/market/coupon/update/:id',
method: 'GET',
view: 'pages/market/coupon-edit',
url: '/promotioncode/getPromotionCode',
isJsonRaw: true,
data: {
action: "/market/coupon/updateCode",
type: "update"
},
src: '/market/coupon-edit',
params: [{
name: "id",
type: "String"
}]
}, {
//营销码管理 -> 优惠码详情
route: '/market/coupon/info/:id',
method: 'GET',
view: 'pages/market/coupon-edit',
url: '/promotioncode/getPromotionCode',
isJsonRaw: true,
src: '/market/coupon-edit',
data: {
type: "info"
},
params: [{
name: "id",
type: "String"
}]
}, {
//营销码管理 -> 验证优惠码
route: '/market/coupon/checkPromotionCode',
method: 'POST',
url: '/promotioncode/checkPromotionCode',
isJsonRaw: true,
params: [{
name: 'code',
type: 'String'
}]
}, {
//营销码管理 -> 编辑优惠码
route: '/market/coupon/updateCode',
method: 'POST',
url: '/promotioncode/updatePromotionCode',
isJsonRaw: true,
params: [{
name: 'id',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'limitTimes',
type: 'String'
}, {
name: 'code',
type: 'String'
}, {
name: 'describe',
type: 'String'
}, {
name: 'promotionInfo',
type: 'String'
}, {
name: 'userSourceLimit',
type: 'String'
}, {
name: 'userTypeLimit',
type: 'String'
}, {
name: 'creatorId',
type: 'String'
}, {
name: 'limitDateFrom',
type: 'String'
}, {
name: 'limitDateTo',
type: 'String'
}, {
name: 'createTime',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}, {
name: 'status',
type: 'String'
}]
},
params: [{
name: "id",
type: "String"
}]
}, {
//营销码管理 -> 验证优惠码
route: '/market/coupon/checkPromotionCode',
method: 'POST',
url: '/promotioncode/checkPromotionCode',
isJsonRaw: true,
params: [{
name: 'code',
type: 'String'
}]
}, {
//营销码管理 -> 编辑优惠码
route: '/market/coupon/updateCode',
method: 'POST',
url: '/promotioncode/updatePromotionCode',
isJsonRaw: true,
params: [{
name: 'id',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'limitTimes',
type: 'String'
}, {
name: 'code',
type: 'String'
}, {
name: 'describe',
type: 'String'
}, {
name: 'promotionInfo',
type: 'String'
}, {
name: 'userSourceLimit',
type: 'String'
}, {
name: 'userTypeLimit',
type: 'String'
}, {
name: 'creatorId',
type: 'String'
}, {
name: 'limitDateFrom',
type: 'String'
}, {
name: 'limitDateTo',
type: 'String'
}, {
name: 'createTime',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}, {
name: 'status',
type: 'String'
}]
},
{
//限购码管理 -> 页面渲染
route: '/market/limitcode/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/limitcode',
noApi: true,
data: {
pageTitle: '限购码列表',
filter: true,
createUrl: '/market/limitcode/add',
gridurl: '/market/limitcode/getLimitCode'
}
}, {
//限购码管理 -> 限购码列表
route: '/market/limitcode/getLimitCode',
method: 'POST',
url: '/limitCode/getLimitCodeList',
isJsonRaw: true,
params: [{
name: 'status',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'batchNo',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}]
}, {
//限购码管理 -> 添加限购码页面渲染
route: '/market/limitcode/add',
method: 'GET',
view: 'pages/market/limitcode-edit',
data: {
action: "/market/limitCode/addLimitCode",
type: "add",
/*******************************************************************/
{
//限购码管理 -> 页面渲染
route: '/market/limitcode/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/limitcode',
noApi: true,
data: {
reqDepartment: "零售部/营销策划",
limitTimes: 1,
userUseLimit: 1,
userTypeLimit: '新注册|注册未购买|普通会员|银卡会员|金卡会员|白金会员'
pageTitle: '限购码列表',
filter: true,
createUrl: '/market/limitcode/add',
gridurl: '/limitCode/getLimitCodeList',
limitcode:true
}
},
src: '/market/limitcode-edit'
}, {
//限购码管理 -> 添加限购码
route: '/market/limitCode/addLimitCode',
method: 'POST',
url: '/limitCode/addLimitCode',
isJsonRaw: true,
params: [{
name: "name",
type: "String"
}, {
name: "limitTimes",
type: "Number"
}, {
name: "reqDepartment",
type: "String"
}, {
name: "limitDateFrom",
type: "String"
}, {
name: "limitDateTo",
type: "String"
}, {
name: "describe",
type: "String"
}, {
name: "userUseLimit",
type: "Number"
}, {
name: "userTypeLimit",
type: "String"
}, {
name: "limitSkn",
type: "String"
}, {
name: "creatorName",
type: "String"
}, {
name: "creatorId",
type: "Number"
}, {
name: "status",
type: "Number"
}]
}, {
//限购码管理 -> 查看限购码页面渲染
route: '/market/limitcode/info/:id',
method: 'GET',
view: 'pages/market/limitcode-info',
url: "/limitCode/getLimitCode",
src: "/market/limitcode-info",
isJsonRaw: true,
params: [{
name: 'id',
type: 'String'
}]
}, {
//限购码管理 -> 修改限购码页面渲染
route: '/market/limitcode/update/:id',
method: 'GET',
view: 'pages/market/limitcode-edit',
url: "/limitCode/getLimitCode",
src: '/market/limitcode-edit',
isJsonRaw: true,
data: {
action: "/market/limitcode/updateLimitCode",
type: "update",
},
params: [{
name: 'id',
type: 'String'
}]
}, {
//限购码管理 -> 编辑限购码页面渲染
route: '/market/limitcode/edit/:id',
method: 'GET',
view: 'pages/market/limitcode-edit',
url: "/limitCode/getLimitCode",
src: '/market/limitcode-edit',
isJsonRaw: true,
data: {
action: "/market/limitcode/updateLimitCode",
type: "edit",
//限购码管理 -> 限购码列表
route: '/limitCode/getLimitCodeList',
method: 'POST',
url: '/limitCode/getLimitCodeList',
isJsonRaw: true,
params: [{
name: 'status',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'batchNo',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'reqDepartment',
type: 'String'
}, {
name: 'sku',
type: 'String'
}, {
name: 'skn',
type: 'String'
}]
}, {
//限购码管理 -> 添加限购码页面渲染
route: '/market/limitcode/add',
method: 'GET',
view: 'pages/market/limitcode-edit',
data: {
action: "/limitCode/addLimitCode",
type: "add",
data: {
reqDepartment: "零售部/营销策划",
limitTimes: 1,
userUseLimit: 1,
userTypeLimit: '新注册|注册未购买|普通会员|银卡会员|金卡会员|白金会员'
}
},
src: '/market/limitcode-edit'
}, {
//限购码管理 -> 添加限购码
route: '/limitCode/addLimitCode',
method: 'POST',
url: '/limitCode/addLimitCode',
isJsonRaw: true,
params: [{
name: "name",
type: "String"
}, {
name: "limitTimes",
type: "Number"
}, {
name: "reqDepartment",
type: "String"
}, {
name: "limitDateFrom",
type: "String"
}, {
name: "limitDateTo",
type: "String"
}, {
name: "describe",
type: "String"
}, {
name: "userUseLimit",
type: "Number"
}, {
name: "userTypeLimit",
type: "String"
}, {
name: "limitSkn",
type: "String"
}, {
name: "creatorName",
type: "String"
}, {
name: "creatorId",
type: "Number"
}, {
name: "status",
type: "Number"
}, {
name: "skus",
type: "string"
}, {
name: "skuTimes",
type: "string"
}, {
name: "limitCodeType",
type: "string"
}]
},{
//检查SKN的合法性并且获得其下的所有SKU
route: '/limitCode/checkSknValidity',
method: 'POST',
url: '/limitCode/checkSknValidity',
params:[
{name: "skn", type: "string"},
{name: "id", type: "string"}
]
}, {
//限购码管理 -> 查看限购码页面渲染
route: '/market/limitcode/info/:id',
method: 'GET',
view: 'pages/market/limitcode-info',
url: "/limitCode/getLimitCode",
src: "/market/limitcode-info",
isJsonRaw: true,
params: [{
name: 'id',
type: 'String'
}]
}, {
//限购码管理 -> 修改限购码页面渲染
route: '/market/limitcode/update/:id',
method: 'GET',
view: 'pages/market/limitcode-edit',
url: "/limitCode/getLimitCode",
src: '/market/limitcode-edit',
isJsonRaw: true,
data: {
action: "/limitCode/updateLimitCode",
type: "update",
},
params: [{
name: 'id',
type: 'String'
}]
}, {
route:'/limitCode/getLimitCode',
method:'POST',
url:'/limitCode/getLimitCode',
params:[
{name:'id', type:'string'}
]
},{
//限购码管理 -> 编辑限购码页面渲染
route: '/market/limitcode/edit/:id',
method: 'GET',
view: 'pages/market/limitcode-edit',
//url: "/limitCode/getLimitCode",
src: '/market/limitcode-edit',
//isJsonRaw: true,
data: {
action: "/limitCode/updateLimitCode",
type: "edit",
},
params: [{
name: 'id',
type: 'String'
}]
}, {
//限购码管理 -> 编辑限购码接口
route: '/limitCode/updateLimitCode',
method: 'POST',
url: '/limitCode/updateLimitCode',
isJsonRaw: true,
params: [{
name: "name",
type: "String"
}, {
name: "limitTimes",
type: "Number"
}, {
name: "reqDepartment",
type: "String"
}, {
name: "limitDateFrom",
type: "String"
}, {
name: "limitDateTo",
type: "String"
}, {
name: "describe",
type: "String"
}, {
name: "userUseLimit",
type: "Number"
}, {
name: "userTypeLimit",
type: "String"
}, {
name: "limitSkn",
type: "String"
}, {
name: "creatorName",
type: "String"
}, {
name: "creatorId",
type: "Number"
}, {
name: "status",
type: "Number"
}, {
name: "id",
type: "Number"
}, {
name: "batchNo",
type: "Number"
}, {
name: "limitCodeType",
type: "string"
}, {
name: "skuTimes",
type: "string"
}, {
name: "skus",
type: "string"
}]
}, {
//限购码管理 -> 修改限购码接口
route: '/limitCode/auditLimitCode',
method: 'POST',
view: 'pages/limitcode/info',
url: "/limitCode/auditLimitCode",
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'status',
type: 'Number'
}, {
name: 'reason',
type: 'String'
}]
}, {
//限购码管理 -> tab卡数据
route: '/limitCode/getLimitCodeCountByStatus',
method: 'POST',
url: '/limitCode/getLimitCodeCountByStatus',
isJsonRaw: true,
params: [{
name: 'reqDepartment',
type: 'String'
}, {
name: 'name',
type: 'String'
}, {
name: 'batchNo',
type: 'Number'
}]
},
params: [{
name: 'id',
type: 'String'
}]
}, {
//限购码管理 -> 编辑限购码接口
route: '/market/limitcode/updateLimitCode',
method: 'POST',
url: '/limitCode/updateLimitCode',
isJsonRaw: true,
params: [{
name: "name",
type: "String"
}, {
name: "limitTimes",
type: "Number"
}, {
name: "reqDepartment",
type: "String"
}, {
name: "limitDateFrom",
type: "String"
}, {
name: "limitDateTo",
type: "String"
}, {
name: "describe",
type: "String"
}, {
name: "userUseLimit",
type: "Number"
}, {
name: "userTypeLimit",
type: "String"
}, {
name: "limitSkn",
type: "String"
}, {
name: "creatorName",
type: "String"
}, {
name: "creatorId",
type: "Number"
}, {
name: "status",
type: "Number"
}, {
name: "id",
type: "Number"
}, {
name: "batchNo",
type: "Number"
}]
}, {
//限购码管理 -> 修改限购码接口
route: '/market/limitcode/auditLimitCode',
method: 'POST',
view: 'pages/limitcode/info',
url: "/limitCode/auditLimitCode",
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'status',
type: 'Number'
}, {
name: 'reason',
type: 'String'
}]
}, {
//限购码管理 -> tab卡数据
route: '/market/limitCode/getCodeCount',
method: 'POST',
url: '/limitCode/getLimitCodeCountByStatus',
isJsonRaw: true,
params: [{
name: 'reqDepartment',
type: 'String'
}, {
name: 'name',
type: 'String'
/*************************************************************************/
{
//vip累计金额翻倍 -> 列表页面渲染
route: '/market/vipamount/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/vipamount',
noApi: true,
data: {
pageTitle: 'vip累计金额翻倍',
createUrl: '/market/vipamount/add',
gridurl: '/market/vipamount/list'
}
}, {
name: 'batchNo',
type: 'Number'
}]
}, {
//vip累计金额翻倍 -> 列表页面渲染
route: '/market/vipamount/index',
method: 'GET',
view: 'pages/market/index',
src: '/market/vipamount',
noApi: true,
data: {
pageTitle: 'vip累计金额翻倍',
createUrl: '/market/vipamount/add',
gridurl: '/market/vipamount/list'
}
}, {
//vip累计金额翻倍 -> 列表数据
route: '/market/vipamount/list',
method: 'POST',
//url: '/activity/queryActivityList',
apis: {
vipList: {
url: '/activity/queryActivityList',
params: [{
name: 'type',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}],
isJsonRaw: true
},
activity: {
url: '/activity/queryActivityList',
params: [{
name: 'status',
type: 'Number',
def: 0
}],
isJsonRaw: true
//vip累计金额翻倍 -> 列表数据
route: '/market/vipamount/list',
method: 'POST',
//url: '/activity/queryActivityList',
apis: {
vipList: {
url: '/activity/queryActivityList',
params: [{
name: 'type',
type: 'Number'
}, {
name: 'size',
type: 'Number'
}, {
name: 'page',
type: 'Number'
}],
isJsonRaw: true
},
activity: {
url: '/activity/queryActivityList',
params: [{
name: 'status',
type: 'Number',
def: 0
}],
isJsonRaw: true
}
}
}
}, {
//vip累计金额翻倍 -> 添加页面渲染
route: '/market/vipamount/add',
method: 'GET',
view: 'pages/market/vipamount-edit',
src: '/market/vipamount-edit',
data: {
action: '/market/vipamount/save',
}
}, {
//vip累计金额翻倍 -> 添加编辑活动
route: '/market/vipamount/save',
method: 'POST',
url: '/activity/saveActivity',
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'num',
type: 'Number'
}, {
name: 'title',
type: 'String'
}, {
name: 'startTime',
type: 'Number'
}, {
name: 'endTime',
type: 'Number'
}, {
name: 'type',
type: 'Number'
//vip累计金额翻倍 -> 添加页面渲染
route: '/market/vipamount/add',
method: 'GET',
view: 'pages/market/vipamount-edit',
src: '/market/vipamount-edit',
data: {
action: '/market/vipamount/save',
}
}, {
name: 'status',
type: 'Number'
}]
}]
\ No newline at end of file
//vip累计金额翻倍 -> 添加编辑活动
route: '/market/vipamount/save',
method: 'POST',
url: '/activity/saveActivity',
isJsonRaw: true,
params: [{
name: 'id',
type: 'Number'
}, {
name: 'num',
type: 'Number'
}, {
name: 'title',
type: 'String'
}, {
name: 'startTime',
type: 'Number'
}, {
name: 'endTime',
type: 'Number'
}, {
name: 'type',
type: 'Number'
}, {
name: 'status',
type: 'Number'
}]
}]
\ No newline at end of file
... ...
... ... @@ -3,11 +3,11 @@
* 资源管理路由
*/
exports.domain = require('../config/common.js').domain;
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.115:8080/platform';//王伟
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
//exports.domain = 'http://172.16.6.231:8080/platform';
//exports.domain = 'http://172.16.6.225:8080/platform';
exports.domain = 'http://172.16.6.225:8080/platform';
//exports.domain = 'http://192.168.102.216:8086/platform';
exports.res = [
... ... @@ -75,8 +75,8 @@ exports.res = [
method: 'GET',
view: 'pages/sourceManage/resourceContentManage',
src: '/sourceManage/resourceContentManage',
//url: '/resources/getUrlAction',
//params:[]
url: '/resources/getUrlAction',
params:[]
},
{
route: "/resources/resContentIndex",
... ...
... ... @@ -56,7 +56,7 @@ exports.res = [
url: "/yohoCoin/set",
params:[
{name: 'productSkn', type: 'Number'},
{name: 'returnCoin', type: 'Number'},
{name: 'returnCoinMoney', type: 'Number'},
{name: 'salesPrice', type: 'Number'},
{name: 'auditorId', type: 'Number'}
]
... ...
<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>{{pageTitel}}</h4>
</div>
</div>
</div>
</div>
<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>{{pageTitel}}</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<div id="activityForm" role="form" class="form-horizontal form-bordered" method="post" action="{{action}}">
<div class="row">
<div class="col-md-12">
<div id="activityForm" role="form" class="form-horizontal form-bordered" method="post" action="{{action}}">
<input type="hidden" id="activityId" value="{{data.activityId}}" />
<input type="hidden" id="prizeId" value="{{data.prizeId}}" />
<input type="hidden" id="backgroundStyle" value="{{data.backgroundStyle}}" />
<input type="hidden" id="prizeList" value="{{data.prizeList}}" />
<input type="hidden" id="status" value="{{data.status}}" />
<div class="panel panel-default">
{{# data}}
<div class="panel-heading">
<h4 class="panel-title">{{pageTitel}}</h4>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">活动名称<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="activityName" placeholder="活动名称" class="form-control" required value="{{activityName}}">
</div>
</div>
<div class="panel panel-default">
{{# data}}
<div class="panel-heading">
<h4 class="panel-title">{{pageTitel}}</h4>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">活动名称<span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="activityName" placeholder="活动名称" class="form-control" required value="{{activityName}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">活动时间<span class="red">*</span></label>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:end:endTimeStr" id="beginTimeStr" required placeholder="活动开始时间" value="{{beginTimeStr}}" readonly>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly >
</div>
<div class="col-sm-3">
<label class="control-label" id="totalHours"></label>
</div>
<!-- readonly require-->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">活动时间<span class="red">*</span></label>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:end:endTimeStr" id="beginTimeStr" required placeholder="活动开始时间" value="{{beginTimeStr}}" readonly>
</div>
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly >
</div>
<div class="col-sm-3">
<label class="control-label" id="totalHours"></label>
</div>
<!-- readonly require-->
</div>
<label class="col-sm-2"></label>
<div class="input-group col-sm-6">
<span class="input-group-addon">人数上限:</span>
<input type="text" id="numberLimit" class="form-control number" value="{{numberLimit}}" placeholder="人数上限">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">奖品类型<span class="red">*</span></label>
<div class="col-sm-3">
<select name="prizeType" id="prizeType" value='{{prizeType}}' required class="form-control">
<label class="col-sm-2 control-label">奖品类型<span class="red">*</span></label>
<div class="col-sm-3">
<select name="prizeType" id="prizeType" value='{{prizeType}}' required class="form-control">
<option value="3">限购码</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">奖品设置<span class="red">*</span></label>
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">限购码ID:<span class="red">*</span></span>
<input type="text" form="activityForm" name="prize" id="prize" class="form-control" value="{{ prize}}" placeholder="限购码ID" required>
</div>
<div class="input-group">
<span class="input-group-addon">白名单:</span>
<input type="text" form="activityForm" name="whiteList" id="whiteList" class="form-control" value="{{ whiteList}}" placeholder="请输入UID,用逗号隔开">
</div>
<div class="input-group">
<span class="input-group-addon">真实用户中奖数:<span class="red">*</span></span>
<input type="number" form="activityForm" name="realUserNum" id="realUserNum" class="form-control" value="{{ realUserNum}}" placeholder="请输入数量" required>
</div>
<div class="input-group">
<span class="input-group-addon">马甲用户中奖数:</span>
<input type="number" form="activityForm" name="sockUserNum" id="sockUserNum" class="form-control" value="{{ sockUserNum}}" placeholder="请输入数量">
<span class="input-group-addon">限购码批次号:<span class="red">*</span></span>
<input type="text" form="activityForm" name="prize" id="prize" class="form-control" value="{{ prize}}" placeholder="限购码批次号" required>
</div>
<!--<div class="input-group">-->
<!--<span class="input-group-addon">白名单:</span>-->
<!--<input type="text" form="activityForm" name="whiteList" id="whiteList" class="form-control" value="{{ whiteList}}" placeholder="请输入UID,用逗号隔开">-->
<!--</div>-->
<!--<div class="input-group">-->
<!--<span class="input-group-addon">真实用户中奖数:<span class="red">*</span></span>-->
<!--<input type="number" form="activityForm" name="realUserNum" id="realUserNum" class="form-control" value="{{ realUserNum}}" placeholder="请输入数量" required>-->
<!--</div>-->
<!--<div class="input-group">-->
<!--<span class="input-group-addon">马甲用户中奖数:</span>-->
<!--<input type="number" form="activityForm" name="sockUserNum" id="sockUserNum" class="form-control" value="{{ sockUserNum}}" placeholder="请输入数量">-->
<!--</div>-->
</div>
</div>
... ... @@ -128,30 +135,30 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">活动说明:</label>
<div class="col-sm-8">
<input type="text" id="activityDesc" placeholder="请输入链接" class="form-control" value="{{activityDesc}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">活动说明:</label>
<div class="col-sm-8">
<input type="text" id="activityDesc" placeholder="请输入链接" class="form-control" value="{{activityDesc}}">
</div>
</div>
</div>
</div>
{{/ data}}
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" class="btn btn-default" onclick="javascript:history.go(-1);">取消</a>
<button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
{{/ data}}
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" class="btn btn-default" onclick="javascript:history.go(-1);">取消</a>
<button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -26,10 +26,10 @@
<div class="panel-heading">
<a href="/activity/drawline/add" class="btn btn-success"><i class="fa fa-plus"></i> 添加抽奖活动</a>
</div>
<div class="panel-body">
<div class="row">
<select name="status" id="status" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
<option value="-1" selected="">活动状态</option>
<option value="1">开启</option>
... ... @@ -37,17 +37,19 @@
<option value="2">未过期</option>
</select>
<div class="form-group col-md-2">
<input name="activityName" id="activityName" type="text" value="" class="form-control" placeholder="请输入活动名称" />
</div>
<input name="activityName" id="activityName" type="text" value="" class="form-control" placeholder="请输入活动名称" />
</div>
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
<input id="importFile" style="z-index: -99999" hidden name="productSkn" class="btn btn-default excel-upload" type="file" >
<div class="file-name btn btn-info" id="uploadFile">导入中奖信息</div>
</div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="storeadmin_Tabel"></div>
</div>
<div class="panel panel-primary-head">
<div id="basicTable" class="dataTables_wrapper no-footer">
<div class="dataTables_length" id="storeadmin_Tabel"></div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -235,7 +235,7 @@
<td style="width: 5%">[[genderName]]</td>
<td class="retailPrice" style="width: 5%">[[retailPrice]]</td>
<td class="salesPrice" style="width: 5%">[[salesPrice]]</td>
<td class="returnYohoCoin" style="width: 6%">[[productPrice.returnCoin]]</td>
<td class="returnYohoCoin" style="width: 6%">[[productPrice.returnCoinMoney]]</td>
<td class="coinStatus" style="width: 8%">
[[statusName]]<br>
[[if productPrice.coinStatus == 3]]
... ... @@ -282,7 +282,7 @@
</div>
</td-->
<td>
<input type="text" class="form-control center editor-yohoCoin" placeholder="反币金额" value="[[productPrice.returnCoin]]" style="width: 100px">
<input type="text" class="form-control center editor-yohoCoin" placeholder="反币金额" value="[[productPrice.returnCoinMoney]]" style="width: 100px">
</td>
<td>
<select class="form-control center editor-auditor" style="width: 150px">
... ... @@ -329,7 +329,7 @@
[[else]]
[[item.needAuditCoin]]<br>
[[/if]]
<font color="#999999">[ [[item.returnCoin]] ]</font>
<font color="#999999">[ [[item.returnCoinMoney]] ]</font>
</td>
<td><a href="javascript:;" class="btn btn-xs btn-danger btn-delete-yohoCoin" data-index="[[_index]]">删除</a></td>
</tr>
... ...
... ... @@ -33,7 +33,7 @@
<div class="panel-col2">
<input id="filter-id" class="form-control panel-input" type="text" placeholder="请输入批次号">
</div>
<div class="panel-col2">
<div class="panel-col">
<input id="filter-name" class="form-control panel-input" type="text" placeholder="请输入名称">
</div>
<div class="panel-col">
... ... @@ -47,6 +47,14 @@
<option value="其他">其他</option>
</select>
</div>
{{# limitcode}}
<div class="panel-col">
<input id="filter-skn" class="form-control panel-input" type="text" placeholder="请输skn">
</div>
<div class="panel-col">
<input id="filter-sku" class="form-control panel-input" type="text" placeholder="请输sku">
</div>
{{/ limitcode}}
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="" class="btn btn-info">全部</a>
</div>
... ...
<div class="contentpanel">
<div class="row">
<div class="col-md-12">
<form id="basicForm" role="{{type}}" class="form-horizontal form-bordered" method="get" action="{{action}}">
<div class="panel panel-default">
{{# data}}
<div class="panel-heading">
<h4 class="panel-title">基本信息</h4>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">名称 <span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" id="name" placeholder="名称建议30字以内" class="form-control" required maxlength="30" value="{{name}}">
</div>
</div>
<div class="form-group">
<label for="numbers" class="col-sm-2 control-label">数量<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="limitTimes" placeholder="数量" class="form-control" required pattern="^[0-9]+$" value="{{limitTimes}}">
</div>
<!--required pattern="^[0-9]+$"-->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申请部门</label>
<div class="col-sm-3">
<select id="department1" class="form-control">
<option value="零售部">零售部</option>
<option value="市场部">市场部</option>
<option value="会员部">会员部</option>
<option value="品牌合作部">品牌合作部</option>
<option value="潮流资源部">潮流资源部</option>
<option value="其他">其他</option>
</select>
</div>
<div class="col-sm-3">
<select id="department2" class="form-control">
<option value="营销策划">营销策划</option>
<option value="类目运营">类目运营</option>
<option value="店铺运营">店铺运营</option>
</select>
</div>
<input type="hidden" id="reqDepartment" value="{{reqDepartment}}">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>
<div class="col-sm-6">
<!-- <div class="col-sm-2">
<label><input name="limitTimeType" type="radio" value="1">指定时间</label>
</div> -->
<div class="col-sm-6">
<input type="text" class="form-control" jsaction="time:end:limitDateTo" id="limitDateFrom" placeholder="开始时间" value="{{limitDateFrom}}" readonly required>
</div>
<div class="col-sm-6">
<input type="text" class="form-control" jsaction="time:start:limitDateFrom" id="limitDateTo" placeholder="结束时间" value="{{limitDateTo}}" readonly required>
</div>
<!-- <div class="col-sm-6">
<label id="no-limit-time"><input name="limitTimeType" type="radio" value="2">不指定</label>
</div> -->
</div>
<!-- <input type="hidden" value="{{limitTimeType}}" id="limitTimeType" for="radio" required placeholder="使用期限"> -->
<!-- readonly require-->
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">限购码说明<i class="red">*</i></label>
<div class="col-sm-8">
<textarea class="form-control" id="describe" maxlength="100" placeholder="限购码使用条件简介,最多100个字" required>{{describe}}</textarea>
</div>
<!-- require-->
</div>
</div>
</div>
<div id="basicForm" role="{{type}}" data-action="{{action}}" class="form-horizontal form-bordered">
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
<script type="text/template" id="limitcodeEdit-template">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">基本信息</h4>
</div><!-- panel-heading -->
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label">名称 <span class="red">*</span></label>
<div class="col-sm-8">
<input type="text" placeholder="名称建议30字以内" prompt="名称" class="form-control observe noEdit" data-field="name" required maxlength="30" value="[[name]]">
</div>
<!-- <div class="form-group">
<label for="userSourceLimit" class="col-sm-2 control-label">用户来源<i class="red">*</i></label>
<div class="col-sm-8">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="userSourceLimit" > IOS
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userSourceLimit" > 安卓
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="userSourceLimit" > PC
</label>
<label class="checkbox-inline">
<input type="checkbox" value="4" name="userSourceLimit" > WAP
</label>
<label class="checkbox-inline">
<input type="checkbox" value="5" name="userSourceLimit" > IPAD
</label>
</div>
<input type="hidden" value="{{userSourceLimit}}" id="userSourceLimit" for="checkbox" required placeholder="用户来源">
</div> -->
<div class="form-group">
<label for="name" class="col-sm-2 control-label">会员身份<i class="red">*</i></label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="新注册" name="userTypeLimit" > 新注册
</label>
<label class="checkbox-inline">
<input type="checkbox" value="注册未购买" name="userTypeLimit"> 注册未购买
</label>
<label class="checkbox-inline">
<input type="checkbox" value="普通会员" name="userTypeLimit"> 普通会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="银卡会员" name="userTypeLimit"> 银卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="金卡会员" name="userTypeLimit"> 金卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="白金会员" name="userTypeLimit"> 白金会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="指定用户" name="userTypeLimit"> 指定用户
</label>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" id="UID" placeholder="UID">
</div>
</div>
<input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="会员身份">
<div class="form-group">
<label class="col-sm-2 control-label">数量<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" placeholder="数量" class="form-control observe noEdit number" data-field="limitTimes" required pattern="^[0-9]+$" value="[[limitTimes]]">
</div>
<div class="form-group">
<label for="userUseLimit" class="col-sm-2 control-label">限用次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="userUseLimit" placeholder="0 表示不限制" class="form-control" required pattern="^[0-9]+$" value="{{userUseLimit}}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申请部门</label>
<div class="col-sm-3">
<select value="[[reqDepartment[0] ]]" class="form-control observe noEdit" data-field="reqDepartment[0]">
<option value="零售部">零售部</option>
<option value="市场部">市场部</option>
<option value="会员部">会员部</option>
<option value="品牌合作部">品牌合作部</option>
<option value="潮流资源部">潮流资源部</option>
<option value="其他">其他</option>
</select>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">指定商品</label>
<div class="col-sm-2">
<input type="number" id="limitSkn" placeholder="SKN/SKU/SKC" class="form-control" value="{{limitSkn}}">
</div>
<div class="col-sm-3">
<select value="[[reqDepartment[1] ]]" class="form-control observe noEdit" data-field="reqDepartment[1]">
<option value="营销策划">营销策划</option>
<option value="类目运营">类目运营</option>
<option value="店铺运营">店铺运营</option>
</select>
</div>
</div>
<!-- <div class="form-group">
<label for="name" class="col-sm-2 control-label">限制次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" id="userUseLimit" placeholder="限制次数" class="form-control" value="{{userUseLimit}}" required pattern="^[1-9]+$">
</div>
</div> -->
<!-- <div class="form-group">
<label for="name" class="col-sm-2 control-label">商品性别</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="userSex" > 男
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="userSex"> 女
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="userSex"> 通用
</label>
<div class="form-group">
<label class="col-sm-2 control-label">使用期限<span class="red">*</span></label>
<div class="col-sm-6">
<div class="col-sm-6">
<input type="text" class="form-control observe" data-field="limitDateFrom" jsaction="time:end:limitDateTo" id="limitDateFrom" placeholder="开始时间" value="[[limitDateFrom]]" readonly required>
</div>
<input type="hidden" value="{{userSex}}" id="userSex" for="checkbox">
</div> -->
<!-- <div class="panel-heading">
<h4 class="panel-title">优惠互斥</h4>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">SKN除外</label>
<div class="col-sm-2">
<input class="form-control" type="text" placeholder="SKN">
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">优惠互斥</label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="1" name="discountReject" > 销售折扣
</label>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="discountReject" > VIP折扣-商品
</label>
<label class="checkbox-inline">
<input type="checkbox" value="3" name="discountReject" > VIP折扣-运营
</label>
<label class="checkbox-inline">
<input type="checkbox" value="4" name="discountReject" > 促销活动
</label>
<label class="checkbox-inline">
<input type="checkbox" value="5" name="discountReject" > YOHO币-商品
</label>
<label class="checkbox-inline">
<input type="checkbox" value="6" name="discountReject" > YOHO币-运营
</label>
<label class="checkbox-inline">
<input type="checkbox" value="7" name="discountReject" > 优惠券
</label>
<label class="checkbox-inline">
<input type="checkbox" value="8" name="discountReject" > 红包
</label>
<label class="checkbox-inline">
<input type="checkbox" value="9" name="discountReject" > 优惠码
</label>
<div class="col-sm-6">
<input type="text" class="form-control observe" data-field="limitDateTo" jsaction="time:start:limitDateFrom" id="limitDateTo" placeholder="结束时间" value="[[limitDateTo]]" readonly required>
</div>
<input type="hidden" value="{{discountReject}}" id="discountReject" for="checkbox">
</div> -->
<input type="hidden" value="{{status}}" id="status" >
<input type="hidden" value="{{id}}" id="id" >
<input type="hidden" value="{{batchNo}}" id="batchNo" >
{{/ data}}
<div class="form-group">
<label class="col-sm-2 control-label">申请人</label>
<div class="col-sm-8">
<label class="form-label control-label" id="creatorName">{{auth.name}}</label>
</div>
</div>
<input type="hidden" value="{{auth.uid}}" id="creatorId" >
<input type="hidden" value="{{auth.name}}" id="creatorName" >
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
<button id="save_brand" type="submit" data-loading-text="保存中..." class="btn btn-primary">保存</button>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">限购码说明<i class="red">*</i></label>
<div class="col-sm-8">
<textarea class="form-control observe" prompt="限购码说明" data-field="describe" maxlength="100" placeholder="限购码使用条件简介,最多100个字" required>[[describe]]</textarea>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
</div>
<div class="form-group" hidden>
<label class="col-sm-2 control-label">会员身份<i class="red">*</i></label>
<div class="col-sm-10">
<label class="checkbox-inline">
<input type="checkbox" value="新注册" name="userTypeLimit" > 新注册
</label>
<label class="checkbox-inline">
<input type="checkbox" value="注册未购买" name="userTypeLimit"> 注册未购买
</label>
<label class="checkbox-inline">
<input type="checkbox" value="普通会员" name="userTypeLimit"> 普通会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="银卡会员" name="userTypeLimit"> 银卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="金卡会员" name="userTypeLimit"> 金卡会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="白金会员" name="userTypeLimit"> 白金会员
</label>
<label class="checkbox-inline">
<input type="checkbox" value="指定用户" name="userTypeLimit"> 指定用户
</label>
</div>
<div class="col-sm-2">
<input type="text" class="form-control observe noEdit" data-field="UID" value="[[UID]]" placeholder="UID">
</div>
<input type="hidden" value="[[userTypeLimit]]" id="userTypeLimit" for="checkbox" required placeholder="会员身份">
</div>
<div class="form-group" hidden>
<label class="col-sm-2 control-label">限用次数<i class="red">*</i></label>
<div class="col-sm-8">
<input type="text" prompt="限用次数" placeholder="0 表示不限制" class="form-control observe noEdit" data-field="userUseLimit" required pattern="^[0-9]+$" value="[[userUseLimit]]">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">指定商品<i class="red">*</i></label>
<div class="col-sm-4">
<div class="col-sm-10">
<input type="radio" class="limitProduct" value="N" name="skn_sku" checked />SKN
<input type="radio" class="limitProduct" value="U" name="skn_sku" />SKU
<input type="hidden" id="skn_sku" for="radio" value="[[limitCodeType]]"/><br>
</div>
<label class="col-sm-3 control-label">SKN值:</label>
<div class="col-sm-4">
<input id="limitSkn" type="text" maxlength="8" placeholder="SKN" class="form-control observe number noEdit" data-field="limitSkn" value="[[limitSkn]]" [[limitCodeType=="N"?'':'required']]>
</div><br>
<div id="skus" class="col-sm-10" [[limitCodeType=="U"?"":"hidden"]]>
<table class="table table-bordered responsive dataTable no-footer">
[[each skusInfo as item index]]
<tr>
<td><input type="text" class="form-control observe skus number noEdit" placeholder="sku值" data-field="skusInfo.[[index]].sku" value="[[item.sku]]" [[limitCodeType=="N"?"":"required"]]></td>
<td><input type="text" class="form-control observe number noEdit" prompt="sku数量" placeholder="数量" data-field="skusInfo.[[index]].skuTimes" value="[[item.skuTimes]]" [[limitCodeType=="N"?"":"required"]]></td>
<td><a href="javascript:;" class="btn btn-danger btn-xs delSku noEdit" data-index="[[index]]">删除</a></td>
</tr>
[[/each]]
<tr>
<td>sku</td>
<td>数量</td>
<td><a href="javascript:;" class="btn btn-info btn-xs addSku" disabled>添加</a></td>
</tr>
</table>
</div>
</div>
</div>
<input type="hidden" value="[[status]]">
<input type="hidden" value="[[id]]">
<input type="hidden" value="[[batchNo]]">
<div class="form-group">
<label class="col-sm-2 control-label">申请人</label>
<div class="col-sm-8">
<label class="form-label control-label" id="creatorName">{{auth.name}}</label>
</div>
</div>
<input id="auth_id" type="hidden" value="{{auth.uid}}">
<input id="auth_name" type="hidden" value="{{auth.name}}">
<div class="panel-footer">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
<button id="save_brand" type="button" data-loading-text="保存中..." class="btn btn-primary">保存</button>
</div>
</div>
</div>
</div>
</div>
</script>
... ...
... ... @@ -17,7 +17,7 @@
<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">{{ limitTimes}}</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">{{ reqDepartment}}</div>
... ... @@ -30,17 +30,25 @@
<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">{{ describe}}</div>
</div>
<!--<div class="row show-grid">-->
<!--<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">会员身份 :</div>-->
<!--<div id="userUseLimit" class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ userTypeLimit}}</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">{{ userUseLimit}}</div>-->
<!--</div>-->
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">会员身份 :</div>
<div id="userUseLimit" class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{ userTypeLimit}}</div>
<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">{{limitSkn}}</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">{{ userUseLimit}}</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">sku :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{skus}}</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">{{limitSkn}}</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">sku数量 :</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">{{skuTimes}}</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">申请人 :</div>
... ...
... ... @@ -20,16 +20,16 @@
</div>
<div class="allContents">
<!--<div id="times-list">-->
<div id="times-list">
<!--</div>-->
</div>
<!--<div class="clearfix"></div>-->
<!--<div class="col-sm-10 col-sm-offset-2">-->
<!--<a href="javascript:;" id="copyTab" class="btn btn-info btn-sm">复制</a>-->
<!--<a href="javascript:;" id="delTab" class="btn btn-danger btn-sm">删除</a>-->
<!--<a href="javascript:;" id="saveTime" class="btn btn-info btn-sm">保存时间</a>-->
<!--</div>-->
<div class="clearfix"></div>
<div class="col-sm-10 col-sm-offset-2">
<a href="javascript:;" id="copyTab" class="btn btn-info btn-sm">复制</a>
<a href="javascript:;" id="delTab" class="btn btn-danger btn-sm">删除</a>
<a href="javascript:;" id="saveTime" class="btn btn-info btn-sm">保存时间</a>
</div>
<div class="clearfix"></div>
<div class="contentpanel" id="content-list">
... ... @@ -74,9 +74,9 @@
</script>
<!-- 按钮 -->
<script type="text/template" id="template_content_btns">
[[each btns as btn index]]
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.button_name]]</a></li>
[[/each]]
[[/each]]
</script>
{{> resource/taoyu}}
... ...
... ... @@ -24,9 +24,9 @@
</div>
<div class="panel-body">
<div class="row">
<!--<div class="panel-col">-->
<!--<input type="text" id="inputResourceId" placeholder="请输入ID" class="form-control" />-->
<!--</div>-->
<div class="panel-col">
<input type="text" id="inputResourceId" placeholder="请输入ID" class="form-control" />
</div>
<div class="panel-col">
<input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" />
</div>
... ...