|
@@ -0,0 +1,191 @@
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
+ <link rel="Bookmark" href="/favicon.ico" >
|
|
|
+ <link rel="Shortcut Icon" href="/favicon.ico" />
|
|
|
+<#include "/base/list_base.ftl">
|
|
|
+ <title>地址信息列表</title>
|
|
|
+ <style>
|
|
|
+ html{-webkit-text-size-adjust:none;}
|
|
|
+ *{padding: 0;margin: 0;}
|
|
|
+ .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
|
|
|
+ /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
|
|
|
+ .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
|
|
|
+ .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;height: 32px;background-color: #fff;color: #50a2ea;}
|
|
|
+ .barcodeImg{margin:10px 0px}
|
|
|
+ .table-bg thead th{background-color: #e2f6ff;}
|
|
|
+ input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
|
|
|
+ <span class="c-gray en">/</span> 地址管理
|
|
|
+ <span class="c-gray en">/</span> 地址列表
|
|
|
+ <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a>
|
|
|
+</nav>
|
|
|
+<div class="page-container">
|
|
|
+ <div class="text-c">
|
|
|
+ <form action="${path}/address/listProvinces" method="post">
|
|
|
+ <input type="text" class="my-input trim_input" style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${provinceName!''}" placeholder="省名称" id="provinceName" name="provinceName">
|
|
|
+
|
|
|
+ <button type="submit" class="btn" style="background: #50a2ea;border: 1px solid #50a2ea;color: #fff;height: 35px;margin-top: -8px;"><i class="Hui-iconfont"></i> 查询</button>
|
|
|
+
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mt-20">
|
|
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th width="50">省</th>
|
|
|
+ <th width="50">市</th>
|
|
|
+ <th width="50">区</th>
|
|
|
+ <th width="5">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <#if page.dataList?? && (page.dataList?size > 0) >
|
|
|
+ <#list page.dataList as province>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th>${province.province!''}(${province.divisionCode!''})</th>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td>
|
|
|
+ <a style="text-decoration:none" href="javascript:;" title="添加市"
|
|
|
+ onclick="add('添加市','${path}/address/to_add_city?provinceId=${province.provinceId!''}','570','450');">
|
|
|
+ <i class="Hui-iconfont">添加市</i>
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <#list province.cityList as city>
|
|
|
+ <tr class="text-c">
|
|
|
+ <td></td>
|
|
|
+ <td>${city.city!''}(${city.divisionCode!''})</td>
|
|
|
+ <td style="width: 30%;">
|
|
|
+ <select class="my-select" style="width: 200px;" id="district${city.cityId!''}">
|
|
|
+ <#list city.districtList as district>
|
|
|
+ <option value="${district.districtId!''}">${district.district!''}(${district.divisionCode!''})</option>
|
|
|
+ </#list>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <a style="text-decoration:none" href="javascript:;" title="删除市"
|
|
|
+ onclick="detectCity('${city.cityId!''}','${city.city!''}');">
|
|
|
+ <i class="Hui-iconfont">删除市</i>
|
|
|
+ </a>
|
|
|
+ <a style="text-decoration:none" href="javascript:;" title="删除区"
|
|
|
+ onclick="detectDistrict('${city.cityId!''}');">
|
|
|
+ <i class="Hui-iconfont">删除区</i>
|
|
|
+ </a>
|
|
|
+ <a style="text-decoration:none" href="javascript:;" title="添加区"
|
|
|
+ onclick="add('添加区','${path}/address/to_add_district?cityId=${city.cityId!''}','570','450');">
|
|
|
+ <i class="Hui-iconfont">添加区</i>
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </#list>
|
|
|
+ </#list>
|
|
|
+ <#else>
|
|
|
+ <tr><td colspan="4" class="td-manage text-c" >暂时没有数据,请添加!</td></tr>
|
|
|
+ </#if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<tfoot>
|
|
|
+<#include "/base/page_util.ftl">
|
|
|
+</tfoot>
|
|
|
+<script>
|
|
|
+
|
|
|
+ /**
|
|
|
+ *跳转到添加产品
|
|
|
+ * @param employee
|
|
|
+ */
|
|
|
+ function to_add() {
|
|
|
+ window.location.href= "${path}/admin/product/to_add_product";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *跳转到修改产品
|
|
|
+ * @param employee
|
|
|
+ */
|
|
|
+ function to_update(productId) {
|
|
|
+ window.location.href= "${path}/admin/product/to_update_product?productId="+productId;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /*分配快递方式*/
|
|
|
+ function add(title,url,w,h){
|
|
|
+ layer_show(title,url,w,h);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除市
|
|
|
+ * @param productId
|
|
|
+ * @param state
|
|
|
+ */
|
|
|
+ function detectCity(cityId,cityName) {
|
|
|
+ layer.confirm('确认要删除'+cityName+'吗?',function(index){
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ "cityId" :cityId
|
|
|
+ },
|
|
|
+ url: "${path}/address/detect_city",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ layer.msg('已删除!',{icon: 5,time:1000},function () {
|
|
|
+ location.replace(location.href);
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ layer.msg("删除失败!", {icon: 5, time: 3000});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 删除区
|
|
|
+ * @param productId
|
|
|
+ * @param state
|
|
|
+ */
|
|
|
+ function detectDistrict(cityId) {
|
|
|
+ var districtId = $("#district"+cityId).val();
|
|
|
+ var districtName = $("#district"+cityId).find("option:selected").text();
|
|
|
+ layer.confirm('确认要删除'+districtName+'吗?',function(index){
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ "districtId" :districtId
|
|
|
+ },
|
|
|
+ url: "${path}/address/del_district",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ layer.msg('已删除!',{icon: 5,time:1000},function () {
|
|
|
+ location.replace(location.href);
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ layer.msg("删除失败!", {icon: 5, time: 3000});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|