ProjectChbSwfList.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <a-card :bordered="false" class="u-dialog-card">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. </a-row>
  8. </a-form>
  9. </div>
  10. <!-- 查询区域-END -->
  11. <!-- 操作按钮区域 -->
  12. <div class="table-operator">
  13. <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
  14. <a-button type="primary" icon="download" @click="handleExportXls('事务费')">导出</a-button>
  15. <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  16. <a-button type="primary" icon="import">导入</a-button>
  17. </a-upload> -->
  18. <!-- 高级查询区域 -->
  19. <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  20. <a-dropdown v-if="selectedRowKeys.length > 0">
  21. <a-menu slot="overlay">
  22. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  23. </a-menu>
  24. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  25. </a-dropdown> -->
  26. </div>
  27. <!-- table区域-begin -->
  28. <div>
  29. <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  30. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  31. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  32. </div> -->
  33. <a-table
  34. ref="table"
  35. size="middle"
  36. :scroll="{x:true}"
  37. bordered
  38. rowKey="id"
  39. :columns="columns"
  40. :dataSource="dataSource"
  41. :pagination="ipagination"
  42. :loading="loading"
  43. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  44. class="j-table-force-nowrap"
  45. @change="handleTableChange">
  46. <template slot="htmlSlot" slot-scope="text">
  47. <div v-html="text"></div>
  48. </template>
  49. <template slot="imgSlot" slot-scope="text,record">
  50. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  51. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  52. </template>
  53. <template slot="fileSlot" slot-scope="text">
  54. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  55. <a-button
  56. v-else
  57. :ghost="true"
  58. type="primary"
  59. icon="download"
  60. size="small"
  61. @click="downloadFile(text)">
  62. 下载
  63. </a-button>
  64. </template>
  65. <!-- <span slot="action" slot-scope="text, record">
  66. <a @click="handleEdit(record)">编辑</a>
  67. <a-divider type="vertical" />
  68. <a-dropdown>
  69. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  70. <a-menu slot="overlay">
  71. <a-menu-item>
  72. <a @click="handleDetail(record)">详情</a>
  73. </a-menu-item>
  74. <a-menu-item>
  75. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  76. <a>删除</a>
  77. </a-popconfirm>
  78. </a-menu-item>
  79. </a-menu>
  80. </a-dropdown>
  81. </span> -->
  82. </a-table>
  83. </div>
  84. </a-card>
  85. </template>
  86. <script>
  87. import '@/assets/less/TableExpand.less'
  88. import { mixinDevice } from '@/utils/mixin'
  89. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  90. import { getAction } from '@/api/manage'
  91. export default {
  92. name: 'ProjectChbSwfList',
  93. mixins:[JeecgListMixin, mixinDevice],
  94. props: {
  95. taskno: {
  96. type: String,
  97. default: ''
  98. }
  99. },
  100. data () {
  101. return {
  102. description: '事务费管理页面',
  103. // 表头
  104. columns: [
  105. {
  106. title: '序号',
  107. dataIndex: '',
  108. key:'rowIndex',
  109. width:60,
  110. align:"center",
  111. customRender:function (t,r,index) {
  112. return parseInt(index)+1;
  113. },
  114. fixed: 'left',
  115. },
  116. {
  117. title:'任务号',
  118. align:"center",
  119. dataIndex: 'taskno',
  120. fixed: 'left',
  121. },
  122. {
  123. title:'年度',
  124. align:"center",
  125. dataIndex: 'nd'
  126. },
  127. {
  128. title:'凭证日期',
  129. align:"center",
  130. dataIndex: 'pzrq'
  131. },
  132. {
  133. title:'凭证号',
  134. align:"center",
  135. dataIndex: 'pzh'
  136. },
  137. {
  138. title:'摘要',
  139. align:"center",
  140. dataIndex: 'zy'
  141. },
  142. {
  143. title:'科目编号',
  144. align:"center",
  145. dataIndex: 'kmbh'
  146. },
  147. {
  148. title:'科目名称',
  149. align:"center",
  150. dataIndex: 'km'
  151. },
  152. {
  153. title:'方向',
  154. align:"center",
  155. dataIndex: 'fx'
  156. },
  157. {
  158. title:'金额',
  159. align:"center",
  160. dataIndex: 'je'
  161. },
  162. {
  163. title:'部门',
  164. align:"center",
  165. dataIndex: 'bm'
  166. },
  167. {
  168. title:'往来单位',
  169. align:"center",
  170. dataIndex: 'wldw'
  171. },
  172. {
  173. title:'制单人',
  174. align:"center",
  175. dataIndex: 'zdr'
  176. },
  177. {
  178. title:'会计期间',
  179. align:"center",
  180. dataIndex: 'kjqj'
  181. },
  182. {
  183. title:'凭证内码',
  184. align:"center",
  185. dataIndex: 'pznm'
  186. },
  187. {
  188. title:'项目编号',
  189. align:"center",
  190. dataIndex: 'xmbh'
  191. },
  192. {
  193. title:'项目名称',
  194. align:"center",
  195. dataIndex: 'xmmc'
  196. },
  197. {
  198. title:'项目类别',
  199. align:"center",
  200. dataIndex: 'xmlb'
  201. },
  202. {
  203. title:'辅助金额',
  204. align:"center",
  205. dataIndex: 'fzje',
  206. fixed: 'right',
  207. },
  208. // {
  209. // title: '操作',
  210. // dataIndex: 'action',
  211. // align:"center",
  212. // fixed:"right",
  213. // width:147,
  214. // scopedSlots: { customRender: 'action' }
  215. // }
  216. ],
  217. url: {
  218. list: "/projectChbSwf/projectChbSwf/getSWFDetailList",
  219. // delete: "/projectChbSwf/projectChbSwf/delete",
  220. // deleteBatch: "/projectChbSwf/projectChbSwf/deleteBatch",
  221. exportXlsUrl: "/projectChbSwf/projectChbSwf/exportXls",
  222. // importExcelUrl: "projectChbSwf/projectChbSwf/importExcel",
  223. },
  224. dictOptions:{},
  225. superFieldList:[],
  226. }
  227. },
  228. created() {
  229. this.getSuperFieldList();
  230. this.loadData()
  231. },
  232. computed: {
  233. // importExcelUrl: function(){
  234. // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  235. // },
  236. },
  237. methods: {
  238. loadData() {
  239. this.loading = true;
  240. getAction(this.url.list, {taskno: this.taskno}).then((res) => {
  241. this.dataSource = res
  242. }).finally(() => {
  243. this.loading = false
  244. })
  245. },
  246. initDictConfig(){
  247. },
  248. getSuperFieldList(){
  249. let fieldList=[];
  250. fieldList.push({type:'string',value:'nd',text:'年度',dictCode:''})
  251. fieldList.push({type:'string',value:'pzrq',text:'凭证日期',dictCode:''})
  252. fieldList.push({type:'string',value:'pzh',text:'凭证号',dictCode:''})
  253. fieldList.push({type:'string',value:'zy',text:'摘要',dictCode:''})
  254. fieldList.push({type:'string',value:'kmbh',text:'科目编号',dictCode:''})
  255. fieldList.push({type:'string',value:'km',text:'科目名称',dictCode:''})
  256. fieldList.push({type:'string',value:'fx',text:'方向',dictCode:''})
  257. fieldList.push({type:'string',value:'je',text:'金额',dictCode:''})
  258. fieldList.push({type:'string',value:'bm',text:'部门',dictCode:''})
  259. fieldList.push({type:'string',value:'wldw',text:'往来单位',dictCode:''})
  260. fieldList.push({type:'string',value:'fzje',text:'辅助金额',dictCode:''})
  261. fieldList.push({type:'string',value:'zdr',text:'制单人',dictCode:''})
  262. fieldList.push({type:'string',value:'kjqj',text:'会计期间',dictCode:''})
  263. fieldList.push({type:'string',value:'pznm',text:'凭证内码',dictCode:''})
  264. fieldList.push({type:'string',value:'xmbh',text:'项目编号',dictCode:''})
  265. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  266. fieldList.push({type:'string',value:'xmlb',text:'项目类别',dictCode:''})
  267. fieldList.push({type:'string',value:'taskno',text:'任务号',dictCode:''})
  268. this.superFieldList = fieldList
  269. }
  270. }
  271. }
  272. </script>
  273. <style scoped>
  274. @import '~@assets/less/common.less';
  275. </style>
  276. <style lang="less" scoped>
  277. .u-dialog-card{
  278. /deep/.ant-card-body{
  279. padding: 0 !important;
  280. }
  281. }
  282. </style>