fix html~~~

master
yuan 7 years ago
parent 77621c6418
commit 0ce6b156dd

@ -888,11 +888,6 @@ margin-bottom: 10%;"/>
<!--<i class="fa fa-users" aria-hidden="true"></i> -->Cashiers Management
</a>
</li>
<li ng-if="currentUser.client.client_moniker=='PINE'">
<a ui-sref="bill_qrcode">
Bill QR Code
</a>
</li>
</ul>
</li>
<li ng-if="([1,2]|withRole)">
@ -919,16 +914,21 @@ margin-bottom: 10%;"/>
</li>
<li class="has-submenu" ng-class="{'open' : products.active}" ui-sref-active="active">
<a ng-click="products.active = !products.active"><i class="fa fa-balance-scale"></i>Products & Sale</a>
<a ng-click="products.active = !products.active"><i class="fa fa-balance-scale"></i>Extended products</a>
<ul class="submenu" ng-class="{'open' : products.active}">
<li>
<a ui-sref="goods">
<!--<i class="fa fa-shopping-bag"></i> -->Products
<!--<i class="fa fa-shopping-bag"></i> -->Products & Sale
</a>
</li>
<li>
<!-- <li>
<a ui-sref="sale">
<!--<i class="fa fa-shopping-cart"></i>-->Sale
&lt;!&ndash;<i class="fa fa-shopping-cart"></i>&ndash;&gt;Sale
</a>
</li>-->
<li ng-if="currentUser.client.client_moniker=='PINE' || currentUser.client.client_moniker=='OCCO'">
<a ui-sref="bill_qrcode">
Bill QR Code
</a>
</li>
</ul>

@ -59,7 +59,6 @@ var modules = [
{path: 'static/boot/indexMainApp', module: 'indexMainApp', roles: [1, 2, 3]},
{path: 'static/commons/commons', module: 'commons', roles: [1, 2, 3]},
{path: 'static/payment/good/good-manage', module: 'goodManagement', roles: [1, 2, 3]},
{path: 'static/payment/good/good-sale', module: 'goodSale', roles: [1, 2, 3]},
{path: 'static/payment/partner/partner', module: 'partnerInfoApp', roles: [1, 2, 3]},
{path: 'static/payment/tradelog/tradelog', module: 'tradeLogApp', roles: [1, 2, 3]},
{path: 'static/payment/tradelog/transflow', module: 'balanceReport', roles: [1, 2, 3]},

@ -10,6 +10,11 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
templateUrl: '/static/payment/good/templates/goods.html',
controller: 'goodListCtrl',
data: {label: '商品列表'}
}).state('goods.sale', {
url: '/sale',
templateUrl: '/static/payment/good/templates/good_sale.html',
controller: 'goodOrderListCtrl',
data: {label: '商品列表'}
}).state('goods.new', {
url: '/new',
templateUrl: '/static/payment/good/templates/add_good.html',
@ -196,7 +201,57 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.ctrl = {};
}]);
app.controller('goodOrderListCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.pagination = {};
$scope.params = {status:'1'};
$scope.today = new Date();
$scope.chooseToday = function () {
$scope.params.datefrom = $scope.params.dateto = new Date();
$scope.loadGoodOrders(1);
};
$scope.chooseYesterday = function () {
var yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
$scope.params.datefrom = $scope.params.dateto = yesterday;
$scope.loadGoodOrders(1);
};
$scope.chooseLast7Days = function () {
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.loadGoodOrders(1);
};
$scope.thisMonth = function () {
$scope.params.dateto = new Date();
var monthBegin = new Date();
monthBegin.setDate(1);
$scope.params.datefrom = monthBegin;
$scope.loadGoodOrders(1);
};
$scope.lastMonth = function () {
var monthFinish = new Date();
monthFinish.setDate(0);
$scope.params.dateto = monthFinish;
var monthBegin = new Date();
monthBegin.setDate(0);
monthBegin.setDate(1);
$scope.params.datefrom = monthBegin;
$scope.loadGoodOrders(1);
};
$scope.loadGoodOrders = function (page) {
var params = angular.copy($scope.params);
if (params.status=='ALL'){
delete params.status;
}
params.page = page || $scope.pagination.page || 1;
$http.get('/sys/client/goods/goodOrders', {params: params}).then(function (resp) {
$scope.sales = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadGoodOrders(1);
}]);
return app;
});

@ -1,6 +1,7 @@
/**
* Created by yishuqian on 8/29/16.
*/
/*
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch'], function (angular) {
'use strict';
@ -67,4 +68,4 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}]);
return app;
});
});*/

@ -1,158 +1,146 @@
<div ui-view>
<section class="content-header">
<h1>List of Products Sold</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Products & Sale
</li>
<li class="active">Sale</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Status</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status=='ALL'}"
ng-click="params.status='ALL';loadGoodOrders(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PAID'}"
ng-click="params.status='1';loadGoodOrders(1)">Payment Success</a> |
<a role="button" ng-class="{'bg-primary':params.status=='UNPAID'}"
ng-click="params.status='0';loadGoodOrders(1)">Waiting for Payment</a>
</p>
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Status</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status=='ALL'}"
ng-click="params.status='ALL';loadGoodOrders(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PAID'}"
ng-click="params.status='1';loadGoodOrders(1)">Payment Success</a> |
<a role="button" ng-class="{'bg-primary':params.status=='UNPAID'}"
ng-click="params.status='0';loadGoodOrders(1)">Waiting for Payment</a>
</p>
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10 col-xs-8">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input" ng-model="params.datefrom"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.dateto||today}">
</div>
</div>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10 col-xs-8">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input" ng-model="params.datefrom"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.dateto||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.dateto"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.datefrom,maxDate:today}">
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseToday()">Today</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterday()">Yesterday</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7
Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm" ng-click="thisMonth()">This
Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm" ng-click="lastMonth()">Last
Month</a>
</div>
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.dateto"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.datefrom,maxDate:today}">
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseToday()">Today</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterday()">Yesterday</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7
Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm" ng-click="thisMonth()">This
Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm" ng-click="lastMonth()">Last
Month</a>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label" for="short-name-search">Partner Name</label>-->
<!--<input type="text" class="form-control" id="short-name-search"-->
<!--ng-model="params.short_name">-->
<!--</div>-->
<button class="btn btn-success" type="button" ng-click="loadGoodOrders(1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label" for="short-name-search">Partner Name</label>-->
<!--<input type="text" class="form-control" id="short-name-search"-->
<!--ng-model="params.short_name">-->
<!--</div>-->
<button class="btn btn-success" type="button" ng-click="loadGoodOrders(1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Products Sold</h3>
</div>
<div class="box-body no-padding table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Sale ID</th>
<th>Payment Order ID</th>
<th>Product Name</th>
<th>Unit Price</th>
<th>Quantity</th>
<th>Order Total</th>
<th>Order Status</th>
<th>Create Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="goodOrder in sales">
<!--<td><span ng-bind="good.goodId"></span><i class="fa fa-sitemap" ng-if="good.parent_client_id" title="Sub Partner"></i></td>-->
<td ng-bind="goodOrder.id"></td>
<td ng-bind="goodOrder.order_id"></td>
<td ng-bind="goodOrder.title"></td>
<td ng-bind="goodOrder.price"></td>
<td ng-bind="goodOrder.count"></td>
<td ng-bind="goodOrder.order_total"></td>
<!--<td ng-bind="good.is_using"></td>-->
<td>
<span ng-if="goodOrder.order_status==1">PAID</span>
<span ng-if="goodOrder.order_status==0">NOT PAID</span>
<span ng-if="goodOrder.order_status==2">CLOSED</span>
</td>
<td ng-bind="goodOrder.create_time"></td>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Products Sold</h3>
</div>
</tr>
</tbody>
</table>
<div class="box-body no-padding table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Sale ID</th>
<th>Payment Order ID</th>
<th>Product Name</th>
<th>Unit Price</th>
<th>Quantity</th>
<th>Order Total</th>
<th>Order Status</th>
<th>Create Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="goodOrder in sales">
<!--<td><span ng-bind="good.goodId"></span><i class="fa fa-sitemap" ng-if="good.parent_client_id" title="Sub Partner"></i></td>-->
<td ng-bind="goodOrder.id"></td>
<td ng-bind="goodOrder.order_id"></td>
<td ng-bind="goodOrder.title"></td>
<td ng-bind="goodOrder.price"></td>
<td ng-bind="goodOrder.count"></td>
<td ng-bind="goodOrder.order_total"></td>
<!--<td ng-bind="good.is_using"></td>-->
<td>
<span ng-if="goodOrder.order_status==1">PAID</span>
<span ng-if="goodOrder.order_status==0">NOT PAID</span>
<span ng-if="goodOrder.order_status==2">CLOSED</span>
</td>
<td ng-bind="goodOrder.create_time"></td>
</tr>
</tbody>
</table>
</div>
<div class="box-footer" ng-if="goods.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadGoodOrders()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div>
</div>
<div class="box-footer" ng-if="goods.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadGoodOrders()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -1,135 +1,150 @@
<div ui-view>
<section class="content-header">
<h1>Product Management</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Products & Sale
</li>
<li class="active">Product Management</li>
</ol>
</section>
<div class="content">
<section class="content-header">
<h1>Product & Sale</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Products & Sale
</li>
<li class="active">Product & Sale Management</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<!--<div class="form-group">-->
<!--<label class="control-label" for="good-code-search">Good Code</label>-->
<!--<input class="form-control" id="good-code-search" ng-model="params.code">-->
<!--</div>-->
<div class="form-group">
<label class="control-label" for="good-title-search">Product Name</label>
<input type="number" class="form-control" id="good-title-search"
ng-model="params.title">
</div>
<div class="form-group">
<label class="control-label" for="good-type-search">Product Type</label>
<input type="number" class="form-control" id="good-type-search"
ng-model="params.type">
</div>
<!--<div class="form-group">-->
<!--<label class="control-label" for="short-name-search">Partner Name</label>-->
<!--<input type="text" class="form-control" id="short-name-search"-->
<!--ng-model="params.short_name">-->
<!--</div>-->
<div class="form-group">
<button class="btn btn-primary" type="button" ng-click="loadGood(1)"><i
class="fa fa-search"></i></button>
</div>
<div class="form-group">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li ui-sref-active-eq="active">
<a ui-sref="goods">Product</a>
</li>
<li ui-sref-active="active">
<a ui-sref="goods.sale">Sale</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<!--<div class="form-group">-->
<!--<label class="control-label" for="good-code-search">Good Code</label>-->
<!--<input class="form-control" id="good-code-search" ng-model="params.code">-->
<!--</div>-->
<div class="form-group">
<label class="control-label" for="good-title-search">Product Name</label>
<input type="number" class="form-control" id="good-title-search"
ng-model="params.title">
</div>
<div class="form-group">
<label class="control-label" for="good-type-search">Product Type</label>
<input type="number" class="form-control" id="good-type-search"
ng-model="params.type">
</div>
<!--<div class="form-group">-->
<!--<label class="control-label" for="short-name-search">Partner Name</label>-->
<!--<input type="text" class="form-control" id="short-name-search"-->
<!--ng-model="params.short_name">-->
<!--</div>-->
<div class="form-group">
<button class="btn btn-primary" type="button" ng-click="loadGood(1)"><i
class="fa fa-search"></i></button>
</div>
<div class="form-group">
<a role="button" class="btn btn-info pull-right" ui-sref=".new" title="Add Product">
<i class="fa fa-plus"></i>
Add Product
</a>
</div>
<a role="button" class="btn btn-info pull-right" ui-sref=".new" title="Add Product">
<i class="fa fa-plus"></i>
Add Product
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Products</h3>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Products</h3>
</div>
<div class="box-body no-padding table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Product Image</th>
<th>Product Name</th>
<th>Price (AUD)</th>
<th>Current Price (AUD)</th>
<th>Price (CNY)</th>
<th>Current Price(CNY)</th>
<th>Product Type</th>
<th>Stocks Available</th>
<th>Origin</th>
<th>Status</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="good in goods">
<div class="box-body no-padding table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Product Image</th>
<th>Product Name</th>
<th>Price (AUD)</th>
<th>Current Price (AUD)</th>
<th>Price (CNY)</th>
<th>Current Price(CNY)</th>
<th>Product Type</th>
<th>Stocks Available</th>
<th>Origin</th>
<th>Status</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="good in goods">
<!--<td><span ng-bind="good.goodId"></span><i class="fa fa-sitemap" ng-if="good.parent_client_id" title="Sub Partner"></i></td>-->
<td><img ng-if="good.thumbnailUrl" src="{{good.thumbnailUrl}}"></td>
<td ng-bind="good.title"></td>
<td ng-bind="good.price"></td>
<td ng-bind="good.actual_price"></td>
<td ng-bind="good.cny_price"></td>
<td ng-bind="good.actual_cny_price"></td>
<td ng-bind="good.type"></td>
<td ng-bind="good.inventory"></td>
<td ng-bind="good.origin"></td>
<!--<td ng-bind="good.is_using"></td>-->
<td>
<span ng-if="good.is_using==1">On Sale</span>
<span ng-if="good.is_using==0">Out Of Stock</span>
</td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref=".detail({goodId:good.id})">
<i class="fa fa-search"></i> Detail
</a>|
<a class="text-primary" role="button" title="Delete"
ng-click="deleteGoods(good.id)">
<i class="fa fa-trash-o"></i> Delete
</a>
</td>
</tr>
</tbody>
</table>
<!--<td><span ng-bind="good.goodId"></span><i class="fa fa-sitemap" ng-if="good.parent_client_id" title="Sub Partner"></i></td>-->
<td><img ng-if="good.thumbnailUrl" src="{{good.thumbnailUrl}}"></td>
<td ng-bind="good.title"></td>
<td ng-bind="good.price"></td>
<td ng-bind="good.actual_price"></td>
<td ng-bind="good.cny_price"></td>
<td ng-bind="good.actual_cny_price"></td>
<td ng-bind="good.type"></td>
<td ng-bind="good.inventory"></td>
<td ng-bind="good.origin"></td>
<!--<td ng-bind="good.is_using"></td>-->
<td>
<span ng-if="good.is_using==1">On Sale</span>
<span ng-if="good.is_using==0">Out Of Stock</span>
</td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref=".detail({goodId:good.id})">
<i class="fa fa-search"></i> Detail
</a>|
<a class="text-primary" role="button" title="Delete"
ng-click="deleteGoods(good.id)">
<i class="fa fa-trash-o"></i> Delete
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="box-footer" ng-if="goods.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadGoods()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="box-footer" ng-if="goods.length">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadGoods()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save