order.php 4.9 KB
<!DOCTYPE html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>表单填写</title>
    <link rel="stylesheet" type="text/css" href="/assets/common/css/themes/gray/easyui.css" />
	<link rel="stylesheet" type="text/css" href="/assets/common/css/themes/gray/menu.css" />
    <link rel="stylesheet" type="text/css" href="/assets/common/css/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="/assets/web/css/jitnry.css" />
	<link rel="stylesheet" type="text/css" href="/assets/web/css/common_car.css" />
    <script type="text/javascript" src="/assets/common/js/jquery.min.1.9.4.js"></script>
	<script type="text/javascript" src="/assets/common/js/jquery.easyui.min.1.9.4.js"></script>
    <script type="text/javascript" src="/assets/common/js/jquery.cookie.1.4.1.js"></script>
	<!-- 插件调用 --->
	<script type="text/javascript" src="/assets/common/js/datagrid-detailview.js"></script>
	<script type="text/javascript" src="/assets/common/locale/easyui-lang-zh_CN.js"></script>
	<!-- 基础 JS 调用 -->
	<script type="text/javascript" src="/assets/web/js/src/easyui.base.js"></script>
	<script type="text/javascript" src="/assets/web/js/src/allCity.js"></script>


    <!--富文本编辑器-->
    <link rel="stylesheet" href="/assets/kindeditor/themes/default/default.css" />
    <script src="/assets/kindeditor/kindeditor.js"></script>
    <script src="/assets/kindeditor/kindeditor-all.js"></script>
    <script src="/assets/kindeditor/kindeditor-all-min.js"></script>
    <script charset="utf-8" src="/assets/kindeditor/kindeditor-min.js"></script>
    <script charset="utf-8" src="/assets/kindeditor/lang/zh_CN.js"></script>

</head>
<body style="margin-bottom: 54px;">



	<div class="easyui-layout" data-options="fit:true">
		<!-- <div data-options="region:'north',title:'头部',split:true" style="height:100px;"> -->
		 <!-- </div> -->
		 <!-- <div data-options="region:'east',title:'确认信息',split:true" style="width:100px;"></div> -->
        <div data-options="split:false,region:'west',collapsible:true,footer:'#win_base_org_form_footer'" title="订单列表" id="saveBox" style="width:100%;">

            <div class="easyui-panel" style="width:100%;max-width:100%;padding: 20px 10px">
                <div style="margin-bottom:5px;">
                    <a id="derive_btn" href="/products/product/to_excel"  class="easyui-linkbutton" style="height:28px" data-options="iconCls:'icon-undo'">导出</a>
                </div>
            </div>

            <table id="dg"  style="width: 100%; height: 75%"
                   data-options="rownumbers:true,singleSelect:true,pagination:true,url:'/products/product/get_order_list',method:'get',
                   onDblClickRow :function(rowIndex,rowData){
                        memnerid = rowData;
  				        showSelectedSurveryDataOnMap(rowData);
     				}">
                <thead>
                <tr>
                    <th data-options="field:'order_code',width:150,align:'center'">订单编号</th>
                    <th data-options="field:'goods_name',width:150,align:'center'">商品名称</th>
                    <th data-options="field:'name',width:100,align:'center'">用户名</th>
                    <th data-options="field:'phone',width:150,align:'center'">电话</th>
                    <th data-options="field:'address',width:250,align:'center'">详细地址</th>
                    <th data-options="field:'num',width:80,align:'center'">产品数量</th>
                    <th data-options="field:'price',width:100,align:'center'">总金额</th>
                    <th data-options="field:'addTime',width:200,align:'center'">下单时间</th>
                    <th width="50" data-options="field:'id',formatter:formatOper">操作</th>
                </tr>
                </thead>
            </table>
        </div>
		<!-- <div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div> -->
	</div>
</body>
<tbody id="html_table"></tbody>
<script type="text/javascript" src="/assets/web/js/src/common_product.js"></script>

<script>

    function formatOper(val, row, index) {

        return '<a href="javascript:void(0)" onclick="showUser(' + val + ')">删除</a>';
    }

    //删除
    function showUser(row){
        if(confirm("确实要删除?")){
            var result = {
                id:row
            }
            $.ajax({
                url:'/products/product/order_del',
                type: "post",
                data: result,
                success: function (data) {
                    console.log(data);
                    $('#dg').datagrid('reload');
                    $.messager.alert("提示", data.msg);
                },
                error:function(data){
                    console.log(data)
                }
            })
        }

    }

</script>
</html>