|
|
@@ -71,7 +71,9 @@
|
|
|
@{{ inventory.type }}
|
|
|
</span>
|
|
|
<span v-if="!listMode">
|
|
|
- <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>
|
|
|
+ @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>
|
|
|
+ @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>
|
|
|
</div>
|
|
|
@@ -96,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>
|
|
|
|
|
|
@@ -741,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'){
|
|
|
@@ -763,21 +754,31 @@
|
|
|
}
|
|
|
},
|
|
|
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');
|
|
|
_this.selectingId=id;
|
|
|
if(e.key==='Enter'){
|
|
|
- this.放置焦点光标至正确位置()
|
|
|
+ this.放置焦点光标至正确位置();
|
|
|
let re=true;
|
|
|
_this.提交新增并盘点().then(function(result){
|
|
|
if(!result){
|
|
|
@@ -927,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(){
|
|
|
@@ -942,8 +943,10 @@
|
|
|
if (inventoryMission.stockInventoryPersons.length > 0 && inventoryMission.id === _this.selectingId) {
|
|
|
_this.lastStockInventoryRecord = inventoryMission;
|
|
|
_this.stockInventoryPersons = inventoryMission.stockInventoryPersons;
|
|
|
- if (_this.inventory.status !== '复盘中') $("#lastStockInventoryRecord").modal('show');
|
|
|
- return;
|
|
|
+ if (_this.inventory.status !== '复盘中'){
|
|
|
+ $("#lastStockInventoryRecord").modal('show');
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
_this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
|
|
|
_this.清空指定盘点记录列();
|
|
|
@@ -955,9 +958,7 @@
|
|
|
stockInventoryEnd(id) {
|
|
|
let _this = this;
|
|
|
let url = '{{url('inventory/stockInventoryEnd')}}';
|
|
|
- if (!confirm('确定要结束初盘任务,进入复盘吗?')) {
|
|
|
- return
|
|
|
- }
|
|
|
+ if (!confirm('确定要结束初盘任务,进入复盘吗?')) {return;}
|
|
|
axios.post(url, {id: id}).then(function (response) {
|
|
|
if (!response.data.success) {
|
|
|
tempTip.setDuration(2000);
|
|
|
@@ -1038,12 +1039,14 @@
|
|
|
_this.未复盘有差异列 = _this.按库位排序_且合并SKU一起(_this.未复盘有差异列);
|
|
|
_this.已复盘无差异列 = _this.按库位排序_且合并SKU一起(_this.已复盘无差异列);
|
|
|
_this.无差异列 = _this.按库位排序_且合并SKU一起(_this.无差异列);
|
|
|
+
|
|
|
_this.未盘列 = _this.按库位排序_且合并SKU一起(_this.未盘列);
|
|
|
- if (!_this.分割位置id) _this.分割位置id = _this.未盘列[0].id;
|
|
|
+ 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.已复盘有差异列);
|
|
|
@@ -1170,9 +1173,8 @@
|
|
|
跳过盘点记录(inventoryAccountMissionId, inventoryAccountId, name) {
|
|
|
let _this = this;
|
|
|
if (!confirm('确定要跳过商品为:“' + name + '”的盘点记录吗?')) {
|
|
|
- return
|
|
|
+ return ;
|
|
|
}
|
|
|
- ;
|
|
|
let url = '{{url('inventory/跳过盘点记录')}}';
|
|
|
axios.post(url, {
|
|
|
inventoryAccountMissionId: inventoryAccountMissionId,
|
|
|
@@ -1202,9 +1204,8 @@
|
|
|
完结盘点任务(id, owner_name, type) {
|
|
|
let _this = this;
|
|
|
if (!confirm('确定完结货主为:“' + owner_name + '”的“' + type + '”任务吗?')) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
- ;
|
|
|
let url = '{{url('inventory/完结盘点任务')}}/' + id;
|
|
|
axios.get(url).then(function (response) {
|
|
|
if (!response.data.success) {
|