add.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486
  1. <template>
  2. <div id="inventoryAllocate">
  3. <el-card class="box-card">
  4. <header-title title="基本信息"></header-title>
  5. <el-form label-width="65px" label-position="left" class="ele-form-search">
  6. <el-row :gutter="15">
  7. <el-col :span="8" class="col_height">
  8. <el-form-item label="调拨编码:" prop="code">
  9. <template>
  10. <el-input :disabled="true" v-model="params.code"></el-input>
  11. </template>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :span="8" class="col_height">
  15. <el-form-item label="调拨类型:" prop="warehouseId">
  16. <template>
  17. <el-select
  18. :disabled="isEdit"
  19. @change="allocateChange"
  20. style="width: 100%"
  21. v-model="allocateId"
  22. placeholder="请选择"
  23. >
  24. <el-option
  25. v-for="item in allocationType"
  26. :label="item.label"
  27. :value="item.code"
  28. :key="item.code"
  29. >
  30. </el-option>
  31. </el-select>
  32. </template>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :span="8" class="col_height">
  36. <el-form-item label="调拨名称:" prop="name">
  37. <template>
  38. <el-input
  39. :disabled="isEdit"
  40. v-model="params.name"
  41. placeholder="请输入内容"
  42. ></el-input>
  43. </template>
  44. </el-form-item>
  45. </el-col>
  46. </el-row>
  47. </el-form>
  48. <div class="productBox">
  49. <div class="productsList">
  50. <header-title title="调出明细"></header-title>
  51. <el-form
  52. label-position="left"
  53. class="ele-form-search"
  54. @keyup.enter.native="search"
  55. @submit.native.prevent
  56. >
  57. <el-row :gutter="10">
  58. <el-col :span="12">
  59. <el-form-item
  60. label-width="65px"
  61. label="所属工厂:"
  62. prop="factoryId"
  63. >
  64. <el-select
  65. :disabled="isEdit"
  66. style="width: 100%"
  67. @change="factoryChange"
  68. v-model="factoryId"
  69. placeholder="请选择工厂"
  70. >
  71. <el-option
  72. v-for="item in factoryList"
  73. :key="item.id"
  74. :label="item.name"
  75. :value="item.id"
  76. ></el-option>
  77. </el-select>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="12">
  81. <el-form-item
  82. label-width="65px"
  83. label="调出仓库:"
  84. prop="warehouseId"
  85. >
  86. <template>
  87. <el-select
  88. :disabled="isEdit"
  89. style="width: 100%"
  90. @change="outWarehouseChange"
  91. v-model="params.outWarehouseId"
  92. placeholder="请选择"
  93. >
  94. <el-option
  95. v-for="item in outTreeList"
  96. :disabled="item.hiden"
  97. :label="item.name"
  98. :value="item.id"
  99. :key="item.name"
  100. >
  101. </el-option>
  102. </el-select>
  103. </template>
  104. </el-form-item>
  105. </el-col>
  106. <el-col :span="8">
  107. <el-form-item
  108. label-width="65px"
  109. label="调出库区:"
  110. prop="outCargoAreaId"
  111. >
  112. <template>
  113. <el-select
  114. @change="outCargoAreaChange"
  115. style="width: 100%"
  116. v-model="params.outCargoAreaId"
  117. placeholder="请选择"
  118. >
  119. <el-option
  120. v-for="item in outCargoAreaList"
  121. :label="item.name"
  122. :value="item.id"
  123. :key="item.name"
  124. >
  125. </el-option>
  126. </el-select>
  127. </template>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :span="8">
  131. <el-form-item
  132. label-width="65px"
  133. label="调出货架:"
  134. prop="warehouseId"
  135. >
  136. <template>
  137. <el-select
  138. style="width: 100%"
  139. @change="outShelvesChange"
  140. v-model="params.outShelvesId"
  141. placeholder="请选择"
  142. >
  143. <el-option
  144. v-for="item in outShelvesList"
  145. :label="item.name"
  146. :value="item.id"
  147. :key="item.name"
  148. >
  149. </el-option>
  150. </el-select>
  151. </template>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="8">
  155. <el-form-item
  156. label-width="65px"
  157. label="调出货位:"
  158. prop="warehouseId"
  159. >
  160. <template>
  161. <el-select
  162. style="width: 100%"
  163. @change="outFreightIdChange"
  164. v-model="params.outFreightId"
  165. placeholder="请选择"
  166. >
  167. <el-option
  168. v-for="item in outFreightList"
  169. :label="item.name"
  170. :value="item.id"
  171. :key="item.name"
  172. >
  173. </el-option>
  174. </el-select>
  175. </template>
  176. </el-form-item>
  177. </el-col>
  178. </el-row>
  179. <el-row :gutter="15">
  180. <el-col :span="18">
  181. <el-input
  182. placeholder="请输入名称/编码/批次号/型号/规格/客户代号/刻码"
  183. v-model="query.keyWord"
  184. class="input-with-select"
  185. >
  186. <el-button
  187. slot="append"
  188. icon="el-icon-search"
  189. type="primary"
  190. @click="querySearch"
  191. >搜索</el-button
  192. >
  193. </el-input>
  194. </el-col>
  195. <el-col :span="6">
  196. <div
  197. style="
  198. display: flex;
  199. justify-content: flex-end;
  200. margin-bottom: 10px;
  201. "
  202. >
  203. <el-button
  204. @click="queryReset"
  205. icon="el-icon-refresh-left"
  206. size="small"
  207. type="primary"
  208. >重置</el-button
  209. >
  210. <el-button type="primary" @click="merge">调出</el-button>
  211. </div>
  212. </el-col>
  213. </el-row>
  214. </el-form>
  215. <el-table
  216. ref="table"
  217. :height="530"
  218. :data="productList"
  219. row-key="id"
  220. @selection-change="selecctedRow"
  221. tooltip-effect="dark"
  222. border
  223. >
  224. <el-table-column
  225. fixed="left"
  226. align="center"
  227. width="50"
  228. :reserve-selection="true"
  229. :selectable="checkSelectable"
  230. type="selection"
  231. ></el-table-column>
  232. <el-table-column label="序号" type="index" width="50">
  233. </el-table-column>
  234. <el-table-column
  235. label="物品编码"
  236. prop="categoryCode"
  237. :show-overflow-tooltip="true"
  238. ></el-table-column>
  239. <el-table-column
  240. label="物品名称"
  241. prop="categoryName"
  242. :show-overflow-tooltip="true"
  243. ></el-table-column>
  244. <el-table-column
  245. label="仓库"
  246. prop="warehouseName"
  247. :show-overflow-tooltip="true"
  248. >
  249. </el-table-column>
  250. <el-table-column
  251. label="库区"
  252. prop="areaName"
  253. :show-overflow-tooltip="true"
  254. >
  255. </el-table-column>
  256. <el-table-column
  257. label="货架"
  258. prop="goodsShelfName"
  259. :show-overflow-tooltip="true"
  260. >
  261. </el-table-column>
  262. <el-table-column
  263. label="货位"
  264. prop="goodsAllocationName"
  265. :show-overflow-tooltip="true"
  266. >
  267. </el-table-column>
  268. <el-table-column
  269. label="批次号"
  270. prop="batchNo"
  271. :show-overflow-tooltip="true"
  272. ></el-table-column>
  273. <el-table-column
  274. label="牌号"
  275. prop="brandNum"
  276. :show-overflow-tooltip="true"
  277. ></el-table-column>
  278. <el-table-column
  279. label="型号"
  280. prop="categoryModel"
  281. :show-overflow-tooltip="true"
  282. ></el-table-column>
  283. <el-table-column
  284. label="规格"
  285. prop="specification"
  286. :show-overflow-tooltip="true"
  287. ></el-table-column>
  288. <el-table-column
  289. label="包装编码"
  290. prop="packageNo"
  291. :show-overflow-tooltip="true"
  292. ></el-table-column>
  293. <el-table-column
  294. label="包装数量"
  295. prop="packingQuantity"
  296. :show-overflow-tooltip="true"
  297. ></el-table-column>
  298. <el-table-column
  299. label="包装单位"
  300. prop="packingUnit"
  301. :show-overflow-tooltip="true"
  302. ></el-table-column>
  303. <el-table-column
  304. label="计量数量"
  305. prop="measureQuantity"
  306. :show-overflow-tooltip="true"
  307. ></el-table-column>
  308. <el-table-column
  309. label="计量单位"
  310. prop="measureUnit"
  311. :show-overflow-tooltip="true"
  312. ></el-table-column>
  313. <el-table-column
  314. label="重量"
  315. prop="weight"
  316. :show-overflow-tooltip="true"
  317. >
  318. </el-table-column>
  319. <el-table-column
  320. label="重量单位"
  321. prop="weightUnit"
  322. :show-overflow-tooltip="true"
  323. >
  324. </el-table-column>
  325. <el-table-column
  326. label="生产日期"
  327. prop="productionDate"
  328. :show-overflow-tooltip="true"
  329. >
  330. </el-table-column>
  331. <el-table-column
  332. label="采购日期"
  333. prop="purchaseDate"
  334. :show-overflow-tooltip="true"
  335. >
  336. </el-table-column>
  337. <el-table-column
  338. label="发货条码"
  339. prop="barcodes"
  340. :show-overflow-tooltip="true"
  341. >
  342. </el-table-column>
  343. <el-table-column
  344. label="客户代号"
  345. prop="clientCode"
  346. :show-overflow-tooltip="true"
  347. >
  348. </el-table-column>
  349. <el-table-column
  350. label="刻码"
  351. prop="engrave"
  352. :show-overflow-tooltip="true"
  353. >
  354. </el-table-column>
  355. <el-table-column
  356. label="物料代号"
  357. prop="materielDesignation"
  358. :show-overflow-tooltip="true"
  359. >
  360. </el-table-column>
  361. </el-table>
  362. <el-pagination
  363. background
  364. layout="total, sizes, prev, pager, next, jumper"
  365. :total="total"
  366. :page-sizes="[10, 20, 50, 100]"
  367. :page-size.sync="size"
  368. :current-page.sync="page"
  369. @current-change="getProductList"
  370. @size-change="getProductList"
  371. >
  372. </el-pagination>
  373. </div>
  374. <div class="allocateDetails">
  375. <header-title :title="`调入明细`"></header-title>
  376. <el-form
  377. label-position="left"
  378. class="ele-form-search"
  379. @keyup.enter.native="search"
  380. @submit.native.prevent
  381. >
  382. <el-row :gutter="15">
  383. <el-col :span="12">
  384. <el-form-item
  385. label-width="65px"
  386. label="调入仓库:"
  387. prop="warehouseId"
  388. >
  389. <template>
  390. <el-select
  391. :disabled="allocateId == 1 || isEdit"
  392. @change="inWarehouseChange"
  393. style="width: 100%"
  394. v-model="params.inWarehouseId"
  395. placeholder="请选择"
  396. >
  397. <el-option
  398. v-for="item in inTreeList"
  399. :disabled="item.hiden"
  400. :label="item.name"
  401. :value="item.id"
  402. :key="item.name"
  403. >
  404. </el-option>
  405. </el-select>
  406. </template>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="12">
  410. <el-form-item
  411. label-width="65px"
  412. label="调入库区:"
  413. prop="outCargoAreaId"
  414. >
  415. <template>
  416. <el-select
  417. @change="inCargoAreaChange"
  418. style="width: 100%"
  419. v-model="params.inCargoAreaId"
  420. placeholder="请选择"
  421. >
  422. <el-option
  423. v-for="item in inCargoAreaList"
  424. :label="item.name"
  425. :value="item.id"
  426. :key="item.name"
  427. >
  428. </el-option>
  429. </el-select>
  430. </template>
  431. </el-form-item>
  432. </el-col>
  433. <el-col :span="12">
  434. <el-form-item
  435. label-width="65px"
  436. label="调入货架:"
  437. prop="warehouseId"
  438. >
  439. <template>
  440. <el-select
  441. style="width: 100%"
  442. @change="inShelvesChange"
  443. v-model="params.inShelvesId"
  444. placeholder="请选择"
  445. >
  446. <el-option
  447. v-for="item in inShelvesList"
  448. :label="item.name"
  449. :value="item.id"
  450. :key="item.name"
  451. >
  452. </el-option>
  453. </el-select>
  454. </template>
  455. </el-form-item>
  456. </el-col>
  457. <el-col :span="12">
  458. <el-form-item
  459. label-width="65px"
  460. label="调入货位:"
  461. prop="warehouseId"
  462. >
  463. <template>
  464. <el-select
  465. style="width: 100%"
  466. @change="inFreightIdChange"
  467. v-model="params.inFreightId"
  468. placeholder="请选择"
  469. >
  470. <el-option
  471. v-for="item in inFreightList"
  472. :label="item.name"
  473. :value="item.id"
  474. :key="item.name"
  475. >
  476. </el-option>
  477. </el-select>
  478. </template>
  479. </el-form-item>
  480. </el-col>
  481. </el-row>
  482. </el-form>
  483. <el-table
  484. ref="detailTable"
  485. :data="tableData"
  486. :height="575"
  487. tooltip-effect="dark"
  488. border
  489. >
  490. <el-table-column label="序号" type="index" width="50">
  491. </el-table-column>
  492. <el-table-column
  493. label="物品编码"
  494. prop="categoryCode"
  495. :show-overflow-tooltip="true"
  496. ></el-table-column>
  497. <el-table-column
  498. label="物品名称"
  499. prop="categoryName"
  500. :show-overflow-tooltip="true"
  501. ></el-table-column>
  502. <el-table-column
  503. label="调出区域"
  504. width="200"
  505. prop="outWarehouseArea"
  506. :show-overflow-tooltip="true"
  507. >
  508. </el-table-column>
  509. <el-table-column
  510. label="调入区域"
  511. width="200"
  512. prop="inWarehouseArea"
  513. :show-overflow-tooltip="true"
  514. >
  515. </el-table-column>
  516. <el-table-column
  517. label="牌号"
  518. prop="brandNum"
  519. :show-overflow-tooltip="true"
  520. ></el-table-column>
  521. <el-table-column
  522. label="型号"
  523. prop="categoryModel"
  524. :show-overflow-tooltip="true"
  525. ></el-table-column>
  526. <el-table-column
  527. label="规格"
  528. prop="specification"
  529. :show-overflow-tooltip="true"
  530. ></el-table-column>
  531. <el-table-column
  532. label="包装编码"
  533. prop="packageNo"
  534. :show-overflow-tooltip="true"
  535. ></el-table-column>
  536. <el-table-column
  537. label="包装数量"
  538. prop="packingQuantity"
  539. :show-overflow-tooltip="true"
  540. ></el-table-column>
  541. <el-table-column
  542. label="包装单位"
  543. prop="packingUnit"
  544. :show-overflow-tooltip="true"
  545. ></el-table-column>
  546. <el-table-column
  547. label="计量数量"
  548. prop="measureQuantity"
  549. :show-overflow-tooltip="true"
  550. ></el-table-column>
  551. <el-table-column
  552. label="计量单位"
  553. prop="measureUnit"
  554. :show-overflow-tooltip="true"
  555. ></el-table-column>
  556. <el-table-column
  557. label="重量"
  558. prop="weight"
  559. :show-overflow-tooltip="true"
  560. >
  561. </el-table-column>
  562. <el-table-column
  563. label="重量单位"
  564. prop="weightUnit"
  565. :show-overflow-tooltip="true"
  566. >
  567. </el-table-column>
  568. <el-table-column label="操作" width="100" fixed="right">
  569. <template slot-scope="{ row, $index }">
  570. <el-button
  571. @click="deleted(row, $index)"
  572. type="text"
  573. size="small"
  574. >删除</el-button
  575. >
  576. </template>
  577. </el-table-column>
  578. </el-table>
  579. <div class="submit_item">
  580. <el-button type="primary" @click="submit(0)">保存</el-button
  581. ><el-button type="primary" @click="config">提交</el-button></div
  582. >
  583. </div>
  584. </div>
  585. </el-card>
  586. </div>
  587. </template>
  588. <script>
  589. import storageApi from '@/api/warehouseManagement/index.js';
  590. import { getCode } from '@/api/codeManagement/index.js';
  591. import { allocationType } from '@/utils/dict/warehouse';
  592. import { getWarehouseList } from '@/api/classifyManage/itemInformation';
  593. import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
  594. export default {
  595. data() {
  596. return {
  597. query: {},
  598. allocationType,
  599. outTreeList: [],
  600. inTreeList: [],
  601. selectionIds: [],
  602. selection: [],
  603. tableData: [],
  604. productList: [],
  605. allocateId: 1,
  606. currentPullAreaId: '',
  607. currentPullAreaName: '',
  608. currentTuneAreaId: '',
  609. currentTuneAreaName: '',
  610. pullLibrary: [], // 调出库
  611. tuneLibrary: [], // 调入库
  612. outWarehouseList: [],
  613. inWarehouseList: [],
  614. params: {
  615. code: '',
  616. name: '',
  617. outWarehouseId: '', // 调出仓库
  618. outWarehouseName: '',
  619. outCargoAreaId: '', // 调出库区
  620. outCargoAreaName: '',
  621. outShelvesId: '', // 调出货架
  622. outShelvesName: '',
  623. outFreightId: '', // 调出货位
  624. outFreightName: '',
  625. inWarehouseId: '', // 调入仓库
  626. inWarehouseName: '',
  627. inCargoAreaId: '', // 调入库区
  628. inCargoAreaName: '',
  629. inShelvesId: '', // 调入货架
  630. inShelvesName: '',
  631. inFreightId: '', // 调入货位
  632. inFreightName: ''
  633. },
  634. outCargoAreaList: [], // 调出库区列表
  635. outShelvesList: [], // 调出货架列表
  636. outFreightList: [], // 调出货位列表
  637. inCargoAreaList: [], // 调入库区列表
  638. inShelvesList: [], // 调入货架列表
  639. inFreightList: [], // 调入货位列表
  640. treeLoading: false,
  641. currentObj: {},
  642. factoryList: [],
  643. isEdit: false,
  644. factoryId: '', // 工厂ID
  645. transferOrderId: '', // 调拨单ID
  646. page: 1,
  647. size: 20,
  648. total: 0
  649. };
  650. },
  651. async created() {
  652. const code = await getCode('transfer_no');
  653. this.params.code = code;
  654. // this.getTreeData();
  655. this.getFactoryList();
  656. if (this.$route.query.isEdit) {
  657. this.isEdit = true;
  658. this.getEditInfo();
  659. }
  660. },
  661. watch: {
  662. productList() {
  663. this.doLayout();
  664. }
  665. },
  666. methods: {
  667. doLayout() {
  668. let that = this;
  669. this.$nextTick(() => {
  670. console.log('操作了!!');
  671. console.log('that.$refs.table------', that.$refs.table);
  672. that.$refs.table.doLayout();
  673. });
  674. },
  675. async getEditInfo() {
  676. const dataList = await storageApi.getAllotDetailList({
  677. applyId: this.$route.query.id
  678. });
  679. const baseInfo = await storageApi.getAllotDetail(this.$route.query.id);
  680. // 初始化基础数据
  681. this.factoryId = baseInfo.factoriesId;
  682. this.allocateId = baseInfo.type;
  683. this.transferOrderId = baseInfo.id;
  684. await this.getTreeData(); // 初始仓库
  685. this.params = {
  686. code: baseInfo.allotCode,
  687. name: baseInfo.name,
  688. outWarehouseId: baseInfo.sourceWarehouseId, // 调出仓库
  689. outWarehouseName: baseInfo.sourceWarehouse,
  690. outCargoAreaId: '', // 调出库区
  691. outCargoAreaName: '',
  692. outShelvesId: '', // 调出货架
  693. outShelvesName: '',
  694. outFreightId: '', // 调出货位
  695. outFreightName: '',
  696. inWarehouseId: baseInfo.targetWarehouseId, // 调入仓库
  697. inWarehouseName: baseInfo.targetWarehouse,
  698. inCargoAreaId: '', // 调入库区
  699. inCargoAreaName: '',
  700. inShelvesId: '', // 调入货架
  701. inShelvesName: '',
  702. inFreightId: '', // 调入货位
  703. inFreightName: ''
  704. };
  705. if (this.allocateId == 1) {
  706. // 库内调拨
  707. await this.outWarehouseChange(baseInfo.sourceWarehouseId); // 加载调出库区
  708. } else {
  709. // 库外调拨
  710. await this.outWarehouseChange(baseInfo.sourceWarehouseId); // 加载调出库区
  711. this.inWarehouseChange(baseInfo.targetWarehouseId); // 加载调入库区
  712. }
  713. // 处理右边显示数据
  714. this.selectionIds = dataList.map((item) => item.outInDetailRecordId);
  715. this.selection = this.productList.filter((item) => {
  716. return this.selectionIds.includes(item.id);
  717. });
  718. this.selection.forEach((item) => {
  719. this.$refs.table.toggleRowSelection(item);
  720. });
  721. console.log('this.selection------', this.selection);
  722. this.tableData = this.selection.map((item, index) => {
  723. let filterObj = dataList.filter(
  724. (ite) => ite.outInDetailRecordId == item.id
  725. )[0];
  726. console.log('filterObj---', filterObj);
  727. return {
  728. ...item,
  729. warehouseId: filterObj.warehouseId,
  730. warehouseName: filterObj.warehouseName,
  731. areaId: filterObj.areaId,
  732. areaName: filterObj.areaName,
  733. goodsAllocationId: filterObj.goodsAllocationId,
  734. goodsAllocationName: filterObj.goodsAllocationName,
  735. goodsShelfId: filterObj.goodsShelfId,
  736. goodsShelfName: filterObj.goodsShelfName,
  737. targetAreaId: filterObj.targetAreaId,
  738. targetAreaName: filterObj.targetAreaName,
  739. targetGoodsAllocationId: filterObj.targetGoodsAllocationId,
  740. targetGoodsAllocationName: filterObj.targetGoodsAllocationName,
  741. targetGoodsShelfId: filterObj.targetGoodsShelfId,
  742. targetGoodsShelfName: filterObj.targetGoodsShelfName,
  743. targetWarehouseId: filterObj.targetWarehouseId,
  744. targetWarehouseName: filterObj.targetWarehouseName,
  745. outWarehouseArea:
  746. filterObj.warehouseName +
  747. (filterObj.areaName ? '-' + filterObj.areaName : '') +
  748. (filterObj.goodsShelfName ? '-' + filterObj.goodsShelfName : '') +
  749. (filterObj.goodsAllocationName
  750. ? '-' + filterObj.goodsAllocationName
  751. : ''),
  752. inWarehouseArea:
  753. filterObj.targetWarehouseName +
  754. (filterObj.targetAreaName ? '-' + filterObj.targetAreaName : '') +
  755. (filterObj.targetGoodsShelfName
  756. ? '-' + filterObj.targetGoodsShelfName
  757. : '') +
  758. (filterObj.targetGoodsAllocationName
  759. ? '-' + filterObj.targetGoodsAllocationName
  760. : '')
  761. };
  762. });
  763. console.log('this.tableData--------!!!!!', this.tableData);
  764. console.log(dataList);
  765. console.log(baseInfo);
  766. },
  767. factoryChange() {
  768. this.reset();
  769. this.getTreeData();
  770. },
  771. search() {
  772. if (this.allocateId == 1) {
  773. // 库内调拨
  774. if (this.params.inFreightId && this.params.outFreightId) {
  775. if (this.params.inFreightId === this.params.outFreightId) {
  776. this.productList = [];
  777. return this.$message.error('调入货位不能与调出货位相同');
  778. }
  779. } else if (!this.params.inFreightId && !this.params.outFreightId) {
  780. if (this.params.inShelvesId && this.params.outShelvesId) {
  781. if (this.params.inShelvesId === this.params.outShelvesId) {
  782. this.productList = [];
  783. return this.$message.error('调入货架不能与调出货架相同');
  784. }
  785. } else if (!this.params.inShelvesId && !this.params.outShelvesId) {
  786. if (this.params.inCargoAreaId && this.params.outCargoAreaId) {
  787. if (this.params.inCargoAreaId === this.params.outCargoAreaId) {
  788. this.productList = [];
  789. return this.$message.error('调入库区不能与调出库区相同');
  790. }
  791. } else if (
  792. !this.params.inCargoAreaId &&
  793. !this.params.outCargoAreaId
  794. ) {
  795. this.productList = [];
  796. return this.$message.error('调入库区与调出库区不能为空');
  797. } else {
  798. this.productList = [];
  799. return this.$message.error('调入库区与调出库区必须同时填写');
  800. }
  801. } else {
  802. this.productList = [];
  803. return this.$message.error('调入货架与调出货架必须同时填写');
  804. }
  805. } else {
  806. this.productList = [];
  807. return this.$message.error('调入货位与调出货位必须同时填写');
  808. }
  809. this.getProductList();
  810. } else {
  811. // 库外调拨
  812. if (!this.params.inFreightId && !this.params.outFreightId) {
  813. if (!this.params.inShelvesId && !this.params.outShelvesId) {
  814. if (!this.params.inCargoAreaId && !this.params.outCargoAreaId) {
  815. this.productList = [];
  816. return this.$message.error('调入库区与调出库区不能为空');
  817. } else if (
  818. this.params.inCargoAreaId &&
  819. this.params.outCargoAreaId
  820. ) {
  821. this.getProductList();
  822. } else {
  823. this.productList = [];
  824. return this.$message.error('调入库区与调出库区必须同时填写');
  825. }
  826. } else if (this.params.inShelvesId && this.params.outShelvesId) {
  827. this.getProductList();
  828. } else {
  829. this.productList = [];
  830. return this.$message.error('调入货架与调出货架必须同时填写');
  831. }
  832. } else if (this.params.inFreightId && this.params.outFreightId) {
  833. this.getProductList();
  834. } else {
  835. this.productList = [];
  836. return this.$message.error('调入货位与调出货位必须同时填写');
  837. }
  838. }
  839. },
  840. reset() {
  841. this.params = {
  842. ...this.params,
  843. outWarehouseId: '', // 调出仓库
  844. outWarehouseName: '',
  845. outCargoAreaId: '', // 调出库区
  846. outCargoAreaName: '',
  847. outShelvesId: '', // 调出货架
  848. outShelvesName: '',
  849. outFreightId: '', // 调出货位
  850. outFreightName: '',
  851. inWarehouseId: '', // 调入仓库
  852. inWarehouseName: '',
  853. inCargoAreaId: '', // 调入库区
  854. inCargoAreaName: '',
  855. inShelvesId: '', // 调入货架
  856. inShelvesName: '',
  857. inFreightId: '', // 调入货位
  858. inFreightName: ''
  859. };
  860. this.total = 0;
  861. this.productList = [];
  862. this.selection = [];
  863. this.selectionIds = [];
  864. this.outCargoAreaList = []; // 调出库区列表
  865. this.inCargoAreaList = []; // 调入库区列表
  866. this.outShelvesList = []; // 调出货架列表
  867. this.inShelvesList = []; // 调入货架列表
  868. this.outFreightList = []; // 调出货位列表
  869. this.inFreightList = []; // 调入货位列表
  870. },
  871. queryReset() {
  872. this.query = {};
  873. this.page = 1;
  874. this.getProductList();
  875. },
  876. querySearch() {
  877. this.page = 1;
  878. this.getProductList();
  879. },
  880. //获取工厂列表
  881. async getFactoryList() {
  882. const res = await warehouseDefinition.getFactoryarea({
  883. pageNum: 1,
  884. size: 9999,
  885. type: 1
  886. });
  887. this.factoryList = res.list;
  888. },
  889. async outWarehouseChange(val) {
  890. this.outCargoAreaList = this.outTreeList.filter(
  891. (item) => item.id == val
  892. )[0].children;
  893. this.params.outWarehouseName = this.outTreeList.filter(
  894. (item) => item.id == val
  895. )[0].name;
  896. this.productList = [];
  897. this.tableData = [];
  898. this.selection = [];
  899. this.selectionIds = [];
  900. this.params.outCargoAreaId = ''; // 调出库区
  901. this.params.outCargoAreaName = '';
  902. this.params.outShelvesId = ''; // 调出货架
  903. this.params.outShelvesName = '';
  904. this.params.outFreightId = ''; // 调出货位
  905. this.params.outFreightName = '';
  906. this.outShelvesList = []; // 调出货架列表
  907. this.outFreightList = []; // 调出货位列表
  908. if (this.allocateId == 2) {
  909. // 过滤调入库区
  910. this.inTreeList = this.inTreeList.map((item) => {
  911. if (item.id === val) {
  912. return {
  913. ...item,
  914. hiden: true
  915. };
  916. } else {
  917. return {
  918. ...item,
  919. hiden: false
  920. };
  921. }
  922. });
  923. } else {
  924. this.inCargoAreaList = this.outCargoAreaList;
  925. this.params.inWarehouseName = this.params.outWarehouseName;
  926. this.params.inWarehouseId = this.params.outWarehouseId;
  927. this.params.inCargoAreaId = ''; // 调出库区
  928. this.params.inCargoAreaName = '';
  929. this.params.inShelvesId = ''; // 调出货架
  930. this.params.inShelvesName = '';
  931. this.params.inFreightId = ''; // 调出货位
  932. this.params.inFreightName = '';
  933. this.inShelvesList = []; // 调入货架列表
  934. this.inFreightList = []; // 调入货位列表
  935. }
  936. await this.getProductList();
  937. },
  938. outCargoAreaChange(val) {
  939. this.outShelvesList = this.outCargoAreaList.filter(
  940. (item) => item.id == val
  941. )[0].children;
  942. this.params.outCargoAreaName = this.outCargoAreaList.filter(
  943. (item) => item.id == val
  944. )[0].name;
  945. this.productList = [];
  946. this.params.outShelvesId = ''; // 调出货架
  947. this.params.outShelvesName = '';
  948. this.params.outFreightId = ''; // 调出货位
  949. this.params.outFreightName = '';
  950. this.outFreightList = []; // 调出货位列表
  951. this.getProductList();
  952. },
  953. outShelvesChange(val) {
  954. this.outFreightList = this.outShelvesList.filter(
  955. (item) => item.id == val
  956. )[0].children;
  957. this.params.outShelvesName = this.outShelvesList.filter(
  958. (item) => item.id == val
  959. )[0].name;
  960. this.productList = [];
  961. this.params.outFreightId = ''; // 调出货位
  962. this.params.outFreightName = '';
  963. this.getProductList();
  964. },
  965. outFreightIdChange(val) {
  966. this.params.outFreightName = this.outFreightList.filter(
  967. (item) => item.id == val
  968. )[0].name;
  969. this.getProductList();
  970. },
  971. inWarehouseChange(val) {
  972. this.inCargoAreaList = this.inTreeList.filter(
  973. (item) => item.id == val
  974. )[0].children;
  975. this.params.inWarehouseName = this.inTreeList.filter(
  976. (item) => item.id == val
  977. )[0].name;
  978. // this.productList = [];
  979. // this.tableData = [];
  980. // this.selection = [];
  981. // this.selectionIds = [];
  982. this.params.inCargoAreaId = ''; // 调出库区
  983. this.params.inCargoAreaName = '';
  984. this.params.inShelvesId = ''; // 调出货架
  985. this.params.inShelvesName = '';
  986. this.params.inFreightId = ''; // 调出货位
  987. this.params.inFreightName = '';
  988. this.inShelvesList = []; // 调入货架列表
  989. this.inFreightList = []; // 调入货位列表
  990. if (this.allocateId == 2) {
  991. // 过滤调出库区(库外调拨)
  992. this.outTreeList = this.outTreeList.map((item) => {
  993. if (item.id === val) {
  994. return {
  995. ...item,
  996. hiden: true
  997. };
  998. } else {
  999. return {
  1000. ...item,
  1001. hiden: false
  1002. };
  1003. }
  1004. });
  1005. console.log(this.outTreeList);
  1006. }
  1007. },
  1008. inCargoAreaChange(val) {
  1009. this.inShelvesList = this.inCargoAreaList.filter(
  1010. (item) => item.id == val
  1011. )[0].children;
  1012. this.params.inCargoAreaName = this.inCargoAreaList.filter(
  1013. (item) => item.id == val
  1014. )[0].name;
  1015. // this.productList = [];
  1016. this.params.inShelvesId = ''; // 调出货架
  1017. this.params.inShelvesName = '';
  1018. this.params.inFreightId = ''; // 调出货位
  1019. this.params.inFreightName = '';
  1020. this.inFreightList = []; // 调入货位列表
  1021. },
  1022. inShelvesChange(val) {
  1023. this.inFreightList = this.inShelvesList.filter(
  1024. (item) => item.id == val
  1025. )[0].children;
  1026. this.params.inShelvesName = this.inShelvesList.filter(
  1027. (item) => item.id == val
  1028. )[0].name;
  1029. // this.productList = [];
  1030. this.params.inFreightId = ''; // 调出货位
  1031. this.params.inFreightName = '';
  1032. },
  1033. inFreightIdChange(val) {
  1034. this.params.inFreightName = this.inFreightList.filter(
  1035. (item) => item.id == val
  1036. )[0].name;
  1037. },
  1038. // 调出区域改变
  1039. outChange(val) {
  1040. console.log(this.$refs.outTree.getNodeByValue(val));
  1041. let obj = this.$refs.outTree.getNodeByValue(val);
  1042. this.currentObj = obj;
  1043. this.getProductList();
  1044. },
  1045. // 调入区域改变
  1046. inChange(val) {
  1047. let obj = this.$refs.outTree.getNodeByValue(val);
  1048. },
  1049. async getProductList() {
  1050. let params = {
  1051. ...this.query,
  1052. warehouseId: this.params.outWarehouseId,
  1053. warehouseAreaId: this.params.outCargoAreaId,
  1054. warehouseAreaGoodsId: this.params.outShelvesId,
  1055. warehouseAreaGoodsShelvesId: this.params.outFreightId
  1056. };
  1057. const data = await storageApi.getPackingList({
  1058. ...params,
  1059. pageNum: this.page,
  1060. size: this.size
  1061. });
  1062. this.total = data.count;
  1063. this.productList = data.list;
  1064. },
  1065. async getTreeData() {
  1066. try {
  1067. this.treeLoading = true;
  1068. let res = await storageApi.getWarehouseTrees({
  1069. factoriesId: this.factoryId
  1070. });
  1071. this.treeLoading = false;
  1072. if (res?.code === '0') {
  1073. this.outTreeList = res.data;
  1074. this.inTreeList = res.data;
  1075. }
  1076. } catch (error) {
  1077. console.log(error);
  1078. }
  1079. this.treeLoading = false;
  1080. },
  1081. deleted(row, index) {
  1082. this.tableData.splice(index, 1);
  1083. console.log(this.selectionIds);
  1084. this.selectionIds = this.selectionIds.filter((item) => item !== row.id);
  1085. },
  1086. config() {
  1087. if (this.allocateId == 1) {
  1088. // 库内
  1089. this.submit(2);
  1090. } else {
  1091. // 库外
  1092. this.submit(1);
  1093. }
  1094. },
  1095. submit(status) {
  1096. if (this.tableData.length > 0) {
  1097. let params = {
  1098. categoryCode: this.tableData
  1099. .map((item) => item.categoryCode)
  1100. .join(','),
  1101. categoryName: this.tableData
  1102. .map((item) => item.categoryName)
  1103. .join(','),
  1104. allotApplyAddPOBuilders: this.tableData.map((item) => {
  1105. return {
  1106. warehouseId: item.warehouseId,
  1107. warehouseName: item.warehouseName,
  1108. areaId: item.areaId,
  1109. areaName: item.areaName,
  1110. goodsAllocationId: item.goodsAllocationId,
  1111. goodsAllocationName: item.goodsAllocationName,
  1112. goodsShelfId: item.goodsShelfId,
  1113. goodsShelfName: item.goodsShelfName,
  1114. outInDetailRecordId: item.id,
  1115. targetAreaId: item.targetAreaId,
  1116. targetAreaName: item.targetAreaName,
  1117. targetGoodsAllocationId: item.targetGoodsAllocationId,
  1118. targetGoodsAllocationName: item.targetGoodsAllocationName,
  1119. targetGoodsShelfId: item.targetGoodsShelfId,
  1120. targetGoodsShelfName: item.targetGoodsShelfName,
  1121. targetWarehouseId: item.targetWarehouseId,
  1122. targetWarehouseName: item.targetWarehouseName
  1123. };
  1124. }),
  1125. allotCode: this.params.code,
  1126. name: this.params.name,
  1127. id: this.transferOrderId,
  1128. sourceWarehouse: this.params.outWarehouseName,
  1129. sourceWarehouseId: this.params.outWarehouseId,
  1130. targetWarehouse: this.params.inWarehouseName,
  1131. targetWarehouseId: this.params.inWarehouseId,
  1132. status: status,
  1133. type: this.allocateId
  1134. };
  1135. console.log('params------------', params);
  1136. storageApi.allotApplySave(params).then(() => {
  1137. this.$message.success('保存成功');
  1138. this.$router.go(-1);
  1139. });
  1140. } else {
  1141. this.$message.error('请调入相关数据');
  1142. }
  1143. },
  1144. checkSelectable(row) {
  1145. return !this.selectionIds.includes(row.id);
  1146. },
  1147. allocateChange(val) {
  1148. this.allocateId = val;
  1149. this.params = {
  1150. ...this.params,
  1151. outWarehouseId: '', // 调出仓库
  1152. outWarehouseName: '',
  1153. outCargoAreaId: '', // 调出库区
  1154. outCargoAreaName: '',
  1155. outShelvesId: '', // 调出货架
  1156. outShelvesName: '',
  1157. outFreightId: '', // 调出货位
  1158. outFreightName: '',
  1159. inWarehouseId: '', // 调入仓库
  1160. inWarehouseName: '',
  1161. inCargoAreaId: '', // 调入库区
  1162. inCargoAreaName: '',
  1163. inShelvesId: '', // 调入货架
  1164. inShelvesName: '',
  1165. inFreightId: '', // 调入货位
  1166. inFreightName: ''
  1167. };
  1168. this.total = 0;
  1169. this.productList = [];
  1170. this.outShelvesList = [];
  1171. this.outCargoAreaList = [];
  1172. this.outFreightList = [];
  1173. this.inShelvesList = [];
  1174. this.inCargoAreaList = [];
  1175. this.inFreightList = [];
  1176. this.selectionIds = [];
  1177. this.selection = [];
  1178. this.tableData = [];
  1179. this.$refs.table.clearSelection();
  1180. this.getTreeData();
  1181. // this.params = {
  1182. // outWarehouseId: '',
  1183. // outWarehouseName: '',
  1184. // inWarehouseId: '',
  1185. // inWarehouseName: ''
  1186. // };
  1187. // this.currentPullAreaId = '';
  1188. // this.currentPullAreaName = '';
  1189. // this.currentTuneAreaId = '';
  1190. // this.currentTuneAreaName = '';
  1191. // this.pullLibrary = [];
  1192. // this.tuneLibrary = [];
  1193. // this.productList = [];
  1194. // this.tableData = [];
  1195. // this.productList = [];
  1196. // this.getWarehouseOptions();
  1197. },
  1198. pullClick(id, name) {
  1199. if (this.currentPullAreaId == id) {
  1200. return false;
  1201. } else {
  1202. console.log('-------------');
  1203. this.currentPullAreaId = id;
  1204. this.currentPullAreaName = name;
  1205. this.currentTuneAreaId = '';
  1206. this.currentTuneAreaName = '';
  1207. }
  1208. storageApi
  1209. .getPackingList({
  1210. warehouseAreaId: id,
  1211. pageNum: 1,
  1212. size: 9999
  1213. })
  1214. .then(({ list }) => {
  1215. this.productList = list;
  1216. });
  1217. },
  1218. tuneClick(id, name, boolen) {
  1219. if (!this.currentPullAreaId) {
  1220. return this.$message.error('请先选择调出库');
  1221. }
  1222. if (boolen) {
  1223. return false;
  1224. }
  1225. this.currentTuneAreaId = id;
  1226. this.currentTuneAreaName = name;
  1227. },
  1228. selecctedRow(val) {
  1229. this.selection = val;
  1230. },
  1231. async getWarehouseOptions() {
  1232. const { data } = await storageApi.getWarehouseTrees();
  1233. this.outWarehouseList = data;
  1234. this.inWarehouseList = data;
  1235. },
  1236. async merge() {
  1237. if (this.selection.length > 0) {
  1238. console.log(this.selection);
  1239. console.log(this.selectionIds);
  1240. let boolen = this.selection.every((item) =>
  1241. this.selectionIds.includes(item.id)
  1242. );
  1243. if (this.selection.length > 0 && !boolen) {
  1244. this.selection = this.selection.filter(
  1245. (item) => !this.selectionIds.includes(item.id)
  1246. );
  1247. // // 判断货位
  1248. // if (this.params.inFreightId) {
  1249. // let isBoolen = this.selection.some(
  1250. // (item) => item.goodsAllocationId == this.params.inFreightId
  1251. // );
  1252. // if (isBoolen) {
  1253. // return this.$message.error('所选物品货位与调入货位重复!');
  1254. // }
  1255. // }
  1256. // // 判断货架
  1257. // if (!this.params.inFreightId && this.params.inShelvesId) {
  1258. // let isBoolen = this.selection.some(
  1259. // (item) => item.goodsShelfId == this.params.inShelvesId
  1260. // );
  1261. // if (isBoolen) {
  1262. // return this.$message.error('所选物品货架与调入货架重复!');
  1263. // }
  1264. // }
  1265. // // 判断库区
  1266. // if (!this.params.inCargoAreaId) {
  1267. // return this.$message.error('调入库区不能为空');
  1268. // } else if (
  1269. // !this.params.inFreightId &&
  1270. // !this.params.inShelvesId &&
  1271. // this.params.inCargoAreaId
  1272. // ) {
  1273. // let isBoolen = this.selection.some(
  1274. // (item) => item.areaId == this.params.inCargoAreaId
  1275. // );
  1276. // if (isBoolen) {
  1277. // return this.$message.error('所选物品库区与调入库区重复');
  1278. // }
  1279. // }
  1280. if (
  1281. this.params.inCargoAreaId &&
  1282. !this.params.inFreightId &&
  1283. !this.params.inShelvesId
  1284. ) {
  1285. // 只有调入库区
  1286. for (let i = 0; i < this.selection.length; i++) {
  1287. console.log(this.selection[i].areaId);
  1288. console.log(this.params.inCargoAreaId);
  1289. if (this.selection[i].areaId == this.params.inCargoAreaId) {
  1290. return this.$message.error('所选物品库区与调入库区重复');
  1291. }
  1292. }
  1293. } else if (
  1294. this.params.inCargoAreaId &&
  1295. this.params.inShelvesId &&
  1296. !this.params.inFreightId
  1297. ) {
  1298. // 只有调入库区/货架
  1299. for (let i = 0; i < this.selection.length; i++) {
  1300. if (this.selection[i].areaId == this.params.inCargoAreaId) {
  1301. // 库区相同
  1302. if (
  1303. this.selection[i].goodsShelfId == this.params.inShelvesId
  1304. ) {
  1305. // 货架相同
  1306. return this.$message.error(
  1307. '所选物品库区/货架与调入库区/货架重复'
  1308. );
  1309. } else {
  1310. // 货架不同直接录入
  1311. }
  1312. } else {
  1313. // 库区不同直接录入
  1314. }
  1315. }
  1316. } else if (
  1317. this.params.inCargoAreaId &&
  1318. this.params.inShelvesId &&
  1319. this.params.inFreightId
  1320. ) {
  1321. // 只有调入库区/货架/货位
  1322. for (let i = 0; i < this.selection.length; i++) {
  1323. if (this.selection[i].areaId == this.params.inCargoAreaId) {
  1324. // 库区相同
  1325. if (
  1326. this.selection[i].goodsShelfId == this.params.inShelvesId
  1327. ) {
  1328. // 货架相同
  1329. if (
  1330. this.selection[i].goodsAllocationId ==
  1331. this.params.inFreightId
  1332. ) {
  1333. // 货位相同
  1334. return this.$message.error(
  1335. '所选物品库区/货架/货位与调入库区/货架/货位重复'
  1336. );
  1337. } else {
  1338. // 货位不同直接录入
  1339. }
  1340. } else {
  1341. // 货架不同直接录入
  1342. }
  1343. } else {
  1344. // 库区不同直接录入
  1345. }
  1346. }
  1347. } else {
  1348. return this.$message.error('调入库区不能为空');
  1349. }
  1350. this.selectionIds = this.selectionIds.concat(
  1351. this.selection.map((item) => item.id)
  1352. );
  1353. console.log('this.selection---------', this.selection);
  1354. console.log('this.selectionIds---', this.selectionIds);
  1355. this.tableData = this.tableData.concat(
  1356. this.selection.map((item) => {
  1357. console.log('this.params---------', this.params);
  1358. return {
  1359. ...item,
  1360. warehouseId: this.params.outWarehouseId,
  1361. warehouseName: this.params.outWarehouseName,
  1362. areaId: this.params.outCargoAreaId,
  1363. areaName: this.params.outCargoAreaName,
  1364. goodsAllocationId: this.params.outFreightId,
  1365. goodsAllocationName: this.params.outFreightName,
  1366. goodsShelfId: this.params.outShelvesId,
  1367. goodsShelfName: this.params.outShelvesName,
  1368. targetAreaId: this.params.inCargoAreaId,
  1369. targetAreaName: this.params.inCargoAreaName,
  1370. targetGoodsAllocationId: this.params.inFreightId,
  1371. targetGoodsAllocationName: this.params.inFreightName,
  1372. targetGoodsShelfId: this.params.inShelvesId,
  1373. targetGoodsShelfName: this.params.inShelvesName,
  1374. targetWarehouseId: this.params.inWarehouseId,
  1375. targetWarehouseName: this.params.inWarehouseName,
  1376. outWarehouseArea:
  1377. this.params.outWarehouseName +
  1378. (this.params.outCargoAreaName
  1379. ? '-' + this.params.outCargoAreaName
  1380. : '') +
  1381. (this.params.outShelvesName
  1382. ? '-' + this.params.outShelvesName
  1383. : '') +
  1384. (this.params.outFreightName
  1385. ? '-' + this.params.outFreightName
  1386. : ''),
  1387. inWarehouseArea:
  1388. this.params.inWarehouseName +
  1389. (this.params.inCargoAreaName
  1390. ? '-' + this.params.inCargoAreaName
  1391. : '') +
  1392. (this.params.inShelvesName
  1393. ? '-' + this.params.inShelvesName
  1394. : '') +
  1395. (this.params.inFreightName
  1396. ? '-' + this.params.inFreightName
  1397. : '')
  1398. };
  1399. })
  1400. );
  1401. console.log('this.tableData---------', this.tableData);
  1402. } else {
  1403. this.$message.error('请选择正确的行');
  1404. }
  1405. } else {
  1406. this.$message.error('请选择调出物品信息');
  1407. }
  1408. }
  1409. }
  1410. };
  1411. </script>
  1412. <style lang="scss" scoped>
  1413. #inventoryAllocate {
  1414. height: 100%;
  1415. .el-form-item {
  1416. margin-bottom: 5px !important;
  1417. }
  1418. .submit_item {
  1419. display: flex;
  1420. justify-content: flex-end;
  1421. align-items: center;
  1422. margin-top: 8px;
  1423. height: 40px;
  1424. }
  1425. :deep(.el-form-item__label) {
  1426. padding-right: 5px !important;
  1427. }
  1428. :deep(.el-card) {
  1429. height: 100%;
  1430. .el-card__body {
  1431. height: 100%;
  1432. box-sizing: border-box;
  1433. overflow: hidden;
  1434. display: flex;
  1435. flex-direction: column;
  1436. }
  1437. }
  1438. .col_height {
  1439. height: 45px !important;
  1440. }
  1441. .productBox {
  1442. display: flex;
  1443. flex: 1;
  1444. > div {
  1445. flex: 1;
  1446. overflow: hidden;
  1447. }
  1448. }
  1449. .selectBox {
  1450. padding: 20px;
  1451. }
  1452. .box-card {
  1453. margin: 20px;
  1454. }
  1455. .productsList {
  1456. margin-right: 10px;
  1457. display: flex;
  1458. flex-direction: column;
  1459. :deep(.el-table) {
  1460. flex: 1;
  1461. display: flex;
  1462. flex-direction: column;
  1463. .el-table__body-wrapper {
  1464. flex: 1;
  1465. }
  1466. }
  1467. }
  1468. .allocateDetails {
  1469. display: flex;
  1470. flex-direction: column;
  1471. :deep(.el-table) {
  1472. flex: 1;
  1473. display: flex;
  1474. flex-direction: column;
  1475. .el-table__body-wrapper {
  1476. flex: 1;
  1477. }
  1478. }
  1479. }
  1480. }
  1481. </style>