| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534 |
- <template>
- <div class="ele-body">
- <el-card shadow="never">
- <header-title title="基本信息"></header-title>
- <el-form
- :model="formData"
- ref="formName"
- label-width="110px"
- :rules="rules"
- >
- <el-row :gutter="20">
- <!-- <el-col :span="8">
- <el-form-item label="入库单号" prop="bizNum">
- <el-input :value="formData.bizNum" disabled /></el-form-item
- ></el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="仓库" prop="warehouseId">
- <el-select
- filterable
- v-model="formData.warehouseId"
- clearable
- :disabled="
- !!(warehousingMaterialList && warehousingMaterialList.length)
- "
- >
- <el-option
- v-for="(item, index) in warehouseList"
- :key="index"
- :label="item.name"
- :value="item.id"
- @click.native="warehouse = item"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <el-col :span="8">
- <el-form-item label="物品类型" prop="extInfo.assetType">
- <!-- <DictSelection
- dictName="类型用途"
- :disabled="
- !!(warehousingMaterialList && warehousingMaterialList.length)
- "
- clearable
- v-model="formData.extInfo.assetType"
- @itemChange="handleChange"
- /> -->
- <!-- <el-select
- :disabled="
- !!(warehousingMaterialList && warehousingMaterialList.length)
- "
- clearable
- v-model="formData.extInfo.assetType"
- @change="handleChanges"
- >
- <el-option
- v-for="(item, index) in codeList"
- :key="index"
- :label="item.dictValue"
- :value="item.dictCode"
- ></el-option>
- </el-select> -->
- <selectTree
- ref="tree"
- class="form-ipt"
- size="medium"
- style="width: 100%"
- :value="formData.extInfo.assetType"
- clearable
- :options="codeList"
- :props="{
- value: 'id',
- label: 'name',
- children: 'children'
- }"
- @getValue="codeListValue"
- :isAll="false"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库类型" prop="bizType">
- <el-select
- @change="onClear"
- filterable
- placeholder="请选择"
- v-model="formData.bizType"
- clearable
- :disabled="
- !!(warehousingMaterialList && warehousingMaterialList.length)
- "
- >
- <el-option
- v-for="item in sceneState"
- :key="item.code"
- :value="item.code + ''"
- :label="item.label"
- ></el-option>
- </el-select> </el-form-item
- ></el-col>
- <el-col :span="8">
- <el-form-item
- v-if="formData.bizType == 2"
- label="采购收货单"
- prop="documentSource"
- >
- <el-input
- placeholder="请输入"
- v-model="formData.extInfo.documentSource"
- @click.native="handlePicker()"
- :disabled="isTask"
- >
- <el-button
- slot="append"
- icon="el-icon-circle-close"
- @click.stop="onClear"
- ></el-button>
- </el-input>
- </el-form-item>
- <el-form-item
- v-if="formData.bizType == 1"
- label="生产工单"
- prop="documentSource"
- >
- <el-input
- placeholder="请输入"
- clearable
- v-model="formData.extInfo.documentSource"
- /></el-form-item>
- <el-form-item
- v-if="
- formData.bizType != 1 &&
- formData.bizType != 2 &&
- formData.bizType != 3
- "
- label="销售订单"
- prop="documentSource"
- >
- <el-input
- placeholder="请输入"
- clearable
- v-model="formData.extInfo.documentSource"
- /></el-form-item>
- <el-form-item
- v-if="formData.bizType == 3"
- label="出库单"
- prop="documentSource"
- >
- <el-input
- placeholder="请输入"
- clearable
- v-model="formData.extInfo.documentSource"
- /></el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="权属部门" prop="deptName">
- <el-input
- placeholder="权属部门"
- disabled
- v-model="formData.extInfo.deptName"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="入库登记人">
- <el-input
- placeholder="登记人"
- disabled
- v-model="formData.extInfo.createUserName"
- clearable /></el-form-item
- ></el-col>
- <!-- <el-col :span="8">
- <el-form-item label="入库时间" prop="outInTime">
- <el-date-picker
- v-model="formData.outInTime"
- clearable
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择日期"
- >
- </el-date-picker></el-form-item
- ></el-col> -->
- <el-col :span="8" v-if="formData.bizType == 2">
- <el-form-item label="供应商" prop="supplierName">
- <!-- <DictSelection
- dictName="经销商列表"
- clearable
- v-model="formData.extInfo.supplierId"
- @itemChange="ChangeSupplier"
- /> -->
- <el-input
- placeholder="请输入"
- clearable
- v-model="formData.extInfo.supplierName"
- />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="8" v-if="formData.bizType == 2">
- <el-form-item label="物料代号" prop="supplierCode">
- <el-input
- placeholder="请输入"
- v-model="formData.supplierCode"
- clearable /></el-form-item
- ></el-col> -->
- <!-- <el-col :span="8" v-if="formData.bizType == 2">
- <el-form-item label="客户" prop="clientName">
- <el-input
- placeholder="请输入"
- clearable
- v-model="formData.clientName"
- />
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="8" v-if="formData.bizType == 2">
- <el-form-item label="客户代号" prop="clientCode">
- <el-input
- placeholder="请输入"
- v-model="formData.clientCode"
- clearable /></el-form-item
- ></el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="送货人" prop="fromUser">
- <el-input
- placeholder="请输入"
- v-model="formData.fromUser"
- clearable /></el-form-item
- ></el-col> -->
- <el-col :span="8">
- <el-form-item label="送货人" prop="fromUser">
- <el-input
- placeholder="请输入"
- v-model="formData.fromUser"
- clearable
- />
- <!-- <el-select
- v-model="formData.fromUser"
- filterable
- placeholder="请选择送货人"
- >
- <el-option
- v-for="item in contactList"
- :key="item.id"
- :label="item.linkName"
- :value="item.id"
- @click.native="
- () => (formData.extInfo.deliveryPhone = item.mobilePhone)
- "
- >
- </el-option>
- </el-select> -->
- </el-form-item></el-col
- >
- <el-col :span="8">
- <el-form-item label="送货人联系方式" prop="deliveryPhone">
- <el-input
- placeholder="请输入"
- v-model="formData.extInfo.deliveryPhone"
- clearable /></el-form-item
- ></el-col>
- <!-- <el-col :span="8">
- <el-form-item label="紧急状态" prop="urgent">
- <el-select
- filterable
- placeholder="请选择"
- v-model="formData.extInfo.urgent"
- clearable
- >
- <el-option
- v-for="item in emergencyState"
- :key="item.code"
- :value="item.code"
- :label="item.label"
- ></el-option>
- </el-select> </el-form-item
- ></el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="审核人部门" prop="verifyDeptName">
- <selectTree
- ref="tree"
- class="form-ipt"
- size="medium"
- style="width: 100%"
- clearable
- :options="treeList"
- :props="{
- value: 'code',
- label: 'name',
- children: 'children'
- }"
- @getValue="auditorDeptClick"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="审核人" prop="verifyId">
- <el-select
- filterable
- class="form-ipt"
- style="width: 100%"
- v-model="formData.verifyId"
- placeholder="请选择"
- >
- <el-option
- v-for="item in staffList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- @click.native="changeVerfy(item)"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="24">
- <el-form-item label="附件" prop="contentImage">
- <selectUpload @getImgs="upload" :initData="uploadList" />
- </el-form-item>
- </el-col> -->
- <el-col :span="24">
- <el-form-item label="备注" prop="remark">
- <el-input
- v-model="formData.remark"
- clearable
- type="textarea"
- placeholder="请详细说明"
- :rows="4"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div class="material">
- <header-title title="产品信息">
- <el-button type="primary" @click="addStock" v-if="!isTask"
- >添加</el-button
- >
- </header-title>
- <div class="mt10 form-table">
- <el-form
- ref="warehousingMaterialListRef"
- :model="{ warehousingMaterialList: warehousingMaterialList }"
- :show-message="false"
- >
- <el-button
- v-if="warehousingMaterialList.length != 0"
- type="success"
- plain
- style="margin-bottom: 20px; float: right; margin-right: 20px"
- size="mini"
- @click="listSaveArrs"
- >批量保存</el-button
- >
- <el-table
- v-if="isWeight"
- :header-cell-style="rowClass"
- ref="warehousingMaterialListTable"
- :key="formData.extInfo.assetType"
- :data="warehousingMaterialList"
- tooltip-effect="dark"
- style="width: 100%"
- stripe
- >
- <el-table-column
- label="序号"
- type="index"
- width="50"
- align="center"
- >
- </el-table-column>
- <el-table-column
- label="编码"
- prop="assetCode"
- align="center"
- width="130"
- ></el-table-column>
- <el-table-column
- label="名称"
- align="center"
- width="200"
- prop="assetName"
- ></el-table-column>
- <!-- <el-table-column
- label="客户编码"
- align="center"
- width="150"
- prop="customCode"
- v-if="formData.bizType == 1"
- >
- <template slot-scope="{ row, $index }">
- <template v-if="row.isSave">
- {{ row.customCode }}
- </template>
- <el-form-item
- v-else
- :prop="`warehousingMaterialList.${$index}.customCode`"
- required
- >
- <el-input v-model="row.customCode"> </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- label="供应商编码"
- align="center"
- width="150"
- prop="customCode"
- v-if="formData.bizType == 2"
- >
- <template slot-scope="{ row, $index }">
- <template v-if="row.isSave">
- {{ row.supplierCode }}
- </template>
- <el-form-item
- v-else
- :prop="`warehousingMaterialList.${$index}.supplierCode`"
- required
- >
- <el-input v-model="row.supplierCode"> </el-input>
- </el-form-item>
- </template>
- </el-table-column> -->
- <el-table-column
- v-for="(item, index) in tableHeader"
- :key="index"
- align="center"
- :label="item.label"
- width="150"
- :prop="item.prop"
- >
- <template slot-scope="{ row }">
- <template v-if="item.formatter">{{
- item.formatter(row)
- }}</template>
- <template v-else>{{ row[item.prop] }}</template>
- </template>
- </el-table-column>
- <el-table-column
- label="批次号"
- prop="batchNo"
- width="70"
- align="center"
- >
- <template slot-scope="{ row, $index }">
- <template v-if="row.isSave">
- {{ row.batchNo }}
- </template>
- <el-form-item
- v-else
- :prop="`warehousingMaterialList.${$index}.batchNo`"
- required
- >
- <!-- <el-input v-model="row.batchNo"></el-input> -->
- {{ row.batchNo }}
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- label="最小包装单元"
- align="center"
- prop="minPackingCount"
- width="100"
- >
- <el-table-column label="" prop="minPackingCount" width="100">
- <template slot-scope="{ row, $index }">
- <template v-if="row.isSave">
- {{ row.minPackingCount }}
- </template>
- <el-form-item
- v-else
- :prop="`warehousingMaterialList.${$index}.minPackingCount`"
- required
- >
- <el-input
- v-model="row.minPackingCount"
- @input="minPackingCountChange(row, $event)"
- >
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="" prop="minPackingCount">
- <template slot-scope="{ row, $index }">
- {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column
- label="包装数量"
- prop="outInNum"
- width="150"
- align="center"
- >
- <template slot-scope="{ row, $index }">
- <template v-if="row.isSave || formData.bizType == 5">
- {{ row.outInNum }} {{ row.minPackUnit }}
- </template>
- <el-form-item
- v-else
- :prop="`warehousingMaterialList.${$index}.outInNum`"
- required
- >
- <el-input
- v-model="row.outInNum"
- @input="packNum(row, $event)"
- >
- <template slot="append">
- {{ row.minPackUnit ? row.minPackUnit : '/' }}
- </template>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="计量数量" prop="counts">
- <template slot-scope="{ row, $index }">
- {{ row.minPackingCount * row.outInNum }}
- </template>
- </el-table-column>
- <el-table-column
- label="计量单位"
- prop="batchNo"
- width="100"
- align="center"
- >
- <!-- v-if="formData.extInfo.assetType == 1" -->
- <template slot-scope="{ row, $index }">
- <template>
- {{ row.measuringUnit }}
- </template>
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="计量单位"
- prop="batchNo"
- width="100"
- align="center"
- v-if="formData.extInfo.assetType == 4"
- >
- <template slot-scope="{ row, $index }">
- <template>
- {{ row.measuringUnit }}
- </template>
- </template>
- </el-table-column> -->
- <!-- <el-table-column
- label="数量"
- prop="batchNo"
- width="150"
- align="center"
- v-if="formData.extInfo.assetType == 1"
- >
- <template slot-scope="{ row, $index }">
- <template> {{ row.outInNum }} </template>
- </template>
- </el-table-column>
- <el-table-column
- label="数量"
- prop="batchNo"
- width="150"
- align="center"
- v-if="formData.extInfo.assetType == 4"
- >
- <template slot-scope="{ row, $index }">
- <template>
- {{ row.minPackingCount * row.outInNum }}
- </template>
- </template>
- </el-table-column> -->
- <el-table-column
- label="重量"
- align="center"
- prop="contentImage"
- :show-overflow-tooltip="true"
- >
- <!-- v-if="formData.extInfo.assetType == 1" -->
- <template slot-scope="{ row, $index }">
- {{ row.weight }}
- <template slot="append">
- {{ handleRowUnit(row) }}
- <!-- {{
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
- }} -->
- </template>
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="重量"
- align="center"
- prop="contentImage"
- :show-overflow-tooltip="true"
- v-if="formData.extInfo.assetType == 4"
- >
- <template slot-scope="{ row, $index }">
- {{
- deviceWeight(
- row.roughWeight,
- row.minPackingCount * row.outInNum
- )
- }}
- <template slot="append"> -->
- <!-- {{ handleRowUnit(row) }} -->
- <!-- {{
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
- }} -->
- <!-- </template>
- </template>
- </el-table-column> -->
- <el-table-column
- label="重量单位"
- align="center"
- prop="contentImage"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row, $index }">
- {{ row.weightUnit }}
- <template slot="append"> </template>
- </template>
- </el-table-column>
- <el-table-column
- label="单价"
- prop="univalence"
- width="150"
- align="center"
- >
- <template slot-scope="{ row, $index }">
- <!-- <template v-if="row.isSave || formData.bizType == 5">
- <template v-if="row.univalence || row.univalence === 0">
- {{ row.univalence
- }}{{
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
- }}
- </template>
- </template> -->
- <!-- v-else -->
- <el-form-item
- :prop="`warehousingMaterialList.${$index}.univalence`"
- >
- <el-input
- v-model="row.univalence"
- placeholder="非必填"
- @input="
- (value) =>
- (row.univalence = value.replace(/[^0-9.]+/g, ''))
- "
- >
- <template slot="append">
- 元/{{ handleRowUnit(row) }}
- <!-- {{
- { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
- }} -->
- </template>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- label="金额"
- align="center"
- prop="contentImage"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row, $index }">
- {{
- calcSumTotal(
- row.outInNum,
- row.minPackingCount,
- row.univalence,
- row
- )
- }}
- </template>
- </el-table-column>
- <el-table-column
- label="货位"
- prop="warehouseName"
- :show-overflow-tooltip="true"
- width="250"
- required
- >
- <template slot-scope="{ row, $index }">
- <el-form-item
- :prop="`warehousingMaterialList.${$index}.houseList`"
- :required="true"
- >
- <div @click="handleWareHouse(row, $index)">
- <div
- style="color: #ff4949"
- v-if="row.houseList.length == 0"
- >
- ---(必填)
- </div>
- <div v-else>
- <div
- class="fontOmitted"
- v-for="(item, index) in row.houseList"
- :key="index"
- >
- {{ item.warehouseName }}- {{ item.areaName }}-
- {{ item.shelfCode }}- {{ item.cargoSpaceCode
- }}<span style="color: #ff4949" v-if="item.num">
- - {{ item.num }}(数)</span
- >
- <br />
- </div>
- </div>
- </div>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- label="质检单"
- v-if="formData.extInfo.assetType === 3"
- prop="contentImage"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="{ row, $index }">
- <upload @on-success="(data) => (row.contentImage = [data])"
- ><template slot="placeholder">上传</template></upload
- >
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="200"
- fixed="right"
- align="center"
- >
- <template slot="header" slot-scope="scope"> 操作 </template>
- <template slot-scope="{ row, $index }">
- <el-button
- type="text"
- v-show="!row.isSave"
- @click="listSave(row, $index)"
- >保存</el-button
- >
- <el-button
- type="text"
- v-show="row.isSave"
- @click="listEdit(row, $index)"
- >编辑</el-button
- >
- <el-button
- type="text"
- v-if="formData.bizType == 5"
- v-show="!row.isSave"
- @click="chooseAssets(row, $index)"
- >选择资产编号</el-button
- >
- <el-button
- type="text"
- @click="listDel(row, $index)"
- v-if="!isTask"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </el-form>
- </div>
- <div class="mt20">
- <header-title :title="`包装明细`">
- <div class="switch_right">
- <span v-if="materialCodeReqList.length != 0">
- 分拆<el-switch
- v-model="isDetail"
- active-color="#13ce66"
- inactive-color="#ff4949"
- @change="handleIsDetail"
- style="margin-left: 10px"
- >
- </el-switch>
- </span>
- <el-button
- style="margin-left: 20px"
- type="text"
- @click="dateSetting"
- v-if="formData.bizType != 5"
- >批量设置{{
- curDateType === 'manufactureTime' ? '生产日期' : '采购日期'
- }}</el-button
- >
- </div>
- </header-title>
- <el-button
- v-if="materialCodeReqList.length != 0"
- type="success"
- plain
- style="margin-bottom: 20px; float: right; margin-right: 20px"
- size="mini"
- @click="wrapListSave"
- >批量保存</el-button
- >
- <el-table
- ref="materialCodeReqListTable"
- :data="materialCodeReqList"
- tooltip-effect="dark"
- :key="formData.bizType"
- :header-cell-style="rowClass"
- style="width: 100%"
- stripe
- height="300px"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- label=""
- type="selection"
- align="center"
- width="50"
- v-if="formData.bizType != 5"
- >
- </el-table-column>
- <el-table-column label="序号" type="index" width="50">
- </el-table-column>
- <el-table-column
- label="编码"
- prop="assetCode"
- width="130"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="名称"
- prop="assetName"
- width="150"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="批次号"
- prop="batchNo"
- width="70"
- ></el-table-column>
- <el-table-column
- :label="`包装编码`"
- prop="onlyCode"
- width="130"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="包装数量"
- prop="packingCount"
- width="80"
- ></el-table-column>
- <el-table-column
- label="包装单位"
- prop="packingUnit"
- ></el-table-column>
- <el-table-column
- label="计量数量"
- prop="minPackingCount"
- ></el-table-column>
- <el-table-column
- label="计量单位"
- prop="measuringUnit"
- ></el-table-column>
- <el-table-column label="物料代号" prop="materielCode">
- <template slot-scope="{ row }">
- <el-input
- v-if="!row.isPack"
- v-model="row.materielCode"
- ></el-input>
- <span v-else>{{ row.materielCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="客户代号" prop="clientCode">
- <template slot-scope="{ row }">
- <el-input
- v-if="!row.isPack"
- v-model="row.clientCode"
- ></el-input>
- <span v-else> {{ row.clientCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="刻码" prop="engrave">
- <template slot-scope="{ row }">
- <el-input v-if="!row.isPack" v-model="row.engrave"></el-input>
- <span v-else>{{ row.engrave }}</span>
- </template>
- </el-table-column>
- <el-table-column label="重量" prop="weight" width="100">
- <template slot-scope="{ row }">
- <el-input
- v-if="!row.isPack"
- v-model="row.weight"
- @input="weightInput($event, row)"
- ></el-input>
- <span v-else>{{ row.weight }}</span>
- </template>
- </el-table-column>
- <el-table-column label="重量单位" prop="weightUtil">
- <template slot-scope="{ row }">
- {{ row.weightUtil }}
- </template>
- </el-table-column>
- <el-table-column label="质检结果" prop="result" width="120">
- <template slot-scope="{ row }">
- <DictSelection
- dictName="质检结果"
- clearable
- v-model="row.result"
- v-if="!row.isPack"
- @updateVal="changeWrapStatus($event, row)"
- />
- <span v-else>{{ qualityResults[row.result] }}</span>
- </template>
- </el-table-column>
- <el-table-column label="质检状态" prop="status" width="120">
- <template slot-scope="{ row }">
- <span>{{ qualityStatus[row.status] }}</span>
- </template>
- </el-table-column>
- <el-table-column
- v-if="formData.bizType != 5"
- label="生产日期"
- prop=""
- width="220"
- >
- <template slot="header" slot-scope="scope">
- <el-select filterable v-model="curDateType">
- <el-option
- value="manufactureTime"
- label="生产日期"
- ></el-option>
- <el-option
- value="procurementTime"
- label="采购日期"
- ></el-option>
- </el-select>
- </template>
- <template slot-scope="{ row }">
- <template v-if="formData.bizType == 5">
- {{ row[curDateType] }}
- </template>
- <el-date-picker
- v-else
- :disabled="row.ispack"
- size="small"
- v-model="row[curDateType]"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择日期"
- >
- </el-date-picker>
- </template>
- </el-table-column>
- <template v-else>
- <el-table-column
- label="生产日期"
- prop="manufactureTime"
- width="200"
- ></el-table-column>
- <el-table-column
- label="采购日期"
- prop="procurementTime"
- width="200"
- ></el-table-column>
- </template>
- <el-table-column label="操作" width="80" fixed="right">
- <template slot-scope="{ row }">
- <el-button type="text" @click="packCout(row)">
- {{ !row.isPack ? '保存' : '编辑' }}
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- </el-tab-pane>
- </el-tabs> -->
- </div>
- <div class="mt20" v-if="isDetail">
- <header-title :title="`物料明细`"> </header-title>
- <el-button
- v-if="resultArray.length != 0"
- type="success"
- plain
- style="margin-bottom: 20px; float: right; margin-right: 20px"
- size="mini"
- @click="materialListSave"
- >批量保存</el-button
- >
- <el-table
- ref="resultArrayTable"
- :data="resultArray"
- tooltip-effect="dark"
- :key="formData.bizType"
- :header-cell-style="rowClass"
- style="width: 100%"
- stripe
- height="300px"
- @selection-change="handleSelectionChange"
- >
- <el-table-column label="序号" type="index" width="50">
- </el-table-column>
- <el-table-column
- label="编码"
- prop="assetCode"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="名称"
- prop="assetName"
- width="200"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="批次号"
- prop="batchNo"
- width="80"
- ></el-table-column>
- <el-table-column
- label="物料编码"
- prop="no"
- width="200"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- label="计量数量"
- prop="minPackingCount"
- width="90"
- ></el-table-column>
- <el-table-column
- width="80"
- label="计量单位"
- prop="measuringUnit"
- ></el-table-column>
- <el-table-column label="物料代号" prop="meterielCode">
- <template slot-scope="{ row }">
- <el-input
- v-model="row.materielCode"
- v-if="!row.isPack"
- ></el-input>
- <span v-else>{{ row.materialCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="客户代号" prop="clientCode">
- <template slot-scope="{ row }">
- <el-input
- v-model="row.clientCode"
- v-if="!row.isPack"
- ></el-input>
- <span v-else> {{ row.clientCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="刻码" prop="engrave">
- <template slot-scope="{ row }">
- <el-input v-model="row.engrave" v-if="!row.isPack"></el-input>
- <span v-else> {{ row.engrave }}</span>
- </template>
- </el-table-column>
- <el-table-column width="100" label="重量" prop="weight">
- <template slot-scope="{ row }">
- <el-input v-model="row.weight" v-if="!row.isPack"></el-input>
- <span v-else>{{ row.weight }}</span>
- </template>
- </el-table-column>
- <el-table-column label="重量单位" prop="weightUnit" width="100">
- </el-table-column>
- <el-table-column label="质检结果" prop="result" width="120">
- <template slot-scope="{ row }">
- <DictSelection
- dictName="质检结果"
- clearable
- v-model="row.result"
- v-if="!row.isPack"
- @updateVal="changeWrapStatus($event, row)"
- />
- <span v-else>{{ qualityResults[row.result] }}</span>
- </template>
- </el-table-column>
- <el-table-column label="质检状态" prop="status" width="120">
- <template slot-scope="{ row }">
- <span>{{ qualityStatus[row.status] }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="80" fixed="right">
- <template slot-scope="{ row }">
- <el-button type="text" @click="materialBtn(row)">
- {{ !row.isPack ? '保存' : '编辑' }}
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="center mt20">
- <el-button
- type="primary"
- v-if="!isTask"
- @click="handleSave"
- :loading="saveLoading"
- >保存</el-button
- >
- <el-button @click="$router.go(-1)" v-if="!isTask">返回</el-button>
- </div>
- </el-card>
- <selectType
- :visibleDialog.sync="visibleDialog"
- :title="title"
- :tableHeader="tableHeader"
- :bizScene="formData.bizType"
- :type="[selectEquiType]"
- :loadTree.sync="loadTree"
- @selectTableData="onSelectTableData"
- />
- <WareHouseDailog
- ref="wareHouseDailogRef"
- @houseData="houseData"
- ></WareHouseDailog>
- <ReturnSelect
- ref="returnSelectRef"
- :tableHeader="tableHeader"
- :curDateType="curDateType"
- ></ReturnSelect>
- <el-dialog :visible.sync="dateVisible" title="选择日期" width="400px">
- <el-date-picker
- size="small"
- v-model="batchTime"
- type="datetime"
- style="width: 320px"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择日期"
- >
- </el-date-picker>
- <div style="text-align: right; margin-top: 20px">
- <el-button @click="dateVisible = false">取消</el-button>
- <el-button type="primary" @click="dateConfirm" :disabled="!batchTime"
- >确认</el-button
- >
- </div>
- </el-dialog>
- <!-- 销售订单 -->
- <picker ref="pickerRef" @success="pickerSuccess" />
- </div>
- </template>
- <script>
- import { approveTaskWithVariables } from '@/api/bpm/task';
- import { getProductList } from '@/api/bpm/components/saleManage/contact';
- import { getLoginUser } from '@/api/login';
- import picker from '@/views/bpm/stockManagement/components/picker.vue';
- import outin from '@/api/warehouseManagement/outin';
- import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
- import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
- import selectUpload from '@/components/selectUpload';
- import upload from '@/components/uploadImg';
- import {
- warehousingType,
- sceneState,
- emergencyState,
- materialType
- } from '@/utils/dict/index';
- // import { getInfo, warehousingAdd, getAssetNum } from '@/api/stockManagement';
- import selectTree from '@/components/selectTree';
- import selectType from '@/views/bpm/stockManagement/components/selectType.vue';
- import WareHouseDailog from '@/views/bpm/stockManagement/components/WareHouseDailog.vue';
- import ReturnSelect from '@/views/bpm/stockManagement/components/ReturnSelect.vue';
- // import supplier from '@/api/main/supplier';
- // import org from '@/api/main/org';
- // import user from '@/api/main/user';
- import { tableHeader } from '@/views/bpm/handleTask/components/inoutBound/common';
- import { getCode } from '@/api/codeManagement/index.js';
- import { number } from 'echarts/core';
- // import { purchaseorderGetById, contactlink } from '@/api/mes';
- import { getReceiveSaleOrderrecordDetail } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
- export default {
- components: {
- selectUpload,
- selectTree,
- selectType,
- WareHouseDailog,
- upload,
- ReturnSelect,
- picker
- },
- data() {
- return {
- showMaterialTable: true, // 缓存包装明细列表
- isSplit: false, // 是否拆分到物料明细
- qualityStatus: {
- 0: '未检',
- 1: '已检',
- 2: '部分检'
- }, // 质检状态 0未检 1已检
- qualityResults: {
- 0: '合格',
- 1: '不合格',
- 3: '让步接收'
- }, // 质检结果 0合格 1不合格 3让步接收
- isTask: false,
- isWeight: true,
- resultArray: [],
- isDetail: false,
- contactList: [],
- pickerRow: {},
- fromUserList: [],
- codeList: [],
- materialType,
- warehousingType,
- sceneState,
- emergencyState,
- saveLoading: false,
- visibleDialog: false,
- curDateType: 'manufactureTime',
- materialCodeReqListSelected: [],
- // warehouseList: [], //仓库数组
- // warehouse: {},
- title: '',
- tableData2: [],
- uploadList: [],
- supplierList: [],
- warehousingMaterialList: [],
- activeName: 'a',
- loadTree: true,
- selectEquiType: '',
- batchTime: '',
- dateVisible: false,
- treeList: [],
- staffList: [],
- formData: {
- extInfo: {
- assetType: '', //物品类型
- deptCode: '', //部门code
- deptName: '', //部门名称
- verifyDeptCode: '', //审核部门编码
- verifyDeptName: '', //审核部门名称
- deliveryName: '', //送货人名称
- deliveryPhone: '', //送货人电话
- documentSource: '', //销售订单
- urgent: '', //紧急状态
- supplierId: '', //供应商ID
- supplierName: '', //供应商名称
- createUserName: '', //创建人名字
- contentImage: [] //图片数组
- },
- fromUser: '', //送货人
- bizType: '', //物品类型
- verifyId: '', //审核人Id
- verifyName: '', //审核人名称
- createUserId: '',
- remark: ''
- },
- rules: {
- 'extInfo.assetType': {
- required: true,
- message: '请选择物品类型',
- trigger: 'change'
- },
- bizType: {
- required: true,
- message: '请选择入库场景',
- trigger: 'change'
- }
- }
- };
- },
- computed: {
- // 条码信息
- materialCodeReqList() {
- return this.warehousingMaterialList
- .map((i) => i.warehouseLedgerDetails || [])
- .flat();
- },
- tableHeader() {
- return tableHeader(this.selectEquiType);
- }
- },
- created() {
- if (this.$route.query.id) {
- // this._getInfo()
- } else {
- let obj = localStorage.getItem('orgInfo')
- ? JSON.parse(localStorage.getItem('orgInfo'))
- : {};
- this.formData.createUserName = obj.name;
- this.formData.extInfo.deptName = obj.dept?.name;
- this.formData.deptCode = obj.dept?.code;
- }
- this.initData();
- },
- methods: {
- // 包装维度最小包装单元改变——>总重量
- minPackingCountChange(row, value) {
- row.minPackingCount = value.replace(/^(0+)|[^\d]+/g, '');
- if (row.outInNum >= 0 && value >= 0) {
- this.packNum(row, row.outInNum);
- }
- },
- // 选择质检结果改变质检状态
- changeWrapStatus(resultValue, row) {
- switch (resultValue) {
- case '':
- // 清空质检状态
- row.status = '0';
- break;
- default:
- // 默认已检质检状态
- row.status = '1';
- break;
- }
- },
- cancel() {
- this.$emit('cancel');
- },
- weightInput(value, row) {
- const newValue = value.replace(/[^\d.]/g, ''); // 保留数字和小数点
- const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
- if (decimalCount > 1) {
- // 如果小数点个数大于1,移除多余的小数点
- const lastIndex = newValue.lastIndexOf('.');
- row.weight =
- newValue.slice(0, lastIndex) + newValue.slice(lastIndex + 1);
- } else if (decimalCount === 1) {
- // 如果小数点个数等于1,允许小数点的输入
- row.weight = newValue;
- } else {
- row.weight = newValue === '' ? 0 : parseFloat(newValue); // 如果输入为空,则设为0
- }
- },
- handleIsDetail(event) {
- this.isSplit = event;
- const list = this.materialCodeReqList;
- if (event) {
- let resultArray = [];
- list.forEach((item) => {
- // 包装维度改成已保存状态
- item.isPack = true;
- // 拆分物料维度并生成列表
- for (let i = 1; i <= Number(item.minPackingCount); i++) {
- resultArray.push({
- onlyCode: item.onlyCode,
- no: item.onlyCode + i.toString().padStart(4, '0'),
- assetCode: item.assetCode,
- assetName: item.assetName,
- batchNo: item.batchNo,
- minPackingCount: 1,
- measuringUnit: item.measuringUnit,
- materielCode: item.materielCode,
- clientCode: item.clientCode,
- weight: item.weight / Number(item.minPackingCount),
- weightUnit: item.weightUnit,
- engrave: item.engrave,
- result: item.result,
- status: item.status,
- isPack: false
- });
- }
- });
- this.resultArray = resultArray;
- // 批量修改包装明细
- this.isWeight = false;
- this.bulkEditingWrap();
- this.$nextTick(() => {
- this.isWeight = true;
- });
- } else {
- // 包装维度改成编辑状态
- list.forEach((item) => {
- item.isPack = false;
- });
- // 清空物料维度列表
- this.resultArray = [];
- }
- },
- //包装明细保存
- packCout(row) {
- //true保存==》反之
- if (!row.isPack) {
- row.isPack = true;
- const code = row.assetCode;
- const batchNo = row.batchNo;
- //做防护,防止weight字符串类型
- this.materialCodeReqList.forEach((ele) => {
- ele.weight = Number(ele.weight);
- });
- // const count = this.materialCodeReqList.reduce(
- // (acc, curr) => acc + curr.weight,
- // 0
- // );
- // 修改产品信息重量(包装维度累计)
- this.isWeight = false;
- this.warehousingMaterialList.forEach((item) => {
- if (item.assetCode == code && item.batchNo == batchNo) {
- let arr = [];
- for (const key in this.materialCodeReqList) {
- if (
- this.materialCodeReqList[key].assetCode == item.assetCode &&
- this.materialCodeReqList[key].batchNo == item.batchNo
- ) {
- arr.push({ ...this.materialCodeReqList[key] });
- }
- }
- const count = arr.reduce(
- (acc, curr) =>
- Number(this.$math.format(+acc + +curr.weight, 14)),
- 0
- );
- this.$set(item, 'weight', count);
- }
- });
- this.$nextTick(() => {
- this.isWeight = true;
- });
- } else {
- row.isPack = false;
- }
- // setTimeout(() => {
- // }, 100);
- },
- // 批量修改包装明细
- bulkEditingWrap() {
- // 批量修改包装明细列表状态(已保存)
- this.materialCodeReqList.forEach((item) => {
- item.isPack = true;
- });
- // 改变产品明细重量
- this.warehousingMaterialList.forEach((outItem) => {
- let arr = [];
- this.materialCodeReqList.forEach((inneritem) => {
- if (
- inneritem.assetCode == outItem.assetCode &&
- inneritem.batchNo == outItem.batchNo
- ) {
- arr.push(inneritem);
- }
- });
- const count = arr.reduce(
- (acc, curr) => Number(this.$math.format(+acc + +curr.weight, 14)),
- 0
- );
- this.$set(outItem, 'weight', count);
- });
- },
- // 批量修改物料明细
- bulkEditingMaterial() {
- // 批量修改物料明细列表状态(已保存)
- this.resultArray.forEach((item) => {
- item.isPack = true;
- });
- // 改变包装明细重量
- this.materialCodeReqList.forEach((outItem) => {
- let arr = [];
- this.resultArray.forEach((inneritem) => {
- if (
- inneritem.assetCode == outItem.assetCode &&
- inneritem.batchNo == outItem.batchNo
- ) {
- arr.push(inneritem);
- }
- });
- const count = arr.reduce(
- (acc, curr) => Number(this.$math.format(+acc + +curr.weight, 14)),
- 0
- );
- this.$set(outItem, 'weight', count);
- });
- },
- // 物料明细保存
- materialBtn(row) {
- console.log(row);
- console.log(this.resultArray);
- console.log(this.materialCodeReqList);
- // true保存 false编辑
- if (!row.isPack) {
- row.isPack = true;
- // 物料维度修改质检改变包装维度质检(结果和状态)
- this.materialCodeReqList.forEach((outItem) => {
- let arr = [];
- this.resultArray.forEach((inneritem) => {
- if (inneritem.onlyCode == outItem.onlyCode) {
- arr.push(inneritem);
- }
- });
- console.log(arr);
- // 首先判断是未填/合格不合格
- let boolen = arr.every((item) => {
- return item.result === '' || item.result === undefined;
- });
- // 判断只要物料全部质检结果(未填)——>包装质检结果(未填) 状态(未检)
- if (boolen) {
- this.$set(outItem, 'result', '');
- this.$set(outItem, 'status', '0');
- } else {
- // 判断只要物料有一个质检结果(不合格)——>包装质检结果(不合格) 状态(已检)
- let boolen = arr.some((item) => {
- return item.result === '1';
- });
- if (boolen) {
- this.$set(outItem, 'result', '1');
- this.$set(outItem, 'status', '1');
- } else {
- // 判断只要物料有一个质检结果(让步接收)——>包装质检结果(让步接收) 状态(已检)
- let boolen = arr.some((item) => {
- return item.result === '3';
- });
- if (boolen) {
- // 让步接收 已检
- this.$set(outItem, 'result', '3');
- this.$set(outItem, 'status', '1');
- } else {
- // 判断只要物料有全部质检结果(合格)——>包装质检结果(合格) 状态(已检)
- let boolen = arr.every((item) => {
- return item.result === '0';
- });
- if (boolen) {
- // 合格 已检
- this.$set(outItem, 'result', '0');
- this.$set(outItem, 'status', '1');
- } else {
- // 合格 部分检
- this.$set(outItem, 'result', '0');
- this.$set(outItem, 'status', '2');
- }
- }
- }
- }
- // this.$set(outItem, 'result', boolen ? '1' : '0');
- });
- // 物料维度修改重量改变包装维度重量
- let onlyCode = row.onlyCode;
- this.materialCodeReqList.forEach((item) => {
- if (item.onlyCode === onlyCode) {
- let arr = [];
- for (const key in this.resultArray) {
- if (this.resultArray[key].onlyCode == item.onlyCode) {
- arr.push({ ...this.resultArray[key] });
- }
- }
- const count = arr.reduce(
- (acc, curr) =>
- Number(this.$math.format(+acc + +curr.weight, 14)),
- 0
- );
- this.$set(item, 'weight', count);
- }
- });
- // 包装维度修改重量改变产品信息
- this.isWeight = false;
- // 批量修改包装明细
- this.bulkEditingWrap();
- this.$nextTick(() => {
- this.isWeight = true;
- });
- } else {
- row.isPack = false;
- }
- },
- packNum(row, value) {
- const total = {
- packingCount: Number(row.minPackingCount),
- outInNum: Number(row.outInNum)
- };
- if (row.measuringUnit == row.weightUnit) {
- row.weight = Number(
- this.$math.format(
- total.packingCount * 1 * total.outInNum.toFixed(2),
- 14
- )
- );
- } else {
- const totals = Number(
- this.$math.format(total.packingCount * total.outInNum, 14)
- );
- row.weight = Number(
- this.$math.format(totals * row.netWeight.toFixed(2), 14)
- );
- }
- return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
- },
- async searchContact(id) {
- const data = await contactlink({ contactId: id });
- this.contactList = data.data;
- },
- async pickerSuccess(row) {
- this.formData.bizType = '2';
- this.codeListValue(row.categoryLevelTopId);
- this.isTask = true;
- this.pickerRow = row;
- this.formData.extInfo.documentSource = row.orderNo;
- this.formData.sourceBizNo = row.receiveNo;
- this.formData.fromId = row.id;
- this.formData.clientName = row.partaName;
- this.formData.clientCode = row.partaId;
- this.formData.extInfo.supplierName = row.supplierName;
- this.formData.extInfo.supplierId = row.supplierId;
- // await this.searchContact(row.partbId);
- const data = await getReceiveSaleOrderrecordDetail(row.id);
- if (this.warehousingMaterialList.length == 0) {
- let list = data.productList.map((item) => {
- return {
- ...item,
- assetName: item.productName,
- assetCode: item.productCode,
- categoryId: item.productCategoryId,
- minPackUnit: item.packingUnit
- };
- });
- this.onSelectTableData(await this.serachMainCode(list));
- }
- },
- async serachMainCode(arr) {
- let newArr = [];
- // 使用 Promise.all 来等待所有异步操作完成
- await Promise.all(
- arr.map(async (item) => {
- const data = await getProductList({
- pageNum: 1,
- size: 10,
- categoryLevelId: item.categoryLevelPathIdParent,
- code: item.assetCode
- });
- newArr.push(data.list); // 将结果存储到 newArr 中
- })
- );
- let re = [];
- for (const item of newArr) {
- for (const it of item) {
- re.push(it);
- }
- }
- return re.map((item) => {
- return {
- ...item,
- minPackUnit: item.packingUnit,
- assetCode: item.code,
- assetName: item.name
- };
- });
- },
- onClear() {
- this.formData.extInfo.documentSource = '';
- this.pickerRow = {};
- this.formData.clientName = '';
- this.formData.clientCode = '';
- this.formData.extInfo.supplierName = '';
- this.formData.extInfo.supplierId = '';
- this.$forceUpdate();
- },
- handlePicker() {
- this.$refs.pickerRef.open();
- },
- codeListValue(val) {
- this.formData.extInfo.assetType = val.id || val;
- this.$forceUpdate();
- this.title = val?.name;
- this.selectEquiType = val?.id || val;
- },
- //计算生产设备重量
- deviceWeight(row, num) {
- if (row) {
- return Number(row * num);
- } else {
- return row;
- }
- },
- //计算金额
- calcSumTotal(PackingCount, outInNum, univalence) {
- //最小包装单元,包装数量,单价
- const total = {
- PackingCount: Number(PackingCount),
- outInNum: Number(outInNum),
- univalence: Number(univalence == undefined ? 0 : univalence)
- };
- return total.PackingCount * total.outInNum * total.univalence;
- },
- handleRowUnit(row) {
- return row.measuringUnit;
- // if (this.formData.extInfo.assetType == 1) {
- // return row.weightUnit;
- // } else if (this.formData.extInfo.assetType == 4) {
- // return row.measuringUnit;
- // } else {
- // return row.measuringUnit;
- // }
- },
- changeVerfy(it) {
- this.formData.verifyName = it.name;
- },
- //选择供应啥的操作
- ChangeSupplier(data) {
- this.formData.extInfo.supplierName = data.dictValue;
- },
- ChangeSuppliers(data) {
- this.formData.clientName = data.dictValue;
- },
- rowClass({ row, column, rowIndex, columnIndex }) {
- if (rowIndex === 1) {
- return {
- display: 'none',
- background: '#EEEEEE',
- border: 'none'
- };
- }
- return { background: '#EEEEEE', border: 'none' };
- },
- calcSum(a, b, c, row) {
- if (
- (Number.isNaN(+a) && a !== '') ||
- (Number.isNaN(+b) && b !== '') ||
- (Number.isNaN(+c) && c !== '')
- ) {
- return '';
- }
- return a * b * c + { yuan: '元', wanyuan: '万元' }[row.univalenceUnit];
- // return a * b * c;
- },
- // 部门 点击事件
- async auditorDeptClick(data) {
- this.formData.extInfo.verifyDeptCode = data?.id;
- this.formData.extInfo.verifyDeptName = data?.name;
- this.formData.verifyId = '';
- this.formData.verifyName = '';
- this.$refs.formName.validateField('verifyDeptName');
- if (data) {
- this.getStaffList(data);
- }
- },
- async getStaffList(data) {
- let res = await warehouseDefinition.getUserPage({
- groupId: data.id,
- size: 9999,
- page: 1
- });
- this.staffList = res.list;
- },
- // 详情接口
- // async _getInfo () {
- // const res = await getInfo({ id: this.$route.query.id })
- // if (res?.success) {
- // this.warehousingMaterialList = res.data.warehouseLedgerInfos.map(i => {
- // i.isSave = true
- // return i
- // })
- // this.formData = res.data.outInWarehouse
- // this.uploadList = this.formData.contentImage
- // }
- // },
- chooseAssets(row, index) {
- this.$refs.returnSelectRef.open(row, (res) => {
- row.outInNum = res.length;
- this.$set(
- row,
- 'selfWarehouseLedgerDetails',
- res.map((i) => {
- delete i.updateTime;
- delete i.createTime;
- return i;
- })
- );
- });
- },
- // 仓库编辑
- handleWareHouse(row, idx) {
- this.$refs.wareHouseDailogRef.open(row, idx);
- },
- // 入库操作
- listEdit(row) {
- this.$set(row, 'isSave', false);
- row.selfWarehouseLedgerDetails = row.warehouseLedgerDetails;
- row.warehouseLedgerDetails = [];
- // 清空物料明细防止数据错乱
- this.resultArray = [];
- this.isDetail = false;
- },
- listSave(row, index) {
- const fileds = [
- // `warehousingMaterialList.${index}.cargoSpaceCode`,
- `warehousingMaterialList.${index}.batchNo`,
- `warehousingMaterialList.${index}.houseList`
- ];
- if (this.formData.bizType == 1) {
- // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
- } else if (this.formData.bizType == 2) {
- // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
- }
- if (this.formData.bizType != 5) {
- fileds.push(
- ...[
- `warehousingMaterialList.${index}.outInNum`,
- `warehousingMaterialList.${index}.minPackingCount`
- ]
- );
- } else if (
- this.warehousingMaterialList.some(
- (i) => !i.selfWarehouseLedgerDetails?.length
- )
- ) {
- this.$message.error('请选择资产编号!');
- return;
- }
- Promise.all(
- fileds.map(
- (item) =>
- new Promise(async (resolve, rej) => {
- this.$refs.warehousingMaterialListRef.validateField(
- item,
- (err) => {
- if (err) {
- rej(err);
- } else {
- resolve();
- }
- }
- );
- })
- )
- )
- .then((res) => {
- this.$set(row, 'isSave', true);
- if (this.formData.bizType != 5) {
- this.createMaterialCode(row);
- } else {
- // 退还
- this.createMaterialCodeReturn(row);
- }
- })
- .catch((err) => {
- this.$message.error('请填入必填项!');
- });
- },
- listSaveArrs() {
- const rows = this.warehousingMaterialList;
- const indexes = Array.from(
- { length: this.warehousingMaterialList.length },
- (_, index) => index
- );
- rows.forEach((row, i) => {
- const index = indexes[i];
- const fileds = [
- // `warehousingMaterialList.${index}.cargoSpaceCode`,
- `warehousingMaterialList.${index}.batchNo`,
- `warehousingMaterialList.${index}.houseList`
- ];
- if (this.formData.bizType == 1) {
- // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
- } else if (this.formData.bizType == 2) {
- // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
- }
- if (this.formData.bizType != 5) {
- fileds.push(
- ...[
- `warehousingMaterialList.${index}.outInNum`,
- `warehousingMaterialList.${index}.minPackingCount`
- ]
- );
- } else if (
- this.warehousingMaterialList.some(
- (i) => !i.selfWarehouseLedgerDetails?.length
- )
- ) {
- this.$message.error('请选择资产编号!');
- return;
- }
- Promise.all(
- fileds.map(
- (item) =>
- new Promise(async (resolve, rej) => {
- this.$refs.warehousingMaterialListRef.validateField(
- item,
- (err) => {
- if (err) {
- rej(err);
- } else {
- resolve();
- }
- }
- );
- })
- )
- )
- .then((res) => {
- this.$set(row, 'isSave', true);
- if (this.formData.bizType != 5) {
- this.createMaterialCode(row);
- } else {
- // 退还
- this.createMaterialCodeReturn(row);
- }
- })
- .catch((err) => {
- // this.$message.error('请填入必填项!');
- });
- });
- },
- // listSaveArrs() {
- // console.log(this.warehousingMaterialList);
- // },
- // 批量设置生产日期
- handleSelectionChange(val) {
- this.materialCodeReqListSelected = val;
- },
- dateSetting() {
- if (!this.materialCodeReqListSelected.length) {
- return this.$message.error(`请选择${this.title}明细!`);
- }
- this.dateVisible = true;
- },
- dateConfirm() {
- this.materialCodeReqListSelected.forEach((item) => {
- this.$set(item, this.curDateType, this.batchTime);
- });
- this.dateVisible = false;
- },
- //入库明细删除
- listDel(row, index) {
- this.warehousingMaterialList.splice(index, 1);
- this.resultArray = [];
- this.isDetail = false;
- },
- // 入库明细生成条码信息
- async createMaterialCode(row) {
- // 添加相同物品、批次号重新更新明细 原料编码
- const list = this.warehousingMaterialList.filter(
- (i) =>
- i.assetCode === row.assetCode &&
- i.batchNo === row.batchNo &&
- i.isSave
- );
- const num = list.reduce((num, pre) => {
- num += row.isUnpack
- ? pre.outInNum * pre.minPackingCount
- : pre.outInNum - 0;
- return num;
- }, 0);
- const nums = list.reduce((num, pre) => {
- num += pre.outInNum * pre.minPackingCount;
- return num;
- }, 0);
- const res = await outin.getAssetNum({
- assetCode: row.assetCode,
- batchNum: row.batchNo,
- num: num
- });
- // row.measuringUnit == 'PCS' ? nums :
- list.forEach((item) => {
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach((i) => {
- i.onlyCode = res.shift().onlyCode;
- });
- } else {
- this.$set(
- item,
- 'warehouseLedgerDetails',
- Array.from(
- new Array(
- item.isUnpack
- ? item.outInNum * item.minPackingCount
- : // : item.measuringUnit == 'PCS'
- // ? +item.outInNum * parseInt(item.minPackingCount)
- +item.outInNum
- ),
- (val, idx) => {
- return {
- ...item,
- onlyCode: res.shift().onlyCode,
- bizStatus: 1,
- contentImage: []
- };
- }
- )
- );
- }
- });
- // 添加相同物品,重复批次号 重新更新明细 包装编码
- const batchList = this.warehousingMaterialList.filter(
- (i) => i.batchNo === row.batchNo && i.isSave
- );
- if (batchList.length) {
- const num = batchList.reduce((num, pre) => {
- num += +pre.outInNum;
- return num;
- }, 0);
- const res1 = await outin.getAssetNum({
- batchNum: row.batchNo,
- num
- });
- if (res1) {
- batchList.forEach((item) => {
- let num = res1.shift()?.num;
- let minPackingCount = item.minPackingCount;
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach((i, index) => {
- this.$set(i, 'num', num);
- if (item.measuringUnit == item.weightUnit) {
- this.$set(i, 'weight', item.minPackingCount);
- } else {
- this.$set(
- i,
- 'weight',
- typeof 1 * item.minPackingCount * item.netWeight ===
- number
- ? 1
- : 1 * item.minPackingCount * item.netWeight
- );
- }
- this.$set(i, 'weightUtil', item.weightUnit);
- this.$set(i, 'packingCount', 1);
- this.$set(i, 'packingUnit ', item.packingUnit);
- this.$set(i, 'minPackingCount ', item.minPackingCount);
- this.$set(i, 'measuringUnit', item.measuringUnit);
- this.$set(i, 'isPack', false);
- if (this.formData.extInfo.assetType == 1) {
- this.$set(i, 'status', '0');
- } else {
- this.$set(i, 'result', '0');
- this.$set(i, 'status', '1');
- }
- if (!item.isUnpack) {
- if (index < item.warehouseLedgerDetails.length - 1) {
- num = res1.shift()?.num;
- }
- } else {
- // 拆包的包装编码一致
- minPackingCount--;
- if (
- minPackingCount === 0 &&
- index < item.warehouseLedgerDetails.length - 1
- ) {
- minPackingCount = item.minPackingCount;
- num = res1.shift()?.num;
- }
- }
- });
- }
- });
- }
- }
- },
- // 入库明细生成条码信息 退还
- async createMaterialCodeReturn(row) {
- // 添加相同物品重新更新明细 原料编码
- const list = this.warehousingMaterialList.filter(
- (i) => i.batchNo === row.batchNo && i.isSave
- );
- // 退还
- const res = await getAssetNum({
- batchNo: row.batchNo,
- num: list.reduce((num, pre) => {
- num += pre.selfWarehouseLedgerDetails.length;
- return num;
- }, 0)
- });
- if (res?.success) {
- list.forEach((item) => {
- let num = res.data.shift().num;
- let minPackingCount = item.minPackingCount;
- if (item.warehouseLedgerDetails?.length) {
- item.warehouseLedgerDetails.forEach((i, index) => {
- Object.assign(i, {
- num,
- batchNo: item.batchNo,
- cargoSpaceCode: item.cargoSpaceCode, //货位编码
- cargoSpaceId: item.cargoSpaceId, //货位id
- shelfId: item.shelfId, //货架id
- shelfCode: item.shelfCode, //货架名称
- areaId: item.areaId, //库区id
- areaName: item.areaName, //库区名称
- warehouseId: item.warehouseId, //仓库id
- warehouseName: item.warehouseName //仓库名称
- });
- if (!item.isUnpack) {
- // 拆包的包装编码一致
- if (index < item.warehouseLedgerDetails.length - 1) {
- num = res.data.shift()?.num;
- }
- } else {
- minPackingCount--;
- if (
- minPackingCount === 0 &&
- index < item.warehouseLedgerDetails.length - 1
- ) {
- minPackingCount = item.minPackingCount;
- num = res1.data.shift()?.num;
- }
- }
- });
- } else {
- this.$set(
- item,
- 'warehouseLedgerDetails',
- item.selfWarehouseLedgerDetails.map((val, idx) => {
- let obj = {
- ...val,
- bizStatus: 1,
- minPackingCount: item.minPackingCount,
- batchNo: item.batchNo,
- cargoSpaceCode: item.cargoSpaceCode, //货位编码
- cargoSpaceId: item.cargoSpaceId, //货位id
- shelfId: item.shelfId, //货架id
- shelfCode: item.shelfCode, //货架名称
- areaId: item.areaId, //库区id
- areaName: item.areaName, //库区名称
- warehouseId: item.warehouseId, //仓库id
- warehouseName: item.warehouseName, //仓库名称
- materialId: item.materialId,
- num
- };
- if (!item.isUnpack) {
- // 拆包的包装编码一致
- if (idx < item.warehouseLedgerDetails.length - 1) {
- num = res.data.shift()?.num;
- }
- } else {
- minPackingCount--;
- if (
- minPackingCount === 0 &&
- idx < item.warehouseLedgerDetails.length - 1
- ) {
- minPackingCount = item.minPackingCount;
- num = res1.data.shift()?.num;
- }
- }
- return obj;
- })
- );
- }
- });
- }
- },
- // 包装批量保存
- wrapListSave() {
- // 批量修改包装明细
- this.isWeight = false;
- this.bulkEditingWrap();
- this.$nextTick(() => {
- this.isWeight = true;
- });
- },
- // 物料批量保存
- materialListSave() {
- this.resultArray.forEach((item) => {
- if (!item.isPack) {
- this.materialBtn(item);
- }
- });
- },
- handleSave(data) {
- this.$refs.formName.validate(async (valid) => {
- if (valid) {
- if (!this.warehousingMaterialList?.length) {
- return this.$message.error('请添加入库明细!');
- } else if (
- this.warehousingMaterialList.some((item) => !item.isSave)
- ) {
- return this.$message.error('请保存入库明细!');
- }
- // 默认全部保存
- if (this.resultArray?.length > 0) {
- // 物料批量保存
- this.materialListSave();
- } else {
- // 包装批量保存
- this.wrapListSave();
- }
- this.formatWarehouseMaterialList();
- let arr = this.warehousingMaterialList.map((item) => {
- console.log(item, 'item');
- return {
- netWeight: item.netWeight,
- num: item.num,
- batchNo: item.batchNo,
- code: item.productCode,
- categoryId:
- this.formData.bizType == 2
- ? item.categoryId
- ? item.categoryId
- : item.id
- : item.id,
- count: parseInt(item.outInNum) * parseInt(item.minPackingCount),
- minPackingCount: item.minPackingCount,
- packingCount: item.outInNum,
- price: item.univalence,
- outInDetailRecordAddPOList: item.warehouseLedgerDetails,
- position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
- remark: '',
- pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
- pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
- totalMoney:
- item.outInNum * item.minPackingCount * item.univalence,
- weightUnit: item.weightUnit,
- customCode: item.customCode,
- supplierCode: item.supplierCode,
- weight: item.weight
- };
- });
- arr.forEach((item) => {
- if (item.outInDetailRecordAddPOList.length > 0) {
- let list = item.outInDetailRecordAddPOList.map((it) => {
- return this.formatOutInDetailRecordAddPO(it, item);
- });
- item.outInDetailRecordAddPOList = list;
- }
- });
- let obj = { ...this.formData, type: 1 };
- obj.outInDetailAddPOList = arr;
- this.saveLoading = true;
- // 入库来源storageSource 0-正常 1-外部
- obj.storageSource = 1;
- try {
- const res = await outin.save(obj);
- if (res.code == 0) {
- approveTaskWithVariables(data).then((res) => {
- console.log(res);
- if (res.data.code == 0) {
- this.$message.success('保存成功!');
- this.$emit('success');
- }
- });
- // await outin.outApproves({ outInId: res.data });
- // this.$message.success('保存成功!');
- // this.$emit('success');
- }
- } catch (error) {
- console.error('保存失败:', error);
- }
- this.saveLoading = false;
- // this.$router.push('/warehouseManagement/stockManagement');
- }
- });
- },
- formatWarehouseMaterialList() {
- for (let key in this.warehousingMaterialList) {
- for (let k in this.warehousingMaterialList[key].houseList) {
- let house = this.warehousingMaterialList[key].houseList[k];
- this.warehousingMaterialList[key].warehouseName =
- house.warehouseName;
- this.warehousingMaterialList[key].areaName = house.areaName;
- this.warehousingMaterialList[key].shelfCode = house.shelfCode;
- this.warehousingMaterialList[key].cargoSpaceCode =
- house.cargoSpaceCode;
- this.warehousingMaterialList[key].warehouseId = house.warehouseId;
- this.warehousingMaterialList[key].areaId = house.areaId;
- this.warehousingMaterialList[key].shelfId = house.shelfId;
- this.warehousingMaterialList[key].cargoSpaceId = house.cargoSpaceId;
- this.warehousingMaterialList[key].num = house.num;
- }
- }
- },
- formatOutInDetailRecordAddPO(it, item) {
- return {
- code: it.onlyCode,
- dateType: this.curDateType === 'manufactureTime' ? 2 : 1,
- dateValue: it[this.curDateType],
- minUnit: it.minPackingCount,
- minPositionId: it.cargoSpaceId,
- minPackingCount: it.minPackingCount,
- name: it.assetName,
- pathIds: item.pathIds,
- unit: it.unit,
- packageNo: it.num,
- clientCode: it.clientCode,
- materielCode: it.materielCode,
- weight: it.weight,
- weightUtil: it.weightUtil,
- engrave: it.engrave,
- materialDetails: this.materialDetails(it.onlyCode),
- packingCount: it.packingCount,
- status: it.status,
- result: it.result
- };
- },
- materialDetails(onlyCode) {
- return this.resultArray.filter((item) => item.onlyCode === onlyCode);
- },
- async getOrderCode() {
- const data = await getCode('in_warehouse');
- return data;
- },
- //添加明细
- async onSelectTableData(val) {
- console.log('===ssa', val);
- const res = await getCode('lot_number_code');
- this.warehousingMaterialList.push(
- ...val.map((next) => {
- next.batchNo = res;
- let cur = {};
- next.realInventoryAmount = next.realInventoryAmount || 0;
- cur = {
- ...next,
- cargoSpaceCode: '', //货位编码
- cargoSpaceId: '', //货位id
- shelfId: '', //货架id
- shelfCode: '', //货架名称
- areaId: '', //库区id
- areaName: '', //库区名称
- warehouseId: '', //仓库id
- warehouseName: '', //仓库名称
- assetType: this.formData.extInfo.assetType,
- expirationDate: '',
- outInNum: '',
- minPackingCount: '',
- bizStatus: 1,
- contentImage: [],
- warehouseLedgerDetails: [],
- houseList: []
- };
- return cur;
- })
- );
- },
- async initData() {
- const { data } = await getTreeByGroup({ type: 1 });
- this.codeList = data;
- // .map((item) => {
- // return { dictCode: item.id, dictValue: item.name };
- // });
- const res = await warehouseDefinition.tree();
- this.treeList = this.$util.toTreeData({
- data: res,
- idField: 'id',
- parentIdField: 'parentId'
- });
- // const res111 = await warehouseDefinition.list();
- // this.warehouseList = res111.list;
- let res22 = await warehouseDefinition.getUserPage({
- size: -1,
- page: 1
- });
- this.fromUserList = res22.list;
- const info = await getLoginUser();
- // const info = JSON.parse(localStorage.getItem('info'));
- let obj = res.find(
- (item) => item.id === info.deptId[info.deptId.length - 1]
- );
- if (!obj) return;
- this.formData.extInfo.deptCode = obj.id;
- this.formData.extInfo.deptName = obj.name;
- this.formData.extInfo.createUserName = info.name;
- this.formData.createUserId = info.id;
- // this.treeList = res;
- // this.formData.extInfo.deptCode =
- // this.getTreeList().then((res) => {
- // if (res?.success) {
- // this.treeList = res.data;
- // }
- // });
- // this.getSupplier().then((res) => {
- // if (res?.success) {
- // this.supplierList = res.data.items;
- // }
- // });
- // this.getStaffList();
- },
- addStock() {
- // this.$refs.wareHouseDailogRef.open({});
- // return;
- if (!this.title) return this.$message.error('请选择入库产品类型');
- if (!this.formData.bizType)
- return this.$message.error('请选择入库场景');
- this.visibleDialog = true;
- },
- handleChange(data) {
- this.title = data?.dictValue;
- this.selectEquiType = data?.dictCode;
- },
- handleChanges(code) {
- const data = this.codeList.find((item) => item.dictCode == code);
- this.title = data?.dictValue;
- this.selectEquiType = data?.dictCode;
- },
- getSupplier() {
- return new Promise((resolve, reject) => {
- supplier.list({ page: 1, size: 999 }).then((res) => {
- if (res.success) {
- resolve(res);
- }
- });
- });
- },
- getTreeList() {
- return new Promise((resolve, reject) => {
- org.tree().then((res) => {
- if (res.success) {
- resolve(res);
- }
- });
- });
- },
- upload(data) {
- this.formData.contentImage = data;
- this.$refs.formName.validateField('contentImage');
- },
- houseData(argum, idx) {
- this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
- }
- },
- watch: {
- // 解决右侧悬浮操作栏不对称问题
- warehousingMaterialList: {
- handler() {
- this.$nextTick(() => {
- this.$refs.warehousingMaterialListTable.doLayout();
- });
- },
- deep: true
- },
- // 解决右侧悬浮操作栏不对称问题
- materialCodeReqList: {
- handler() {
- this.$nextTick(() => {
- this.$refs.materialCodeReqListTable.doLayout();
- });
- },
- deep: true
- },
- // 解决右侧悬浮操作栏不对称问题
- resultArray: {
- handler() {
- this.$nextTick(() => {
- this.$refs.resultArrayTable.doLayout();
- });
- },
- deep: true
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep.form-table {
- .el-form-item {
- margin-bottom: 0;
- }
- .el-input__inner {
- padding: 0 10px;
- }
- ::-webkit-scrollbar {
- width: 8px;
- height: 8px;
- background-color: transparent;
- }
- }
- .p20 {
- padding: 20px;
- }
- .el-select,
- .el-date-editor {
- width: 100%;
- }
- .el-form-item {
- margin-bottom: 22px;
- }
- .material {
- margin-top: 20px;
- .flex {
- display: flex;
- justify-content: space-between;
- font-size: 14px;
- align-items: center;
- .red {
- color: #ff4949;
- }
- }
- }
- .mt10 {
- margin-top: 10px;
- }
- .mt20 {
- margin-top: 20px;
- }
- .center {
- text-align: center;
- }
- .switch_left li {
- border-right: 1px solid rgba(222, 222, 222, 1);
- border-left: 1px solid rgba(222, 222, 222, 1);
- }
- .fontOmitted {
- text-overflow: ellipsis;
- overflow: hidden;
- word-break: break-all;
- white-space: nowrap;
- }
- .table-fixed {
- .el-table__fixed-right {
- height: 100% !important;
- }
- .el-table__fixed-left {
- height: 100% !important;
- }
- .el-table__fixed {
- height: 100% !important;
- }
- }
- </style>
|