Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
ypt_mgw_local
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
苏星豪
ypt_mgw_local
Commits
3844966d
提交
3844966d
authored
7月 25, 2024
作者:
李思鑫
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add 人员投奖计划
上级
d75ec44e
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
488 行增加
和
1 行删除
+488
-1
urls.py
datacenter/urls.py
+7
-0
requirements.txt
requirements.txt
+0
-0
forms.py
sales/forms.py
+15
-0
models.py
sales/models.py
+21
-0
views.py
sales/views.py
+95
-0
left.html
templates/left.html
+3
-1
activity_person_lottery_plan.html
templates/sales/activity_person_lottery_plan.html
+128
-0
activity_person_lottery_plan_list.html
templates/sales/activity_person_lottery_plan_list.html
+219
-0
没有找到文件。
datacenter/urls.py
浏览文件 @
3844966d
...
@@ -540,6 +540,13 @@ urlpatterns = [
...
@@ -540,6 +540,13 @@ urlpatterns = [
url
(
r'^sales/activity/lottery_plan_delete/(?P<id>\d+)/$'
,
sal_views
.
activity_lottery_plan_delete
),
url
(
r'^sales/activity/lottery_plan_delete/(?P<id>\d+)/$'
,
sal_views
.
activity_lottery_plan_delete
),
url
(
r'^sales/activity/lottery_plan_batch_delete/$'
,
sal_views
.
activity_lottery_plan_batch_delete
),
url
(
r'^sales/activity/lottery_plan_batch_delete/$'
,
sal_views
.
activity_lottery_plan_batch_delete
),
#2024-7-23 lisin
url
(
r'^sales/activity/person_lottery_plan_list/$'
,
sal_views
.
activity_person_lottery_plan_list
),
url
(
r'^sales/activity/person_lottery_plan_edit/$'
,
sal_views
.
activity_person_lottery_plan_edit
),
url
(
r'^sales/activity/person_lottery_plan_edit/(?P<id>\d+)/$'
,
sal_views
.
activity_person_lottery_plan_edit
),
url
(
r'^sales/activity/person_lottery_plan_delete/(?P<id>\d+)/$'
,
sal_views
.
activity_person_lottery_plan_delete
),
url
(
r'^sales/activity/person_lottery_plan_batch_delete/$'
,
sal_views
.
activity_person_lottery_plan_batch_delete
),
url
(
r'^sales/kangnian_writeoff_page/$'
,
sal_views
.
kangnian_writeoff_page
),
url
(
r'^sales/kangnian_writeoff_page/$'
,
sal_views
.
kangnian_writeoff_page
),
...
...
requirements.txt
浏览文件 @
3844966d
B
amqp
==1.4.9
B
amqp
==1.4.9
...
...
sales/forms.py
浏览文件 @
3844966d
...
@@ -380,6 +380,21 @@ class Activity_Lottery_Plan_Form(ModelForm):
...
@@ -380,6 +380,21 @@ class Activity_Lottery_Plan_Form(ModelForm):
self
.
fields
[
'tm_end'
]
.
widget
.
attrs
[
'class'
]
=
"datetimepicker"
self
.
fields
[
'tm_end'
]
.
widget
.
attrs
[
'class'
]
=
"datetimepicker"
self
.
fields
[
'activity'
]
.
queryset
=
Activities
.
objects
.
filter
(
company_id
=
self
.
_user
.
company
.
id
)
self
.
fields
[
'activity'
]
.
queryset
=
Activities
.
objects
.
filter
(
company_id
=
self
.
_user
.
company
.
id
)
class
Activity_Person_Lottery_Plan_Form
(
ModelForm
):
class
Meta
:
model
=
Activity_Person_Lottery_Plan
fields
=
'__all__'
widgets
=
{
'company'
:
forms
.
HiddenInput
(),
'win_scan_num'
:
forms
.
HiddenInput
(),
}
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
_user
=
kwargs
.
pop
(
'user'
)
super
(
Activity_Person_Lottery_Plan_Form
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'tm_start'
]
.
widget
.
attrs
[
'class'
]
=
"datetimepicker"
self
.
fields
[
'tm_end'
]
.
widget
.
attrs
[
'class'
]
=
"datetimepicker"
self
.
fields
[
'activity'
]
.
queryset
=
Activities
.
objects
.
filter
(
company_id
=
self
.
_user
.
company
.
id
)
sales/models.py
浏览文件 @
3844966d
...
@@ -2844,6 +2844,27 @@ class Activity_Lottery_Plan(models.Model):
...
@@ -2844,6 +2844,27 @@ class Activity_Lottery_Plan(models.Model):
verbose_name
=
_
(
'活动抽奖计划'
)
verbose_name
=
_
(
'活动抽奖计划'
)
verbose_name_plural
=
_
(
'活动抽奖计划'
)
verbose_name_plural
=
_
(
'活动抽奖计划'
)
#2024-07 lisin
class
Activity_Person_Lottery_Plan
(
models
.
Model
):
company
=
models
.
ForeignKey
(
'company.Company'
,
verbose_name
=
_
(
'公司名称'
),
on_delete
=
models
.
CASCADE
)
activity
=
models
.
ForeignKey
(
Activities
,
verbose_name
=
_
(
'营销活动'
),
on_delete
=
models
.
CASCADE
)
award
=
models
.
ForeignKey
(
ActivityAwards
,
verbose_name
=
_
(
'奖品名称'
),
on_delete
=
models
.
CASCADE
)
tm_start
=
models
.
DateTimeField
(
_
(
'开始时间'
))
tm_end
=
models
.
DateTimeField
(
_
(
'结束时间'
))
batch_no
=
models
.
CharField
(
_
(
'批号'
),
max_length
=
50
,
blank
=
True
,
null
=
True
)
consumer_ids
=
ArrayField
(
models
.
IntegerField
(),
verbose_name
=
_
(
'指定消费者'
),
default
=
list
)
win_consumer_ids
=
ArrayField
(
models
.
IntegerField
(),
verbose_name
=
_
(
'已中奖消费者'
),
default
=
list
)
win_method
=
models
.
SmallIntegerField
(
_
(
'中奖方式'
),
choices
=
(
(
0
,
_
(
'只中一次'
)),
(
1
,
_
(
'每人都中'
))),
default
=
0
)
remark
=
models
.
CharField
(
_
(
'备注说明'
),
max_length
=
100
,
blank
=
True
,
null
=
True
)
tm
=
models
.
DateTimeField
(
_
(
'时间'
),
auto_now_add
=
True
)
# win_scan_num=models.IntegerField(_('第几次扫码中奖'))
class
Meta
:
verbose_name
=
_
(
'活动人员抽奖计划'
)
verbose_name_plural
=
_
(
'活动人员抽奖计划'
)
class
Points_Write_Off_Award
(
models
.
Model
):
class
Points_Write_Off_Award
(
models
.
Model
):
ancestor
=
models
.
ForeignKey
(
'company.Company'
,
verbose_name
=
_
(
'祖籍公司'
),
on_delete
=
models
.
CASCADE
)
ancestor
=
models
.
ForeignKey
(
'company.Company'
,
verbose_name
=
_
(
'祖籍公司'
),
on_delete
=
models
.
CASCADE
)
level
=
models
.
ForeignKey
(
'company.Level'
,
verbose_name
=
_
(
'公司层级'
),
on_delete
=
models
.
CASCADE
,
default
=
1
)
level
=
models
.
ForeignKey
(
'company.Level'
,
verbose_name
=
_
(
'公司层级'
),
on_delete
=
models
.
CASCADE
,
default
=
1
)
...
...
sales/views.py
浏览文件 @
3844966d
...
@@ -9747,7 +9747,102 @@ def activity_lottery_plan_batch_delete(request):
...
@@ -9747,7 +9747,102 @@ def activity_lottery_plan_batch_delete(request):
if
obj
:
if
obj
:
obj
.
delete
()
obj
.
delete
()
return
JsonResponse
(
data
)
return
JsonResponse
(
data
)
#2024-07 lisin
#人员投奖计划
@login_required
def
activity_person_lottery_plan_list
(
request
):
data
=
{
'data'
:
[],
'clmns'
:
[],
'e'
:
[],
'subtt'
:
[
'营销活动'
,
'人员投奖计划'
],
'murl'
:
''
,
'dt'
:
True
,
'add'
:
True
}
data
[
'murl'
]
=
'/sales/activity/person_lottery_plan_edit'
dt
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
dt_fr
=
request
.
GET
.
get
(
'date_from'
,
dt
)
dt_to
=
request
.
GET
.
get
(
' '
,
dt
)
data
[
"date_from"
]
=
dt_fr
data
[
"date_to"
]
=
dt_to
dt_to
=
(
datetime
.
datetime
.
now
()
+
datetime
.
timedelta
(
days
=
1
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
f
=
"company_id = "
+
str
(
request
.
user
.
company
.
id
)
+
" and tm>='"
+
dt_fr
+
"' and tm <='"
+
dt_to
+
"'"
cur
=
connection
.
cursor
()
cur
.
execute
(
"select id, (select name from sales_activities WHERE id = activity_id),"
+
"(select name from sales_activityawards WHERE id = a.award_id),"
+
"to_char(tm_start,'yyyy-mm-dd HH24:MI:SS'), to_char(tm_end,'yyyy-mm-dd HH24:MI:SS'), coalesce(batch_no,''), win_method, coalesce(remark,''), to_char(tm,'yyyy-mm-dd HH24:MI:SS') "
+
"FROM sales_activity_person_lottery_plan a where "
+
f
)
rs
=
cur
.
fetchall
()
for
r
in
rs
:
lottery
=
Activity_Person_Lottery_Plan
.
objects
.
get
(
id
=
r
[
0
])
check_box
=
'<input class="checkchild" value="'
+
str
(
r
[
0
])
+
'" type="checkbox">'
print
(
'person'
,
r
,)
data
[
'data'
]
.
append
([
check_box
,
r
[
1
],
r
[
2
],
r
[
3
],
r
[
4
],
r
[
5
],
lottery
.
get_win_method_display
(),
r
[
7
],
r
[
8
],
"<button class='btn btn-danger btn-xs' onclick='deleteItem("
+
str
(
r
[
0
])
+
")'>删除</button>"
])
return
render
(
request
,
'sales/activity_person_lottery_plan_list.html'
,
data
)
@login_required
def
activity_person_lottery_plan_edit
(
request
,
id
=
None
):
if
id
:
obj
=
Activity_Person_Lottery_Plan
.
objects
.
get
(
id
=
int
(
id
))
else
:
obj
=
Activity_Person_Lottery_Plan
(
company_id
=
request
.
user
.
company
.
id
)
if
request
.
method
==
'GET'
:
form
=
Activity_Person_Lottery_Plan_Form
(
instance
=
obj
,
user
=
request
.
user
)
else
:
form
=
Activity_Person_Lottery_Plan_Form
(
instance
=
obj
,
user
=
request
.
user
)
activity
=
request
.
POST
.
get
(
'activity'
,
''
)
tm_start
=
request
.
POST
.
get
(
'tm_start'
,
''
)
tm_end
=
request
.
POST
.
get
(
'tm_end'
,
''
)
award
=
request
.
POST
.
get
(
'award'
,
''
)
remark
=
request
.
POST
.
get
(
'remark'
,
''
)
batch_no
=
request
.
POST
.
get
(
'batch_no'
,
None
)
win_method
=
request
.
POST
.
get
(
'win_method'
,
None
)
company_id
=
request
.
user
.
company
.
id
if
tm_start
and
tm_end
and
activity
and
award
:
obj
=
Activity_Person_Lottery_Plan
()
obj
.
company_id
=
company_id
obj
.
activity_id
=
activity
obj
.
tm_start
=
tm_start
obj
.
tm_end
=
tm_end
obj
.
award_id
=
award
obj
.
remark
=
remark
obj
.
batch_no
=
batch_no
obj
.
win_method
=
win_method
obj
.
save
()
return
render
(
request
,
'sales/activity_person_lottery_plan.html'
,
{
'form'
:
form
})
@login_required
def
activity_person_lottery_plan_delete
(
request
,
id
=
None
):
if
id
:
obj
=
Activity_Person_Lottery_Plan
.
objects
.
get
(
id
=
int
(
id
),
company_id
=
request
.
user
.
company
.
id
)
obj
.
delete
()
return
redirect
(
'/sales/activity/person_lottery_plan_list/'
)
@login_required
def
activity_person_lottery_plan_batch_delete
(
request
):
data
=
{
'e'
:
''
}
if
request
.
method
==
'POST'
:
ids
=
request
.
POST
.
get
(
'ids'
,
''
)
if
ids
:
ids
=
ids
.
split
(
','
)
else
:
ids
=
[]
for
id
in
ids
:
obj
=
Activity_Person_Lottery_Plan
.
objects
.
get
(
id
=
int
(
id
),
company_id
=
request
.
user
.
company
.
id
)
if
obj
:
obj
.
delete
()
return
JsonResponse
(
data
)
def
test_consumer_winner_hit
(
request
):
def
test_consumer_winner_hit
(
request
):
data
=
{
'e'
:
''
}
data
=
{
'e'
:
''
}
winner_id
=
request
.
GET
.
get
(
'winner_id'
,
''
)
winner_id
=
request
.
GET
.
get
(
'winner_id'
,
''
)
...
...
templates/left.html
浏览文件 @
3844966d
...
@@ -731,7 +731,9 @@
...
@@ -731,7 +731,9 @@
<li><a
class=
'l-a'
href=
"/obj/list/sales_voidlabel/"
>
{% trans '失效标签' %}
</a></li>
<li><a
class=
'l-a'
href=
"/obj/list/sales_voidlabel/"
>
{% trans '失效标签' %}
</a></li>
{% endifequal %}
{% endifequal %}
<li><a
class=
'l-a'
href=
"/sales/activity/lottery_plan_list/"
>
{% trans '投奖计划' %}
</a></li>
<li><a
class=
'l-a'
href=
"/sales/activity/lottery_plan_list/"
>
{% trans '投奖计划' %}
</a></li>
{% ifequal user.company.id 145564 %}
<li><a
class=
'l-a'
href=
"/sales/activity/person_lottery_plan_list/"
>
{% trans '人员投奖计划' %}
</a></li>
{% endifequal %}
</ul>
</ul>
</li>
</li>
{% endifequal %}
{% endifequal %}
...
...
templates/sales/activity_person_lottery_plan.html
0 → 100644
浏览文件 @
3844966d
{% extends 'obj_form.html' %}
{% load i18n %}
{% load tj_filters %}
{% block subtitle-1 %}
{% trans "营销活动" %}
{% endblock %}
{% block subtitle-2 %}
{% trans "人员投奖计划" %}
{% endblock %}
{% block form_content %}
{{ block.super }}
<style>
input
[
type
=
radio
],
input
[
type
=
checkbox
]
{
display
:
inline-block
;
width
:
auto
;
height
:
auto
;
border
:
none
;
box-shadow
:
none
;
}
.input-num
{
display
:
inline-block
;
width
:
100px
;
border
:
none
;
border-bottom
:
1px
solid
gray
;
}
</style>
<div
class=
"alert alert-success"
role=
"alert"
style=
"display: none"
>
保存成功!
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'batch_no' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.batch_no }}
</div>
</div>
<div
class=
"form-group "
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'activity' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.activity }}
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'award' %}
</label>
<div
class=
"col-sm-10"
>
<select
class=
"form-control"
name=
"award"
id=
"awards_select"
></select
/
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'tm_start' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.tm_start }}
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'tm_end' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.tm_end }}
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'win_method' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.win_method }}
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'remark' %}
</label>
<div
class=
"col-sm-10"
>
{{ form.remark }}
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label "
>
{% get_verbose_field_name form.instance 'consumer_ids' %}
</label>
<ul>
{% for id in form.consumer_ids %}
<li>
{{ id }}
</li>
{% empty %}
<label
class=
"col-sm-2 control-label"
>
{% trans "添加opendi" %}
</label>
<input
type=
"text"
name=
"id"
class=
"col-sm-10"
/>
{% endfor %}
</ul>
</div>
<div>
<a
class=
"btn btn-primary btn-save"
type=
"submit"
style=
"float:right;"
>
{% trans '保存' %}
</a>
</div>
<script>
$
(
document
).
ready
(
function
()
{
setDatePickerZh
();
$
(
'.datetimepicker'
).
datetimepicker
({
i18n
:{
zh
:{
months
:[
'一月'
,
'二月'
,
'三月'
,
'四月'
,
'五月'
,
'六月'
,
'七月'
,
'八月'
,
'九月'
,
'十月'
,
'十一月'
,
'十二月'
,],
dayOfWeek
:[
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
,
"日"
,]
}
},
//timepicker:true,
format
:
'Y-m-d H:i:s'
,
});
$
(
"#id_activity"
).
change
(
function
(){
var
activity_id
=
$
(
this
).
val
();
$
.
ajax
({
url
:
'obj/ajax/autoselect/activityawards/?id='
+
activity_id
,
success
:
function
(
res
){
console
.
log
(
res
);
var
html
=
''
;
for
(
var
i
=
0
;
i
<
res
.
length
;
i
++
){
html
+=
'<option value="'
+
res
[
i
].
value
+
'">'
+
res
[
i
].
label
+
'</option>'
;
}
$
(
"#awards_select"
).
html
(
html
);
}
})
})
$
(
'.btn-save'
).
click
(
function
()
{
$
.
SubmitForm
(
'#obj_form form'
,
'{{request.path}}'
,
function
(){
//$('.alert').fadeIn();
});
});
})
</script>
{% endblock %}
\ No newline at end of file
templates/sales/activity_person_lottery_plan_list.html
0 → 100644
浏览文件 @
3844966d
{% load i18n %}
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
var
page_length
=
10
;
var
value
=
[]
var
table
=
$
(
'#tb'
).
DataTable
({
dom
:
'Bfrtip'
,
autoWidth
:
true
,
pageLength
:
page_length
,
buttons
:
[{
extend
:
'excelHtml5'
,
text
:
'导出到Excel'
}],
language
:
lng
,
data
:{{
data
|
safe
}}
});
table
.
columns
().
every
(
function
()
{
var
that
=
this
;
$
(
'input'
,
this
.
footer
()
).
on
(
'keyup change clear'
,
function
()
{
if
(
that
.
search
()
!==
this
.
value
)
{
that
.
search
(
this
.
value
).
draw
();
}
});
});
$
(
'#data-content .btn-obj-add'
).
click
(
function
(){
event
.
preventDefault
();
$
.
RefreshContent
(
$
(
this
).
attr
(
'href'
));
});
{
%
if
dt
%
}
$
(
'.datepicker'
).
datepicker
({
dateFormat
:
'yy-mm-dd'
});
$
(
'.datepicker'
).
datepicker
(
'setDate'
,
new
Date
());
setDatePickerZh
();
$
(
'#dt_fr'
).
val
(
'{{date_from}}'
);
$
(
'#dt_to'
).
val
(
'{{date_to}}'
);
$
(
'.btn-qry'
).
click
(
function
(){
var
date_from
,
date_to
;
date_fr
=
$
(
'#dt_fr'
).
val
();
date_to
=
$
(
'#dt_to'
).
val
();
var
params
=
[];
if
(
date_fr
!=
''
){
params
.
push
(
'date_from='
+
date_fr
)};
if
(
date_to
!=
''
){
params
.
push
(
'date_to='
+
date_to
)};
if
(
params
.
length
==
0
){
bootbox
.
alert
(
"{% trans '请先输入查询条件!'%}"
);
}
else
{
$
.
RefreshContent
(
'{{request.path}}?'
+
params
.
join
(
'&'
));
}
});
{
%
endif
%
}
$
(
".checkall"
).
on
(
'click'
,
function
()
{
var
list_before
=
$
(
'.checkchild'
)
for
(
var
i
=
0
;
i
<
list_before
.
length
;
i
++
)
{
if
(
list_before
[
i
].
checked
)
{
$
(
".checkchild"
).
prop
(
"checked"
,
false
);
break
;
}
else
{
$
(
".checkchild"
).
prop
(
"checked"
,
true
);
break
;
}
}
var
list
=
$
(
'.checkchild'
)
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
checked
)
{
if
(
value
.
indexOf
(
parseInt
(
list
[
i
].
value
))
!=-
1
)
{
{
#
value
.
push
(
parseInt
(
list
[
i
].
value
))
#
}
}
else
{
value
.
push
(
parseInt
(
list
[
i
].
value
))
}
}
else
{
if
(
$
.
inArray
(
parseInt
(
list
[
i
].
value
),
value
)
==
-
1
)
{
//$.inArray(元素, 数组) == -1 表示要删除的元素不在原数组中
}
else
{
value
.
splice
(
$
.
inArray
(
parseInt
(
list
[
i
].
value
),
value
),
1
);
}
$
(
".checkchild"
).
prop
(
"checked"
,
false
);
}
}
});
$
(
"#tb"
).
on
(
'click'
,
'.checkchild'
,
function
(
e
){
var
check
=
$
(
this
).
prop
(
"checked"
);
if
(
check
){
if
(
value
.
indexOf
(
parseInt
(
this
.
value
))){
value
.
push
(
parseInt
(
this
.
value
))
}
}
else
{
if
(
$
.
inArray
(
parseInt
(
this
.
value
),
value
)
==
-
1
){
//$.inArray(元素, 数组) == -1 表示要删除的元素不在原数组中
}
else
{
value
.
splice
(
$
.
inArray
(
parseInt
(
this
.
value
),
value
),
1
);
}
}
})
var
url
=
'sales/activity/person_lottery_plan_batch_delete/'
;
$
(
'.btn-delete-all'
).
click
(
function
()
{
if
(
value
.
length
>
0
)
{
var
r
=
confirm
(
'您确定要删除吗?'
);
if
(
r
)
{
console
.
log
(
value
)
$
.
ajax
({
type
:
'post'
,
url
:
url
,
data
:
{
ids
:
value
.
join
(
','
),
delflag
:
1
},
success
:
function
(
html
)
{
table
.
draw
();
$
.
RefreshContent
(
'/sales/activity/person_lottery_plan_list/'
)
{
#
$
(
'#bg-modal .modal-body'
).
html
(
html
);
#
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
alert
(
'连接服务器失败'
);
}
})
}
}
else
{
alert
(
'请勾选需要删除的内容!'
)
}
})
});
function
deleteItem
(
id
){
var
r
=
confirm
(
'您确定要删除吗?'
);
if
(
r
){
var
durl
=
'/sales/activity/person_lottery_plan_delete/'
+
id
+
'/'
$
.
RefreshContent
(
durl
);
}
}
</script>
<ol
class=
"breadcrumb"
>
<li>
{{subtt.0}}
</li>
<li>
{{subtt.1}}
</li>
</ol>
{% if perms.company.sys_admin %}
<div
class=
"title_right"
>
<div
class=
"pull-right"
>
<span
class=
'input-group'
>
<a
type=
"button"
class=
'btn btn-obj-add l-a create-btn'
href=
'/sales/activity/person_lottery_plan_edit'
>
<span
class=
'glyphicon glyphicon-plus'
style=
'padding-right:5px;'
></span>
{% trans '新建人员投奖计划' %}
</a>
</span>
</div>
</div>
{% endif%}
{% if dt %}
<form
role=
"form"
class=
"form-inline"
style=
"margin-top:0px;padding-left:10px;"
>
<div
class=
"col-sm-2 input-group"
>
<span
class=
"input-group-addon"
>
{% trans "开始日期"%}
</span>
<input
class=
"datepicker form-control"
id=
"dt_fr"
/>
</div>
<div
class=
"col-sm-2 input-group"
>
<span
class=
"input-group-addon"
>
{% trans "结束日期"%}
</span>
<input
class=
"datepicker form-control"
id=
"dt_to"
/>
</div>
<div
class=
"col-sm-2 input-group"
>
<span
class=
'input-group-btn'
>
<a
type=
"button"
class=
'btn btn-primary btn-qry'
>
<span
class=
'glyphicon glyphicon-search'
style=
'padding-right:5px;'
></span>
{% trans '查找' %}
</a>
</span>
</div>
</form>
<div
class=
"clearfix"
></div>
{% endif %}
<div
class=
"col-md-12 col-sm-12 col-xs-12"
>
<div
class=
"x_panel"
>
<div
class=
"table-responsive"
>
<h4>
明细
</h4>
<table
id=
'tb'
class=
"table table-striped table-bordered dt-responsive nowrap"
cellspacing=
"0"
width=
"100%"
>
<thead>
<tr>
<th>
<input
type=
"checkbox"
class =
"checkall"
id=
"group_checkbox"
style=
"display: none;"
/><label
for=
"group_checkbox"
>
全选/反选
</label>
</th>
<th>
活动名称
</th>
<th>
奖品
</th>
<th>
开始时间
</th>
<th>
结束时间
</th>
<th>
批次号
</th>
<th>
中奖方式
</th>
<th>
备注
</th>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<th><span
class=
"btn btn-sm btn-danger btn-delete-all"
>
批量删除
</span></th>
<th><input
type=
"text"
placeholder=
"活动名称"
></th>
<th><input
type=
"text"
placeholder=
"奖品"
></th>
<th><input
type=
"text"
placeholder=
"开始时间"
></th>
<th><input
type=
"text"
placeholder=
"结束时间"
></th>
<th><input
type=
"text"
placeholder=
"批次号"
></th>
<th><input
type=
"text"
placeholder=
"中奖方式"
></th>
<th><input
type=
"text"
placeholder=
"备注"
></th>
<th><input
type=
"text"
placeholder=
"创建时间"
></th>
<th><input
type=
"text"
placeholder=
"操作"
></th>
</tfoot>
</table>
</div>
</div>
</div>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论