From 0ce6b156dd63ee138a3b8e07ba78ec652831ea0a Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Mon, 14 May 2018 13:52:50 +0800 Subject: [PATCH] fix html~~~ --- src/main/ui/index.html | 18 +- src/main/ui/static/boot/index-boot.js | 1 - .../ui/static/payment/good/good-manage.js | 57 +++- src/main/ui/static/payment/good/good-sale.js | 3 +- .../payment/good/templates/good_sale.html | 264 +++++++++--------- .../static/payment/good/templates/goods.html | 249 +++++++++-------- 6 files changed, 325 insertions(+), 267 deletions(-) diff --git a/src/main/ui/index.html b/src/main/ui/index.html index 73ffa320f..74f25f658 100644 --- a/src/main/ui/index.html +++ b/src/main/ui/index.html @@ -888,11 +888,6 @@ margin-bottom: 10%;"/> Cashiers Management -
  • - - Bill QR Code - -
  • @@ -919,16 +914,21 @@ margin-bottom: 10%;"/>
  • - Products & Sale + Extended products diff --git a/src/main/ui/static/boot/index-boot.js b/src/main/ui/static/boot/index-boot.js index 6e225f3e0..55e98e262 100644 --- a/src/main/ui/static/boot/index-boot.js +++ b/src/main/ui/static/boot/index-boot.js @@ -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]}, diff --git a/src/main/ui/static/payment/good/good-manage.js b/src/main/ui/static/payment/good/good-manage.js index bbfdf88ae..cf2324d83 100644 --- a/src/main/ui/static/payment/good/good-manage.js +++ b/src/main/ui/static/payment/good/good-manage.js @@ -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; }); \ No newline at end of file diff --git a/src/main/ui/static/payment/good/good-sale.js b/src/main/ui/static/payment/good/good-sale.js index d21af8f22..af1c50538 100644 --- a/src/main/ui/static/payment/good/good-sale.js +++ b/src/main/ui/static/payment/good/good-sale.js @@ -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; -}); \ No newline at end of file +});*/ diff --git a/src/main/ui/static/payment/good/templates/good_sale.html b/src/main/ui/static/payment/good/templates/good_sale.html index 4151186ae..40183929a 100644 --- a/src/main/ui/static/payment/good/templates/good_sale.html +++ b/src/main/ui/static/payment/good/templates/good_sale.html @@ -1,158 +1,146 @@ -
    -
    -

    List of Products Sold

    - -
    - -
    -
    -
    -
    -
    -
    -
    -
    - -
    -

    - All | - Payment Success | - Waiting for Payment -

    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    -
    -
    - -
    -
    -
    - -
    - ~ -
    - -
    - -
    - Today -
    -
    - Yesterday -
    - - - -
    - + ~ +
    +
    +
    + Today +
    +
    + Yesterday +
    + + +
    - - - - - -
    +
    + + + + + +
    +
    +
    -
    -
    -

    List of Products Sold

    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - +
    +
    +

    List of Products Sold

    +
    -
    - -
    Sale IDPayment Order IDProduct NameUnit PriceQuantityOrder TotalOrder StatusCreate Time
    - PAID - NOT PAID - CLOSED -
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Sale IDPayment Order IDProduct NameUnit PriceQuantityOrder TotalOrder StatusCreate Time
    + PAID + NOT PAID + CLOSED +
    -
    - + -
    + +
    +
    -
    \ No newline at end of file +
    diff --git a/src/main/ui/static/payment/good/templates/goods.html b/src/main/ui/static/payment/good/templates/goods.html index 1ad5e2a60..8a6b4dd2e 100644 --- a/src/main/ui/static/payment/good/templates/goods.html +++ b/src/main/ui/static/payment/good/templates/goods.html @@ -1,135 +1,150 @@ -
    -
    -

    Product Management

    - -
    -
    +
    +

    Product & Sale

    + +
    +
    -
    -
    -
    -
    - - - - -
    - - -
    -
    - - -
    - - - - - -
    - -
    -
    + -
    - -
    -
    +
    -
    \ No newline at end of file