|
|
@@ -72,7 +72,7 @@
|
|
|
</span>
|
|
|
<span v-if="!listMode">
|
|
|
@can('库存管理-盘点-结束初盘')
|
|
|
- <span v-if="inventory.status==='盘点中' ||inventory.status=='待盘点'" class="btn col-md-2 font-weight-bold btn-outline-secondary" style="max-width: 160px" @click="stockInventoryEnd(inventory.id)">结束</span>
|
|
|
+ <span v-if="inventory.status==='盘点中' ||inventory.status=='待盘点'" class="btn col-md-2 font-weight-bold btn-outline-secondary" style="max-width: 160px" @click="stockInventoryEnd(inventory.id)">结束</span>
|
|
|
@endcan
|
|
|
<span v-if="inventory.status==='复盘中'" class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.status=='盘点中' ||inventory.status=='待盘点'?'btn-outline-info disabled':'bg-info'">复盘</span>
|
|
|
</span>
|
|
|
@@ -98,7 +98,6 @@
|
|
|
<span class="form-group ml-4" v-if="dataExtraStatus.addingNew" id="countBlock">
|
|
|
<label for="count" class="text-secondary font-weight-bold">请输盘点数</label>
|
|
|
<input type="text" id="amountInput" @keypress="amountPress($event)"
|
|
|
- @change="amountChange($event)"
|
|
|
name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off">
|
|
|
</span>
|
|
|
|
|
|
@@ -743,21 +742,11 @@
|
|
|
}
|
|
|
},
|
|
|
barcodeChange(e){
|
|
|
- let _this=this;
|
|
|
- this.inputs().barcode=e.target.value;
|
|
|
- this.放置焦点光标至正确位置();
|
|
|
- _this.显示盘点计数input_按情况();
|
|
|
- (new Promise(function(resolve,reject){resolve()})).then(function (){
|
|
|
- _this.提交库位和条码()
|
|
|
- _this.显示盘点计数input_按情况();
|
|
|
- })
|
|
|
+ this.inputs().barcode = e.target.value;
|
|
|
+ this.提交部分输入();
|
|
|
},
|
|
|
amountPress(e){
|
|
|
- if(e.key==='Enter') this.amountChange(e);
|
|
|
- },
|
|
|
- amountChange(e){
|
|
|
- this.inputs().amount=e.target.value;
|
|
|
- this.提交新增并盘点();
|
|
|
+ if(e.key==='Enter') this.提交新增(e);
|
|
|
},
|
|
|
locationPress(e){
|
|
|
if(e.key==='Enter'){
|
|
|
@@ -765,15 +754,25 @@
|
|
|
}
|
|
|
},
|
|
|
locationChange(e){
|
|
|
- let _this=this;
|
|
|
- this.inputs().location=e.target.value;
|
|
|
+ this.inputs().location = e.target.value;
|
|
|
+ this.提交部分输入();
|
|
|
+ },
|
|
|
+ 提交部分输入:_.throttle(function(){
|
|
|
+ let _this = this;
|
|
|
this.放置焦点光标至正确位置();
|
|
|
_this.显示盘点计数input_按情况();
|
|
|
- (new Promise(function(resolve,reject){resolve()})).then(function (){
|
|
|
+ (new Promise(function (resolve, reject) {
|
|
|
+ resolve()
|
|
|
+ })).then(function () {
|
|
|
_this.提交库位和条码();
|
|
|
_this.显示盘点计数input_按情况();
|
|
|
})
|
|
|
- },
|
|
|
+
|
|
|
+ },100,{trailing:false}),
|
|
|
+ 提交新增:_.throttle(function(e){
|
|
|
+ this.inputs().amount=e.target.value;
|
|
|
+ this.提交新增并盘点();
|
|
|
+ },100,{trailing:false}),
|
|
|
selectingRow(e){
|
|
|
let _this=this;
|
|
|
let id = $(e.target).attr('data_id');
|
|
|
@@ -782,7 +781,6 @@
|
|
|
this.放置焦点光标至正确位置();
|
|
|
let re=true;
|
|
|
_this.提交新增并盘点().then(function(result){
|
|
|
- console.log(result)
|
|
|
if(!result){
|
|
|
_this.提交盘点();
|
|
|
}
|
|
|
@@ -930,7 +928,7 @@
|
|
|
if(!库位存在于当前记录)新增字段标记='库位新增';
|
|
|
if(!条码存在于当前记录)新增字段标记='商品新增';
|
|
|
|
|
|
- this.增加系统之外的盘点记录(_this.inputs().location,_this.inputs().barcode,_this.inputs().amount,inventoryId,_this.inventory.owner.code,新增字段标记);
|
|
|
+ _this.增加系统之外的盘点记录(_this.inputs().location,_this.inputs().barcode,_this.inputs().amount,inventoryId,_this.inventory.owner.code,新增字段标记);
|
|
|
return true;
|
|
|
},
|
|
|
提交盘点:_.throttle(function(){
|
|
|
@@ -1041,22 +1039,20 @@
|
|
|
_this.未复盘有差异列 = _this.按库位排序_且合并SKU一起(_this.未复盘有差异列);
|
|
|
_this.已复盘无差异列 = _this.按库位排序_且合并SKU一起(_this.已复盘无差异列);
|
|
|
_this.无差异列 = _this.按库位排序_且合并SKU一起(_this.无差异列);
|
|
|
+
|
|
|
_this.未盘列 = _this.按库位排序_且合并SKU一起(_this.未盘列);
|
|
|
- if (_this.inventory.status!=='复盘中'){
|
|
|
- if (!_this.分割位置id) _this.分割位置id = _this.未盘列[0].id;
|
|
|
- _this.分割位置id = _this.更新分割位置(_this.未盘分隔列2, _this.分割位置id);
|
|
|
- _this.未盘分隔列 = _this.分隔_基于分割位置(_this.未盘列, _this.分割位置id);
|
|
|
- _this.未盘分隔列1 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[0]);
|
|
|
- _this.未盘分隔列2 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[1]);
|
|
|
- }
|
|
|
+ if (_this.未盘列.length>0&&!_this.分割位置id) _this.分割位置id = _this.未盘列[0].id;
|
|
|
+ _this.分割位置id = _this.更新分割位置(_this.未盘分隔列2, _this.分割位置id);
|
|
|
+ _this.未盘分隔列 = _this.分隔_基于分割位置(_this.未盘列, _this.分割位置id);
|
|
|
+ _this.未盘分隔列1 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[0]);
|
|
|
+ _this.未盘分隔列2 = _this.按库位排序_且合并SKU一起(_this.未盘分隔列[1]);
|
|
|
+
|
|
|
_this.跳过列 = _this.按库位排序_且合并SKU一起(_this.跳过列);
|
|
|
_this.inventoryMissions = [];
|
|
|
_this.重推入(_this.inventoryMissions, _this.已复盘有差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.未复盘有差异列);
|
|
|
- if (_this.inventory.status!=='复盘中') {
|
|
|
- _this.重推入(_this.inventoryMissions, _this.未盘分隔列2);
|
|
|
- _this.重推入(_this.inventoryMissions, _this.未盘分隔列1);
|
|
|
- }
|
|
|
+ _this.重推入(_this.inventoryMissions, _this.未盘分隔列2);
|
|
|
+ _this.重推入(_this.inventoryMissions, _this.未盘分隔列1);
|
|
|
_this.重推入(_this.inventoryMissions, _this.已复盘无差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.无差异列);
|
|
|
_this.重推入(_this.inventoryMissions, _this.跳过列);
|