index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. <template>
  2. <div id="stockManagement_index">
  3. <el-card shadow="never">
  4. <el-form :model="formData" ref="formName" label-width="80px">
  5. <el-row :gutter="10">
  6. <el-col :span="6">
  7. <el-form-item label="入库时间" prop="time">
  8. <el-date-picker
  9. class="w100"
  10. size="small"
  11. v-model="formData.time"
  12. type="daterange"
  13. range-separator="至"
  14. start-placeholder="开始日期"
  15. end-placeholder="结束日期"
  16. value-format="yyyy-MM-dd"
  17. ></el-date-picker>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="6">
  21. <el-form-item label="入库单号" prop="bizNo">
  22. <el-input
  23. size="small"
  24. class="w100"
  25. placeholder="请输入"
  26. v-model="formData.bizNo"
  27. ></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="6">
  31. <el-form-item label="入库类型" prop="bizType">
  32. <el-select
  33. style="width: 100%"
  34. filterable
  35. placeholder="请选择"
  36. v-model="formData.bizType"
  37. clearable
  38. >
  39. <el-option
  40. v-for="item in sceneState"
  41. :key="item.code"
  42. :value="item.code + ''"
  43. :label="item.label"
  44. ></el-option>
  45. </el-select>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="6">
  49. <el-form-item label="物品编码" prop="categoryCode">
  50. <el-input
  51. size="small"
  52. class="w100"
  53. placeholder="请输入"
  54. v-model="formData.categoryCode"
  55. ></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label="物品名称" prop="categoryName">
  60. <el-input
  61. size="small"
  62. class="w100"
  63. placeholder="请输入"
  64. v-model="formData.categoryName"
  65. ></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="6">
  69. <el-form-item label="状态" prop="status">
  70. <el-select
  71. filterable
  72. size="small"
  73. class="w100"
  74. v-model="formData.status"
  75. placeholder="请选择"
  76. clearable
  77. >
  78. <el-option
  79. v-for="item in auditStatus"
  80. :key="item.code"
  81. :value="item.code"
  82. :label="item.label"
  83. ></el-option>
  84. </el-select>
  85. </el-form-item>
  86. </el-col>
  87. <!-- <el-col :span="6">
  88. <el-form-item label="组织机构:" prop="deptIds">
  89. <auth-selection
  90. v-model="formData.deptIds"
  91. style="width: 100%"
  92. ></auth-selection>
  93. </el-form-item>
  94. </el-col> -->
  95. <el-col :span="6" style="height: 42px;">
  96. <el-form-item label="所属工厂" prop="factoryId">
  97. <el-select
  98. filterable
  99. placeholder="请选择"
  100. v-model="formData.factoryId"
  101. clearable
  102. class="w100"
  103. @change="getTreeData"
  104. >
  105. <el-option
  106. v-for="item in factoryList"
  107. :key="item.id"
  108. :label="item.name"
  109. :value="item.id"
  110. ></el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }" style="height: 42px;">
  115. <el-form-item label="仓库名称" prop="warehouseId">
  116. <el-select
  117. filterable
  118. placeholder="请选择"
  119. v-model="formData.warehouseId"
  120. clearable
  121. class="w100"
  122. >
  123. <el-option
  124. v-for="item in warehouseList"
  125. :key="item.id"
  126. :label="item.name"
  127. :value="item.id"
  128. ></el-option>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="6">
  133. <el-form-item label="颜色" prop="colorKey">
  134. <el-input
  135. size="small"
  136. class="w100"
  137. placeholder="请输入"
  138. v-model="formData.colorKey"
  139. ></el-input>
  140. </el-form-item>
  141. </el-col>
  142. <el-col :span="6">
  143. <el-form-item label="型号" prop="modelType">
  144. <el-input
  145. size="small"
  146. class="w100"
  147. placeholder="请输入"
  148. v-model="formData.modelType"
  149. ></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col
  153. style="
  154. display: flex;
  155. justify-content: flex-end;
  156. margin-bottom: 10px;
  157. "
  158. :span="6"
  159. >
  160. <div>
  161. <el-button icon="el-icon-refresh-left" size="small" @click="reset"
  162. >重置</el-button
  163. >
  164. <el-button
  165. type="primary"
  166. icon="el-icon-search"
  167. size="small"
  168. @click="search"
  169. >搜索</el-button
  170. >
  171. </div>
  172. </el-col>
  173. </el-row>
  174. </el-form>
  175. <ele-pro-table
  176. ref="table"
  177. :columns="columns"
  178. height="calc(100vh-300px)"
  179. :pageSize="20"
  180. :datasource="datasource"
  181. @cell-click="cellClick"
  182. v-loading="loading"
  183. >
  184. <template v-slot:selection="{ row }">
  185. <el-radio class="radio" v-model="currentRow.id" :label="row.id"
  186. ><i></i
  187. ></el-radio>
  188. </template>
  189. <!-- 表头工具栏 -->
  190. <template v-slot:toolbar>
  191. <el-button icon="el-icon-plus" type="primary" @click="add"
  192. >新建</el-button
  193. >
  194. <el-button
  195. icon="el-icon-edit-outline"
  196. type="primary"
  197. @click="priceMaintenance"
  198. v-if="isPrice == 1"
  199. >单价维护</el-button
  200. >
  201. <!-- <el-button icon="el-icon-top" type="primary" @click="shelves"
  202. >上下架</el-button
  203. > -->
  204. <el-button icon="el-icon-receiving" type="primary" @click="outbound"
  205. >出库</el-button
  206. >
  207. <el-button icon="el-icon-printer" type="primary" @click="print"
  208. >打印</el-button
  209. >
  210. <el-button icon="el-icon-printer" type="primary" @click="printkEnter" v-if="$hasPermission('wms:outin:printIn')"
  211. >打印入库单</el-button
  212. >
  213. <el-button icon="el-icon-printer" type="primary" @click="handlePrint('printTemplateTrRef')" v-if="$hasPermission('wms:outin:printIn1')"
  214. >打印采购入库单</el-button
  215. >
  216. <!-- <el-button
  217. icon="el-icon-plus"
  218. v-if="clientEnvironmentId == 4"
  219. type="primary"
  220. @click="exportExcel"
  221. >导入</el-button
  222. > -->
  223. </template>
  224. <!-- 状态 -->
  225. <template v-slot:verifyStatus="{ row }">
  226. <span :class="status[row.verifyStatus]?.class">
  227. {{ status[row.verifyStatus]?.label }}
  228. </span>
  229. </template>
  230. <!-- 单号链接 -->
  231. <template v-slot:bizNo="{ row }">
  232. <el-link type="primary" @click="details(row)">
  233. {{ row.bizNo }}
  234. </el-link>
  235. </template>
  236. <!-- 操作列 -->
  237. <template v-slot:action="{ row }">
  238. <el-link
  239. type="success"
  240. :underline="false"
  241. icon="el-icon-position"
  242. v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
  243. @click="submit(row)"
  244. >
  245. 提交
  246. </el-link>
  247. <el-link
  248. type="primary"
  249. :underline="false"
  250. icon="el-icon-view"
  251. @click="edit(row)"
  252. v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
  253. >
  254. 修改
  255. </el-link>
  256. <!-- <el-link v-if="row.verifyStatus == 2 && clientEnvironmentId == 3" type="primary" :underline="false"
  257. icon="el-icon-view" @click="quality(row)">
  258. 质检
  259. </el-link> -->
  260. <el-link
  261. v-if="row.verifyStatus == 2"
  262. type="primary"
  263. :underline="false"
  264. icon="el-icon-sort-up"
  265. @click="details(row)"
  266. >
  267. 上架
  268. </el-link>
  269. <el-link
  270. v-if="row.verifyStatus == 2"
  271. type="primary"
  272. :underline="false"
  273. icon="el-icon-sort-down"
  274. @click="details(row)"
  275. >
  276. 下架
  277. </el-link>
  278. <el-link
  279. type="primary"
  280. v-if="row.verifyStatus == 0 || row.verifyStatus == 3"
  281. :underline="false"
  282. icon="el-icon-delete"
  283. @click="deleted(row)"
  284. >
  285. 删除
  286. </el-link>
  287. </template>
  288. <template v-slot:bizType="{ row }">
  289. {{ handleBizType(row.bizType) }}
  290. </template>
  291. <template v-slot:assetType="{ row }">
  292. {{ handleAssetType(row.extInfo.assetType) }}
  293. </template>
  294. </ele-pro-table>
  295. </el-card>
  296. <printQRCode ref="printQRCodeRef"></printQRCode>
  297. <printStockEnter ref="printStockEnterRef" :groupName="groupName"></printStockEnter>
  298. <printTemplateTr ref="printTemplateTrRef" :groupName="groupName"></printTemplateTr>
  299. <!-- <priceMaintenanceDialog ref="priceMaintenanceDialogRef" /> -->
  300. </div>
  301. </template>
  302. <script>
  303. import storageApi from '@/api/warehouseManagement';
  304. import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
  305. /* import priceMaintenanceDialog from './components/priceMaintenanceDialog.vue'; */
  306. import { allCategoryLevel } from '@/api/classifyManage';
  307. import { parameterGetByCode } from '@/api/sys/index.js';
  308. ('@/view/warehouseManagement/stockManagement/components/priceMaintenanceDialog.vue');
  309. import printQRCode from './components/printQRCode.vue';
  310. import printStockEnter from './components/printStockEnter.vue';
  311. import printTemplateTr from './components/print-template-tr.vue';
  312. import {
  313. warehousingType,
  314. sceneState,
  315. auditStatus,
  316. useDict
  317. } from '@/utils/dict/index';
  318. import { enterprisePage } from '@/api/bpm/index.js';
  319. export default {
  320. components: { printQRCode, printStockEnter, printTemplateTr },
  321. data() {
  322. return {
  323. auditStatus,
  324. warehousingType,
  325. sceneState,
  326. codeList: [],
  327. factoryList: [],
  328. warehouseList: [],
  329. tableData: [],
  330. formData: {
  331. deptIds: '',
  332. categoryCode: '',
  333. categoryName: '',
  334. sourceBizNo: '',
  335. startTime: '',
  336. endTime: '',
  337. status: '',
  338. factoryId: '',
  339. time: [],
  340. warehouseId: '',
  341. colorKey: '',
  342. modelType: '',
  343. // type: 1
  344. },
  345. loading: false,
  346. isPrice: 1,
  347. total: 0,
  348. status: [
  349. { label: '未审核', class: 'ele-text-info' },
  350. { label: '审核中', class: 'ele-text-primary' },
  351. { label: '审核通过', class: 'ele-text-success' },
  352. { label: '驳回', class: 'ele-text-danger' }
  353. ],
  354. currentRow: {},
  355. columns: [
  356. {
  357. slot: 'selection',
  358. label: '选择',
  359. width: 50,
  360. align: 'center'
  361. },
  362. {
  363. type: 'index',
  364. label: '序号',
  365. width: 50,
  366. align: 'center'
  367. },
  368. {
  369. prop: 'bizNo',
  370. label: '单号',
  371. align: 'center',
  372. slot: 'bizNo',
  373. showOverflowTooltip: true,
  374. width: 150
  375. },
  376. {
  377. prop: 'warehouseName',
  378. label: '仓库名称',
  379. align: 'center',
  380. showOverflowTooltip: true,
  381. minWidth: 100,
  382. },
  383. {
  384. prop: 'bizType',
  385. slot: 'bizType',
  386. label: '入库类型',
  387. align: 'center',
  388. showOverflowTooltip: true,
  389. width: 100
  390. },
  391. {
  392. prop: 'assetType',
  393. slot: 'assetType',
  394. label: '物品类型',
  395. align: 'center',
  396. showOverflowTooltip: true,
  397. width: 120
  398. },
  399. {
  400. prop: 'categoryNames',
  401. label: '物品名称',
  402. align: 'center',
  403. showOverflowTooltip: true,
  404. width: 150
  405. },
  406. {
  407. prop: 'categoryCodes',
  408. label: '物品编码',
  409. align: 'center',
  410. showOverflowTooltip: true,
  411. width: 150
  412. },
  413. {
  414. prop: 'totalQuantity',
  415. label: '数量',
  416. align: 'center',
  417. showOverflowTooltip: true
  418. },
  419. {
  420. prop: 'specification',
  421. label: '规格',
  422. align: 'center',
  423. showOverflowTooltip: true
  424. },
  425. {
  426. prop: 'modelType',
  427. label: '型号',
  428. align: 'center',
  429. showOverflowTooltip: true
  430. },
  431. {
  432. prop: 'colorKey',
  433. label: '颜色',
  434. align: 'center',
  435. showOverflowTooltip: true
  436. },
  437. {
  438. prop: 'modelKey',
  439. label: '机型',
  440. align: 'center',
  441. showOverflowTooltip: true
  442. },
  443. {
  444. prop: 'sourceBizNo',
  445. label: '来源单据',
  446. align: 'center',
  447. showOverflowTooltip: true
  448. },
  449. {
  450. prop: 'createUserName',
  451. label: '入库人',
  452. align: 'center',
  453. showOverflowTooltip: true
  454. },
  455. {
  456. width: 160,
  457. prop: 'storageTime',
  458. label: '入库时间',
  459. align: 'center',
  460. showOverflowTooltip: true
  461. },
  462. {
  463. prop: 'verifyName',
  464. label: '审核人',
  465. align: 'center',
  466. showOverflowTooltip: true
  467. },
  468. // {
  469. // prop: 'startTime',
  470. // label: '开始时间',
  471. // align: 'center',
  472. // showOverflowTooltip: true
  473. // },
  474. {
  475. prop: 'outInStatus',
  476. label: '入库状态',
  477. align: 'center',
  478. showOverflowTooltip: true,
  479. width: 100,
  480. formatter: (row, column, cellValue) => {
  481. if (row.verifyStatus == 2) {
  482. return row.outInStatus == 1
  483. ? '预入库'
  484. : row.outInStatus == 2
  485. ? '部分入库'
  486. : row.outInStatus == 3
  487. ? '已入库'
  488. : '';
  489. }
  490. }
  491. },
  492. {
  493. prop: 'verifyStatus',
  494. label: '状态',
  495. align: 'center',
  496. slot: 'verifyStatus',
  497. showOverflowTooltip: true,
  498. width: 100
  499. },
  500. {
  501. columnKey: 'action',
  502. label: '操作',
  503. width: 250,
  504. align: 'center',
  505. slot: 'action',
  506. showOverflowTooltip: true
  507. }
  508. ],
  509. groupName:'',
  510. };
  511. },
  512. computed: {
  513. clientEnvironmentId() {
  514. return this.$store.state.user.info.clientEnvironmentId;
  515. },
  516. // 是否开启响应式布局
  517. styleResponsive() {
  518. return this.$store.state.theme.styleResponsive;
  519. }
  520. },
  521. created() {
  522. //仓库出入库是否显示金额(0:不显示 1:显示)
  523. parameterGetByCode({
  524. code: 'wms_price'
  525. }).then((res) => {
  526. this.isPrice = res.value;
  527. });
  528. },
  529. mounted() {
  530. this.getCompanyInfo();
  531. this.getTypeList();
  532. this.getFactoryList();
  533. this.getTreeData();
  534. },
  535. methods: {
  536. getCompanyInfo() {
  537. enterprisePage({
  538. pageNum: 1,
  539. size: 200
  540. }).then((res) => {
  541. if (res.list?.length > 0) {
  542. this.groupName = res.list[0].name;
  543. }
  544. });
  545. },
  546. async getTreeData() {
  547. this.formData.warehouseId = '';
  548. try {
  549. let res = await storageApi.getWarehouseTrees({
  550. factoryId: this.formData.factoryId
  551. });
  552. if (res?.code === '0') {
  553. this.warehouseList = res.data;
  554. }
  555. } catch (error) {
  556. console.log(error);
  557. }
  558. },
  559. //获取工厂列表
  560. async getFactoryList() {
  561. const res = await warehouseDefinition.getFactoryarea({
  562. pageNum: 1,
  563. size: 9999,
  564. type: 1
  565. });
  566. this.factoryList = res.list;
  567. },
  568. // 单击获取id
  569. cellClick(row) {
  570. this.currentRow = row;
  571. },
  572. shelves() {
  573. console.log('上架');
  574. },
  575. unShelves() {
  576. console.log('下架');
  577. },
  578. priceMaintenance() {
  579. if (Object.keys(this.currentRow).length == 0) {
  580. return this.$message.error('请选择单据');
  581. } else {
  582. if (this.currentRow.verifyStatus == 2) {
  583. this.$router.push({
  584. path: '/warehouseManagement/stockManagement/priceMaintenance',
  585. query: {
  586. ids: this.currentRow.id
  587. }
  588. });
  589. /* this.$refs.priceMaintenanceDialogRef.open(this.currentRow.id); */
  590. } else {
  591. this.$message.error('该单据未审核通过');
  592. }
  593. }
  594. },
  595. async outbound() {
  596. if (Object.keys(this.currentRow).length == 0) {
  597. return this.$message.error('请选择单据');
  598. } else {
  599. if (this.currentRow.verifyStatus == 2) {
  600. const res = await storageApi.getInboundDetailsById(
  601. this.currentRow.id
  602. );
  603. const arr = [];
  604. for (const key in res.outInDetailList) {
  605. for (const k in res.outInDetailList[key]
  606. .outInDetailRecordRequestList) {
  607. arr.push({
  608. ...res.outInDetailList[key].outInDetailRecordRequestList[k]
  609. });
  610. }
  611. }
  612. let ids = arr.map((item) => item.id).join(',');
  613. this.$router.push({
  614. path: '/warehouseManagement/outgoingManagement/add',
  615. query: {
  616. ids,
  617. bizType: this.currentRow.bizType,
  618. assetType: this.currentRow.extInfo.assetType
  619. }
  620. });
  621. } else {
  622. this.$message.error('该单据未审核通过');
  623. }
  624. }
  625. },
  626. handleAssetType(r) {
  627. let arr = r?.split(',') || [];
  628. const filteredData = this.codeList.filter((item) =>
  629. arr.includes(item.dictCode)
  630. );
  631. return filteredData.map((item) => item.dictValue).join(',');
  632. },
  633. async getTypeList() {
  634. const { data } = await allCategoryLevel();
  635. this.codeList = data.map((item) => {
  636. return { dictCode: item.id, dictValue: item.name };
  637. });
  638. },
  639. submit(row) {
  640. this.$confirm('此操作将提交流程, 是否继续?', '提示', {
  641. confirmButtonText: '确定',
  642. cancelButtonText: '取消',
  643. type: 'warning'
  644. })
  645. .then(async () => {
  646. this.loading = true;
  647. const data = await storageApi.submitTwo({ outInId: row.id });
  648. this.loading = false;
  649. if (data.code == 0) {
  650. this.$message.success(data.message);
  651. this.getList();
  652. }
  653. })
  654. .catch(() => {});
  655. },
  656. handleBizType(code) {
  657. for (const key in this.sceneState) {
  658. if (this.sceneState[key].code == code) {
  659. return this.sceneState[key].label;
  660. }
  661. }
  662. },
  663. async datasource({ page, limit, where }) {
  664. const params = Object.assign({}, this.formData);
  665. if (params.time?.length) {
  666. params.startTime = params.time[0];
  667. params.endTime = params.time[1];
  668. }
  669. delete params.time;
  670. // params.bizStatus = 1;
  671. const res = await storageApi.getInboundList({
  672. pageNum: page,
  673. size: limit,
  674. type: 1,
  675. ...params
  676. });
  677. return res;
  678. },
  679. getAuditStatus: useDict(auditStatus),
  680. getList() {
  681. this.$refs.table.reload();
  682. },
  683. add(row) {
  684. const query = {};
  685. if (row?.id) {
  686. query.id = row.id;
  687. }
  688. this.$router.push({
  689. path: '/warehouseManagement/stockManagement/add'
  690. // query
  691. });
  692. },
  693. quality(row) {
  694. this.$router.push({
  695. path: '/warehouseManagement/stockManagement/quality',
  696. query: {
  697. id: row.id
  698. }
  699. });
  700. },
  701. exportExcel() {
  702. this.$router.push({
  703. path: '/warehouseManagement/stockManagement/add_export'
  704. // query
  705. });
  706. },
  707. edit(row) {
  708. this.$router.push({
  709. path: '/warehouseManagement/stockManagement/add',
  710. query: {
  711. detailId: row.id
  712. }
  713. });
  714. },
  715. details(row) {
  716. this.$router.push({
  717. path: '/warehouseManagement/stockManagement/details',
  718. query: {
  719. id: row.id,
  720. verifyStatus: row.verifyStatus
  721. }
  722. });
  723. },
  724. async deleted(row) {
  725. this.$confirm('是否确定删除?', '提示', {
  726. confirmButtonText: '确定',
  727. cancelButtonText: '取消',
  728. type: 'warning'
  729. })
  730. .then(async () => {
  731. const data = await storageApi.delete([row.id]);
  732. if (data.code == '0') {
  733. this.$message.success('删除成功!');
  734. this.getList();
  735. }
  736. })
  737. .catch(() => {});
  738. },
  739. handleCurrentChange() {
  740. this.getList();
  741. },
  742. handleSizeChange() {
  743. this.formData.page = 1;
  744. this.getList();
  745. },
  746. search() {
  747. this.formData.page = 1;
  748. this.getList();
  749. },
  750. reset() {
  751. this.$refs.formName.resetFields();
  752. this.search();
  753. },
  754. print() {
  755. if (!this.currentRow.id) {
  756. return this.$message({
  757. message: '请先选择单据',
  758. type: 'warning',
  759. duration: 2000
  760. });
  761. }
  762. if (this.currentRow.verifyStatus !== 2) {
  763. return this.$message({
  764. message: '该单据未审核通过',
  765. type: 'warning',
  766. duration: 2000
  767. });
  768. }
  769. console.log(this.currentRow);
  770. this.$refs.printQRCodeRef.init(this.currentRow.id);
  771. console.log('print');
  772. },
  773. printkEnter() {
  774. if (!this.currentRow.id) {
  775. return this.$message({
  776. message: '请先选择单据',
  777. type: 'warning',
  778. duration: 2000
  779. });
  780. }
  781. this.$refs.printStockEnterRef.init(this.currentRow.id, this.currentRow);
  782. },
  783. handlePrint(refName) {
  784. if (!this.currentRow.id) {
  785. return this.$message({
  786. message: '请先选择单据',
  787. type: 'warning',
  788. duration: 2000
  789. });
  790. }
  791. if (this.currentRow.verifyStatus !== 2) {
  792. return this.$message({
  793. message: '该单据未审核通过',
  794. type: 'warning',
  795. duration: 2000
  796. });
  797. }
  798. this.$refs[refName].init(this.currentRow.id, this.currentRow);
  799. }
  800. }
  801. };
  802. </script>
  803. <style lang="scss" scoped>
  804. #stockManagement_index {
  805. height: calc(100vh - 96px);
  806. width: 100%;
  807. padding: 10px;
  808. box-sizing: border-box;
  809. // element-ui样式穿透
  810. :deep(.el-card) {
  811. height: 100%;
  812. .el-card__body {
  813. height: 100%;
  814. box-sizing: border-box;
  815. display: flex;
  816. flex-direction: column;
  817. .ele-pro-table {
  818. flex: 1;
  819. display: flex;
  820. flex-direction: column;
  821. .el-table {
  822. flex: 1;
  823. // display: flex;
  824. // flex-direction: column;
  825. // .el-table__body-wrapper {
  826. // flex: 1;
  827. // }
  828. }
  829. }
  830. }
  831. .el-form-item {
  832. margin-bottom: 5px !important;
  833. }
  834. }
  835. .w100 {
  836. width: 100% !important;
  837. }
  838. .p20 {
  839. padding: 20px;
  840. }
  841. .mt20 {
  842. margin-top: 20px;
  843. }
  844. .mt10 {
  845. margin-top: 10px;
  846. }
  847. .el-form {
  848. overflow: hidden;
  849. }
  850. .float-right {
  851. float: right;
  852. text-align: right;
  853. margin-right: 20px;
  854. }
  855. .right {
  856. text-align: right;
  857. }
  858. .col {
  859. color: #aaa;
  860. }
  861. .pr10 {
  862. padding-right: 10px;
  863. }
  864. }
  865. </style>