PageSourceSearch

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

js laifaxin.com collected 2026-10-01 23:57:28 UTC 9,793 bytes, 5 lines download raw bytes

1import{j as e,D as H,a as U,b as V,aS as i,s as S,dw as N,p as w,aE as k,d as W,B as $,ca as K,n as E,bM as G,aU as M,b$ as L,iw as J,aO as Q,cJ as X,x as R,aN as Y,I as A,hP as Z,aH as ee,T as se,b8 as q,bi as te,cb as ae}from"./@mui-DIvZKyk5.js";import{q as oe,r as ne,g as I,F as ie,w as z,k as re,m as y,y as F,ji as le,av as ce,o as de,j as ue,b8 as me,aw as pe,bl as xe,jj as he,jk as ge,f as je,ac as fe,a3 as _e,dn as Se,dx as we}from"./index-ChlzNN7f.js";import{r as P}from"./@dnd-kit-lk9a0Fnl.js";import{f as Ce}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 be}from"./time-cells-CKBQdk27.js";import"./i18next-vSwsns86.js";import"./framer-motion-zf-c6Y7J.js";import"./ali-oss-C0WPLnSs.js";import"./apexcharts-B416p9gJ.js";const ve=re().shape({product_name:y().required("产品名称不能为空").max(512,"最多512字"),main_business:y().required("产品简介不能为空").max(512,"最多512字"),core_value_proposition:y().optional().max(512,"最多512字"),excluded_customer_types:y().optional().max(512,"最多512字"),other_message:y().optional().max(512,"最多512字")}),ze={product_name:"",main_business:"",core_value_proposition:"",excluded_customer_types:"",other_message:""};function ye({open:u,onClose:o,onSuccess:g,rowData:m}){const p=oe({resolver:ne(ve),defaultValues:ze}),{setValue:n,handleSubmit:C}=p,{run:_,loading:j}=I(le,{manual:!0,onSuccess:a=>{const{success:c}=a??{};c&&(F("操作成功"),g(),o())}}),b=C(async a=>{const{_id:c}=m??{};try{console.info("DATA",a),_({...a,id:c})}catch(r){console.error(r)}});return P.useEffect(()=>{if(u){const{product_name:a,main_business:c,core_value_proposition:r,excluded_customer_types:x,other_message:f}=m;n("product_name",a),n("main_business",c),n("core_value_proposition",r),n("excluded_customer_types",x),n("other_message",f)}},[u,m]),e.jsx(H,{open:u,onClose:o,fullWidth:!0,maxWidth:"sm",scroll:"body",translate:"no",children:e.jsxs(ie,{methods:p,onSubmit:b,children:[e.jsx(U,{id:"alert-dialog-title",children:"修改产品档案"}),e.jsx(V,{children:e.jsxs(i,{spacing:2,sx:{mt:1},children:[e.jsxs(i,{spacing:.25,children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:.5,sx:{px:1},children:[e.jsx(S,{variant:"subtitle2",children:"产品名称"}),e.jsx(N,{sx:{fontSize:16,color:"red"}})]}),e.jsx(z,{name:"product_name",size:"small",placeholder:"示例:可定制不锈钢保温杯 (提供贴牌/设计定制)"})]}),e.jsxs(i,{spacing:.5,children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:.5,sx:{px:1},children:[e.jsx(S,{variant:"subtitle2",children:"产品简介"}),e.jsx(N,{sx:{fontSize:16,color:"red"}}),e.jsx(w,{title:"用几句话说清您的产品。AI会从这里理解您的核心业务。",children:e.jsx(k,{sx:{color:"gray"},fontSize:"small"})})]}),e.jsx(z,{multiline:!0,rows:3,name:"main_business",size:"small",placeholder:"为全球的品牌礼品商、电商品牌提供一站式保温杯代工服务,我们专注于高品质、合规认证和柔性供应链"})]}),e.jsxs(i,{spacing:.5,children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:.5,sx:{px:1},children:[e.jsx(S,{variant:"subtitle2",children:"我们的独特点(选填)"}),e.jsx(w,{title:"相比同行,您最突出的优势是什么?这是AI判断匹配度的关键。",children:e.jsx(k,{sx:{color:"gray"},fontSize:"small"})})]}),e.jsx(z,{multiline:!0,rows:3,name:"core_value_proposition",size:"small",placeholder:`[品质保障] 采用食品级304钢材,承诺百分百通过欧美食品级标准测试。
2[柔性服务] 支持500件小批量起订,可定制品牌标志、颜色、包装,24小时内提供设计图。`})]}),e.jsxs(i,{spacing:.5,children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:.5,sx:{px:1},children:[e.jsx(S,{variant:"subtitle2",children:"明确排除的客户类型(选填)"}),e.jsx(w,{title:"请描述您绝对不想合作的客户特征,AI会为您自动过滤掉他们。写句子或关键词都可以。",children:e.jsx(k,{sx:{color:"gray"},fontSize:"small"})})]}),e.jsx(z,{multiline:!0,rows:3,name:"excluded_customer_types",size:"small",placeholder:`类型:个人消费者、一件代发模式的卖家
3定位:主营低价促销品或廉价折扣店渠道的进口商`})]}),e.jsxs(i,{spacing:.5,children:[e.jsxs(i,{direction:"row",alignItems:"center",spacing:.5,sx:{px:1},children:[e.jsx(S,{variant:"subtitle2",children:"关键信息补充(选填)"}),e.jsx(w,{title:"提供以下信息能极大提升匹配精准度,请分别说明。",children:e.jsx(k,{sx:{color:"gray"},fontSize:"small"})})]}),e.jsx(z,{multiline:!0,rows:3,name:"other_message",size:"small",placeholder:`核心认证:企业社会责任、质量管理体系、欧美食品级标准
4最小起订量:500件/款
5目标市场:北美、欧盟、日本`})]})]})}),e.jsxs(W,{children:[e.jsx($,{onClick:o,variant:"outlined",children:"关闭"}),e.jsx(K,{variant:"contained",color:"primary",type:"submit",id:"addTimeBlockButton",loading:j,children:"确定"})]})]})})}function Pe({tableData:u,loading:o,flushData:g,total:m,page:p,pageSize:n,onPageChange:C,sortModel:_,onSortChange:j,onSelectChange:b,selectKeys:a}){const[c,r]=P.useState(!1),[x,f]=P.useState({}),d=ce(),t=de(),{run:h}=I(he,{manual:!0,onSuccess:({success:s})=>{s&&(t.onFalse(),F("删除成功"),g())}}),{run:v}=I(ge,{manual:!0,onSuccess:({success:s})=>{s&&(F("操作成功"),g())}}),D=s=>
5e.jsxs(R,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(w,{title:"修改",children:e.jsx(A,{size:"small",onClick:l=>{l==null||l.stopPropagation(),r(!0),f(s)},children:e.jsx(L,{fontSize:"small"})})}),e.jsx(w,{title:"更多操作",children:e.jsx(A,{size:"small",onClick:l=>{l.stopPropagation(),f(s),d.onOpen(l)},children:e.jsx(Z,{fontSize:"small"})})})]}),T=[{headerName:"名称",field:"product_name",width:256,renderCell:({row:s})=>{const{product_name:l,isDefault:B}=s;return e.jsxs(R,{position:"relative",direction:"row",alignItems:"center",spacing:1,sx:{width:240},children:[e.jsx(S,{sx:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},variant:B?"subtitle1":void 0,children:l}),B&&e.jsx(Y,{label:"默认",color:"primary",size:"small"})]})}},{headerName:"主营业务",field:"main_business",width:256},{headerName:"解决痛点",field:"pain_points_solved",width:256},{headerName:"核心价值/优势",field:"core_value_proposition",width:256},{headerName:"创建者",field:"userid",width:128,renderCell:({row:s})=>e.jsx(xe,{value:s.userid})},{headerName:"创建时间",field:"create_time",renderCell:({row:s})=>be(s.create_time),width:160},{headerName:"操作",field:"actions",headerClassName:"actions-header",width:100,renderCell:({row:s})=>D(s)}],{windowHeight:O}=ue();return e.jsxs(E,{sx:{height:O-176<300?300:O-176},children:[e.jsx(G,{getRowId:s=>s==null?void 0:s._id,loading:o,disableColumnMenu:!0,disableRowSelectionOnClick:!0,hideFooterSelectedRowCount:!0,rows:u,columns:T,pagination:!0,paginationMode:"server",rowCount:m,pageSizeOptions:[10,20,50,100],columnHeaderHeight:a.length?0:56,paginationModel:{page:p,pageSize:n},onPaginationModelChange:({page:s,pageSize:l})=>C(s,l),sortingMode:"server",sortModel:_,rowSelectionModel:a,onSortModelChange:s=>j(s),onRowSelectionModelChange:s=>b("current",s.length,s),initialState:{pinnedColumns:{right:["actions"]}}}),e.jsx(ye,{open:c,rowData:x,onClose:()=>r(!1),onSuccess:()=>g()}),e.jsx(me,{open:t.value,onClose:t.onFalse,title:"删除产品档案",content:`确认删除 ${x.product_name}? 该操作不可恢复`,action:e.jsx($,{variant:"contained",color:"error",onClick:()=>h({id:x._id}),children:"删除"})}),e.jsxs(pe,{open:d.open,onClose:d.onClose,sx:{width:128},children:[e.jsxs(M,{onClick:()=>{d.onClose(),r(!0)},children:[e.jsx(L,{fontSize:"small"}),"修改"]}),e.jsxs(M,{onClick:()=>{d.onClose(),v({id:x._id})},children:[e.jsx(J,{fontSize:"small"}),"设置默认"]}),e.jsx(Q,{}),e.jsxs(M,{onClick:()=>{d.onClose(),t.onTrue()},sx:{color:"error.main"},children:[e.jsx(X,{fontSize:"small"}),"删除"]})]})]})}function qe(){const[u,o]=je({countData:{},pageSize:10,page:1,total:0,tableData:[],sortModel:[{field:"create_time",sort:"desc"}],keyword:"",selectKeys:[],selectOption:"current",selectTotal:0,filter:{}}),[g,m]=P.useState(!1),{page:p,pageSize:n,total:C,filter:_,sortModel:j,tableData:b,keyword:a}=u,{run:c,refresh:r,loading:x}=I(we,{manual:!0,loadingDelay:300,debounceWait:300,onSuccess:t=>{const{data:h}=t;if(!h)return;const{current:v,list:D,total:T}=h??{};D&&o({tableData:D,page:v,total:T})}}),f=()=>{const t=Ce(j);c({current:p,pageSize:n,filter:_,sort:t,keyword:a})};P.useEffect(()=>{f()},[_,n,p,j,a]);const d=t=>{o({keyword:t.toLowerCase()})};return e.jsx(fe,{children:e.jsxs(ee,{children:[e.jsxs(R,{alignItems:{xs:"flex-end",md:"center"},direction:{xs:"column",md:"row"},spacing:2,sx:{p:2},children:[e.jsx(se,{size:"small",sx:{flexShrink:0,width:{xs:1,md:256}},value:a,onChange:t=>d(t.target.value),onBlur:()=>f(),placeholder:"搜索名称",InputProps:{startAdornment:e.jsx(q,{position:"start",children:e.jsx(_e,{icon:"eva:search-fill",sx:{color:"text.disabled"}})}),endAdornment:a?e.jsx(q,{position:"end",children:e.jsx(A,{onClick:()=>d(""),edge:"end",size:"small",children:e.jsx(te,{fontSize:"small"})})}):void 0}}),e.jsx(E,{flexGrow:1,sx:{display:{xs:"none",md:"block"}}}),e.jsx($,{startIcon:e.jsx(ae,{}),variant:"contained",color:"primary",onClick:()=>m(!0),children:"增加产品"})]}),e.jsx(Pe,{tableData:b,loading:x,flushData:()=>r(),total:C,page:p-1,pageSize:n,onPageChange:(t,h)=>o({page:t+1,pageSize:h}),sortModel:j,onSortChange:t=>o({sortModel:t}),selectKeys:u.selectKeys,onSelectChange:(t,h,v)=>o({selectOption:t,selectTotal:h,selectKeys:v})}),e.jsx(Se,{open:g,onClose:()=>m(!1),onSuccess:()=>r()})]})})}export{qe 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.