marketMemberList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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-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('bus_market_member_info')">导出</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. <bus-market-member-modal ref="modalForm" @ok="modalFormOk"></bus-market-member-modal>
  85. </a-card>
  86. </template>
  87. <script>
  88. import '@/assets/less/TableExpand.less'
  89. import { mixinDevice } from '@/utils/mixin'
  90. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  91. import marketMemberModal from './components/marketMemberModal'
  92. export default {
  93. name: 'marketMemberList',
  94. mixins:[JeecgListMixin, mixinDevice],
  95. components: {
  96. marketMemberModal
  97. },
  98. data () {
  99. return {
  100. description: 'bus_market_member_info管理页面',
  101. // 表头
  102. columns: [
  103. {
  104. title: '#',
  105. dataIndex: '',
  106. key:'rowIndex',
  107. width:60,
  108. align:"center",
  109. customRender:function (t,r,index) {
  110. return parseInt(index)+1;
  111. }
  112. },
  113. {
  114. title:'关联租户',
  115. align:"center",
  116. dataIndex: 'tenantId'
  117. },
  118. {
  119. title:'关联酒店',
  120. align:"center",
  121. dataIndex: 'hotelId'
  122. },
  123. {
  124. title:'会员名称',
  125. align:"center",
  126. dataIndex: 'name'
  127. },
  128. {
  129. title:'会员类型(0-会员折扣;1-房价方案)',
  130. align:"center",
  131. dataIndex: 'type'
  132. },
  133. {
  134. title:'会员折扣值',
  135. align:"center",
  136. dataIndex: 'discount'
  137. },
  138. {
  139. title:'关联房价方案',
  140. align:"center",
  141. dataIndex: 'schemeId'
  142. },
  143. {
  144. title:'是否需要支付(0-否;1-是)',
  145. align:"center",
  146. dataIndex: 'payFlag'
  147. },
  148. {
  149. title:'支付金额',
  150. align:"center",
  151. dataIndex: 'payAmount'
  152. },
  153. {
  154. title:'购买会员卡所需积分',
  155. align:"center",
  156. dataIndex: 'payIntegral'
  157. },
  158. {
  159. title:'是否可以储值(0-否;1-是)',
  160. align:"center",
  161. dataIndex: 'payStored'
  162. },
  163. {
  164. title:'会员等级',
  165. align:"center",
  166. dataIndex: 'level'
  167. },
  168. {
  169. title:'会员优惠(每一积分可抵扣金额)',
  170. align:"center",
  171. dataIndex: 'hyyh'
  172. },
  173. {
  174. title:'充值是否自动续期',
  175. align:"center",
  176. dataIndex: 'renewal'
  177. },
  178. {
  179. title:'自动续期天数',
  180. align:"center",
  181. dataIndex: 'renewalDay'
  182. },
  183. {
  184. title:'积分类型',
  185. align:"center",
  186. dataIndex: 'integralTypes'
  187. },
  188. {
  189. title:'客房积分模式(1-所有的消费转成积分;2-只房费转积分;)',
  190. align:"center",
  191. dataIndex: 'tenantPoints'
  192. },
  193. {
  194. title:'客房消费金额',
  195. align:"center",
  196. dataIndex: 'tenantRoomIntegral'
  197. },
  198. {
  199. title:'客房消费可增加积分',
  200. align:"center",
  201. dataIndex: 'addTenantRoomIntegral'
  202. },
  203. {
  204. title:'储值卡消费金额',
  205. align:"center",
  206. dataIndex: 'roomIntegral'
  207. },
  208. {
  209. title:'储值卡消费可增加积分',
  210. align:"center",
  211. dataIndex: 'addRoomIntegral'
  212. },
  213. {
  214. title:'入住天数',
  215. align:"center",
  216. dataIndex: 'dayIntegral'
  217. },
  218. {
  219. title:'入住可增加积分',
  220. align:"center",
  221. dataIndex: 'addDayIntegral'
  222. },
  223. {
  224. title:'充值金额',
  225. align:"center",
  226. dataIndex: 'rechargeIntegral'
  227. },
  228. {
  229. title:'充值可增加积分',
  230. align:"center",
  231. dataIndex: 'addRechargeIntegral'
  232. },
  233. {
  234. title:'自动升级所需积分',
  235. align:"center",
  236. dataIndex: 'upLevelIntegral'
  237. },
  238. {
  239. title:'自动升级等级',
  240. align:"center",
  241. dataIndex: 'upLevel'
  242. },
  243. {
  244. title:'升级后剩余积分',
  245. align:"center",
  246. dataIndex: 'subLevelIntegral'
  247. },
  248. {
  249. title:'会员图标',
  250. align:"center",
  251. dataIndex: 'icon'
  252. },
  253. {
  254. title:'卡片背景',
  255. align:"center",
  256. dataIndex: 'bgImage'
  257. },
  258. {
  259. title:'卡片描述',
  260. align:"center",
  261. dataIndex: 'content'
  262. },
  263. {
  264. title: '操作',
  265. dataIndex: 'action',
  266. align:"center",
  267. fixed:"right",
  268. width:147,
  269. scopedSlots: { customRender: 'action' }
  270. }
  271. ],
  272. url: {
  273. list: "/business/busMarketMember/list",
  274. delete: "/business/busMarketMember/delete",
  275. deleteBatch: "/business/busMarketMember/deleteBatch",
  276. exportXlsUrl: "/business/busMarketMember/exportXls",
  277. importExcelUrl: "business/busMarketMember/importExcel",
  278. },
  279. dictOptions:{},
  280. superFieldList:[],
  281. }
  282. },
  283. created() {
  284. this.getSuperFieldList();
  285. },
  286. computed: {
  287. importExcelUrl: function(){
  288. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  289. },
  290. },
  291. methods: {
  292. initDictConfig(){
  293. },
  294. getSuperFieldList(){
  295. let fieldList=[];
  296. fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
  297. fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
  298. fieldList.push({type:'string',value:'name',text:'会员名称'})
  299. fieldList.push({type:'int',value:'type',text:'会员类型(0-会员折扣;1-房价方案)'})
  300. fieldList.push({type:'number',value:'discount',text:'会员折扣值'})
  301. fieldList.push({type:'string',value:'schemeId',text:'关联房价方案'})
  302. fieldList.push({type:'int',value:'payFlag',text:'是否需要支付(0-否;1-是)'})
  303. fieldList.push({type:'number',value:'payAmount',text:'支付金额'})
  304. fieldList.push({type:'number',value:'payIntegral',text:'购买会员卡所需积分'})
  305. fieldList.push({type:'int',value:'payStored',text:'是否可以储值(0-否;1-是)'})
  306. fieldList.push({type:'int',value:'level',text:'会员等级'})
  307. fieldList.push({type:'number',value:'hyyh',text:'会员优惠(每一积分可抵扣金额)'})
  308. fieldList.push({type:'string',value:'renewal',text:'充值是否自动续期'})
  309. fieldList.push({type:'number',value:'renewalDay',text:'自动续期天数'})
  310. fieldList.push({type:'string',value:'integralTypes',text:'积分类型'})
  311. fieldList.push({type:'string',value:'tenantPoints',text:'客房积分模式(1-所有的消费转成积分;2-只房费转积分;)'})
  312. fieldList.push({type:'number',value:'tenantRoomIntegral',text:'客房消费金额'})
  313. fieldList.push({type:'number',value:'addTenantRoomIntegral',text:'客房消费可增加积分'})
  314. fieldList.push({type:'number',value:'roomIntegral',text:'储值卡消费金额'})
  315. fieldList.push({type:'number',value:'addRoomIntegral',text:'储值卡消费可增加积分'})
  316. fieldList.push({type:'number',value:'dayIntegral',text:'入住天数'})
  317. fieldList.push({type:'number',value:'addDayIntegral',text:'入住可增加积分'})
  318. fieldList.push({type:'number',value:'rechargeIntegral',text:'充值金额'})
  319. fieldList.push({type:'number',value:'addRechargeIntegral',text:'充值可增加积分'})
  320. fieldList.push({type:'number',value:'upLevelIntegral',text:'自动升级所需积分'})
  321. fieldList.push({type:'int',value:'upLevel',text:'自动升级等级'})
  322. fieldList.push({type:'number',value:'subLevelIntegral',text:'升级后剩余积分'})
  323. fieldList.push({type:'string',value:'icon',text:'会员图标'})
  324. fieldList.push({type:'string',value:'bgImage',text:'卡片背景'})
  325. fieldList.push({type:'string',value:'content',text:'卡片描述'})
  326. this.superFieldList = fieldList
  327. }
  328. }
  329. }
  330. </script>
  331. <style scoped>
  332. @import '~@assets/less/common.less';
  333. </style>