添加网站文件
This commit is contained in:
744
application/admin/view/orderstaff/allorder.html
Normal file
744
application/admin/view/orderstaff/allorder.html
Normal file
@@ -0,0 +1,744 @@
|
||||
allorder.html{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>
|
||||
<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='5' class="layui-this">全部</li>
|
||||
<li data-type="0">等派单</li>
|
||||
<li data-type="1">服务中</li>
|
||||
<li data-type="2">售后中</li>
|
||||
<li data-type="3">已完成</li>
|
||||
</ul>
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
<script type="text/html" id="order-operation" >
|
||||
<div class="table-operate">
|
||||
<a class=" layui-btn-primary layui-btn-sm " lay-event="reserva" style="display: inline-block;">改约</a>
|
||||
<a class="layui-btn-primary layui-btn-sm " lay-event="edit" style="display: inline-block; margin-top:5px">改派</a>
|
||||
{{# if(d.status==3){}}
|
||||
<a class="layui-btn-primary layui-btn-sm" lay-event="delsd" style="display: inline-block; margin-top:10px;color:chocolate">取消</a>
|
||||
{{# }else{ }}
|
||||
<a class="layui-btn-primary layui-btn-sm" lay-event="del" style="display: inline-block; margin-top:10px">暂停</a>
|
||||
{{# } }}
|
||||
{{# if(d.lock==1){}}
|
||||
<a class="layui-btn-primary layui-btn-sm" lay-event="unlock" style="display: inline-block; margin-top:10px;color:chocolate">解锁</a>
|
||||
{{# }
|
||||
else{ }}
|
||||
<a class="layui-btn-primary layui-btn-sm " lay-event="lock" style="display: inline-block; margin-top:10px">锁定</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn-primary layui-btn-sm " lay-event="complete" style="display: inline-block; margin-top:10px">完成</a>
|
||||
<a class="layui-btn-primary layui-btn-sm" lay-event="delss" style="display: inline-block;margin-top:-2px">删除</a>
|
||||
<a class="layui-btn-primary layui-btn-sm " lay-event="remarksd" style="display: inline-block; margin-top:10px">备注</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm " lay-event="del" style="display: inline-block;margin-top:-2px">日志</a>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="image">
|
||||
<img src="{{d.image}}" style="height:80px;width: 80px" class="image-show">
|
||||
</script>
|
||||
|
||||
<!--门店信息-->
|
||||
<script type="text/html" id="shop">
|
||||
<p>{{d.shop.name}}</p>
|
||||
</script>
|
||||
|
||||
<!--订单信息-->
|
||||
<script type="text/html" id="order">
|
||||
<div style="text-align: left">
|
||||
<p>订单编号:{{d.order_sn}}</p>
|
||||
<p>服务编号:{{d.fworder_sn}}</p>
|
||||
<p>服务时间:{{d.autotime}}</p>
|
||||
</div>
|
||||
</script>
|
||||
<!--会员信息-->
|
||||
<script type="text/html" id="user">
|
||||
|
||||
<div style="text-align:left">
|
||||
<p>{{d.staff_id}}-{{d.staff_name}}-{{d.staff_mobile}} </p>
|
||||
<p>出发地址:{{d.staff_addr}}</p>
|
||||
<p style="height:10px"></p>
|
||||
<p>服务开始时间:2023.10.11</p>
|
||||
<p>服务结束时间:2023.10.11</p>
|
||||
<p>保洁状态:
|
||||
{{# if(d.staff_static==0){}}
|
||||
等待保洁师确认
|
||||
{{# }
|
||||
else if(d.pet==1) { }}
|
||||
服务之中
|
||||
{{# }
|
||||
else{ }}
|
||||
服务已经完成
|
||||
{{# } }}
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="static">
|
||||
<div style="text-align:center">
|
||||
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<!--客户信息-->
|
||||
<script type="text/html" id="delivery">
|
||||
<div style="text-align: left">
|
||||
<p>客户姓名:{{d.consignee}}</p>
|
||||
<p>手机号码:{{d.phone}}</p>
|
||||
<p>房屋地址:{{d.address}}</p>
|
||||
<p>房屋面积:{{d.square}}平方</p>
|
||||
<p>
|
||||
{{# if(d.pet==1){}}
|
||||
有宠物
|
||||
{{# }else{ }}
|
||||
无宠物
|
||||
{{# } }}
|
||||
{{# if(d.hbl==1){}}
|
||||
有超厚玻璃
|
||||
{{# }else{ }}
|
||||
无超厚玻璃
|
||||
{{# } }}
|
||||
</p>
|
||||
</div>
|
||||
<div style="text-align: left;margin-top:10px">
|
||||
<a lay-event="admin_remarks" style="display: inline-block;">
|
||||
{{# if(d.typeorder==1){}}
|
||||
<p style="color: #FF5722;"> 服务类型:固定{{d.order_remarks}}</p>
|
||||
{{# }else{ }}
|
||||
服务类型:非固定
|
||||
{{# } }}
|
||||
</a>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!--客户信息-->
|
||||
<script type="text/html" id="time">
|
||||
<div style="text-align: left">
|
||||
<p>服务日期:{{d.autotime}}</p>
|
||||
<p>时间:{{d.xq}}</p>
|
||||
<p>加时:{{d.timeadd}}小时</p>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="remarks">
|
||||
<div style="text-align: left">
|
||||
<p>用户备注:{{d.user_remarks}}</p>
|
||||
<p>管理员备注:{{d.admin_remarks}}</p>
|
||||
<p>服务人员嘱咐:{{d.staff_remarks}}小时</p>
|
||||
</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(order-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("Stafforder/lists")}?type=' + type
|
||||
, cols: [[
|
||||
{field:'id',title: 'id',width:80,align: 'center'}
|
||||
, {field: 'order', title: '订单信息', align: 'center',templet:'#order',}
|
||||
, {field: 'delivery', title: '客户信息', align: 'center',templet:'#delivery'}
|
||||
, {field: 'order_status_text', title: '服务时间', align: 'center',templet:'#time'}
|
||||
, {field: 'remarks', title: '备注信息', align: 'center',templet:'#remarks'}
|
||||
, {field: 'static', title: '状态',width:100,templet:function (res) {
|
||||
var status = res.status;
|
||||
if (status==0) {
|
||||
return '<div > <i class="fa fa-circle"></i>等待服务</div>';
|
||||
}else if(status==3){
|
||||
return '<div > <i class="fa fa-circle"></i>已暂停服务</div>';
|
||||
}
|
||||
else{
|
||||
return '<div style="color:#f75444"> <i class="fa fa-circle"></i> 已服务</div>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
, {field: 'user', title: '家政人员', templet:'#user',width:300}
|
||||
, {fixed: 'right', title: '操作', width: 140, align: 'center', toolbar: '#order-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, 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 status=obj.data.status;
|
||||
if(status==1){
|
||||
layui.layer.msg('订单已经完成,无法修改订单的状态', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
if(obj.event === 'reserva'){
|
||||
var status=obj.data.lock;
|
||||
if(status==1){
|
||||
layui.layer.msg('请联系管理员解锁订单', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '修改订单预约的时间'
|
||||
,content: '{:url("Orderautomatic/eitdata")}?id='+id
|
||||
,area: ['55%', '60%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#edit-submits');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(edit-submits)', function(data){
|
||||
var field = data.field;
|
||||
if(data.field.end_time==""){
|
||||
layui.layer.msg('服务日期不能为空', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url:'{:url("Orderautomatic/eitdata")}?id='+id,
|
||||
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('order-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//暂停订单执行
|
||||
if(obj.event === 'del'){
|
||||
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("Orderautomatic/dels")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//锁定订单
|
||||
if(obj.event === 'lock'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('锁定订单后不是超级管理员不能解锁订单?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/lock")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//锁定订单
|
||||
if(obj.event === 'unlock'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('锁定订单后不是超级管理员不能解锁订单?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/unlock")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//删除订单
|
||||
if(obj.event === 'delss'){
|
||||
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("Orderautomatic/delss")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//删除订单
|
||||
if(obj.event === 'delss'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('请注意操作订单,订单日志记录更新?',{
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/delss")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//设置订单已完成状态
|
||||
if(obj.event === 'complete'){
|
||||
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("Orderautomatic/complete")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//编辑订单
|
||||
if(obj.event === 'edit'){
|
||||
var status=obj.data.lock;
|
||||
if(status==1){
|
||||
layui.layer.msg('请联系管理员解锁订单', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
var index = layer.open({
|
||||
type: 2
|
||||
,title: '增加排单预约'
|
||||
,content: '{:url("Orderautomatic/staff")}?id='+id
|
||||
,area: ['30%', '60%']
|
||||
,btn: ['保存', '取消']
|
||||
,maxmin: true
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'add-user_level-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url:'{:url("Orderautomatic/staff")}?id='+id,
|
||||
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('order-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
}
|
||||
//取消暂停服务
|
||||
if(obj.event === 'delsd'){
|
||||
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("Orderautomatic/delsd")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//保洁人员备注信息
|
||||
if(obj.event === 'remarksd'){
|
||||
var id = obj.data.id;
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/remarks")}'
|
||||
, data: {'id': id}
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layer.prompt({title: '备注信息', formType: 2, value: res.data.order_remarks}, function(value, index){
|
||||
layer.close(index);
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/remarks")}'
|
||||
, data: {'id': id, "order_remarks": value }
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
table.reload('order-lists');
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user_level-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//商家备注
|
||||
if(obj.event === 'remarks') {
|
||||
like.ajax({
|
||||
url: '{:url("order/remarks")}'
|
||||
, data: {'id': id}
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layer.prompt({title: '备注信息', formType: 2, value: res.data.order_remarks}, function(value, index){
|
||||
layer.close(index);
|
||||
like.ajax({
|
||||
url: '{:url("order/remarks")}'
|
||||
, data: {'id': id, "order_remarks": value }
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
table.reload('order-lists');
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user_level-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
656
application/admin/view/orderstaff/lists.html
Normal file
656
application/admin/view/orderstaff/lists.html
Normal file
@@ -0,0 +1,656 @@
|
||||
{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>
|
||||
<p>*订单的状态又执行成功,等待执行,请勿删除执行</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-row">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<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>
|
||||
<div class="layui-inline" style="width: 24%;">
|
||||
<label class="layui-form-label">保洁是姓名:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="staff_id">
|
||||
<option value="">请选保洁师查询</option>
|
||||
{foreach $staff as $item }
|
||||
<option value="{$item.id}">{$item.name}</option>
|
||||
{/foreach}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="order-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="order-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>
|
||||
</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>
|
||||
{foreach $type as $item }
|
||||
<li data-type="{$item.id}">{$item.name}</li>
|
||||
{/foreach}
|
||||
|
||||
</ul>
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
<script type="text/html" id="adder" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.morning}}</p>
|
||||
|
||||
<p style="color:#077E01">{{d.ids}}</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="noon" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.noon}}</p>
|
||||
<p style="color:#077E01">{{d.idss}}</p>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="data" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.xq}}</p>
|
||||
<p>
|
||||
{{# if(d.addtime==1){}}
|
||||
上午
|
||||
{{# }else{ }}
|
||||
下午
|
||||
{{# } }}
|
||||
|
||||
</p>
|
||||
</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 = '';
|
||||
//监听搜索
|
||||
form.on('submit(order-search)', function (data) {
|
||||
var field = data.field;
|
||||
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
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("Orderstaff/orederlist")}?type=' + listType
|
||||
, cols: [[
|
||||
{field: 'name', title: '保洁师姓名',align: 'center',}
|
||||
, {field: 'addr', title: '保洁师住址', align: 'center', templet:'#order',width:240}
|
||||
, {field: 'adder', title: '上午服务地址',templet:'#adder'}
|
||||
, {field: 'noon', title: '下午服务地址',templet:'#noon'}
|
||||
, {field: 'order_count', title: '上午请假',}
|
||||
, {field: 'order_counts', title: '下午请假',}
|
||||
|
||||
]]
|
||||
, page: true
|
||||
, text: {none: '暂无数据!'}
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count,
|
||||
"data": res.data.lists,
|
||||
"totalRow": {
|
||||
"inventoryQty":123
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
,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 status=obj.data.status;
|
||||
// if(status==1){
|
||||
// layui.layer.msg('订单已经完成,无法修改订单的状态', {
|
||||
// offset: '15px'
|
||||
// , icon: 2
|
||||
// , time: 1000
|
||||
// },
|
||||
// )
|
||||
// return
|
||||
// };
|
||||
if(obj.event === 'reserva'){
|
||||
var status=obj.data.lock;
|
||||
if(status==1){
|
||||
layui.layer.msg('请联系管理员解锁订单', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '修改订单预约的时间'
|
||||
,content: '{:url("Orderautomatic/eitdata")}?id='+id
|
||||
,area: ['55%', '60%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#edit-submits');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(edit-submits)', function(data){
|
||||
var field = data.field;
|
||||
if(data.field.end_time==""){
|
||||
layui.layer.msg('服务日期不能为空', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url:'{:url("Orderautomatic/eitdata")}?id='+id,
|
||||
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('order-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//暂停订单执行
|
||||
if(obj.event === 'del'){
|
||||
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("Orderautomatic/dels")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//锁定订单
|
||||
if(obj.event === 'lock'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('锁定订单后不是超级管理员不能解锁订单?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/lock")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//锁定订单
|
||||
if(obj.event === 'unlock'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('锁定订单后不是超级管理员不能解锁订单?', {
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/unlock")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//删除订单
|
||||
if(obj.event === 'delss'){
|
||||
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("Orderautomatic/delss")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//删除订单
|
||||
if(obj.event === 'delss'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('请注意操作订单,订单日志记录更新?',{
|
||||
btn: ['确认','取消'] //按钮
|
||||
}, function(){
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/delss")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//设置订单已完成状态
|
||||
if(obj.event === 'complete'){
|
||||
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("Orderautomatic/complete")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//编辑订单
|
||||
if(obj.event === 'edit'){
|
||||
var status=obj.data.lock;
|
||||
if(status==1){
|
||||
layui.layer.msg('请联系管理员解锁订单', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
var index = layer.open({
|
||||
type: 2
|
||||
,title: '增加排单预约'
|
||||
,content: '{:url("Orderautomatic/staff")}?id='+id
|
||||
,area: ['30%', '60%']
|
||||
,btn: ['保存', '取消']
|
||||
,maxmin: true
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'add-user_level-submit'
|
||||
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url:'{:url("Orderautomatic/staff")}?id='+id,
|
||||
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('order-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
}
|
||||
//取消暂停服务
|
||||
if(obj.event === 'delsd'){
|
||||
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("Orderautomatic/delsd")}?id='+id
|
||||
, data: {'order_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');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//保洁人员备注信息
|
||||
if(obj.event === 'remarksd'){
|
||||
var id = obj.data.id;
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/remarks")}'
|
||||
, data: {'id': id}
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layer.prompt({title: '备注信息', formType: 2, value: res.data.order_remarks}, function(value, index){
|
||||
layer.close(index);
|
||||
like.ajax({
|
||||
url: '{:url("Orderautomatic/remarks")}'
|
||||
, data: {'id': id, "order_remarks": value }
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
table.reload('order-lists');
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user_level-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//商家备注
|
||||
if(obj.event === 'remarks') {
|
||||
like.ajax({
|
||||
url: '{:url("order/remarks")}'
|
||||
, data: {'id': id}
|
||||
, type: 'get'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layer.prompt({title: '备注信息', formType: 2, value: res.data.order_remarks}, function(value, index){
|
||||
layer.close(index);
|
||||
like.ajax({
|
||||
url: '{:url("order/remarks")}'
|
||||
, data: {'id': id, "order_remarks": value }
|
||||
, type: 'post'
|
||||
, success: function (res) {
|
||||
if (res.code === 1) {
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
table.reload('order-lists');
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user_level-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
1255
application/admin/view/orderstaff/orederlist.html
Normal file
1255
application/admin/view/orderstaff/orederlist.html
Normal file
File diff suppressed because it is too large
Load Diff
302
application/admin/view/orderstaff/stafflist.html
Normal file
302
application/admin/view/orderstaff/stafflist.html
Normal file
@@ -0,0 +1,302 @@
|
||||
{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>
|
||||
<p>*订单的状态又执行成功,等待执行,请勿删除执行</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-row">
|
||||
<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>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="order-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="order-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>
|
||||
</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-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
<script type="text/html" id="adder" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.morning}}</p>
|
||||
<p style="color:#077E01">{{d.ids}}</p>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="noon" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.noon}}</p>
|
||||
<p style="color:#077E01">{{d.idss}}</p>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="data" >
|
||||
<div class="table-operate">
|
||||
<p>{{d.xq}}</p>
|
||||
<p>
|
||||
{{# if(d.addtime==1){}}
|
||||
上午
|
||||
{{# }else{ }}
|
||||
下午
|
||||
{{# } }}
|
||||
|
||||
</p>
|
||||
</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 = '';
|
||||
//监听搜索
|
||||
form.on('submit(order-search)', function (data) {
|
||||
var field = data.field;
|
||||
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
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("Orderstaff/stafflist")}'
|
||||
, cols: [[
|
||||
{field: 'zsnumber', title: '已经接单',align: 'center',}
|
||||
, {field: 'cdsnumber', title: '可接单总量', align: 'center',}
|
||||
, {field: 'swnumber', title: '上午可以接单',}
|
||||
, {field: 'xwnumber', title: '下午可以接单',}
|
||||
, {field: 'wpd', title: '未派单',}
|
||||
]]
|
||||
, page: true
|
||||
, 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 status=obj.data.status;
|
||||
// if(status==1){
|
||||
// layui.layer.msg('订单已经完成,无法修改订单的状态', {
|
||||
// offset: '15px'
|
||||
// , icon: 2
|
||||
// , time: 1000
|
||||
// },
|
||||
// )
|
||||
// return
|
||||
// };
|
||||
// if(obj.event === 'reserva'){
|
||||
// var status=obj.data.lock;
|
||||
// if(status==1){
|
||||
// layui.layer.msg('请联系管理员解锁订单', {
|
||||
// offset: '15px'
|
||||
// , icon: 2
|
||||
// , time: 1000
|
||||
// },
|
||||
// )
|
||||
// return
|
||||
// };
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '修改订单预约的时间'
|
||||
,content: '{:url("Orderautomatic/eitdata")}?id='+id
|
||||
,area: ['55%', '60%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#edit-submits');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(edit-submits)', function(data){
|
||||
var field = data.field;
|
||||
if(data.field.end_time==""){
|
||||
layui.layer.msg('服务日期不能为空', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url:'{:url("Orderautomatic/eitdata")}?id='+id,
|
||||
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('order-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user