Преглед изворни кода

库存管理---初盘有异常确定是否重盘

haozi пре 5 година
родитељ
комит
643ba0310a
2 измењених фајлова са 32 додато и 39 уклоњено
  1. 3 2
      package-lock.json
  2. 29 37
      resources/views/inventory/stockInventory/inventoryMission.blade.php

+ 3 - 2
package-lock.json

@@ -6187,7 +6187,8 @@
         },
         "minimist": {
             "version": "1.2.0",
-            "resolved": "",
+            "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+            "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
             "dev": true
         },
         "mississippi": {
@@ -8762,7 +8763,7 @@
         },
         "socket.io-client": {
             "version": "2.3.0",
-            "resolved": "https://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.3.0.tgz",
+            "resolved": "https://registry.npm.taobao.org/socket.io-client/download/socket.io-client-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsocket.io-client%2Fdownload%2Fsocket.io-client-2.3.0.tgz",
             "integrity": "sha1-FNW6LgC5vNFFrkQ6uWs/hsvMG7Q=",
             "requires": {
                 "backo2": "1.0.2",

+ 29 - 37
resources/views/inventory/stockInventory/inventoryMission.blade.php

@@ -679,19 +679,17 @@
                     _this.listMode = false;
                 })();
                 let column = [
-                    {
-                        name: 'cloneCheckAll', customization: true, type: 'checkAll', column: 'id',
-                        dom: $('#cloneCheckAll').removeClass('d-none'), neglect: true
-                    },
-                    {name: 'index', value: '序号', neglect: true},
-                    {name: 'location', value: '库位'},
+                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
+                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
+                    {name:'index',value: '序号', neglect: true},
+                    {name:'location',value: '库位'},
                     {name: 'commodity_name', value: '产品名'},
                     {name: 'commodity_barcode', value: '产品条码'},
-                    {name: 'commodity_sku', value: '产品编码'},
+                    {name:'commodity_sku',value: '产品编码'},
                     {name: 'produced_at', value: '生产日期', neglect: true},
                     {name: 'valid_at', value: '失效日期', neglect: true},
                     {name: 'batch_number', value: '批号', neglect: true},
-                    {name: 'stockInventoryPersons', value: '盘点人', neglect: true},
+                    {name: 'stockInventoryPersons',value: '盘点人', neglect: true},
                     {name: 'erp_type_position', value: 'ERP属性仓', neglect: true},
                     {name: 'quality', value: '质量状态', neglect: true},
                     {name: 'stored_amount', value: '库存数量', neglect: true},
@@ -708,11 +706,11 @@
                         column: column,
                         data: _this.inventoryMissions,
                         restorationColumn: 'id',
-                        fixedTop: ($('#form').height()) + 2,
-                        vue: listVue,
+                        fixedTop:($('#form').height())+2,
+                        vue:listVue,
                     });
                     header.init();
-                }, 0);
+                },0);
                 this.以条码建立记录索引();
                 this.以库位建立记录索引();
             },
@@ -723,8 +721,8 @@
                 //全选事件
                 checkAll(e) {
                     if (e.target.checked) {
-                        this.inventoryMissions.forEach((el, i) => {
-                            if (this.checkData.indexOf(el) == '-1') {
+                        this.inventoryMissions.forEach((el,i)=>{
+                            if (this.checkData.indexOf(el) == '-1'){
                                 this.checkData.push(el);
                             }
                         });
@@ -744,9 +742,7 @@
                     _this.显示盘点计数input_按情况();
                     (new Promise(function(resolve,reject){resolve()})).then(function (){
                         _this.提交库位和条码()
-                        setTimeout(function(){
-                            _this.显示盘点计数input_按情况();
-                        },20)
+                        _this.显示盘点计数input_按情况();
                     })
                 },
                 amountPress(e){
@@ -768,9 +764,7 @@
                     _this.显示盘点计数input_按情况();
                     (new Promise(function(resolve,reject){resolve()})).then(function (){
                         _this.提交库位和条码();
-                        setTimeout(function(){
-                            _this.显示盘点计数input_按情况();
-                        },20)
+                        _this.显示盘点计数input_按情况();
                     })
                 },
                 selectingRow(e){
@@ -820,11 +814,14 @@
                         _this.指定盘点记录列=[];
                 },
                 显示盘点计数input_按情况(){
-                    if(this.指定盘点记录列&&this.指定盘点记录列.length>0){
-                        this.dataExtraStatus.addingNew=false;
-                    }else{
-                        this.dataExtraStatus.addingNew=true;
-                    }
+                    setTimeout(function(){
+                        if(!this.dataExtraStatus||!this.dataExtraStatus.addingNew)return;
+                        if(this.指定盘点记录列&&this.指定盘点记录列.length>0){
+                            this.dataExtraStatus.addingNew=false;
+                        }else{
+                            this.dataExtraStatus.addingNew=true;
+                        }
+                    },10)
                 },
                 async 筛选出记录(库位, 条码){
                     条码=条码.trim();
@@ -1330,11 +1327,11 @@
                             });
                             _this.重排序并标记全列表类型(_this.inventoryMissions);
                             if (response.data.inventoryMission.difference_amount!==0)_this.初盘有盘点差异_确认是否重盘();
-                                if (response.data.inventoryMission.difference_amount===0){
-                                    _this.清空inputs();
-                                    tempTip.setDuration(3000);
-                                    tempTip.showSuccess('盘点成功!');
-                                }
+                            if (response.data.inventoryMission.difference_amount===0){
+                                _this.清空inputs();
+                                tempTip.setDuration(3000);
+                                tempTip.showSuccess('盘点成功!');
+                            }
                         }).catch(function (err) {
                         tempTip.setDuration(2000);
                         tempTip.show('盘点失败!' + '网络错误' + err);
@@ -1343,9 +1340,8 @@
                 初盘有盘点差异_确认是否重盘(){
                     let _this=this;
                     tempTip.confirm('<p class="text-danger">'+"当前盘点数量存在差异,是否重盘当前盘点记录?"+'</p>',function () {
-                            $('#barcode').focus();
-                            _this.提交库位和条码();
                             _this.放置焦点光标至正确位置();
+                            _this.提交库位和条码();
                         },
                         function () {
                             _this.清空inputs();
@@ -1356,12 +1352,6 @@
                 清空inputs() {
                     for (let key in this.inputs) {
                         this.inputs[key] = '';
-                清空inputs(){
-                    $locationInput.val('');
-                    $barcodeInput.val('');
-                    $amountInput.val('');
-                    for(let key in this.inputs()){
-                        this.inputs()[key]='';
                     }
                 },
                 不覆盖() {
@@ -1469,6 +1459,8 @@
                 },
 
 
+
+
                 // 单条排序并着色(inventoryMission){
                 //     let _this=this;
                 //     let 所在临时分类列=[];