devsuccs.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <div class="wrap-print">
  3. <h2 v-if="listForm.quit == 'outbound'">出库成功</h2>
  4. <div class="btn-wrap">
  5. <el-button
  6. type="primary"
  7. @click="breakView()"
  8. v-if="listForm.quit == 'outbound'"
  9. >返回待出库</el-button
  10. >
  11. <el-button
  12. type="primary"
  13. @click="detailsData()"
  14. v-if="listForm.quit == 'outbound'"
  15. >出库详情</el-button
  16. >
  17. <el-button type="primary" v-print="printObj">打印出库单</el-button>
  18. <el-button
  19. type="primary"
  20. @click="goback()"
  21. v-if="listForm.quit == 'print'"
  22. >返回</el-button
  23. >
  24. </div>
  25. <el-card class="box-card">
  26. <printView :orderData="multipleSelection" :form="listForm"></printView>
  27. </el-card>
  28. </div>
  29. </template>
  30. <script>
  31. import printView from "./printView.vue";
  32. import { getSplerMcsDelvOrdPage } from "@/api/orderManage-sup/index";
  33. export default {
  34. name: "successView",
  35. components: {
  36. printView
  37. },
  38. props: {},
  39. data() {
  40. return {
  41. multipleSelection: [],
  42. listForm: {},
  43. // 打印
  44. printObj: {
  45. id: "printData",
  46. popTitle: "", // 打印配置页上方标题
  47. extraHead: "", //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
  48. preview: "", // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
  49. previewTitle: "", // 打印预览的标题(开启预览模式后出现),
  50. previewPrintBtnLabel: "", // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
  51. zIndex: "", // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
  52. previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用)
  53. previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用)
  54. beforeOpenCallback: () => {}, // 开启打印前的回调事件
  55. openCallback() {}, // 调用打印之后的回调事件
  56. closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消)
  57. url: "",
  58. standard: "",
  59. extraCss: ""
  60. }
  61. };
  62. },
  63. created() {
  64. let { form, data } = this.$route.query;
  65. this.multipleSelection = JSON.parse(data);
  66. this.listForm = JSON.parse(form);
  67. },
  68. mounted() {},
  69. methods: {
  70. goback() {
  71. this.$router.go(-1);
  72. },
  73. //跳转出库详情
  74. detailsData() {
  75. getSplerMcsDelvOrdPage({
  76. delvOrdId: this.listForm.delvOrdId,
  77. purcOrdId: this.listForm.id
  78. }).then(res => {
  79. let data = res.data.records[0];
  80. this.$router.push({
  81. name: "alreadyDetail",
  82. query: {
  83. ...data,
  84. spdId: this.$route.query.form.spdId
  85. }
  86. });
  87. });
  88. },
  89. //返回待出库
  90. breakView() {
  91. this.$router.push({
  92. path: "/orderManage-sup/purOrderDelivery",
  93. query: {}
  94. });
  95. }
  96. },
  97. watch: {}
  98. };
  99. </script>
  100. <style scoped lang="scss">
  101. .wrap-print {
  102. padding: 20px;
  103. width: 100%;
  104. background: #fff;
  105. .btn-wrap {
  106. margin-top: 20px;
  107. width: 200px;
  108. height: 40px;
  109. display: flex;
  110. align-items: center;
  111. }
  112. .box-card {
  113. margin-top: 20px;
  114. width: 1200px;
  115. }
  116. }
  117. </style>