1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
2 lines
4.8 KiB
JavaScript
2 lines
4.8 KiB
JavaScript
import{_ as F,j as M,c as R,a as e,w as l,k as T,F as C,i as f,h as U,r as s,z as j,o as d,m as q,n as w,f as g,d as u,t as i,A as H,B as J,p as k,x as K}from"./index-CeNpw27z.js";import{a as Q}from"./stations-DTFB--m9.js";import{l as X,P as Y}from"./help-92MqPoF4.js";const Z={class:"stat-value"},ee={class:"stat-value"},te={class:"stat-value ok"},le={class:"stat-value ng"},ae={__name:"Wip",setup(oe){const I=f([]),c=f(""),_=f(""),m=f([]),v=f(!1),N=K(()=>_.value?m.value.filter(o=>o.status===_.value):m.value);function h(o){return m.value.filter(t=>t.status===o).length}function P({row:o}){return o.dwellSec>86400?"wip-overdue":""}function V(o){return{ONLINE:"已上线",PROCESSING:"在制",REPAIR:"返修"}[o]||o}function O(o){return{ONLINE:"info",PROCESSING:"success",REPAIR:"danger"}[o]||"info"}function A(o){const t=Number(o)||0;if(t<=0)return"-";if(t<60)return t+"秒";const n=Math.floor(t/60);return n<60?`${n}分${t%60}秒`:`${Math.floor(n/60)}时${n%60}分`}async function y(){v.value=!0;try{const o={};c.value!==""&&c.value!==null&&(o.stationNo=c.value),m.value=await U.get("/workpieces/in-process",{params:o})||[]}finally{v.value=!1}}return M(async()=>{I.value=await Q(),y()}),(o,t)=>{const n=s("el-option"),S=s("el-select"),E=s("el-form-item"),B=s("el-button"),L=s("el-form"),$=s("el-alert"),p=s("el-card"),b=s("el-col"),z=s("el-row"),r=s("el-table-column"),x=s("el-tag"),D=s("el-table"),G=s("el-empty"),W=j("loading");return d(),R(C,null,[e(p,null,{default:l(()=>[e(L,{inline:""},{default:l(()=>[e(E,{label:"当前工位"},{default:l(()=>[e(S,{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=a=>c.value=a),clearable:"",placeholder:"全部工位",style:{width:"180px"},onChange:y},{default:l(()=>[e(n,{label:"上线位(虚拟)",value:0}),(d(!0),R(C,null,q(I.value,a=>(d(),w(n,{key:a.stationNo,label:`${a.name||"工位"+a.stationNo}`,value:a.stationNo},null,8,["label","value"]))),128)),e(n,{label:"下线位(虚拟)",value:13})]),_:1},8,["modelValue"])]),_:1}),e(E,{label:"状态"},{default:l(()=>[e(S,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=a=>_.value=a),clearable:"",placeholder:"全部状态",style:{width:"140px"}},{default:l(()=>[e(n,{label:"已上线",value:"ONLINE"}),e(n,{label:"在制",value:"PROCESSING"}),e(n,{label:"返修",value:"REPAIR"})]),_:1},8,["modelValue"])]),_:1}),e(E,null,{default:l(()=>[e(B,{type:"primary",onClick:y},{default:l(()=>[...t[2]||(t[2]=[g("查询",-1)])]),_:1})]),_:1})]),_:1}),e($,{type:"info",closable:!1,style:{"margin-bottom":"12px"},title:"在制品 = 已进线但尚未完工的工件(含跨天继续停留)。日排产仅排「未开工数量」,不会重复排产。"}),e(z,{gutter:16,style:{"margin-bottom":"14px"}},{default:l(()=>[e(b,{span:6},{default:l(()=>[e(p,{shadow:"never",class:"stat-card"},{default:l(()=>[t[3]||(t[3]=u("div",{class:"stat-label"},"在制品总数",-1)),u("div",Z,i(N.value.length),1)]),_:1})]),_:1}),e(b,{span:6},{default:l(()=>[e(p,{shadow:"never",class:"stat-card"},{default:l(()=>[t[4]||(t[4]=u("div",{class:"stat-label"},"已上线",-1)),u("div",ee,i(h("ONLINE")),1)]),_:1})]),_:1}),e(b,{span:6},{default:l(()=>[e(p,{shadow:"never",class:"stat-card"},{default:l(()=>[t[5]||(t[5]=u("div",{class:"stat-label"},"在制",-1)),u("div",te,i(h("PROCESSING")),1)]),_:1})]),_:1}),e(b,{span:6},{default:l(()=>[e(p,{shadow:"never",class:"stat-card"},{default:l(()=>[t[6]||(t[6]=u("div",{class:"stat-label"},"返修",-1)),u("div",le,i(h("REPAIR")),1)]),_:1})]),_:1})]),_:1}),H((d(),w(D,{data:N.value,border:"",stripe:"",size:"small","row-class-name":P},{default:l(()=>[e(r,{prop:"sn",label:"工件SN","min-width":"150","show-overflow-tooltip":""}),e(r,{prop:"orderNo",label:"工单号","min-width":"140","show-overflow-tooltip":""}),e(r,{prop:"productCode",label:"产品编号","min-width":"120","show-overflow-tooltip":""}),e(r,{prop:"productName",label:"产品名称","min-width":"120","show-overflow-tooltip":""}),e(r,{prop:"currentStationName",label:"当前工位",width:"130"}),e(r,{label:"状态",width:"90",align:"center"},{default:l(({row:a})=>[e(x,{type:O(a.status),effect:"plain"},{default:l(()=>[g(i(V(a.status)),1)]),_:2},1032,["type"])]),_:1}),e(r,{label:"进度",width:"120",align:"center"},{default:l(({row:a})=>[g(i(a.doneSteps)+" / "+i(a.totalSteps),1)]),_:1}),e(r,{prop:"onlineAt",label:"上线时间",width:"170"}),e(r,{label:"停留时长",width:"130",align:"right"},{default:l(({row:a})=>[u("span",{style:J(a.dwellSec>86400?"color:#f56c6c;font-weight:600":"")},i(A(a.dwellSec)),5),a.dwellSec>86400?(d(),w(x,{key:0,type:"danger",size:"small",effect:"plain",style:{"margin-left":"4px"}},{default:l(()=>[...t[7]||(t[7]=[g("超期",-1)])]),_:1})):k("",!0)]),_:1})]),_:1},8,["data"])),[[W,v.value]]),!v.value&&!N.value.length?(d(),w(G,{key:0,description:"当前无在制品"})):k("",!0)]),_:1}),e(Y,{data:T(X),page:"Wip"},null,8,["data"])],64)}}},ue=F(ae,[["__scopeId","data-v-a5c68fb7"]]);export{ue as default};
|