用工平台小程序后端代码
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.

307 lines
10 KiB

5 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-row>
  8. </a-form>
  9. </div>
  10. <!-- 查询区域-END -->
  11. <!-- 操作按钮区域 -->
  12. <div class="table-operator">
  13. <!-- <a-button type="primary" icon="download" @click="handleExportXls('mer_recharge_info_log')">导出</a-button>-->
  14. <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
  15. <!-- <a-button type="primary" icon="import">导入</a-button>-->
  16. <!-- </a-upload>-->
  17. <!-- 高级查询区域 -->
  18. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  19. <a-dropdown v-if="selectedRowKeys.length > 0">
  20. <!-- <a-menu slot="overlay">-->
  21. <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
  22. <!-- </a-menu>-->
  23. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  24. </a-dropdown>
  25. </div>
  26. <!-- table区域-begin -->
  27. <div>
  28. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  29. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  30. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  31. </div>
  32. <a-table
  33. ref="table"
  34. size="middle"
  35. :scroll="{x:true}"
  36. bordered
  37. rowKey="id"
  38. :columns="columns"
  39. :dataSource="dataSource"
  40. :pagination="ipagination"
  41. :loading="loading"
  42. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  43. class="j-table-force-nowrap"
  44. @change="handleTableChange">
  45. <template slot="ellipsisSlot" slot-scope="text">
  46. <j-ellipsis :value="text"/>
  47. </template>
  48. <template slot="htmlSlot" slot-scope="text">
  49. <div v-html="text"></div>
  50. </template>
  51. <template slot="imgSlot" slot-scope="text">
  52. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  53. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  54. </template>
  55. <template slot="fileSlot" slot-scope="text">
  56. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  57. <a-button
  58. v-else
  59. :ghost="true"
  60. type="primary"
  61. icon="download"
  62. size="small"
  63. @click="downloadFile(text)">
  64. 下载
  65. </a-button>
  66. </template>
  67. <span slot="action" slot-scope="text, record">
  68. <a @click="handleEdit(record)">编辑</a>
  69. <div v-if="record.state==0">
  70. <a-popconfirm title="确定通过吗?" @confirm="() => handleAudit(record.id,true)">
  71. <a>通过</a>
  72. </a-popconfirm>
  73. <a-divider type="vertical" />
  74. <!-- <a-popconfirm title="确定不通过吗?" @prompt="() => handleAudit(record.id,false)">-->
  75. <a @click="handleAudit(record.id,false)">不通过</a>
  76. <!-- </a-popconfirm>-->
  77. </div>
  78. <div v-if="record.state == 1">
  79. <a-divider type="vertical" />
  80. <a-popconfirm title="确定打款吗?" @confirm="() => handleWithdrawal(record.id)">
  81. <a>打款</a>
  82. </a-popconfirm>
  83. </div>
  84. <a-divider type="vertical" />
  85. <a-dropdown>
  86. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  87. <a-menu slot="overlay">
  88. <a-menu-item>
  89. <a @click="handleDetail(record)">详情</a>
  90. </a-menu-item>
  91. <!-- <a-menu-item>-->
  92. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  93. <!-- <a>删除</a>-->
  94. <!-- </a-popconfirm>-->
  95. <!-- </a-menu-item>-->
  96. </a-menu>
  97. </a-dropdown>
  98. </span>
  99. </a-table>
  100. </div>
  101. <mer-recharge-info-log-modal ref="modalForm" @ok="modalFormOk"></mer-recharge-info-log-modal>
  102. </a-card>
  103. </template>
  104. <script>
  105. import '@/assets/less/TableExpand.less'
  106. import { mixinDevice } from '@/utils/mixin'
  107. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  108. import MerRechargeInfoLogModal from './modules/MerRechargeInfoLogModal'
  109. import { httpAction, getAction } from '@/api/manage'
  110. export default {
  111. name: 'MerRechargeInfoLogList',
  112. mixins:[JeecgListMixin, mixinDevice],
  113. components: {
  114. MerRechargeInfoLogModal
  115. },
  116. data () {
  117. return {
  118. description: '提现申请管理页面',
  119. // 表头
  120. columns: [
  121. {
  122. title: '#',
  123. dataIndex: '',
  124. key:'rowIndex',
  125. width:60,
  126. align:"center",
  127. customRender:function (t,r,index) {
  128. return parseInt(index)+1;
  129. }
  130. },
  131. {
  132. title:'标题',
  133. align:"center",
  134. dataIndex: 'title'
  135. },
  136. {
  137. title:'用户Id',
  138. align:"center",
  139. dataIndex: 'memberId'
  140. },
  141. {
  142. title:'用户名',
  143. align:"center",
  144. dataIndex: 'memberId_dictText'
  145. },
  146. {
  147. title:'真实姓名',
  148. align:"center",
  149. dataIndex: 'realName'
  150. },
  151. {
  152. title:'金额',
  153. align:"center",
  154. dataIndex: 'money'
  155. },
  156. {
  157. title:'用户原本金额',
  158. align:"center",
  159. dataIndex: 'userMoney'
  160. },
  161. {
  162. title:'备注说明',
  163. align:"center",
  164. dataIndex: 'info',
  165. scopedSlots: {customRender: 'ellipsisSlot'}
  166. },
  167. {
  168. title:'支付时间',
  169. align:"center",
  170. dataIndex: 'payTime'
  171. },
  172. {
  173. title:'类型',
  174. align:"center",
  175. dataIndex: 'type_dictText'
  176. },
  177. {
  178. title:'服务费',
  179. align:"center",
  180. dataIndex: 'serviceCharge'
  181. },
  182. {
  183. title:'审核未通过原因',
  184. align:"center",
  185. dataIndex: 'checkInfo'
  186. },
  187. {
  188. title:'提现审核',
  189. align:"center",
  190. dataIndex: 'state_dictText'
  191. },
  192. {
  193. title: '操作',
  194. dataIndex: 'action',
  195. align:"center",
  196. fixed:"right",
  197. width:147,
  198. scopedSlots: { customRender: 'action' }
  199. }
  200. ],
  201. url: {
  202. list: "/rechargeInfoLog/tbRechargeInfoLog/list2",
  203. delete: "/rechargeInfoLog/tbRechargeInfoLog/delete",
  204. deleteBatch: "/rechargeInfoLog/tbRechargeInfoLog/deleteBatch",
  205. exportXlsUrl: "/rechargeInfoLog/tbRechargeInfoLog/exportXls",
  206. importExcelUrl: "/rechargeInfoLog/tbRechargeInfoLog/importExcel",
  207. auidt: "/rechargeInfoLog/tbRechargeInfoLog/audit",
  208. withdrawal: "/rechargeInfoLog/tbRechargeInfoLog/withdrawal"
  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:'BigDecimal',value:'money',text:'金额',dictCode:''})
  229. fieldList.push({type:'BigDecimal',value:'userMoney',text:'用户原本金额',dictCode:''})
  230. fieldList.push({type:'int',value:'isPay',text:'是否支付 0否 1是',dictCode:''})
  231. fieldList.push({type:'string',value:'info',text:'备注说明',dictCode:''})
  232. fieldList.push({type:'date',value:'payTime',text:'支付时间'})
  233. fieldList.push({type:'string',value:'memberId',text:'用户Id',dictCode:''})
  234. fieldList.push({type:'string',value:'wxCode',text:'微信支付返回流水',dictCode:''})
  235. fieldList.push({type:'string',value:'wxInfo',text:'微信支付返回信息',dictCode:''})
  236. fieldList.push({type:'int',value:'type',text:'类型 0支出 1支入',dictCode:''})
  237. fieldList.push({type:'string',value:'orderId',text:'订单id',dictCode:''})
  238. fieldList.push({type:'BigDecimal',value:'serviceCharge',text:'服务费',dictCode:''})
  239. fieldList.push({type:'int',value:'state',text:'提现审核 0未审核 1已审核 2已打款',dictCode:''})
  240. this.superFieldList = fieldList
  241. },
  242. handleAudit(id,status){
  243. let checkInfo= '';
  244. if(status === false){
  245. checkInfo = prompt("请输入不通过的原因")
  246. if(checkInfo === ''){
  247. return;
  248. }
  249. }
  250. let param = {
  251. id:id,
  252. status:status,
  253. checkInfo: checkInfo
  254. }
  255. getAction(this.url.auidt,param).then((res)=>{
  256. if(res.success){
  257. this.reCalculatePage(1)
  258. this.$message.success(res.message);
  259. this.loadData();
  260. }else{
  261. this.$message.warning(res.message);
  262. }
  263. }).finally(() => {
  264. this.confirmLoading = false;
  265. })
  266. },
  267. handleWithdrawal(id){
  268. let param = {
  269. id:id
  270. }
  271. getAction(this.url.withdrawal,param).then((res)=>{
  272. if(res.success){
  273. this.reCalculatePage(1)
  274. this.$message.success(res.message);
  275. this.loadData();
  276. }else{
  277. this.$message.warning(res.message);
  278. }
  279. }).finally(() => {
  280. this.confirmLoading = false;
  281. })
  282. }
  283. }
  284. }
  285. </script>
  286. <style scoped>
  287. @import '~@assets/less/common.less';
  288. </style>