Toggle navigation
This project
Loading...
Sign in
najixian
/
xt_dc_admin
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Download as
Email Patches
Plain Diff
Browse Files
Commit
d4d3e3d8f2329ca2b9138d86e4d5b077ae7ed305
Authored by
teemitop
2019-03-06 18:50:23 +0800
1 parent
d91ec243
build: skipped
PC维护商家基本数据
Changes
4
Builds
0
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
4 deletions
application/admin/controller/Operational.php
application/admin/controller/Seller.php
application/admin/view/operational/messagelist.html
application/admin/view/seller/seller_list.html
application/admin/controller/Operational.php
0 → 100644
View file @
d4d3e3d
<?php
namespace
app\admin\controller
;
use
think\Db
;
use
think\facade\Request
;
class
Operational
extends
Common
{
/********************************可发送消息列表*******************************/
//打印机型号列表
public
function
messagelist
(
$sys_id
=
1
){
if
(
Request
::
isAjax
())
{
$list
=
file_get_contents
(
ON_LINE
.
'App.Prints.QueryPrintsList'
);
$array
=
json_decode
(
$list
,
TRUE
);
foreach
(
$array
[
'data'
]
as
$key
=>
$value
)
{
if
(
$value
[
'type'
]
==
1
)
$array
[
'data'
][
$key
][
'type'
]
=
'50'
;
elseif
(
$value
[
'type'
]
==
2
)
$array
[
'data'
][
$key
][
'type'
]
=
'80'
;
$array
[
'data'
][
$key
][
'cdate'
]
=
date
(
'Y-m-d H:i:s'
,
$value
[
'cdate'
]);
}
return
$result
=
[
'code'
=>
0
,
'msg'
=>
'获取成功!'
,
'data'
=>
$array
[
'data'
],
'rel'
=>
1
];
}
$this
->
assign
(
'title'
,
'打印机型号列表'
);
return
$this
->
fetch
();
}
}
...
...
application/admin/controller/Seller.php
View file @
d4d3e3d
...
...
@@ -211,4 +211,25 @@ class Seller extends Common
$this
->
assign
(
'title'
,
'商户菜品配置'
);
return
$this
->
fetch
();
}
/**
* 停用商家
*/
public
function
setsellerconfig
(){
if
(
Request
::
isAjax
()){
$data
=
Request
::
except
(
'file'
);
$data
[
'status'
]
=
$data
[
'status'
]
?
0
:
1
;
$list
=
file_get_contents
(
ON_LINE
.
'App.Seller.SetSellerConfigByPC&sid='
.
$data
[
'sellerid'
]
.
'&field='
.
$data
[
'field'
]
.
'&value='
.
$data
[
'value'
]);
$array
=
json_decode
(
$list
,
TRUE
);
if
(
$array
[
'ret'
]
==
200
){
$result
[
'code'
]
=
1
;
$result
[
'msg'
]
=
'SUCCESS!'
;
}
else
{
$result
[
'code'
]
=
0
;
$result
[
'msg'
]
=
'请求错误!'
;
}
return
$result
;
}
return
view
();
}
}
...
...
application/admin/view/operational/messagelist.html
0 → 100644
View file @
d4d3e3d
{include file="common/head"/}
<form
class=
"layui-form layui-form-pane"
>
<div
class=
"admin-main layui-anim layui-anim-upbit"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
{:$title}
</legend>
</fieldset>
<div
class=
"demoTable"
>
商家:
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"key"
id=
"key"
placeholder=
"{:lang('pleaseEnter')}店铺名称"
autocomplete=
"off"
>
</div>
给谁发:
<div
class=
"layui-input-inline"
>
<input
type=
"checkbox"
name=
"role[write]"
lay-skin=
"primary"
title=
"客户经理"
>
<input
type=
"checkbox"
name=
"role[read]"
lay-skin=
"primary"
title=
"老板"
>
<input
type=
"checkbox"
name=
"role[game]"
lay-skin=
"primary"
title=
"前台"
>
</div>
商家来源:
<div
class=
"layui-input-inline layui-form"
>
<div
class=
"layui-input-8"
>
<select
name=
"class"
id=
"channel"
lay-filter=
"myselect"
>
<option
value=
"1"
>
合作
</option>
<option
value=
"2"
>
推广
</option>
<option
value=
"3"
>
测试
</option>
</select>
</div>
</div>
<button
class=
"layui-btn"
id=
"search"
data-type=
"reload"
>
查询统计
</button>
</div>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
>
</table>
</div>
</form>
{include file="common/foot"/}
<script>
layui
.
use
([
'table'
,
'form'
,
'laydate'
],
function
()
{
var
table
=
layui
.
table
,
laydate
=
layui
.
laydate
,
$
=
layui
.
jquery
;
console
.
log
(
layui
);
var
tableIn
=
table
.
render
({
elem
:
'#list'
,
url
:
'{:url("messagelist")}'
,
method
:
'post'
,
title
:
'预定订单统计'
,
page
:
true
,
cols
:
[[
{
checkbox
:
true
,
fixed
:
true
},
{
field
:
'sellername'
,
title
:
'FORMID'
},
{
field
:
'reserve_count_sort'
,
title
:
'OPENID'
},
{
field
:
'reserve_count'
,
title
:
'失效时间'
},
{
field
:
'sms_send_count_sort'
,
title
:
'可发送总数'
},
{
field
:
'sms_send_count'
,
title
:
'ID-商家'
},
{
field
:
'inviting'
,
title
:
'角色'
},
{
field
:
'inviting'
,
title
:
'昵称'
},
{
field
:
'inviting'
,
title
:
'最后预定时间(小程序/电话机)'
},
]],
done
:
function
(
res
,
curr
,
count
){
}
,
id
:
'testReload'
,
page
:
true
,
limit
:
20
});
//日期时间范围
laydate
.
render
({
elem
:
'#time'
,
type
:
'datetime'
,
range
:
true
});
//搜索
$
(
'#search'
).
on
(
'click'
,
function
()
{
//关键字
var
key
=
$
(
'#key'
).
val
();
//选中的商家ID
var
checkStatus
=
table
.
checkStatus
(
'testReload'
);
//test即为参数id设定的值
var
a
=
[];
$
(
checkStatus
.
data
).
each
(
function
(
i
,
o
){
a
.
push
(
o
.
id
);
});
console
.
log
(
a
);
var
time
=
$
(
'#time'
).
val
();
console
.
log
(
time
);
//商家来源
var
channel
=
$
(
'#channel'
).
val
();
console
.
log
(
channel
);
//筛选条件
var
time_type
=
$
(
'#time_type'
).
val
();
console
.
log
(
time_type
);
//传参
tableIn
.
reload
({
page
:
{
page
:
1
},
where
:
{
key
:
key
,
sid
:
a
,
time_type
:
time_type
,
time
:
time
,
channel
:
channel
}});
});
var
$
=
layui
.
$
,
active
=
{
reload
:
function
(){
var
key
=
$
(
'#key'
);
//执行重载
table
.
reload
(
'testReload'
,
{
page
:
{
curr
:
1
//重新从第 1 页开始
}
,
where
:
{
key
:
{
id
:
key
.
val
()
}
}
});
}
};
})
</script>
\ No newline at end of file
...
...
application/admin/view/seller/seller_list.html
View file @
d4d3e3d
...
...
@@ -41,23 +41,43 @@
page
:
true
,
cols
:
[[
{
field
:
'id'
,
title
:
'{:lang("id")}'
,
width
:
60
,
fixed
:
true
},
{
field
:
'name'
,
title
:
'版本'
},
{
field
:
'sellername'
,
title
:
'商家名称'
},
{
field
:
'phone'
,
title
:
'商家电话'
},
{
field
:
'map_address'
,
title
:
'商家地址'
},
{
field
:
'cuisine'
,
align
:
'center'
,
title
:
'现有菜系'
},
{
field
:
'type'
,
align
:
'center'
,
title
:
'现有类型'
},
{
field
:
'last_num'
,
align
:
'center'
,
title
:
'短信余量'
},
{
field
:
'dz_version'
,
align
:
'center'
,
title
:
'APP版本号'
},
{
field
:
'average'
,
align
:
'center'
,
edit
:
'text'
,
title
:
'人均消费'
},
{
field
:
'score'
,
align
:
'center'
,
edit
:
'text'
,
title
:
'店铺评分'
},
{
field
:
'is_parking'
,
align
:
'center'
,
edit
:
'text'
,
title
:
'是否有停车场'
},
{
field
:
'statusVal'
,
align
:
'center'
,
title
:
'状态'
},
{
field
:
'user_name'
,
align
:
'center'
,
title
:
'创建人'
},
{
field
:
'cdate'
,
align
:
'center'
,
title
:
'创建日期'
},
{
field
:
'cuisine'
,
align
:
'center'
,
title
:
'现有菜系'
},
{
field
:
'type'
,
align
:
'center'
,
title
:
'现有类型'
},
{
align
:
'center'
,
title
:
'操作'
,
toolbar
:
'#action'
}
]]
,
id
:
'testReload'
,
page
:
true
});
//监听单元格编辑
table
.
on
(
'edit(list)'
,
function
(
obj
){
var
value
=
obj
.
value
,
//得到修改后的值
data
=
obj
.
data
,
//得到所在行所有键值
field
=
obj
.
field
;
//得到字段
var
new_field
=
field
==
'average'
?
"人均消费"
:
(
field
==
'is_parking'
?
"停车场"
:
(
field
==
'score'
?
"店铺评分"
:
'未知字段'
));
//layer.msg('[ID: '+ data.id +'] ' + field + ' 字段更改为:'+ value);
layer
.
confirm
(
'请确认将 '
+
data
.
sellername
+
'商家的 '
+
new_field
+
' 更改为:'
+
value
,
function
(
index
){
$
.
post
(
"{:url('setsellerconfig')}"
,{
sellerid
:
data
.
id
,
field
:
field
,
value
:
value
},
function
(
res
){
if
(
res
.
code
==
1
){
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
1
});
}
else
{
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
2
});
}
});
layer
.
close
(
index
);
});
});
//搜索
$
(
'#search'
).
on
(
'click'
,
function
()
{
var
key
=
$
(
'#key'
).
val
();
...
...
Please
register
or
login
to post a comment