添加网站文件
This commit is contained in:
270
application/admin/view/stafforder/lists copy.html
Normal file
270
application/admin/view/stafforder/lists copy.html
Normal file
@@ -0,0 +1,270 @@
|
||||
{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;
|
||||
}
|
||||
.flexs{
|
||||
display:flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.w-left{
|
||||
/* width: 300px; */
|
||||
width: 17%;
|
||||
border: 1px solid #f1f1f1;
|
||||
/* width: 220px; */
|
||||
}
|
||||
#calendar{
|
||||
width: 80%;
|
||||
}
|
||||
.w-left{
|
||||
height: 86vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.w-left p{
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
}
|
||||
.w-l-i{
|
||||
padding: 10px;
|
||||
margin: 3px auto;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
}
|
||||
.w-l-a{
|
||||
background-color: #eaf9ff;
|
||||
}
|
||||
.w-l-d{
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
<script src="/static/webjs/date.js"></script>
|
||||
|
||||
|
||||
<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">
|
||||
<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-form-item">
|
||||
|
||||
<div class="flexs">
|
||||
<div class="w-left">
|
||||
<div>1</div>
|
||||
<div>1</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 82%;">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'element', 'jquery', 'like', 'likeedit'], function () {
|
||||
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, like = layui.like
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
var listType = '';
|
||||
|
||||
|
||||
|
||||
|
||||
function getList(type) {
|
||||
table.render({
|
||||
elem: '#order-lists'
|
||||
, url: '{:url("order/lists")}?type=' + type
|
||||
, cols: [[
|
||||
{field:'id',title: 'id',width:60,align: 'center'}
|
||||
, {field: 'order', title: '销售单信息', align: 'center',templet:'#order',width:230}
|
||||
, {field: 'user', title: '推荐人信息', templet:'#user',width:300}
|
||||
, {field: 'order_goods', title: '商品信息', align: 'center',templet:'#goods',width:320}
|
||||
, {field: 'total_amount', title: '订单备注', align: 'center',templet:'#amount',width:180}
|
||||
, {field: 'delivery', title: '客户基本信息', align: 'center',templet:'#delivery',width:260}
|
||||
, {fixed: 'right', title: '操作', width: 300, 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());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
window.onload = ()=>{
|
||||
//初始化日历
|
||||
function initday(events = [],now){
|
||||
let calendarEl = document.getElementById('calendar');
|
||||
let calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
eventClick: function(info) {
|
||||
let d = info.event._def
|
||||
if(d.publicId){
|
||||
let arr = d.publicId.split('_')
|
||||
console.log(arr);
|
||||
if(arr[0] == 'pb'){
|
||||
console.log(layer.alert('订单号:'+arr[1]))
|
||||
}
|
||||
|
||||
}
|
||||
// alert('Clicked on: ' +info);
|
||||
},
|
||||
|
||||
// 自定义头部工具
|
||||
headerToolbar: {
|
||||
start: 'title',
|
||||
center: '',
|
||||
end: 'today prev,next'
|
||||
},
|
||||
|
||||
now: now, // 自定义当前时间,只用于显示使用,正常不需要这个参数
|
||||
|
||||
height: "auto", // 定义表格高度
|
||||
allDaySlot: false, // 是否显示表头的全天事件栏
|
||||
// initialView: 'timeGridWeek',
|
||||
locale: 'zh-cn', // 区域本地化
|
||||
firstDay: 1, // 每周的第一天: 0:周日
|
||||
|
||||
|
||||
|
||||
|
||||
events: events
|
||||
});
|
||||
calendar.render();
|
||||
}
|
||||
|
||||
function binduidclick(){
|
||||
$('.w-l-i').off()
|
||||
$('.w-l-i').click(function(){
|
||||
$('.w-l-i').removeClass('w-l-a')
|
||||
$(this).addClass('w-l-a')
|
||||
|
||||
var uid = $(this).attr('uid')
|
||||
console.log(uid)
|
||||
$.get('/admin/staff/Scheduling',{uid:uid},function(e){
|
||||
console.log(e)
|
||||
if(e.code == 1 && e.data){
|
||||
let pb = e.data.pb
|
||||
let qj = e.data.qj
|
||||
let events = []
|
||||
//循环排班和请假的
|
||||
for(let d of pb){
|
||||
events.push({
|
||||
id:'pb_'+d.order_sn+'_'+d.id+'_'+d.remark,
|
||||
color:'red',
|
||||
title:(d.type == 3 ?'固定':'非固定')+'-'+(d.addtime == 1 ?'上午':'下午'),
|
||||
start:d.date,
|
||||
end:d.date
|
||||
})
|
||||
|
||||
}
|
||||
for(let d of qj){
|
||||
events.push({
|
||||
color:(d.addtime == 1 ?'red':'green'),
|
||||
title:'请假'+'-'+(d.addtime == 1 ?'上午':'下午'),
|
||||
start:d.time,
|
||||
end:d.time
|
||||
})
|
||||
}
|
||||
initday(events,e.data.now)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
$.post('/admin/staff/stafflist',{},function(e){
|
||||
console.log(e)
|
||||
var html = ''
|
||||
if(e.code == 1 && e.data.length){
|
||||
for(let p of e.data){
|
||||
html += `<div class="w-l-i" uid="`+p.id+`">
|
||||
<p>`+p.mobile+'-'+p.name+`</p>
|
||||
<p class="w-l-d">`+p.addr+`</p>
|
||||
</div>`
|
||||
}
|
||||
}
|
||||
$('.w-left').html(html)
|
||||
binduidclick()
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user