index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never" v-loading="loading">
  4. <div class="switch">
  5. <div class="switch_left">
  6. <ul>
  7. <li
  8. v-for="item in tabOptions"
  9. :key="item.key"
  10. :class="{ active: activeComp == item.key }"
  11. @click="activeComp = item.key"
  12. style="height: 42px; line-height: 38px"
  13. >
  14. <el-badge :value="toDoReminder[item.reminder] || 0" class="item">
  15. {{ item.name }}
  16. </el-badge>
  17. </li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div class="main" style="padding: 0 10px">
  22. <div v-if="activeComp == 'saleorder'">
  23. <div class="ele-border-lighter form-content" v-loading="loading">
  24. <search-table @search="reload"></search-table>
  25. <!-- 数据表格 -->
  26. <ele-pro-table
  27. ref="table"
  28. :columns="columns"
  29. :datasource="datasource"
  30. height="calc(100vh - 365px)"
  31. style="margin-bottom: 10px"
  32. full-height="calc(100vh - 116px)"
  33. tool-class="ele-toolbar-form"
  34. :selection.sync="selection"
  35. :page-size="20"
  36. @columns-change="handleColumnChange"
  37. :cache-key="cacheKeyUrl"
  38. >
  39. <!-- 表头工具栏 -->
  40. <template v-slot:toolbar>
  41. <el-button
  42. size="small"
  43. type="primary"
  44. icon="el-icon-plus"
  45. class="ele-btn-icon"
  46. @click="openEdit('add', {})"
  47. >
  48. 新建
  49. </el-button>
  50. <el-button
  51. size="small"
  52. type="danger"
  53. el-icon-delete
  54. class="ele-btn-icon"
  55. @click="allDelBtn"
  56. :disabled="selection?.length === 0"
  57. >
  58. 批量删除
  59. </el-button>
  60. <el-button
  61. type="primary"
  62. size="small"
  63. icon="el-icon-upload2"
  64. @click="uploadFile"
  65. >导入</el-button
  66. >
  67. <exportButton
  68. fileName="采购订单"
  69. apiUrl="/eom/purchaseorder/export"
  70. :params="params"
  71. ></exportButton>
  72. <el-dropdown
  73. trigger="click"
  74. :disabled="selection?.length === 0"
  75. >
  76. <el-button
  77. type="primary"
  78. class="el-icon-printer"
  79. size="small"
  80. >
  81. 打印<i class="el-icon-arrow-down el-icon--right"></i>
  82. </el-button>
  83. <el-dropdown-menu slot="dropdown">
  84. <el-dropdown-item
  85. @click.native="handlePrint('printPurchaseOrderRef')"
  86. >采购订单</el-dropdown-item
  87. >
  88. </el-dropdown-menu>
  89. </el-dropdown>
  90. </template>
  91. <!-- 查看详情列 -->
  92. <template v-slot:relationName="{ row }">
  93. <el-link
  94. type="primary"
  95. :underline="false"
  96. @click="opencontractDetail(row)"
  97. >
  98. {{ row.relationName }}
  99. </el-link>
  100. </template>
  101. <template v-slot:orderNo="{ row }">
  102. <el-link
  103. type="primary"
  104. :underline="false"
  105. @click="openorderDetail(row)"
  106. >
  107. {{ row.orderNo }}
  108. </el-link>
  109. </template>
  110. <!-- 操作列 -->
  111. <template v-slot:action="{ row }">
  112. <el-link
  113. type="primary"
  114. :underline="false"
  115. icon="el-icon-edit"
  116. v-if="
  117. (isNeed_process_is_close &&
  118. [0, 3].includes(row.orderStatus)) ||
  119. !isNeed_process_is_close
  120. "
  121. @click="openEdit('edit', row)"
  122. >
  123. 修改
  124. </el-link>
  125. <el-link
  126. type="primary"
  127. :underline="false"
  128. icon="el-icon-plus"
  129. @click="saleOrderSubmit(row)"
  130. v-if="
  131. isNeed_process_is_close && [0, 3].includes(row.orderStatus)
  132. "
  133. >
  134. 提交
  135. </el-link>
  136. <el-popconfirm
  137. class="ele-action"
  138. title="确定要删除此信息吗?"
  139. v-if="
  140. (isNeed_process_is_close &&
  141. [0, 3].includes(row.orderStatus)) ||
  142. !isNeed_process_is_close
  143. "
  144. @confirm="remove([row.id])"
  145. >
  146. <template v-slot:reference>
  147. <el-link
  148. type="danger"
  149. :underline="false"
  150. icon="el-icon-delete"
  151. >
  152. 删除
  153. </el-link>
  154. </template>
  155. </el-popconfirm>
  156. <el-link
  157. type="primary"
  158. :underline="false"
  159. icon="el-icon-plus"
  160. @click="handleCommand('outsourceSend', row)"
  161. v-if="
  162. ['3', '4', '5', '6'].includes(row.sourceType) &&
  163. [2].includes(row.orderStatus) &&
  164. row.progress < 200
  165. "
  166. >
  167. 创建委外发货单
  168. </el-link>
  169. <el-link
  170. type="primary"
  171. :underline="false"
  172. icon="el-icon-plus"
  173. @click="handleCommand('invoice', row)"
  174. v-if="
  175. !['3', '4', '5', '6'].includes(row.sourceType) &&
  176. [2].includes(row.orderStatus) &&
  177. row.progress < 200
  178. "
  179. >
  180. 创建收货单
  181. </el-link>
  182. <el-link
  183. type="primary"
  184. :underline="false"
  185. icon="el-icon-plus"
  186. @click="handleCommand('invoiceManage', row)"
  187. v-if="!row.hasInvoiceApply && [2].includes(row.orderStatus)"
  188. >
  189. 新增发票
  190. </el-link>
  191. <el-link
  192. v-if="$hasPermission('eom:purchaseorder:rowExport')"
  193. type="primary"
  194. :underline="false"
  195. icon="el-icon-download"
  196. @click="exportRowInfo(row)"
  197. >
  198. 导出
  199. </el-link>
  200. </template>
  201. </ele-pro-table>
  202. </div>
  203. </div>
  204. <div v-if="activeComp == 'outsourceSend'">
  205. <outSourceSend @getToDoReminder="getToDoReminder"></outSourceSend>
  206. </div>
  207. <div v-if="activeComp == 'invoice'">
  208. <invoice @getToDoReminder="getToDoReminder"></invoice>
  209. </div>
  210. <div v-if="activeComp == 'invoiceConfirm'">
  211. <invoiceConfirm @getToDoReminder="getToDoReminder"></invoiceConfirm>
  212. </div>
  213. <div v-if="activeComp == 'returnorder'" class="returnorder">
  214. <return-goods @getToDoReminder="getToDoReminder"></return-goods>
  215. </div>
  216. <div v-if="activeComp == 'exceptionList'">
  217. <exceptionList :relationType="'2'" @getToDoReminder="getToDoReminder">
  218. </exceptionList>
  219. </div>
  220. <div v-if="activeComp == 'accountstatement'">
  221. <accountstatement
  222. @getToDoReminder="getToDoReminder"
  223. ></accountstatement>
  224. </div>
  225. </div>
  226. </el-card>
  227. <add-dialog
  228. ref="addDialogRef"
  229. @done="reload"
  230. :isRequired="isRequired"
  231. ></add-dialog>
  232. <add-invoice-dialog
  233. ref="invoiceDialogRef"
  234. @done="reload"
  235. ></add-invoice-dialog>
  236. <add-return-goods-dialog
  237. ref="addReturnGoodsRef"
  238. @done="reload"
  239. ></add-return-goods-dialog>
  240. <contractr-detail ref="contractDetailRef"></contractr-detail>
  241. <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
  242. <purchasingDetail ref="purchasingDetailRef"></purchasingDetail>
  243. <purchasePlanDetail ref="purchasePlanDetailRef"></purchasePlanDetail>
  244. <inquiryDetail ref="inquiryDetailRef"></inquiryDetail>
  245. <addOutSourceSend
  246. ref="addOrEditDialogRef"
  247. :add-or-edit-dialog-flag.sync="addOrEditDialogFlag"
  248. v-if="addOrEditDialogFlag"
  249. @done="reload"
  250. ></addOutSourceSend>
  251. <!-- 多选删除弹窗 -->
  252. <pop-modal
  253. :visible.sync="delVisible"
  254. content="是否确定删除?"
  255. @done="commitBtn"
  256. />
  257. <process-submit-dialog
  258. :isNotNeedProcess="false"
  259. :isCloseRefresh="false"
  260. :processSubmitDialogFlag.sync="processSubmitDialogFlag"
  261. v-if="processSubmitDialogFlag"
  262. ref="processSubmitDialogRef"
  263. @reload="reload"
  264. ></process-submit-dialog>
  265. <addInvoiceManage
  266. :add-or-edit-dialog-flag.sync="addOrEditDialogFlag1"
  267. ref="addOrEditDialogRef"
  268. v-if="addOrEditDialogFlag1"
  269. @reload="reload"
  270. ></addInvoiceManage>
  271. <importDialog
  272. ref="importDialogRef"
  273. @success="reload"
  274. :fileUrl="'/eom/purchaseorder/importTemplate'"
  275. :isWeb="false"
  276. fileName="采购订单导入模板"
  277. apiUrl="/eom/purchaseorder/importFile"
  278. />
  279. <printPurchaseOrder
  280. ref="printPurchaseOrderRef"
  281. :groupName="groupName"
  282. ></printPurchaseOrder>
  283. </div>
  284. </template>
  285. <script>
  286. import searchTable from './components/searchTable.vue';
  287. import addDialog from './components/addDialog.vue';
  288. import invoice from './invoice/index.vue';
  289. import invoiceConfirm from './invoiceConfirm/index.vue';
  290. import detailDialog from './components/detailDialog.vue';
  291. import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
  292. import purchasingDetail from '@/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue';
  293. import purchasePlanDetail from '@/views/purchasingManage/purchasePlanManage/components/detailDialog.vue';
  294. import inquiryDetail from '@/views/purchasingManage/inquiryManage/components/detailDialog.vue';
  295. import addInvoiceDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog';
  296. import addReturnGoodsDialog from '@/views/purchasingManage/purchaseOrder/returnGoods/components/addReturnGoodsDialog';
  297. import addOutSourceSend from '@/views/purchasingManage/purchaseOrder/outSourceSend/components/addOrEditDialog';
  298. import popModal from '@/components/pop-modal';
  299. import accountstatement from './accountstatement/index.vue';
  300. import returnGoods from './returnGoods/index.vue';
  301. import addInvoiceManage from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
  302. import outSourceSend from './outSourceSend/index';
  303. import {
  304. getTableList,
  305. deleteInformation,
  306. getExport
  307. } from '@/api/purchasingManage/purchaseOrder';
  308. import dictMixins from '@/mixins/dictMixins';
  309. import { purchaseOrderProgressStatusEnum, reviewStatus } from '@/enum/dict';
  310. import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
  311. import tabMixins from '@/mixins/tableColumnsMixin';
  312. import importDialog from '@/components/upload/import-dialog.vue';
  313. import exportButton from '@/components/upload/exportButton.vue';
  314. import { parameterGetByCode } from '@/api/main/index.js';
  315. import exceptionList from '@/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue';
  316. import { getToDoReminder } from '@/api/common/index';
  317. import { exportTable } from '@/api/system/file/index.js';
  318. import printPurchaseOrder from '@/views/purchasingManage/purchaseOrder/invoice/components/print-PurchaseOrder.vue';
  319. import { enterprisePage } from '@/api/contractManage/contractBook';
  320. export default {
  321. mixins: [dictMixins, tabMixins],
  322. components: {
  323. processSubmitDialog,
  324. exportButton,
  325. searchTable,
  326. returnGoods,
  327. accountstatement,
  328. popModal,
  329. contractrDetail,
  330. addReturnGoodsDialog,
  331. addInvoiceDialog,
  332. invoice,
  333. addDialog,
  334. detailDialog,
  335. outSourceSend,
  336. addOutSourceSend,
  337. addInvoiceManage,
  338. importDialog,
  339. invoiceConfirm,
  340. exceptionList,
  341. purchasingDetail,
  342. purchasePlanDetail,
  343. inquiryDetail,
  344. printPurchaseOrder
  345. },
  346. data() {
  347. return {
  348. activeComp: 'saleorder',
  349. tabOptions: [
  350. { key: 'saleorder', name: '采购订单', reminder: 'purchaseOrderNum' },
  351. {
  352. key: 'outsourceSend',
  353. name: '委外发货单',
  354. reminder: 'outsourcingDeliveryNoteNum'
  355. },
  356. { key: 'invoice', name: '收货单', reminder: 'receiptNum' },
  357. {
  358. key: 'invoiceConfirm',
  359. name: '收货确认单',
  360. reminder: 'receiptConfirmationFormNum'
  361. },
  362. {
  363. key: 'exceptionList',
  364. name: '异常列表',
  365. reminder: 'purchaseExceptionListNum'
  366. },
  367. {
  368. key: 'returnorder',
  369. name: '退货单',
  370. reminder: 'purchaseReturnOrderNum'
  371. },
  372. {
  373. key: 'accountstatement',
  374. name: '对账单',
  375. reminder: 'purchaseStatementAccountNum'
  376. }
  377. ],
  378. selection: [], //单选中集合
  379. delVisible: false, //批量删除弹框状态
  380. loading: false, // 加载状态
  381. processSubmitDialogFlag: false,
  382. addOrEditDialogFlag: false,
  383. addOrEditDialogFlag1: false,
  384. params: {},
  385. groupName: '',
  386. columns: [
  387. {
  388. width: 45,
  389. type: 'selection',
  390. columnKey: 'selection',
  391. align: 'center'
  392. },
  393. {
  394. columnKey: 'index',
  395. label: '序号',
  396. type: 'index',
  397. width: 55,
  398. align: 'center',
  399. showOverflowTooltip: true,
  400. fixed: 'left'
  401. },
  402. {
  403. prop: 'orderNo',
  404. label: '订单编码',
  405. align: 'center',
  406. sortable: true,
  407. slot: 'orderNo',
  408. showOverflowTooltip: true,
  409. minWidth: 200,
  410. fixed: 'left'
  411. },
  412. {
  413. prop: 'sourceTypeName',
  414. label: '订单类型',
  415. align: 'center',
  416. sortable: true,
  417. showOverflowTooltip: true,
  418. minWidth: 200,
  419. fixed: 'left'
  420. },
  421. {
  422. prop: 'progress',
  423. label: '订单进度',
  424. align: 'center',
  425. showOverflowTooltip: true,
  426. formatter: (_row, _column, cellValue) => {
  427. return purchaseOrderProgressStatusEnum.find(
  428. (val) => val.value == _row.progress
  429. )?.label;
  430. },
  431. minWidth: 120
  432. },
  433. {
  434. prop: 'relationType',
  435. label: '来源单据类型',
  436. align: 'center',
  437. showOverflowTooltip: true,
  438. minWidth: 150,
  439. formatter: (_row, _column, cellValue) => {
  440. return _row.relationType == 1
  441. ? '采购需求单'
  442. : _row.relationType == 2
  443. ? '采购计划单'
  444. : _row.relationType == 3
  445. ? '采购核价单'
  446. : _row.relationType == 4
  447. ? '采购合同'
  448. : '';
  449. }
  450. },
  451. {
  452. prop: 'relationName',
  453. label: '来源单据',
  454. align: 'center',
  455. slot: 'relationName',
  456. showOverflowTooltip: true,
  457. minWidth: 250
  458. },
  459. // {
  460. // prop: 'deliveryDate',
  461. // label: '交货日期',
  462. // align: 'center',
  463. // showOverflowTooltip: true,
  464. // minWidth: 200
  465. // },
  466. // {
  467. // prop: 'purchaseTypeName',
  468. // label: '采购订单类型',
  469. // align: 'center',
  470. // showOverflowTooltip: true,
  471. // minWidth: 140
  472. // },
  473. {
  474. prop: 'partaName',
  475. label: '采购方名称',
  476. align: 'center',
  477. showOverflowTooltip: true,
  478. minWidth: 200
  479. },
  480. {
  481. prop: 'partaLinkName',
  482. label: '采购方联系人',
  483. align: 'center',
  484. showOverflowTooltip: true,
  485. minWidth: 130
  486. },
  487. {
  488. prop: 'partaTel',
  489. label: '采购方联系电话',
  490. align: 'center',
  491. showOverflowTooltip: true,
  492. minWidth: 130
  493. },
  494. {
  495. prop: 'productNames',
  496. label: '名称',
  497. align: 'center',
  498. showOverflowTooltip: true,
  499. minWidth: 200
  500. },
  501. {
  502. prop: 'productCodes',
  503. label: '编码',
  504. align: 'center',
  505. showOverflowTooltip: true,
  506. minWidth: 140
  507. },
  508. {
  509. prop: 'batchNos',
  510. label: '批次号',
  511. align: 'center',
  512. showOverflowTooltip: true,
  513. minWidth: 140
  514. },
  515. {
  516. prop: 'productCount',
  517. label: '数量',
  518. align: 'center',
  519. showOverflowTooltip: true,
  520. minWidth: 140
  521. },
  522. {
  523. prop: 'inboundCount',
  524. label: '收货数量',
  525. align: 'center',
  526. showOverflowTooltip: true,
  527. minWidth: 140
  528. },
  529. {
  530. prop: 'partbName',
  531. label: '供应商名称',
  532. align: 'center',
  533. showOverflowTooltip: true,
  534. minWidth: 250
  535. },
  536. {
  537. prop: 'partbLinkName',
  538. label: '供应商联系人',
  539. align: 'center',
  540. showOverflowTooltip: true,
  541. minWidth: 120
  542. },
  543. {
  544. prop: 'partbTel',
  545. label: '供应商联系电话',
  546. align: 'center',
  547. showOverflowTooltip: true,
  548. minWidth: 130
  549. },
  550. {
  551. prop: 'isInspection',
  552. label: '是否来料检',
  553. align: 'center',
  554. showOverflowTooltip: true,
  555. minWidth: 130,
  556. formatter: (_row, _column, cellValue) => {
  557. return cellValue == 1 ? '是' : '否';
  558. }
  559. },
  560. {
  561. prop: 'payAmount',
  562. label: '金额(元)',
  563. align: 'center',
  564. showOverflowTooltip: true,
  565. minWidth: 140
  566. },
  567. {
  568. prop: 'createUserName',
  569. label: '创建人',
  570. align: 'center',
  571. showOverflowTooltip: true,
  572. minWidth: 170
  573. },
  574. {
  575. prop: 'createTime',
  576. label: '创建时间',
  577. align: 'center',
  578. showOverflowTooltip: true,
  579. minWidth: 170
  580. },
  581. {
  582. prop: 'orderStatus',
  583. label: '审核状态',
  584. align: 'center',
  585. showOverflowTooltip: true,
  586. minWidth: 100,
  587. formatter: (_row, _column, cellValue) => {
  588. return reviewStatus[_row.orderStatus];
  589. }
  590. },
  591. {
  592. columnKey: 'action',
  593. label: '操作',
  594. width: 260,
  595. align: 'center',
  596. resizable: false,
  597. slot: 'action',
  598. showOverflowTooltip: true,
  599. fixed: 'right'
  600. }
  601. ],
  602. cacheKeyUrl: 'eos-5f2ac512-purchaseOrder-saleorder',
  603. isRequired: true,
  604. timeR: null,
  605. toDoReminder: {}
  606. };
  607. },
  608. computed: {},
  609. created() {
  610. this.requestDict('客户状态');
  611. parameterGetByCode({
  612. code: 'order_person_info'
  613. }).then((res) => {
  614. if (res.value) {
  615. this.isRequired = res.value === '1';
  616. }
  617. });
  618. this.getToDoReminder();
  619. this.timeR = setInterval(() => {
  620. this.getToDoReminder();
  621. }, 60000);
  622. },
  623. beforeDestroy() {
  624. clearInterval(this.timeR);
  625. },
  626. methods: {
  627. getToDoReminder() {
  628. getToDoReminder().then((res) => {
  629. this.toDoReminder = res;
  630. });
  631. },
  632. //更多菜单
  633. handleCommand(command, row) {
  634. console.log(command, row);
  635. if (command === 'invoice') {
  636. this.$refs.invoiceDialogRef.open('add', {}, row.id);
  637. }
  638. if (command === 'returnOrder') {
  639. this.$refs.addReturnGoodsRef.open('add', {});
  640. }
  641. if (command === 'outsourceSend') {
  642. this.addOrEditDialogFlag = true;
  643. this.$nextTick(() => {
  644. this.$refs.addOrEditDialogRef.open('add', {}, row.id);
  645. });
  646. }
  647. if (command === 'invoiceManage') {
  648. this.addOrEditDialogFlag1 = true;
  649. this.$nextTick(() => {
  650. this.$refs.addOrEditDialogRef.createInvoice1(row, 2, 3);
  651. });
  652. }
  653. },
  654. //点击左边分类
  655. handleNodeClick(data, node) {
  656. // this.curNodeData = data;
  657. this.reload({ categoryId: data.id });
  658. },
  659. /* 表格数据源 */
  660. datasource({ page, limit, where, order }) {
  661. this.params = {
  662. pageNum: page,
  663. size: limit,
  664. ...where
  665. };
  666. return getTableList(this.params);
  667. },
  668. /* 刷新表格 */
  669. reload(where) {
  670. this.$refs.table.reload({ page: 1, where });
  671. },
  672. //新增编辑
  673. openEdit(type, row) {
  674. this.$refs.addDialogRef.open(type, row, row.id);
  675. this.$refs.addDialogRef.$refs.form &&
  676. this.$refs.addDialogRef.$refs.form.clearValidate();
  677. },
  678. uploadFile() {
  679. this.$refs.importDialogRef.open();
  680. },
  681. //打印采购订单
  682. handlePrint(ref) {
  683. if (this.selection.length > 1)
  684. return this.$message.warning('暂不支持批量打印,请选择一条');
  685. // let flag = this.selection.some((item) => [2].includes(item.reviewStatus));
  686. // if (!flag)
  687. // return this.$message.warning('抱歉需要已审核的发货单才能打印,请检查');
  688. enterprisePage({
  689. pageNum: 1,
  690. size: 200
  691. }).then((res) => {
  692. console.log(res.list);
  693. if (res.list?.length > 0) {
  694. this.groupName = res.list[0].name;
  695. }
  696. });
  697. this.$refs[ref].open(this.selection[0].id);
  698. },
  699. //批量删除
  700. allDelBtn() {
  701. if (this.selection.length === 0) return;
  702. let flag = this.selection.some((item) =>
  703. [1, 2].includes(item.orderStatus)
  704. );
  705. if (flag)
  706. return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
  707. this.delVisible = true;
  708. },
  709. //删除接口
  710. remove(delData) {
  711. deleteInformation(delData).then((res) => {
  712. this.$message.success('删除成功!');
  713. this.reload();
  714. });
  715. },
  716. //删除弹框确定
  717. commitBtn() {
  718. const dataId = this.selection.map((v) => v.id);
  719. this.remove(dataId);
  720. },
  721. //查看详情
  722. openorderDetail(row) {
  723. this.$refs.contactDetailDialogRef.open(row);
  724. },
  725. saleOrderSubmit(res) {
  726. this.processSubmitDialogFlag = true;
  727. this.$nextTick(() => {
  728. let params = {
  729. businessId: res.id,
  730. businessKey: 'purchase_order_approve',
  731. formCreateUserId: res.createUserId,
  732. variables: {
  733. businessCode: res.orderNo,
  734. businessName: res.partaName,
  735. businessType: res.sourceTypeName
  736. }
  737. };
  738. this.$refs.processSubmitDialogRef.init(params);
  739. });
  740. },
  741. //查看合同详情
  742. opencontractDetail(row) {
  743. let data = {
  744. id: row.relationId
  745. };
  746. if (row.relationType == 1) {
  747. this.$refs.purchasingDetailRef.open(data);
  748. }
  749. if (row.relationType == 2) {
  750. this.$refs.purchasePlanDetailRef.open(data);
  751. }
  752. if (row.relationType == 3) {
  753. this.$refs.inquiryDetailRef.open(data);
  754. }
  755. if (row.relationType == 4) {
  756. this.$refs.contractDetailRef.open(data);
  757. }
  758. },
  759. // 导出
  760. exportRowInfo(row) {
  761. console.log(row);
  762. getExport(row.id);
  763. }
  764. }
  765. };
  766. </script>
  767. <style lang="scss" scoped>
  768. :deep .el-card__body {
  769. padding: 0;
  770. }
  771. :deep(.el-link--inner) {
  772. margin-left: 0px !important;
  773. }
  774. .sys-organization-list {
  775. height: calc(100vh - 264px);
  776. box-sizing: border-box;
  777. border-width: 1px;
  778. border-style: solid;
  779. overflow: auto;
  780. }
  781. .sys-organization-list :deep(.el-tree-node__content) {
  782. height: 40px;
  783. & > .el-tree-node__expand-icon {
  784. margin-left: 10px;
  785. }
  786. }
  787. .switch_left ul .active {
  788. border-top: 4px solid var(--color-primary);
  789. color: var(--color-primary-5);
  790. }
  791. .switch {
  792. padding-bottom: 20px;
  793. }
  794. .el-dropdown-link {
  795. cursor: pointer;
  796. color: var(--color-primary-5);
  797. }
  798. .el-icon-arrow-down {
  799. font-size: 12px;
  800. }
  801. :deep(.el-badge__content.is-fixed) {
  802. top: 4px;
  803. }
  804. </style>