Authored by 陶雨

限购码、抽奖活动4.4版本


'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
... ...
... ... @@ -29,8 +29,8 @@ tab.prototype = {
index = tab.split('=')[1];
}
g.index = index;
this.render(data);
g.active = index;
this.render(data);
p._init && p._init(g.active);
this.bind(p.click);
return this;
... ... @@ -57,13 +57,19 @@ tab.prototype = {
p = this.options;
var lis = [];
var hasActive = false;
$(p.columns).each(function(i, column) {
var li = $("<li></li>");
var a = $("<a href='javascript:void(0);'></a>");
if (g.index && i == g.index) {
li = $('<li class="active"></li>');
} else if (!g.index && column.name == 'all') {
}else if(!g.index && column.active) {
li = $('<li class="active"></li>');
g.index = i;
g.active = i;
hasActive = true;
}else if (!g.index && !hasActive && column.name == 'all') {
li = $('<li class="active"></li>');
}
if (column.name) a.attr({
... ...
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
... ...
... ... @@ -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',
// 新增抽签活动页面渲染
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,11 +78,12 @@ 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',
// 修改活动页面渲染
route: '/activity/drawline/update/:activityId',
method: 'GET',
view: 'pages/activity/edit',
url : "/DrawlineActivityRest/getDrawlineActivityDetail",
... ... @@ -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,11 +110,12 @@ 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',
// 数据查询页面渲染
route: '/activity/drawline/data/:activityId',
method: 'GET',
view: 'pages/activity/data',
url : "/DrawlineActivityRest/getPrizeDetailInfo",
... ... @@ -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
... ...
<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-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 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">
<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">
<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"></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">
<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>
<div class="form-group">
<label class="col-sm-2 control-label">内容管理<span class="red">*</span></label>
<div class="col-sm-10">
... ... @@ -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,28 +26,30 @@
<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>
<option value="0">关闭</option>
<option value="2">未过期</option>
</select>
<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>
... ...
... ... @@ -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 id="basicForm" role="{{type}}" data-action="{{action}}" class="form-horizontal form-bordered">
<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>
</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="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>
<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>
<div class="panel-heading">
<h4 class="panel-title">使用条件</h4>
<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="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>
<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="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="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="col-sm-2">
<input type="text" class="form-control" id="UID" placeholder="UID">
<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="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="会员身份">
</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 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>
</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>
<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>
</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="panel-heading">
<h4 class="panel-title">使用条件</h4>
</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>
<input type="hidden" value="{{userSex}}" id="userSex" for="checkbox">
</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="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="col-sm-2">
<input type="text" class="form-control observe noEdit" data-field="UID" value="[[UID]]" placeholder="UID">
</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>
<input type="hidden" value="{{discountReject}}" id="discountReject" for="checkbox">
</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]]">
<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>
</form>
</div>
<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>
... ...