PageSourceSearch

https://static.taotoken.net/release/taotoken_fe/dist/assets/AdminProviderReviews-1789990486687-PqYhEBWW.js

js taotoken.net collected 2026-10-06 14:09:39 UTC 10,036 bytes, 1 lines download raw bytes

1import{_ as re,u as se,o as de,e as v,p as l,c as R,h as b,f as i,F as ue,aW as O,bO as ce,d as o,r as n,v as pe,bp as me,c2 as ve,O as fe,b as u,bq as ge,t as V,K as _e,g as f,q as be,C as W,aX as we,dP as ye,J as he,I as Ce,z as ke,A as xe,bV as Ee,M as g,bj as T,N as Ve,L as Ae}from"./index-1789990486687-Doy9n2QW.js";/* empty css                                   *//* empty css                              *//* empty css                                   *//* empty css                             *//* empty css                                *//* empty css                                    */import"./el-tooltip-1789990486687-l0sNRNKZ.js";/* empty css                                      */import{A as Se,d as Pe,a as Ie,g as Re}from"./AdminFilterBar-1789990486687-BEFaGkwf.js";import{_ as Fe}from"./ConsolePageHeader-1789990486687-n2W34PCv.js";import{al as De,am as Ue,an as Te,ao as ze,ap as Ne,aq as Be}from"./admin-1789990486687-Jf7ltaGr.js";/* empty css                                     */const $e=Object.assign({name:"AdminProviderReviews"},{__name:"AdminProviderReviews",setup(Le){const q=se(),A=n(!1),F=n(!1),w=n(""),S=n([]),y=n(0),h=n(1),D=n(10),C=n({keyword:"",auditStatus:"",submittedFrom:"",submittedTo:""}),J=[{key:"auditStatus",label:"状态",options:[{label:"全部",value:""},{label:"待审核",value:"REVIEW_PENDING"},{label:"已通过",value:"APPROVED"},{label:"已拒绝",value:"REJECTED"}]}],U=n(!1),_=n(""),k=n(!1);function G(e){const a=String(e||"").trim();a&&(k.value=!1,_.value=a,U.value=!0)}function K(){_.value="",k.value=!1}function X(){k.value=!0}const x=n(!1),p=n(null),z=n(null),E=n(!1),s=Ae({providerCode:"",reason:""});function H(e){return String((e==null?void 0:e.providerId)??"").trim()?T(e==null?void 0:e.status)==="pending":!1}function Q(e){p.value=e,s.providerCode="",s.reason="",x.value=!0,Ve(()=>{var a,c;(c=(a=z.value)==null?void 0:a.clearValidate)==null||c.call(a)})}function Y(){p.value=null,s.providerCode="",s.reason=""}async function N(e){var I,m;const a=p.value;if(!a)return;if(e==="reject"&&!s.reason.trim()){g.warning("拒绝时请填写原因");return}if(e==="approve"&&!s.providerCode.trim()){g.warning("通过时请填写渠道码 providerCode");return}const c=((I=a.raw)==null?void 0:I.providerId)??((m=a.raw)==null?void 0:m.provider_id)??a.providerId,d=Ne(c);if(d==null){g.error("缺少 providerId,无法提交审核");return}E.value=!0;try{const r=await Be({providerId:d,action:e,providerCode:s.providerCode.trim(),reason:s.reason.trim()});if((r==null?void 0:r.code)===200){g.success(e==="approve"?"已通过":"已拒绝"),x.value=!1,await P();return}g.error((r==null?void 0:r.msg)||(r==null?void 0:r.message)||`操作失败(${(r==null?void 0:r.code)??"—"})`)}catch{g.error("网络异常,请稍后重试")}finally{E.value=!1}}function Z(e){const a=T(e);return a==="pending"?"待审核":a==="approved"?"已通过":a==="rejected"?"已拒绝":String(e||"").trim()||"—"}function ee(e){const a=T(e);return a==="pending"?"warning":a==="approved"?"success":a==="rejected"?"danger":"info"}function ae(e){h.value=e,P()}function B(){h.value=1,P()}function le(){C.value={keyword:"",auditStatus:"",submittedFrom:"",submittedTo:""},B()}async function P(){w.value="",A.value=!0;try{const e=await De({page:h.value,size:D.value,...C.value});if((e==null?void 0:e.code)===200){S.value=Ue(e);const{total:a,pageSize:c,pageNum:d}=Te(e);c!=null&&(D.value=c),d!=null&&(h.value=d),y.value=a;return}S.value=[],y.value=0,w.value=(e==null?void 0:e.msg)||(e==null?void 0:e.message)||`请求失败(${(e==null?void 0:e.code)??"—"})`}catch{S.value=[],y.value=0,w.value="网络异常,请稍后重试"}finally{A.value=!1}}async function te(e){if(e==="full")try{await Ee.confirm("完整导出将包含完整手机与信用代码,请确认已获得授权并妥善保管。","确认完整导出",{type:"warning",confirmButtonText:"确认导出",cancelButtonText:"取消"})}catch{return}F.value=!0;try{const a=await ze({...C.value,profile:e});await Pe(a,`provider_${Ie()}.csv`),g.success("导出成功")}catch(a){g.error(await Re(a))}finally{F.value=!1}}return de(()=>{P()}),(e,a)=>{const c=pe,d=ge,I=_e,m=be,r=me,ie=ve,$=ye,L=fe,j=xe,M=ke,oe=Ce,ne=ce;return u(),v("div",{class:"console-view flex min-h-0 w-full flex-col px-3 pt-3 pb-0 md:px-4 md:pt-5"},[l(Fe,{class:"!mb-3 md:!mb-5",title:"审核供应商"}
1),w.value?(u(),R(c,{key:0,type:"error",closable:!1,"show-icon":"",class:"!mb-3",title:w.value},null,8,["title"])):b("",!0),i("div",{class:"admin-reviews-surface overflow-hidden rounded-lg border border-[#EAEBF0] bg-white"},[l(Se,{modelValue:C.value,"onUpdate:modelValue":t=>C.value=t,"keyword-placeholder":"公司名 / 用户名 / 信用代码 / providerId / publicCode","select-fields":J,"can-full-export":ue(q).canAdminFullExport,exporting:F.value,onSearch:B,onReset:le,onExport:te},null,8,["modelValue","onUpdate:modelValue","can-full-export","exporting"]),i("div",{class:"console-surface-card-inner"},[O((u(),R(r,{data:S.value,stripe:"",size:"default",class:"admin-reviews-table admin-reviews-table--wrap w-full","empty-text":A.value?"加载中…":"暂无申请记录"},{default:o(()=>[l(d,{label:"供应商 ID","min-width":"150"},{default:o(({row:t})=>[i("code",{class:"admin-reviews-code"},V(t.providerId||"—"),1)]),_:1}),l(d,{prop:"username",label:"用户名","min-width":"160"}),l(d,{prop:"companyName",label:"公司名","min-width":"200"}),l(d,{prop:"status",label:"状态","min-width":"108",align:"center"},{default:o(({row:t})=>[t.status?(u(),R(I,{key:0,size:"small",effect:"light",round:"",type:ee(t.status)},{default:o(()=>[f(V(Z(t.status)),1)]),_:2},1032,["type"])):(u(),v("span",{key:1,class:"text-[#94a3b8]"},"—"))]),_:1}),l(d,{prop:"publicCode",label:"publicCode","min-width":"140"}),l(d,{prop:"createdTime",label:"创建时间","min-width":"180"}),l(d,{label:"操作",width:"88",align:"center",fixed:"right"},{default:o(({row:t})=>[H(t)?(u(),R(m,{key:0,type:"primary",link:"",onClick:je=>Q(t)},{default:o(()=>[f(" 审核 ")]),_:1},8,["onClick"])):(u(),v("span",{key:1,class:"text-[#94a3b8]"},"—"))]),_:1})]),_:1},8,["data","empty-text"])),[[ne,A.value]]),y.value>0?(u(),v("div",{key:0,class:"console-bill-pagination admin-reviews-pagination"},[l(ie,{"current-page":h.value,"page-size":D.value,total:y.value,layout:"total, prev, pager, next",background:"",onCurrentChange:ae},null,8,["current-page","page-size","total"])])):b("",!0)])]),i("div",{class:"console-page-tail-spacer admin-reviews-tail-spacer","aria-hidden":"true"}),l(L,{modelValue:U.value,"onUpdate:modelValue":t=>U.value=t,title:"营业执照",width:"min(720px, 92vw)","align-center":"","append-to-body":"","destroy-on-close":"",class:"admin-license-dialog",onClosed:K},{default:o(()=>[_.value?(u(),v("div",{key:0,class:"admin-license-dialog__body"},[i("div",{class:"admin-license-dialog__viewport",onWheelPassive:W(()=>{},["self","stop"])},[O(i("img",{src:_.value,class:"admin-license-dialog__native-img",alt:"营业执照",onError:X},null,40,["src"]),[[we,!k.value]]),k.value?(u(),v("div",{key:0,class:"admin-license-dialog__err"},[i("p",{class:"admin-license-dialog__err-text"},"无法在页面内预览该文件。"),l($,{type:"primary",href:_.value,target:"_blank",rel:"noopener noreferrer"},{default:o(()=>[f(" 新窗口打开 ")]),_:1},8,["href"])])):b("",!0)],40,["onWheelPassive"]),i("div",{class:"admin-license-dialog__foot"},[l($,{type:"primary",href:_.value,target:"_blank",rel:"noopener noreferrer"},{default:o(()=>[f(" 新窗口打开原文件 ")]),_:1},8,["href"])])])):b("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"]),l(L,{modelValue:x.value,"onUpdate:modelValue":t=>x.value=t,title:"审核供应商",width:"min(480px, 92vw)","align-center":"","append-to-body":"","destroy-on-close":"","close-on-click-modal":!1,onClosed:Y},{footer:o(()=>[l(m,{disabled:E.value,onClick:t=>x.value=!1},{default:o(()=>[f("取消")]),_:1},8,["disabled","onClick"]),l(m,{type:"danger",plain:"",loading:E.value,onClick:t=>N("reject")},{default:o(()=>[f(" 拒绝 ")]),_:1},8,["loading","onClick"]),l(m,{type:"primary",loading:E.value,onClick:t=>N("approve")},{default:o(()=>[f(" 通过 ")]),_:1},8,["loading","onClick"])]),default:o(()=>[p.value?(u(),v(he,{key:0},[i("div",{class:"admin-audit-summary",role:"group","aria-label":"申请信息"},[i("div",{class:"admin-audit-field"},[i("div",{class:"admin-audit-label"},"企业"),i("div",{class:"admin-audit-value"},V(p.value.companyName||"—"),1)]),i("div",{class:"admin-audit-field"},[i("div",{class:"admin-audit-label"},"申请人"),i("div",{class:"admin-audit-value admin-audit-value--mono"},V(p.value.username||"—"),1)]),i("div",{class:"admin-audit-field"},[i("div",{class:"admin-audit-label"},"统一社会信用代码"),i("div",{class:"admin-audit-value"},[i("code",{class:"admin-audit-credit"}
1,V(p.value.creditCode||"—"),1)])]),p.value.licenseUrl?(u(),v("div",{key:0,class:"admin-audit-field"},[i("div",{class:"admin-audit-label"},"营业执照"),i("div",{class:"admin-audit-value"},[l(m,{type:"primary",link:"",class:"!px-0",onClick:t=>G(p.value.licenseUrl)},{default:o(()=>[f(" 查看执照 ")]),_:1},8,["onClick"])])])):b("",!0)]),l(oe,{ref_key:"auditFormRef",ref:z,class:"admin-audit-form mt-4",model:s,"label-position":"top",onSubmit:W(()=>{},["prevent"])},{default:o(()=>[l(M,{label:"渠道码(providerCode)"},{default:o(()=>[l(j,{modelValue:s.providerCode,"onUpdate:modelValue":t=>s.providerCode=t,clearable:"",placeholder:"通过时必填;拒绝时可不填",autocomplete:"off"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l(M,{label:"备注 / 拒绝原因",prop:"reason"},{default:o(()=>[l(j,{modelValue:s.reason,"onUpdate:modelValue":t=>s.reason=t,type:"textarea",rows:3,maxlength:"200","show-word-limit":"",placeholder:"选填;拒绝时须填写具体原因,通过可留空"},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["model","onSubmit"])],64)):b("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"])])}}}),aa=re($e,[["__scopeId","data-v-c0ae3f14"]]);export{aa as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.