(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cf866"],{"63a4":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"new-app-container layout-vertical"},[a("YMTableSearch",{attrs:{loading:e.loading,"search-form":e.searchForm},on:{onValueChange:e.onValueChange,submit:e.onSubmit}}),a("YMTable",{ref:"table",attrs:{"table-key":1,index:!0,selection:!1,"table-options":e.tableOptions,"edit-form":e.editForm,"edit-config":e.editConfig,columns:e.columns,"rows-actions":e.rowsActions,"show-summary":!1,apis:e.apis,actionsWidth:120,alertTip:e.alertTip,"custom-style":{height:"calc(100vh - 150px)"}},on:{onResponse:e.onResponse}}),a("Dialog",{ref:"dialog"},[a("template",{slot:"content"})],2)],1)},o=[],l=a("5530"),i=(a("99af"),a("9039")),s=a("7e1e"),r={components:{Dialog:i["a"]},data:function(){var e=this;return{loading:!1,visibleBasicDrawer:!1,alertTip:"",searchForm:[{label:"会员ID",type:"input",prop:"member_id",clearable:!1},{label:"会员昵称",type:"input",prop:"first_name",clearable:!0},{label:"订单号",type:"input",prop:"order_no",clearable:!1},{label:"状态",type:"select",prop:"status",clearable:!1,options:[{value:0,label:"待处理"},{value:1,label:"处理中"},{value:2,label:"成功"},{value:3,label:"失败"}]}],columns:[{label:"会员ID",prop:"member_id",width:120},{label:"会员昵称",popover:!0,width:140,props:["first_name"],options:[{label:"会员ID",value:["member_id"]},{label:"用户名称",value:["username"]},{label:"异常信息",vShow:function(e){return!(null===e||void 0===e||!e.user_admin_note)},value:["user_admin_note"]}]},{label:"订单号",prop:"order_no"},{label:"金额",prop:"amount"},{label:"渠道",prop:"bank_name"},{label:"手续费",prop:"fee",method:function(e){return e.fee.substring(0,5)}},{label:"状态",prop:"status",method:function(t){return e.setStatus(t)}},{label:"备注",prop:"remark"},{label:"更新时间",prop:"updated_at"},{label:"创建时间",prop:"created_at"}],rowsActions:[{key:"check",label:"订单同步",vIF:function(e){return 1===e.type&&1===e.status},method:function(t){e.$confirm("确定同步该订单，是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(s["U"])({id:t.id}).then((function(t){e.$message({type:"success",message:t.msg}),e.onSubmit()}))}))}}],apis:{list:{url:"paymentOrder",dataParam:"data.data",resultParam:"data",init:!1}},tableOptions:{},editForm:[],editConfig:{addTip:"注：备注",editTip:"注：备注"}}},created:function(){},mounted:function(){this.onSubmit()},methods:{onResponse:function(e){this.alertTip="总金额：".concat(e.total_amount,"(RMB)；已处理：").concat(e.total_success,"(RMB)；失败金额：").concat(e.total_fail,"(RMB)")},getStatus:function(e){var t=this;2===e.status?this.$prompt("请输入原因","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\S+$/,inputErrorMessage:"请输入原因"}).then((function(a){var n=a.value;Object(s["a"])(Object(l["a"])(Object(l["a"])({},e),{},{remark:n})).then((function(){t.onSubmit(),t.$message({type:"success",message:"操作成功"})}))})):this.$confirm("确定通过审核?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(s["a"])(e).then((function(){t.onSubmit(),t.$message({type:"success",message:"操作成功"})}))}))},setStatus:function(e){var t=10,a={1:"处理中",2:"成功",3:"失败"},n=Math.floor((Date.now()-new Date(e.created_at))/6e4);if(n>t&&1===e.type&&1===e.status){var o=Math.floor(n/60);return o>0?"超时".concat(o,"小时"):"超时".concat(n,"分钟")}return a[e.status]||"待处理"},handleSubmit:function(e){console.log("提交数据:",e)},handleClickDrawer:function(e){},onValueChange:function(e){},onSubmit:function(e){this.$refs.table.getList(Object(l["a"])({type:0},e))}}},c=r,u=a("2877"),p=Object(u["a"])(c,n,o,!1,null,null,null);t["default"]=p.exports}}]);