Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xxmp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chan
xxmp
Commits
0b6a33ab
Commit
0b6a33ab
authored
May 06, 2019
by
chenzq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加execl文件导入
parent
1760d83d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
4 deletions
+91
-4
cardsv2.inc.php
addons/longbing_company/inc/wxapp/cardsv2.inc.php
+1
-1
cardEdit.html
addons/longbing_company/template/manage/cardEdit.html
+2
-2
company.html
addons/longbing_company/template/manage/company.html
+61
-1
wxapp.php
addons/longbing_company/wxapp.php
+27
-0
No files found.
addons/longbing_company/inc/wxapp/cardsv2.inc.php
View file @
0b6a33ab
...
@@ -47,7 +47,7 @@ if ($keyword) {
...
@@ -47,7 +47,7 @@ if ($keyword) {
else
{
else
{
$where
[
'to_uid !='
]
=
$uid
;
$where
[
'to_uid !='
]
=
$uid
;
}
}
//添加分公司的地址筛选
$province
=
pdo_getall
(
'sys_region'
,
array
(
'parent_id'
=>
1
));
$province
=
pdo_getall
(
'sys_region'
,
array
(
'parent_id'
=>
1
));
$parent_id
=
isset
(
$_GPC
[
"agency_id"
])
?
$_GPC
[
"agency_id"
]
:
1
;
$parent_id
=
isset
(
$_GPC
[
"agency_id"
])
?
$_GPC
[
"agency_id"
]
:
1
;
//$city= pdo_getall('sys_region',array('agency_id'=>$agency_id));
//$city= pdo_getall('sys_region',array('agency_id'=>$agency_id));
...
...
addons/longbing_company/template/manage/cardEdit.html
View file @
0b6a33ab
...
@@ -71,8 +71,8 @@
...
@@ -71,8 +71,8 @@
<label
class=
"layui-form-label"
>
头像
</label>
<label
class=
"layui-form-label"
>
头像
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
{php echo tpl_form_field_image('avatar', $info['avatar']);}
{php echo tpl_form_field_image('avatar', $info['avatar']);}
<span
class=
"span-remark"
>
图片建议尺寸: 750 * 750
</span>
<span
class=
"span-remark"
>
图片建议尺寸: 750 * 750
</span>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
...
addons/longbing_company/template/manage/company.html
View file @
0b6a33ab
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
<i
class=
"layui-icon"
>

</i>
添加公司
<i
class=
"layui-icon"
>

</i>
添加公司
</a>
</a>
<form
class=
"form-inline"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
style=
"display: inline-block;width: 50%"
>
<div
class=
"form-group"
style=
"display: inline-block;width: 50%"
>
<label
class=
"sr-only"
></label>
<label
class=
"sr-only"
></label>
...
@@ -37,8 +39,15 @@
...
@@ -37,8 +39,15 @@
<button
class=
"layui-btn layui-btn-normal btn-search"
type=
"button"
>
<button
class=
"layui-btn layui-btn-normal btn-search"
type=
"button"
>
搜索
搜索
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-danger btn-import-order"
style=
"float: left"
>
导入excel
</button>
</form>
</form>
</div>
</div>
<table
class=
"layui-table"
>
<table
class=
"layui-table"
>
...
@@ -223,7 +232,58 @@
...
@@ -223,7 +232,58 @@
var
url
=
"{php echo $this->createWebUrl('manage/companyedit')}"
+
"&id="
+
id
;
var
url
=
"{php echo $this->createWebUrl('manage/companyedit')}"
+
"&id="
+
id
;
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
});
});
// 点击上传
$
(
'.btn-import-order'
).
click
(
function
()
{
layer
.
open
({
type
:
1
,
title
:
false
,
closeBtn
:
0
,
shadeClose
:
true
,
skin
:
'yourClass'
,
content
:
'<div style="padding: 20px; width: 260px; height: 50px;">'
+
'<input type="file" class="layui-input" value="" name="file" id="import_file" onchange="btnUpload(this)">'
+
'</div>'
+
'<input type="submit" class="layui-input" >'
});
});
// 提交
var
uploading
;
function
btnUpload
(
obj
)
{
if
(
uploading
){
alert
(
"文件正在上传中,请稍候"
);
return
false
;
}
layer
.
load
();
file
=
obj
.
files
[
0
]
var
form
=
new
FormData
();
// FormData 对象
form
.
append
(
"file"
,
file
);
form
.
append
(
"action"
,
"import"
);
var
url
=
"{php echo $this->createWebUrl('manage/excel')}"
;
$
.
ajax
({
url
:
url
,
type
:
'POST'
,
cache
:
false
,
data
:
form
,
processData
:
false
,
contentType
:
false
,
dataType
:
"json"
,
beforeSend
:
function
(){
uploading
=
true
;
},
success
:
function
(
data
)
{
alert
(
data
.
message
);
//layer.msg(data.message);
uploading
=
false
;
layer
.
closeAll
();
}
});
return
false
;
}
</script>
</script>
<script
src=
"../../../addons/{$module_name}/images/js/main.js"
></script>
<script
src=
"../../../addons/{$module_name}/images/js/main.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
addons/longbing_company/wxapp.php
View file @
0b6a33ab
...
@@ -460,8 +460,34 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -460,8 +460,34 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
$sql
=
"select * from "
.
tablename
(
'sys_region'
)
.
" where parent_id ="
.
$parent_id
;
$sql
=
"select * from "
.
tablename
(
'sys_region'
)
.
" where parent_id ="
.
$parent_id
;
$list
=
pdo_fetchall
(
$sql
);
$list
=
pdo_fetchall
(
$sql
);
return
$this
->
result
(
0
,
''
,
$list
);
return
$this
->
result
(
0
,
''
,
$list
);
// $province = pdo_getall('sys_region',array('parent_id'=> 1));
// $parent_id = isset($_GPC["agency_id"])?$_GPC["agency_id"]:1;
////$city= pdo_getall('sys_region',array('agency_id'=>$agency_id));
// $type=pdo_getall('sys_region',array('parent_id'=>$parent_id,'type'=>2));
// $city_id = isset($_GPC["id"])?$_GPC["id"]:1;
// $company_first = pdo_getall('longbing_company_company', array('uniacid' => $_W['uniacid'], 'status' => 1,'city'=>$city_id));
// $data = array(
// 'pro'=>array(
// 'province'=>$province,
// 'ci'=>array(
// 'city'=> $type,
// 'com'=>array(
// 'company' => $company_first
// )
// )
// )
// );
// return $this->result(0, '', $data);
}
}
public
function
doPageCardV2
()
public
function
doPageCardV2
()
{
{
$this
->
cross
();
$this
->
cross
();
...
@@ -5485,6 +5511,7 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
...
@@ -5485,6 +5511,7 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
if
(
$info
[
'is_staff'
]
!=
1
)
{
if
(
$info
[
'is_staff'
]
!=
1
)
{
}
}
$user_info
=
pdo_get
(
'longbing_company_user_info'
,
array
(
'fans_id'
=>
$uid
));
$user_info
=
pdo_get
(
'longbing_company_user_info'
,
array
(
'fans_id'
=>
$uid
));
$user_info
[
'avatar'
]
=
tomedia
(
$user_info
[
'avatar'
]);
$user_info
[
'avatar'
]
=
tomedia
(
$user_info
[
'avatar'
]);
$user_info
[
'voice'
]
=
tomedia
(
$user_info
[
'voice'
]);
$user_info
[
'voice'
]
=
tomedia
(
$user_info
[
'voice'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment