爱简收旧衣按件回收后端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
7.3 KiB

1 month ago
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="审核状态">
  9. <j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.status" dictCode="open_status"/>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. <a @click="handleToggleSearch" style="margin-left: 8px">
  17. {{ toggleSearchStatus ? '收起' : '展开' }}
  18. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  19. </a>
  20. </span>
  21. </a-col>
  22. </a-row>
  23. </a-form>
  24. </div>
  25. <!-- 查询区域-END -->
  26. <!-- 操作按钮区域 -->
  27. <div class="table-operator">
  28. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  29. <a-button type="primary" icon="download" @click="handleExportXls('推广申请')">导出</a-button>
  30. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  31. <a-button type="primary" icon="import">导入</a-button>
  32. </a-upload>
  33. <!-- 高级查询区域 -->
  34. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  35. <a-dropdown v-if="selectedRowKeys.length > 0">
  36. <a-menu slot="overlay">
  37. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  38. </a-menu>
  39. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  40. </a-dropdown>
  41. </div>
  42. <!-- table区域-begin -->
  43. <div>
  44. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  45. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  46. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  47. </div>
  48. <a-table
  49. ref="table"
  50. size="middle"
  51. :scroll="{x:true}"
  52. bordered
  53. rowKey="id"
  54. :columns="columns"
  55. :dataSource="dataSource"
  56. :pagination="ipagination"
  57. :loading="loading"
  58. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  59. class="j-table-force-nowrap"
  60. @change="handleTableChange">
  61. <template slot="htmlSlot" slot-scope="text">
  62. <div v-html="text"></div>
  63. </template>
  64. <template slot="imgSlot" slot-scope="text,record">
  65. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  66. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  67. </template>
  68. <template slot="fileSlot" slot-scope="text">
  69. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  70. <a-button
  71. v-else
  72. :ghost="true"
  73. type="primary"
  74. icon="download"
  75. size="small"
  76. @click="downloadFile(text)">
  77. 下载
  78. </a-button>
  79. </template>
  80. <span slot="action" slot-scope="text, record">
  81. <a @click="handleEdit(record)">编辑</a>
  82. <a-divider type="vertical" />
  83. <a-dropdown>
  84. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  85. <a-menu slot="overlay">
  86. <a-menu-item>
  87. <a @click="handleDetail(record)">详情</a>
  88. </a-menu-item>
  89. <a-menu-item>
  90. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  91. <a>删除</a>
  92. </a-popconfirm>
  93. </a-menu-item>
  94. </a-menu>
  95. </a-dropdown>
  96. </span>
  97. </a-table>
  98. </div>
  99. <common-promotion-modal ref="modalForm" @ok="modalFormOk"></common-promotion-modal>
  100. </a-card>
  101. </template>
  102. <script>
  103. import '@/assets/less/TableExpand.less'
  104. import { mixinDevice } from '@/utils/mixin'
  105. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  106. import CommonPromotionModal from './modules/CommonPromotionModal'
  107. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  108. export default {
  109. name: 'CommonPromotionList',
  110. mixins:[JeecgListMixin, mixinDevice],
  111. components: {
  112. CommonPromotionModal
  113. },
  114. data () {
  115. return {
  116. description: '推广申请管理页面',
  117. // 表头
  118. columns: [
  119. {
  120. title: '#',
  121. dataIndex: '',
  122. key:'rowIndex',
  123. width:60,
  124. align:"center",
  125. customRender:function (t,r,index) {
  126. return parseInt(index)+1;
  127. }
  128. },
  129. {
  130. title:'用户',
  131. align:"center",
  132. dataIndex: 'userId_dictText'
  133. },
  134. {
  135. title:'姓名',
  136. align:"center",
  137. dataIndex: 'name'
  138. },
  139. {
  140. title:'电话',
  141. align:"center",
  142. dataIndex: 'phone'
  143. },
  144. {
  145. title:'推广时间',
  146. align:"center",
  147. dataIndex: 'userTime'
  148. },
  149. {
  150. title:'审核状态',
  151. align:"center",
  152. dataIndex: 'status_dictText'
  153. },
  154. {
  155. title: '操作',
  156. dataIndex: 'action',
  157. align:"center",
  158. fixed:"right",
  159. width:147,
  160. scopedSlots: { customRender: 'action' }
  161. }
  162. ],
  163. url: {
  164. list: "/commonPromotion/commonPromotion/list",
  165. delete: "/commonPromotion/commonPromotion/delete",
  166. deleteBatch: "/commonPromotion/commonPromotion/deleteBatch",
  167. exportXlsUrl: "/commonPromotion/commonPromotion/exportXls",
  168. importExcelUrl: "commonPromotion/commonPromotion/importExcel",
  169. },
  170. dictOptions:{},
  171. superFieldList:[],
  172. }
  173. },
  174. created() {
  175. this.getSuperFieldList();
  176. },
  177. computed: {
  178. importExcelUrl: function(){
  179. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  180. },
  181. },
  182. methods: {
  183. initDictConfig(){
  184. },
  185. getSuperFieldList(){
  186. let fieldList=[];
  187. fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
  188. fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
  189. fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
  190. fieldList.push({type:'string',value:'userTime',text:'推广时间',dictCode:''})
  191. fieldList.push({type:'int',value:'status',text:'审核状态',dictCode:'open_status'})
  192. this.superFieldList = fieldList
  193. }
  194. }
  195. }
  196. </script>
  197. <style scoped>
  198. @import '~@assets/less/common.less';
  199. </style>