Commit 69868142 authored by liboyang's avatar liboyang

查询未审核的耗材记录和所选日期的已审核的耗材记录

parent 48c31f4a
......@@ -1237,10 +1237,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
selectMaterialManagement:function(success) {
selectMaterialManagement:function(date,success) {
$http({
method: 'GET',
url: "../MaterialManagementApi/selectCardBody" + urlTimeStamp()
url: "../MaterialManagementApi/selectCardBody" + urlTimeStamp(),
params:{
date:date
}
}).then(function successCallback(response) {
success(response.data)
})
......
......@@ -68,9 +68,25 @@
</div>
<div class="box">
<div class="box-header">
<strong>查询未审核卡体耗材统计数据</strong>
<strong>卡体耗材操作记录</strong>
</div>
<div class="box box-primary">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td width="15%">审核日期:</td>
<td colspan="2" width="35%">
<div class="input-group date" style="width: 65%">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right" ng-model="choseDate" id="datepicker" readonly/>
</div>
</td>
<td style="text-align: left;">
<button class="btn btn-primary" ng-click="selectMaterialManagement()">查询</button>
</td>
</tr>
</table>
<div ng-if="materialManagement.length==0">
<h4 style="padding-left: 10px;">暂无数据</h4>
</div>
......
......@@ -11,6 +11,17 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
.controller('materialManagementCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker
$('#datepicker').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.insertCardBody = function () {
var totalCount = $scope.totalCount;
var note = $scope.note;
......@@ -33,7 +44,11 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
}
$scope.selectMaterialManagement=function(){
HttpService.selectMaterialManagement(function (data) {
var date =$('#datepicker').val();
if(angular.isUndefined(date)){
date = $scope.choseDate;
}
HttpService.selectMaterialManagement(date,function (data) {
$scope.materialManagement = data;
console.log($scope.materialManagement,"$scope.materialManagement")
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment