common-list.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <div>
  3. <div style="width: 100%; display: flex; align-items: center; justify-content: space-between;">
  4. <div class="left" style="display: flex;">
  5. <div style="margin-right: 50px;">研发项目编号:{{ data[0].xmbh }}</div>
  6. <div>项目项目名称:{{ data[0].xmmc }}</div>
  7. </div>
  8. <div class="right">
  9. <el-button
  10. type="warning"
  11. size="small"
  12. plain
  13. icon="el-icon-download"
  14. @click="handleExport"
  15. style="margin-right: 10px;"
  16. >
  17. 导出
  18. </el-button>
  19. </div>
  20. </div>
  21. <avue-crud class="common-crud" :option="options" :data="data">
  22. </avue-crud>
  23. </div>
  24. </template>
  25. <script>
  26. import {exportBlob} from "@/api/common";
  27. import {getToken} from "@/util/auth";
  28. import {downloadXls} from "@/util/util";
  29. export default {
  30. props: {
  31. data: {
  32. type: Array,
  33. default: () => []
  34. }
  35. },
  36. data() {
  37. return {
  38. options: {
  39. calcHeight: 30,
  40. tip: false,
  41. searchShow: true,
  42. searchMenuSpan: 6,
  43. border: true,
  44. index: true,
  45. addBtn: false,
  46. searchLabelWidth: 140,
  47. labelWidth: 100,
  48. menuWidth: 180,
  49. menu: false,
  50. dialogClickModal: false,
  51. refreshBtn: false,
  52. columnBtn: false,
  53. gridBtn: false,
  54. dialogWidth: 500,
  55. dialogType: "drawer",
  56. showSummary: true,
  57. sumColumnList: [
  58. {
  59. label:'合计',
  60. name: 'ryrg',
  61. type: 'sum',
  62. },
  63. {
  64. name: 'zjtr',
  65. type: 'sum',
  66. },
  67. {
  68. name: 'zjfyycqdtfy',
  69. type: 'sum'
  70. },
  71. {
  72. name: 'sjf',
  73. type: 'sum'
  74. },
  75. {
  76. name: 'wxzctx',
  77. type: 'sum'
  78. },
  79. {
  80. name: 'zbtsfyysyfy',
  81. type: 'sum'
  82. },
  83. {
  84. name: 'qtfy',
  85. type: 'sum'
  86. },
  87. {
  88. name: 'wwyf',
  89. type: 'sum'
  90. },
  91. {
  92. name: 'amount',
  93. type: 'sum'
  94. }
  95. ],
  96. column: [
  97. {
  98. label: '凭证日期',
  99. prop: 'recordDate',
  100. span: 24,
  101. width: 90,
  102. align: 'center',
  103. showOverflowTooltip: true,
  104. },
  105. {
  106. label: '凭证字号',
  107. prop: 'voucherNumber',
  108. span: 24,
  109. width: 120,
  110. align: 'center',
  111. showOverflowTooltip: true,
  112. },
  113. {
  114. label: '摘要',
  115. prop: 'digest',
  116. span: 24,
  117. width: 160,
  118. align: 'center',
  119. showOverflowTooltip: true,
  120. },
  121. {
  122. label: '1、人员人工',
  123. prop: 'ryrg',
  124. span: 24,
  125. minWidth: 90,
  126. align: 'center',
  127. showOverflowTooltip: true,
  128. },
  129. {
  130. label: '2、直接投入',
  131. prop: 'zjtr',
  132. span: 24,
  133. minWidth: 90,
  134. align: 'center',
  135. showOverflowTooltip: true,
  136. },
  137. {
  138. label: '3、折旧费用与长期摊销费用',
  139. prop: 'zjfyycqdtfy',
  140. span: 24,
  141. minWidth: 90,
  142. align: 'center',
  143. showOverflowTooltip: true,
  144. },
  145. {
  146. label: '4、设计费',
  147. prop: 'sjf',
  148. span: 24,
  149. minWidth: 90,
  150. align: 'center',
  151. showOverflowTooltip: true,
  152. },
  153. {
  154. label: '5、无形资产摊销',
  155. prop: 'wxzctx',
  156. span: 24,
  157. minWidth: 90,
  158. align: 'center',
  159. showOverflowTooltip: true,
  160. },
  161. {
  162. label: '6、装备调试费用与试验费用',
  163. prop: 'zbtsfyysyfy',
  164. span: 24,
  165. minWidth: 90,
  166. align: 'center',
  167. showOverflowTooltip: true,
  168. },
  169. {
  170. label: '7、其他费用',
  171. prop: 'qtfy',
  172. span: 24,
  173. minWidth: 90,
  174. align: 'center',
  175. showOverflowTooltip: true,
  176. },
  177. {
  178. label: '8、委外研发',
  179. prop: 'wwyf',
  180. span: 24,
  181. minWidth: 90,
  182. align: 'center',
  183. showOverflowTooltip: true,
  184. },
  185. {
  186. label: '合计',
  187. prop: 'amount',
  188. span: 24,
  189. minWidth: 90,
  190. align: 'center',
  191. showOverflowTooltip: true,
  192. },
  193. {
  194. label: '账簿名称',
  195. prop: 'cashbook',
  196. span: 24,
  197. minWidth: 90,
  198. align: 'center',
  199. showOverflowTooltip: true,
  200. },
  201. ],
  202. },
  203. };
  204. },
  205. methods: {
  206. handleExport() {
  207. this.$message.error("暂未开发");
  208. // exportBlob(`/api/kd-scientific/goods/yanfalingliaodan/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
  209. // downloadXls(res.data, `${this.params.yearAndMonth}${title}.xlsx`);
  210. // });
  211. },
  212. }
  213. };
  214. </script>
  215. <style lang="scss">
  216. .common-crud {
  217. .avue-crud__header {
  218. min-height: 0;
  219. }
  220. }
  221. </style>