|
|
@@ -11,8 +11,9 @@
|
|
|
<div class="mt-3">
|
|
|
|
|
|
<span class="mt-3" >
|
|
|
- <span><button class="btn btn-sm btn-outline-info" v-if="inventory.status==='复盘中' &&!listMode" @click="完结盘点任务(inventory.id,inventory.owner.name,inventory.type)">完结</button></span>
|
|
|
-
|
|
|
+ @can('库存管理-盘点-完结')
|
|
|
+ <span><button class="btn btn-sm btn-outline-info" v-if="inventory.status==='复盘中' &&!listMode" @click="完结盘点任务(inventory.id,inventory.owner.name,inventory.type)">完结</button></span>
|
|
|
+ @endcan
|
|
|
@can('库存管理-盘点-查看')
|
|
|
<button class="btn btn-sm" @click="listMode?listMode=false:listMode=true" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="!listMode">切换为列表</button>
|
|
|
@endcan
|
|
|
@@ -76,47 +77,48 @@
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <form id="form" >
|
|
|
+ <form id="form">
|
|
|
<div class="mt-3 form-inline " v-if="!listMode" :class="inventory.status=='盘点中' ||inventory.status=='待盘点'?'row-cols-3':'row-cols-5'">
|
|
|
<span class="form-group">
|
|
|
<label for="location" class="text-secondary font-weight-bold">请输库位</label>
|
|
|
- <input id="inventoryInput" @keypress="inputSwitch($event)"
|
|
|
+ <input id="inventoryInput" v-model="inputs.location" @keypress="locationPress($event)"
|
|
|
name="location" type="text" class="form-control input" autocomplete="off" value="@if(old('location')){{old('location')}}@endif">
|
|
|
</span>
|
|
|
<span class="form-group ml-4">
|
|
|
<label for="barcode" class="text-secondary font-weight-bold">请输产品条码</label>
|
|
|
- <input id="barcode" name="barcode" @keypress="inputSwitch($event,inventory.owner.code)"
|
|
|
- type="text" value="@if(old('barcode')){{old('barcode')}}@endif" class="form-control input" autocomplete="off" @blur="searchBarcode(inventory.owner.code)">
|
|
|
+ <input id="barcode" name="barcode" @keypress="barcodePress($event)" v-model="inputs.barcode"
|
|
|
+ type="text" value="@if(old('barcode')){{old('barcode')}}@endif" class="form-control input" autocomplete="off">
|
|
|
|
|
|
</span>
|
|
|
-{{-- v-if="inventoryAccountMissions.length=0"--}}
|
|
|
- <span class="form-group ml-4" >
|
|
|
+
|
|
|
+ <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="count" @keypress="inputSwitch($event)"
|
|
|
+ <input type="text" id="count" @keypress="amountPress($event)" v-model="inputs.amount"
|
|
|
name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off">
|
|
|
</span>
|
|
|
|
|
|
<span v-if="inventory.status=='复盘中'" class="form-group ml-4">
|
|
|
<label for="count" class="text-secondary">上一次盘点数:</label>
|
|
|
- <span v-if="!inventoryMissionRecord.re_checked_amount">
|
|
|
- <span class="font-weight-bold" >@{{ inventoryMissionRecord.verified_amount }}</span>
|
|
|
+ <span v-if="!指定盘点记录列.re_checked_amount">
|
|
|
+ <span class="font-weight-bold" >@{{ 指定盘点记录列.verified_amount }}</span>
|
|
|
</span>
|
|
|
- <span v-if="inventoryMissionRecord.re_checked_amount">
|
|
|
- <span class="font-weight-bold">@{{ inventoryMissionRecord.re_checked_amount }}</span>
|
|
|
+ <span v-if="指定盘点记录列.re_checked_amount">
|
|
|
+ <span class="font-weight-bold">@{{ 指定盘点记录列.re_checked_amount }}</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
|
|
|
<span v-if="inventory.status=='复盘中'" class="form-group ml-4">
|
|
|
<label for="count" class="text-secondary">盘点差异数:</label>
|
|
|
- <span v-if="inventoryMissionRecord.difference_amount" class="font-weight-bold">@{{ inventoryMissionRecord.difference_amount }}</span>
|
|
|
+ <span v-if="指定盘点记录列.difference_amount" class="font-weight-bold">@{{ 指定盘点记录列.difference_amount }}</span>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div class="row d-none d-xl-block" v-if="inventoryAccountMissions.length>=1">
|
|
|
+ <!--相同库位和条码 pc端-->
|
|
|
+ <div class="row d-none d-xl-block" v-if="指定盘点记录列.length>=1">
|
|
|
<div class="col-12 col-md-12 col-sm-12">
|
|
|
<table class="table table-sm table-bordered table-info mt-2" v-if="!listMode">
|
|
|
<tr>
|
|
|
+ <td class="font-weight-bold">输入盘点数</td>
|
|
|
<td>操作</td>
|
|
|
-{{-- <td class="font-weight-bold">输入盘点数</td>--}}
|
|
|
<td>库位</td>
|
|
|
<td>产品名</td>
|
|
|
<td>产品条码</td>
|
|
|
@@ -131,17 +133,26 @@
|
|
|
<td>复盘数量</td>
|
|
|
<td>复盘差异</td>
|
|
|
</tr>
|
|
|
- <tr v-for="inventoryMission in inventoryAccountMissions">
|
|
|
+ <tr v-for="inventoryMission in 指定盘点记录列" class="selectingRow">
|
|
|
+ <td>
|
|
|
+ <input type="text" @keypress="selectingRow($event)"
|
|
|
+ name="amount" class="form-control-sm input" autocomplete="off" :data_id="inventoryMission.id" @input="inputs.amount=$event.target.value">
|
|
|
+ </td>
|
|
|
<td>
|
|
|
<span class="btn btn-sm btn-outline-primary" @click="盘点选中任务(inventoryMission.id,inventoryMission.produced_at,inventoryMission.valid_at,inventoryMission.batch_number)">选定盘点</span>
|
|
|
</td>
|
|
|
-{{-- <td>--}}
|
|
|
-{{-- <input type="text" id="count" @keypress="inputSwitch($event)"--}}
|
|
|
-{{-- name="count" class="form-control-sm input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off" :data_value="inventoryMission.id">--}}
|
|
|
-{{-- </td>--}}
|
|
|
<td>@{{ inventoryMission.location }}</td>
|
|
|
<td v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.name }}</td>
|
|
|
- <td v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.barcode }}</td>
|
|
|
+ <td v-if="inventoryMission.commodity">
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes && inventoryMission.commodity_barcodes.length>0">
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes.length==1">
|
|
|
+ @{{ inventoryMission.commodity_barcodes[0].code }}
|
|
|
+ </span>
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes.length>1">
|
|
|
+ <small v-for="barcode in inventoryMission.commodity_barcodes">@{{ barcode.code }}<br></small>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
<td v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.sku }}</td>
|
|
|
<td>
|
|
|
<input type="date" class="form-control-sm" name="produced_at" v-model="inventoryMission.produced_at.substr(0,10)" >
|
|
|
@@ -178,6 +189,81 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!--相同库位和条码 移动端-->
|
|
|
+ <div v-if="指定盘点记录列.length>=1">
|
|
|
+ <table class="table table-striped table-sm table-bordered table-hover p-0 d-table d-xl-none mt-2" style="background: rgb(179, 214, 245);" v-if="!listMode">
|
|
|
+ <tr v-for="inventoryMission in 指定盘点记录列" class="selectingRow移动端">
|
|
|
+ <td style="filter:grayscale(30%); ">
|
|
|
+ <div class="mt-3">
|
|
|
+ <div>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">输入盘点数:</span>
|
|
|
+ <span >
|
|
|
+ <input type="text" @keypress="selectingRow($event)"
|
|
|
+ name="amount" class="form-control-sm input" autocomplete="off" :data_id="inventoryMission.id" @input="inputs.amount=$event.target.value">
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">操作:</span>
|
|
|
+ <span class="btn btn-sm btn-outline-primary" @click="盘点选中任务(inventoryMission.id,inventoryMission.produced_at,inventoryMission.valid_at,inventoryMission.batch_number)">选定盘点</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div style="transform:scale(0.9)" class="pl-0">
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span >@{{ inventoryMission.location }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品名称:</span><span v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.name }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品条码:</span>
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes && inventoryMission.commodity_barcodes.length>0">
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes.length==1">
|
|
|
+ @{{ inventoryMission.commodity_barcodes[0].code }}
|
|
|
+ </span>
|
|
|
+ <span v-if="inventoryMission.commodity_barcodes.length>1">
|
|
|
+ <small v-for="barcode in inventoryMission.commodity_barcodes">@{{ barcode.code }}<br></small>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品编码:</span><span v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.sku }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">生产日期:</span>
|
|
|
+ <input type="date" class="form-control-sm" name="produced_at" v-model="inventoryMission.produced_at.substr(0,10)">
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">失效时期:</span>
|
|
|
+ <input type="date" class="form-control-sm" name="valid_at" v-model="inventoryMission.valid_at.substr(0,10)">
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">批号:</span>
|
|
|
+ <input type="text" class="form-control-sm" name="batch_number" v-model="inventoryMission.batch_number">
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span class="mr-3 text-nowrap"><span class="font-weight-bold">盘点人:</span>
|
|
|
+ <span v-if="inventoryMission.stockInventoryPersons &&!listMode" class="text-muted" :rowspan="inventoryMission.is_multi_row?2:''">
|
|
|
+ <a href="#" v-if="inventoryMission.stockInventoryPersons.length>0" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
+ @{{ inventoryMission.stockInventoryPersons[0].mark }}<b class="caret"></b>
|
|
|
+ </a>
|
|
|
+ <div style="position: absolute;width:320px;margin-left:-100px;background-color: white;max-height:150px ;overflow-y:auto" class="small mt-0 dropdown-menu">
|
|
|
+ <table class="table table-sm table-striped table-bordered">
|
|
|
+ <tr>
|
|
|
+ <th>盘点人</th>
|
|
|
+ <th>时间</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="stockInventoryPerson in inventoryMission.stockInventoryPersons">
|
|
|
+ <td>@{{ stockInventoryPerson.mark }}</td>
|
|
|
+ <td>@{{ stockInventoryPerson.created_at }}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span class="mr-3 text-nowrap"><span >属性仓:</span><span>@{{ inventoryMission.erp_type_position }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span >质量状态:</span><span>@{{ inventoryMission.quality }}</span></span>
|
|
|
+ <div>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" >盘点数量:</span><span style="color:#af7651">@{{ inventoryMission.verified_amount }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" >复盘数量:</span><span style="color:#af7651">@{{ inventoryMission.re_checked_amount }}</span></span>
|
|
|
+ <span class="mr-3 text-nowrap"><span style="color:#783000" >盘点差异:</span><span >@{{ inventoryMission.difference_amount }}</span></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
</form>
|
|
|
|
|
|
|
|
|
@@ -189,16 +275,15 @@
|
|
|
</label>
|
|
|
<table class="table table-sm table-bordered d-none text-nowrap " id="headerRoll"></table>
|
|
|
<table class="table table-sm table-striped d-none d-xl-block p-0 text-nowrap table-bordered" id="headerParent">
|
|
|
- {{-- <span style="position: fixed; top:380px; right:50px;"><button class="btn btn-sm btn-outline-secondary d-none d-xl-block" v-if="inventory.type=='动盘'" id="lockLocation">以此为起点</button></span>--}}
|
|
|
<tr class="p-0" id="header"></tr>
|
|
|
- <tr v-for="(inventoryMission,i) in inventoryMissions" @click="selectedColor(inventoryMission.id)"
|
|
|
- :style="{'font-weight': inventory.id==selectedStyle?'bold':''}" :class="[
|
|
|
+ <tr v-for="(inventoryMission,i) in inventoryMissions"
|
|
|
+ :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}" :class="[
|
|
|
inventoryMission.mark==='已复盘有差异'?'td-cool':'',
|
|
|
inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
|
|
|
inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
|
|
|
inventoryMission.mark==='无差异'?'text-muted':'',
|
|
|
inventoryMission.mark==='未盘'?'td-yellow':'',
|
|
|
- inventoryMission.mark==='跳过'?'td-helpful':'',
|
|
|
+ inventoryMission.mark==='跳过'?'text-muted':'',
|
|
|
]">
|
|
|
<td>
|
|
|
<input type="checkbox" :value="inventoryMission" v-model="checkData">
|
|
|
@@ -265,91 +350,24 @@
|
|
|
<td v-if="!listMode">
|
|
|
{{-- <span class="btn btn-sm btn-outline-danger" @click="删除盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">删除</span>--}}
|
|
|
<span class="btn btn-sm btn-outline-secondary" v-if="inventoryMission.checked==='否'" @click="跳过盘点记录(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">跳过</span>
|
|
|
+{{-- <span class="btn btn-sm btn-outline-secondary" v-if="inventory.type=='动盘'" @click="选中盘点起始位置(inventoryMission.location)">以此为起点</span>--}}
|
|
|
</td>
|
|
|
@endcan
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <!--相同库位和条码-->
|
|
|
- <table class="table table-striped table-sm table-bordered table-hover p-0 d-table d-xl-none mt-2" style="background: rgb(179, 214, 245);" v-if="!listMode">
|
|
|
- <tr v-for="inventoryMission in inventoryAccountMissions">
|
|
|
- <td style="filter:grayscale(30%); ">
|
|
|
- <div class="mt-3">
|
|
|
- <div style="transform:scale(0.9)" class="pl-0">
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span >@{{ inventoryMission.location }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品名称:</span><span v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.name }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品条码:</span>
|
|
|
- <span v-if="inventoryMission.commodity_barcodes && inventoryMission.commodity_barcodes.length>0">
|
|
|
- <span v-if="inventoryMission.commodity_barcodes.length==1">
|
|
|
- @{{ inventoryMission.commodity_barcodes[0].code }}
|
|
|
- </span>
|
|
|
- <span v-if="inventoryMission.commodity_barcodes.length>1">
|
|
|
- <small v-for="barcode in inventoryMission.commodity_barcodes">@{{ barcode.code }}<br></small>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品编码:</span><span v-if="inventoryMission.commodity">@{{ inventoryMission.commodity.sku }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">生产日期:</span>
|
|
|
- <input type="date" class="form-control-sm" name="produced_at" v-model="inventoryMission.produced_at.substr(0,10)">
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">失效时期:</span>
|
|
|
- <input type="date" class="form-control-sm" name="valid_at" v-model="inventoryMission.valid_at.substr(0,10)">
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">批号:</span>
|
|
|
- <input type="text" class="form-control-sm" name="batch_number" v-model="inventoryMission.batch_number">
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">盘点人:</span>
|
|
|
- <span v-if="inventoryMission.stockInventoryPersons &&!listMode" class="text-muted" :rowspan="inventoryMission.is_multi_row?2:''">
|
|
|
- <a href="#" v-if="inventoryMission.stockInventoryPersons.length>0" class="dropdown-toggle" data-toggle="dropdown">
|
|
|
- @{{ inventoryMission.stockInventoryPersons[0].mark }}<b class="caret"></b>
|
|
|
- </a>
|
|
|
- <div style="position: absolute;width:320px;margin-left:-100px;background-color: white;max-height:150px ;overflow-y:auto" class="small mt-0 dropdown-menu">
|
|
|
- <table class="table table-sm table-striped table-bordered">
|
|
|
- <tr>
|
|
|
- <th>盘点人</th>
|
|
|
- <th>时间</th>
|
|
|
- </tr>
|
|
|
- <tr v-for="stockInventoryPerson in inventoryMission.stockInventoryPersons">
|
|
|
- <td>@{{ stockInventoryPerson.mark }}</td>
|
|
|
- <td>@{{ stockInventoryPerson.created_at }}</td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span class="mr-3 text-nowrap"><span >属性仓:</span><span>@{{ inventoryMission.erp_type_position }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span >质量状态:</span><span>@{{ inventoryMission.quality }}</span></span>
|
|
|
- <div>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" >盘点数量:</span><span style="color:#af7651">@{{ inventoryMission.verified_amount }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" >复盘数量:</span><span style="color:#af7651">@{{ inventoryMission.re_checked_amount }}</span></span>
|
|
|
- <span class="mr-3 text-nowrap"><span style="color:#783000" >盘点差异:</span><span >@{{ inventoryMission.difference_amount }}</span></span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">操作:</span>
|
|
|
- <span class="btn btn-sm btn-outline-primary" @click="盘点选中任务(inventoryMission.id,inventoryMission.produced_at,inventoryMission.valid_at,inventoryMission.batch_number)">选定盘点</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
<!--盘点记录移动端-->
|
|
|
<table id="listOnPad" class="table table-striped table-sm table-bordered table-hover p-0 d-table d-xl-none" style="background: rgb(255, 255, 255);" >
|
|
|
-
|
|
|
- {{-- <span style="position: fixed; top:560px; right:50px;" ><button class="btn btn-sm btn-outline-secondary d-table d-xl-none" v-if="inventory.type=='动盘'" id="lockLocationPhone">以此为起点</button></span>--}}
|
|
|
<tbody>
|
|
|
<tr v-for="(inventoryMission,i) in inventoryMissions"
|
|
|
+ :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':''}"
|
|
|
:class="[
|
|
|
inventoryMission.mark==='已复盘有差异'?'td-cool':'',
|
|
|
inventoryMission.mark==='已复盘无差异'?'td-cool text-muted':'',
|
|
|
inventoryMission.mark==='未复盘有差异'?'td-warm font-weight-bold':'',
|
|
|
inventoryMission.mark==='无差异'?'text-muted':'',
|
|
|
inventoryMission.mark==='未盘'?'td-yellow':'',
|
|
|
- inventoryMission.mark==='跳过'?'td-helpful':'',
|
|
|
+ inventoryMission.mark==='跳过'?'text-muted':'',
|
|
|
]">
|
|
|
<td style="filter:grayscale(30%); ">
|
|
|
<span :id="'lockLinePhone'+(i+1)"></span>
|
|
|
@@ -423,6 +441,8 @@
|
|
|
<th>产品名</th>
|
|
|
<th>产品条码</th>
|
|
|
<th>产品编号</th>
|
|
|
+ <th>属性仓</th>
|
|
|
+ <th>质量状态</th>
|
|
|
<th>库存数量</th>
|
|
|
<th>盘点数量</th>
|
|
|
<th>盘点差异</th>
|
|
|
@@ -430,13 +450,15 @@
|
|
|
<th>时间</th>
|
|
|
</tr>
|
|
|
<tr class="text-center " >
|
|
|
- <td>@{{ inventoryMissionRecord.location }}</td>
|
|
|
- <td><span v-if="inventoryMissionRecord.commodity">@{{ inventoryMissionRecord.commodity.name }}</span></td>
|
|
|
- <td><span v-if="inventoryMissionRecord.commodity">@{{ inventoryMissionRecord.commodity.barcode }}</span></td>
|
|
|
- <td><span v-if="inventoryMissionRecord.commodity">@{{ inventoryMissionRecord.commodity.sku }}</span></td>
|
|
|
- <td>@{{ inventoryMissionRecord.stored_amount }}</td>
|
|
|
- <td>@{{ inventoryMissionRecord.verified_amount }}</td>
|
|
|
- <td>@{{ inventoryMissionRecord.difference_amount }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.location }}</td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.name }}</span></td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.barcode }}</span></td>
|
|
|
+ <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.sku }}</span></td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.erp_type_position }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.quality }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.stored_amount }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.verified_amount }}</td>
|
|
|
+ <td>@{{ lastStockInventoryRecord.difference_amount }}</td>
|
|
|
<td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[0].mark }}</span></td>
|
|
|
<td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[0].created_at }}</span></td>
|
|
|
</tr>
|
|
|
@@ -475,8 +497,10 @@
|
|
|
let listVue = new Vue({
|
|
|
el: "#list",
|
|
|
data: {
|
|
|
+ selectingId:'',
|
|
|
+ inputs:{location:'',barcode:'',amount:''},
|
|
|
+ dataExtraStatus:{addingNew:false, displayingLastCounting:false},
|
|
|
inventory:{!! $inventoryAccount!!},
|
|
|
- {{--inventoryMissions:{!! $inventoryAccountMissions !!},--}}
|
|
|
inventoryMissions : [
|
|
|
@foreach($inventoryAccountMissions as $inventoryMission)
|
|
|
{id:'{{$inventoryMission->id}}',location:'{{$inventoryMission->location}}',
|
|
|
@@ -505,9 +529,12 @@
|
|
|
re_checked_amount:'{{$inventoryMission->re_checked_amount}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
+ 条码索引_记录:[],
|
|
|
+ 库位索引_记录:[],
|
|
|
checkData: [],
|
|
|
selectedStyle:'',
|
|
|
- inventoryMissionRecord:{},
|
|
|
+ 指定盘点记录列:[],
|
|
|
+ lastStockInventoryRecord:{},
|
|
|
stockInventoryPersons:[],
|
|
|
inventoryAccountMissions:[],
|
|
|
listMode:false,
|
|
|
@@ -565,6 +592,7 @@
|
|
|
{name: 're_checked_amount', value: '复盘数量', neglect: true},
|
|
|
{name: 'difference_amount', value: '复盘差异', neglect: true},
|
|
|
{name: 'occupied_amount', value: '分配数量', neglect: true},
|
|
|
+ {name: '跳过', value: '操作', neglect: true},
|
|
|
];
|
|
|
setTimeout(function () {
|
|
|
let header = new Header({
|
|
|
@@ -572,11 +600,13 @@
|
|
|
column: column,
|
|
|
data: _this.inventoryMissions,
|
|
|
restorationColumn: 'id',
|
|
|
- //fixedTop:($('#form').height())+2,
|
|
|
+ fixedTop:($('#form').height())+2,
|
|
|
vue:listVue,
|
|
|
});
|
|
|
header.init();
|
|
|
},0);
|
|
|
+ this.以条码建立记录索引();
|
|
|
+ this.以库位建立记录索引();
|
|
|
},
|
|
|
methods:{
|
|
|
//全选事件
|
|
|
@@ -591,181 +621,181 @@
|
|
|
this.checkData = [];
|
|
|
}
|
|
|
},
|
|
|
- skuKeyPress(e,owner_code){
|
|
|
+ barcodePress(e){
|
|
|
if(e.key==='Enter') {
|
|
|
- this.searchBarcode(owner_code);
|
|
|
- this.inputSwitch(e);
|
|
|
+ this.放置焦点光标至正确位置();
|
|
|
+ this.提交库位和条码();
|
|
|
}
|
|
|
},
|
|
|
- inputSwitch(e,owner_code){
|
|
|
-
|
|
|
- if(e.key==='Enter') {
|
|
|
- let inputs = $("#form .input");
|
|
|
- let idx = inputs.index($(e.target)); // 获取当前焦点输入框所处的位置
|
|
|
- let location=document.getElementById('inventoryInput').value.trim();
|
|
|
- if (idx === 1){
|
|
|
- this.searchBarcode(owner_code);
|
|
|
- }
|
|
|
- if (idx === inputs.length - 1) { // 判断是否是最后一个输入框
|
|
|
- if (location===''){
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
- return;
|
|
|
- }
|
|
|
- listVue.submitStockInventory();
|
|
|
- //$("#form .input").val(' ');
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
- } else {
|
|
|
- inputs[idx + 1].focus(); // 设置焦点
|
|
|
- inputs[idx + 1].select(); // 选中文字
|
|
|
+ amountPress(e){
|
|
|
+ if(e.key==='Enter') this.提交新增并盘点();
|
|
|
+ },
|
|
|
+ locationPress(e){
|
|
|
+ if(e.key==='Enter'){
|
|
|
+ this.放置焦点光标至正确位置();
|
|
|
+ this.提交库位和条码();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectingRow(e){
|
|
|
+ let id = $(e.target).attr('data_id');
|
|
|
+ this.selectingId=id;
|
|
|
+ if(e.key==='Enter'){
|
|
|
+ this.放置焦点光标至正确位置();
|
|
|
+ if(!this.提交新增并盘点()){
|
|
|
+ this.提交盘点();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- selectedColor(id){
|
|
|
- if (id==this.selectedStyle){
|
|
|
- this.selectedStyle='';
|
|
|
- return;
|
|
|
+ 提交库位和条码(){
|
|
|
+ let _this=this;
|
|
|
+ this.清空指定盘点记录列();
|
|
|
+ if (!_this.inputs.barcode) return;
|
|
|
+ if(!this.is条码存在于WMS(_this.inputs.barcode)){
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.show('输入的商品条码没有对应的商品!');
|
|
|
}
|
|
|
- this.selectedStyle=id;
|
|
|
+ this.筛选出记录(_this.inputs.location,_this.inputs.barcode);
|
|
|
},
|
|
|
- //验证输入盘点产品条码对应是否有商品并且查询出初盘时的盘点记录
|
|
|
- searchBarcode(owner_code){
|
|
|
- console.log(owner_code)
|
|
|
+ 以条码建立记录索引(){
|
|
|
let _this=this;
|
|
|
- let barcode=document.getElementById('barcode').value.trim();
|
|
|
- let location=document.getElementById('inventoryInput').value.trim();
|
|
|
- let inventoryId=_this.inventory.id;
|
|
|
- let barcodes=[];
|
|
|
- setData(location,barcode,inventoryId,owner_code);
|
|
|
_this.inventoryMissions.forEach(function (inventoryMission) {
|
|
|
- if (inventoryMission.commodity_barcodes.length===1){
|
|
|
- if (!barcodes.includes(inventoryMission.commodity_barcodes[0].code)){
|
|
|
- barcodes.push(inventoryMission.commodity_barcodes[0].code);
|
|
|
- }
|
|
|
- }else if(inventoryMission.commodity_barcodes.length>1){
|
|
|
- inventoryMission.commodity_barcodes.forEach(function (barcode) {
|
|
|
- if (!barcodes.includes(barcode)){
|
|
|
- barcodes.push(barcode.code);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
- if (!barcodes.includes(barcode)){
|
|
|
- let url='{{url('inventory/stockInventory/searchCommodityByBarcode')}}';
|
|
|
- if (barcode!==''){
|
|
|
- axios.post(url,{barcode:barcode,owner_code:owner_code}).then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.show(response.data.data);
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.show('网络错误'+err);
|
|
|
- })
|
|
|
- }
|
|
|
- }else {
|
|
|
- if (location===''){
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
- return;
|
|
|
- }
|
|
|
- if (_this.inventory.status==='复盘中'){
|
|
|
- //根据该库存和产品条码查询该条盘点记录
|
|
|
- let url='{{url('inventory/searchStockInventoryRecord')}}';
|
|
|
- axios.post(url,{location:location,barcode:barcode,inventoryId:inventoryId}).then(function (response) {
|
|
|
- if (!response.data.success){
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.show('复盘!'+' '+response.data.data);
|
|
|
- }else {
|
|
|
- _this.inventoryMissionRecord=response.data.data;
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.show('网络错误'+err);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- _this.inventoryMissions.forEach(function (inventoryMission,i) {
|
|
|
- if (inventoryMission.location===location && barcode===inventoryMission.commodity.barcode){
|
|
|
- if (!_this.inventoryAccountMissions.includes(inventoryMission)){
|
|
|
- _this.inventoryAccountMissions.push(inventoryMission);
|
|
|
- }
|
|
|
- }
|
|
|
+ inventoryMission.commodity_barcodes.forEach(function (barcode) {
|
|
|
+ _this.条码索引_记录[barcode.code]=inventoryMission;
|
|
|
+ _this.条码索引_记录.push(_this.条码索引_记录[barcode.code])
|
|
|
+ })
|
|
|
});
|
|
|
},
|
|
|
- //提交盘点
|
|
|
- submitStockInventory(){
|
|
|
+ 以库位建立记录索引(){
|
|
|
let _this=this;
|
|
|
- let location=document.getElementById('inventoryInput').value.trim();
|
|
|
- let barcode=document.getElementById('barcode').value.trim();
|
|
|
- let count=document.getElementById('count').value.trim();
|
|
|
- let inventoryId=_this.inventory.id;
|
|
|
- let locations=[];
|
|
|
- let barcodes=[];
|
|
|
_this.inventoryMissions.forEach(function (inventoryMission) {
|
|
|
- if (inventoryMission.commodity_barcodes.length===1){
|
|
|
- if (!barcodes.includes(inventoryMission.commodity_barcodes[0].code)){
|
|
|
- barcodes.push(inventoryMission.commodity_barcodes[0].code);
|
|
|
- }
|
|
|
- }else if(inventoryMission.commodity_barcodes.length>1){
|
|
|
- inventoryMission.commodity_barcodes.forEach(function (barcode) {
|
|
|
- if (!barcodes.includes(barcode)){
|
|
|
- barcodes.push(barcode.code);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ _this.库位索引_记录[inventoryMission.location]=inventoryMission;
|
|
|
+ _this.库位索引_记录.push(_this.库位索引_记录[inventoryMission.location])
|
|
|
});
|
|
|
- let arr=getData();
|
|
|
- let owner_code=arr[3];
|
|
|
+ },
|
|
|
+ 清空指定盘点记录列(){
|
|
|
+ let _this=this;
|
|
|
+ _this.selectingId='';
|
|
|
+ _this.指定盘点记录列=[];
|
|
|
+ },
|
|
|
+ 筛选出记录(库位, 条码){
|
|
|
+ 条码=条码.trim();
|
|
|
+ 库位=库位.trim();
|
|
|
+ let _this=this;
|
|
|
+ if(!库位)return false;
|
|
|
+ if(!条码)return false;
|
|
|
+ if (!_this.库位索引_记录[库位]||(!_this.条码索引_记录[条码]&&_this.is条码存在于WMS(条码))) _this.dataExtraStatus.addingNew=true;
|
|
|
_this.inventoryMissions.forEach(function (inventoryMission) {
|
|
|
- locations.push(inventoryMission.location);
|
|
|
+ inventoryMission.commodity_barcodes.forEach(function (barcode) {
|
|
|
+ if (inventoryMission.location===库位 && 条码===barcode.code){
|
|
|
+ if(!_this.指定盘点记录列.includes(inventoryMission)){
|
|
|
+ _this.指定盘点记录列.push(inventoryMission);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
});
|
|
|
- if (location===''){
|
|
|
- document.getElementById('inventoryInput').focus();
|
|
|
+ },
|
|
|
+ 放置焦点光标至正确位置(){
|
|
|
+ let _this=this;
|
|
|
+ let $inventoryInput = $('#inventoryInput');
|
|
|
+ if (!$inventoryInput.val().trim()){
|
|
|
+ $inventoryInput.focus();
|
|
|
return;
|
|
|
}
|
|
|
- if (!locations.includes(location)&&!barcodes.includes(barcode)){
|
|
|
- if (_this.inventory.status==='盘点中'||_this.inventory.status==='待盘点'){
|
|
|
- if(!confirm('该'+barcode+'条码和'+location+'库位在WAS系统盘点记录中不存在!'+'确定是否需要添加至系统盘点记录中?')){return};
|
|
|
- let isBarcode='库位和商品新增';
|
|
|
- this.增加系统之外的盘点记录(location,barcode,count,inventoryId,owner_code,isBarcode);
|
|
|
- }
|
|
|
+ let $barcode = $('#barcode');
|
|
|
+ if (!$barcode.val().trim()){
|
|
|
+ $barcode.focus();
|
|
|
return;
|
|
|
- }else if (!locations.includes(location)){
|
|
|
- if (_this.inventory.status==='盘点中'||_this.inventory.status==='待盘点'){
|
|
|
- if(!confirm('该'+location+'库位在系统盘点记录中不存在!'+'确定是否需要添加至系统盘点记录中?')){return};
|
|
|
- let isLocation='库位新增';
|
|
|
- this.增加系统之外的盘点记录(location,barcode,count,inventoryId,owner_code,isLocation);
|
|
|
+ }
|
|
|
+ setTimeout(function(){
|
|
|
+ if(_this.dataExtraStatus.addingNew){
|
|
|
+ let $count = $('#count');
|
|
|
+ if (!$count.val().trim()){
|
|
|
+ $count.focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
- return;
|
|
|
- }else if (!barcodes.includes(barcode)){
|
|
|
- if (_this.inventory.status==='盘点中'||_this.inventory.status==='待盘点'){
|
|
|
- if(!confirm('该'+barcode+'条码在WAS系统盘点记录中不存在!'+'确定是否需要添加至系统盘点记录中?')){return};
|
|
|
- let isBarcode='商品新增';
|
|
|
- this.增加系统之外的盘点记录(location,barcode,count,inventoryId,owner_code,isBarcode);
|
|
|
+ if (_this.指定盘点记录列.length>=1){
|
|
|
+ $('.selectingRow').first().find('input').first().focus();
|
|
|
+ $('.selectingRow移动端').first().find('input').first().focus();
|
|
|
}
|
|
|
- return;
|
|
|
- }
|
|
|
- if ( _this.inventoryAccountMissions.length>1){
|
|
|
- alert('该库位和产品条码下存在多条盘点任务,请选中您需要盘点的任务');
|
|
|
- }else {
|
|
|
- // if (_this.inventory.status!=='复盘中'){
|
|
|
- _this.inventoryMissions.every(function (inventoryMission,i) {
|
|
|
- if (inventoryMission.location===location && barcode===inventoryMission.commodity.barcode){
|
|
|
- if (inventoryMission.stockInventoryPersons.length>0){
|
|
|
- _this.inventoryMissionRecord=inventoryMission;
|
|
|
- _this.stockInventoryPersons=inventoryMission.stockInventoryPersons;
|
|
|
- $("#lastStockInventoryRecord").modal('show');
|
|
|
- }else{
|
|
|
- //初盘且未盘点过
|
|
|
- _this.盘点(location,barcode,inventoryId,count);
|
|
|
- _this.inventoryAccountMissions=[];
|
|
|
- }
|
|
|
- return false;
|
|
|
+ },10)
|
|
|
+ },
|
|
|
+ is条码存在于WMS(条码){
|
|
|
+ 条码=条码.trim();
|
|
|
+ let _this=this;
|
|
|
+ if(!条码)return false;
|
|
|
+ if(!_this.条码索引_记录[条码])return false;
|
|
|
+ //if(!_this.条码索引_记录[条码].barcodeExsitingAtWMS)return false;
|
|
|
+ if(_this.条码索引_记录[条码])return true;
|
|
|
+ let url='{{url('inventory/stockInventory/searchCommodityByBarcode')}}';
|
|
|
+ let is成功=false;
|
|
|
+ axios.post(url,{barcode:条码,owner_code:_this.inventory.owner.code}).then(function (response) {
|
|
|
+ if (response.data.success){
|
|
|
+ is成功=true;
|
|
|
+ _this.条码索引_记录[条码]={barcodeExsitingAtWMS:true};
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.show('网络错误'+err);
|
|
|
+ });
|
|
|
+ return is成功;
|
|
|
+ },
|
|
|
+ is条码存在于当前记录(条码){
|
|
|
+ 条码=条码.trim();
|
|
|
+ let _this=this;
|
|
|
+ if(!条码)return false;
|
|
|
+ if(!_this.条码索引_记录[条码])return false;
|
|
|
+ return !!_this.条码索引_记录[条码].id;
|
|
|
+
|
|
|
+ },
|
|
|
+ is库位存在于当前记录(库位){
|
|
|
+ 库位=库位.trim();
|
|
|
+ let _this=this;
|
|
|
+ if(!库位)return false;
|
|
|
+ if(!_this.库位索引_记录[库位])return false;
|
|
|
+ return !!_this.库位索引_记录[库位].id;
|
|
|
+
|
|
|
+ },
|
|
|
+ 提交新增并盘点(){
|
|
|
+ let _this=this;
|
|
|
+ let inventoryId=_this.inventory.id;
|
|
|
+ if(!_this.inputs.location.trim()|| !_this.inputs.barcode.trim() || !_this.inputs.amount.trim())return false;
|
|
|
+ let 条码存在于当前记录 = _this.is条码存在于当前记录(_this.inputs.barcode);
|
|
|
+ let 条码存在于WMS = _this.is条码存在于WMS(_this.inputs.barcode);
|
|
|
+ let 库位存在于当前记录 = _this.is库位存在于当前记录(_this.inputs.location);
|
|
|
+
|
|
|
+ if(!条码存在于当前记录 && !条码存在于WMS)return false;
|
|
|
+ if(库位存在于当前记录 && 条码存在于当前记录)return false;
|
|
|
+ if(!confirm('该'+_this.inputs.barcode+'条码和'+_this.inputs.location+'库位相加的条件于WAS系统盘点记录中不存在! 是否确定需要添加至系统盘点记录中?')){return};
|
|
|
+ let 新增字段标记='';
|
|
|
+ if(!库位存在于当前记录&&!条码存在于当前记录)新增字段标记='库位和商品新增';
|
|
|
+ if(!库位存在于当前记录)新增字段标记='库位新增';
|
|
|
+ if(!条码存在于当前记录)新增字段标记='商品新增';
|
|
|
+
|
|
|
+ this.增加系统之外的盘点记录(_this.inputs.location,_this.inputs.barcode,_this.inputs.amount,inventoryId,_this.inventory.owner.code,新增字段标记);
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ 提交盘点(){
|
|
|
+ let _this=this;
|
|
|
+ let 条码=_this.inputs.barcode.trim();
|
|
|
+ let 库位=_this.inputs.location.trim();
|
|
|
+ let 盘点数=_this.inputs.amount.trim();
|
|
|
+ let 选定盘点记录id=_this.selectingId;
|
|
|
+ _this.指定盘点记录列.every(function (inventoryMission,i) {
|
|
|
+ if (inventoryMission.location===库位 && 条码===inventoryMission.commodity.barcode){
|
|
|
+ if (inventoryMission.stockInventoryPersons.length>0&&inventoryMission.id===_this.selectingId){
|
|
|
+ _this.lastStockInventoryRecord=inventoryMission;
|
|
|
+ _this.stockInventoryPersons=inventoryMission.stockInventoryPersons;
|
|
|
+ if (_this.inventory.status!=='复盘中') $("#lastStockInventoryRecord").modal('show');
|
|
|
+ }else{
|
|
|
+ //初盘且未盘点过
|
|
|
+ _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
|
|
|
+ _this.清空指定盘点记录列();
|
|
|
}
|
|
|
- return true;
|
|
|
- });
|
|
|
- // }
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
},
|
|
|
//结束初盘任务
|
|
|
stockInventoryEnd(id){
|
|
|
@@ -976,7 +1006,7 @@
|
|
|
return true
|
|
|
});
|
|
|
_this.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
- $("#form .input").val(' ');
|
|
|
+ _this.inputs={};
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess('增加系统之外的盘点记录成功!');
|
|
|
}
|
|
|
@@ -1017,10 +1047,10 @@
|
|
|
清理标记(mission){
|
|
|
mission.hasLinkingGroup=false;
|
|
|
},
|
|
|
- 盘点(location,barcode,inventoryId,count){
|
|
|
+ 盘点(id,location,barcode,inventoryId,count){
|
|
|
let _this=this;
|
|
|
let url='{{url('inventory/stockInventory')}}';
|
|
|
- axios.post(url,{location:location,barcode:barcode,count:count,inventoryId:inventoryId})
|
|
|
+ axios.post(url,{id:id,location:location,barcode:barcode,count:count,inventoryId:inventoryId})
|
|
|
.then(function (response) {
|
|
|
if (!response.data.success){
|
|
|
tempTip.setDuration(2000);
|
|
|
@@ -1046,7 +1076,7 @@
|
|
|
return true;
|
|
|
});
|
|
|
_this.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
- $("#form .input").val(' ');
|
|
|
+ _this.inputs={};
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess('盘点成功!');
|
|
|
}).catch(function (err) {
|
|
|
@@ -1056,43 +1086,27 @@
|
|
|
},
|
|
|
不覆盖(){
|
|
|
let _this=this;
|
|
|
- let arr=getData();
|
|
|
- let location=arr[0];
|
|
|
- let barcode=arr[1];
|
|
|
- _this.inventoryAccountMissions.forEach(function (inventoryMission,i) {
|
|
|
- if (inventoryMission.location===location && barcode===inventoryMission.commodity.barcode){
|
|
|
- _this.inventoryAccountMissions.splice(i,1);
|
|
|
- }
|
|
|
- });
|
|
|
- $("#form .input").val(' ');
|
|
|
+ _this.清空指定盘点记录列();
|
|
|
+ _this.inputs={};
|
|
|
},
|
|
|
覆盖(){
|
|
|
let _this=this;
|
|
|
- let arr=getData();
|
|
|
- let location=arr[0];
|
|
|
- let barcode=arr[1];
|
|
|
- let inventoryId=arr[2];
|
|
|
- let count=document.getElementById('count').value.trim();
|
|
|
- _this.inventoryAccountMissions.forEach(function (inventoryMission,i) {
|
|
|
- if (inventoryMission.location===location && barcode===inventoryMission.commodity.barcode){
|
|
|
- _this.inventoryAccountMissions.splice(i,1);
|
|
|
- }
|
|
|
- });
|
|
|
- this.盘点(location,barcode,inventoryId,count);
|
|
|
+ let location=_this.inputs.location.trim();
|
|
|
+ let barcode=_this.inputs.barcode.trim();
|
|
|
+ let inventoryId=_this.inventory.id;
|
|
|
+ let count=_this.inputs.amount.trim();
|
|
|
+ let id=_this.selectingId;
|
|
|
+ _this.清空指定盘点记录列();
|
|
|
+ this.盘点(id,location,barcode,inventoryId,count);
|
|
|
+ _this.inputs={};
|
|
|
},
|
|
|
盘点选中任务(id,produced_at,valid_at,batch_number){
|
|
|
let _this=this;
|
|
|
- let arr=getData();
|
|
|
- let location=arr[0];
|
|
|
- let barcode=arr[1];
|
|
|
- let inventoryId=arr[2];
|
|
|
- let count=document.getElementById('count').value.trim();
|
|
|
- _this.inventoryAccountMissions.forEach(function (inventoryMission,i) {
|
|
|
- if (inventoryMission.location===location && barcode===inventoryMission.commodity.barcode){
|
|
|
- _this.inventoryAccountMissions.splice(i,_this.inventoryAccountMissions.length);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ let location=_this.inputs.location.trim();
|
|
|
+ let barcode=_this.inputs.barcode.trim();
|
|
|
+ let inventoryId=_this.inventory.id;
|
|
|
+ let count=_this.inputs.amount.trim();
|
|
|
+ _this.清空指定盘点记录列();
|
|
|
let url='{{url('inventory/盘点选中任务')}}';
|
|
|
axios.post(url,{id:id,count:count,inventoryId:inventoryId,produced_at:produced_at,valid_at:valid_at,batch_number:batch_number})
|
|
|
.then(function (response) {
|
|
|
@@ -1127,7 +1141,7 @@
|
|
|
return true;
|
|
|
});
|
|
|
_this.重排序并标记全列表类型(_this.inventoryMissions);
|
|
|
- $("#form .input").val(' ');
|
|
|
+ _this.inputs={};
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess('盘点成功!');
|
|
|
}
|
|
|
@@ -1136,6 +1150,10 @@
|
|
|
tempTip.show('盘点失败!'+'网络错误'+err);
|
|
|
})
|
|
|
},
|
|
|
+ 选中盘点起始位置(){
|
|
|
+ let _this=this;
|
|
|
+ console.log(_this.未盘列)
|
|
|
+ },
|
|
|
inventoryAccountMissionExport(checkAllSign){
|
|
|
let url = '{{url('inventory/stockInventory/inventoryAccountMission/export')}}';
|
|
|
let token='{{ csrf_token() }}';
|
|
|
@@ -1184,19 +1202,19 @@
|
|
|
}
|
|
|
|
|
|
});
|
|
|
- let loc = null;
|
|
|
- let code = null;
|
|
|
- let inventory_id = 0;
|
|
|
- let ownerCode=null;
|
|
|
- function setData(location,barcode,inventoryId,owner_code) {
|
|
|
- loc = location;
|
|
|
- code = barcode;
|
|
|
- inventory_id = inventoryId;
|
|
|
- ownerCode =owner_code;
|
|
|
- }
|
|
|
- function getData() {
|
|
|
- return [loc,code,inventory_id,ownerCode];
|
|
|
- }
|
|
|
+ // let loc = null;
|
|
|
+ // let code = null;
|
|
|
+ // let inventory_id = 0;
|
|
|
+ // let ownerCode=null;
|
|
|
+ // function setData(location,barcode,inventoryId,owner_code) {
|
|
|
+ // loc = location;
|
|
|
+ // code = barcode;
|
|
|
+ // inventory_id = inventoryId;
|
|
|
+ // ownerCode =owner_code;
|
|
|
+ // }
|
|
|
+ // function getData() {
|
|
|
+ // return [loc,code,inventory_id,ownerCode];
|
|
|
+ // }
|
|
|
</script>
|
|
|
@endsection
|
|
|
|