index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. <template>
  2. <ele-modal
  3. title="新建领料单"
  4. :visible.sync="visible"
  5. v-if="visible"
  6. :before-close="handleClose"
  7. :close-on-click-modal="false"
  8. :maxable="true"
  9. :close-on-press-escape="false"
  10. id="formId"
  11. append-to-body
  12. width="80%"
  13. @update:fullscreen="fullscreen"
  14. :fullscreen="isFullscreen"
  15. :height="dialogDynamicHeight"
  16. >
  17. <el-form>
  18. <el-row :gutter="24">
  19. <el-col :span="6">
  20. <el-form-item label="领料单编号" prop="pickCode" label-width="90px">
  21. <el-input v-model="pickCode" disabled=""></el-input>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="6">
  25. <el-form-item label="领料单名称" prop="pickName" label-width="90px">
  26. <el-input v-model="pickName" style="width: 260px"></el-input>
  27. </el-form-item>
  28. </el-col>
  29. </el-row>
  30. </el-form>
  31. <div v-for="(item, idx) in workList" :key="idx">
  32. <el-form
  33. :ref="`formRef${idx}`"
  34. :model="{ pickList: item }"
  35. :rules="tableRules"
  36. size="mini"
  37. label-position="left"
  38. >
  39. <div class="tableZ_box">
  40. <div class="row">
  41. <div class="col">
  42. <div class="name">生产工单号</div>
  43. <div class="content">{{ item.code }}</div>
  44. </div>
  45. <div class="col">
  46. <div class="name">产品编码</div>
  47. <div class="content">{{ item.productCode }}</div>
  48. </div>
  49. <div class="col">
  50. <div class="name">产品名称</div>
  51. <div class="content">{{ item.productName }}</div>
  52. </div>
  53. <!-- <div class="col">
  54. <div class="name">批次号</div>
  55. <div class="content">{{ item.batchNo }}</div>
  56. </div> -->
  57. <div class="col pd6" v-if="clientEnvironmentId != 21">
  58. <el-button
  59. type="primary"
  60. size="mini"
  61. @click="openPicking(item.id, item)"
  62. >新增</el-button
  63. >
  64. </div>
  65. </div>
  66. </div>
  67. <div>
  68. <el-table
  69. :ref="`tableRef${idx}`"
  70. class="table_content"
  71. :max-height="tabalHeight"
  72. :data="item.pickList"
  73. tooltip-effect="dark"
  74. style="width: 100%"
  75. stripe
  76. border
  77. >
  78. <el-table-column label="序号" type="index" width="60">
  79. <template slot-scope="{ row, $index }">
  80. {{ $index + 1 }}
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="类型" prop="rootCategoryLevelId" width="80">
  84. <template slot-scope="{ row, $index }">
  85. <el-tag size="mini">{{
  86. typeName[Number(row.rootCategoryLevelId)]
  87. }}</el-tag>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. label="编码"
  92. prop="assetCode"
  93. show-overflow-tooltip
  94. >
  95. <template slot-scope="{ row, $index }">
  96. <span
  97. v-if="
  98. Object.prototype.hasOwnProperty.call(row, 'isBom') &&
  99. row.isBom == 1
  100. "
  101. style="color: #faad14"
  102. >
  103. {{ row.categoryCode }}
  104. </span>
  105. <span>
  106. {{
  107. row.rootCategoryLevelId == 4 ? row.codeNumber : row.code
  108. }}</span
  109. >
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="名称" prop="name" show-overflow-tooltip>
  113. <template slot-scope="{ row, $index }">
  114. <span
  115. v-if="
  116. Object.prototype.hasOwnProperty.call(row, 'isBom') &&
  117. row.isBom == 1
  118. "
  119. >
  120. {{ row.categoryName }}
  121. </span>
  122. <span> {{ row.name }}</span>
  123. </template>
  124. </el-table-column>
  125. <el-table-column
  126. label="型号"
  127. prop="modelType"
  128. show-overflow-tooltip
  129. >
  130. </el-table-column>
  131. <el-table-column
  132. label="规格"
  133. prop="specification"
  134. show-overflow-tooltip
  135. >
  136. </el-table-column>
  137. <!-- <el-table-column label="批次号" prop="batchNo"> </el-table-column> -->
  138. <el-table-column label="数量" prop="demandQuantity" width="140">
  139. <template slot-scope="{ row, $index }">
  140. <el-form-item>
  141. <el-input
  142. v-model="row.demandQuantity"
  143. @input="changeInput(row, $index)"
  144. size="mini"
  145. style="width: 120px"
  146. >
  147. <template slot="append">{{ row.measuringUnit }}</template>
  148. </el-input>
  149. </el-form-item>
  150. </template>
  151. </el-table-column>
  152. <!-- <el-table-column label="计量库存数量" prop="availableCountBase">
  153. <template slot-scope="{ row, $index }">
  154. {{ row.availableCountBase }} {{ row.measuringUnit }}
  155. </template>
  156. </el-table-column> -->
  157. <el-table-column
  158. label="计量库存数量"
  159. prop="availableCountBase"
  160. width="220"
  161. show-overflow-tooltip
  162. >
  163. <template slot-scope="{ row, $index }">
  164. <div v-for="it of row.warehouseList">
  165. <span
  166. v-if="it.availableCountBase != '0'"
  167. @click="chooseInventoryData(row, it, $index)"
  168. style="cursor: pointer"
  169. >{{ it.name ? it.name : it.warehouse_name }}库存数:<span
  170. style="color: green"
  171. >{{ it.availableCountBase }}</span
  172. >{{ row.measuringUnit }}</span
  173. >
  174. </div>
  175. </template>
  176. </el-table-column>
  177. <el-table-column label="领料仓库" prop="warehouseId" width="180">
  178. <template slot-scope="{ row, $index }">
  179. <div
  180. v-if="
  181. Object.prototype.hasOwnProperty.call(row, 'isBom') &&
  182. row.isBom == 1
  183. "
  184. >
  185. <el-select
  186. v-model="row.warehouseIdList"
  187. placeholder="请选择"
  188. filterable
  189. multiple
  190. @change="changeWarehouse(row, $index)"
  191. >
  192. <el-option
  193. v-for="item in row.warehouseList"
  194. :label="item.name"
  195. :value="item.id"
  196. :key="item.id"
  197. >
  198. </el-option>
  199. </el-select>
  200. </div>
  201. <div v-else-if="clientEnvironmentId == 21">
  202. <el-select
  203. v-model="row.warehouseId"
  204. placeholder="请选择"
  205. filterable
  206. >
  207. <el-option
  208. v-for="item in row.warehouseList"
  209. :label="item.name"
  210. :value="item.id"
  211. :key="item.id"
  212. >
  213. </el-option>
  214. </el-select>
  215. </div>
  216. <div v-else>
  217. <el-select
  218. v-model="row.warehouseIdList"
  219. placeholder="请选择"
  220. filterable
  221. multiple
  222. >
  223. <el-option
  224. v-for="item in row.warehouseLists"
  225. :label="item.warehouse_name"
  226. :value="item.warehouse_id"
  227. :key="item.warehouse_id"
  228. >
  229. </el-option>
  230. </el-select>
  231. </div>
  232. </template>
  233. </el-table-column>
  234. <el-table-column
  235. label="领料信息"
  236. prop="warehousePick"
  237. width="340"
  238. show-overflow-tooltip
  239. >
  240. <template slot-scope="{ $index, row }">
  241. <div
  242. v-for="it of row.warehousePick"
  243. :key="it.id"
  244. style="display: flex; flex-direction: row"
  245. >
  246. <span>{{ it.warehouseName }}</span
  247. >,批次号:{{ it.batchNo }},出库数:<span
  248. style="color: green"
  249. >{{ it.demandQuantity }}</span
  250. >
  251. {{ row.measuringUnit }}
  252. </div>
  253. </template>
  254. </el-table-column>
  255. <el-table-column label="操作" width="100px">
  256. <template slot-scope="{ $index, row }">
  257. <el-link type="danger" @click="removeItem(idx, $index)"
  258. >删除</el-link
  259. >
  260. </template>
  261. </el-table-column>
  262. </el-table>
  263. </div>
  264. </el-form>
  265. </div>
  266. <template slot="footer">
  267. <el-button size="mini" @click="handleClose">取 消</el-button>
  268. <el-button
  269. size="mini"
  270. type="primary"
  271. :loading="loadingBtn"
  272. @click="save()"
  273. >确 定</el-button
  274. >
  275. </template>
  276. <pickingList
  277. isType="pick"
  278. ref="pickingListRef"
  279. @allSelection="allSelection"
  280. ></pickingList>
  281. <AssetsDialog
  282. ref="assetsRef"
  283. :treeIds="treeId"
  284. @detailData="detailData"
  285. ></AssetsDialog>
  286. </ele-modal>
  287. </template>
  288. <script>
  289. import pickingList from './pickingList.vue';
  290. import {
  291. workorderList,
  292. getCode,
  293. getInventoryTotal,
  294. znworkorderList
  295. } from '@/api/produce/workOrder';
  296. import { typeName } from '../common.js';
  297. import { batchSave, znfindVoucherList } from '@/api/produce/picking';
  298. import AssetsDialog from './AssetsDialog.vue';
  299. export default {
  300. components: {
  301. pickingList,
  302. AssetsDialog
  303. },
  304. props: {
  305. workListIds: {
  306. type: Array,
  307. default() {
  308. return [];
  309. }
  310. }
  311. },
  312. data() {
  313. return {
  314. visible: true,
  315. workList: [],
  316. rules: {},
  317. pickCode: null,
  318. pickName: null,
  319. typeName,
  320. tableRules: {},
  321. loadingBtn: false,
  322. contentStyleObj: {
  323. height: ''
  324. },
  325. isFullscreen: false,
  326. tabalHeight: 300,
  327. treeId: []
  328. // warehouseIdList: []
  329. };
  330. },
  331. computed: {
  332. taskObj() {
  333. return this.$store.state.user.taskObj;
  334. },
  335. clientEnvironmentId() {
  336. return this.$store.state.user.info.clientEnvironmentId;
  337. },
  338. dialogDynamicHeight() {
  339. if (this.isFullscreen) {
  340. // 全屏时,高度为窗口高度
  341. console.log(window.innerHeight + 'px', '全屏高度');
  342. this.tabalHeight = window.innerHeight - 200;
  343. return window.innerHeight + 'px';
  344. } else {
  345. this.tabalHeight = 300;
  346. return '500px';
  347. }
  348. }
  349. },
  350. watch: {},
  351. methods: {
  352. getList() {
  353. let param = {
  354. ids: this.workListIds,
  355. taskId: this.taskObj.id
  356. };
  357. console.log('1111122222', this.clientEnvironmentId);
  358. if (this.clientEnvironmentId == 21) {
  359. znworkorderList(param).then((res) => {
  360. let arr = res.map((e) => {
  361. e.bomDetailDTOS.map((d) => {
  362. e.warehouseId =
  363. d.warehouseList.length > 0 ? d.warehouseList[0].id : '';
  364. });
  365. e.pickList = [...e.bomDetailDTOS];
  366. e.bomDetailDTOS = [];
  367. return e;
  368. });
  369. this.pickName = res[0].productName + '领料';
  370. arr[0].pickList.forEach((it) => {
  371. it.warehouseIdList = [];
  372. it.warehouseIdList.push(it.warehouseId);
  373. it.warehouseList.forEach((i) => {
  374. i.warehouse_name = i.name;
  375. i.warehouse_id = i.id;
  376. });
  377. });
  378. // arr.bomDetailDTOS.map(v=>{
  379. // this.getInventoryTotalFn(v.id)
  380. // })
  381. // getInventoryTotal
  382. // this.workList = arr;
  383. this.$set(this, 'workList', arr);
  384. this.getOrderCode();
  385. this.$forceUpdate();
  386. });
  387. } else {
  388. workorderList(param).then((res) => {
  389. let arr = res.map((e) => {
  390. e.bomDetailDTOS.map((d) => {
  391. e.warehouseId =
  392. d.warehouseList.length > 0 ? d.warehouseList[0].id : '';
  393. // this.getInventoryTotalFn([d.categoryCode])
  394. });
  395. e.pickList = [...e.bomDetailDTOS];
  396. e.bomDetailDTOS = [];
  397. return e;
  398. });
  399. this.pickName = res[0].productName + '领料';
  400. arr[0].pickList.forEach((it) => {
  401. it.warehouseIdList = [];
  402. it.warehouseIdList.push(it.warehouseId);
  403. it.warehouseList.forEach((i) => {
  404. i.warehouse_name = i.name;
  405. i.warehouse_id = i.id;
  406. });
  407. });
  408. console.log(arr, 'e.pickList');
  409. // arr.bomDetailDTOS.map(v=>{
  410. // this.getInventoryTotalFn(v.id)
  411. // })
  412. // getInventoryTotal
  413. // this.workList = arr;
  414. this.$set(this, 'workList', arr);
  415. this.getOrderCode();
  416. // this.getInventoryTotalFn();
  417. this.$forceUpdate();
  418. });
  419. }
  420. },
  421. changeWarehouse(item, index) {
  422. // const data = [];
  423. // if (item.warehouseIdList.length != 0) {
  424. // item.warehouseIdList.forEach((it) => {
  425. // const chooseData = item.warehouseList.find((item) => item.id == it);
  426. // data.push(chooseData);
  427. // });
  428. // }
  429. // const pickData = [...data];
  430. // if (data.length != 0) {
  431. // const totalNum = data.reduce((acc, pro) => {
  432. // return pro.availableCountBase
  433. // ? acc + Number(pro.availableCountBase)
  434. // : acc;
  435. // }, 0);
  436. // this.$set(
  437. // this.workList[0].pickList[index],
  438. // 'availableCountBase',
  439. // totalNum
  440. // );
  441. // this.$set(
  442. // this.workList[0].pickList[index],
  443. // 'warehousePick',
  444. // pickData
  445. // );
  446. // console.log(this.workList[0], 'this.workList[0]');
  447. // this.$forceUpdate();
  448. // } else {
  449. // this.$set(this.workList[0].pickList[index], 'warehousePick', []);
  450. // this.$set(this.workList[0].pickList[index], 'availableCountBase', 0);
  451. // this.$set(this.workList[0].pickList[index], 'demandQuantity', 0);
  452. // }
  453. },
  454. changeInput(item, index) {
  455. if (Number(item.demandQuantity) >= Number(item.availableCountBase)) {
  456. this.$set(
  457. this.workList[0].pickList[index],
  458. 'demandQuantity',
  459. Number(item.availableCountBase)
  460. );
  461. const idsList = [];
  462. item.warehouseList.forEach((it) => {
  463. idsList.push(it.warehouse_id);
  464. });
  465. this.$set(
  466. this.workList[0].pickList[index],
  467. 'warehouseIdList',
  468. idsList
  469. );
  470. } else if (!Number(item.demandQuantity)) {
  471. this.$set(this.workList[0].pickList[index], 'warehouseIdList', []);
  472. } else {
  473. const idsList = [];
  474. let totalNum = 0;
  475. // item.warehouseList.forEach((it) => {
  476. // if(Number(it.availableCountBase))
  477. // });
  478. for (let i = 0; i < item.warehouseList.length; i++) {
  479. totalNum += Number(item.warehouseList[i].availableCountBase);
  480. if (Number(item.demandQuantity) > totalNum) {
  481. idsList.push(item.warehouseList[i].warehouse_id);
  482. } else {
  483. idsList.push(item.warehouseList[i].warehouse_id);
  484. break;
  485. }
  486. }
  487. this.$set(
  488. this.workList[0].pickList[index],
  489. 'warehouseIdList',
  490. idsList
  491. );
  492. }
  493. console.log(item);
  494. },
  495. detailData(data, dimension, index) {
  496. const itemData = [];
  497. data.forEach((it) => {
  498. itemData.push({
  499. batchNo: it.batchNo,
  500. demandQuantity: it.measureQuantity,
  501. warehouseId: it.warehouseId,
  502. warehouseName: it.warehouseName
  503. });
  504. });
  505. const listData = [];
  506. if (this.workList[0].pickList[index].warehousePick) {
  507. this.workList[0].pickList[index].warehousePick.forEach((it) => {
  508. listData.push(it);
  509. });
  510. }
  511. itemData.forEach((it) => {
  512. listData.push(it);
  513. });
  514. const warehouseIdList = [];
  515. listData.forEach((it) => {
  516. warehouseIdList.push(it.warehouseId);
  517. });
  518. const uniqueArr = Array.from(new Set(warehouseIdList));
  519. this.$set(this.workList[0].pickList[index], 'warehousePick', listData);
  520. this.$set(
  521. this.workList[0].pickList[index],
  522. 'warehouseIdList',
  523. uniqueArr
  524. );
  525. const total = this.workList[0].pickList[index].warehousePick.reduce(
  526. (acc, pro) => {
  527. return pro.demandQuantity ? acc + Number(pro.demandQuantity) : acc;
  528. },
  529. 0
  530. );
  531. this.$set(this.workList[0].pickList[index], 'demandQuantity', total);
  532. this.$forceUpdate();
  533. },
  534. warehouseChangeNum(item, index) {
  535. item.warehousePick.forEach((it) => {
  536. if (Number(it.demandQuantity) > Number(it.availableCountBase)) {
  537. it.demandQuantity = it.availableCountBase;
  538. }
  539. const totalNum = item.warehousePick.reduce((acc, pro) => {
  540. return pro.demandQuantity ? acc + Number(pro.demandQuantity) : acc;
  541. }, 0);
  542. this.$set(
  543. this.workList[0].pickList[index],
  544. 'demandQuantity',
  545. totalNum
  546. );
  547. });
  548. },
  549. async getInventoryTotalFn(id) {
  550. let ids = [];
  551. this.workList.map((item) => {
  552. item.pickList.map((pitem) => {
  553. ids.push(pitem.categoryCode);
  554. });
  555. });
  556. if (ids.length == 0) {
  557. return;
  558. }
  559. const res = await getInventoryTotal(ids);
  560. res.map((ritem) => {
  561. this.workList.map((item) => {
  562. item.pickList.map((pitem) => {
  563. if (pitem.categoryCode == ritem.code) {
  564. pitem.availableCountBase = ritem.availableCountBase;
  565. }
  566. });
  567. });
  568. });
  569. console.log('cashasisasa', res);
  570. },
  571. async getOrderCode() {
  572. this.pickCode = await getCode('pick_order_code');
  573. },
  574. removeItem(idx, index) {
  575. this.workList[idx].pickList.splice(index, 1);
  576. },
  577. handleClose() {
  578. this.loadingBtn = false;
  579. this.$emit('close', false);
  580. },
  581. openPicking(id, item) {
  582. this.$refs.pickingListRef.open(id, item, '选择列表');
  583. },
  584. chooseInventoryData(item, warehouseItem, index) {
  585. console.log(item, warehouseItem, index, '111111');
  586. this.treeId.push(item.rootCategoryLevelId);
  587. this.$refs.assetsRef.open(item, warehouseItem, index);
  588. },
  589. allSelection(id, list) {
  590. list.forEach((item) => {
  591. item.warehouseList = item.warehouseList
  592. ? item.warehouseList
  593. : item.warehouseLists;
  594. });
  595. // list.forEach((it) => {
  596. // if (it.warehouseList.length != 0) {
  597. // if (!it.warehouseIdList) {
  598. // it.warehouseIdList = [];
  599. // it.warehouseIdList.push(it.warehouseList[0].warehouse_id);
  600. // }
  601. // }
  602. // });
  603. this.workList.forEach((e) => {
  604. if (e.id == id) {
  605. e.pickList = list;
  606. this.$forceUpdate();
  607. }
  608. });
  609. },
  610. save() {
  611. if (this.workList.length > 0) {
  612. let bol;
  613. let _i;
  614. bol = this.workList.every((e, i) => {
  615. _i = i;
  616. return (
  617. Object.prototype.hasOwnProperty.call(e, 'pickList') &&
  618. e.pickList.length > 0
  619. );
  620. });
  621. if (!bol) {
  622. this.$message.warning(
  623. `生成工单${this.workList[_i].code}领料不能为空`
  624. );
  625. return false;
  626. }
  627. }
  628. if (this.workList.length > 0) {
  629. let name;
  630. let bol2;
  631. let _i;
  632. this.workList.forEach((e, i) => {
  633. _i = i;
  634. console.log(e.pickList);
  635. bol2 = e.pickList.every((y) => {
  636. name = y.name;
  637. return (
  638. Object.prototype.hasOwnProperty.call(y, 'demandQuantity') &&
  639. Number(y.demandQuantity) > 0
  640. );
  641. });
  642. });
  643. if (!bol2) {
  644. this.$message.warning(
  645. `${this.workList[_i].code}的${name}数量不能为空`
  646. );
  647. return false;
  648. }
  649. }
  650. let _arr = [];
  651. _arr = this.workList.map((m) => {
  652. m.instanceList = [];
  653. m.bomDetailDTOSList = [];
  654. m.pickList.forEach((e) => {
  655. if (
  656. Object.prototype.hasOwnProperty.call(e, 'isBom') &&
  657. e.isBom == 1
  658. ) {
  659. m.bomDetailDTOSList.push(e);
  660. } else {
  661. m.instanceList.push(e);
  662. }
  663. });
  664. m.workOrderId = m.id;
  665. return {
  666. ...m
  667. };
  668. });
  669. this.loadingBtn = true;
  670. // _arr.forEach((item) => {
  671. // item.pickList.forEach((it) => {
  672. // const warehousePick = [];
  673. // if (it.warehouseIdList.length != 0) {
  674. // it.warehouseIdList.forEach((i) => {
  675. // const data = it.warehouseList.find((ii) => ii.id == i);
  676. // if (data) {
  677. // warehousePick.push({
  678. // availableCountBase: data.availableCountBase,
  679. // demandQuantity: data.demandQuantity,
  680. // warehouseId: data.id
  681. // });
  682. // }
  683. // });
  684. // }
  685. // it.warehousePick = warehousePick;
  686. // });
  687. // });
  688. console.log(_arr, '_arr');
  689. // return;
  690. // if (this.clientEnvironmentId == 21) {
  691. // let param = {
  692. // workOrderId: this.workListIds[0],
  693. // pickingCode: this.pickCode
  694. // };
  695. // znfindVoucherList(param).then((res) => {
  696. // this.loadingBtn = false;
  697. // this.$message.success('领料成功');
  698. // });
  699. // }
  700. let param = {
  701. allPickList: _arr,
  702. pickName: this.pickName,
  703. pickCode: this.pickCode
  704. };
  705. batchSave(param)
  706. .then((res) => {
  707. this.loadingBtn = false;
  708. this.$message.success('领料成功');
  709. this.$emit('close', true);
  710. })
  711. .catch((err) => {
  712. this.loadingBtn = false;
  713. });
  714. },
  715. fullscreen() {
  716. this.isFullscreen = !this.isFullscreen;
  717. }
  718. },
  719. created() {
  720. this.getList();
  721. }
  722. };
  723. </script>
  724. <style lang="scss" scoped>
  725. .table_content {
  726. margin-bottom: 10px;
  727. }
  728. .tableZ_box {
  729. border: 1px solid #e3e5e5;
  730. margin: 6px 0;
  731. &:last-child {
  732. border-bottom: none;
  733. }
  734. .row {
  735. width: 100%;
  736. display: flex;
  737. }
  738. .col {
  739. width: calc(100% / 5);
  740. display: flex;
  741. align-items: center;
  742. min-width: 200px;
  743. min-height: 32px;
  744. border-bottom: 1px solid #e3e5e5;
  745. border-right: 1px solid #e3e5e5;
  746. &:last-child {
  747. border-right: none;
  748. }
  749. .name {
  750. display: flex;
  751. align-items: center;
  752. padding: 4px;
  753. width: 80px;
  754. height: 100%;
  755. background-color: #d0e4d5;
  756. color: #000;
  757. }
  758. .content {
  759. padding: 4px 6px;
  760. color: #000;
  761. }
  762. }
  763. .pd6 {
  764. padding: 0 6px;
  765. }
  766. }
  767. ::v-deep .pick-input.el-input--medium .el-input__inner {
  768. height: 22px;
  769. line-height: 22px;
  770. }
  771. // ::v-deep .el-select__tags {
  772. // flex-wrap: nowrap;
  773. // overflow: auto;
  774. // }
  775. // ::v-deep .el-select__tags-text {
  776. // max-width: 90px;
  777. // }
  778. // ::v-deep .el-select__tags::-webkit-scrollbar {
  779. // height: 2px !important;
  780. // }
  781. </style>
  782. <style>
  783. /* :v-deep .el-form-item__error {
  784. bottom: -6px !important;
  785. } */
  786. </style>