3 lines
14 KiB
JavaScript
3 lines
14 KiB
JavaScript
module.exports=[33508,a=>{"use strict";let b=(0,a.i(70106).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",()=>b],33508)},15618,a=>{"use strict";let b=(0,a.i(70106).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",()=>b],15618)},97063,a=>{"use strict";let b=(0,a.i(70106).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["Info",()=>b],97063)},17291,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(15618),f=a.i(33508),g=a.i(97063),h=a.i(70106);let i=(0,h.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),j=(0,h.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),k=[{id:1,name:"GD-30 Supreme",code:"GD30",status:"在产",boardCount:12,deviceCount:156,description:"高端三维电法仪",createDate:"2023-06-01"},{id:2,name:"GD-20",code:"GD20",status:"在产",boardCount:8,deviceCount:89,description:"中端二维电法仪",createDate:"2023-08-15"},{id:3,name:"GD-10 Supreme",code:"GD10",status:"停产",boardCount:6,deviceCount:234,description:"入门级电法仪",createDate:"2022-03-10"}],l={GD30:[{id:1,name:"主协板安装检查",required:!0},{id:2,name:"采集板安装检查(×6)",required:!0},{id:3,name:"发射板安装检查",required:!0},{id:4,name:"升压板安装检查",required:!0},{id:5,name:"线缆连接检查",required:!0},{id:6,name:"整机通电测试",required:!0},{id:7,name:"通信功能测试",required:!0},{id:8,name:"采集通道校准",required:!0},{id:9,name:"外观检查",required:!1},{id:10,name:"包装检查",required:!1}],GD20:[{id:1,name:"主协板安装检查",required:!0},{id:2,name:"采集板安装检查(×4)",required:!0},{id:3,name:"发射板安装检查",required:!0},{id:4,name:"线缆连接检查",required:!0},{id:5,name:"整机通电测试",required:!0},{id:6,name:"通信功能测试",required:!0},{id:7,name:"采集通道校准",required:!0},{id:8,name:"外观检查",required:!1}],GD10:[{id:1,name:"主协板安装检查",required:!0},{id:2,name:"采集板安装检查(×2)",required:!0},{id:3,name:"线缆连接检查",required:!0},{id:4,name:"整机通电测试",required:!0},{id:5,name:"通信功能测试",required:!0},{id:6,name:"外观检查",required:!1}]};function m(){(0,d.useRouter)();let[a,h]=(0,c.useState)(!1),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)("GD30"),[q,r]=(0,c.useState)({name:"",code:"",status:"在产"}),[s,t]=(0,c.useState)({model:"GD30",items:[{name:"",required:!0}]}),u=(a,b,c)=>{let d=[...s.items];d[a]={...d[a],[b]:c},t({...s,items:d})};return(0,b.jsxs)("div",{style:{padding:24},children:[(0,b.jsxs)("div",{style:{marginBottom:24},children:[(0,b.jsx)("h2",{style:{fontSize:20,fontWeight:600,margin:0},children:"设备型号管理"}),(0,b.jsx)("p",{style:{fontSize:14,color:"rgba(0,0,0,0.45)",margin:"4px 0 0"},children:"管理设备型号、装配清单模板"})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:12,padding:16,backgroundColor:"#eef5f0",borderRadius:8,marginBottom:24,border:"1px solid #a3c4ad"},children:[(0,b.jsx)(g.Info,{size:18,style:{color:"#4a7c59",flexShrink:0,marginTop:2}}),(0,b.jsx)("div",{style:{fontSize:14,color:"#4a7c59",lineHeight:1.6},children:"设备型号管理是生产管理的核心枢纽。每个型号定义了设备的板卡组成、装配流程和检测标准。新增型号后,请及时配置对应的装配清单模板。"})]}),(0,b.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:8,boxShadow:"0 1px 2px rgba(0,0,0,0.05)",overflow:"hidden",marginBottom:32},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:"设备型号列表"}),(0,b.jsxs)("button",{onClick:()=>h(!0),style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:[(0,b.jsx)(e.Plus,{size:16}),"新增型号"]})]}),(0,b.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,b.jsx)("thead",{children:(0,b.jsx)("tr",{style:{backgroundColor:"#FAFAFA"},children:["型号名称","型号代码","描述","板卡数","设备数","状态","创建日期"].map(a=>(0,b.jsx)("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.85)",borderBottom:"1px solid #F0F0F0"},children:a},a))})}),(0,b.jsx)("tbody",{children:k.map(a=>(0,b.jsxs)("tr",{style:{borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14,fontWeight:500},children:a.name}),(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:a.code}),(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:a.description}),(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14},children:a.boardCount}),(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14},children:a.deviceCount}),(0,b.jsx)("td",{style:{padding:"12px 16px"},children:(0,b.jsx)("span",{style:{...function(a){switch(a){case"在产":return{backgroundColor:"#eef5f0",color:"#4a7c59",border:"1px solid #a3c4ad"};case"停产":return{backgroundColor:"#FFFBE6",color:"#FAAD14",border:"1px solid #FFE58F"};default:return{backgroundColor:"#FAFAFA",color:"rgba(0,0,0,0.45)",border:"1px solid #D9D9D9"}}}(a.status),padding:"2px 8px",borderRadius:4,fontSize:12},children:a.status})}),(0,b.jsx)("td",{style:{padding:"12px 16px",fontSize:14,color:"rgba(0,0,0,0.65)"},children:a.createDate})]},a.id))})]})]}),(0,b.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:8,boxShadow:"0 1px 2px rgba(0,0,0,0.05)",overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:"装配 Checklist 模板"}),(0,b.jsxs)("button",{onClick:()=>n(!0),style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:[(0,b.jsx)(e.Plus,{size:16}),"新增模板"]})]}),(0,b.jsx)("div",{style:{display:"flex",borderBottom:"1px solid #F0F0F0"},children:Object.keys(l).map(a=>(0,b.jsx)("button",{onClick:()=>p(a),style:{padding:"10px 20px",fontSize:14,cursor:"pointer",border:"none",backgroundColor:"transparent",borderBottom:o===a?"2px solid #4a7c59":"2px solid transparent",color:o===a?"#4a7c59":"rgba(0,0,0,0.65)",fontWeight:o===a?600:400},children:a},a))}),(0,b.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{style:{backgroundColor:"#FAFAFA"},children:[(0,b.jsx)("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.85)",borderBottom:"1px solid #F0F0F0",width:60},children:"序号"}),(0,b.jsx)("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.85)",borderBottom:"1px solid #F0F0F0"},children:"项目名称"}),(0,b.jsx)("th",{style:{padding:"12px 16px",textAlign:"left",fontSize:14,fontWeight:600,color:"rgba(0,0,0,0.85)",borderBottom:"1px solid #F0F0F0",width:80},children:"必填"})]})}),(0,b.jsx)("tbody",{children:(l[o]||[]).map((a,c)=>(0,b.jsxs)("tr",{style:{borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("td",{style:{padding:"10px 16px",fontSize:14,color:"rgba(0,0,0,0.45)"},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,b.jsx)(i,{size:14,style:{color:"rgba(0,0,0,0.25)",cursor:"grab"}}),c+1]})}),(0,b.jsx)("td",{style:{padding:"10px 16px",fontSize:14},children:a.name}),(0,b.jsx)("td",{style:{padding:"10px 16px"},children:a.required&&(0,b.jsx)("span",{style:{fontSize:12,color:"#FF4D4F"},children:"必填"})})]},a.id))})]})]}),a&&(0,b.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,b.jsx)("div",{onClick:()=>h(!1),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,b.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:480,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:"新增设备型号"}),(0,b.jsx)("button",{onClick:()=>h(!1),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,b.jsx)(f.X,{size:20})})]}),(0,b.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,b.jsxs)("div",{style:{marginBottom:20},children:[(0,b.jsxs)("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8},children:[(0,b.jsx)("span",{style:{color:"#FF4D4F"},children:"*"})," 型号名称"]}),(0,b.jsx)("input",{value:q.name,onChange:a=>r({...q,name:a.target.value}),placeholder:"如 GD-30 Supreme",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,b.jsxs)("div",{style:{marginBottom:20},children:[(0,b.jsxs)("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8},children:[(0,b.jsx)("span",{style:{color:"#FF4D4F"},children:"*"})," 型号编码"]}),(0,b.jsx)("input",{value:q.code,onChange:a=>r({...q,code:a.target.value}),placeholder:"如 GD30",style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14,boxSizing:"border-box"}})]}),(0,b.jsxs)("div",{style:{marginBottom:20},children:[(0,b.jsx)("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8},children:"状态"}),(0,b.jsx)("div",{style:{display:"flex",gap:12},children:["在产","停产"].map(a=>(0,b.jsx)("button",{onClick:()=>r({...q,status:a}),style:{padding:"6px 20px",borderRadius:6,fontSize:14,cursor:"pointer",border:q.status===a?"1px solid #4a7c59":"1px solid #D9D9D9",backgroundColor:q.status===a?"#eef5f0":"#fff",color:q.status===a?"#4a7c59":"rgba(0,0,0,0.65)"},children:a},a))})]})]}),(0,b.jsxs)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:[(0,b.jsx)("button",{onClick:()=>h(!1),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"取消"}),(0,b.jsx)("button",{onClick:()=>h(!1),style:{padding:"8px 20px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:"保存"})]})]})]}),m&&(0,b.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:50},children:[(0,b.jsx)("div",{onClick:()=>n(!1),style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.45)"}}),(0,b.jsxs)("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:480,backgroundColor:"#fff",boxShadow:"-2px 0 8px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column"},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"1px solid #F0F0F0"},children:[(0,b.jsx)("h3",{style:{fontSize:16,fontWeight:600,margin:0},children:"新增 Checklist 模板"}),(0,b.jsx)("button",{onClick:()=>n(!1),style:{border:"none",background:"none",cursor:"pointer",padding:4},children:(0,b.jsx)(f.X,{size:20})})]}),(0,b.jsxs)("div",{style:{flex:1,overflow:"auto",padding:24},children:[(0,b.jsxs)("div",{style:{marginBottom:20},children:[(0,b.jsxs)("label",{style:{display:"block",fontSize:14,fontWeight:500,marginBottom:8},children:[(0,b.jsx)("span",{style:{color:"#FF4D4F"},children:"*"})," 设备型号"]}),(0,b.jsx)("select",{value:s.model,onChange:a=>t({...s,model:a.target.value}),style:{width:"100%",padding:"8px 12px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:14},children:Object.keys(l).map(a=>(0,b.jsx)("option",{value:a,children:a},a))})]}),(0,b.jsxs)("div",{style:{marginBottom:12},children:[(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[(0,b.jsx)("label",{style:{fontSize:14,fontWeight:500},children:"检查项列表"}),(0,b.jsxs)("button",{onClick:()=>{t({...s,items:[...s.items,{name:"",required:!0}]})},style:{display:"flex",alignItems:"center",gap:4,padding:"4px 12px",border:"1px solid #4a7c59",borderRadius:6,backgroundColor:"#fff",color:"#4a7c59",cursor:"pointer",fontSize:13},children:[(0,b.jsx)(e.Plus,{size:14}),"添加"]})]}),s.items.map((a,c)=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,b.jsx)("input",{value:a.name,onChange:a=>u(c,"name",a.target.value),placeholder:`检查项 ${c+1}`,style:{flex:1,padding:"6px 10px",border:"1px solid #D9D9D9",borderRadius:6,fontSize:13,boxSizing:"border-box"}}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:13,flexShrink:0},children:[(0,b.jsx)("input",{type:"checkbox",checked:a.required,onChange:a=>u(c,"required",a.target.checked)}),"必填"]}),(0,b.jsx)("button",{onClick:()=>{t({...s,items:s.items.filter((a,b)=>b!==c)})},style:{border:"none",background:"none",cursor:"pointer",padding:4,color:"#FF4D4F"},children:(0,b.jsx)(j,{size:14})})]},c))]})]}),(0,b.jsxs)("div",{style:{padding:"16px 24px",borderTop:"1px solid #F0F0F0",display:"flex",justifyContent:"flex-end",gap:12},children:[(0,b.jsx)("button",{onClick:()=>n(!1),style:{padding:"8px 20px",border:"1px solid #D9D9D9",borderRadius:6,backgroundColor:"#fff",cursor:"pointer",fontSize:14},children:"取消"}),(0,b.jsx)("button",{onClick:()=>n(!1),style:{padding:"8px 20px",border:"none",borderRadius:6,backgroundColor:"#4a7c59",color:"#fff",cursor:"pointer",fontSize:14},children:"保存"})]})]})]})]})}a.s(["default",()=>m],17291)}];
|
||
|
||
//# sourceMappingURL=_4b0e7893._.js.map
|