Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
ypt_mgw_local
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
苏星豪
ypt_mgw_local
Commits
dce2b030
提交
dce2b030
authored
9月 27, 2024
作者:
李思鑫
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
诗仙太白经销商导入 个性化
上级
b4aaf756
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
181 行增加
和
0 行删除
+181
-0
views.py
company/views.py
+0
-0
urls.py
datacenter/urls.py
+1
-0
company_upload_sxtb.html
templates/company/company_upload_sxtb.html
+180
-0
没有找到文件。
company/views.py
浏览文件 @
dce2b030
差异被折叠。
点击展开。
datacenter/urls.py
浏览文件 @
dce2b030
...
@@ -1166,6 +1166,7 @@ urlpatterns = [
...
@@ -1166,6 +1166,7 @@ urlpatterns = [
url
(
r'^company/test/add_user/$'
,
company_views
.
test_add_user
),
url
(
r'^company/test/add_user/$'
,
company_views
.
test_add_user
),
url
(
r'^company/list/$'
,
sal_views
.
company_list
),
url
(
r'^company/list/$'
,
sal_views
.
company_list
),
url
(
r'^company/use_excel_upload_companies/$'
,
company_views
.
use_excel_upload_companies
),
url
(
r'^company/use_excel_upload_companies/$'
,
company_views
.
use_excel_upload_companies
),
url
(
r'^company/use_excel_upload_companies/sxtb/$'
,
company_views
.
use_excel_upload_companies_sxtb
),
#lisin 2024-09-27 诗仙太白经销商导入
url
(
r'^test/send_hb/$'
,
wx_views
.
test_send_hb
),
url
(
r'^test/send_hb/$'
,
wx_views
.
test_send_hb
),
url
(
r'^test/consumer_winner_hit/$'
,
sal_views
.
test_consumer_winner_hit
),
url
(
r'^test/consumer_winner_hit/$'
,
sal_views
.
test_consumer_winner_hit
),
...
...
templates/company/company_upload_sxtb.html
0 → 100644
浏览文件 @
dce2b030
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
var
page_length
=
10
;
$
(
"#btn_upload"
).
click
(
function
(){
var
files
=
document
.
getElementById
(
'input_file'
).
files
;
if
(
files
.
length
>
0
){
var
file
=
files
[
0
];
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
$
.
ajax
({
type
:
'post'
,
url
:
'/company/use_excel_upload_companies/sxtb/'
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
cache
:
false
,
success
:
function
(
res
){
if
(
res
.
e
===
''
){
toastr
.
success
(
"导入成功"
,
"操作提示:"
,
{
timeOut
:
800
,
positionClass
:
"toast-center-center"
}
);
if
(
res
.
repeatAgent
.
length
>
0
){
$
(
"#tb_agent"
).
fadeIn
();
initTable
(
"#tb_agent table"
,
res
.
repeatAgent
)
}
if
(
res
.
repeatUser
.
length
>
0
){
$
(
"#tb_user"
).
fadeIn
();
initTable
(
"#tb_user table"
,
res
.
repeatUser
)
}
}
else
{
toastError
(
res
.
e
)
}
},
error
:
function
(){
toastError
(
'网络超时'
)
}
})
}
else
{
toastError
(
'请选择上传文件'
)
}
})
function
toastError
(
text
){
toastr
.
error
(
text
,
"操作错误:"
,
{
timeOut
:
800
,
positionClass
:
"toast-center-center"
}
);
}
function
initTable
(
el
,
data
)
{
var
tb
=
$
(
el
).
DataTable
({
dom
:
'Bfrtip'
,
autoWidth
:
true
,
destroy
:
true
,
pageLength
:
page_length
,
buttons
:
[{
extend
:
'excelHtml5'
,
text
:
'导出到Excel'
}],
language
:
lng
,
data
,
drawCallback
:
function
()
{
},
createdRow
:
function
(
nRow
,
aData
,
iDataIndex
)
{
}
});
tb
.
columns
().
every
(
function
()
{
var
that
=
this
;
$
(
'input'
,
this
.
footer
()).
on
(
'keyup change clear'
,
function
()
{
if
(
that
.
search
()
!==
this
.
value
)
{
that
.
search
(
this
.
value
).
draw
();
}
});
});
}
})
</script>
<ol
class=
"breadcrumb"
>
<li>
经销商管理
</li>
<li>
经销商导入
</li>
</ol>
<div>
<!--<button class="btn btn-primary" id="btn_down">模板下载</button>-->
<input
type=
"file"
id=
"input_file"
><button
class=
"btn btn-primary"
id=
"btn_upload"
>
上传
</button>
<div
id=
'tb_agent'
style=
"display:none;margin-top:20px"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
存在重复的经销商数据
</h3>
</div>
<div
class=
"panel-body"
>
<div
class=
'col-md-12 form-group'
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered dt-responsive nowrap tb"
cellspacing=
"0"
width=
"100%"
>
<thead>
<tr>
<th>
经销商名称
</th>
<th>
经销商级别
</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><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>
<th><input
type=
"text"
placeholder=
"经销商电话"
></th>
<th><input
type=
"text"
placeholder=
"联系人"
></th>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<div
id=
'tb_user'
style=
"display:none;margin-top:20px"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
存在重复的用户帐号数据
</h3>
</div>
<div
class=
"panel-body"
>
<div
class=
'col-md-12 form-group'
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered dt-responsive nowrap tb"
cellspacing=
"0"
width=
"100%"
>
<thead>
<tr>
<th>
帐号
</th>
<th>
经销商
</th>
<th>
注册时间
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<th><input
type=
"text"
placeholder=
"帐号"
></th>
<th><input
type=
"text"
placeholder=
"经销商"
></th>
<th><input
type=
"text"
placeholder=
"注册时间"
></th>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论