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.

253 lines
7.9 KiB

1 year 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-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('hotel_order')">导出</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. <hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-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 HotelOrderModal from './modules/HotelOrderModal'
  92. export default {
  93. name: 'RefundOrderList',
  94. mixins:[JeecgListMixin, mixinDevice],
  95. components: {
  96. HotelOrderModal
  97. },
  98. data () {
  99. return {
  100. description: '退货订单管理页面',
  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: 'title'
  117. },
  118. {
  119. title:'商品图片',
  120. align:"center",
  121. dataIndex: 'pic',
  122. scopedSlots: {customRender: 'imgSlot'}
  123. },
  124. {
  125. title:'客户姓名',
  126. align:"center",
  127. dataIndex: 'userName'
  128. },
  129. {
  130. title:'客户手机号',
  131. align:"center",
  132. dataIndex: 'userPhone'
  133. },
  134. {
  135. title:'用户地址',
  136. align:"center",
  137. dataIndex: 'userAddress'
  138. },
  139. {
  140. title:'用户编号',
  141. align:"center",
  142. dataIndex: 'userId'
  143. },
  144. {
  145. title:'店铺编号',
  146. align:"center",
  147. dataIndex: 'shopId'
  148. },
  149. {
  150. title:'租赁时间',
  151. align:"center",
  152. dataIndex: 'leaseTime'
  153. },
  154. {
  155. title:'缴纳费用',
  156. align:"center",
  157. dataIndex: 'payFee'
  158. },
  159. {
  160. title:'押金',
  161. align:"center",
  162. dataIndex: 'deposit'
  163. },
  164. {
  165. title:'水洗费用',
  166. align:"center",
  167. dataIndex: 'washPay'
  168. },
  169. {
  170. title:'水洗费用',
  171. align:"center",
  172. dataIndex: 'rentPay'
  173. },
  174. {
  175. title:'支付金额',
  176. align:"center",
  177. dataIndex: 'orderPay'
  178. },
  179. {
  180. title:'状态',
  181. align:"center",
  182. dataIndex: 'status_dictText'
  183. },
  184. {
  185. title:'类型',
  186. align:"center",
  187. dataIndex: 'type_dictText'
  188. },
  189. {
  190. title:'是否删除',
  191. align:"center",
  192. dataIndex: 'delFlag_dictText'
  193. },
  194. {
  195. title: '操作',
  196. dataIndex: 'action',
  197. align:"center",
  198. fixed:"right",
  199. width:147,
  200. scopedSlots: { customRender: 'action' }
  201. }
  202. ],
  203. url: {
  204. list: "/hotelorder/hotelOrder/refund/list",
  205. delete: "/hotelorder/hotelOrder/delete",
  206. deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
  207. exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
  208. importExcelUrl: "hotelorder/hotelOrder/importExcel",
  209. },
  210. dictOptions:{},
  211. superFieldList:[],
  212. }
  213. },
  214. created() {
  215. this.getSuperFieldList();
  216. },
  217. computed: {
  218. importExcelUrl: function(){
  219. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  220. },
  221. },
  222. methods: {
  223. initDictConfig(){
  224. },
  225. getSuperFieldList(){
  226. let fieldList=[];
  227. fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
  228. fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
  229. fieldList.push({type:'string',value:'userPhone',text:'客户手机号',dictCode:''})
  230. fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
  231. fieldList.push({type:'string',value:'shopId',text:'店铺编号',dictCode:''})
  232. fieldList.push({type:'int',value:'status',text:'状态',dictCode:'order_status'})
  233. fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
  234. fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
  235. this.superFieldList = fieldList
  236. }
  237. }
  238. }
  239. </script>
  240. <style scoped>
  241. @import '~@assets/less/common.less';
  242. </style>