index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. <!-- 采购订单修订—— 列表 -->
  2. <script>
  3. // import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column";
  4. import { judgeColumns, SearchColumns } from "./column";
  5. import orderApi from "@/api/business/purchase/purchase-order";
  6. import {
  7. initPage,
  8. initParams,
  9. // initDicts,
  10. } from "@/utils/init/index.js";
  11. import { initDicts } from "@/utils/init.js";
  12. const { Columns, TabColumns } = judgeColumns();
  13. const allColumns = [...Columns, ...SearchColumns];
  14. TabColumns.forEach((column) => {
  15. allColumns.push(...column.tableColumns);
  16. });
  17. export default {
  18. name: "PuchaseOrder",
  19. // dicts: initDicts(SelectColumns),
  20. dicts: [...initDicts(allColumns), "oa_templete_id"],
  21. components: {
  22. AddDrawer: () => import("./add/index.vue"),
  23. SeeDrawer: () => import("./see/index.vue"),
  24. EditDrawer: () => import("./edit/index.vue"),
  25. PurchaseReturnDrawer: () => import("./purchaseReturn/index.vue"),
  26. ElSuperTable: () => import("@/components/super-table/index.vue"),
  27. ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
  28. ElSuperSearch: () => import("@/components/super-search/index.vue"),
  29. Retrieve: () => import("@/components/Retrieve/index.vue"),
  30. ZpButton: () => import("./zhuan-pai/index.vue"),
  31. ZpjlButton: () => import("./zhuan-pai/record.vue"),
  32. ZdgbButton: () => import("./close/allClose.vue"),
  33. HgbButton: () => import("./close/itemClose.vue"),
  34. HdkButton: () => import("./close/itemOpen.vue"),
  35. CounterApprove: () => import("./fs/index.vue"),
  36. QueryScheme: () => import("@/components/query-scheme/index.vue"),
  37. thButton: () => import("./tui-hui/index.vue"),
  38. },
  39. data() {
  40. const initTabColumns = () => TabColumns;
  41. const page = this.$init.page();
  42. return {
  43. loading: false,
  44. tabLoading: false,
  45. page: page,
  46. searchColumns: SearchColumns,
  47. params: initParams(SearchColumns),
  48. // tableColumns: TableColumns,
  49. tableColumns: Columns,
  50. tableData: [],
  51. tabColumns: initTabColumns(),
  52. tabName: "puOrderItemList",
  53. tabTableDatas: {
  54. puOrderItemList: [],
  55. puOrderExecuteList: [],
  56. },
  57. checkedList: [],
  58. // 子表Select
  59. checkedTabList: [],
  60. // 主表点击信息
  61. primaryResource: {},
  62. timer: 300,
  63. timeOut: null,
  64. size: "mini",
  65. candidate: [
  66. {
  67. item: {
  68. key: "orderCode",
  69. title: "订单编号",
  70. },
  71. attr: {
  72. clearable: true,
  73. is: "el-input",
  74. placeholder: "请输入订单编号,多个使用,隔开",
  75. },
  76. },
  77. {
  78. item: {
  79. key: "materialCode",
  80. title: "物料编码",
  81. },
  82. attr: {
  83. clearable: true,
  84. is: "el-input",
  85. placeholder: "请输入物料编码,多个使用,隔开",
  86. // is: "el-popover-multiple-select-v2",
  87. // valueKey: "code",
  88. // referName: "MATERIAL_PARAM",
  89. },
  90. },
  91. {
  92. item: {
  93. key: "date",
  94. title: "订单日期",
  95. },
  96. attr: {
  97. clearable: true,
  98. is: "el-date-picker",
  99. type: "daterange",
  100. unlinkPanels: true,
  101. rangeSeparator: "至",
  102. valueFormat: "yyyy-MM-dd",
  103. endPlaceholder: "结束日期",
  104. startPlaceholder: "开始日期",
  105. value: [],
  106. },
  107. },
  108. {
  109. item: {
  110. key: "puOrgIds",
  111. title: "采购组织",
  112. },
  113. attr: {
  114. clearable: true,
  115. is: "el-popover-multiple-select-v2",
  116. valueKey: "id",
  117. referName: "ORG_PARAM",
  118. },
  119. },
  120. {
  121. item: {
  122. key: "source",
  123. title: "订单来源",
  124. },
  125. attr: {
  126. clearable: true,
  127. is: "el-select",
  128. dictName: "order_source",
  129. },
  130. },
  131. ],
  132. };
  133. },
  134. computed: {
  135. $dicts: {
  136. get: function () {
  137. return this.dict.type;
  138. },
  139. },
  140. tabHeight: {
  141. get() {
  142. return `${
  143. this.tabTableDatas["puOrderItemList"].length
  144. ? this.tabTableDatas["puOrderItemList"].length > 8
  145. ? 500
  146. : this.tabTableDatas["puOrderItemList"].length * 36 + 120
  147. : 120
  148. }px`;
  149. },
  150. set() {},
  151. },
  152. },
  153. created() {
  154. if (this.$route.query.billCode)
  155. this.params.orderCode = this.$route.query.billCode;
  156. this.fetchList(this.params, this.page);
  157. // this.handleRefreshList();
  158. },
  159. methods: {
  160. async fetchList(data, params) {
  161. try {
  162. this.loading = true;
  163. let { date } = data;
  164. data.startDate = date ? date[0] : "";
  165. data.endDate = date ? date[1] : "";
  166. params["isAsc"] = "desc";
  167. params["orderByColumn"] = "updateTime";
  168. const { code, msg, rows, total } = await orderApi.list(data, params);
  169. if (code === 200) {
  170. this.page.total = total;
  171. this.tableData = rows;
  172. }
  173. } catch (err) {
  174. //
  175. } finally {
  176. this.loading = false;
  177. for (const key in this.tabTableDatas) {
  178. this.tabTableDatas[key] = [];
  179. }
  180. }
  181. },
  182. queryScheme(prop) {
  183. console.log(prop, "查询");
  184. },
  185. async handleDownload() {
  186. console.log(this.params, "条件");
  187. this.download(
  188. "/pu/order/export",
  189. { ...this.params },
  190. `采购订单维护${new Date().getTime()}.xlsx`
  191. );
  192. // try {
  193. // this.loading = true;
  194. // orderApi.orderExport({...this.params}).then(res=>{
  195. // const isBlob = blobValidate(res);
  196. // if (isBlob) {
  197. // const blob = new Blob([res]);
  198. // saveAs(blob, `采购订单维护${new Date().getTime()}.xlsx`);
  199. // }
  200. // })
  201. // } catch (error) {
  202. // }finally{
  203. // this.loading = false;
  204. // }
  205. },
  206. async jumpFlow(row) {
  207. const { name } = this.$store.state.user;
  208. try {
  209. let { code, msg, oaUrl } = await orderApi.toOA(name, row.flowId);
  210. if (code == 200) {
  211. window.open(oaUrl);
  212. }
  213. } catch (error) {
  214. } finally {
  215. }
  216. },
  217. setSelectable() {
  218. return true;
  219. },
  220. setTabSelectable() {
  221. if (this.tabName === "puOrderItemList") {
  222. return true;
  223. }
  224. return false;
  225. },
  226. // 刷新操作
  227. handleRefreshList() {
  228. // this.page.pageNum = 1;
  229. // this.page.pageSize = 10;
  230. this.page = this.$init.page();
  231. this.$refs.purchaseTable.$refs.superTable &&
  232. this.$refs.purchaseTable.$refs.superTable.clearSelection();
  233. for (const key in this.tabTableDatas) {
  234. this.tabTableDatas[key] = [];
  235. }
  236. this.$refs.puOrderItemList[0].$refs.superTable &&
  237. this.$refs.puOrderItemList[0].$refs.superTable.clearSelection();
  238. // this.checkedList = [];
  239. // this.checkedTabList = [];
  240. this.primaryResource = {};
  241. this.fetchList(this.params, this.page);
  242. },
  243. // 重置操作
  244. handleResetList() {
  245. this.page = this.$init.page();
  246. this.params = initParams(SearchColumns);
  247. this.fetchList(this.params, this.page);
  248. },
  249. handleTabClick() {},
  250. // 新增
  251. handleOpenAddDrawer(copyVal) {
  252. const { setVisible, setCopyParams } = this.$refs.addDrawerFef;
  253. setVisible(true, copyVal.id && copyVal.id != "" ? true : false);
  254. copyVal.id && copyVal.id != "" && setCopyParams(copyVal.id);
  255. },
  256. // 复制
  257. handleCopy() {
  258. this.handleOpenAddDrawer(this.checkedList[0]);
  259. },
  260. // 查看
  261. async handleOpenSeeDrawer(row) {
  262. window.clearInterval(this.timeOut);
  263. const { id } = row;
  264. const { setVisible, fetchItem } = this.$refs.seeDrawerRef;
  265. await setVisible(true);
  266. await fetchItem(id);
  267. },
  268. // 编辑、修订
  269. async handleOpenEditDrawer(row) {
  270. const { id } = row;
  271. const { setVisible, fetchItem } = this.$refs.editDrawerRef;
  272. await setVisible(true);
  273. await fetchItem(id);
  274. },
  275. // 获取子表信息
  276. handleDetailsData(row) {
  277. window.clearTimeout(this.timeOut);
  278. this.timeOut = setTimeout(async () => {
  279. try {
  280. this.tabLoading = true;
  281. this.primaryResource = row;
  282. this.checkedTabList = [];
  283. const { code, msg, data } = await orderApi.details(row.id);
  284. if (code === 200) {
  285. // 物料信息:puOrderItemList 执行结果:puOrderExecuteList
  286. for (const key in this.tabTableDatas) {
  287. this.tabTableDatas[key] = data[key];
  288. }
  289. }
  290. } catch (err) {
  291. } finally {
  292. this.tabLoading = false;
  293. }
  294. }, this.timer);
  295. },
  296. // 操作提示弹窗
  297. handleConfirmTips(success) {
  298. this.$confirm("是否继续此操作?", "提示", {
  299. confirmButtonText: "确定",
  300. cancelButtonText: "取消",
  301. type: "warning",
  302. })
  303. .then(() => {
  304. success();
  305. })
  306. .catch(() => {});
  307. },
  308. // 删除操作
  309. handleDeleteList(row) {
  310. try {
  311. this.loading = true;
  312. this.handleConfirmTips(async () => {
  313. const { id } = row;
  314. const { code } = await orderApi.remove(id);
  315. if (code === 200) {
  316. this.handleRefreshList();
  317. }
  318. });
  319. } catch (err) {
  320. //
  321. } finally {
  322. this.loading = false;
  323. }
  324. },
  325. // 批量提交
  326. handleBatchSubmit() {
  327. let inconformity = this.checkedList.filter(
  328. (row) =>
  329. !(
  330. (row.status == "0" || row.status == "3" || row.status == "9") &&
  331. row.isEnd === "N"
  332. )
  333. );
  334. if (!inconformity.length && this.checkedList.length) {
  335. let puOrderIds = this.checkedList.map((item) => Number(item.id));
  336. this.fetchSubmit(puOrderIds);
  337. } else {
  338. this.$notify({
  339. title: "警告",
  340. message: "当前选中存在不满足提交条件的数据!",
  341. type: "warning",
  342. });
  343. }
  344. },
  345. // 提交
  346. handleSubmit(row) {
  347. let puOrderIds = [Number(row.id)];
  348. this.fetchSubmit(puOrderIds);
  349. },
  350. fetchSubmit(puOrderIds) {
  351. let _this = this;
  352. this.handleConfirmTips(async () => {
  353. try {
  354. _this.loading = true;
  355. let { code, msg } = await orderApi.submit({
  356. puOrderIds,
  357. checkAmount: true,
  358. });
  359. if (code == 200) {
  360. _this.handleRefreshList();
  361. } else if (code == 10000) {
  362. _this.$alert(
  363. "<div style='overflow: auto;overflow-x: hidden;max-height: 65vh;padding: 10px 20px 0;'>" +
  364. msg +
  365. "</div>",
  366. "提示",
  367. {
  368. showCancelButton: true,
  369. dangerouslyUseHTMLString: true,
  370. confirmButtonText: "继续提交",
  371. cancelButtonText: "取消",
  372. beforeClose: async (action, instance, done) => {
  373. if (action === "confirm") {
  374. instance.confirmButtonLoading = true;
  375. instance.confirmButtonText = "执行中...";
  376. try {
  377. let { code, msg } = await orderApi.submit({
  378. puOrderIds,
  379. checkAmount: false,
  380. });
  381. if (code == 200) {
  382. done();
  383. _this.handleRefreshList();
  384. }
  385. } catch (error) {
  386. instance.confirmButtonText = "确认";
  387. } finally {
  388. instance.confirmButtonLoading = false;
  389. }
  390. } else {
  391. done();
  392. }
  393. },
  394. }
  395. );
  396. }
  397. } catch (error) {
  398. } finally {
  399. this.loading = false;
  400. }
  401. });
  402. },
  403. //流程收回
  404. async handleBack(row) {
  405. try {
  406. const { msg, code } = await orderApi.oaBack({
  407. fdTemplateId: this.dict.type.oa_templete_id.find((item) => {
  408. return item.label == "采购订单";
  409. }).value,
  410. fdId: row.flowId,
  411. billCode: row.code,
  412. billMaker: row.createBy,
  413. });
  414. if (code === 200) {
  415. this.$emit("success");
  416. this.$notify.success(msg);
  417. }
  418. } catch (err) {
  419. console.error(err);
  420. } finally {
  421. this.fetchList(this.params, this.page);
  422. }
  423. },
  424. // 判断“整单退回”按钮
  425. judgeIsAllReturn() {
  426. if (this.checkedList.length == 1) {
  427. // 非手工、状态:自由/驳回
  428. if (this.judgeIsOption("return", this.checkedList[0])) {
  429. // if (this.checkedList[0].source != 3 &&
  430. // (this.checkedList[0].status == 0 || this.checkedList[0].status == 3)
  431. // ) {
  432. return false;
  433. }
  434. }
  435. return true;
  436. },
  437. // 整单退回
  438. handleAllReturn() {
  439. this.handleReturn(this.checkedList[0].id, []);
  440. },
  441. // 判断“行退回”按钮
  442. judgeIsLineReturn() {
  443. if (this.checkedTabList.length == 1) {
  444. // 主信息:非手工、状态:自由/驳回
  445. if (this.judgeIsOption("return", this.primaryResource)) {
  446. // if(this.primaryResource.source != 3 &&
  447. // (this.primaryResource.status == 0 || this.primaryResource.status == 3) ){
  448. return false;
  449. }
  450. }
  451. return true;
  452. },
  453. // 行退回
  454. handleLineReturn() {
  455. let ids = this.checkedTabList.map((checked) => checked.id);
  456. console.log(ids, "行退回ids");
  457. this.handleReturn(this.primaryResource.id, ids);
  458. },
  459. // 退回接口
  460. handleReturn(id, documentIds) {
  461. this.$prompt("请输入退回原因", "提示", {
  462. confirmButtonText: "确定",
  463. cancelButtonText: "取消",
  464. inputPattern: /\s*\S+?/,
  465. inputErrorMessage: "退回原因不能为空",
  466. })
  467. .then(async ({ value }) => {
  468. let data = {
  469. id: Number(id),
  470. documentIds: documentIds.map((ids) => Number(ids)),
  471. baskCause: value,
  472. };
  473. try {
  474. let { code, msg } = await orderApi.documentsReturn(data);
  475. if (code === 200) {
  476. this.handleRefreshList();
  477. }
  478. this.$notify.success({
  479. message: msg,
  480. });
  481. } catch (error) {}
  482. })
  483. .catch(() => {});
  484. },
  485. // 付款协议
  486. async handlePaymentRequest() {
  487. // name:工号
  488. try {
  489. let { code, msg } = await orderApi.payRequest();
  490. if (code == 200) {
  491. msg.replace(/\/n/g, "");
  492. let url = `uclient://start/http://172.16.100.2:8081?ssoKey=${msg}&uiloader=nc.uap.lfw.applet.PortalUILoader&nodeId=40040407`;
  493. window.location.href = url;
  494. }
  495. } catch (error) {}
  496. },
  497. // 退货
  498. async handlePurchaseReturn() {
  499. const { id } = this.checkedList[0];
  500. const { setVisible, fetchStorage } = this.$refs.PurchaseReturnDrawerRef;
  501. await setVisible(true);
  502. await fetchStorage(id);
  503. },
  504. // 主表Select框
  505. handleSelect(selection, row) {
  506. this.checkedList = selection;
  507. },
  508. handleSelectionChange(selection) {
  509. this.checkedList = selection;
  510. },
  511. // 子表Select框
  512. handleTabSelect(selection, row) {
  513. this.checkedTabList = selection;
  514. },
  515. handleTabSelectionChange(selection) {
  516. this.checkedTabList = selection;
  517. },
  518. // 保留两位小数,补位
  519. keepTwoDecimalStr(num) {
  520. if (num) {
  521. const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
  522. let s = result.toString();
  523. let rs = s.indexOf(".");
  524. if (rs < 0) {
  525. rs = s.length;
  526. s += ".";
  527. }
  528. while (s.length <= rs + 2) {
  529. s += "0";
  530. }
  531. return s;
  532. } else {
  533. return "";
  534. }
  535. },
  536. judgeIsOption(type, source) {
  537. // status: 0=自由态,1=审批中,2=已审核,3=已驳回 4=提交中 9=已回退
  538. // source: 1=自动协议直采,2=协议直采,3=手工
  539. // isEnd:整单关闭标识
  540. switch (type) {
  541. case "edit":
  542. return (
  543. (source.status == "0" ||
  544. source.status == "3" ||
  545. source.status == "9") &&
  546. source.isEnd === "N"
  547. );
  548. case "revise":
  549. return source.status == "2" && source.isEnd === "N";
  550. case "del":
  551. return (
  552. (source.status == "0" ||
  553. source.status == "3" ||
  554. source.status == "9") &&
  555. source.source == "3" &&
  556. source.isEnd === "N"
  557. );
  558. case "submit":
  559. return (
  560. (source.status == "0" ||
  561. source.status == "3" ||
  562. source.status == "9") &&
  563. source.isEnd === "N"
  564. );
  565. // case "allClose":
  566. // return source.status == 2 && source.isEnd === "N";
  567. case "return":
  568. return (
  569. source.source != 3 &&
  570. source.isEnd === "N" &&
  571. (source.status == 0 || source.status == 3 || source.status == "9")
  572. );
  573. default:
  574. return false;
  575. }
  576. },
  577. handelRetrieve(row) {
  578. let { status, flowId, code, createBy } = row;
  579. return {
  580. status,
  581. fdId: flowId,
  582. fdTemplateId: this.dict.type.oa_templete_id.find((item) => {
  583. return item.label == "采购订单";
  584. }).value,
  585. billCode: code,
  586. billMaker: createBy,
  587. };
  588. },
  589. },
  590. };
  591. </script>
  592. <template>
  593. <el-card
  594. v-loading="loading"
  595. style="width: calc(100% - 24px); height: 100%; margin: 10px; padding: 10px"
  596. :body-style="{ padding: 0 }"
  597. >
  598. <SeeDrawer ref="seeDrawerRef"></SeeDrawer>
  599. <AddDrawer ref="addDrawerFef" @close="handleRefreshList"></AddDrawer>
  600. <EditDrawer ref="editDrawerRef" @close="handleRefreshList"></EditDrawer>
  601. <PurchaseReturnDrawer
  602. ref="PurchaseReturnDrawerRef"
  603. @close="handleRefreshList"
  604. ></PurchaseReturnDrawer>
  605. <el-super-search
  606. v-model="params"
  607. :size="size"
  608. :dict="dict"
  609. :columns="searchColumns"
  610. @reset="handleResetList"
  611. @submit="fetchList(params, page)"
  612. ></el-super-search>
  613. <!-- 操作 -->
  614. <el-row :gutter="24" type="flex" justify="end" style="margin: 20px 0 12px">
  615. <el-col :span="24" style="text-align: right">
  616. <!-- <query-scheme
  617. :candidate="candidate"
  618. @submit="queryScheme"
  619. ></query-scheme> -->
  620. <el-button
  621. :size="size"
  622. type="primary"
  623. @click="handleOpenAddDrawer"
  624. v-hasPermi="['material:order:add']"
  625. >新增</el-button
  626. >
  627. <el-button-group style="margin-left: 10px">
  628. <el-button
  629. :size="size"
  630. :disabled="checkedList.length != 1"
  631. @click="handleCopy"
  632. >复制</el-button
  633. >
  634. <el-button :size="size" @click="handleBatchSubmit"
  635. >批量提交</el-button
  636. >
  637. </el-button-group>
  638. <el-button-group
  639. style="margin-left: 10px"
  640. :key="checkedList.length + 1"
  641. >
  642. <!-- <el-button
  643. :size="size"
  644. @click="handleAllReturn"
  645. :disabled="judgeIsAllReturn()"
  646. >整单退回</el-button
  647. > -->
  648. <th-button
  649. :size="size"
  650. :main-data="checkedList"
  651. @success="handleRefreshList"
  652. ></th-button>
  653. <zdgb-button
  654. :select-data="checkedList"
  655. :size="size"
  656. @submit="handleRefreshList"
  657. ></zdgb-button>
  658. </el-button-group>
  659. <el-button-group style="margin: 0 10px">
  660. <!-- <el-button size="mini"
  661. :disabled="!(checkedList.length == 1 && checkedList[0].deliveryStatus == '0')"
  662. :key="checkedList.length"
  663. @click="handlePurchaseReturn"
  664. >采购退货</el-button> -->
  665. <el-button :size="size" @click="handlePaymentRequest"
  666. >付款申请</el-button
  667. >
  668. <el-button :size="size" @click="handleDownload">批量导出</el-button>
  669. </el-button-group>
  670. <el-button-group>
  671. <zp-button
  672. :size="size"
  673. :select-data="checkedList"
  674. @success="fetchList(params, page)"
  675. >
  676. </zp-button>
  677. <zpjl-button :size="size" :select-data="checkedList"> </zpjl-button>
  678. <counter-approve
  679. :size="size"
  680. :select-data="checkedList"
  681. @success="fetchList(params, page)"
  682. ></counter-approve>
  683. </el-button-group>
  684. </el-col>
  685. </el-row>
  686. <el-super-ux-table
  687. class="purchaseTable"
  688. v-model="tableData"
  689. ref="purchaseTable"
  690. index
  691. checkbox
  692. pagination
  693. showSummary
  694. :page="page"
  695. :size="size"
  696. :dict="dict"
  697. :height="400"
  698. convenitentOperation
  699. :columns="tableColumns"
  700. :selectable="setSelectable"
  701. storage-key="PuchaseOrderSuperTable"
  702. @select="handleSelect"
  703. @row-click="handleDetailsData"
  704. @row-dblclick="handleOpenSeeDrawer"
  705. @pagination="fetchList(params, page)"
  706. @selection-change="handleSelectionChange"
  707. >
  708. <ux-table-column fixed="right" title="操作" width="180">
  709. <template slot-scope="scope">
  710. <el-button
  711. v-if="judgeIsOption('revise', scope.row)"
  712. type="text"
  713. :size="size"
  714. @click.stop="handleOpenEditDrawer(scope.row)"
  715. v-hasPermi="['material:order:edit']"
  716. >
  717. 修订
  718. </el-button>
  719. <el-button
  720. v-if="judgeIsOption('edit', scope.row)"
  721. type="text"
  722. :size="size"
  723. @click.stop="handleOpenEditDrawer(scope.row)"
  724. v-hasPermi="['material:order:edit']"
  725. >
  726. 编辑
  727. </el-button>
  728. <!-- 0=自由态,1=审批中,2=已审核,3=已驳回 4=提交中-->
  729. <el-button
  730. v-if="judgeIsOption('del', scope.row)"
  731. type="text"
  732. :size="size"
  733. @click.stop="handleDeleteList(scope.row)"
  734. v-hasPermi="['material:order:remove']"
  735. >删除</el-button
  736. >
  737. <el-button
  738. v-if="judgeIsOption('submit', scope.row)"
  739. type="text"
  740. size="mini"
  741. v-hasPermi="['material:order:toOa']"
  742. @click.stop="handleSubmit(scope.row)"
  743. >提交</el-button
  744. >
  745. <el-button
  746. v-if="scope.row.status == '1'"
  747. type="text"
  748. size="mini"
  749. @click.stop="handleBack(scope.row)"
  750. >收回</el-button
  751. >
  752. <el-button
  753. v-if="
  754. scope.row.flowId &&
  755. scope.row.flowId !== '' &&
  756. scope.row.status !== '9'
  757. "
  758. type="text"
  759. size="mini"
  760. @click.stop="jumpFlow(scope.row)"
  761. >流程跳转</el-button
  762. >
  763. <!-- <Retrieve :data="handelRetrieve(scope.row)" @success="fetchList(params, page)"></Retrieve> -->
  764. </template>
  765. </ux-table-column>
  766. </el-super-ux-table>
  767. <div style="position: relative" v-loading="tabLoading">
  768. <el-row style="position: absolute; top: 5px; right: 20px; z-index: 10">
  769. <th-button
  770. :size="size"
  771. type="line"
  772. :main-data="[...primaryResource]"
  773. :subtabulation="checkedTabList"
  774. @success="handleRefreshList"
  775. ></th-button>
  776. <!-- <el-button
  777. :size="size"
  778. @click="handleLineReturn"
  779. :disabled="judgeIsLineReturn()"
  780. >行退回</el-button
  781. > -->
  782. <hgb-button
  783. :select-data="checkedTabList"
  784. :size="size"
  785. @submit="handleRefreshList"
  786. ></hgb-button>
  787. <hdk-button
  788. :select-data="checkedTabList"
  789. :size="size"
  790. @submit="handleRefreshList"
  791. ></hdk-button>
  792. </el-row>
  793. <el-tabs
  794. v-model="tabName"
  795. @tab-click="handleTabClick"
  796. style="width: 100%; padding: 0px 10px"
  797. >
  798. <el-tab-pane
  799. v-for="(column, index) in tabColumns"
  800. :key="index"
  801. :label="column.title"
  802. :name="column.key"
  803. >
  804. <el-super-ux-table
  805. v-model="tabTableDatas[column.key]"
  806. showSummary
  807. convenitentOperation
  808. :dict="dict"
  809. :ref="column.key"
  810. :height="tabHeight"
  811. :columns="column.tableColumns"
  812. :selectable="setTabSelectable"
  813. :checkbox="setTabSelectable()"
  814. :size="size"
  815. :storage-key="'PuchaseOrder' + column.key"
  816. @select="handleTabSelect"
  817. @selection-change="handleTabSelectionChange"
  818. >
  819. </el-super-ux-table>
  820. </el-tab-pane>
  821. </el-tabs>
  822. </div>
  823. </el-card>
  824. </template>
  825. <!-- <style scoped>
  826. >>> .el-message-box__content {
  827. max-height: 350px;
  828. overflow-y: scroll;
  829. overflow-x: auto;
  830. box-sizing: border-box;
  831. }
  832. </style> -->