index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div id="workSpace">
  3. <el-card style="position: relative;">
  4. <el-form label-width="100px">
  5. <el-row :gutter="10">
  6. <el-col :span="1.5">
  7. <el-form-item label="单据标题">
  8. <el-input
  9. v-model.trim="queryParams.docSubject"
  10. size="mini"
  11. clearable
  12. style="width: 200px"
  13. />
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="1.5">
  17. <el-form-item label="单据类型">
  18. <el-select multiple v-model="queryParams.modelIds" size="mini" style="width: 200px" clearable>
  19. <el-option v-for="dict in dict.type.oa_templete_id" :key="dict.value" :label="dict.label" :value="dict.value">
  20. </el-option>
  21. </el-select>
  22. </el-form-item>
  23. </el-col>
  24. </el-row>
  25. </el-form>
  26. <div style="position: absolute;top: 18px;right: 10px;">
  27. <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
  28. <el-button size="mini" plain @click="resetList">重置</el-button>
  29. </div>
  30. <div class="btn_grooup">
  31. <el-button type="primary" size="mini" @click="xxxx">批量同意</el-button>
  32. </div>
  33. <el-table
  34. v-loading="loading"
  35. :data="tableList"
  36. fit
  37. :cell-style="{ borderColor: '#c0c0c0' }"
  38. :header-cell-style="{ borderColor: '#c0c0c0' }"
  39. class="exporttable"
  40. max-height="410"
  41. border
  42. highlight-current-row
  43. style="font-size: 12px;"
  44. @selection-change="handleSelectionChange"
  45. @row-click="rowSelect"
  46. @row-dblclick="doubleClick"
  47. ref="tables"
  48. >
  49. <el-table-column type="selection" width="55" />
  50. <el-table-column label="序号" type="index" align="center" width="50px"/>
  51. <el-table-column show-overflow-tooltip label="标题" align="center" prop="docSubject"/>
  52. <el-table-column show-overflow-tooltip label="创建人" align="center" prop="docCreate"/>
  53. <el-table-column
  54. fixed="right"
  55. label="操作"
  56. align="center"
  57. width="180"
  58. >
  59. <template slot-scope="scope">
  60. <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
  61. <el-button type="text" size="mini" @click="agree(scope.row)">同意</el-button>
  62. </template>
  63. </el-table-column>
  64. </el-table>
  65. </el-card>
  66. </div>
  67. </template>
  68. <script>
  69. import { getWorkSpaceList } from '@/api/purchase/workSpace.js'
  70. export default {
  71. name: 'workSpace',
  72. dicts: ['oa_templete_id'],
  73. data() {
  74. return {
  75. queryParams: {
  76. modelIds:[],
  77. docSubject: '',
  78. pageNum: 1,
  79. pageSize: 10
  80. },
  81. loading: false,
  82. tableList: [],
  83. total: 0
  84. }
  85. },
  86. created() {
  87. this.getList(this.queryParams)
  88. },
  89. methods: {
  90. getList(params){
  91. getWorkSpaceList(params).then(res => {
  92. if (res.code === 200) {
  93. this.tableList = res.rows
  94. this.total = res.total
  95. }
  96. }).then(() => {
  97. this.loading = false
  98. }).catch(err => {
  99. this.loading = false
  100. })
  101. },
  102. searchList() {
  103. this.getList(this.queryParams)
  104. },
  105. resetList() {},
  106. handleSelectionChange() {},
  107. rowSelect() {},
  108. doubleClick() {},
  109. xxxx() {},
  110. check() {},
  111. agree(row) {
  112. console.log(row)
  113. this.$router.push({path: row.linkUrl ,query: {billCode: row.billCode}})
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. #workSpace {
  120. padding: 12px;
  121. box-sizing: border-box;
  122. overflow-y: scroll;
  123. }
  124. .btn_grooup {
  125. margin-bottom: 10px;
  126. display: flex;
  127. justify-content: flex-end;
  128. }
  129. </style>
  130. <style>
  131. .exporttable {
  132. border: solid 1px #c0c0c0;
  133. }
  134. .el-table .el-table__header-wrapper th {
  135. font-size: 14px;
  136. }
  137. </style>