PageSourceSearch

https://nickz.ai/assets/js/index-DejR0qM6.js

js nickz.ai collected 2026-10-05 14:20:32 UTC 22,171 bytes, 1 lines download raw bytes

1import{r as e,j as t}from"./vendor-react-DejgYtBM.js";import{W as s,f as a,l as i,E as r,J as n,K as o,c as l,B as d,a1 as c,M as u,y as h,i as p,m,j as y,T as x,a as g,F as f,k as _,x as j,s as v,t as w,u as b,z as S}from"./vendor-semi-D8d7bTtM.js";import{A as k,s as C,w as z,Y as I,N as $,$ as T,K as B}from"./index-BeIIFw6E.js";import{w as N,R as L,X as R}from"./vendor-icons-EJvJ5X-w.js";import"./vendor-motion-Chfy_MiU.js";const{Text:W,Title:D}=a,P=({visible:a,onClose:u,customer:h})=>{const[p,m]=e.useState([]),[y,x]=e.useState(!1),[g,f]=e.useState(!1),[_,j]=e.useState(""),[v,w]=e.useState(1),[b,S]=e.useState(0),I=e.useCallback(async(e=1)=>{if(h?.user_id){x(!0);try{const t=await k.get(`/api/follow-notes/${h.user_id}?page=${e}&page_size=50`);if(t.data.success){const s=t.data.data.list||[];m(t=>1===e?s:[...t,...s]),S(t.data.data.total||0),w(e)}}catch(t){C("获取跟进记录失败")}finally{x(!1)}}},[h?.user_id]);e.useEffect(()=>{a&&h?.user_id&&I(1)},[a,h?.user_id,I]);const $=h?.display_name||h?.username||"";return t.jsx(s,{title:`跟进记录 - ${$}`,visible:a,onCancel:()=>{m([]),j(""),w(1),S(0),u()},placement:"right",width:520,children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[t.jsxs("div",{style:{marginBottom:16,padding:"12px 16px",background:"hsl(var(--foreground) / 0.02)",borderRadius:8},children:[t.jsx(D,{heading:6,style:{marginBottom:4},children:$}),h?.email&&t.jsxs(W,{type:"tertiary",size:"small",style:{display:"block"},children:["邮箱:",h.email]}),h?.phone&&t.jsxs(W,{type:"tertiary",size:"small",style:{display:"block"},children:["电话:",h.phone]})]}),t.jsxs("div",{style:{flex:1,overflow:"auto",marginBottom:16},children:[y?t.jsx("div",{style:{textAlign:"center",padding:40},children:t.jsx(i,{})}):0===p.length?t.jsx(r,{image:t.jsx(o,{style:{width:120,height:120}}),darkModeImage:t.jsx(n,{style:{width:120,height:120}}),description:"暂无跟进记录",style:{padding:40}}):t.jsx(l,{children:p.map(e=>{return t.jsxs(l.Item,{time:(s=e.created_at,s?new Date(1e3*s).toLocaleString("zh-CN"):""),children:[t.jsx("div",{style:{marginBottom:4},children:t.jsx(W,{strong:!0,size:"small",children:e.author_name})}),t.jsx(W,{style:{whiteSpace:"pre-wrap"},children:e.content})]},e.id);var s})}),p.length<b&&t.jsx("div",{style:{textAlign:"center",marginTop:8},children:t.jsx(d,{size:"small",onClick:()=>I(v+1),children:"加载更多"})})]}),t.jsxs("div",{style:{borderTop:"1px solid hsl(var(--border))",paddingTop:12},children:[t.jsx(c,{value:_,onChange:j,placeholder:"输入跟进备注...",autosize:{minRows:2,maxRows:5},maxCount:500,style:{marginBottom:8}}),t.jsx(d,{theme:"solid",type:"primary",block:!0,loading:g,disabled:!_.trim(),onClick:async()=>{if(_.trim()){f(!0);try{const e=await k.post("/api/follow-notes/",{customer_uid:h.user_id,content:_.trim()});e.data.success?(z("备注添加成功"),j(""),I(1)):C(e.data.message)}catch(e){C("提交失败")}finally{f(!1)}}},children:"提交备注"})]})]})})},{Text:E}=a,F=({visible:s,onClose:a,customer:i,onCreateNew:l,refreshKey:c})=>{const[m,y]=e.useState([]),[x,g]=e.useState(!1),[f,_]=e.useState(0),[j,v]=e.useState(1),[w,b]=e.useState(10),S=e.useCallback(async()=>{if(i?.user_id){g(!0);try{const e=new URLSearchParams;e.set("page",j),e.set("page_size",w);const t=await k.get(`/api/enterprise-follow/${i.user_id}/corporate-topup-history?${e.toString()}`);t.data.success?(y(t.data.data?.list||[]),_(t.data.data?.total||0)):C(t.data.message||"加载历史失败")}catch(e){C("加载历史失败")}finally{g(!1)}}},[i?.user_id,j,w]);e.useEffect(()=>{s&&i?.user_id&&(1===j?S():v(1))},[s,i?.user_id,c]),e.useEffect(()=>{s&&i?.user_id&&S()},[j,w]);const z=e=>{if(null==e)return"¥0.00";const t=Number(e);return`${t<0?"-":""}¥${Math.abs(t).toFixed(2)}`},T=[{title:"时间",dataIndex:"created_at",key:"created_at",width:170,render:e=>e?I(e):"-"},{title:"类型",dataIndex:"change_amount",key:"type",width:80,render:e=>{const s=Number(e)||0;return s<0?t.jsx(p,{color:"red",children:"扣除"}):s>0?t.jsx(p,{color:"green",children:"充值"}):t.jsx(p,{color:"grey",children:"调整"})}}
1,{title:"额度变动",dataIndex:"change_amount",key:"change_amount",width:140,render:e=>{const s=Number(e)||0;if(0===s)return t.jsx(E,{children:"-"});const a=s<0,i=$(Math.abs(s),2);return t.jsxs(p,{color:a?"red":"green",children:[a?"- ":"+ ",i]})}},{title:"实付金额",dataIndex:"actual_amount",key:"actual_amount",width:130,render:e=>{const s=Number(e)||0;return t.jsx(E,{type:s<0?"danger":"success",children:z(e)})}},{title:"变动后余额",dataIndex:"after_balance",key:"after_balance",width:130,render:e=>$(e||0,2)},{title:"说明",dataIndex:"description",key:"description",ellipsis:{showTitle:!0},render:e=>e||"-"}],B=i?.ep_cert_name||i?.display_name||i?.username||"";return t.jsx(u,{title:`对公充值历史 - ${B}`,visible:s,onCancel:a,footer:t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsxs(E,{type:"tertiary",style:{fontSize:12},children:["共 ",f," 条记录"]}),t.jsxs("div",{style:{display:"flex",gap:8},children:[t.jsx(d,{onClick:a,children:"关闭"}),t.jsx(d,{theme:"solid",type:"primary",onClick:l,children:"新增充值"})]})]}),width:960,bodyStyle:{padding:"12px 24px"},children:t.jsx(h,{columns:T,dataSource:m,rowKey:"id",loading:x,size:"small",pagination:{currentPage:j,pageSize:w,total:f,onPageChange:e=>v(e),onPageSizeChange:e=>{b(e),v(1)},showSizeChanger:!0,pageSizeOpts:[10,20,50]},empty:t.jsx(r,{image:t.jsx(o,{style:{width:120,height:120}}),darkModeImage:t.jsx(n,{style:{width:120,height:120}}),description:"暂无对公充值记录"})})})},{Title:O,Text:U}=a,K=()=>{const[s,a]=e.useState([]),[i,l]=e.useState(!1),[c,I]=e.useState(0),[W,D]=e.useState(1),[E,U]=e.useState(20),[K,M]=e.useState(""),[q,A]=e.useState(""),[Y,H]=e.useState(""),[J,X]=e.useState("main"),[G,Q]=e.useState([]),[V,Z]=e.useState(""),[ee,te]=e.useState(""),[se,ae]=e.useState(!1),[ie,re]=e.useState(null),[ne,oe]=e.useState(!1),[le,de]=e.useState(null),[ce,ue]=e.useState(""),[he,pe]=e.useState(!1),[me,ye]=e.useState(null),[xe,ge]=e.useState(""),[fe,_e]=e.useState(""),[je,ve]=e.useState(""),[we,be]=e.useState("credit"),[Se,ke]=e.useState(!1),[Ce,ze]=e.useState(!1),[Ie,$e]=e.useState(null),[Te,Be]=e.useState(0),[Ne,Le]=e.useState(null),[Re,We]=e.useState(!1),[De,Pe]=e.useState(!1),[Ee,Fe]=e.useState(""),[Oe,Ue]=e.useState(""),[Ke,Me]=e.useState(""),[qe,Ae]=e.useState(!1),[Ye,He]=e.useState(!1),Je=T(),Xe=e.useCallback(async()=>{if(Je)try{const e=await k.get("/api/business-users/");e.data.success&&Q(e.data.data||[])}catch(e){}},[Je]),Ge=e.useCallback(async()=>{l(!0);try{const e=new URLSearchParams;e.set("page",W),e.set("page_size",E),e.set("site_type",J),K&&e.set("keyword",K),q&&e.set("business_uid",q),Y&&e.set("month",Y),V&&(e.set("sort_by",V),e.set("order",ee||"desc"));const t=await k.get(`/api/enterprise-follow/?${e.toString()}`);t.data.success?(a(t.data.data.list||[]),I(t.data.data.total||0)):C(t.data.message)}catch(e){C("加载数据失败")}finally{l(!1)}},[W,E,K,q,Y,J,V,ee]),Qe=e.useCallback(async()=>{We(!0);try{const e=new URLSearchParams;e.set("site_type",J),K&&e.set("keyword",K),q&&e.set("business_uid",q),Y&&e.set("month",Y);const t=await k.get(`/api/enterprise-follow/summary?${e.toString()}`);t.data.success?Le(t.data.data||null):console.warn("[EnterpriseFollow] load summary failed:",t.data.message)}catch(e){console.warn("[EnterpriseFollow] load summary error:",e)}finally{We(!1)}},[K,q,Y,J]);e.useEffect(()=>{Xe()},[Xe]),e.useEffect(()=>{Ge()},[Ge]),e.useEffect(()=>{Qe()},[Qe]);const Ve=()=>{1!==W?D(1):Ge()},Ze=()=>{const e=new URLSearchParams;return e.set("site_type",J),K&&e.set("keyword",K),q&&e.set("business_uid",q),Y&&e.set("month",Y),e},et=()=>{if(Y)return Y;const e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`},tt=e=>{de(e),ue(e.business_uid>0?String(e.business_uid):""),oe(!0)},st=e=>null==e?"¥0.00":`¥${Number(e).toFixed(2)}`,at=(e,s,a)=>t.jsxs("div",{style:{lineHeight:"20px"},children:[t.jsx("div",{style:{fontWeight:500},children:st(e)}),t.jsxs("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))"},children:["直接 ",st(s)]}),t.jsxs("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))"},children:["对公 ",st(a)]})]}),it=[{title:"企业名称",dataIndex:"ep_cert_name",key:"ep_cert_name",width:200,render:(e,s)=>s.is_manual&&!e?t.jsx(p,{color:"orange",children:"手动添加"}):e||"-"},{title:"企业ID",dataIndex:"user_id",key:"user_id",width:80},{title:"企业用户",key:"user_info",width:130,render:(e,t)=>t.display_name||t.username},{title:"联系方式",dataIndex:"email",key:"email",width:200,ellipsis:!0,render:e=>e||"-"},{title:"总充值",dataIndex:"total_topup",key:"total_topup",width:150,sorter:!0,render:(e,t)=>at(t.total_topup,t.total_direct_topup,t.total_corporate_topup)},{title:"本月充值",dataIndex:"current_monthly",key:"current_monthly",width:150,sorter:!0,render:(e,t)=>at(t.current_monthly,t.direct_topup,t.corporate_topup)},{title:"上月充值",dataIndex:"previous_monthly",key:"previous_monthly",width:150,sorter:!0,render:(e,t)=>at(t.previous_monthly,t.prev_direct_topup,t.prev_corporate_topup)},{title:"本月API额度",dataIndex:"api_call_count",key:"api_call_count",width:130,render:e=>$(e||0,2),sorter:!0},{title:"总调用额度",dataIndex:"total_api_quota",key:"total_api_quota",width:130,render:e=>$(e||0,2),sorter:!0},{title:"剩余余额",dataIndex:"quota",key:"quota",width:130,render:e=>$(e||0,2),sorter:!0},{title:"已用余额",dataIndex:"used_quota",key:"used_quota",width:130,render:e=>$(e||0,2),sorter:!0},{title:"最近跟进",dataIndex:"last_follow_time",key:"last_follow_time",width:170,render:e=>{return e>
10?(s=e)?new Date(1e3*s).toLocaleString("zh-CN"):"-":t.jsx(p,{color:"grey",children:"暂无"});var s},sorter:!0}],rt={title:"来源代理站",dataIndex:"agent_name",key:"agent_name",width:150,render:e=>e||t.jsx(p,{color:"grey",children:"未知"})},nt={title:"负责商务",key:"business_name",width:120,render:(e,s)=>s.business_uid>0&&s.business_name?t.jsx(p,{color:"blue",style:{cursor:"pointer"},onClick:()=>tt(s),children:s.business_name}):t.jsx(p,{color:"grey",style:{cursor:"pointer"},onClick:()=>tt(s),children:"未分配"})},ot={title:"操作",key:"action",width:Je?260:100,fixed:"right",render:(e,s)=>t.jsxs(y,{children:[t.jsx(d,{size:"small",theme:"light",type:"primary",onClick:()=>(e=>{re(e),ae(!0)})(s),children:"跟进记录"}),Je&&t.jsx(d,{size:"small",theme:"light",type:"warning",onClick:()=>(e=>{$e(e),ze(!0)})(s),children:"对公充值/记录"}),Je&&t.jsx(d,{size:"small",theme:"light",type:"tertiary",onClick:()=>(async e=>{try{const t=await k.post(`/api/enterprise-follow/${e.user_id}/refresh-stats`);t.data.success?(z("统计已刷新"),Ge(),Qe()):C(t.data.message||"刷新失败")}catch(t){C("刷新失败")}})(s),children:"刷新统计"})]})};return t.jsxs("div",{className:"px-2",children:[t.jsxs(m,{children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[t.jsx(O,{heading:5,style:{margin:0},children:"企业跟进情况"}),t.jsxs(y,{children:[t.jsx(d,{theme:"light",type:"primary",onClick:()=>Pe(!0),children:"手动添加"}),t.jsx(d,{icon:t.jsx(N,{size:16}),loading:Ye,onClick:async()=>{const e=et();let t=`将导出 ${e} 月的跟进记录与对公转账明细,是否继续?`;
1try{const s=await k.get(`/api/enterprise-follow/export/preview?${Ze().toString()}`);if(s.data.success){const a=s.data.data||{};t=`将导出 ${e} 月明细:企业 ${a.enterprise_count??0} 家,跟进 ${a.follow_note_count??0} 条,对公 ${a.corporate_topup_count??0} 条,是否继续?`}else if(s.data.message)return void C(s.data.message)}catch(s){console.warn("[EnterpriseFollow] export preview failed:",s)}u.confirm({title:"确认导出",content:t,okText:"确认导出",cancelText:"取消",onOk:()=>(async()=>{He(!0);try{const e=Ze().toString(),t="/api/enterprise-follow/export/xlsx"+(e?`?${e}`:""),a=await k.get(t,{responseType:"blob",disableDuplicate:!0});if((a.headers["content-type"]||"").toLowerCase().includes("application/json")){const e=await a.data.text();let t="导出失败";try{const s=JSON.parse(e);s.message&&(t=s.message)}catch(s){}return void C(t)}const i=new Blob([a.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),r=window.URL.createObjectURL(i),n=document.createElement("a");n.href=r;const o=a.headers["content-disposition"];let l=`enterprise_follow_${et()}.xlsx`;if(o){const e=o.match(/filename\*=UTF-8''([^;\s]+)/i);if(e)l=decodeURIComponent(e[1]);else{const e=o.match(/filename="?([^";\s]+)"?/i);e&&(l=decodeURIComponent(e[1]))}}n.download=l,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(r),z("导出成功")}catch(s){C(s?.response?.data?.message||s?.message||"导出失败")}finally{He(!1)}})()})},children:"导出"}),t.jsx(d,{icon:t.jsx(L,{size:16}),onClick:()=>Ge(),children:"刷新"})]})]}),t.jsxs(x,{type:"line",activeKey:J,onChange:e=>{X(e),D(1),M(""),A(""),H(""),Z(""),te("")},style:{marginBottom:16},children:[t.jsx(g,{tab:"主站企业",itemKey:"main"}),t.jsx(g,{tab:"代理站企业",itemKey:"agent"})]}),t.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",marginBottom:16},children:[t.jsx(f,{prefix:t.jsx(R,{size:16}),placeholder:"搜索企业名称/账号/邮箱/用户ID",value:K,onChange:M,onEnterPress:Ve,style:{width:240}}),Je&&t.jsx(_,{placeholder:"负责商务",value:q,onChange:A,style:{width:160},optionList:[{label:"全部",value:""},...G.map(e=>({label:e.display_name||e.username,value:String(e.id)}))],showClear:!0}),t.jsx(j,{type:"month",placeholder:"统计月份",onChange:(e,t)=>
1(e=>{if(e){const t=new Date(e),s=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}`;H(s)}else H("");D(1)})(t),style:{width:160}}),t.jsx(d,{theme:"solid",type:"primary",onClick:Ve,children:"查询"})]}),(()=>{const e=[{key:"cur_corp",label:`本月对公充值(${Ne?.current_month||"本月"})`,value:Ne?.current_corporate_topup,color:"rgba(59, 130, 246, 0.08)",accent:"rgb(37, 99, 235)"},{key:"cur_direct",label:`本月直接充值(${Ne?.current_month||"本月"})`,value:Ne?.current_direct_topup,color:"rgba(16, 185, 129, 0.08)",accent:"rgb(5, 150, 105)"},{key:"prev_corp",label:`上月对公充值(${Ne?.previous_month||"上月"})`,value:Ne?.previous_corporate_topup,color:"rgba(99, 102, 241, 0.08)",accent:"rgb(79, 70, 229)"},{key:"prev_direct",label:`上月直接充值(${Ne?.previous_month||"上月"})`,value:Ne?.previous_direct_topup,color:"rgba(20, 184, 166, 0.08)",accent:"rgb(13, 148, 136)"}],s=Ne&&"number"==typeof Ne.enterprise_count?`已统计 ${Ne.enterprise_count} 家有跟进人员的企业`:"仅统计有跟进人员的企业";return t.jsxs("div",{style:{marginBottom:16},children:[t.jsx("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:e.map(e=>t.jsxs("div",{style:{flex:"1 1 220px",minWidth:220,padding:"14px 16px",background:e.color,borderRadius:8,border:"1px solid hsl(var(--border))",opacity:Re?.6:1,transition:"opacity 0.2s"},children:[t.jsx("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))",marginBottom:6},children:e.label}),t.jsx("div",{style:{fontSize:22,fontWeight:600,color:e.accent},children:st(e.value)})]},e.key))}),t.jsxs("div",{style:{marginTop:8,fontSize:12,color:"hsl(var(--muted-foreground))",display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[t.jsxs("span",{children:[s,"(随筛选条件变化);列表显示全部企业,本卡片仅统计有跟进人员的部分。"]}),t.jsx(S,{content:t.jsxs("div",{style:{maxWidth:280,lineHeight:1.5},children:['管理员未筛选商务时,下方列表会包含尚未分配商务的企业("未分配"行);','而汇总卡片是业务口径,仅累加已分配商务(即"有跟进人员")的企业,',"因此卡片金额通常会小于列表所有行的累加结果。这是设计行为,并非数据漏算。"]}),position:"top",children:t.jsx("span",{style:{color:"var(--semi-color-primary)",cursor:"help",textDecoration:"underline dotted"},children:"差异原因 ?"})})]})]})})(),t.jsx(h,{columns:(()=>{const e=[...it];return"agent"===J&&e.push(rt),Je&&e.push(nt),e.push(ot),e})(),dataSource:s,rowKey:"user_id",loading:i,onChange:(e={})=>{const t=e?.currentPage??e?.pagination?.currentPage;var s;"number"==typeof t&&t!==W||"pagination"!==e?.extra?.changeType&&e?.sorter&&((s=e.sorter)&&s.sortOrder?(Z(s.dataIndex||s.key||""),te("ascend"===s.sortOrder?"asc":"desc")):(Z(""),te("")),D(1))},pagination:{currentPage:W,pageSize:E,total:c,onPageChange:e=>D(e),onPageSizeChange:e=>{U(e),D(1)},showSizeChanger:!0,pageSizeOpts:[10,20,50]},scroll:{x:"agent"===J?2190:1990},empty:t.jsx(r,{image:t.jsx(o,{style:{width:150,height:150}}),darkModeImage:t.jsx(n,{style:{width:150,height:150}}),description:"暂无数据"})})]}),t.jsx(P,{visible:se,onClose:()=>ae(!1),customer:ie}),Je&&t.jsx(F,{visible:Ce,refreshKey:Te,onClose:()=>ze(!1),customer:Ie,onCreateNew:()=>(ye(Ie),ge(""),_e(""),ve(""),be("credit"),ze(!1),void pe(!0))}),Je&&t.jsx(u,{title:`分配商务 - ${le?.ep_cert_name||le?.display_name||le?.username||""}`,visible:ne,onOk:async()=>{if(le)try{if(ce){const e=await k.post("/api/assignments/",{business_uid:parseInt(ce),customer_uid:le.user_id});if(!e?.data?.success)return void C(e?.data?.message||"分配失败");z("分配成功")}else if(le.business_uid>0){const e=await k.delete(`/api/assignments/by-customer/${le.user_id}`);if(!e?.data?.success)return void C(e?.data?.message||"取消分配失败");z("已取消分配")}oe(!1),Ge()}catch(e){C("操作失败")}},onCancel:()=>oe(!1),okText:"确认",cancelText:"取消",children:t.jsx(_,{placeholder:"选择商务员工(留空则取消分配)",value:ce,onChange:ue,style:{width:"100%"},optionList:[{label:"取消分配",value:""},...G.map(e=>({label:e.display_name||e.username,value:String(e.id)}))],showClear:!0})}),Je&&t.jsx(u,{title:`${"debit"===we?"对公扣除":"对公充值"} - ${me?.ep_cert_name||me?.display_name||""}`,visible:he,onOk:async()=>
1{if(!me)return;const e="debit"===we,t=parseFloat(xe),s=parseFloat(fe);if(Number.isNaN(t)||t<0)return void C(e?"请输入有效的扣减额度":"请输入有效的充值额度");if(Number.isNaN(s)||s<0)return void C(e?"请输入有效的实付冲减金额":"请输入有效的实际支付金额");if(0===t&&0===s)return void C("额度变动与实际支付金额不能同时为0");const a=Math.round(B(t));if(t>0&&(!a||a<=0))C("额度转换失败,请检查输入");else{ke(!0);try{const t=await k.post(`/api/enterprise-follow/${me.user_id}/corporate-topup`,{quota_delta:a,actual_amount:s,remark:je,adjustment_type:we});t.data.success?(z(e?"对公扣除成功":"对公充值成功"),pe(!1),$e(me),ze(!0),Be(e=>e+1),Ge(),Qe()):C(t.data.message||(e?"对公扣除失败":"对公充值失败"))}catch(i){C("操作失败")}finally{ke(!1)}}},onCancel:()=>pe(!1),okText:"debit"===we?"确认扣除":"确认充值",cancelText:"取消",confirmLoading:Se,children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"操作类型"}),t.jsxs(v,{type:"button",buttonSize:"middle",value:we,onChange:e=>be(e.target.value),children:[t.jsx(w,{value:"credit",children:"充值"}),t.jsx(w,{value:"debit",children:"扣除"})]})]}),t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"debit"===we?"扣减额度":"充值额度"}),t.jsx(b,{placeholder:"debit"===we?"输入要扣除的额度(显示单位)":"输入充值额度(显示单位)",value:xe,onChange:ge,min:0,style:{width:"100%"}}),t.jsx("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))",marginTop:4},children:"debit"===we?"从用户账户扣除的额度;不可超过当前余额":"充值到用户账户的额度,与系统额度单位一致"})]}),t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"debit"===we?"实付冲减(¥)":"实际支付金额(¥)"}),t.jsx(b,{placeholder:"debit"===we?"对公记账冲减金额,可填 0":"输入企业实际支付的金额",value:fe,onChange:_e,min:0,precision:2,style:{width:"100%"},prefix:"¥"}),t.jsx("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))",marginTop:4},children:"debit"===we?"用于校正对公金额的统计记录,可与额度单独调整(可填 0)":"企业实际支付的人民币金额(不同企业折扣不同)"})]}),t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"备注(选填)"}),t.jsx(f,{placeholder:"如:合同编号、折扣说明等",value:je,onChange:ve,style:{width:"100%"}})]})]})}),t.jsx(u,{title:"手动添加用户到跟进列表",visible:De,onOk:async()=>{const e=parseInt(Ee);if(!e||e<=0)C("请输入有效的用户ID");else{Ae(!0);try{const t=await k.post("/api/enterprise-follow/manual-add",{user_id:e,ep_name:Oe,remark:Ke});t.data.success?(z("添加成功"),Pe(!1),Fe(""),Ue(""),Me(""),Ge()):C(t.data.message||"添加失败")}catch(t){C("操作失败")}finally{Ae(!1)}}},onCancel:()=>{Pe(!1),Fe(""),Ue(""),Me("")},okText:"确认添加",cancelText:"取消",confirmLoading:qe,children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"用户ID"}),t.jsx(b,{placeholder:"输入要添加的用户ID",value:Ee,onChange:Fe,min:1,style:{width:"100%"}}),t.jsx("div",{style:{fontSize:12,color:"hsl(var(--muted-foreground))",marginTop:4},children:"添加未认证企业或海外用户时无需企业认证"})]}),t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"企业名称"}),t.jsx(f,{placeholder:"输入企业名称(认证后自动替换为认证名称)",value:Oe,onChange:Ue,style:{width:"100%"}})]}),t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:4,fontWeight:500},children:"备注(选填)"}),t.jsx(f,{placeholder:"如:海外用户、潜在客户等",value:Ke,onChange:Me,style:{width:"100%"}})]})]})})]})};export{K 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.