wangcz 7 лет назад
Родитель
Сommit
f3e80efc8a

+ 6 - 0
src/main/webapp/resources/js/common/query/goods.js

@@ -313,6 +313,12 @@ define([ 'ngResource' ], function() {
                 url: 'trade/distributor/selected',
                 method: 'GET',
                 isArray : true
+            },
+            // 根据所有ID获取产品信息
+            findAllProduct : {
+                url: '/trade/products/ids',
+                method: 'GET',
+                isArray : true
             }
 		});
 	}]).factory('GoodsModifyInfo', ['$resource', function ($resource) {

+ 13 - 14
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -10,6 +10,7 @@ define([ 'app/app' ], function(app) {
         $scope.storage_tab = $stateParams.storage_tab? $stateParams.storage_tab : 'inBound';
         $scope.countData = 10;
         $scope.userInfo = $rootScope.userInfo || {}
+        $stateParams.ids ? $scope.hasIds = true : $scope.hasIds = false;
         console.log($stateParams)
 
         //数字的正则表达式
@@ -19,19 +20,13 @@ define([ 'app/app' ], function(app) {
         $scope.handleLink = [
             {name: '查看入库记录', tab: 'inBound', id: 0},
             {name: '其它入库', tab: 'inBound', id: 1},
-            {name: '采购入库', tab: 'inBound', id: 2},
+            // {name: '采购入库', tab: 'inBound', id: 2},
             {name: '查看出库记录', tab: 'outBound', id: 0},
             {name: '其它出库', tab: 'outBound', id: 1},
             {name: '销售出库', tab: 'outBound', id: 2}];
         $scope.handleItem = $stateParams.storage_tab ? 1 : ($scope.storage_tab === 'inBound'? $scope.handleLink[0].id : $scope.handleLink[3].id);
         // $scope.handleItem = 2;
 
-        $scope.lockData = [
-            {id: 1,seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三1', date: 340325435434535, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
-            {id: 11,seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三2', date: 34032545354325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
-            {id: 111,seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三3', date: 340324535454325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
-            {id: 1111,seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三4', date: 340323554325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]}
-        ];
         // 销售方式数据
         $scope.boundType = {
             INBOUND: '全部类型',
@@ -98,8 +93,14 @@ define([ 'app/app' ], function(app) {
             }
             $scope.newDate = _formatDate(new Date(), 'yyyy-MM-dd hh-mm-ss')
             $scope.otherData = [];
-            for (var i = 0; i< $scope.countData; i++) {
-                $scope.otherData.push({qty: '', id: i, price: '', key: '', show: false, productId: ''})
+            if($stateParams.ids){
+                Goods.findAllProduct({ids: $stateParams.ids}, function(data) {
+                    $scope.otherData = data;
+                })
+            } else {
+                for (var i = 0; i< $scope.countData; i++) {
+                    $scope.otherData.push({qty: '', id: i, price: '', key: '', show: false, productId: ''})
+                }
             }
         }
         initOtherData();
@@ -248,11 +249,7 @@ define([ 'app/app' ], function(app) {
         // 展开收起
         $scope.unfoldClick = function (data, type) {
             angular.forEach(data, function(key) {
-                if(type.id !== key.id) {
-                    key.seleted = false;
-                } else {
-                    key.seleted = true;
-                }
+                type.id !== key.id ? key.seleted = false : key.seleted = true;
             })
         };
 
@@ -309,6 +306,8 @@ define([ 'app/app' ], function(app) {
                     toaster.pop('success', '申请成功!');
                     initOtherData();
                 }
+            }, function(res) {
+                toaster.pop('error', '申请失败,请检查再试')
             })
         };
 

+ 15 - 6
src/main/webapp/resources/view/vendor/forstore/vendor_storage.html

@@ -928,6 +928,14 @@
         font-size: 14px;
         border-bottom: 1px solid #e9e9e9;
     }
+    .wanted_list .wanted-tab tbody>tr>td span{
+        vertical-align: middle;
+        width: 100%;
+        display: inline-block;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
     .wanted_list .wanted-tab tbody>tr>td{
         padding:0;
         line-height: 50px;
@@ -1227,7 +1235,7 @@
                         <div class="hover-show" ng-if="storage_tab === 'inBound'">
                             <a ng-click="changeSupportType(INBOUND)" ng-bind="boundType.INBOUND">全部类型</a>
                             <a ng-click="changeSupportType(OTHER_INBOUND)" ng-bind="boundType.OTHER_INBOUND">其它入库</a>
-                            <a ng-click="changeSupportType(PURCHASE_INBOUND)" ng-bind="boundType.PURCHASE_INBOUND">销售入库</a>
+                            <a ng-click="changeSupportType(PURCHASE_INBOUND)" ng-bind="boundType.PURCHASE_INBOUND">入库</a>
                         </div>
                         <div class="hover-show" ng-if="storage_tab === 'outBound'">
                             <a ng-click="changeSupportType(OUTBOUND)" ng-bind="boundType.OUTBOUND">全部类型</a>
@@ -1320,7 +1328,8 @@
                             <tr ng-repeat="(index, item) in otherData">
                                 <td ng-bind="index + 1"></td>
                                 <td>
-                                    <div class="down-form">
+                                    <span ng-if="hasIds" ng-bind="item.pcmpcode || '-'" title="{{item.pcmpcode}}"></span>
+                                    <div class="down-form" ng-if="!hasIds">
                                         <input type="text" class="form-control" ng-model="item.key" ng-change="onChange(item)">
                                         <div ng-show="item.show" class="down-key" ng-mouseenter="item.show = true">
                                             <ul class="list-unstyled">
@@ -1357,11 +1366,11 @@
                 <tbody ng-if="handleItem === 2" ng-repeat="item in storageList" ng-class="{'toggle-mode': item.seleted}">
                 <tr>
                     <td>系统自动生成</td>
-                    <td ng-bind="item.purchaseid">H</td>
-                    <td ng-bind="item.maiName">深</td>
+                    <td><span ng-bind="item.purchaseid" title="{{item.purchaseid}}"></span></td>
+                    <td><span ng-bind="item.buyentername || item.buyername" title="{{item.buyentername || item.buyername}}"></span></td>
                     <td ng-bind="storage_tab === 'outBound' ? '销售出库' : '采购入库'">腌肉入库</td>
-                    <td ng-bind="item.buyentername || item.buyername">张三</td>
-                    <td ng-bind="item.createtime | date: 'yyyy-MM-dd'">2018-12-12</td>
+                    <td><span ng-bind="item.sellername" title="{{item.sellername}}"></span></td>
+                    <td ng-bind="item.createtime | date: 'yyyy-MM-dd'"></td>
                     <td ng-if="!item.seleted"><a class="btn-click" ng-click="item.seleted = !item.seleted;unfoldClick(storageList, item)" ng-bind="storage_tab === 'inPut' ? '收货入库' : '发货出库'"></a></td>
                     <td ng-if="item.seleted"><a class="btn-click" ng-click="saveOtherCheck(item)">确定</a><a class="btn-click" ng-click="item.seleted = !item.seleted">取消</a></td>
                 </tr>