Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
49059725
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49059725
编写于
3月 20, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
运费模板
上级
6c622fcd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
227 addition
and
98 deletion
+227
-98
application/plugins/freightfee/Admin.php
application/plugins/freightfee/Admin.php
+18
-1
application/plugins/view/freightfee/admin/index.html
application/plugins/view/freightfee/admin/index.html
+50
-48
application/plugins/view/freightfee/admin/saveinfo.html
application/plugins/view/freightfee/admin/saveinfo.html
+132
-31
public/static/plugins/css/freightfee/admin.css
public/static/plugins/css/freightfee/admin.css
+1
-1
public/static/plugins/js/freightfee/admin.js
public/static/plugins/js/freightfee/admin.js
+26
-17
未找到文件。
application/plugins/freightfee/Admin.php
浏览文件 @
49059725
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\freightfee
;
use
think\Db
;
use
think\Controller
;
use
app\service\PluginsService
;
use
app\service\RegionService
;
...
...
@@ -36,6 +37,15 @@ class Admin extends Controller
$ret
=
PluginsService
::
PluginsData
(
'freightfee'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 数据处理
if
(
!
empty
(
$ret
[
'data'
][
'data'
]))
{
foreach
(
$ret
[
'data'
][
'data'
]
as
&
$v
)
{
$v
[
'region_names'
]
=
empty
(
$v
[
'region_show'
])
?
''
:
implode
(
'、'
,
Db
::
name
(
'Region'
)
->
where
(
'id'
,
'in'
,
explode
(
'-'
,
$v
[
'region_show'
]))
->
column
(
'name'
));
}
}
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/freightfee/admin/index'
);
}
else
{
...
...
@@ -73,7 +83,14 @@ class Admin extends Controller
},
$region
);
}
//print_r($ret['data']);
// 数据处理
if
(
!
empty
(
$ret
[
'data'
][
'data'
]))
{
foreach
(
$ret
[
'data'
][
'data'
]
as
&
$v
)
{
$v
[
'region_names'
]
=
empty
(
$v
[
'region_show'
])
?
''
:
implode
(
'、'
,
Db
::
name
(
'Region'
)
->
where
(
'id'
,
'in'
,
explode
(
'-'
,
$v
[
'region_show'
]))
->
column
(
'name'
));
}
}
$this
->
assign
(
'region_list'
,
$region
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
...
...
application/plugins/view/freightfee/admin/index.html
浏览文件 @
49059725
...
...
@@ -10,61 +10,63 @@
<div
class=
"freightfee-content"
>
<div
class=
"items"
>
<label>
应用导航名称
</label>
<label>
计价方式
</label>
<div>
{{if
!empty($data['application_name'])
}}
{{$data.application_name}}
{{if
isset($data['valuation']) and $data['valuation'] eq 0
}}
按件数
{{else /}}
无
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
登录入口名称
</label>
<div>
{{if !empty($data['login_name'])}}
{{$data.login_name}}
{{else /}}
游客登录
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
游客用户名
</label>
<div>
{{if !empty($data['nickname'])}}
{{$data.nickname}}
{{else /}}
游客
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
订单查询提示
</label>
<div>
{{if !empty($data['query_tips'])}}
{{$data.query_tips}}
{{else /}}
无
按重量
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
默认游客登录
</label>
<div>
{{if isset($data['is_default_tourist']) and $data['is_default_tourist'] eq 1}}
是
{{else /}}
否
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
订单查询地址
</label>
<div>
<a
href=
"{{:PluginsHomeUrl('freightfee', 'index', 'index')}}"
target=
"_blank"
>
{{:PluginsHomeUrl('freightfee', 'index', 'index')}}
</a>
<label>
运费模板
</label>
<div
class=
"freightfee-rules"
>
<table
class=
"am-table am-table-striped"
>
{{if empty($data['data'])}}
没有配置
{{else /}}
{{if isset($data['valuation']) and $data['valuation'] eq 0}}
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(件)
</th>
<th>
首费(元)
</th>
<th>
续件数(件)
</th>
<th>
续费(元)
</th>
</tr>
</thead>
{{else /}}
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(kg)
</th>
<th>
首费(元)
</th>
<th>
续件数(kg)
</th>
<th>
续费(元)
</th>
</tr>
</thead>
{{/if}}
<tbody>
{{foreach $data.data as $k=>$v}}
<tr
class=
"data-list-{{$k}}"
>
<td
class=
"first"
>
{{if $v['region'] eq 'default'}}
默认运费
{{else /}}
<div
class=
"region-td"
>
{{$v.region_names}}
</div>
{{/if}}
</td>
<td>
{{$v.first}}
</td>
<td>
{{$v.first_price}}
</td>
<td>
{{$v.continue}}
</td>
<td>
{{$v.continue_price}}
</td>
</tr>
{{/foreach}}
</tbody>
{{/if}}
</table>
</div>
</div>
...
...
application/plugins/view/freightfee/admin/saveinfo.html
浏览文件 @
49059725
...
...
@@ -23,37 +23,138 @@
<div
class=
"business-form-block freightfee-rules"
>
<table
class=
"am-table am-table-striped"
>
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(件)
</th>
<th>
首费(元)
</th>
<th>
续件数(件)
</th>
<th>
续费(元)
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr>
<td
class=
"first"
>
<div
class=
"region-td none"
></div>
默认运费
<input
type=
"text"
class=
"am-radius region-name"
name=
"region_name[0]['region']"
data-validation-message=
"请选择地区"
value=
"default"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-name"
name=
"first_name[0]['first']"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-price-name"
name=
"first_price_name[0]['first_price']"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,小数保留两位"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-name"
name=
"continue_name[0]['continue']"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-price-name"
name=
"continue_price_name[0]['continue_price']"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位"
required
/>
</td>
<td>
<!--operation-->
</td>
</tr>
</tbody>
{{if empty($data['data'])}}
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(件)
</th>
<th>
首费(元)
</th>
<th>
续件数(件)
</th>
<th>
续费(元)
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr>
<td
class=
"first"
>
<div
class=
"region-td none"
></div>
默认运费
<input
type=
"text"
class=
"am-radius region-name"
name=
"data[0][region]"
data-validation-message=
"请选择地区"
value=
"default"
required
/>
<input
type=
"hidden"
class=
"am-radius region-name-show"
name=
"data[0][region_show]"
value=
""
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-name"
name=
"data[0][first]"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-price-name"
name=
"data[0][first_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,小数保留两位"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-name"
name=
"data[0][continue]"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-price-name"
name=
"data[0][continue_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位"
required
/>
</td>
<td>
<!--operation-->
</td>
</tr>
</tbody>
{{else /}}
{{if isset($data['valuation']) and $data['valuation'] eq 0}}
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(件)
</th>
<th>
首费(元)
</th>
<th>
续件数(件)
</th>
<th>
续费(元)
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
{{foreach $data.data as $k=>$v}}
<tr
class=
"data-list-{{$k}}"
>
<td
class=
"first"
>
{{if $v['region'] eq 'default'}}
<div
class=
"region-td none"
></div>
默认运费
<input
type=
"text"
class=
"am-radius region-name"
name=
"data[{{$k}}][region]"
data-validation-message=
"请选择地区"
value=
"default"
required
/>
<input
type=
"hidden"
class=
"am-radius region-name-show"
name=
"data[{{$k}}][region_show]"
value=
"{{$v.region}}"
/>
{{else /}}
<div
class=
"region-td"
>
{{$v.region_names}}
</div>
<span
class=
"fs-12 cr-blue c-p line-edit"
data-index=
"{{$k}}"
>
添加地区
</span>
<input
type=
"text"
class=
"am-radius region-name"
name=
"data[{{$k}}][region]"
data-validation-message=
"请选择地区"
value=
"{{$v.region}}"
required
/>
<input
type=
"hidden"
class=
"am-radius region-name-show"
name=
"data[{{$k}}][region_show]"
value=
"{{$v.region}}"
/>
{{/if}}
</td>
<td>
<input
type=
"number"
class=
"am-radius first-name"
name=
"data[{{$k}}][first]"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
value=
"{{$v.first}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-price-name"
name=
"data[{{$k}}][first_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,小数保留两位"
value=
"{{$v.first_price}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-name"
name=
"data[{{$k}}][continue]"
min=
"1"
max=
"9999"
data-validation-message=
"输入 1~9999 的整数"
value=
"{{$v.continue}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-price-name"
name=
"data[{{$k}}][continue_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位"
value=
"{{$v.continue_price}}"
required
/>
</td>
{{if $v['region'] eq 'default'}}
<td>
<!--operation-->
</td>
{{else /}}
<td>
<span
class=
"fs-12 cr-red c-p line-remove"
>
删除
</span>
</td>
{{/if}}
</tr>
{{/foreach}}
</tbody>
{{else /}}
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(kg)
</th>
<th>
首费(元)
</th>
<th>
续件数(kg)
</th>
<th>
续费(元)
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
{{foreach $data.data as $k=>$v}}
<tr
class=
"data-list-{{$k}}"
>
<td
class=
"first"
>
{{if $v['region'] eq 'default'}}
<div
class=
"region-td none"
></div>
默认运费
<input
type=
"text"
class=
"am-radius region-name"
name=
"data[{{$k}}][region]"
data-validation-message=
"请选择地区"
value=
"default"
required
/>
<input
type=
"hidden"
class=
"am-radius region-name-show"
name=
"data[{{$k}}][region_show]"
value=
"{{$v.region}}"
/>
{{else /}}
<div
class=
"region-td"
>
{{$v.region_names}}
</div>
<span
class=
"fs-12 cr-blue c-p line-edit"
data-index=
"{{$k}}"
>
添加地区
</span>
<input
type=
"text"
class=
"am-radius region-name"
name=
"data[{{$k}}][region]"
data-validation-message=
"请选择地区"
value=
"{{$v.region}}"
required
/>
<input
type=
"hidden"
class=
"am-radius region-name-show"
name=
"data[{{$k}}][region_show]"
value=
"{{$v.region}}"
/>
{{/if}}
</td>
<td>
<input
type=
"number"
class=
"am-radius first-name"
name=
"data[{{$k}}][first]"
min=
"0.1"
max=
"9999.0"
step=
"0.1"
data-validation-message=
"输入 0.1~9999.9 的数字,小数保留1位"
value=
"{{$v.first}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius first-price-name"
name=
"data[{{$k}}][first_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,小数保留两位"
value=
"{{$v.first_price}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-name"
name=
"data[{{$k}}][continue]"
min=
"0.1"
max=
"9999.0"
step=
"0.1"
data-validation-message=
"输入 0.1~9999.9 的数字,小数保留1位"
value=
"{{$v.continue}}"
required
/>
</td>
<td>
<input
type=
"number"
class=
"am-radius continue-price-name"
name=
"data[{{$k}}][continue_price]"
min=
"0.00"
max=
"999.99"
step=
"0.01"
step=
"0.01"
data-validation-message=
"应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位"
value=
"{{$v.continue_price}}"
required
/>
</td>
{{if $v['region'] eq 'default'}}
<td>
<!--operation-->
</td>
{{else /}}
<td>
<span
class=
"fs-12 cr-red c-p line-remove"
>
删除
</span>
</td>
{{/if}}
</tr>
{{/foreach}}
</tbody>
{{/if}}
{{/if}}
</table>
<span
class=
"business-operations-submit rules-submit-add"
>
+为指定地区城市设置运费
</span>
</div>
...
...
public/static/plugins/css/freightfee/admin.css
浏览文件 @
49059725
...
...
@@ -11,7 +11,7 @@
}
/**
*
编辑页面
*
运费模板
*/
.freightfee-rules
table
.am-table
{
margin-bottom
:
10px
;
...
...
public/static/plugins/js/freightfee/admin.js
浏览文件 @
49059725
...
...
@@ -38,18 +38,20 @@ $(function()
case
0
:
html
+=
'
<tr>
'
;
html
+=
'
<td class="first"><div class="region-td none"></div>默认运费
'
;
html
+=
'
<input type="text" class="am-radius region-name" name="region_name[0][
\'
region
\'
]" data-validation-message="请选择地区" value="default" required /></td>
'
;
html
+=
'
<input type="text" class="am-radius region-name" name="data[0][region]" data-validation-message="请选择地区" value="default" required />
'
;
html
+=
'
<input type="hidden" class="am-radius region-name-show" name="data[0][region_show]" value="" />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius first-name" name="
first_name[0][
\'
first
\'
]" min="1" max="9999" data-validation-message="输入 1~9999 的整数" required />
'
;
html
+=
'
<input type="number" class="am-radius first-name" name="
data[0][first
]" min="1" max="9999" data-validation-message="输入 1~9999 的整数" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius first-price-name" name="
first_price_name[0][
\'
first_price
\'
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,小数保留两位" required />
'
;
html
+=
'
<input type="number" class="am-radius first-price-name" name="
data[0][first_price
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,小数保留两位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius continue-name" name="
continue_name[0][
\'
continue
\'
]" min="1" max="9999" data-validation-message="输入 1~9999 的整数" required />
'
;
html
+=
'
<input type="number" class="am-radius continue-name" name="
data[0][continue
]" min="1" max="9999" data-validation-message="输入 1~9999 的整数" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius continue-price-name" name="
continue_price_name[0][
\'
continue_price
\'
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位" required />
'
;
html
+=
'
<input type="number" class="am-radius continue-price-name" name="
data[0][continue_price
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td><!--operation--></td>
'
;
html
+=
'
</tr>
'
;
...
...
@@ -59,18 +61,20 @@ $(function()
case
1
:
html
+=
'
<tr>
'
;
html
+=
'
<td class="first"><div class="region-td none"></div>默认运费
'
;
html
+=
'
<input type="text" class="am-radius region-name" name="region_name[0][
\'
region
\'
]" data-validation-message="请选择地区" value="default" required /></td>
'
;
html
+=
'
<input type="text" class="am-radius region-name" name="data[0][region]" data-validation-message="请选择地区" value="default" required />
'
;
html
+=
'
<input type="hidden" class="am-radius region-name-show" name="data[0][region_show]" value="" />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius first-name" name="
first_name[0][
\'
first
\'
]" min="0.1" max="9999.0" step="0.1" data-validation-message="输入 0.1~9999.9 的数字,小数保留1位" required />
'
;
html
+=
'
<input type="number" class="am-radius first-name" name="
data[0][first
]" min="0.1" max="9999.0" step="0.1" data-validation-message="输入 0.1~9999.9 的数字,小数保留1位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius first-price-name" name="
first_price_name[0][
\'
first_price
\'
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,小数保留两位" required />
'
;
html
+=
'
<input type="number" class="am-radius first-price-name" name="
data[0][first_price
]" min="0.00" max="999.99" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,小数保留两位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius continue-name" name="
continue_name[0][
\'
continue
\'
]" min="0.1" max="9999.0" step="0.1" data-validation-message="输入 0.1~9999.9 的数字,小数保留1位" required />
'
;
html
+=
'
<input type="number" class="am-radius continue-name" name="
data[0][continue
]" min="0.1" max="9999.0" step="0.1" data-validation-message="输入 0.1~9999.9 的数字,小数保留1位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td>
'
;
html
+=
'
<input type="number" class="am-radius continue-price-name" name="
continue_price_name[0][
\'
continue_price
\'
]" min="0.00" max="999.99" step="0.01" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位" required />
'
;
html
+=
'
<input type="number" class="am-radius continue-price-name" name="
data[0][continue_price
]" min="0.00" max="999.99" step="0.01" step="0.01" data-validation-message="应输入 0.00~999.99 的数字,且不能大于首费,小数保留两位" required />
'
;
html
+=
'
</td>
'
;
html
+=
'
<td><!--operation--></td>
'
;
html
+=
'
</tr>
'
;
...
...
@@ -121,11 +125,12 @@ $(function()
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last
'
).
removeClass
().
addClass
(
'
data-list-
'
+
index
);
// name名称设置
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .region-name
'
).
attr
(
'
name
'
,
'
region_name[
'
+
index
+
'
][
\'
region
\'
]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .first-name
'
).
attr
(
'
name
'
,
'
first_name[
'
+
index
+
'
][
\'
first
\'
]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .first-price-name
'
).
attr
(
'
name
'
,
'
first_price_name[
'
+
index
+
'
][
\'
first_price
\'
]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .continue-name
'
).
attr
(
'
name
'
,
'
continue_name[
'
+
index
+
'
][
\'
continue
\'
]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .continue-price-name
'
).
attr
(
'
name
'
,
'
continue_price_name[
'
+
index
+
'
][
\'
continue_price
\'
]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .region-name
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][region]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .region-name-show
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][region_show]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .first-name
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][first]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .first-price-name
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][first_price]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .continue-name
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][continue]
'
);
$
(
'
.freightfee-rules table.am-table
'
).
find
(
'
tbody tr:last .continue-price-name
'
).
attr
(
'
name
'
,
'
data[
'
+
index
+
'
][continue_price]
'
);
});
// 行移除
...
...
@@ -141,7 +146,7 @@ $(function()
$
(
'
#freightfee-region-popup
'
).
modal
();
$
(
'
#freightfee-region-popup
'
).
attr
(
'
data-index
'
,
index
);
// 清
楚
选中
// 清
除
选中
$
(
'
#freightfee-region-popup
'
).
find
(
'
.province-name
'
).
removeClass
(
'
selected
'
).
removeClass
(
'
selected-may
'
);
$
(
'
#freightfee-region-popup
'
).
find
(
'
.city-name
'
).
parent
(
'
li
'
).
removeClass
(
'
selected
'
);
...
...
@@ -216,6 +221,7 @@ $(function()
{
var
name_all
=
[];
var
ids_all
=
[];
var
show_ids_all
=
[];
var
city_index
=
0
;
var
province_index
=
0
;
var
province_id
=
0
;
...
...
@@ -229,12 +235,14 @@ $(function()
{
province_id
=
temp_province_id
;
name_all
[
province_index
]
=
$
(
this
).
parent
(
'
.city-list
'
).
prev
(
'
.province-name
'
).
text
();
show_ids_all
[
province_index
]
=
temp_province_id
;
province_index
++
;
}
}
else
{
if
(
$
(
this
).
hasClass
(
'
selected
'
))
{
name_all
[
province_index
]
=
$
(
this
).
find
(
'
.city-name
'
).
text
();
show_ids_all
[
province_index
]
=
$
(
this
).
find
(
'
.city-name
'
).
data
(
'
city-id
'
);
province_index
++
;
}
}
...
...
@@ -253,7 +261,8 @@ $(function()
$content
.
addClass
(
'
none
'
);
}
$
(
'
.data-list-
'
+
$
(
'
#freightfee-region-popup
'
).
attr
(
'
data-index
'
)
+
'
td.first input
'
).
val
(
ids_all
.
join
(
'
-
'
));
$
(
'
.data-list-
'
+
$
(
'
#freightfee-region-popup
'
).
attr
(
'
data-index
'
)
+
'
td.first input.region-name
'
).
val
(
ids_all
.
join
(
'
-
'
));
$
(
'
.data-list-
'
+
$
(
'
#freightfee-region-popup
'
).
attr
(
'
data-index
'
)
+
'
td.first input.region-name-show
'
).
val
(
show_ids_all
.
join
(
'
-
'
));
$
(
'
#freightfee-region-popup
'
).
modal
(
'
close
'
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录