添加网站文件
This commit is contained in:
469
application/admin/view/control/visit_order.html
Normal file
469
application/admin/view/control/visit_order.html
Normal file
@@ -0,0 +1,469 @@
|
||||
{layout name="layout1" /}
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
}
|
||||
.goods-content>div:not(:last-of-type) {
|
||||
border-bottom:1px solid #DCDCDC;
|
||||
}
|
||||
.goods-data::after{
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.goods_name_hide{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.operation-btn {
|
||||
margin: 5px;
|
||||
}
|
||||
.table-operate{
|
||||
text-align: left;
|
||||
font-size:14px;
|
||||
padding:0 5px;
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
text-overflow:inherit;
|
||||
white-space:normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*订单服务完成服务售后跟踪,请勿删除</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
||||
<ul class="layui-tab-title">
|
||||
<li data-type='' class="layui-this">全部</li>
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-row">
|
||||
|
||||
|
||||
<div class="layui-inline" style="width: 24%;">
|
||||
<label class="layui-form-label">客户姓名:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="name" id="name" placeholder="请输入客户姓名"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 24%;">
|
||||
<label class="layui-form-label">客户电话:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="phone" id="name" placeholder="请输入客户电话"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">创建时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<div class="layui-input-inline" >
|
||||
<input type="text" name="start_time" class="layui-input" id="start_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 20px;">
|
||||
<label class="layui-form-mid">至</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="end_time" class="layui-input" id="end_time"
|
||||
placeholder="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="user-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="user-clear-search">清空查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="export-file">导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
<script type="text/html" id="status">
|
||||
{{# if(d.status === 0) { }}
|
||||
<p style="color:#1E9FFF">跟进中</p>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.status === 1) { }}
|
||||
<p style="color:#ee0000">已完成</p>
|
||||
{{# } }}
|
||||
</script>
|
||||
<script type="text/html" id="punish">
|
||||
{{# if(d.punish === 0) { }}
|
||||
<p style="color:#1E9FFF">未处罚</p>
|
||||
{{# } }}
|
||||
|
||||
{{# if(d.punish === 1) { }}
|
||||
<p style="color:#ee0000">已处罚</p>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="user-operation">
|
||||
<div class="table-operate">
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="edit" style="display: inline-block;">修改</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="follow" style="display: inline-block;">跟踪</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="punish" style="display: inline-block;margin-top:10px">处罚</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="images" style="display: inline-block;margin-top:10px">图片</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="done" style="display: inline-block;margin-top:10px">派单</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="done" style="display: inline-block;margin-top:10px">完成</a>
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="del" style="display: inline-block;margin-top:10px;background-color:#ee0000;color:#fff">删除</a>
|
||||
<div>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'table', 'like', 'laydate'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, like = layui.like
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
var listType = '';
|
||||
|
||||
//图片放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(user-search)', function (data) {
|
||||
var field = data.field;
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
//清空查询
|
||||
form.on('submit(order-clear-search)', function () {
|
||||
$('#keyword').val('');
|
||||
$('#order_status').val('');
|
||||
$('#goods_name').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_type').val('');
|
||||
$('#order_source').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
$('#delivery_type').val('');
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('order-lists', {
|
||||
where: [],
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 导出
|
||||
form.on('submit(export-file)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url: '{:url("order/exportFile")}?type=' + listType,
|
||||
type: 'get',
|
||||
data: field,
|
||||
dataType: 'json',
|
||||
error: function() {
|
||||
layer.msg('导出超时,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
table.exportFile(res.data.exportTitle,res.data.exportData, res.data.exportExt, res.data.exportName);
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
layer.msg('导出中请耐心等待~');
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
//获取列表
|
||||
getList(listType);
|
||||
//切换列表
|
||||
element.on('tab(tab-all)', function (data) {
|
||||
$('#keyword').val('');
|
||||
$('#order_status').val('');
|
||||
$('#goods_name').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_type').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
$('#delivery_type').val('');
|
||||
form.render('select');
|
||||
listType = $(this).attr('data-type');
|
||||
getList(listType);
|
||||
if (listType !== ''){
|
||||
$('.order_status').hide();
|
||||
}else {
|
||||
$('.order_status').show();
|
||||
}
|
||||
});
|
||||
|
||||
function getList(type) {
|
||||
table.render({
|
||||
elem: '#order-lists'
|
||||
,url: '{:url("Control/visit_order")}?type=' + type//模拟接口
|
||||
, cols: [[
|
||||
{type: 'checkbox'}
|
||||
,{field: 'order_id', title: '订单编号',align: 'center',}
|
||||
,{field: 'name', title: '客户信息',align: 'center',}
|
||||
,{field: 'phone', title: '联系电话',align: 'center',}
|
||||
,{field: 'autotime', title: '服务时间',align: 'center',}
|
||||
,{field: 'staff_name', title: '保洁师姓名',align: 'center',}
|
||||
,{field: 'staff_phone', title: '保洁师电话',align: 'center',}
|
||||
,{field: 'problem', title: '处理状态',align: 'center',toolbar: '#status'}
|
||||
,{field: 'problem', title: '投诉内容',align: 'center',}
|
||||
,{field: 'adjust', title: ' 处理方法',align: 'center',}
|
||||
,{field: 'time', title: '增加时间',align: 'center',}
|
||||
,{field: 'punish', title: '处罚状态',align: 'center',toolbar: '#punish'}
|
||||
,{fixed: 'right', title: '操作', width:150, toolbar: '#user-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, limit: 17
|
||||
, text: {none: '暂无数据!'}
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count,
|
||||
"data": res.data.lists,
|
||||
};
|
||||
}
|
||||
,done: function(res, curr, count){
|
||||
// 解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(order-lists)', function (obj) {
|
||||
var id = obj.data.id;
|
||||
if(obj.event === 'edit'){
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑售后回访'
|
||||
,content: '{:url("Control/sale_edit")}?id='+id
|
||||
,area: ['60%', '65%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#eidt-submit');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(eidt-submit)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url:'{:url("Control/sale_edit")}',
|
||||
data:field,
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}else{
|
||||
layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if(obj.event === 'follow'){
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '写入售后跟踪信息'
|
||||
,content: '{:url("Control/follow")}?id='+id
|
||||
,area: ['60%','90%']
|
||||
,btn: ['关闭']
|
||||
})
|
||||
}
|
||||
|
||||
//查看图片的内容
|
||||
if(obj.event === 'images'){
|
||||
var id = obj.data.order_id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '查看图片'
|
||||
,content: '{:url("Control/images")}?id='+id
|
||||
,area: ['60%','90%']
|
||||
,btn: ['关闭']
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//处罚的内容
|
||||
if(obj.event === 'punish'){
|
||||
var id = obj.data.order_id;
|
||||
var punish = obj.data.punish;
|
||||
if(punish==1){
|
||||
layui.layer.msg('已经处罚了请勿重复处罚', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
}
|
||||
layer.confirm('确定生成处罚单据?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Control/punish")}?id='+id
|
||||
, data: {id:id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
table.reload('order-lists'); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//取消暂停服务
|
||||
if(obj.event === 'done'){
|
||||
var status=obj.data.status;
|
||||
if(status==1){
|
||||
layui.layer.msg('已经点击完成刷新页面', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定售后订单跟踪完成?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Control/done")}?id='+id
|
||||
, data: {id:id}
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code == 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
},function () {
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if(obj.event === 'del'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定删除售后订单', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Control/sale_del")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user