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.

200 lines
6.9 KiB

8 months ago
7 months ago
8 months ago
7 months ago
7 months ago
8 months ago
7 months ago
8 months 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 :md="6" :sm="12">
  8. <a-form-item label="用户编号">
  9. <a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
  10. <!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
  11. </a-form-item>
  12. </a-col>
  13. </a-row>
  14. </a-form>
  15. </div>
  16. <!-- 查询区域-END -->
  17. <!-- 操作按钮区域 -->
  18. <div class="table-operator">
  19. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  20. <!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_member_account')">导出</a-button>-->
  21. <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
  22. <!-- <a-button type="primary" icon="import">导入</a-button>-->
  23. <!-- </a-upload>-->
  24. <!-- 高级查询区域 -->
  25. <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
  26. <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
  27. <!-- <a-menu slot="overlay">-->
  28. <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
  29. <!-- </a-menu>-->
  30. <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
  31. <!-- </a-dropdown>-->
  32. </div>
  33. <!-- table区域-begin -->
  34. <div>
  35. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  36. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  37. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  38. </div>
  39. <a-table
  40. ref="table"
  41. size="middle"
  42. :scroll="{x:true}"
  43. bordered
  44. rowKey="id"
  45. :columns="columns"
  46. :dataSource="dataSource"
  47. :pagination="ipagination"
  48. :loading="loading"
  49. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  50. class="j-table-force-nowrap"
  51. @change="handleTableChange">
  52. <template slot="htmlSlot" slot-scope="text">
  53. <div v-html="text"></div>
  54. </template>
  55. <template slot="imgSlot" slot-scope="text,record">
  56. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  57. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  58. </template>
  59. <template slot="fileSlot" slot-scope="text">
  60. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  61. <a-button
  62. v-else
  63. :ghost="true"
  64. type="primary"
  65. icon="download"
  66. size="small"
  67. @click="downloadFile(text)">
  68. 下载
  69. </a-button>
  70. </template>
  71. <span slot="action" slot-scope="text, record">
  72. <a @click="handleEdit(record)">编辑</a>
  73. <a-divider type="vertical" />
  74. <a-dropdown>
  75. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  76. <a-menu slot="overlay">
  77. <a-menu-item>
  78. <a @click="handleDetail(record)">详情</a>
  79. </a-menu-item>
  80. <!-- <a-menu-item>-->
  81. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  82. <!-- <a>删除</a>-->
  83. <!-- </a-popconfirm>-->
  84. <!-- </a-menu-item>-->
  85. </a-menu>
  86. </a-dropdown>
  87. </span>
  88. </a-table>
  89. </div>
  90. <hotel-member-account-modal ref="modalForm" @ok="modalFormOk"></hotel-member-account-modal>
  91. </a-card>
  92. </template>
  93. <script>
  94. import '@/assets/less/TableExpand.less'
  95. import { mixinDevice } from '@/utils/mixin'
  96. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  97. import HotelMemberAccountModal from './modules/HotelMemberAccountModal'
  98. export default {
  99. name: 'HotelMemberAccountList',
  100. mixins:[JeecgListMixin, mixinDevice],
  101. components: {
  102. HotelMemberAccountModal
  103. },
  104. data () {
  105. return {
  106. description: '用户钱包管理页面',
  107. // 表头
  108. columns: [
  109. {
  110. title: '#',
  111. dataIndex: '',
  112. key:'rowIndex',
  113. width:60,
  114. align:"center",
  115. customRender:function (t,r,index) {
  116. return parseInt(index)+1;
  117. }
  118. },
  119. {
  120. title:'用户编号',
  121. align:"center",
  122. dataIndex: 'userId'
  123. },
  124. {
  125. title:'余额',
  126. align:"center",
  127. dataIndex: 'balance'
  128. },
  129. {
  130. title:'押金',
  131. align:"center",
  132. dataIndex: 'deposit'
  133. },
  134. {
  135. title:'店铺佣金',
  136. align:"center",
  137. dataIndex: 'shopBalance'
  138. },
  139. {
  140. title:'是否删除',
  141. align:"center",
  142. dataIndex: 'delFlag_dictText'
  143. },
  144. {
  145. title: '操作',
  146. dataIndex: 'action',
  147. align:"center",
  148. fixed:"right",
  149. width:147,
  150. scopedSlots: { customRender: 'action' }
  151. }
  152. ],
  153. url: {
  154. list: "/hotelmemberaccount/hotelMemberAccount/list",
  155. delete: "/hotelmemberaccount/hotelMemberAccount/delete",
  156. deleteBatch: "/hotelmemberaccount/hotelMemberAccount/deleteBatch",
  157. exportXlsUrl: "/hotelmemberaccount/hotelMemberAccount/exportXls",
  158. importExcelUrl: "hotelmemberaccount/hotelMemberAccount/importExcel",
  159. },
  160. dictOptions:{},
  161. superFieldList:[],
  162. }
  163. },
  164. created() {
  165. this.getSuperFieldList();
  166. },
  167. computed: {
  168. importExcelUrl: function(){
  169. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  170. },
  171. },
  172. methods: {
  173. initDictConfig(){
  174. },
  175. getSuperFieldList(){
  176. let fieldList=[];
  177. fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
  178. // fieldList.push({type:'BigDecimal',value:'balance',text:'余额',dictCode:''})
  179. // fieldList.push({type:'BigDecimal',value:'deposit',text:'押金',dictCode:''})
  180. // fieldList.push({type:'BigDecimal',value:'shopBalance',text:'店铺佣金',dictCode:''})
  181. // fieldList.push({type:'int',value:'delFlag',text:'是否删除 0否 1是',dictCode:''})
  182. this.superFieldList = fieldList
  183. }
  184. }
  185. }
  186. </script>
  187. <style scoped>
  188. @import '~@assets/less/common.less';
  189. </style>