"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[89652],{89652:function(e,t,a){a.r(t),a.d(t,{default:function(){return s}});var n=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{background:"white"}},[t("el-form",{ref:"form",staticClass:"g-pa-xl",attrs:{inline:!0,model:e.form,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:"接入商户编号"}},[t("el-input",{attrs:{clearable:""},model:{value:e.form.merchantNo,callback:function(t){e.$set(e.form,"merchantNo",t)},expression:"form.merchantNo"}})],1),t("el-form-item",{attrs:{label:"商户名"}},[t("el-input",{attrs:{clearable:""},model:{value:e.form.merchantName,callback:function(t){e.$set(e.form,"merchantName",t)},expression:"form.merchantName"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.fetchMerchantList(1)}}},[e._v("查询")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addMerchant()}}},[e._v("新增")])],1)],1),t("div",{staticClass:"g-relative-position"},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.dataSource.records},on:{"selection-change":function(t){e.selectedRows=t}}},[t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"merchantNo",label:"商户号"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"merchantName",label:"商户名"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",label:"交易限额"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{domProps:{innerHTML:e._s(a.row.tradeLimit)}})]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",label:"开通产品"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{domProps:{innerHTML:e._s(a.row.product)}})]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"country",label:"支付国家"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{domProps:{innerHTML:e._s(a.row.country)}})]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"actions",label:"操作"},scopedSlots:e._u([{key:"default",fn:function({row:a}){return[0===a.enableFlag?t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.changeMerchantFlag(a.id)}}},[e._v("启用")]):e._e(),1===a.enableFlag?t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.changeMerchantFlag(a.id)}}},[e._v("关闭")]):e._e(),t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.editMerchant(a.id)}}},[e._v("编辑")])]}}])})],1),t("div",{staticClass:"g-pagination-container"},[t("el-pagination",{attrs:{"current-page":e.dataSource.pageNow,"page-sizes":[20,50,100],"page-size":e.dataSource.pageSize,layout:"sizes, prev, pager, next, jumper",background:"",total:e.dataSource.rowCount},on:{"size-change":function(t){return e.fetchDataSource(null,t)},"current-change":function(t){return e.fetchDataSource(t)}}})],1)],1)],1)},r=[],o=(a(44114),{data(){return{form:{},loading:!1,dataSource:{records:[],pageNow:1,pageSize:20}}},mounted(){this.fetchMerchantList(1)},methods:{fetchMerchantList(e){this.fetchDataSource(e)},addMerchant(){this.$router.push("/financeSys/payMerchantDetail/0")},editMerchant(e){this.$router.push(`/financeSys/payMerchantDetail/${e}`)},async fetchDataSource(e,t){this.loading=!0;const a={pageNow:e||this.dataSource.pageNow,pageSize:t||this.dataSource.pageSize,...this.handleParams()},n=await this.$store.dispatch({type:"finance/queryPayMerchant",payload:a});n&&(this.dataSource=n),this.loading=!1},async changeMerchantFlag(e){const t={id:e},a=await this.$store.dispatch({type:"finance/changeMerchantFlag",payload:t});a&&this.fetchDataSource(1)},handleParams(){const e={...this.form};return e}}}),c=o,l=a(81656),i=(0,l.A)(c,n,r,!1,null,null,null),s=i.exports}}]);