商品订单信息管理
2017-12-21 09:30
260 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript" src="../../../js/angular/angular.js"></script>
</script>
<style type="text/css">
.kuan {
width: 100px;
height: 20px;
border-top-left-radius: 5em;
border-top-right-radius: 5em;
border-bottom-right-radius: 5em;
border-bottom-left-radius: 5em;
margin-left: 10px;
}
.sjh {
width: 100px;
height: 20px;
border-top-left-radius: 5em;
border-top-right-radius: 5em;
border-bottom-right-radius: 5em;
border-bottom-left-radius: 5em;
margin-left: 10px;
}
</style>
<script type="text/javascript">
var app = angular.module("myApp", []);
var time1 = new Date("2017-12-19 10:00:00");
var time2 = new Date("2017-12-19 12:00:00");
var time3 = new Date("2017-12-19 14:00:00");
var time4 = new Date("2017-12-19 16:00:00");
app.controller("myCtrl", function($scope) {
$scope.shops = [{
"id": 123,
"sname": "iphonex",
"yname": "张三",
"tel": 13716167236,
"price": 8699,
"city": "北京",
"time": time1,
"orderState": true,
"state": false
},
{
"id": 456,
"sname": "iphone6",
"yname": "王红",
"tel": 10086121212,
"price": 5635,
"city": "郑州",
"time": time4,
"orderState": true,
"state": false
},
{
"id": 789,
"sname": "iphone7",
"yname": "赵小龙",
"tel": 13693324137,
"price": 6180,
"city": "北京",
"time": time3,
"orderState": false,
"state": false
},
{
"id": 110,
"sname": "iphone8",
"yname": "赵强",
"tel": 13722335577,
"price": 7190,
"city": "上海",
"time": time2,
"orderState": false,
"state": false
}
];
//更改状态
$scope.changeOrderState = function(shop) {
shop.orderState = true;
}
//批量删除已发货商品
$scope.deleteSel = function() {
var selArr = [];
for(index in $scope.shops) {
if($scope.shops[index].state) { //多选框被选中的商品
if($scope.shops[index].orderState) { //多选框被选中的已发货商品
selArr.push($scope.shops[index]);
}
}
}
if(selArr.length > 0) {
for(index1 in selArr) {
for(index2 in $scope.shops) {
if(selArr[index1] == $scope.shops[index2]) {
$scope.shops.splice(index2, 1);
}
}
}
}else{
alert("先选择被选中的已发货商品");
}
}
//点击列明进行排序
$scope.flag = "";
$scope.column = "id";
$scope.orderColumn = function(column){
//alert(column);
$scope.column = column;
if($scope.flag == ""){
$scope.flag = "-";
}else{
$scope.flag = "";
}
}
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<center>
<h3>商品订单信息管理</h3>
<table border="1" cellspacing="0" cellpadding="10">
<input type="button" value="新增订单" />
<input type="button" value="批量删除" ng-click="deleteSel()" />
<input type="text" placeholder="按照商品名称查询..." class="kuan" ng-model="search" />
<input type="text" placeholder="按照手机号查询..." class="sjh" ng-model="telNum" />
<select style="margin-left: 30px;" ng-model="orderStateSel">
<option value="">--按照状态查询--</option>
<option value="true">--已发货--</option>
<option value="false">--未发货--</option>
</select><br /><br />
<tr>
<th><input type="checkbox" ng-click="selectFun()" ng-model="selsectAll" /></th>
<th>id <input type="submit" value="排序" ng-click="pid(shop.id)" /></th>
<th>商品名</th>
<th>用户名</th>
<th>手机号</th>
<th>价格<input type="submit" value="排序" </th>
<th>城市</th>
<th>下单时间:
<input type="button" ng-click="orderColumn('time')" value="排序" />
</th>
<th>状态</th>
</tr>
<tr ng-repeat="shop in shops | filter:{sname:search,tel:telNum,orderState:orderStateSel} | orderBy:flag+column">
<td><input type="checkbox" ng-model="shop.state" /></td>
<td>{{shop.id}}</td>
<td>{{shop.sname}}</td>
<td>{{shop.yname}}</td>
<td>{{shop.tel}}</td>
<td>{{shop.price | currency:"¥:"}}</td>
<td>{{shop.city}}</td>
<td>{{shop.time | date:"yyyy-MM-dd hh:mm:ss"}}</td>
<td>
<butt
a74e
on disabled="disabled" style="background: green; border: none;" ng-show="shop.orderState">已发货</button>
<button style="background: yellow; border: none;" ng-show="!shop.orderState" ng-click="changeOrderState(shop)">未发货</button>
</td>
</tr>
</table>
<fieldset id="" style="width: 500px;">
<legend>添加商品列表</legend>
<table border="1" cellspacing="0" cellpadding="10">
<tr>
<td>id</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>商品名</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>用户名</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>手机号</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>价格</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>城市</td>
<td><input style="border:1px solid red;" type="text" /></td>
</tr>
<tr>
<td>下单时间</td>
<td><input type="text" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="提交" /></td>
</tr>
</table>
</fieldset>
</center>
</body>
</html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript" src="../../../js/angular/angular.js"></script>
</script>
<style type="text/css">
.kuan {
width: 100px;
height: 20px;
border-top-left-radius: 5em;
border-top-right-radius: 5em;
border-bottom-right-radius: 5em;
border-bottom-left-radius: 5em;
margin-left: 10px;
}
.sjh {
width: 100px;
height: 20px;
border-top-left-radius: 5em;
border-top-right-radius: 5em;
border-bottom-right-radius: 5em;
border-bottom-left-radius: 5em;
margin-left: 10px;
}
</style>
<script type="text/javascript">
var app = angular.module("myApp", []);
var time1 = new Date("2017-12-19 10:00:00");
var time2 = new Date("2017-12-19 12:00:00");
var time3 = new Date("2017-12-19 14:00:00");
var time4 = new Date("2017-12-19 16:00:00");
app.controller("myCtrl", function($scope) {
$scope.shops = [{
"id": 123,
"sname": "iphonex",
"yname": "张三",
"tel": 13716167236,
"price": 8699,
"city": "北京",
"time": time1,
"orderState": true,
"state": false
},
{
"id": 456,
"sname": "iphone6",
"yname": "王红",
"tel": 10086121212,
"price": 5635,
"city": "郑州",
"time": time4,
"orderState": true,
"state": false
},
{
"id": 789,
"sname": "iphone7",
"yname": "赵小龙",
"tel": 13693324137,
"price": 6180,
"city": "北京",
"time": time3,
"orderState": false,
"state": false
},
{
"id": 110,
"sname": "iphone8",
"yname": "赵强",
"tel": 13722335577,
"price": 7190,
"city": "上海",
"time": time2,
"orderState": false,
"state": false
}
];
//更改状态
$scope.changeOrderState = function(shop) {
shop.orderState = true;
}
//批量删除已发货商品
$scope.deleteSel = function() {
var selArr = [];
for(index in $scope.shops) {
if($scope.shops[index].state) { //多选框被选中的商品
if($scope.shops[index].orderState) { //多选框被选中的已发货商品
selArr.push($scope.shops[index]);
}
}
}
if(selArr.length > 0) {
for(index1 in selArr) {
for(index2 in $scope.shops) {
if(selArr[index1] == $scope.shops[index2]) {
$scope.shops.splice(index2, 1);
}
}
}
}else{
alert("先选择被选中的已发货商品");
}
}
//点击列明进行排序
$scope.flag = "";
$scope.column = "id";
$scope.orderColumn = function(column){
//alert(column);
$scope.column = column;
if($scope.flag == ""){
$scope.flag = "-";
}else{
$scope.flag = "";
}
}
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<center>
<h3>商品订单信息管理</h3>
<table border="1" cellspacing="0" cellpadding="10">
<input type="button" value="新增订单" />
<input type="button" value="批量删除" ng-click="deleteSel()" />
<input type="text" placeholder="按照商品名称查询..." class="kuan" ng-model="search" />
<input type="text" placeholder="按照手机号查询..." class="sjh" ng-model="telNum" />
<select style="margin-left: 30px;" ng-model="orderStateSel">
<option value="">--按照状态查询--</option>
<option value="true">--已发货--</option>
<option value="false">--未发货--</option>
</select><br /><br />
<tr>
<th><input type="checkbox" ng-click="selectFun()" ng-model="selsectAll" /></th>
<th>id <input type="submit" value="排序" ng-click="pid(shop.id)" /></th>
<th>商品名</th>
<th>用户名</th>
<th>手机号</th>
<th>价格<input type="submit" value="排序" </th>
<th>城市</th>
<th>下单时间:
<input type="button" ng-click="orderColumn('time')" value="排序" />
</th>
<th>状态</th>
</tr>
<tr ng-repeat="shop in shops | filter:{sname:search,tel:telNum,orderState:orderStateSel} | orderBy:flag+column">
<td><input type="checkbox" ng-model="shop.state" /></td>
<td>{{shop.id}}</td>
<td>{{shop.sname}}</td>
<td>{{shop.yname}}</td>
<td>{{shop.tel}}</td>
<td>{{shop.price | currency:"¥:"}}</td>
<td>{{shop.city}}</td>
<td>{{shop.time | date:"yyyy-MM-dd hh:mm:ss"}}</td>
<td>
<butt
a74e
on disabled="disabled" style="background: green; border: none;" ng-show="shop.orderState">已发货</button>
<button style="background: yellow; border: none;" ng-show="!shop.orderState" ng-click="changeOrderState(shop)">未发货</button>
</td>
</tr>
</table>
<fieldset id="" style="width: 500px;">
<legend>添加商品列表</legend>
<table border="1" cellspacing="0" cellpadding="10">
<tr>
<td>id</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>商品名</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>用户名</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>手机号</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>价格</td>
<td><input type="text" /></td>
</tr>
<tr>
<td>城市</td>
<td><input style="border:1px solid red;" type="text" /></td>
</tr>
<tr>
<td>下单时间</td>
<td><input type="text" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="提交" /></td>
</tr>
</table>
</fieldset>
</center>
</body>
</html>
相关文章推荐
- AngularJs 商品订单信息管理
- AngularJs 商品订单信息管理
- 商品订单信息管理例子(Angularjs)
- 三期_day08_信息+订单管理_I
- 三期_day09_信息+订单管理_II
- 购物网站15:订单action---订单分页列表----订单管理----订单信息查看
- 用C语言编写的超市商品信息管理系统
- S1 商品信息管理系统
- 触发器 对商品订单管理 简单分析
- 实现商品库存信息管理页面
- 分类管理 商品管理 订单管理 权限校验(AOP思想) 网上商城(五)
- SpringMVC(21):使用springmvc+spring+jdbc 优化订单管理系统的示例(ID查看供应商信息明细-REST的功能实现)
- 从订单信息页面进入订单详细商品页面,最简单的MVC思想
- S1 商品信息管理系统
- 商品信息管理
- 基于数据库的商品信息管理系统
- PHP基础示例:商品信息管理系统v1.1[转]
- mybatis使用resultMap实现多对多查询 (需求:商品信息和订单明细有多对多的关系)
- 实现商品库存信息管理页面(AngularJS过滤器,orderBy排序,批量删除数据)
- 购物网站18:购物车列表---购物车管理----配送信息管理----订单确认----支付方式----购物完成----购买管理