| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158 |
- @extends('layouts.app')
- @section('title')盘点-任务-{!! $inventoryAccount->id !!}@endsection
- @section('content')
- @component('inventory.stockInventory.menu')
- <li class="nav-item">
- <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('enterStockInventory',3)}">盘点中({!! $inventoryAccount->id !!})</a>
- </li>
- @endcomponent
- <div class="text-center h5 mt-2" id="loadingPage">
- 载入中……
- </div>
- <div id="list" class="d-none container-fluid" >
- <div class="mt-3">
- <span class="mt-3" >
- @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
- @can('库存管理-盘点')
- <button class="btn btn-sm" @click="listMode?listMode=false:listMode=true" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="listMode&&inventory.status!=='已完成'&&inventory.status!=='已审核'">切换为盘点</button>
- @endcan
- </span>
- <span class="dropdown">
- <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
- 导出Excel
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="inventoryAccountMissionExport(false)" href="javascript:">导出勾选内容</a>
- <a class="dropdown-item" @click="inventoryAccountMissionExport(true)" href="javascript:">导出所有</a>
- </div>
- </span>
- <span>
- <button class="btn btn-sm" @click="盲收()" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="!listMode&&!blindReceive">盲收</button>
- <button class="btn btn-sm" @click="正常盘点()" :class="blindReceive?'btn-dark':'btn-outline-dark'" v-if="blindReceive">正常盘点</button>
- </span>
- <span>
- <button class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget"
- @click="批量跳过或确认差异()" title="勾选指定盘点记录行,进行批量跳过或批量确认差异">
- 批量跳过
- </button>
- </span>
- <span>
- <button class="btn btn-sm btn-info" @click="新增盘点记录()" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="!listMode&&!addInventoryMission">新增盘点记录</button>
- <button class="btn btn-sm" @click="收起新增()" :class="addInventoryMission?'btn-dark':'btn-outline-dark'" v-if="addInventoryMission">收起新增</button>
- </span>
- <span class="form-group mb-5">
- <label class="text-muted">货主:</label><span class="font-weight-bold">@{{ inventory.owner.name }}</span>
- </span>
- <span class="form-group p-2 mb-5">
- <label >盘点单号:</label><span>@{{ inventory.id }}</span>
- </span>
- <span class="form-group p-2 mb-5">
- <label class="text-muted">时间范围:</label><span>@{{ inventory.start_at }} 至 @{{ inventory.end_at }}</span>
- </span>
- </div>
- <div class="mt-3">
- <span class="h5">
- <span class="form-group mb-5" v-if="inventory.status==='盘点中' || inventory.status==='待盘点'">
- <label class=" font-weight-bold">已盘点:</label><span>@{{ inventory.processed }}/总数:@{{ inventory.total }}</span>
- </span>
- <span class="form-group mb-5" v-if="inventory.status==='盘点中' || inventory.status==='待盘点'">
- <label class=" font-weight-bold">剩余数:</label><span>@{{ inventory.surplus }}</span>
- </span>
- <span class="form-group mb-5" v-if="inventory.status==='复盘中'&&未复盘有差异列">
- <label class=" font-weight-bold">有差异未复盘数:</label><span>@{{ 未复盘有差异列.length }}</span>
- </span>
- <span class="form-group mb-5" v-if="inventory.status==='复盘中'&&未盘列">
- <label class=" font-weight-bold">未盘点数:</label><span>@{{ 未盘列.length }}</span>
- </span>
- <span class="form-group mb-5" v-if="inventory.status==='复盘中'">
- <label class=" font-weight-bold">总数:</label><span>@{{ inventory.total }}</span>
- </span>
- </span>
- </div>
- <div class="mt-3" >
- <span v-if="!listMode" class="btn col-md-2 font-weight-bold" style="cursor: default;max-width: 160px" :class="inventory.status=='盘点中' ||inventory.status=='待盘点'?'bg-info':'btn-outline-info disabled'">
- @{{ inventory.type }}
- </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>
- @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>
- <div v-if="blindReceive">
- <audio src="{{asset('sound/warning_otherBarcode.mp3')}}" controls="controls" preload id="soundWarning" hidden>
- </audio>
- <audio src="{{asset('sound/ding.mp3')}}" controls="controls" preload id="soundDing" hidden>
- </audio>
- <div class="row mt-2 mb-2 rounded" style="border:solid 3px #999999;">
- <div class="col-12" id="scanColumn">
- <div class="card" :class="borderByMode">
- <div class="card-body">
- <div class="row">
- <div class="col-12">
- <div >
- <div class="text-danger font-weight-bold">
- 库位(必填项):
- </div>
- <input type="text" class="form-control mb-2" v-model="location" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter">
- </div>
- <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='regular'">常规:可输入效期,相同条码记录不会合并</p>
- <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='increasing'">逐一扫描:处理单一重复商品,每扫一次对应隔口总数量自动递增,扫到不同条码会提示</p>
- <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='multiIncreasing'">边扫边分:处理多种商品,自动将扫到的不同条码数量递增到各自隔口号</p>
- <ul class="nav nav-tabs mb-4 mt-n3">
- <li class="nav-item"><a href="#" class="nav-link" :class="inputMode=='regular'?'active':''"
- @click="inputMode='regular';changeToManualInputAmount();cleanInputs();inputting.fromIncreasing=false">常规</a></li>
- <li class="nav-item"><a href="#" class="nav-link" :class="inputMode=='increasing'?'active':''"
- @click="inputMode='increasing';changeToScanInputAmount();cleanInputs();inputting.fromIncreasing=true;">逐一扫描</a></li>
- <li class="nav-item"><a href="#" class="nav-link" :class="inputMode=='multiIncreasing'?'active':''"
- @click="inputMode='multiIncreasing';changeToScanInputAmount();cleanInputs();inputting.fromIncreasing=true">边扫边分</a></li>
- </ul>
- </div>
- <div class="col-6">
- <div v-if="inputMode=='regular'">
- <div class="btn btn-sm btn-outline-primary"
- v-if="!isManualInputtingBarcode" @click="changeToManualInputBarcode">手动输入</div>
- <div class="btn btn-sm btn-outline-danger"
- @click="changeToScanInputBarcode" v-if="isManualInputtingBarcode">扫描输入</div>
- </div>
- <input type="text" id="barcode" class="form-control" :disabled="status.barcodeDisable" placeholder="扫入条码" @focusin="focusOutDocument" @focusout="focusDocument" v-model="inputting.barcode" autocomplete="off">
- <div v-if="inputMode=='regular'">
- <div class="card-title">
- 生产日期:
- </div>
- <input type="date" class="form-control mb-2" v-model="inputting.produce_date" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter">
- </div>
- <div v-if="inputMode=='regular'">
- <div class="card-title">
- 失效日期:
- </div>
- <input type="date" class="form-control mb-2" v-model="inputting.valid_date" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter">
- </div>
- </div>
- <div class="col-6">
- <div class="card-title" id="amountLabel">
- 手动输入数量:
- </div>
- <div class="input-group mt-n2 mb-2">
- <input type="number" id="amount" class="form-control" placeholder="" :disabled="status.amountDisable"
- v-model="inputting.amount" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter"
- style='height: 40px;font-size: 1.6em;color:blue;font-weight: bolder;padding: 3px;text-align: center'>
- </div>
- {{-- <div class="card-title">--}}
- {{-- 格口号:--}}
- {{-- </div>--}}
- {{-- <input type="number" id="bin" class="form-control mt-n2 mb-2"--}}
- {{-- v-model="inputting.bin"--}}
- {{-- :disabled="status.binDisable" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter"--}}
- {{-- style='height: 80px;font-size: 5em;color:red;font-weight: bolder;padding: 3px;text-align: center'>--}}
- <div v-if="inputMode=='regular'">
- <div class="card-title">
- 批次号:
- </div>
- <input type="text" class="form-control mb-2" v-model="inputting.batch_number" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter">
- </div>
- </div>
- <div class="col-12" v-if="commitButtonVisible && inputMode=='regular'" >
- <button class="btn btn-success btn form-control" @click="commitGoods">确定</button>
- </div>
- </div>
- <p class="card-text text-muted mt-3 mb-n3 text-center">
- 已完成:
- </p>
- <hr>
- <table class="table table-sm table-striped" v-if="goodses.length>0">
- <tr>
- {{-- <th>隔口号</th>--}}
- <th>数量</th>
- <th>条码</th>
- <th>生产日期</th>
- <th>失效日期</th>
- <th>批次号</th>
- <th>操作</th>
- </tr>
- <tr v-for="goods in goodses">
- {{-- <td>@{{ goods.bin }}</td>--}}
- <td>@{{ goods.amount }}</td>
- <td>@{{ goods.barcode }}</td>
- <td>@{{ goods.produce_date }}</td>
- <td>@{{ goods.valid_date }}</td>
- <td>@{{ goods.batch_number }}</td>
- <td><button class="btn btn-outline-danger btn-sm" @click="removeGoods($event,goods.barcode)">删</button></td>
- </tr>
- </table>
- <hr>
- <span class="btn btn-outline-dark btn form-control" style="cursor: pointer" @click="submitStockInventory">结束并生成盘点</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <form id="form">
- <div v-if="!blindReceive">
- <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="locationInput" @keypress="locationPress($event)"
- @change="locationChange($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" v-if="addInventoryMission">
- <label for="barcode" class="text-secondary font-weight-bold">请输产品条码</label>
- <input id="barcodeInput" name="barcode" @keypress="barcodePress($event)"
- @change="barcodeChange($event)"
- type="text" value="@if(old('barcode')){{old('barcode')}}@endif" class="form-control input" autocomplete="off">
- </span>
- <span class="form-group ml-4" v-if="dataExtraStatus.addingNew&&addInventoryMission" id="countBlock">
- <label for="count" class="text-secondary font-weight-bold">请输盘点数</label>
- <input type="number" id="amountInput" @keypress="amountPress($event)"
- name="count" class="form-control input" value="@if(old('count')){{old('count')}}@endif" autocomplete="off">
- </span>
- <span type="button" class="btn btn-sm btn-outline-danger col-md-2 form-group ml-4" v-if="location" style="max-width: 160px" @click="stockInventoryByLocation()">盘点该库位下所有记录</span>
- </div>
- </div>
- <!--相同库位和条码 pc端-->
- <div class="row d-none d-xl-block">
- <div class="col-12 col-md-12 col-sm-12 showBlueTable d-none">
- <table class="table table-sm table-bordered table-info mt-2" :class="!listMode?'':'d-none'" id="blueTablePc">
- <tr>
- <td class="font-weight-bold">输入盘点数</td>
- <td>操作</td>
- <td>库位</td>
- <td>产品名</td>
- <td>产品条码</td>
- <td>产品编码</td>
- <td>生产日期</td>
- <td>失效时期</td>
- <td>批号</td>
- <th>属性仓</th>
- <th>质量状态</th>
- <td>盘点数量</td>
- <td>复盘数量</td>
- <td>复盘差异</td>
- </tr>
- <tr class="selectingRow" id="blueTrPc">
- <td>
- <input type="number" onkeypress="listVue.selectingRow(event)" name="amount" class="form-control-sm blueAmountPc" autocomplete="off" oninput="inputs.amount=event.target.value">
- </td>
- <td>
- <span class="btn btn-sm btn-outline-primary stockButtonPc" onclick="listVue.盘点选中任务(event)">选定盘点</span>
- </td>
- <td class="location"></td>
- <td class="commodity_name"></td>
- <td class="commodity_barcode"></td>
- <td class="commodity_sku"></td>
- <td><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></td>
- <td><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></td>
- <td><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></td>
- <td class="erp_type_position"></td>
- <td class="quality"></td>
- <td class="verified_amount font-weight-bold text-success"></td>
- <td class="re_checked_amount"></td>
- <td class="difference_amount"></td>
- </tr>
- </table>
- </div>
- </div>
- <!--相同库位和条码 移动端-->
- <div class="showBlueTable d-none">
- <table class="table table-striped table-sm table-bordered table-hover p-0 d-xl-none mt-2" style="background: rgb(179, 214, 245);" {{--v-if="!listMode"--}} :class="!listMode?'':'d-none'" id="blueTable">
- <tr class="selectingRow移动端" id="blueTr">
- <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="number" onkeypress="listVue.selectingRow(event)" name="amount" class="form-control-sm blueAmount" autocomplete="off" oninput="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 stockButton" onclick="listVue.盘点选中任务(event)">选定盘点</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 class="location"></span></span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品名称:</span><span class="commodity_name"></span></span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品条码:</span><span class="commodity_barcode"></span>
- </span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">产品编码:</span><span class="commodity_sku"></span></span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">生产日期:</span><input type="date" class="form-control-sm produced_at" name="produced_at" onchange="producedAtChange(event)"></span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">失效时期:</span><input type="date" class="form-control-sm valid_at" name="valid_at" onchange="validAtChange(event)"></span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">批号:</span><input type="text" class="form-control-sm batch_number" name="batch_number" onchange="batchNumberChange(event)"></span>
- <span class="mr-3 text-nowrap"><span>属性仓:</span><span class="erp_type_position"></span></span>
- <span class="mr-3 text-nowrap"><span>质量状态:</span><span class="quality"></span></span>
- <div>
- <span class="mr-3 text-nowrap"><span style="color:#783000">盘点数量:</span><span class="verified_amount font-weight-bold text-success"></span></span>
- <span class="mr-3 text-nowrap"><span style="color:#783000">复盘数量:</span><span style="color:#af7651" class="re_checked_amount"></span></span>
- <span class="mr-3 text-nowrap"><span style="color:#783000">盘点差异:</span><span class="difference_amount"></span></span>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </form>
- <div class="card-body pt-1">
- <label for="all" class="d-none" id="cloneCheckAll">
- <input id="all" type="checkbox" @click="checkAll($event)">全选
- </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" ref="boxPc">
- <tr class="p-0" id="header"></tr>
- <tr v-for="(inventoryMission, i) in 显示记录列" :key="i"
- :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':'','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==='确认差异'?'td-warm font-weight-bold':'',
- inventoryMission.mark==='无差异'?'text-muted':'',
- inventoryMission.mark==='未盘'?'td-yellow':'',
- inventoryMission.mark==='跳过'?'text-muted':'',
- ]">
- <td>
- <input type="checkbox" :value="inventoryMission" v-model="checkData">
- <span :id="'lockLine'+(i+1)"></span>
- </td>
- <td>@{{ i+1 }}</td>
- <td>@{{ inventoryMission.location }}</td>
- <td v-if="inventoryMission.commodity"><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.name }}</span>
- </td>
- <td>
- <span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <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>
- </td>
- <td v-if="inventoryMission.commodity"><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.commodity.sku }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.produced_at }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_at }}</span>
- </td>
- <td class="text-muted"><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.batch_number }}</span>
- </td>
- <td v-if="inventoryMission.stockInventoryPersons" class="text-muted"
- :rowspan="inventoryMission.is_multi_row?2:''">
- <span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <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>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.erp_type_position }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <span v-if="listMode">@{{ inventoryMission.quality }}</span>
- <select v-else class="form-control-sm" name="quality" id="quality"
- v-model="inventoryMission.quality"
- @change="updateQuality(inventoryMission.id,inventoryMission.location,inventoryMission.commodity.sku,inventoryMission.quality,inventory.owner.code)">
- <option value="正品">正品</option>
- <option value="残次">残次</option>
- </select>
- </span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.stored_amount }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.valid_amount }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.verified_amount }}
- <span v-if="inventoryMission.checked==='跳过'" class="badge badge-pill badge-secondary">跳过</span></span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.re_checked_amount }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.difference_amount }}</span>
- </td>
- <td><span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">@{{ inventoryMission.occupied_amount }}</span>
- </td>
- @can('库存管理-盘点')
- <td>
- {{-- <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="inventoryMission.mark==='已复盘有差异'||inventoryMission.mark==='未复盘有差异'"
- @click="确认盘点差异(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">跳过</span>
- <span class="btn btn-sm btn-outline-secondary"
- v-if="inventory.type=='动盘'&& inventoryMission.mark=='未盘' &&!listMode"
- @click="选中盘点起始位置(inventoryMission.id,inventoryMission.location)">以此为起点</span>
- </td>
- @endcan
- </tr>
- </table>
- </div>
- <!--盘点记录移动端-->
- <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);" ref="box">
- <tbody>
- <tr {{--v-for="(inventoryMission,i) in 显示记录列"--}} v-for="(inventoryMission, i) in 显示记录列" :key="i"
- :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':'','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==='确认差异'?'td-warm font-weight-bold':'',
- inventoryMission.mark==='无差异'?'text-muted':'',
- inventoryMission.mark==='未盘'?'td-yellow':'',
- inventoryMission.mark==='跳过'?'text-muted':'',
- ]">
- <td style="filter:grayscale(30%); ">
- <span :id="'lockLinePhone'+(i+1)"></span>
- <div class="mt-3">
- <div style="transform:scale(0.9)" class="pl-0">
- <span type="hidden">@{{ i+1 }}</span>
- <span class="mr-3 text-nowrap"><span class="font-weight-bold">库位:</span><span
- style="color:#af7651">
- @{{ inventoryMission.location }}</span></span>
- <span class="mr-3 text-nowrap"
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode"><span
- class="font-weight-bold">产品名称:</span><span style="color:#af7651"
- v-if="inventoryMission.commodity">
- @{{ inventoryMission.commodity.name }}</span></span>
- <span class="mr-3 text-nowrap"
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <span class="font-weight-bold">质量状态:</span>
- <span v-if="listMode">@{{ inventoryMission.quality }}</span>
- <select v-else class="form-control-sm" name="quality" id="quality"
- v-model="inventoryMission.quality"
- @change="updateQuality(inventoryMission.id,inventoryMission.location,inventoryMission.commodity.sku,inventoryMission.quality,inventory.owner.code)">
- <option value="正品">正品</option>
- <option value="残次">残次</option>
- </select>
- </span>
- <span class="mr-3 text-nowrap"
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <span class="font-weight-bold">产品条码:</span>
- <span
- v-if="inventoryMission.checked==='是'||inventoryMission.checked==='确认差异'||inventoryMission.checked==='跳过'||inventory.status==='复盘中'||listMode">
- <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>
- <div v-if="inventory.status==='复盘中'">
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点数量:</span><span
- style="color:#af7651">
- @{{ inventoryMission.verified_amount }}</span></span>
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">复盘数量:</span><span
- style="color:#af7651">
- @{{ inventoryMission.re_checked_amount }}</span></span>
- <span class="mr-3 text-nowrap"><span style="color:#783000" class="font-weight-bold">盘点差异:</span><span>
- @{{ inventoryMission.difference_amount }}</span></span>
- </div>
- @can('库存管理-盘点')
- <div>
- <span class="mr-3 text-nowrap" v-if="!listMode"><span
- class="font-weight-bold">操作:</span>
- {{-- <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="inventoryMission.mark==='已复盘有差异'||inventoryMission.mark==='未复盘有差异'"
- @click="确认盘点差异(inventoryMission.id,inventory.id,inventoryMission.commodity.name)">跳过</span>
- <span class="btn btn-sm btn-outline-secondary"
- v-if="inventory.type=='动盘'&& inventoryMission.mark=='未盘' &&!listMode"
- @click="选中盘点起始位置(inventoryMission.id,inventoryMission.location)">以此为起点</span>
- </span>
- </div>
- @endcan
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <!--上次盘点记录-->
- <div class="modal" id="lastStockInventoryRecord" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-xl">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title font-weight-bold">该盘点记录已存在,是否覆盖之前记录?</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <table class="table table-sm table-striped table-bordered">
- <tr class="text-muted text-center">
- <th>库位</th>
- <th>产品条码</th>
- <th>盘点人</th>
- <th>盘点数量</th>
- <th>产品名</th>
- <th>产品编号</th>
- <th>属性仓</th>
- <th>质量状态</th>
- <th>库存数量</th>
- <th>盘点差异</th>
- <th>时间</th>
- </tr>
- <tr class="text-center ">
- <td>@{{ lastStockInventoryRecord.location }}</td>
- <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity.barcode }}</span></td>
- <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].mark }}</span></td>
- <td>@{{ lastStockInventoryRecord.verified_amount }}</td>
- <td><span v-if="lastStockInventoryRecord.commodity">@{{ lastStockInventoryRecord.commodity_name }}</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.difference_amount }}</td>
- <td><span v-if="stockInventoryPersons.length>0">@{{ stockInventoryPersons[stockInventoryPersons.length-1].created_at }}</span>
- </td>
- </tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true" class="btn btn-outline-secondary" @click="不覆盖()">否</span>
- </button>
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="覆盖()">是</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
- <script>
- let hideHeaderTitle = function () {
- let $listOnPad = $('#listOnPad');
- let $headerRoll = $('#headerRoll');
- if ($listOnPad.css('display') !== 'none') {
- $headerRoll.attr('hidden', true)
- } else {
- $headerRoll.attr('hidden', false)
- $headerRoll.find('tr').css('width', $(document).width());
- }
- };
- window.onresize = hideHeaderTitle;
- window.onscroll = hideHeaderTitle;
- let $showBlueTable=null;
- let $barcodeInput=null;
- let $locationInput=null;
- let $amountInput=null;
- let $prototype_ = null;
- let $blueTable = null;
- let $prototypePc_ = null;
- let $blueTablePc = null;
- let inputs={location:'',barcode:'',amount:'',produced_at:'',valid_at:'',batch_number:''};//双向绑定在本页太慢,所以用外部变量
- let $appointInventoryList=[];
- let $jqueryTable=[];
- function producedAtChange(e){
- inputs.produced_at = e.target.value;
- }
- function validAtChange(e){
- inputs.valid_at = e.target.value;
- }
- function batchNumberChange(e){
- inputs.batch_number = e.target.value;
- }
- let listVue = new Vue({
- el: "#list",
- data: {
- selectingId:'',
- dataExtraStatus:{addingNew:false, displayingLastCounting:false,showBlueTable:false},
- inventory:{!! $inventoryAccount!!},
- inventoryMissions : [
- @foreach($inventoryAccountMissions as $inventoryMission)
- {
- id: '{{$inventoryMission->id}}',
- location: '{{$inventoryMission->location}}',
- created_at: '{{$inventoryMission->created_at}}',
- commodity_name: '{{$inventoryMission->commodity ? $inventoryMission->commodity->name : ''}}',
- commodity_sku: '{{$inventoryMission->commodity ? $inventoryMission->commodity->sku : ''}}',
- commodity_barcode: '{{$inventoryMission->commodity ? $inventoryMission->commodity->barcode : ''}}',
- commodity:{!! $inventoryMission->commodity !!},
- stockInventoryPersons:{!! $inventoryMission->stockInventoryPersons !!},
- commodity_barcodes: [
- @foreach($inventoryMission->commodity ? $inventoryMission->commodity->barcodes ?? [] : [] as $barcode)
- {code: '{{$barcode->code}}'},
- @endforeach
- ],
- stock_persons: [
- @foreach($inventoryMission->stockInventoryPersons ? $inventoryMission->stockInventoryPersons ?? [] : [] as $person)
- {name: '{{$person->mark}}'},
- @endforeach
- ],
- produced_at: '{{$inventoryMission->produced_at}}',
- valid_at: '{{$inventoryMission->valid_at}}',
- verified_amount: '{{$inventoryMission->verified_amount}}',
- stored_amount: '{{$inventoryMission->stored_amount}}',
- valid_amount: '{{$inventoryMission->valid_amount}}',
- stored_at: '{{$inventoryMission->stored_at}}',
- batch_number: '{{$inventoryMission->batch_number}}',
- erp_type_position: '{{$inventoryMission->erp_type_position}}',
- quality: '{{$inventoryMission->quality}}',
- difference_amount: '{{$inventoryMission->difference_amount}}',
- occupied_amount: '{{$inventoryMission->occupied_amount}}',
- checked: '{{$inventoryMission->checked}}',
- returned: '{{$inventoryMission->returned}}',
- re_checked_amount: '{{$inventoryMission->re_checked_amount}}'
- },
- @endforeach
- ],
- 库位盘点记录:[],
- 条码索引_记录: {},
- 库位索引_记录: {},
- checkData: [],
- selectedStyle:'',
- 指定盘点记录列:[],
- lastStockInventoryRecord:{},
- stockInventoryPersons:[],
- inventoryAccountMissions:[],
- listMode:false,
- blindReceive:false,
- addInventoryMission:false,
- 分割位置id:null,
- 显示记录列:[],
- focusing:'document',
- commitButtonVisible:false,
- isManualInputtingBarcode:false,
- isManualInputtingAmount:true,
- lastScannedBarcode:'',
- inputMode:'regular',//regular,increasing,multiIncreasing
- location:'',
- inputting:{
- barcode:'',amount:'',bin:'',produce_date:'',valid_date:'',batch_number:'',fromIncreasing:false
- },
- status:{
- scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
- },
- goodses:[],//{barcode,amount,bin,produce_date,valid_date,batch_number}
- },
- beforeMount: function () {
- this.重排序并标记全列表类型();
- this.加载下方数据并置空上方数据()//初始化先调用一次
- },
- watch: {
- checkData: {
- handler() {
- if (this.checkData.length === this.inventoryMissions.length) {
- document.querySelector('#all').checked = true;
- document.querySelector('#all_temp').checked = true;
- } else {
- document.querySelector('#all').checked = false;
- document.querySelector('#all_temp').checked = false;
- }
- },
- deep: true
- }
- },
- destroyed() {
- window.removeEventListener('scroll', this.lazy)
- },
- updated: function () {
- $barcodeInput=$('#barcodeInput');
- $locationInput=$('#locationInput');
- $amountInput=$('#amountInput');
- },
- mounted: function () {
- let _this = this;
- _this.lazy();
- window.addEventListener('scroll', this.lazy);
- (function 显示渲染后页面(){
- $('#loadingPage').remove();
- $('#list').removeClass('d-none');
- })()
- $(".tooltipTarget").tooltip({'trigger': 'hover'});
- $barcodeInput=$('#barcodeInput');
- $locationInput=$('#locationInput');
- $amountInput=$('#amountInput');
- $showBlueTable=$('.showBlueTable');
- $prototype_ = $('#blueTr');
- $blueTable = $('#blueTable');
- $prototypePc_ = $('#blueTrPc');
- $blueTablePc = $('#blueTablePc');
- this.放置焦点光标至正确位置();
- (function 初始化列表模式() {
- let listMode = getGetVal('listMode')
- if (listMode === 'true') {
- _this.listMode = true;
- return;
- }
- _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: 'commodity_name', value: '产品名'},
- {name: 'commodity_barcode', 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: 'erp_type_position', value: 'ERP属性仓', neglect: true},
- {name: 'quality', value: '质量状态', neglect: true},
- {name: 'stored_amount', value: '库存数量', neglect: true},
- {name: 'valid_amount', value: '可用数量', neglect: true},
- {name: 'verified_amount', value: '盘点数量', neglect: true},
- {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 _this=this;
- let header = new Header({
- el: "#header",
- column: column,
- data: _this.inventoryMissions,
- restorationColumn: 'id',
- fixedTop:($('#form').height())+2,
- vue:listVue,
- });
- header.init();
- },0);
- _this.建立记录索引();
- },
- methods:{
- lazy(){
- let _this=this;
- let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;//滚动条距离顶部的高度
- let scrollHeight = $(document).height();//当前页面的总高度
- let clientHeight=window.innerHeight;//当前可视的页面高度
- let count = parseFloat(clientHeight) + parseFloat(scrollTop);//浏览器底部位置
- if (scrollHeight - count < 40) {
- if (_this.显示记录列.length < _this.inventoryMissions.length) {
- _this.加载下方数据并置空上方数据()
- }
- }
- },
- 加载下方数据并置空上方数据(){
- let _this=this;
- const count = _this.显示记录列.length;
- if (count > 30) {
- _this.inventoryMissions.map((inventoryMission, index) => {
- if (_this.显示记录列.length < 5 + count) {
- if (_this.显示记录列.length < _this.inventoryMissions.length) {
- _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length]);
- }
- }
- })
- } else {
- _this.inventoryMissions.map((inventoryMission, index) => {
- if (_this.显示记录列.length < 25 + count) {
- if (_this.显示记录列.length < _this.inventoryMissions.length) {
- _this.显示记录列.push(_this.inventoryMissions[_this.显示记录列.length])
- }
- }
- })
- }
- },
- cloneBlueTrDom($appointInventoryList) {
- for(let i =0;i<$appointInventoryList.length;i++){
- let newDom= $prototype_.clone();
- newDom.find('.location').text($appointInventoryList[i].location);
- newDom.find('.commodity_name').text($appointInventoryList[i].commodity_name);
- newDom.find('.commodity_barcode').text($appointInventoryList[i].commodity_barcode);
- newDom.find('.commodity_sku').text($appointInventoryList[i].commodity_sku);
- newDom.find('.produced_at').val($appointInventoryList[i].produced_at.substr(0,10));
- newDom.find('.valid_at').val($appointInventoryList[i].valid_at.substr(0,10));
- newDom.find('.batch_number').val($appointInventoryList[i].batch_number);
- newDom.find('.erp_type_position').text($appointInventoryList[i].erp_type_position);
- newDom.find('.quality').text($appointInventoryList[i].quality);
- newDom.find('.verified_amount').text($appointInventoryList[i].verified_amount);
- newDom.find('.re_checked_amount').text($appointInventoryList[i].re_checked_amount);
- newDom.find('.difference_amount').text($appointInventoryList[i].difference_amount);
- newDom.show();
- newDom.find('.blueAmount').attr('data_id', $appointInventoryList[i].id);
- newDom.find('.blueAmount').attr('stored_amount', $appointInventoryList[i].stored_amount);
- newDom.find('.stockButton').attr('data_id', $appointInventoryList[i].id);
- newDom.addClass('blueTr'+i);
- newDom.appendTo($blueTable);
- $jqueryTable.push(newDom);
- }
- $prototype_.hide();
- },
- cloneBlueTrPcDom($appointInventoryList) {
- for(let i =0;i<$appointInventoryList.length;i++){
- let newDom= $prototypePc_.clone();
- newDom.find('.location').text($appointInventoryList[i].location);
- newDom.find('.commodity_name').text($appointInventoryList[i].commodity_name);
- newDom.find('.commodity_barcode').text($appointInventoryList[i].commodity_barcode);
- newDom.find('.commodity_sku').text($appointInventoryList[i].commodity_sku);
- newDom.find('.produced_at').val($appointInventoryList[i].produced_at.substr(0,10));
- newDom.find('.valid_at').val($appointInventoryList[i].valid_at.substr(0,10));
- newDom.find('.batch_number').val($appointInventoryList[i].batch_number);
- newDom.find('.erp_type_position').text($appointInventoryList[i].erp_type_position);
- newDom.find('.quality').text($appointInventoryList[i].quality);
- newDom.find('.verified_amount').text($appointInventoryList[i].verified_amount);
- newDom.find('.re_checked_amount').text($appointInventoryList[i].re_checked_amount);
- newDom.find('.difference_amount').text($appointInventoryList[i].difference_amount);
- newDom.show();
- newDom.find('.blueAmountPc').attr('data_id', $appointInventoryList[i].id);
- newDom.find('.blueAmountPc').attr('stored_amount', $appointInventoryList[i].stored_amount);
- newDom.find('.stockButtonPc').attr('data_id', $appointInventoryList[i].id);
- newDom.addClass('blueTrPc'+i);
- newDom.appendTo($blueTablePc);
- $jqueryTable.push(newDom);
- }
- $prototypePc_.hide();
- },
- inputs() {
- return inputs;
- },
- checkAll(e) {
- if (e.target.checked) {
- this.inventoryMissions.forEach((el,i)=>{
- if (this.checkData.indexOf(el) == '-1'){
- this.checkData.push(el);
- }
- });
- } else {
- this.checkData = [];
- }
- },
- barcodePress(e){
- if(e.key==='Enter') {
- this.barcodeChange(e);
- }
- },
- barcodeChange(e){
- this.inputs().barcode = e.target.value;
- this.提交部分输入();
- },
- amountPress(e){
- if(e.key==='Enter'){
- this.提交新增(e);
- }
- },
- locationPress(e){
- if(e.key==='Enter'){
- this.locationChange(e);
- }
- },
- locationChange(e){
- this.inputs().location = e.target.value;
- this.提交部分输入();
- if(!this.addInventoryMission){
- this.location=this.inputs().location ;
- }
- },
- 提交部分输入:_.throttle(function(){
- let _this = this;
- this.放置焦点光标至正确位置();
- _this.显示盘点计数input_按情况();
- (new Promise(function (resolve, reject) {
- resolve()
- })).then(function () {
- if(_this.addInventoryMission){
- _this.提交库位和条码();
- }else{
- _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.提交盘点();
- }
- },
- 提交库位和条码:_.throttle(async function(){
- let _this=this;
- this.清空指定盘点记录列();
- if (!_this.inputs().barcode) return;
- if(!(await this.is条码存在于WMS(_this.inputs().barcode))){
- tempTip.setDuration(2000);
- tempTip.show('输入的商品条码没有对应的商品!');
- }
- this.筛选出记录(_this.inputs().location,_this.inputs().barcode);
- },100,{ 'trailing': false }),
- 提交库位:_.throttle(async function(){
- let _this=this;
- this.清空指定盘点记录列();
- this.筛选库位出记录(_this.inputs().location);
- },100,{ 'trailing': false }),
- 建立记录索引(){
- let _this=this;
- _this.inventoryMissions.forEach(function (inventoryMission) {
- inventoryMission.commodity_barcodes.forEach(function (barcode) {
- if(!Array.isArray(_this.条码索引_记录[barcode.code])) _this.条码索引_记录[barcode.code]=[];
- _this.条码索引_记录[barcode.code].push(inventoryMission);
- })
- if(!Array.isArray(_this.库位索引_记录[inventoryMission.location])) _this.库位索引_记录[inventoryMission.location]=[];
- _this.库位索引_记录[inventoryMission.location].push(inventoryMission);
- });
- },
- 清空指定盘点记录列(){
- let _this=this;
- $jqueryTable.forEach(function (newDom,i) {
- newDom.remove();
- })
- // $appointInventoryList.forEach(function (inventoryMission,i) {
- // $appointInventoryList.splice(i,1);
- // });
- $appointInventoryList=[];
- $showBlueTable.attr('class','d-none');
- _this.selectingId='';
- _this.location='';
- _this.库位盘点记录=[];
- },
- 显示盘点计数input_按情况(){
- let _this=this;
- setTimeout(function(){
- if($appointInventoryList.length>0){
- _this.dataExtraStatus.addingNew=false;
- }else{
- _this.dataExtraStatus.addingNew=true;
- }
- },10)
- },
- async 筛选出记录(库位, 条码){
- 条码=条码.trim();
- 库位=库位.trim();
- let _this=this;
- if(!库位)return false;
- if(!条码)return false;;
- if (!_this.库位索引_记录[库位]
- ||(!_this.条码索引_记录[条码]
- &&!(await _this.is条码存在于WMS(条码)))
- ) return;
- if(Array.isArray(_this.条码索引_记录[条码])){
- _this.条码索引_记录[条码].forEach(function(inventoryMission){
- if (inventoryMission.location===库位){
- $appointInventoryList.push(inventoryMission);
- $appointInventoryList=_this.unique($appointInventoryList);
- }
- });
- $showBlueTable.removeClass('d-none');
- _this.cloneBlueTrDom($appointInventoryList);
- _this.cloneBlueTrPcDom($appointInventoryList);
- }
- },
- async 筛选库位出记录(库位){
- 库位=库位.trim();
- let _this=this;
- if(!库位)return false;
- if (!_this.库位索引_记录[库位]) return;
- if(Array.isArray(_this.库位索引_记录[库位])){
- _this.库位索引_记录[库位].forEach(function(inventoryMission){
- if (inventoryMission.location===库位){
- $appointInventoryList.push(inventoryMission);
- $appointInventoryList=_this.unique($appointInventoryList);
- }
- });
- $showBlueTable.removeClass('d-none');
- _this.cloneBlueTrDom($appointInventoryList);
- _this.cloneBlueTrPcDom($appointInventoryList);
- }
- },
- unique(arr){
- return Array.from(new Set(arr));
- },
- 放置焦点光标至正确位置:_.throttle(function(){
- let _this=this;
- _this.显示盘点计数input_按情况();
- if (!$locationInput.val().trim()){
- $locationInput.focus();
- return;
- }
- if (_this.addInventoryMission){
- if (!$barcodeInput.val().trim()){
- $barcodeInput.focus();
- return;
- }
- }
- setTimeout(function(){
- if(_this.dataExtraStatus.addingNew){
- let $count = $('#amountInput');
- if (!$count.val().trim()){
- $count.focus();
- return;
- }
- }
- if ($appointInventoryList.length >0) {
- $blueTablePc.find('.blueTrPc0 input').first().focus();
- $blueTable.find('.blueTr0 input').first().focus();
- }
- },10)
- },100,{ 'trailing': false }),
- async is条码存在于WMS(条码){
- 条码=条码.trim();
- let _this=this;
- if (!条码) return false;
- if (_this.条码索引_记录[条码]) return true;
- if (_this.条码索引_记录[条码] === false) return false;
- let url = '{{url('inventory/stockInventory/searchCommodityByBarcode')}}';
- let is成功 = false;
- await axios.post(url, {
- barcode: 条码,
- owner_code: _this.inventory.owner.code
- }).then(function (response) {
- if (response.data.success) {
- is成功 = true;
- _this.条码索引_记录[条码] = {barcodeExsitingAtWMS: true};
- } else {
- _this.条码索引_记录[条码] = false;
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('网络错误' + err);
- });
- return is成功;
- },
- is条码存在于当前记录(条码) {
- 条码 = 条码.trim();
- let _this = this;
- if (!条码) return false;
- return !!_this.条码索引_记录[条码];
- },
- is库位存在于当前记录(库位) {
- 库位 = 库位.trim();
- let _this = this;
- if (!库位) return false;
- return !!_this.库位索引_记录[库位];
- },
- 提交新增并盘点:async function(){
- 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 = await _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 false};
- let 新增字段标记='';
- if(!库位存在于当前记录&&!条码存在于当前记录)新增字段标记='库位和商品新增';
- if(!库位存在于当前记录)新增字段标记='库位新增';
- if(!条码存在于当前记录)新增字段标记='商品新增';
- _this.增加系统之外的盘点记录(_this.inputs().location,_this.inputs().barcode,_this.inputs().amount,inventoryId,_this.inventory.owner.code,新增字段标记);
- return true;
- },
- 提交盘点:_.throttle(function(){
- let _this=this;
- let 条码=_this.inputs().barcode.trim();
- let 库位=_this.inputs().location.trim();
- let 盘点数=_this.inputs().amount.trim();
- let 选定盘点记录id=_this.selectingId;
- $appointInventoryList.forEach(function (inventoryMission) {
- if (inventoryMission.location === 库位) {
- if (inventoryMission.stockInventoryPersons.length > 0 && inventoryMission.id === _this.selectingId) {
- _this.lastStockInventoryRecord = inventoryMission;
- _this.stockInventoryPersons = inventoryMission.stockInventoryPersons;
- if (_this.inventory.status !== '复盘中'){
- $("#lastStockInventoryRecord").modal('show');
- return;
- }
- }
- _this.盘点(选定盘点记录id,库位,条码,_this.inventory.id,盘点数);
- _this.清空指定盘点记录列();
- }
- });
- },100,{ 'trailing': false }),
- //结束初盘任务
- stockInventoryEnd(id) {
- let _this = this;
- let url = '{{url('inventory/stockInventoryEnd')}}';
- if (!confirm('确定要结束初盘任务,进入复盘吗?')) {return;}
- axios.post(url, {id: id}).then(function (response) {
- if (!response.data.success) {
- tempTip.setDuration(2000);
- tempTip.show('结束初盘失败!' + ' ' + response.data.data);
- } else {
- _this.inventory.status = response.data.data;
- tempTip.setDuration(2000);
- tempTip.showSuccess('结束初盘,进入复盘!');
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('结束初盘失败!' + '网络错误' + err);
- })
- },
- updateQuality(id, location, sku, quality, ownerCode) {
- let url = '{{url('inventory/修改质量状态')}}';
- axios.post(url, {
- id: id,
- location: location,
- sku: sku,
- quality: quality,
- ownerCode: ownerCode
- }).then(function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('修改质量状态失败!' + ' ' + response.data.data);
- } else {
- tempTip.setDuration(2000);
- tempTip.showSuccess('修改质量状态成功!');
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('修改质量状态失败!' + '网络错误' + err);
- })
- },
- 重排序并标记全列表类型() {
- let _this = this;
- _this.已复盘有差异列 = [];
- _this.未复盘有差异列 = [];
- _this.已复盘无差异列 = [];
- _this.确认差异列=[];
- _this.无差异列 = [];
- _this.未盘列 = [];
- _this.跳过列 = [];
- _this.未盘列总 = [];
- _this.未盘列1 = [];
- _this.未盘列2 = [];
- _this.inventoryMissions.forEach(function (mission, i) {
- switch (mission.checked) {
- case '已复核':
- if (parseInt(mission.difference_amount)) {
- _this.已复盘有差异列.push(mission);
- mission.mark = '已复盘有差异';
- return;
- }
- _this.已复盘无差异列.push(mission);
- mission.mark = '已复盘无差异';
- return;
- case '是':
- if (parseInt(mission.difference_amount)) {
- _this.未复盘有差异列.push(mission);
- mission.mark = '未复盘有差异';
- return;
- }
- _this.无差异列.push(mission);
- mission.mark = '无差异';
- return;
- case '确认差异':
- _this.确认差异列.push(mission);
- mission.mark = '确认差异';
- return;
- case '否':
- _this.未盘列.push(mission);
- mission.mark = '未盘';
- return;
- case '跳过':
- _this.跳过列.push(mission);
- mission.mark = '跳过';
- return;
- }
- });
- _this.已复盘有差异列 = _this.按库位排序_且合并SKU一起(_this.已复盘有差异列);
- _this.未复盘有差异列 = _this.按库位排序_且合并SKU一起(_this.未复盘有差异列);
- _this.已复盘无差异列 = _this.按库位排序_且合并SKU一起(_this.已复盘无差异列);
- _this.无差异列 = _this.按库位排序_且合并SKU一起(_this.无差异列);
- _this.未盘列 = _this.按库位排序_且合并SKU一起(_this.未盘列);
- 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.跳过列 = _this.按库位排序_且合并SKU一起(_this.跳过列);
- _this.inventoryMissions = [];
- _this.重推入(_this.inventoryMissions, _this.已复盘有差异列);
- _this.重推入(_this.inventoryMissions, _this.未复盘有差异列);
- _this.重推入(_this.inventoryMissions, _this.未盘分隔列2);
- _this.重推入(_this.inventoryMissions, _this.未盘分隔列1);
- _this.重推入(_this.inventoryMissions, _this.确认差异列);
- _this.重推入(_this.inventoryMissions, _this.已复盘无差异列);
- _this.重推入(_this.inventoryMissions, _this.无差异列);
- _this.重推入(_this.inventoryMissions, _this.跳过列);
- },
- 更新分割位置(上次分割列, 旧分割位置id) {
- if (!上次分割列) return 旧分割位置id;
- let is不更新 = false;
- 上次分割列.some(function (行) {
- if (行.id === 旧分割位置id && 行.mark === '未盘') {
- is不更新 = true;
- return true;
- }
- });
- if (is不更新) return 旧分割位置id;
- let 新分割位置id = 旧分割位置id;
- 上次分割列.some(function (行) {
- if (行.mark !== '未盘') return false;
- 新分割位置id = 行.id;
- return true;
- });
- return 新分割位置id;
- },
- 重推入(目标数组, 推入数组) {
- 推入数组.forEach(function (元素) {
- 目标数组.push(元素);
- })
- },
- 按库位排序_且合并SKU一起(inventoryMissions) {
- let 结果列 = [];
- let 已出现字典列 = [];
- inventoryMissions.sort(function (a, b) {
- if (a.location > b.location) return 1;
- if (a.location < b.location) return -1;
- return 0;
- });
- function 迭代查重转移(目标列, 进度下标) {
- if (!进度下标) {
- 进度下标 = 0;
- }
- for (; 进度下标 < 目标列.length; 进度下标++) {
- let 目标 = 目标列[进度下标];
- if (已出现字典列[目标.commodity.barcode] === true) {
- 目标列.splice(进度下标, 1)
- let 最后一次重复下标 = -1;//为了给相同条码依次排序设定
- 结果列.some(function (结果, i) {
- if (结果.commodity.barcode === 目标.commodity.barcode) {
- 最后一次重复下标 = i;
- if (最后一次重复下标 === 结果列.length - 1) {
- 结果列.splice(最后一次重复下标 + 1, 0, 目标);
- return true;
- }
- } else if (最后一次重复下标 > -1) {
- 结果列.splice(最后一次重复下标 + 1, 0, 目标);
- return true;
- }
- return false;
- })
- 迭代查重转移(目标列, 进度下标);
- return;
- }
- 已出现字典列[目标.commodity.barcode] = true;
- 结果列.push(目标);
- }
- }
- 迭代查重转移(inventoryMissions)
- return 结果列;
- },
- 选中盘点起始位置(id,location) {
- this.分割位置id = id;
- this.重排序并标记全列表类型();
- tempTip.setDuration(2000);
- tempTip.showSuccess('已将库位:' + location + '的盘点记录设置为起始盘点记录');
- },
- 分隔_基于分割位置(未盘列,分割位置id) { // return [arr1,arr2]
- let 分割位置=null;
- 未盘列.forEach(function(行,下标){
- if(行.id===分割位置id){
- 分割位置=下标;
- }
- });
- let 未盘列1=未盘列.slice(0,分割位置);
- let 未盘列2=未盘列.slice(分割位置,未盘列.length);
- return [未盘列1,未盘列2];
- },
- 删除盘点记录(inventoryAccountMissionId, inventoryAccountId, name) {
- let _this = this;
- if (!confirm('确定要删除商品为:“' + name + '”的盘点记录吗?')) {
- return
- }
- ;
- let url = '{{url('inventory/删除盘点记录')}}';
- axios.post(url, {
- inventoryAccountMissionId: inventoryAccountMissionId,
- inventoryAccountId: inventoryAccountId
- }).then(
- function (response) {
- if (!response.data.success) {
- tempTip.setDuration(2000);
- tempTip.show('盘点单号:' + inventoryAccountMissionId + '删除失败!' + response.data.data);
- } else {
- _this.inventoryMissions.every(function (inventoryAccountMission, i) {
- if (response.data.data > 0 && inventoryAccountMission.id === inventoryAccountMissionId) {
- _this.inventoryMissions.splice(i, 1);
- return false;
- }
- return true
- });
- tempTip.setDuration(2000);
- tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '删除成功!');
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('删除失败,网络链接错误!' + err);
- });
- },
- 跳过盘点记录(inventoryAccountMissionId, inventoryAccountId, name) {
- let _this = this;
- if (!confirm('确定要跳过商品为:“' + name + '”的盘点记录吗?')) {return ;}
- let url = '{{url('inventory/跳过盘点记录')}}';
- axios.post(url, {
- inventoryAccountMissionId: inventoryAccountMissionId,
- inventoryAccountId: inventoryAccountId
- }).then(
- function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('盘点单号:' + inventoryAccountMissionId + '跳过盘点失败!' + response.data.data);
- } else {
- _this.inventoryMissions.every(function (inventoryAccountMission) {
- if (inventoryAccountMission.id === inventoryAccountMissionId) {
- inventoryAccountMission.checked = response.data.inventoryAccountMission.checked;
- return false;
- }
- return true
- });
- }
- _this.重排序并显示();
- tempTip.setDuration(3000);
- tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '跳过盘点成功!');
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('跳过盘点记录失败,网络链接错误!' + err);
- });
- },
- 确认盘点差异(inventoryAccountMissionId, inventoryAccountId, name) {
- let _this = this;
- if (!confirm('确定提交商品为:“' + name + '”的盘点差异吗?')) {return ;}
- let url = '{{url('inventory/确认盘点差异')}}';
- axios.post(url, {
- inventoryAccountMissionId: inventoryAccountMissionId,
- inventoryAccountId: inventoryAccountId
- }).then(
- function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('盘点单号:' + inventoryAccountMissionId + '提交盘点差异失败!' + response.data.data);
- } else {
- _this.inventoryMissions.every(function (inventoryAccountMission) {
- if (inventoryAccountMission.id === inventoryAccountMissionId) {
- inventoryAccountMission.checked = response.data.inventoryAccountMission.checked;
- return false;
- }
- return true
- });
- }
- _this.重排序并显示();
- tempTip.setDuration(3000);
- tempTip.showSuccess('盘点记录:' + inventoryAccountMissionId + '提交盘点差异成功!');
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('提交盘点差异记录失败,网络链接错误!' + err);
- });
- },
- 批量跳过或确认差异(){
- let _this = this;
- if (!confirm('确定对勾选内容进行批量操作吗?')) {return ;}
- let url = '{{url('inventory/批量跳过或确认差异')}}';
- axios.post(url, {checkData: _this.checkData}).then(
- function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('批量操作失败!' + response.data.data);
- } else {
- response.data.inventoryAccountMissions.forEach(function (mission) {
- _this.库位索引_记录[mission.location].forEach(function(missionInIndex){
- if(parseInt(missionInIndex.id)===parseInt(mission.id)){
- missionInIndex.checked=mission.checked;
- }
- });
- });
- }
- _this.重排序并显示();
- _this.清空checkbox();
- tempTip.setDuration(3000);
- tempTip.showSuccess('批量操作成功!');
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('批量操作失败,网络链接错误!' + err);
- });
- },
- 重排序并显示(){
- let _this=this;
- _this.显示记录列=[];
- _this.重排序并标记全列表类型(_this.inventoryMissions);
- _this.加载下方数据并置空上方数据();
- },
- 完结盘点任务(id, owner_name, type) {
- if (!confirm('确定完结货主为:“' + owner_name + '”的“' + type + '”任务吗?')) {
- return;
- }
- let url = '{{url('inventory/完结盘点任务')}}/' + id;
- axios.get(url).then(function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('修改完结状态失败!');
- } else {
- if (response.data.data.id === id) {
- tempTip.setDuration(3000);
- tempTip.showSuccess('货主为:“' + owner_name + '”的“' + type + '”任务完结成功');
- window.setTimeout(function () {
- window.location.href = '{{url('inventory/stockInventory/mission')}}';
- }, 1000);
- }
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('修改完结状态失败! ' + err);
- })
- },
- 增加系统之外的盘点记录(location, barcode, count, inventoryId, owner_code, param) {
- let _this = this;
- let url = '{{url('inventory/增加系统之外的盘点记录')}}';
- axios.post(url, {location:location,barcode:barcode,count:count,inventoryId:inventoryId,owner_code:owner_code,param:param}).then(
- function (response) {
- if (!response.data.success) {
- tempTip.setDuration(3000);
- tempTip.show('增加系统之外的盘点记录失败!');
- } else {
- let inventoryAccountMission=response.data.inventoryAccountMission;
- inventoryAccountMission.commodity_barcodes = response.data.inventoryAccountMission.commodity.barcodes;
- inventoryAccountMission.commodity_name = response.data.inventoryAccountMission.commodity.name;
- inventoryAccountMission.stockInventoryPersons = response.data.stockInventoryPersons;
- inventoryAccountMission.produced_at = '';
- inventoryAccountMission.valid_at = '';
- _this.inventoryMissions.push(inventoryAccountMission);
- inventoryAccountMission.commodity_barcodes.forEach(function(barcode){
- if(!Array.isArray(_this.条码索引_记录[barcode.code])) _this.条码索引_记录[barcode.code]=[];
- _this.条码索引_记录[barcode.code].push(inventoryAccountMission);
- });
- if(!Array.isArray(_this.库位索引_记录[location])) _this.库位索引_记录[location]=[];
- _this.库位索引_记录[location].push(inventoryAccountMission);
- _this.重排序并显示();
- _this.清空inputs();
- tempTip.setDuration(3000);
- tempTip.showSuccess('增加系统之外的盘点记录成功!');
- }
- }
- ).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show('增加系统之外的盘点记录失败,网络链接错误!' + err);
- });
- },
- 将相邻同样条目总数匹配的标记_供样式使用(inventoryMissions) {
- for (let i = 0; i < inventoryMissions.length; i++) {
- let 相同条码组 = [];
- function 抽出紧邻相同条码(起始下标) {
- let 下标B = 起始下标 + 1;
- if (下标B >= inventoryMissions.length) return;
- if (inventoryMissions[起始下标].commodity.barcode === inventoryMissions[下标B].commodity.barcode) {
- if (相同条码组.length <= 1 || 相同条码组[相同条码组.length - 1].id !== inventoryMissions[起始下标].id) {
- 相同条码组.push(inventoryMissions[起始下标]);
- }
- 相同条码组.push(inventoryMissions[下标B]);
- return 抽出紧邻相同条码(下标B);
- }
- return 下标B;
- }
- i = 抽出紧邻相同条码(i);
- let 库存总数 = 0;
- let 实盘总数 = 0;
- 相同条码组.forEach(function (目标) {
- 库存总数 += 目标.stored_amount;
- 实盘总数 += 目标.verified_amount;
- })
- if (库存总数 === 实盘总数)
- 相同条码组.forEach(function (目标) {
- 目标.hasLinkingGroup = true;
- })
- }
- ;
- },
- 清理标记(mission) {
- mission.hasLinkingGroup = false;
- },
- 盘点(id, location, barcode, inventoryId, count) {
- let _this = this;
- let url = '{{url('inventory/stockInventory')}}';
- axios.post(url, {id:id,location:location,barcode:barcode,count:count,inventoryId:inventoryId})
- .then(function (response) {
- if (!response.data.success) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + ' ' + response.data.data);
- return;
- }
- if (_this.inventory.id === response.data.inventory.id) {
- _this.inventory.processed = response.data.inventory.processed;
- _this.inventory.surplus = response.data.inventory.surplus;
- _this.inventory.check_surplus = response.data.inventory.check_surplus;
- }
- _this.inventoryMissions.every(function (inventoryMission, i) {
- if (parseInt(inventoryMission.id) === parseInt(response.data.inventoryMission.id)) {
- inventoryMission.checked = response.data.inventoryMission.checked;
- inventoryMission.verified_amount = response.data.inventoryMission.verified_amount;
- inventoryMission.difference_amount = response.data.inventoryMission.difference_amount;
- inventoryMission.re_checked_amount = response.data.inventoryMission.re_checked_amount;
- inventoryMission.stockInventoryPersons = response.data.stockInventoryPersons;
- _this.inventoryMissions.splice(i, 1)
- _this.inventoryMissions.unshift(inventoryMission);
- return false;
- }
- return true;
- });
- _this.重排序并显示();
- if (response.data.inventoryMission.difference_amount!==0)_this.初盘有盘点差异_确认是否重盘();
- if (response.data.inventoryMission.difference_amount===0){
- _this.清空inputs();
- tempTip.setDuration(3000);
- tempTip.showSuccess('盘点成功!');
- _this.放置焦点光标至正确位置();
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + '网络错误' + err);
- })
- },
- 初盘有盘点差异_确认是否重盘(){
- let _this=this;
- tempTip.confirm('<p class="text-danger">'+"当前盘点数量存在差异,是否重盘当前盘点记录?"+'</p>',function () {
- _this.放置焦点光标至正确位置();
- _this.提交库位和条码();
- },
- function () {
- _this.清空inputs();
- _this.放置焦点光标至正确位置();
- tempTip.setDuration(3000);
- tempTip.showSuccess('盘点成功!');
- },'是','否')
- },
- 清空inputs(){
- $locationInput.val('');
- $barcodeInput.val('');
- $amountInput.val('');
- for(let key in this.inputs()){
- this.inputs()[key]='';
- }
- },
- 清空checkbox(){
- this.checkData=[];
- },
- 不覆盖() {
- let _this = this;
- _this.清空指定盘点记录列();
- _this.清空inputs();
- },
- 覆盖(){
- let _this=this;
- 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);
- },
- 盘点选中任务(e){
- let _this=this;
- let id = $(e.target).attr('data_id');
- let inventoryId=_this.inventory.id;
- let count=_this.inputs().amount.trim();
- let produced_at=_this.inputs().produced_at.trim();
- let valid_at=_this.inputs().valid_at.trim();
- let batch_number=_this.inputs().batch_number.trim();
- 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) {
- if (!response.data.success) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + ' ' + response.data.data);
- return;
- }else {
- if (_this.inventory.id === response.data.inventory.id) {
- _this.inventory.processed = response.data.inventory.processed;
- _this.inventory.surplus = response.data.inventory.surplus;
- _this.inventory.check_surplus = response.data.inventory.check_surplus;
- }
- if (response.data.inventoryMission.length >1) {
- response.data.inventoryMission.forEach(function (mission) {
- let isToEdit=false;
- let commodity_barcodes=mission.commodity_barcodes;
- _this.库位索引_记录[_this.inputs().location.trim()].every(function (inventoryMission){
- if (parseInt(inventoryMission.id) === parseInt(mission.id)){
- isToEdit=true;
- inventoryMission.checked = mission.checked;
- inventoryMission.verified_amount = mission.verified_amount;
- inventoryMission.difference_amount =mission.difference_amount;
- inventoryMission.re_checked_amount = mission.re_checked_amount;
- inventoryMission.stockInventoryPersons = response.data.stockInventoryPersons;
- return false;
- }
- return true;
- })
- if (!isToEdit){
- mission.commodity_barcodes= commodity_barcodes;
- mission.stockInventoryPersons=response.data.stockInventoryPersons;
- _this.inventoryMissions.push(mission);
- }
- });
- }else {
- _this.库位索引_记录[_this.inputs().location.trim()].every(function (inventoryMission,i) {
- if (parseInt(inventoryMission.id) === parseInt(response.data.inventoryMission.id)){
- inventoryMission.checked = response.data.inventoryMission.checked;
- inventoryMission.verified_amount = response.data.inventoryMission.verified_amount;
- inventoryMission.difference_amount = response.data.inventoryMission.difference_amount;
- inventoryMission.re_checked_amount = response.data.inventoryMission.re_checked_amount;
- inventoryMission.stockInventoryPersons = response.data.stockInventoryPersons;
- _this.inventoryMissions.splice(i, 1);
- _this.inventoryMissions.unshift(inventoryMission);
- return false;
- }
- return true;
- })
- }
- _this.重排序并显示();
- _this.清空inputs();
- _this.清空指定盘点记录列();
- tempTip.setDuration(3000);
- tempTip.showSuccess('盘点成功!');
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + '网络错误' + err);
- })
- },
- inventoryAccountMissionExport(checkAllSign) {
- let url = '{{url('inventory/stockInventory/inventoryAccountMission/export')}}';
- let token = '{{ csrf_token() }}';
- let allData = [];
- if (checkAllSign) {
- allData = JSON.stringify(this.inventoryMissions);
- let allData1 = JSON.parse(allData);
- allData1.forEach(function (inventoryMission) {
- if (inventoryMission.stock_persons.length > 0) inventoryMission.stock_person = inventoryMission.stock_persons[inventoryMission.stock_persons.length - 1].name;
- if (inventoryMission.stock_persons.length<1) inventoryMission.stock_person='';
- delete inventoryMission.commodity_barcodes;
- delete inventoryMission.stock_persons;
- delete inventoryMission.stockInventoryPersons;
- delete inventoryMission.commodity;
- });
- let data = JSON.stringify(allData1);
- excelExport(false,data,url,this.sum,token);
- } else {
- this.checkData.forEach(function (inventoryMission) {
- if (inventoryMission.stock_persons.length > 0) inventoryMission.stock_person = inventoryMission.stock_persons[inventoryMission.stock_persons.length - 1].name;
- if (inventoryMission.stock_persons.length <1) inventoryMission.stock_person='';
- delete inventoryMission.commodity_barcodes;
- delete inventoryMission.stock_persons;
- delete inventoryMission.stockInventoryPersons;
- delete inventoryMission.commodity;
- });
- let data = JSON.stringify(this.checkData);
- excelExport(checkAllSign,data,url,this.sum,token);
- }
- },
- stockInventoryByLocation(){
- let _this=this;
- let inventoryId=_this.inventory.id;
- let difference=[];
- let trPc = $("#blueTablePc tr:gt(1)").get();
- let tr = $("#blueTable tr:gt(0)").get();
- $(trPc).each(function(item,key){
- input = $(key).find('.blueAmountPc');
- let obj=new Object();
- obj.id=input.attr('data_id');
- obj.stored_amount=input.attr('stored_amount');
- obj.amount=input.val();
- if (input.val()) _this.库位盘点记录.push(obj);
- });
- $(tr).each(function(item,key){
- input = $(key).find('.blueAmount');
- let obj=new Object();
- obj.id=input.attr('data_id');
- obj.stored_amount=input.attr('stored_amount');
- obj.amount=input.val();
- if (input.val()) _this.库位盘点记录.push(obj);
- });
- let url = '{{url('inventory/stockInventory/batchStockByLocation')}}';
- axios.post(url,{mission:_this.库位盘点记录,inventoryId:inventoryId}).then(function(response){
- if (!response.data.success) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + ' ' + response.data.msg);
- return;
- }else {
- if (_this.inventory.id === response.data.inventory.id) {
- _this.inventory.processed = response.data.inventory.processed;
- _this.inventory.surplus = response.data.inventory.surplus;
- _this.inventory.check_surplus = response.data.inventory.check_surplus;
- }
- response.data.inventoryMission.forEach(function (mission) {
- if(mission.difference_amount>0) difference.push(mission.commodity.barcodes[0].code);
- _this.inventoryMissions.every(function (inventoryMission,i){
- if (parseInt(inventoryMission.id) === parseInt(mission.id)){
- inventoryMission.checked = mission.checked;
- inventoryMission.verified_amount = mission.verified_amount;
- inventoryMission.difference_amount =mission.difference_amount;
- inventoryMission.re_checked_amount = mission.re_checked_amount;
- inventoryMission.stockInventoryPersons = response.data.stockInventoryPersons;
- _this.inventoryMissions.splice(i, 1);
- _this.inventoryMissions.unshift(inventoryMission);
- return false;
- }
- return true;
- })
- });
- _this.重排序并显示();
- _this.清空inputs();
- _this.清空指定盘点记录列();
- tempTip.setDuration(5000);
- if (difference.length>0){
- tempTip.show('给库位下:条码为'+difference+'存在差异,如需重盘请针对该条码重新盘点!');
- difference=[];
- }else {
- tempTip.showSuccess('盘点成功!');
- }
- }
- }).catch(function (err) {
- tempTip.setDuration(2000);
- tempTip.show('盘点失败!' + '网络错误' + err);
- })
- },
- 新增盘点记录(){
- let _this=this;
- _this.addInventoryMission=true;
- _this.清空指定盘点记录列();
- },
- 收起新增(){
- let _this=this;
- _this.addInventoryMission=false;
- _this.清空指定盘点记录列();
- },
- 盲收(){
- let _this=this;
- _this.blindReceive=true;
- _this.scanListening();
- },
- 正常盘点(){
- let _this=this;
- _this.blindReceive=false;
- $(document).off('keypress');
- },
- changeToManualInputAmount:function(){
- this.status.amountDisable=false;
- this.isManualInputtingAmount=true;
- $('#amountLabel').text('输入数量:');
- },
- changeToScanInputAmount:function(){
- this.status.amountDisable=true;
- this.isManualInputtingAmount=false;
- $('#amountLabel').text('自动扫入数量:');
- },
- changeToManualInputBarcode:function(){
- this.status.barcodeDisable=false;
- this.isManualInputtingBarcode=true;
- $('#barcode').attr('placeholder','手工输入条码');
- },
- changeToScanInputBarcode:function(){
- let data = this;
- this.isManualInputtingBarcode=false;
- this.inputting.barcode='';
- let $barcode = $('#barcode');
- this.status.barcodeDisable=false;
- setTimeout(function () {
- $barcode.focus();
- data.status.barcodeDisable=true;
- },20);
- $barcode.attr('placeholder','扫入条码');
- },
- oninputEnter:function(e){
- if (e.key === 'Enter') {
- this.focusDocument();
- }
- },
- focusDocument: function () {
- this.focusing = 'document';
- this.showCommitButton();
- },
- focusOutDocument: function () {
- this.focusing = '';
- this.autoFillBin();
- },
- scanListening: function () {
- let data = this;
- $(document).on('keypress', function (e) {
- if(data.focusing!=='document'){return}
- if(data.isManualInputtingBarcode){return}
- if (e.keyCode !== 13) {
- if(data.status.scanEndInputted){
- data.lastScannedBarcode=data.inputting.barcode;
- data.inputting.barcode='';
- data.status.scanEndInputted=false;
- }
- data.inputting.barcode += String.fromCharCode(e.keyCode);
- } else {
- if(data.inputting.barcode.length<=1){
- window.tempTip.setDuration(4500);
- window.tempTip.show('未扫入条码,请检查扫码枪设置,尝试调至“直接键盘输出”模式');
- return;
- }
- data.status.scanEndInputted = true;
- data.showCommitButton();
- data.autoFillBin();
- switch(data.inputMode){
- case 'increasing': data.commitGoodsOnIncreasingMode();break;
- case 'multiIncreasing': data.commitGoodsOnMultiIncreasingMode();break;
- }
- }
- });
- },
- commitGoodsOnIncreasingMode: function () {
- let data = this;
- function doIt(){
- let repeatedBarcode=data.repeatedIncreasingBarcodeFromSaved();
- function increase(){
- data.inputting.bin=repeatedBarcode.bin;
- repeatedBarcode.amount++;
- data.inputting.amount=repeatedBarcode.amount;
- window.tempTip.setDuration(500);
- window.tempTip.showSuccess(repeatedBarcode.amount);
- data.focusDocument();
- data.audioDing();
- }
- if(!repeatedBarcode){
- data.focusOutDocument();
- data.alertVibrate();
- window.tempTip.setInputType('number');
- data.inputting.amount=1;
- data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
- data.status.binDisable=true;
- window.tempTip.setDuration(500);
- window.tempTip.showSuccess('保存成功');
- data.focusDocument();
- data.audioDing();
- }else{
- increase();
- }
- }
- if(data.lastScannedBarcode!==data.inputting.barcode && data.lastScannedBarcode){
- data.audioWarning_otherBarcode();
- data.focusOutDocument();
- window.tempTip.confirm('扫到其它条码,是否切换至新条码并记录?',doIt,function () {
- data.inputting.barcode=data.lastScannedBarcode;
- data.focusDocument();
- })
- }else{
- doIt()
- }
- },
- commitGoodsOnMultiIncreasingMode: function () {
- let data = this;
- let repeatedBarcode=this.repeatedIncreasingBarcodeFromSaved();
- function increase(){
- data.inputting.bin=repeatedBarcode.bin;
- repeatedBarcode.amount++;
- data.inputting.amount=repeatedBarcode.amount;
- window.tempTip.setDuration(500);
- window.tempTip.showSuccess(repeatedBarcode.amount);
- data.focusDocument();
- data.audioDing();
- }
- if(!repeatedBarcode){
- data.focusOutDocument();
- data.alertVibrate();
- window.tempTip.setInputType('number');
- data.inputting.amount=1;
- data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
- data.status.binDisable=true;
- window.tempTip.setDuration(500);
- window.tempTip.showSuccess('保存成功');
- data.focusDocument();
- data.audioDing();
- }else{
- increase();
- }
- },
- audioWarning_otherBarcode: function () {
- let audio = document.getElementById('soundWarning');
- audio.currentTime = 0;//重新播放
- if(audio.paused){
- audio.play();// 播放
- }
- this.alertVibrate();
- },
- audioDing: function () {
- let audio = document.getElementById('soundDing');
- audio.currentTime = 0;//重新播放
- audio.play();// 播放
- function startVibrate(duration) {
- if (navigator.vibrate) {
- navigator.vibrate(duration);
- } else if (navigator.webkitVibrate) {
- navigator.webkitVibrate(duration);
- }
- }
- startVibrate(500);
- },
- alertVibrate: function () {
- function startVibrate(duration) {
- if (navigator.vibrate) {
- navigator.vibrate(duration);
- } else if (navigator.webkitVibrate) {
- navigator.webkitVibrate(duration);
- }
- }
- let vibrateInterval = setInterval(function() {
- startVibrate(150);
- }, 50);
- setTimeout(function() {
- clearInterval(vibrateInterval)
- }, 2000);
- },
- autoFillBin: function () {
- let data = this;
- let isNotRepeatingBarcode=this.goodses.every(function(goods){
- if(goods.barcode===data.inputting.barcode){
- data.inputting.bin=goods.bin;
- data.status.binDisable=true;
- return false;
- }
- return true;
- });
- if(isNotRepeatingBarcode){
- data.status.binDisable=false;
- }
- },
- repeatedIncreasingBarcodeFromSaved: function () {
- let data = this;
- let repeatedGoods=null;
- data.goodses.every(function(goods){
- if(goods.barcode===data.inputting.barcode && goods.fromIncreasing){
- repeatedGoods=goods;
- return false;
- }
- return true;
- });
- return repeatedGoods;
- },
- commitGoods: function () {
- let data = this;
- window.tempTip.setDuration(3500);
- if(!data.inputting.barcode){window.tempTip.show('请扫入条码');return;}
- else if(!data.inputting.amount){window.tempTip.show('请输入数量');return;}
- //else if(!data.inputting.bin){window.tempTip.show('请输入隔口号');return;}
- data.recordOrPlusGoods();
- window.tempTip.setDuration(1500);
- window.tempTip.showSuccess('成功提交:' + data.inputting.barcode);
- data.cleanInputs();
- data.audioDing();
- },
- cleanInputs: function () {
- this.changeToScanInputBarcode();
- this.inputting.barcode='';
- this.inputting.amount='';
- this.inputting.bin='';
- this.inputting.produce_date='';
- this.inputting.valid_date='';
- this.inputting.batch_number='';
- this.commitButtonVisible=false;
- this.status.binDisable=false;
- this.lastScannedBarcode='';
- },
- recordOrPlusGoods: function () {
- let data = this;
- if(this.inputMode==='regular'){
- data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
- return;
- }
- let isNotRepeating=data.goodses.every(function(goods){
- if(goods.barcode===data.inputting.barcode){
- goods.amount=parseInt(goods.amount)+parseInt(data.inputting.amount);
- return false;
- }
- return true;
- });
- if(isNotRepeating){
- data.goodses.unshift(JSON.parse(JSON.stringify(data.inputting)));
- }
- },
- removeGoods: function ($e,barcode) {
- if(!confirm('确定要删除条码为'+barcode+'的记录吗'))return;
- let data = this;
- data.goodses.every(function(goods,i){
- if(goods.barcode===barcode){
- data.goodses.splice(i,1)
- return false;
- }
- return true;
- })
- },
- showCommitButton: function () {
- let data = this;
- if(data.inputting.barcode && data.inputting.amount /*&& data.inputting.bin*/){
- data.commitButtonVisible=true;
- }else{
- if (this.inputMode==='regular' && this.status.barcodeDisable && !this.inputting.amount && this.inputting.barcode){
- this.focusing = '';
- document.getElementById('amount').focus();
- }
- }
- },
- submitStockInventory: function () {
- let data = this;
- data.focusOutDocument();
- if(data.goodses.length===0){
- window.tempTip.show('请先录入数据再提交盘点');return;
- }
- if(!data.location){
- window.tempTip.setDuration(1500);
- window.tempTip.show('库位为必填项');
- return;
- }
- window.tempTip.confirm('请检查表格,确定全部完成。提交后数据将全部清空,不能后退',
- function () {
- let url='{{url("inventory/stockInventory/baseOnBlindReceive")}}';
- axios.post(url,{'location':data.location,'goodses':data.goodses,'inventoryId':data.inventory.id,'owner_code':data.inventory.owner.code})
- .then(function(response){
- if(response.data.success){
- data.goodses=[];
- data.cleanInputs();
- window.tempTip.cancelWaitingTip();
- if (data.inventory.id === response.data.inventory.id) {
- data.inventory.processed = response.data.inventory.processed;
- data.inventory.surplus = response.data.inventory.surplus;
- data.inventory.check_surplus = response.data.inventory.check_surplus;
- }
- if (response.data.inventoryMissions.length >0) {
- response.data.inventoryMissions.forEach(function (mission) {
- let isToEdit=false;
- data.inventoryMissions.every(function (inventoryMission){
- if (parseInt(inventoryMission.id) === parseInt(mission.id)){
- isToEdit=true;
- inventoryMission.checked = mission.checked;
- inventoryMission.verified_amount = mission.verified_amount;
- inventoryMission.difference_amount =mission.difference_amount;
- inventoryMission.re_checked_amount = mission.re_checked_amount;
- inventoryMission.stockInventoryPersons = response.data.stockInventoryPersons;
- return false;
- }
- return true;
- })
- if (!isToEdit){
- mission.commodity_barcodes = mission.commodity.barcodes;
- mission.stockInventoryPersons=response.data.stockInventoryPersons;
- data.inventoryMissions.push(mission);
- }
- });
- }
- data.重排序并标记全列表类型(data.inventoryMissions);
- window.tempTip.setDuration(1500);
- window.tempTip.showSuccess('盲收盘点成功,可返回盘点页面查看');
- data.location='';
- data.focusDocument();
- }else{
- window.tempTip.setDuration(1500);
- window.tempTip.show('盲收盘点失败:'+response.data.fail_info);
- data.focusDocument();
- data.alertVibrate()
- }
- })
- .catch(function (err) {
- window.tempTip.setDuration(3500);
- window.tempTip.show('网络或系统错误,请将以下信息提交给开发者:'+err);
- data.alertVibrate();
- });
- },function () {
- data.focusDocument();
- })
- }
- },
- computed: {
- borderByMode: function () {
- return {
- // 'border-info':this.inputMode==='regular',
- 'border-success':this.inputMode==='increasing',
- 'border-danger':this.inputMode==='multiIncreasing'
- }
- }
- }
- // 单条排序并着色(inventoryMission){
- // let _this=this;
- // let 所在临时分类列=[];
- // switch(inventoryMission.mark){
- // case '已复盘有差异':所在临时分类列=_this.已复盘有差异列;break;
- // case '已复盘无差异':所在临时分类列=_this.已复盘无差异列;break;
- // case '未复盘有差异':所在临时分类列=_this.未复盘有差异列;break;
- // case '无差异':所在临时分类列=_this.无差异列;break;
- // case '未盘':所在临时分类列=_this.未盘列;break;
- // }
- // },
- });
- </script>
- @endsection
|