ProjectChbSxfList.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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(taskno+'筛选费明细')">导出</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. width: 120,
  121. fixed: 'left',
  122. },
  123. {
  124. title:'年度',
  125. align:"center",
  126. dataIndex: 'nd'
  127. },
  128. {
  129. title:'凭证日期',
  130. align:"center",
  131. dataIndex: 'pzrq'
  132. },
  133. {
  134. title:'凭证号',
  135. align:"center",
  136. dataIndex: 'pzh'
  137. },
  138. {
  139. title:'摘要',
  140. align:"center",
  141. dataIndex: 'zy'
  142. },
  143. {
  144. title:'科目编号',
  145. align:"center",
  146. dataIndex: 'kmbh'
  147. },
  148. {
  149. title:'科目名称',
  150. align:"center",
  151. dataIndex: 'km'
  152. },
  153. {
  154. title:'方向',
  155. align:"center",
  156. dataIndex: 'fx'
  157. },
  158. {
  159. title:'金额',
  160. align:"center",
  161. dataIndex: 'je'
  162. },
  163. {
  164. title:'部门',
  165. align:"center",
  166. dataIndex: 'bm'
  167. },
  168. {
  169. title:'往来单位',
  170. align:"center",
  171. dataIndex: 'wldw'
  172. },
  173. {
  174. title:'制单人',
  175. align:"center",
  176. dataIndex: 'zdr'
  177. },
  178. {
  179. title:'会计期间',
  180. align:"center",
  181. dataIndex: 'kjqj'
  182. },
  183. {
  184. title:'凭证内码',
  185. align:"center",
  186. dataIndex: 'pznm'
  187. },
  188. {
  189. title:'项目编号',
  190. align:"center",
  191. dataIndex: 'xmbh'
  192. },
  193. {
  194. title:'项目名称',
  195. align:"center",
  196. dataIndex: 'xmmc'
  197. },
  198. {
  199. title:'项目类别',
  200. align:"center",
  201. dataIndex: 'xmlb'
  202. },
  203. {
  204. title:'辅助金额',
  205. align:"center",
  206. dataIndex: 'fzje',
  207. width: 100,
  208. fixed: 'right',
  209. },
  210. // {
  211. // title: '操作',
  212. // dataIndex: 'action',
  213. // align:"center",
  214. // fixed:"right",
  215. // width:147,
  216. // scopedSlots: { customRender: 'action' }
  217. // }
  218. ],
  219. url: {
  220. list: "/projectChbSwf/projectChbSwf/getSXFDetailList",
  221. // delete: "/projectChbSwf/projectChbSwf/delete",
  222. // deleteBatch: "/projectChbSwf/projectChbSwf/deleteBatch",
  223. exportXlsUrl: "/projectChbSwf/projectChbSwf/exportSXFDetail",
  224. // importExcelUrl: "projectChbSwf/projectChbSwf/importExcel",
  225. },
  226. dictOptions:{},
  227. superFieldList:[],
  228. queryParam: {
  229. taskno: this.taskno
  230. }
  231. }
  232. },
  233. created() {
  234. this.getSuperFieldList();
  235. this.loadData()
  236. },
  237. computed: {
  238. // importExcelUrl: function(){
  239. // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  240. // },
  241. },
  242. methods: {
  243. loadData() {
  244. this.loading = true;
  245. getAction(this.url.list, {taskno: this.taskno}).then((res) => {
  246. this.dataSource = res
  247. }).finally(() => {
  248. this.loading = false
  249. })
  250. },
  251. initDictConfig(){
  252. },
  253. getSuperFieldList(){
  254. let fieldList=[];
  255. fieldList.push({type:'string',value:'nd',text:'年度',dictCode:''})
  256. fieldList.push({type:'string',value:'pzrq',text:'凭证日期',dictCode:''})
  257. fieldList.push({type:'string',value:'pzh',text:'凭证号',dictCode:''})
  258. fieldList.push({type:'string',value:'zy',text:'摘要',dictCode:''})
  259. fieldList.push({type:'string',value:'kmbh',text:'科目编号',dictCode:''})
  260. fieldList.push({type:'string',value:'km',text:'科目名称',dictCode:''})
  261. fieldList.push({type:'string',value:'fx',text:'方向',dictCode:''})
  262. fieldList.push({type:'string',value:'je',text:'金额',dictCode:''})
  263. fieldList.push({type:'string',value:'bm',text:'部门',dictCode:''})
  264. fieldList.push({type:'string',value:'wldw',text:'往来单位',dictCode:''})
  265. fieldList.push({type:'string',value:'fzje',text:'辅助金额',dictCode:''})
  266. fieldList.push({type:'string',value:'zdr',text:'制单人',dictCode:''})
  267. fieldList.push({type:'string',value:'kjqj',text:'会计期间',dictCode:''})
  268. fieldList.push({type:'string',value:'pznm',text:'凭证内码',dictCode:''})
  269. fieldList.push({type:'string',value:'xmbh',text:'项目编号',dictCode:''})
  270. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  271. fieldList.push({type:'string',value:'xmlb',text:'项目类别',dictCode:''})
  272. fieldList.push({type:'string',value:'taskno',text:'任务号',dictCode:''})
  273. this.superFieldList = fieldList
  274. }
  275. }
  276. }
  277. </script>
  278. <style scoped>
  279. @import '~@assets/less/common.less';
  280. </style>
  281. <style lang="less" scoped>
  282. .u-dialog-card{
  283. /deep/.ant-card-body{
  284. padding: 0 !important;
  285. }
  286. }
  287. </style>