PageSourceSearch

https://web.laifaxin.com/assets/index-Ca_Ewm5U.js

js laifaxin.com collected 2026-09-24 13:31:28 UTC 9,884 bytes, 1 lines download raw bytes

1import{j as e,D as F,a as q,b as M,d as Y,B as T,ed as P,av as A,x as i,n as a,s as c,a_ as Q,ca as $,bf as J,u as U,aH as X,by as Z,q as ee,bz as te,aO as se}from"./@mui-DIvZKyk5.js";import{ia as re,g as D,h_ as R,ib as ne,ic as ae,id as ie,ie as oe,y as z,ig as le,o as N,j as ce,ax as de,ag as E,ih as xe,ii as ue,f as he,ac as me,ij as fe,ik as je,c as pe}from"./index-ChlzNN7f.js";import{r as b}from"./@dnd-kit-lk9a0Fnl.js";import{f as ge}from"./table-pMgz8yty.js";import"./recoil-Qt05xcsG.js";import"./lodash-BGDvc8uJ.js";import"./cheerio-CC_BxCXR.js";import"./parse5-CnDYI-t1.js";import{a as we}from"./time-cells-CKBQdk27.js";import{T as Ce}from"./time-select-Bpugupea.js";import"./i18next-vSwsns86.js";import"./framer-motion-zf-c6Y7J.js";import"./ali-oss-C0WPLnSs.js";import"./apexcharts-B416p9gJ.js";function B({title:n,content:r,action:d,open:u,onClose:x,...m}){return e.jsxs(F,{fullWidth:!0,maxWidth:"xs",open:u,onClose:x,...m,translate:"no",children:[e.jsx(q,{sx:{pb:2},children:n}),r&&e.jsxs(M,{sx:{typography:"body2"},children:[" ",r," "]}),e.jsxs(Y,{children:[d,e.jsx(T,{variant:"outlined",color:"inherit",onClick:x,children:"取消"})]})]})}const O=A("span")(({theme:n})=>({...n.typography.caption,width:100,flexShrink:0,color:n.palette.text.secondary,fontWeight:n.typography.fontWeightSemiBold}));function ye({orderId:n,open:r,onClose:d,onSuccess:u,...x}){const{hours:m,minutes:g,seconds:_,setNewDate:h}=re(new Date),[v,S]=b.useState({}),{total:j,pay_amount:w,url:I,status:f,create_time:t,minus_price:l,commission:C,goods_count:k,subject:p}=v??{},{run:G,refresh:s}=D(oe,{manual:!0,onSuccess:({data:y})=>{S(y||{})}});b.useEffect(()=>{t&&h(new Date(t+1810*1e3))},[t]);const{run:o,cancel:W}=D(le,{manual:!0,pollingInterval:2e3,onSuccess:y=>{if(y){const{done:K}=y;K&&(z("付款成功."),s(),W())}}});b.useEffect(()=>{const y=n;r?(G({id:y}),o({id:y})):W()},[r]);const L=()=>e.jsxs(i,{spacing:.5,children:[e.jsxs(i,{direction:"row",alignItems:"center",children:[e.jsx(O,{children:"商品"}),e.jsx(a,{flexGrow:1}),e.jsxs(c,{variant:"body2",children:[p," * ",k||1]})]}),e.jsxs(i,{direction:"row",alignItems:"center",children:[e.jsx(O,{children:"商品总价"}),e.jsx(a,{flexGrow:1}),e.jsxs(c,{variant:"subtitle2",children:["¥",R((j||0)/100).format("0,0.00")]})]}),e.jsxs(i,{direction:"row",alignItems:"center",children:[e.jsx(O,{children:"优惠券"}),e.jsx(a,{flexGrow:1}),e.jsxs(c,{variant:"subtitle2",children:["- ¥",R((l||0)/100).format("0,0.00")]})]}),e.jsxs(i,{direction:"row",alignItems:"center",children:[e.jsx(O,{children:"佣金抵扣"}),e.jsx(a,{flexGrow:1}),e.jsxs(c,{variant:"subtitle2",children:["- ¥",R((C||0)/100).format("0,0.00")]})]}),e.jsxs(i,{direction:"row",alignItems:"center",sx:{mt:1},children:[e.jsx(a,{flexGrow:1}),e.jsxs(c,{variant:"h6",sx:{color:"red"},children:["需要付款¥",R((w||0)/100).format("0,0.00")]})]})]}),H=()=>f===1?e.jsxs(i,{alignItems:"center",spacing:1,sx:{mt:2},children:[e.jsx(c,{variant:"h6",children:"订单已完成"}),e.jsx(c,{children:"请勿重复购买"})]}):f===2?e.jsxs(i,{alignItems:"center",spacing:1,sx:{mt:2},children:[e.jsx(c,{variant:"h6",children:"订单已取消"}),e.jsx(c,{children:"请重新购买"})]}):e.jsxs(i,{alignItems:"center",spacing:1,children:[e.jsx(ne,{value:I}),e.jsxs(i,{direction:"row",children:[e.jsx(ae,{style:{color:"#2aae67",fontSize:22}}),e.jsx(ie,{style:{color:"#108ee9",fontSize:22}}),e.jsx(c,{variant:"body2",children:"请扫码完成支付"})]})]}),V=()=>f===1?e.jsxs(i,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[e.jsx(a,{flexGrow:1}),e.jsx(c,{variant:"h6",children:"订单已完成"}),e.jsx(a,{flexGrow:1})]}):f===2?e.jsxs(i,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[e.jsx(a,{flexGrow:1}),e.jsx(c,{variant:"h6",children:"订单已取消"}),e.jsx(a,{flexGrow:1})]}):e.jsxs(i,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[e.jsx(a,{flexGrow:1}),e.jsx(c,{variant:"subtitle2",children:"还剩"}),e.jsxs(i,{direction:"row",justifyContent:"center",divider:e.jsx(a,{sx:{mx:.25},children:":"}),sx:{typography:"subtitle2",color:"red"},children:[e.jsx(a,{children:m}),e.jsx(a,{children:g}),e.jsx(a,{children:_})]}),e.jsx(c,{variant:"subtitle2",children:"订单自动取消"}),e.jsx(a,{flexGrow:1})]});return e.jsx(F,{open:r,onClose:d,fullWidth:!0,maxWidth:"xs",scroll:"body",translate:"no",children:e.jsxs(M,{sx:{py:3,px:2},children:[V(),e.jsxs(P,{container:!0,spacing:1,children:[e.jsx(P,{xs:6,children:L()}),e.jsx(P,{xs:6,children:H()})]})]})})}const be={balance:"充值余额",sendCount:"群发套餐",searchMonth:"获客月套餐",searchYear:"获客年套餐",newYear:"首充套餐",svip:"SVIP会员",vip:"VIP会员",discount:"福利礼包",searchCount:"获客额度",creditCount:"通用点数"};function ve({tableData:n,loading:r,flushData:d,total:u,page:x,pageSize:m,onPageChange:g,sortModel:_,onSortChange:h,selectKeys:v,onSelectChange:S}){const[j,w]=b.useState({order_id:""}),[I,f]=b.useState(!1),t=N(),l=N(),{run:C}=D(xe,{manual:!0,onSuccess:({success:s})=>{s&&(z("操作成功"),d(),t.onFalse())}}),{run:k}=D(ue,{manual:!0,onSuccess:({success:s})=>{s&&(z("操作成功"),d(),l.onFalse())}}),{windowHeight:p}
1=ce(),G=[{headerName:"订单号",field:"order_id",width:256},{headerName:"状态",field:"status",width:64,renderCell:({row:s})=>{const{status:o}=s;return o===0?e.jsx(E,{color:"warning",children:"未付款"}):o===1?e.jsx(E,{color:"success",children:"已支付"}):o===2?e.jsx(E,{color:"error",children:"已取消"}):o}},{headerName:"类型",field:"goods_type",width:128,renderCell:({row:s})=>{const{goods_type:o}=s;return be[o]||o}},{headerName:"内容",field:"subject",width:160},{headerName:"金额",field:"total",width:128,renderCell:({row:s})=>{const{total:o}=s;return e.jsxs(c,{variant:"body2",color:"red",children:["¥ ",R(o/100).format("0,0.00")]})}},{headerName:"时间",field:"create_time",width:160,renderCell:({row:s})=>we(s.create_time)},{headerName:"操作",field:"action",width:140,renderCell:({row:s})=>{const{status:o}=s;return o===0?e.jsxs(i,{direction:"row",children:[e.jsx(T,{variant:"text",size:"small",color:"primary",onClick:()=>{w(s),f(!0)},children:"继续支付"}),e.jsx(T,{variant:"text",size:"small",color:"warning",onClick:()=>{w(s),l.onTrue()},children:"取消订单"})]}):o===1?null:o===2?e.jsx(T,{variant:"text",size:"small",onClick:()=>{w(s),t.onTrue()},children:"删除订单"}):o}}];return e.jsxs(a,{sx:{height:p-218<300?300:p-218},children:[e.jsx(de,{rowKey:"_id",loading:r,columns:G,rows:n,page:x,pageSize:m,rowCount:u,onPageChange:g,sortModel:_,onSortModelChange:h,density:"standard",onRowSelectionModelChange:s=>S("current",s.length,s),rowSelectionModel:v,checkboxSelection:!1,tableName:"ExpensesOrdersList"}),e.jsx(B,{open:t.value,onClose:t.onFalse,title:"删除订单",content:"确认彻底删除? 该操作不可恢复",action:e.jsx(T,{variant:"contained",color:"primary",onClick:()=>C({id:j.order_id}),children:"确认删除"})}),e.jsx(B,{open:l.value,onClose:l.onFalse,title:"取消订单",content:"确认取消? 该操作不可恢复",action:e.jsx(T,{variant:"contained",color:"primary",onClick:()=>k({id:j.order_id}),children:"确认取消"})}),e.jsx(ye,{open:I,orderId:j.order_id,onClose:()=>f(!1),onSuccess:d})]})}function Se({filter:n,dataRefresh:r,onFilterChange:d}){const{createTime:u}=n,x=m=>{d({...n,createTime:m})};return e.jsxs(i,{alignItems:{xs:"flex-end",md:"center"},direction:{xs:"column",md:"row"},spacing:2,sx:{p:2,minHeight:70},children:[e.jsx(Q,{sx:{flexShrink:0,width:{xs:1,md:256}},children:e.jsx(Ce,{value:u,onValueChange:x,label:"订单时间",fullWidth:!0,size:"small"})}),e.jsx(a,{flexGrow:1,sx:{display:{xs:"none",md:"block"}}}),e.jsx(i,{direction:"row",alignItems:"center",spacing:2,children:e.jsx($,{variant:"outlined",startIcon:e.jsx(J,{}),onClick:()=>r(),sx:{minWidth:86},loadingPosition:"start",children:"刷新"})})]})}const Ie=[{value:"total",label:"所有订单",color:"primary"},{value:0,label:"待付款",color:"warning"},{value:1,label:"已支付",color:"success"},{value:2,label:"已取消",color:"error"}];function Te(){const[n,r]=he({countData:{},pageSize:20,page:1,total:0,tableData:[],filter:{status:"total"},sortModel:[{field:"create_time",sort:"desc"}],allCount:0,selectTotal:0,selectKeys:[],selectOption:"",tagsOpen:!1}),d=U(),{page:u,pageSize:x,total:m,sortModel:g,tableData:_,filter:h}=n,v=ge(g),{run:S,refresh:j,loading:w}=D(fe,{manual:!0,loadingDelay:300,debounceWait:300,onSuccess:({success:t,data:l})=>{if(t&&l){const{current:C,list:k,total:p}=l;r({tableData:k,page:C,total:p}),p>n.allCount&&r({allCount:p})}}}),{refresh:I}=D(je,{onSuccess:({data:t})=>{t&&r({countData:t})}}),f=()=>{S({current:u,pageSize:x,filter:h,sort:v})};return b.useEffect(()=>{f()},[x,u,g]),b.useEffect(()=>{S({current:1,pageSize:x,filter:h,sort:v})}
1,[h]),e.jsx(me,{children:e.jsxs(X,{children:[e.jsx(Z,{textColor:"primary",indicatorColor:"primary",value:h.status,onChange:(t,l)=>{r({page:1,filter:{...h,status:l}})},sx:{px:2.5,boxShadow:t=>`inset 0 -2px 0 0 ${ee(t.palette.grey[500],.08)}`},TabIndicatorProps:{sx:{background:d.palette.primary.main,borderBottom:`2px solid ${d.palette.primary.main}`}},children:Ie.map(t=>e.jsx(te,{iconPosition:"end",value:t.value,label:t.label,icon:e.jsx(E,{variant:t.value===h.status&&"filled"||"soft",color:t.color,children:n.countData[t.value]||0})},t.value))}),e.jsx(Se,{filter:n.filter,dataRefresh:()=>{j(),I()},onFilterChange:t=>r({filter:t})}),e.jsx(se,{}),e.jsx(ve,{tableData:_,loading:w,flushData:()=>{j(),I()},total:m,page:u,pageSize:x,onPageChange:(t,l)=>r({page:t,pageSize:l}),sortModel:g,onSortChange:t=>r({sortModel:t}),selectKeys:n.selectKeys,onSelectChange:(t,l,C)=>r({selectOption:t,selectTotal:l,selectKeys:C})})]})})}function Le(){return e.jsxs(e.Fragment,{children:[e.jsx(pe,{children:e.jsx("title",{children:" 充值订单 - 来发信"})}),e.jsx(Te,{})]})}export{Le 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.