diff --git a/routes/resource/base-config.js b/routes/resource/base-config.js
index 16a9893e..19ca92de 100644
--- a/routes/resource/base-config.js
+++ b/routes/resource/base-config.js
@@ -1,3 +1,3 @@
-/**Created on 2017-11-22*/
+/**Created on 2017-11-23*/
'use strict';
module.exports = {"version":"1.0.2","compressed":false,"devView":true,"validate":false,"tmsMap":true,"host":"http://10.2.4.76:8090/wms-extra-web/","ticketUser":{"phone":"11111111111","password":"123456a"}};
\ No newline at end of file
--
Gitee
From 6db833df728b3a3bb9a7ce2119787ef74cb89eee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E6=B5=A9?= <1308369732@qq.com>
Date: Fri, 24 Nov 2017 18:32:48 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/css/wms.css | 20 ++-
public/js/ctrl/a.ctrl.js | 135 +++++++++++++++++-
public/js/ctrl/d.ctrl.js | 31 +++-
public/js/wms-filter.js | 55 +++++++
public/js/wms-service.js | 13 +-
.../abnormalManagement/abm_imageList.html | 11 ++
.../abnormalManagement.html | 102 ++++++-------
.../abnormalManagement/dealAbnormal.html | 22 +++
routes/resource/base-config.js | 4 +-
9 files changed, 328 insertions(+), 65 deletions(-)
create mode 100644 public/templates/maintenanceManagement/abnormalManagement/abm_imageList.html
create mode 100644 public/templates/maintenanceManagement/abnormalManagement/dealAbnormal.html
diff --git a/public/css/wms.css b/public/css/wms.css
index 3bb76db2..1b74b131 100644
--- a/public/css/wms.css
+++ b/public/css/wms.css
@@ -170,7 +170,7 @@ html,body{
.layui-table tr, td, th, select, option {
text-align: center !important;
- border: 1px solid #cedce2;
+ border: 1px solid #d2d2d2;
cursor: pointer;
}
@@ -1152,4 +1152,22 @@ table tr.checkStatus{
}
#bs_sws_exportExcel{
color: #fff !important;
+}
+.abm_image{
+ width: 100%;
+ margin-bottom: 10px;
+ height: 600px;
+}
+.abm_image_desc{
+ padding: 8px 0;
+ font-weight: 700;
+}
+.abm_image_icon{
+ position: absolute;
+ bottom:22px;
+ right:10px;
+ cursor:pointer;
+ font-size: 30px;
+ color: #de531a;
+
}
\ No newline at end of file
diff --git a/public/js/ctrl/a.ctrl.js b/public/js/ctrl/a.ctrl.js
index 0f2cd043..01c3bc0c 100644
--- a/public/js/ctrl/a.ctrl.js
+++ b/public/js/ctrl/a.ctrl.js
@@ -378,9 +378,140 @@ wmsCtrl.controller('asnCtrl',['$scope','dropDownService','inStorageBillService',
})
}
}])
-.controller('abnormalManagementCtrl',['$scope','$rootScope','$timeout',function($scope,$rootScope,$timeout){
+.controller('abnormalManagementCtrl',['$scope','$rootScope','$timeout','ngDialog','abnormalManagementService',function($scope,$rootScope,$timeout,ngDialog,abnormalManagementService){
+
+ layui.use('form', function(){
+ var $ = layui.jquery, form = layui.form();
+
+ //全选
+ form.on('checkbox(allChoose)', function(data){
+ var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
+ child.each(function(index, item){
+ item.checked = data.elem.checked;
+ });
+ form.render('checkbox');
+ });
+
+ });
+
// 显示更多条件
$scope.moreClick = function(){
$('.otherForm').slideToggle(500);
};
-}]);
\ No newline at end of file
+
+// 搜索对象
+ $scope.search = {
+ excpStatus:'',
+ excpTypeCode:'',
+ excpType:'',
+ startGmtCreate:'',
+ endGmtCreate:'',
+ dealType:'',
+ startDealEndTime:'',
+ endDealEndTime:''
+ };
+ $scope.resetClick = function(){
+ for(var k in $scope.search){
+ $scope.search[k] = '';
+ }
+ };
+
+// 异常处理
+ $scope.dealAbnomal = function(){
+
+ //判断是否有选择
+ var orderidArr = [];
+ $rootScope.orderidArr =[];
+ $rootScope.abm_indexArr = [];
+ //获取选中的list列表
+ $('.wms_abm_table').find('td i').each(function (i, obj) {
+ if ($(obj).parent().hasClass('layui-form-checked')){
+ orderidArr.push($(obj).parents('tr').attr('orderid'));
+ $rootScope.abm_indexArr.push($(obj).parents('tr').attr('key'));
+ }
+ });
+ if(orderidArr.length==0) {
+ $scope.Tools.alert('未选择!');
+ }else if( orderidArr.length !=1){
+ $scope.Tools.alert('异常处理当前只支持单条操作');
+ } else {
+ $rootScope.abm_imageList = $scope.tableList;
+ ngDialog.open({
+ template: "templates/maintenanceManagement/abnormalManagement/dealAbnormal.html",
+ controller: "dealAbnormalCtrl",
+ title: '异常处理',
+ width:400,
+ height:400
+ });
+ }
+ };
+ //查看照片
+ $scope.getDetail = function(e){
+ var abmImg = {
+ orderId:$(e.target).parents('tr').attr('orderid'),
+ excpType:$(e.target).parents('tr').attr('excptype')
+ };
+ abnormalManagementService.getImageList(abmImg).then(function(res){
+ if(res.success){
+ $rootScope.abm_imageList = res.data;
+ ngDialog.open({
+ template: "templates/maintenanceManagement/abnormalManagement/abm_imageList.html",
+ controller: "abm_imageListCtrl",
+ title: '异常图片显示',
+ width:600,
+ });
+ $timeout(function(){
+ $('.ngdialog-content').css('display','table')
+ },20)
+ } else {
+ $scope.Tools.alert(res.message);
+ }
+ });
+ };
+
+ $scope.fristSelect = true;
+ // 获取列表
+ $scope.getList = function(){
+ var params = {
+ pageNo:$scope.pageNo || 1,
+ pageSize:$scope.pageSize || 10,
+ };
+ params = angular.extend(params,$scope.search);
+ var index = layer.load(2);
+ abnormalManagementService.queryExcepList(params)
+ .then(function(result){
+ if(result.success){
+ layer.close(index);
+ $scope.tableList = result.data.dataList;
+ if($scope.fristSelect){
+ $scope.Tools.page(document.getElementById('pages'),{
+ pages : result.data.page.totalPage,
+ curr : result.data.page.pageNo,
+ count : result.data.page.totalRecord
+ },function(obj, first){
+ $scope.fristSelect = first; //设置状态
+
+ if(!first){ //判断不是第一次加载
+ var param = {};
+ param.pageNo = obj.curr; //当前页
+ param.pageSize = obj.limit; //最大页
+ $scope.pageSize = obj.limit; //设置最大页
+ $scope.pageNo = obj.curr; //设置当前页
+ $scope.getList(param);
+ }
+ })
+ }
+ }else{
+ layer.close(index);
+ $scope.Tools.alert(result.message);
+ $scope.tableList=[];
+ }
+ })
+ };
+
+ $scope.getList();
+
+}])
+ .controller('abm_imageListCtrl',['$scope','$rootScope',function($scope,$rootScope){
+
+ }])
\ No newline at end of file
diff --git a/public/js/ctrl/d.ctrl.js b/public/js/ctrl/d.ctrl.js
index 87441894..b8058e0a 100644
--- a/public/js/ctrl/d.ctrl.js
+++ b/public/js/ctrl/d.ctrl.js
@@ -458,4 +458,33 @@ wmsCtrl.controller('distributionCtrl',['$scope','$rootScope','$timeout','$state'
$state.go('distribution')
},$rootScope.bs_intervalTime*60000)
- }]);
\ No newline at end of file
+ }])
+ .controller('dealAbnormalCtrl',['$scope','$rootScope','abnormalManagementService','ngDialog',function($scope,$rootScope,abnormalManagementService,ngDialog){
+ // 异常处理
+ $scope.layer_dealType = '';
+ $scope.updateToDeal = function(){
+ var obj = $rootScope.abm_imageList[$rootScope.abm_indexArr[0]];
+ var temp = {
+ orderId : obj.orderId,
+ excpType: obj.excpType,
+ excpDesc: obj.excpDesc,
+ dealType: $scope.layer_dealType,
+ vin: obj.vin,
+ excpTypeCode: obj.excpTypeCode
+ };
+ abnormalManagementService.updateToDeal(temp).then(function(res){
+ if(res.success){
+ ngDialog.closeAll();
+ setTimeout(function(){
+ $scope.Tools.alert(res.message);
+ },20)
+ } else {
+ ngDialog.closeAll();
+ layer.open({
+ title: '提示'
+ ,content: res.message
+ });
+ }
+ })
+ }
+ }])
\ No newline at end of file
diff --git a/public/js/wms-filter.js b/public/js/wms-filter.js
index f09f1fad..28bc94b2 100644
--- a/public/js/wms-filter.js
+++ b/public/js/wms-filter.js
@@ -482,4 +482,59 @@ var wmsFilter = angular.module('wms.filter', [])
}
}
})
+ .filter('abnormal_excpStatus',function(){
+ return function(str){
+ if(str =='10'){
+ return '未处理'
+ } else if(str == '20'){
+ return '处理中'
+ } else if(str == '30'){
+ return '已关闭'
+ }
+ }
+ })
+ .filter('abnormal_excpType',function(){
+ return function(str){
+ if(str =='10'){
+ return '入库异常'
+ } else if(str == '20'){
+ return '出库异常'
+ } else if(str == '30'){
+ return '备料异常'
+ }
+ }
+ })
+ .filter('abnormal_dealType',function(){
+ return function(str){
+ if(str =='10'){
+ return '缺件跟进'
+ } else if(str == '20'){
+ return '出库维修'
+ } else if(str == '30'){
+ return '库内维修'
+ } else if(str == '40'){
+ return '缺件跟进,出库维修'
+ } else if(str == '50'){
+ return '缺件跟进,库位修改'
+ }
+ }
+ }).filter('abnormal_excpTypeCode',function(){
+ return function(str){
+ if(str =='MISS'){
+ return '缺件异常'
+ } else if(str == 'EXCP'){
+ return '质损异常'
+ } else if(str == 'MISS_AND_EXCP'){
+ return '缺件,质损异常'
+ } else if(str == 'LOSS'){
+ return '非质损异常'
+ } else if(str == 'LOSS_AND_EXCP'){
+ return '非质损,质损异常'
+ } else if(str == 'LOSS_AND_MISS'){
+ return '非质损,缺件异常'
+ } else if(str == 'LOSS_EXCP_EXCP'){
+ return '非质损,质损,缺件异常'
+ }
+ }
+ })
diff --git a/public/js/wms-service.js b/public/js/wms-service.js
index 16720e8e..85c9405b 100644
--- a/public/js/wms-service.js
+++ b/public/js/wms-service.js
@@ -640,6 +640,17 @@ var wmsService = angular.module('wms.services', [])
}])
.service('abnormalManagementService',['HttpService',function(HttpService){
return{
-
+ queryExcepList : function(data){
+ return HttpService.customPOST('/excpManage/queryExcepList',data)
+ },
+ getImageList : function(data){
+ return HttpService.customPOST(' /excpManage/getImageList',data)
+ },
+ updateToDeal : function(data){ // 异常处理
+ return HttpService.customPOST('/excpManage/updateToDeal',data)
+ },
+ updateToClosed : function(data){ // 异常关闭
+ return HttpService.customPOST('/excpManage/updateToClosed',data)
+ },
}
}]);
diff --git a/public/templates/maintenanceManagement/abnormalManagement/abm_imageList.html b/public/templates/maintenanceManagement/abnormalManagement/abm_imageList.html
new file mode 100644
index 00000000..faeac5eb
--- /dev/null
+++ b/public/templates/maintenanceManagement/abnormalManagement/abm_imageList.html
@@ -0,0 +1,11 @@
+
+
+
+ {{item.desc}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/templates/maintenanceManagement/abnormalManagement/abnormalManagement.html b/public/templates/maintenanceManagement/abnormalManagement/abnormalManagement.html
index 765f891b..c8556a1a 100644
--- a/public/templates/maintenanceManagement/abnormalManagement/abnormalManagement.html
+++ b/public/templates/maintenanceManagement/abnormalManagement/abnormalManagement.html
@@ -2,7 +2,7 @@
@@ -17,49 +17,50 @@
@@ -69,31 +70,31 @@
- 查询
+ 查询
重置
@@ -101,14 +102,11 @@