init commit

This commit is contained in:
2026-03-17 09:56:00 +08:00
commit e2c8ae752d
6827 changed files with 1211784 additions and 0 deletions

View File

@@ -0,0 +1,213 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'wdsxh/activity/activity/index' + location.search,
add_url: 'wdsxh/activity/activity/add',
edit_url: 'wdsxh/activity/activity/edit',
del_url: 'wdsxh/activity/activity/del',
multi_url: 'wdsxh/activity/activity/multi',
import_url: 'wdsxh/activity/activity/import',
table: 'wdsxh_activity',
}
});
var table = $("#table");
table.on('post-body.bs.table', function (e, settings, json, xhr) {
$(".btn-editone,.btn-edit,.btn-add").data("area", ["100%", "100%"]);
});
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'fees', title: __('Fees'), operate:'BETWEEN'},
{field: 'organizing_method', title: __('Organizing_method'), searchList: {"1":__('Organizing_method 1'),"2":__('Organizing_method 2')}, formatter: Table.api.formatter.normal},
{field: 'apply_time', title: __('Apply_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'start_time', title: __('Start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'state', title: __('State'), searchList: {"1":__('State 1'),"2":__('State 2'),"3":__('State 3')}, formatter: Table.api.formatter.normal},
{field: 'is_verifying', title: __('Is_verifying'), searchList: {"1":__('Is_verifying 1'),"2":__('Is_verifying 2')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'status', title: __('Status'), searchList: {"normal":__('Status normal'),"hidden":__('Status hidden')}, formatter: Table.api.formatter.status},
{field: 'applet_activity_qrcode_path', title: __('Applet_activity_qrcode_path'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'points_status', title: __('Points_status'), searchList: {"1":__('Points_status 1'),"2":__('Points_status 2'),"3":__('Points_status 3')}, formatter: Table.api.formatter.normal},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons:[
{
name: 'list',
text: __('报名列表'),
title: __('报名列表'),
classname: 'btn btn-xs btn-info btn-dialog',
icon: 'fa fa-list',
extend: 'data-area=["100%","100%"]',
url: 'wdsxh/activity/activity_apply?activity_id={id}',
callback: function (data) {
Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
return true;
}
},
{
name: 'verification_qr_code',
text: __('公众号签到二维码'),
title: __('公众号签到二维码'),
classname: 'btn btn-xs bg-olive btn-dialog',
icon: 'fa fa-qrcode',
extend: 'data-area=["40%","60%"]',
url: 'wdsxh/activity/activity/verification_qr_code',
visible: function (row) {
if(Config.wananchi_appid !== null && Config.wananchi_appid !== undefined && Config.wananchi_appid !== '' && row.is_verifying == '1' && row.verification_method == 1 && row.state != '3'){
return true;
}else{
return false;
}
},
},
{
name: 'verification_applet_code',
text: __('小程序签到二维码'),
title: __('小程序签到二维码'),
classname: 'btn btn-xs bg-black btn-dialog',
icon: 'fa fa-qrcode',
extend: 'data-area=["40%","60%"]',
url: 'wdsxh/activity/activity/verification_applet_code',
visible: function (row) {
if(Config.applet_appid !== null && Config.applet_appid !== undefined && Config.applet_appid !== '' && row.is_verifying == '1' && row.verification_method == 1 && row.state != '3'){
return true;
}else{
return false;
}
},
},
{
name: 'fieldset',
text: __('自定义报名字段'),
title: __('自定义报名字段'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
extend: 'data-area=["100%","100%"]',
url: 'wdsxh/activity/activity_fieldset/fieldset',
visible: function (row) {
if(row.apply_field_state == 1){
return true;
}else{
return false;
}
},
},
{
name: 'certificate_design',
text: __('设置证书'),
title: __('设置证书'),
classname: 'btn btn-xs btn-success btn-dialog',
icon: 'fa fa-certificate',
extend: 'data-area=["100%","100%"]',
url: 'wdsxh/activity/certificate_design/index',
visible: function (row) {
// 只有启用单独证书时才显示按钮
if(row.certificate_enabled == '1'){
return true;
}else{
return false;
}
},
}
]
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
verification_qr_code: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
$(document).on('change','input[name="row[organizing_method]"]',function (){
var type=$(this).val();
switch (type){
case "1":
$('.address').addClass('hide');
$('.url').removeClass('hide');
break;
case "2":
$('.url').addClass('hide');
$('.address').removeClass('hide');
break;
}
});
$(document).on('change','input[name="row[is_verifying]"]',function (){
var type=$(this).val();
switch (type){
case "1"://需要核销
$('.verification_method').removeClass('hide');
break;
case "2"://不需要核销
$('.verification_method').addClass('hide');
$('.verifying_wechat_ids').addClass('hide');
break;
}
});
$(document).on('change','input[name="row[verification_method]"]',function (){
var type=$(this).val();
switch (type){
case "1"://核销方式:自动签到
$('.verifying_wechat_ids').addClass('hide');
break;
case "2"://核销方式:管理员核销
$('.verifying_wechat_ids').removeClass('hide');
break;
}
});
$(document).on('change','input[name="row[points_status]"]',function (){
var type=$(this).val();
switch (type){
case "1"://能活动积分
$('.points').removeClass('hide');
break;
case "2"://不能活动积分
$('.points').addClass('hide');
break;
}
});
$(document).on('change','input[name="row[certificate_enabled]"]',function (){
var type=$(this).val();
switch (type){
case "1"://启用单独证书
$('.certificate_data').removeClass('hide');
break;
case "2"://使用统一证书
$('.certificate_data').addClass('hide');
break;
}
});
}
}
};
return Controller;
});

View File

@@ -0,0 +1,97 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'wdsxh/activity/activity_apply/index' + location.search + '&activity_id=' + Config.activity_id,
add_url: 'wdsxh/activity/activity_apply/add?activity_id=' + Config.activity_id,
multi_url: 'wdsxh/activity/activity_apply/multi',
import_url: 'wdsxh/activity/activity_apply/import',
table: 'wdsxh_activity_apply',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
// {checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order_no', title: '订单号', operate: false},
{field: 'wechat.nickname', title: '用户昵称', operate: 'LIKE'},
{field: 'wechat.avatar', title: '用户头像', operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'wechat.mobile', title: '用户电话', operate: false},
{field: 'activity.name', title: __('Activity.name'), operate: 'LIKE'},
{field: 'activity.start_time', title: __('Activity.start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'activity.end_time', title: __('Activity.end_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'activity.fees', title: __('Activity.fees'), operate:'BETWEEN'},
{field: 'state', title: __('State'), searchList: {"1":__('State 1'),"2":__('State 2'),"3":__('State 3'),"4":__('State 4'),"5":__('State 5')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'pay_time', title: __('付款时间'), operate:false},
{field: 'is_sign_in', title: __('Is_sign_in'), searchList: {"1":__('Is_sign_in 1'),"2":__('Is_sign_in 2'),"3":__('Is_sign_in 3')}, formatter: Table.api.formatter.normal},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'field_data_details',
text: __('报名信息'),
title: __('报名信息'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa',
extend: 'data-area=["100%","100%"]',
url: 'wdsxh/activity/activity_apply/field_data_details',
visible: function (row) {
if(row.show_field_data == 1){
return true;
}else{
return false;
}
},
},
]
}
]
]
});
table.on('post-body.bs.table', function (e, settings, json, xhr) {
$(".btn-editone,.btn-edit,.btn-add").data("area", ["80%", "80%"]);
})
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
$(document).on('click','#select-user',function () {
Fast.api.open('wdsxh/member/member/activity_seluser?activity_id='+ Config.activity_id,'选择用户',{
area:['80%','95%'],
callback:function(data){
console.log(data);
if(data){
$('#c-uid').val(data.id);
$('#c-user').val(data.nickname);
}else{
Layer.alert("请选择用户");
}
}
});
});
},
field_data_details: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@@ -0,0 +1,14 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
config: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@@ -0,0 +1,39 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'clipboard', 'designer', 'jquery-contextMenu', 'jquery-form', 'jquery-lazyload', 'poster', 'wdsxh-colorpicker'], function ($, undefined, Backend, Table, Form, Clipboard, Designer, jqueryContextMenu, jqueryForm, jqueryLazyload, poster, colorpicker) {
var Controller = {
index: function () {
$(".panel-body").show()
$("#loading").hide()
$("#faupload-image").data("upload-success", function (data) {
var url = Fast.api.cdnurl(data.url);
$(".bg").prop("src", url);
});
Form.api.bindevent($("form[role=form]"), function (data, ret) {
Toastr.success("成功");
}, function (data, ret) {
Toastr.success("失败");
}, function (success, error) {
var data = getPosterData();
console.log(data)
$('#poster-data').val(JSON.stringify(data));
Form.api.submit(this, success, error);
return false;
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"), function (data, ret) {
Toastr.success("成功");
}, function (data, ret) {
Toastr.success("失败");
}, function (success, error) {
var data = getPosterData();
$('#poster-data').val(JSON.stringify(data));
Form.api.submit(this, success, error);
return false;
});
}
}
};
return Controller;
});

View File

@@ -0,0 +1,64 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'wdsxh/member/join_config/index' + location.search,
multi_url: 'wdsxh/member/join_config/multi',
table: 'wdsxh_member_join_config',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
{field: 'status', title: __('Status'), searchList: {"normal":__('Status normal'),"hidden":__('Status hidden')}, formatter: Table.api.formatter.status},
{field: 'weigh', title: __('Weigh'), operate: false},
{
field: 'operate',
width: "150px",
title: __('Operate'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'fieldset',
text: __('自定义登记字段'),
title: __('自定义登记字段'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
extend: 'data-area=["100%","100%"]',
url: 'wdsxh/member/join_config/fieldset',
}
],
formatter: Table.api.formatter.operate
},
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
fieldset: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@@ -0,0 +1,39 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'clipboard', 'designer', 'jquery-contextMenu', 'jquery-form', 'jquery-lazyload', 'poster', 'wdsxh-colorpicker'], function ($, undefined, Backend, Table, Form, Clipboard, Designer, jqueryContextMenu, jqueryForm, jqueryLazyload, poster, colorpicker) {
var Controller = {
index: function () {
$(".panel-body").show()
$("#loading").hide()
$("#faupload-image").data("upload-success", function (data) {
var url = Fast.api.cdnurl(data.url);
$(".bg").prop("src", url);
});
Form.api.bindevent($("form[role=form]"), function (data, ret) {
Toastr.success("成功");
}, function (data, ret) {
Toastr.success("失败");
}, function (success, error) {
var data = getPosterData();
console.log(data)
$('#poster-data').val(JSON.stringify(data));
Form.api.submit(this, success, error);
return false;
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"), function (data, ret) {
Toastr.success("成功");
}, function (data, ret) {
Toastr.success("失败");
}, function (success, error) {
var data = getPosterData();
$('#poster-data').val(JSON.stringify(data));
Form.api.submit(this, success, error);
return false;
});
}
}
};
return Controller;
});

View File

@@ -0,0 +1,122 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'wdsxh/activity/refund/index' + location.search,
// del_url: 'wdsxh/activity/refund/del',
table: 'wdsxh_activity_refund',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
// {checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order.order_no', title: '订单号', operate: 'LIKE'},
{field: 'activity.name', title: '活动名称', operate: 'LIKE'},
{field: 'wechat.nickname', title: '用户昵称', operate: 'LIKE'},
{field: 'wechat.avatar', title: '用户头像', operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'wechat.mobile', title: '用户电话', operate: 'LIKE'},
{field: 'activity.fees', title: '报名费用', operate: false},
{field: 'order.pay_amount', title: '退款费用', operate: false},
{field: 'state', title: __('State'), searchList: {"1":__('State 1'),"2":__('State 2'),"3":__('State 3')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'dispose_time', title: __('Dispose_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{
field: 'buttons',
width: "120px",
title: __('操作'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'agree',
text: __('确认退款'),
title: __('确认退款'),
classname: 'btn btn-xs btn-info btn-magic btn-ajax',
icon: 'fa fa-check',
url: 'wdsxh/activity/refund/agree',
confirm: '确认并同意退款?退款后费用将原路退回',
visible:function (row){
if(row.state == 1){
return true;
}else{
return false;
}
},
success: function (data, ret) {
$("#table").bootstrapTable('refresh',{});
},
error: function (data, ret) {
Toastr.error(ret.msg);
return false;
}
},
{
name: 'refuse',
text: __('拒绝退款'),
title: __('拒绝退款'),
classname: 'btn btn-xs btn-info btn-danger btn-dialog',
icon: 'fa fa-close',
url: 'wdsxh/activity/refund/refuse',
visible: function (row) {
if(row.state == 1){
return true;
}else{
return false;
}
},
success: function (data, ret) {
$(".btn-refresh").trigger("click");
return true;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
}
},
// {
// name: 'del',
// icon: 'fa fa-trash',
// title: __('删除'),
// text: __('删除'),
// extend: 'data-toggle="tooltip"',
// classname: 'btn btn-xs btn-danger btn-delone'
// }
],
formatter: Table.api.formatter.buttons
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
agree: function () {
Controller.api.bindevent();
},
refuse: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});