761 lines
34 KiB
HTML
761 lines
34 KiB
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>
|
||
<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>
|
||
<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-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-block">
|
||
<input type="text" name="order_sn" id="order_sn" placeholder="请输入订单的编号"
|
||
autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<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">
|
||
<label class="layui-form-label">客服电话:</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" name="mobile" id="mobile" placeholder="请输入客户电话"
|
||
autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">订单归属:</label>
|
||
<div class="layui-input-block">
|
||
<select name="order_type" id="order_type">
|
||
<option value="">全部</option>
|
||
<option value="0">未归属</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">账款状态:</label>
|
||
<div class="layui-input-block">
|
||
<select name="order_ysck" id="order_ysck">
|
||
<option value="">全部</option>
|
||
<option value="0">已收账款</option>
|
||
<option value="1">未收账款</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">订单渠道:</label>
|
||
<div class="layui-input-block">
|
||
<select name="channel_id" id="channel_id">
|
||
<option value="">全部</option>
|
||
{foreach $ceenl as $item }
|
||
<option value="{$item.id}">{$item.name}</option>
|
||
{/foreach}
|
||
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">套餐商品:</label>
|
||
<div class="layui-input-block">
|
||
<select name="goods_id" id="gooods_id">
|
||
<option value="">全部</option>
|
||
{foreach $goods as $item }
|
||
<option value="{$item.id}">{$item.name}</option>
|
||
{/foreach}
|
||
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">订单归属:</label>
|
||
<div class="layui-input-block">
|
||
<select name="admin_id" id="admin_id">
|
||
<option value="">全部</option>
|
||
{foreach $admin as $item }
|
||
<option value="{$item.id}">{$item.name}</option>
|
||
{/foreach}
|
||
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<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 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="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 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="detail" " style="display: inline-block;">详情</a>
|
||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="edit">修改</a>
|
||
<a class="layui-btn-primary layui-btn-sm" lay-event="channel" style="display: inline-block;">渠道</a>
|
||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" lay-event="remarks">备注</a>
|
||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block;" lay-event="allocation"> 分配</a>
|
||
<a class="layui-btn layui-btn-primary layui-btn-sm operation-btn" style="display: inline-block;background-color:#fd4634;color:#fff" lay-event="cancel">删除</a>
|
||
{{# if(d.order_status == 1){ }}
|
||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block;" lay-event="delivery">发货</a>
|
||
{{# } }}
|
||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block;" lay-event="cancelss">退款</a>
|
||
{{# if(d.order_status == 2){ }}
|
||
<a class="layui-btn-primary layui-btn-sm" style="display: inline-block; background-color:#fd4634;color:#fff" lay-event="confirm">完成</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.create_time}}</p>
|
||
<p>订单来源:{{d.channel}}</p>
|
||
<p>收款方式:{{d.gord_name}}</p>
|
||
{{# if(d.pay_zd == 0){ }}
|
||
<p style="color:#fe0707">支付状态:
|
||
已收款
|
||
</p>
|
||
{{# } }}
|
||
{{# if(d.pay_zd == 1){ }}
|
||
<p style="color:#3A91FB">支付状态:
|
||
未收账款
|
||
</p>
|
||
{{# } }}
|
||
</div>
|
||
</script>
|
||
|
||
|
||
|
||
<!--收货信息-->
|
||
<script type="text/html" id="delivery">
|
||
<div style="text-align: left">
|
||
<p>客户姓名:{{d.consignee}}</p>
|
||
<p>手机号码:{{d.mobile}}</p>
|
||
<p>房屋地址:{{d.address}}</p>
|
||
</div>
|
||
</script>
|
||
|
||
<!--金额信息-->
|
||
<script type="text/html" id="amount">
|
||
<div style="text-align: left">
|
||
<p>商品金额:{{d.goods_price}}</p>
|
||
<p>优惠金额:{{d.discount_amount}}</p>
|
||
<p>实付金额:{{d.order_amount}}</p>
|
||
<p>支付方式:
|
||
{{# if(d.pay_way == 3){ }}
|
||
余额支付
|
||
{{# } }}
|
||
{{# if(d.pay_way == 1){ }}
|
||
微信支付
|
||
{{# } }}
|
||
{{# if(d.pay_way == 2){ }}
|
||
支付宝支付
|
||
{{# } }}
|
||
</p>
|
||
|
||
|
||
</div>
|
||
</script>
|
||
|
||
<!--商品信息-->
|
||
<script type="text/html" id="goods">
|
||
<div class="goods-content">
|
||
|
||
<div style="text-align: left;" class="goods-data">
|
||
<div class="layui-input-inline layui-col-md8" style="padding-top: 15px;">
|
||
<span class="layui-col-md7">商品名称:{{d.goods_name }}</span>
|
||
<br>
|
||
<span class="layui-col-md7">服务次数:{{d.code}}次数</span>
|
||
</div>
|
||
<img src="{{d.goods_image}}" style="height:80px;width: 80px" class="image-show">
|
||
</div>
|
||
|
||
</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(send_coupon)', function(data){
|
||
layer.open({
|
||
type: 2
|
||
,title: '增加服务订单'
|
||
,content: '{:url("order/add")}'
|
||
,area: ['70%', '85%']
|
||
,btn: ['确定', '取消']
|
||
,yes: function(index, layero){
|
||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||
,submitID = 'user_group-submit'
|
||
,submit = layero.find('iframe').contents().find("#add-user_group-submit");
|
||
//监听提交
|
||
iframeWindow.layui.form.on('submit(add-user_group-submit)', function(data){
|
||
var field = data.field;
|
||
like.ajax({
|
||
url:'{:url("order/add")}',
|
||
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');
|
||
}
|
||
});
|
||
});
|
||
// 导出
|
||
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("adminorder/storage")}?type=' + type
|
||
, cols: [[
|
||
{field:'id',title: 'id',width:60,align: 'center'}
|
||
, {field: 'order', title: '销售单信息', align: 'center',templet:'#order',width:230}
|
||
, {field: 'delivery', title: '客户基本信息', align: 'center',templet:'#delivery'}
|
||
, {field: 'order_goods', title: '商品信息', align: 'center',templet:'#goods',width:320}
|
||
, {field: 'total_amount', title: '支付信息', align: 'center',templet:'#amount',width:180}
|
||
, {field: 'admin_id', title: '订单归属人', align: 'center',width:180}
|
||
, {fixed: 'right', title: '操作', width: 160, 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 id = obj.data.id;
|
||
if(obj.event === 'detail'){
|
||
layer.open({
|
||
type: 2
|
||
,title: '订单详情'
|
||
,content: '{:url("order/detail")}?id='+id
|
||
,area: ['90%', '90%']
|
||
,yes: function(index, layero){
|
||
table.reload('order-lists');
|
||
}
|
||
})
|
||
}
|
||
|
||
if(obj.event === 'allocation'){
|
||
var id = obj.data.id;
|
||
layer.open({
|
||
type: 2
|
||
,title: '修改订单归属人'
|
||
,content: '{:url("order/allocation")}?id='+id
|
||
,area: ['50%', '50%']
|
||
,btn: ['确定', '取消']
|
||
,yes: function(index, layero){
|
||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||
,submit = layero.find('iframe').contents().find('#adjust_level-submit');
|
||
//监听提交
|
||
iframeWindow.layui.form.on('submit(adjust_level-submit)', function(data){
|
||
var field = data.field;
|
||
$.ajax({
|
||
url:'{:url("order/allocation")}?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');//数据刷新
|
||
}else{
|
||
layer.msg(res.msg, {
|
||
offset: '15px'
|
||
, icon: 2
|
||
, time: 1000
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
submit.trigger('click');
|
||
}
|
||
})
|
||
}
|
||
//修改订单的渠道
|
||
if(obj.event === 'channel'){
|
||
var id = obj.data.id;
|
||
layer.open({
|
||
type: 2
|
||
,title: '修改订单渠道'
|
||
,content: '{:url("order/channel")}?id='+id
|
||
,area: ['50%', '50%']
|
||
,btn: ['确定', '取消']
|
||
,yes: function(index, layero){
|
||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||
,submit = layero.find('iframe').contents().find('#adjust_level-submit');
|
||
//监听提交
|
||
iframeWindow.layui.form.on('submit(adjust_level-submit)', function(data){
|
||
var field = data.field;
|
||
$.ajax({
|
||
url:'{:url("order/channel")}?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');//数据刷新
|
||
}else{
|
||
layer.msg(res.msg, {
|
||
offset: '15px'
|
||
, icon: 2
|
||
, time: 1000
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
submit.trigger('click');
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
//删除订单
|
||
if(obj.event === 'del'){
|
||
layer.confirm('删除后订单将消失,确认删除订单吗?', {
|
||
btn: ['确认','取消'] //按钮
|
||
}, function(){
|
||
like.ajax({
|
||
url: '{:url("order/del")}'
|
||
, 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 === 'delivery'){
|
||
layer.open({
|
||
type: 2
|
||
,title: '订单发货'
|
||
,content: '{:url("order/delivery")}?id='+id
|
||
,area: ['90%', '90%']
|
||
,yes: function(index, layero){
|
||
|
||
}
|
||
})
|
||
}
|
||
|
||
//物流信息
|
||
if(obj.event === 'express'){
|
||
layer.open({
|
||
type: 2
|
||
,title: '订单发货'
|
||
,content: '{:url("order/express")}?id='+id
|
||
,area: ['90%', '90%']
|
||
,yes: function(index, layero){
|
||
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
//确认收货
|
||
if(obj.event === 'confirm'){
|
||
layer.confirm('确认订单商品已收货吗?', {
|
||
btn: ['确认','取消'] //按钮
|
||
}, function(){
|
||
like.ajax({
|
||
url: '{:url("order/confirm")}'
|
||
, 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 === 'cancelss'){
|
||
layer.confirm('确认订单退款吗?', {
|
||
btn: ['确认','取消'] //按钮
|
||
}, function(){
|
||
like.ajax({
|
||
url: '{:url("order/cancel")}'
|
||
, 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 === 'cancel'){
|
||
layer.confirm('确定删除订单的数据?', {
|
||
btn: ['确认','取消'] //按钮
|
||
}, function(){
|
||
like.ajax({
|
||
url: '{:url("order/del")}'
|
||
, 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 === '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
|
||
});
|
||
}
|
||
}
|
||
});
|
||
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
//修改订单的详情
|
||
if(obj.event ==='edit'){
|
||
layer.open({
|
||
type: 2
|
||
,title: '修改服务订单'
|
||
,content: '{:url("order/eidt")}?id='+id
|
||
|
||
,area: ['70%', '85%']
|
||
,btn: ['确定', '取消']
|
||
,yes: function(index, layero){
|
||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||
,submitID = 'user_group-submit'
|
||
,submit = layero.find('iframe').contents().find("#adjust_user-submit");
|
||
//监听提交
|
||
iframeWindow.layui.form.on('submit(adjust_user-submit)', function(data){
|
||
var field = data.field;
|
||
like.ajax({
|
||
url:'{:url("order/eidt")}',
|
||
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> |