index.vue 25 KB

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