warehousing_list.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :exportList="exportList"
  6. :operation="operation()"
  7. :optionsEvensGroup="optionsEvensGroup"
  8. :columnParsing="columnParsing"
  9. >
  10. </template-page>
  11. </template>
  12. <script>
  13. import TemplatePage from '@/components/template/template-page-1.vue'
  14. import import_mixin from '@/components/template/import_mixin.js'
  15. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  16. import Popu from '@/components/template/popu.vue'
  17. import { getListOtherStockOutV2, setApprovalPurchaseOrderIn, exportListOtherStockOutV2 } from '@/api/supply/purchase'
  18. import { getWarehouseList } from '@/api/supply/apply'
  19. export default {
  20. components: { TemplatePage, Popu },
  21. mixins: [import_mixin, add_callback_mixin],
  22. data() {
  23. return {
  24. visible: false,
  25. // 事件组合
  26. optionsEvensGroup: [
  27. // [
  28. // [
  29. // {
  30. // name: '导入',
  31. // render: this.importButton(importCustomerV2)
  32. // }
  33. // ]
  34. // ],
  35. ],
  36. // 表格属性
  37. tableAttributes: {
  38. // 启用勾选列
  39. selectColumn: true
  40. }, // 关闭新增弹窗
  41. // 表格事件
  42. tableEvents: {
  43. 'selection-change': this.selectionChange
  44. },
  45. recordSelected: [],
  46. detailsId: ''
  47. }
  48. },
  49. methods: {
  50. // 列表请求函数
  51. getList(...p) {
  52. this.recordSelected = []
  53. return getListOtherStockOutV2(...p)
  54. },
  55. // 列表导出函数
  56. exportList: exportListOtherStockOutV2,
  57. // 表格列解析渲染数据更改
  58. columnParsing(item, defaultData) {
  59. return defaultData
  60. },
  61. // 监听勾选变化
  62. selectionChange(data) {
  63. this.recordSelected = data
  64. },
  65. operation() {
  66. return (h, { row, index, column }) => {
  67. return (
  68. <div class="operation-btns">
  69. <el-popconfirm title="弃审吗?" onOnConfirm={() => this.handleUnapprove(row.id, row.billNo)}>
  70. <el-button slot="reference" type="text" size="mini">
  71. 弃审
  72. </el-button>
  73. </el-popconfirm>
  74. </div>
  75. )
  76. }
  77. },
  78. handleClose() {
  79. this.addOff(() => {
  80. this.visible = false
  81. })()
  82. },
  83. handleUnapprove(id, billNo) {
  84. setApprovalPurchaseOrderIn({ id, billNo }).then(res => {
  85. this.$successMsg('弃审成功')
  86. this.$refs.pageRef.refreshList()
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped></style>