| 1 |
- import{O as e,k as a,m as l,g as o,a as t,x as s,z as r,A as n,t as i,J as d,U as p,V as u,p as m,q as c}from"./element-plus.DUy1TWHM.js";import{a4 as _,a5 as h,y as f,z as b,ab as v,a8 as y}from"./index.B1CvNv-2.js";import{_ as w,a as j,P as k}from"./PageContent.v2drBSrF.js";import{P as g}from"./system.0GYJijcz.js";import{E as V}from"./xml.DHJV7eh_.js";import{M as C,a_ as x,bL as U,bk as R,aL as S,u as z,I as P,bJ as q,v as Y,s as M,t as D,H as F,bb as H,aS as L,aU as T}from"./@vue.DbmRtknU.js";import"./lodash-es.DaM9m3L-.js";import"./async-validator.j0i5Y79Y.js";import"./@popperjs.DxtSUbXb.js";import"./@ctrl.BEgk5vdO.js";import"./dayjs.DCWbrgJ0.js";import"./memoize-one.BAtLgO95.js";import"./normalize-wheel-es.TzhA1irr.js";import"./@floating-ui.8vigAAFV.js";import"./pinia.BlfmsheH.js";import"./@vueuse.Dnsd2JKX.js";import"./vue-i18n.DXLOBfKS.js";import"./@intlify.DPMNdUn_.js";import"./nprogress.BTjJXJ-u.js";import"./codemirror.CYSLATvI.js";import"./diff-match-patch.DkK4wJpa.js";import"./vue-web-terminal.D-rog7dz.js";import"./vue.MGxsMDTR.js";/* empty css */import"./axios.Da-QW0H8.js";import"./qs.BQjOrGHM.js";import"./side-channel.4q28KFJj.js";import"./es-errors.DTEWvbA_.js";import"./object-inspect.DvQZIv3_.js";import"./side-channel-list.Do0-XmF5.js";import"./side-channel-map.DNHQ53lO.js";import"./get-intrinsic.Bbe5x-9b.js";import"./es-object-atoms.CyiuHMUS.js";import"./math-intrinsics.pM-JTNwN.js";import"./gopd.BudZp56J.js";import"./es-define-property.F0aoeP8o.js";import"./has-symbols.BcO-SUVM.js";import"./get-proto.Cb_fpw-j.js";import"./dunder-proto.WEH3rgQR.js";import"./call-bind-apply-helpers.DJjIjCF_.js";import"./function-bind.DrnB-baK.js";import"./hasown.BXcyoiLU.js";import"./call-bound.22gFUC2Q.js";import"./side-channel-weakmap.DpSeWE6i.js";import"./vue-router.yxIMtaxH.js";import"./pinia-plugin-persistedstate.COWkwNh5.js";import"./exceljs.DLSZe_6I.js";const E=["element-loading-text"],A={class:"data-table__toolbar--right"},I={class:"data-table__content"},O={key:1},J={class:"dialog-footer"},Q={style:{color:"#f56c6c"}},N=C({name:"Facetoface",inheritAttrs:!1,__name:"index",setup(C){const{searchRef:N,contentRef:B,handleQueryClick:G,handleResetClick:K,refreshList:W}=f(),{pageLoading:$,loadingText:X,execute:Z}=b(),ee=L({permPrefix:"module_payment:facetoface",colon:!0,isExpandable:!0,showNumber:3,form:{labelWidth:"auto"},formItems:[{prop:"merchant_name",label:"商户名称",type:"input",attrs:{placeholder:"请输入商户名称",clearable:!0}},{prop:"shop_name",label:"店铺名称",type:"input",attrs:{placeholder:"请输入店铺名称",clearable:!0}},{prop:"order_status",label:"状态",type:"select",options:v,attrs:{placeholder:"请选择状态",clearable:!0,style:{width:"167.5px"}}},{prop:"created_time",label:"创建时间",type:"date-picker",attrs:{type:"datetimerange",rangeSeparator:"至",startPlaceholder:"开始日期",endPlaceholder:"结束日期",format:"YYYY-MM-DD HH:mm:ss",valueFormat:"YYYY-MM-DD HH:mm:ss",style:{width:"340px"}}}]}),ae=L([{prop:"selection",label:"选择框",show:!1},{prop:"batch_no",label:"事务编号",show:!0},{prop:"merchant_name",label:"商户名称",show:!0},{prop:"shop_name",label:"店铺名称",show:!0},{prop:"order_status",label:"状态",show:!0},{prop:"rate",label:"费率",show:!0},{prop:"reject_reason",label:"驳回原因",show:!1},{prop:"confirm_url",label:"确认链接",show:!0},{prop:"created_time",label:"创建时间",show:!0},{prop:"operation",label:"操作",show:!0}]),le=L({permPrefix:"module_payment:facetoface",pk:"id",cols:ae,hideColumnFilter:!1,toolbar:[],defaultToolbar:["refresh","filter"],pagination:!0,indexAction:async e=>{var a,l,o,t;const s={};e.merchant_name&&(s.merchant_name=e.merchant_name),e.shop_name&&(s.shop_name=e.shop_name),e.order_status&&(s.order_status=e.order_status),e.created_time&&2===e.created_time.length&&(s.start_time=e.created_time[0],s.end_time=e.created_time[1]);const r=await y.list(e.page_no,e.page_size,s);return{list:(null==(l=null==(a=r.data)?void 0:a.data)?void 0:l.items)||[],total:(null==(t=null==(o=r.data)?void 0:o.data)?void 0:t.total)||0}}}),oe=T(!1),te=T(),se=T(!1),re=L({merchant_name:"",shop_name:"",shop_address:"",mcc_code:"",rate:"",business_license_no:"",business_license_mobile:"",sign_and_auth:!1,remark:""}),ne=L({merchant_name:[{required:!0,message:"请输入商户名称",trigger:"blur"}],shop_name:[{required:!0,message:"请输入店铺名称",trigger:"blur"}]});function ie(){Object.assign(re,{merchant_name:"",shop_name:"",shop_address:"",mcc_code:"",rate:"",business_license_no:"",business_license_mobile:"",sign_and_auth:!1,remark:""}),oe.value=!0}function de(){var e;oe.value=!1,null==(e=te.value)||e.resetFields()}async function pe(){var e,a;if(te.value){await te.value.validate(),se.value=!0;try{const e={merchant_name:re.merchant_name,shop_name:re.shop_name,sign_and_auth:re.sign_and_auth};re.shop_address&&(e.shop_address=re.shop_address),re.mcc_code&&(e.mcc_code=re.mcc_code),re.rate&&(e.rate=re.rate),re.business_license_no&&(e.business_license_no=re.business_license_no),re.business_license_mobile&&(e.business_license_mobile=re.business_license_mobile),re.remark&&(e.remark=re.remark),await y.apply(e),c.success("当面付开通申请已提交"),de(),W()}catch(l){c.error((null==(a=null==(e=null==l?void 0:l.response)?void 0:e.data)?void 0:a.msg)||"提交失败")}finally{se.value=!1}}}const ue=T(!1),me=T(null);return(f,b)=>{const v=t,C=s,L=l,T=o,ce=a,_e=i,he=n,fe=d,be=r,ve=u,ye=m,we=p,je=x("hasPerm"),ke=e;return U((S(),z("div",{class:"app-container","element-loading-text":R(X)},[P(g,{ref_key:"searchRef",ref:N,"search-config":ee,onQueryClick:R(G),onResetClick:R(K)},null,8,["search-config","onQueryClick","onResetClick"]),P(k,{ref_key:"contentRef",ref:B,"content-config":le},{toolbar:q(({toolbarRight:e,onToolbar:a,removeIds:l,cols:o})=>[P(w,{text:"提交申请","remove-ids":l,"perm-create":["module_payment:facetoface:apply"]},{default:q(()=>[U((S(),M(v,{type:"primary",icon:"Plus",onClick:ie},{default:q(()=>[...b[12]||(b[12]=[F(" 提交申请 ",-1)])]),_:1})),[[je,["module_payment:facetoface:apply"]]])]),_:1},8,["remove-ids"]),Y("div",A,[P(j,{buttons:e,cols:o,"on-toolbar":a},null,8,["buttons","cols","on-toolbar"])])]),table:q(({data:e,loading:a,tableRef:l,onSelectionChange:o})=>[Y("div",I,[U((S(),M(ce,{ref:l,data:e,height:"100%",border:"",onSelectionChange:o},{empty:q(()=>[P(C,{"image-size":80,description:"暂无数据"})]),default:q(()=>{var e,a,l,o,t,s,r,n,i,d;return[(null==(e=ae.find(e=>"selection"===e.prop))?void 0:e.show)?(S(),M(L,{key:0,type:"selection","min-width":"55",align:"center"})):D("",!0),(null==(a=ae.find(e=>"batch_no"===e.prop))?void 0:a.show)?(S(),M(L,{key:"batch_no",label:"事务编号",prop:"batch_no","min-width":"160","show-overflow-tooltip":""})):D("",!0),(null==(l=ae.find(e=>"merchant_name"===e.prop))?void 0:l.show)?(S(),M(L,{key:"merchant_name",label:"商户名称",prop:"merchant_name","min-width":"120","show-overflow-tooltip":""})):D("",!0),(null==(o=ae.find(e=>"shop_name"===e.prop))?void 0:o.show)?(S(),M(L,{key:"shop_name",label:"店铺名称",prop:"shop_name","min-width":"120","show-overflow-tooltip":""})):D("",!0),(null==(t=ae.find(e=>"order_status"===e.prop))?void 0:t.show)?(S(),M(L,{key:"order_status",label:"状态",prop:"order_status","min-width":"120"},{default:q(e=>[P(T,{type:R(_)[e.row.order_status]},{default:q(()=>[F(H(R(h)[e.row.order_status]||e.row.order_status),1)]),_:2},1032,["type"])]),_:1})):D("",!0),(null==(s=ae.find(e=>"rate"===e.prop))?void 0:s.show)?(S(),M(L,{key:"rate",label:"费率",prop:"rate","min-width":"80"})):D("",!0),(null==(r=ae.find(e=>"reject_reason"===e.prop))?void 0:r.show)?(S(),M(L,{key:"reject_reason",label:"驳回原因",prop:"reject_reason","min-width":"150","show-overflow-tooltip":""})):D("",!0),(null==(n=ae.find(e=>"confirm_url"===e.prop))?void 0:n.show)?(S(),M(L,{key:"confirm_url",label:"确认链接",prop:"confirm_url","min-width":"100"},{default:q(e=>[e.row.confirm_url?(S(),M(v,{key:0,type:"primary",size:"small",link:"",onClick:a=>{return l=e.row.confirm_url,void navigator.clipboard.writeText(l).then(()=>{c.success("链接已复制到剪贴板")}).catch(()=>{c.error("复制失败")});var l}},{default:q(()=>[...b[13]||(b[13]=[F(" 复制链接 ",-1)])]),_:1},8,["onClick"])):(S(),z("span",O,"-"))]),_:1})):D("",!0),(null==(i=ae.find(e=>"created_time"===e.prop))?void 0:i.show)?(S(),M(L,{key:"created_time",label:"创建时间",prop:"created_time","min-width":"160",sortable:""})):D("",!0),(null==(d=ae.find(e=>"operation"===e.prop))?void 0:d.show)?(S(),M(L,{key:9,fixed:"right",label:"操作",align:"center","min-width":"180"},{default:q(e=>[U((S(),M(v,{type:"info",size:"small",link:"",icon:"View",onClick:a=>async function(e){var a;try{const l=await y.detail(e);me.value=null==(a=l.data)?void 0:a.data,ue.value=!0}catch{c.error("查询详情失败")}}(e.row.id)},{default:q(()=>[...b[14]||(b[14]=[F(" 详情 ",-1)])]),_:1},8,["onClick"])),[[je,["module_payment:facetoface:list"]]]),U((S(),M(v,{type:"primary",size:"small",link:"",icon:"Refresh",disabled:"SUCCESS"===e.row.order_status||"CLOSED"===e.row.order_status,onClick:a=>async function(e){await Z({loadingText:"正在查询申请单状态...",action:()=>y.queryStatus(e),onSuccess:()=>{c.success("状态已刷新"),W()}})}(e.row.id)},{default:q(()=>[...b[15]||(b[15]=[F(" 查询状态 ",-1)])]),_:1},8,["disabled","onClick"])),[[je,["module_payment:facetoface:query"]]])]),_:1})):D("",!0)]}),_:1},8,["data","onSelectionChange"])),[[ke,a]])])]),_:1},8,["content-config"]),P(V,{modelValue:oe.value,"onUpdate:modelValue":b[9]||(b[9]=e=>oe.value=e),title:"提交当面付开通申请",width:"600px",onClose:de},{footer:q(()=>[Y("div",J,[P(v,{type:"primary",loading:se.value,onClick:pe},{default:q(()=>[...b[16]||(b[16]=[F("提交",-1)])]),_:1},8,["loading"]),P(v,{onClick:de},{default:q(()=>[...b[17]||(b[17]=[F("取消",-1)])]),_:1})])]),default:q(()=>[P(be,{ref_key:"applyFormRef",ref:te,model:re,rules:ne,"label-width":"120px"},{default:q(()=>[P(he,{label:"商户名称",prop:"merchant_name"},{default:q(()=>[P(_e,{modelValue:re.merchant_name,"onUpdate:modelValue":b[0]||(b[0]=e=>re.merchant_name=e),placeholder:"请输入商户名称"},null,8,["modelValue"])]),_:1}),P(he,{label:"店铺名称",prop:"shop_name"},{default:q(()=>[P(_e,{modelValue:re.shop_name,"onUpdate:modelValue":b[1]||(b[1]=e=>re.shop_name=e),placeholder:"请输入店铺名称"},null,8,["modelValue"])]),_:1}),P(he,{label:"店铺地址",prop:"shop_address"},{default:q(()=>[P(_e,{modelValue:re.shop_address,"onUpdate:modelValue":b[2]||(b[2]=e=>re.shop_address=e),placeholder:"请输入店铺地址"},null,8,["modelValue"])]),_:1}),P(he,{label:"商户类别码",prop:"mcc_code"},{default:q(()=>[P(_e,{modelValue:re.mcc_code,"onUpdate:modelValue":b[3]||(b[3]=e=>re.mcc_code=e),placeholder:"请输入 MCC 码"},null,8,["modelValue"])]),_:1}),P(he,{label:"费率",prop:"rate"},{default:q(()=>[P(_e,{modelValue:re.rate,"onUpdate:modelValue":b[4]||(b[4]=e=>re.rate=e),placeholder:"如 0.006 表示 0.6%"},null,8,["modelValue"])]),_:1}),P(he,{label:"营业执照号",prop:"business_license_no"},{default:q(()=>[P(_e,{modelValue:re.business_license_no,"onUpdate:modelValue":b[5]||(b[5]=e=>re.business_license_no=e),placeholder:"请输入营业执照号"},null,8,["modelValue"])]),_:1}),P(he,{label:"联系手机号",prop:"business_license_mobile"},{default:q(()=>[P(_e,{modelValue:re.business_license_mobile,"onUpdate:modelValue":b[6]||(b[6]=e=>re.business_license_mobile=e),placeholder:"请输入联系手机号"},null,8,["modelValue"])]),_:1}),P(he,{label:"同时获取授权",prop:"sign_and_auth"},{default:q(()=>[P(fe,{modelValue:re.sign_and_auth,"onUpdate:modelValue":b[7]||(b[7]=e=>re.sign_and_auth=e)},null,8,["modelValue"])]),_:1}),P(he,{label:"备注",prop:"remark"},{default:q(()=>[P(_e,{modelValue:re.remark,"onUpdate:modelValue":b[8]||(b[8]=e=>re.remark=e),type:"textarea",rows:2,placeholder:"备注信息"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"]),P(V,{modelValue:ue.value,"onUpdate:modelValue":b[11]||(b[11]=e=>ue.value=e),title:"申请单详情",width:"600px"},{footer:q(()=>[P(v,{type:"primary",onClick:b[10]||(b[10]=e=>ue.value=!1)},{default:q(()=>[...b[18]||(b[18]=[F("确定",-1)])]),_:1})]),default:q(()=>[me.value?(S(),M(we,{key:0,column:1,border:""},{default:q(()=>[P(ve,{label:"事务编号"},{default:q(()=>[F(H(me.value.batch_no||"-"),1)]),_:1}),P(ve,{label:"申请单号"},{default:q(()=>[F(H(me.value.order_no||"-"),1)]),_:1}),P(ve,{label:"状态"},{default:q(()=>[P(T,{type:R(_)[me.value.order_status]},{default:q(()=>[F(H(R(h)[me.value.order_status]||me.value.order_status),1)]),_:1},8,["type"])]),_:1}),P(ve,{label:"商户名称"},{default:q(()=>[F(H(me.value.merchant_name||"-"),1)]),_:1}),P(ve,{label:"店铺名称"},{default:q(()=>[F(H(me.value.shop_name||"-"),1)]),_:1}),P(ve,{label:"店铺地址"},{default:q(()=>[F(H(me.value.shop_address||"-"),1)]),_:1}),P(ve,{label:"MCC码"},{default:q(()=>[F(H(me.value.mcc_code||"-"),1)]),_:1}),P(ve,{label:"费率"},{default:q(()=>[F(H(me.value.rate||"-"),1)]),_:1}),P(ve,{label:"营业执照号"},{default:q(()=>[F(H(me.value.business_license_no||"-"),1)]),_:1}),P(ve,{label:"联系手机号"},{default:q(()=>[F(H(me.value.business_license_mobile||"-"),1)]),_:1}),P(ve,{label:"同时获取授权"},{default:q(()=>[F(H(me.value.sign_and_auth?"是":"否"),1)]),_:1}),me.value.confirm_url?(S(),M(ve,{key:0,label:"确认链接"},{default:q(()=>[P(ye,{type:"primary",href:me.value.confirm_url,target:"_blank"},{default:q(()=>[F(H(me.value.confirm_url),1)]),_:1},8,["href"])]),_:1})):D("",!0),me.value.app_auth_token?(S(),M(ve,{key:1,label:"授权Token"},{default:q(()=>[F(H(me.value.app_auth_token),1)]),_:1})):D("",!0),me.value.reject_reason?(S(),M(ve,{key:2,label:"驳回原因"},{default:q(()=>[Y("span",Q,H(me.value.reject_reason),1)]),_:1})):D("",!0),me.value.remark?(S(),M(ve,{key:3,label:"备注"},{default:q(()=>[F(H(me.value.remark),1)]),_:1})):D("",!0),P(ve,{label:"查询次数"},{default:q(()=>[F(H(me.value.query_count),1)]),_:1}),P(ve,{label:"最后查询时间"},{default:q(()=>[F(H(me.value.last_query_time||"-"),1)]),_:1}),P(ve,{label:"创建时间"},{default:q(()=>[F(H(me.value.created_time),1)]),_:1}),P(ve,{label:"更新时间"},{default:q(()=>[F(H(me.value.updated_time),1)]),_:1})]),_:1})):D("",!0)]),_:1},8,["modelValue"])],8,E)),[[ke,R($)]])}}});export{N as default};
|