1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
2 lines
3.2 KiB
JavaScript
2 lines
3.2 KiB
JavaScript
import{j as C,n as U,w as a,h as b,r as o,i as V,l as B,o as E,a as e,f as c,t as S,E as f,C as D,v as R}from"./index-CeNpw27z.js";const N={__name:"Attachment",setup(L){const n=B({bizType:"work_order",bizId:""}),w=V([]);async function u(){w.value=await b.get("/attachments",{params:{bizType:n.bizType,bizId:n.bizId}})||[]}function z(t){return t=t||0,t<1024?t+" B":t<1024*1024?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB"}async function y(t){if(!n.bizId){f.warning("请先填写业务ID再上传");return}const l=new FormData;l.append("file",t.file),l.append("bizType",n.bizType),l.append("bizId",n.bizId);try{await b.post("/attachment/upload",l),f.success("上传成功"),t.onSuccess&&t.onSuccess(),u()}catch(i){t.onError&&t.onError(i)}}async function h(t){const l=D(),i=await fetch("/api/v1/attachment/download?name="+encodeURIComponent(t.filePath),{headers:{Authorization:"Bearer "+l}});if(!i.ok){f.error("下载失败");return}const _=await i.blob(),s=URL.createObjectURL(_),p=document.createElement("a");p.href=s,p.download=t.fileName||"file",p.click(),URL.revokeObjectURL(s)}async function k(t){await R.confirm("确认删除该附件?","提示",{type:"warning"}),await b.post("/attachment/delete",{id:t.id}),f.success("已删除"),u()}return C(u),(t,l)=>{const i=o("el-option"),_=o("el-select"),s=o("el-form-item"),p=o("el-input"),m=o("el-button"),v=o("el-upload"),I=o("el-form"),d=o("el-table-column"),x=o("el-table"),g=o("el-card");return E(),U(g,null,{default:a(()=>[e(I,{inline:"",style:{"margin-bottom":"12px"}},{default:a(()=>[e(s,{label:"业务类型"},{default:a(()=>[e(_,{modelValue:n.bizType,"onUpdate:modelValue":l[0]||(l[0]=r=>n.bizType=r),style:{width:"160px"}},{default:a(()=>[e(i,{label:"工单",value:"work_order"}),e(i,{label:"物料",value:"material"}),e(i,{label:"工艺流程",value:"process_flow"}),e(i,{label:"检验",value:"inspection"})]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"业务ID"},{default:a(()=>[e(p,{modelValue:n.bizId,"onUpdate:modelValue":l[1]||(l[1]=r=>n.bizId=r),placeholder:"如 工单号 / 图号",style:{width:"220px"}},null,8,["modelValue"])]),_:1}),e(s,null,{default:a(()=>[e(v,{action:"#","show-file-list":!1,"http-request":y},{default:a(()=>[e(m,{type:"primary"},{default:a(()=>[...l[2]||(l[2]=[c("选择文件上传",-1)])]),_:1})]),_:1})]),_:1}),e(s,null,{default:a(()=>[e(m,{onClick:u},{default:a(()=>[...l[3]||(l[3]=[c("查询",-1)])]),_:1})]),_:1})]),_:1}),e(x,{data:w.value,border:"",size:"small"},{default:a(()=>[e(d,{prop:"fileName",label:"文件名","min-width":"180"}),e(d,{prop:"fileSize",label:"大小",width:"110"},{default:a(({row:r})=>[c(S(z(r.fileSize)),1)]),_:1}),e(d,{prop:"bizType",label:"业务类型",width:"120"}),e(d,{prop:"bizId",label:"业务ID",width:"140"}),e(d,{prop:"uploader",label:"上传人",width:"100"}),e(d,{prop:"createdAt",label:"上传时间","min-width":"170"}),e(d,{label:"操作",width:"160",fixed:"right"},{default:a(({row:r})=>[e(m,{size:"small",type:"primary",onClick:T=>h(r)},{default:a(()=>[...l[4]||(l[4]=[c("下载",-1)])]),_:1},8,["onClick"]),e(m,{size:"small",type:"danger",onClick:T=>k(r)},{default:a(()=>[...l[5]||(l[5]=[c("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})}}};export{N as default};
|