mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update form.html
This commit is contained in:
parent
6407bbaa82
commit
d96b1d2738
@ -23,8 +23,7 @@
|
|||||||
<tr ng-repeat="item in rules">
|
<tr ng-repeat="item in rules">
|
||||||
<td>
|
<td>
|
||||||
<span class="margin-right-5" ng-repeat="province in item.city" ng-if="ShowProvinceStatus(province)">
|
<span class="margin-right-5" ng-repeat="province in item.city" ng-if="ShowProvinceStatus(province)">
|
||||||
<b class="font-w7" ng-bind="province.name"></b>
|
<b class="font-w7" ng-bind="province.name"></b><b class="color-desc">({{ShowProvinceCityName(province)}})</b>
|
||||||
<b class="color-desc">({{ShowProvinceCityName(province)}})</b>
|
|
||||||
</span>
|
</span>
|
||||||
<a class="margin-left-5" ng-click="EditRuleItem(item)">编辑</a>
|
<a class="margin-left-5" ng-click="EditRuleItem(item)">编辑</a>
|
||||||
<a class="margin-left-5" ng-click="RemoveRuleItem(item)">删除</a>
|
<a class="margin-left-5" ng-click="RemoveRuleItem(item)">删除</a>
|
||||||
@ -104,7 +103,7 @@
|
|||||||
$rootScope.rules = [];
|
$rootScope.rules = [];
|
||||||
$rootScope.city = {subs: []};
|
$rootScope.city = {subs: []};
|
||||||
$rootScope.citys = angular.fromJson(_data) || [];
|
$rootScope.citys = angular.fromJson(_data) || [];
|
||||||
/*! 默认显示所有城市 */
|
/*! 默认显示城市 */
|
||||||
$rootScope.citys.forEach(function (item) {
|
$rootScope.citys.forEach(function (item) {
|
||||||
delete item.id, delete item.pid;
|
delete item.id, delete item.pid;
|
||||||
item.subs.forEach(function (item) {
|
item.subs.forEach(function (item) {
|
||||||
@ -116,7 +115,7 @@
|
|||||||
$rootScope.AddRuleItem = function () {
|
$rootScope.AddRuleItem = function () {
|
||||||
$rootScope.rule = angular.fromJson(angular.toJson(_rule));
|
$rootScope.rule = angular.fromJson(angular.toJson(_rule));
|
||||||
$rootScope.rules.push($rootScope.rule);
|
$rootScope.rules.push($rootScope.rule);
|
||||||
$rootScope.showDailog();
|
$rootScope.showDialog();
|
||||||
};
|
};
|
||||||
/*! 编辑规则选项 */
|
/*! 编辑规则选项 */
|
||||||
$rootScope.EditRuleItem = function (rule) {
|
$rootScope.EditRuleItem = function (rule) {
|
||||||
@ -126,7 +125,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
$rootScope.rule = rule;
|
$rootScope.rule = rule;
|
||||||
$rootScope.showDailog();
|
$rootScope.showDialog();
|
||||||
}
|
}
|
||||||
/*! 删除规则选项 */
|
/*! 删除规则选项 */
|
||||||
$rootScope.RemoveRuleItem = function (rule) {
|
$rootScope.RemoveRuleItem = function (rule) {
|
||||||
@ -192,7 +191,7 @@
|
|||||||
if (item.show) item.status = !!province.status;
|
if (item.show) item.status = !!province.status;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$rootScope.showDailog = function () {
|
$rootScope.showDialog = function () {
|
||||||
layui.layer.open({
|
layui.layer.open({
|
||||||
type: 1, shade: false, area: '800px', title: '选择配送区域',
|
type: 1, shade: false, area: '800px', title: '选择配送区域',
|
||||||
content: $('#RegionDialog').removeClass('layui-hide'), end: function () {
|
content: $('#RegionDialog').removeClass('layui-hide'), end: function () {
|
||||||
@ -238,5 +237,4 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user