Files
bj_power/bj_power_wms_client/web/static/assets/Semi-DkeRBk7i.js
T
SunYF 9662029a63 build: 更新生产构建的静态资源文件
更新了index.html引入的资源哈希文件名,替换了旧的业务模块js文件,删除了过期的静态资源包
2026-08-29 15:36:49 +08:00

2 lines
7.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as ee,i as le,I as te,c as T,a as e,w as a,p as V,F as G,h as p,r as s,J as ae,o as x,k as oe,G as H,e as J,K as L,d as N,f as u,t as b,L as ne,g as S,E as g}from"./index-C_gZ2k2u.js";import{r as z}from"./request-DwGAFJaQ.js";import{b as se}from"./format-C9Ok6skr.js";import{e as de,P as ue}from"./help-BKBuziS-.js";const re={style:{"margin-bottom":"8px"}},ie={style:{"margin-top":"12px"}},me={class:"pager"},pe={__name:"Semi",setup(ce){const B=p([]);le(async()=>{try{const o=await z.get("/material/list");B.value=Array.isArray(o)?o:(o==null?void 0:o.list)||[]}catch{}});const y=te(),n=S({materialCode:"",zoneCode:"",orderNo:"",completedProcess:""}),_=p(""),r=p([]),k=p(!1);function O(){for(let o of String(_.value).split(/\s+/)){const l=o.trim();l&&!r.value.includes(l)&&r.value.push(l)}_.value=""}function R(o){r.value.splice(o,1)}async function j(){if(!n.materialCode){g.warning("请选择物料");return}if(!r.value.length){g.warning("请扫码录入 SN(回车追加)");return}k.value=!0;let o=0;try{for(const l of r.value)try{await z.post("/semi/inbound",{sn:l,materialCode:n.materialCode,completedProcess:n.completedProcess.trim(),zoneCode:n.zoneCode||void 0,orderNo:n.orderNo.trim()||void 0,operator:y}),o++}catch{}g.success(`半成品入库完成:成功 ${o} / ${r.value.length} 条`),r.value=[],_.value=""}finally{k.value=!1}}const w=S({sn:""}),h=p(!1);async function P(){const o=w.sn.trim();if(!o){g.warning("请输入 SN");return}h.value=!0;try{await z.post("/semi/outbound",{sn:o,operator:y}),g.success(`半成品出库成功:${o}`),w.sn="",await U()}finally{h.value=!1}}const c=S({materialCode:"",status:""}),I=p([]),q=p(0),C=p(!1),f=S({current:1,size:10});async function U(){C.value=!0;try{const o=await z.get("/semi/query",{params:{materialCode:c.materialCode.trim(),status:c.status,page:f.current,pageSize:f.size}});I.value=(o==null?void 0:o.list)||[],q.value=(o==null?void 0:o.total)||0}finally{C.value=!1}}function A(){f.current=1,U()}return(o,l)=>{const $=s("el-option"),D=s("el-select"),d=s("el-form-item"),m=s("el-input"),F=s("el-form"),i=s("el-table-column"),v=s("el-button"),E=s("el-table"),K=s("el-tab-pane"),Q=s("el-tag"),W=s("el-pagination"),X=s("el-tabs"),Y=s("el-card"),Z=ae("loading");return x(),T(G,null,[e(Y,{shadow:"never"},{default:a(()=>[e(X,null,{default:a(()=>[e(K,{label:"半成品/成品入库"},{default:a(()=>[e(F,{"label-width":"110px",style:{"max-width":"680px"}},{default:a(()=>[e(d,{label:"物料"},{default:a(()=>[e(D,{modelValue:n.materialCode,"onUpdate:modelValue":l[0]||(l[0]=t=>n.materialCode=t),filterable:"",placeholder:"选择物料编码",style:{width:"100%"}},{default:a(()=>[(x(!0),T(G,null,oe(B.value,t=>(x(),H($,{key:t.id,value:t.code,label:`${t.code} ${t.name||""}`},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"已完成工序"},{default:a(()=>[e(m,{modelValue:n.completedProcess,"onUpdate:modelValue":l[1]||(l[1]=t=>n.completedProcess=t),placeholder:"如:135(可空)",clearable:""},null,8,["modelValue"])]),_:1}),e(d,{label:"工单号"},{default:a(()=>[e(m,{modelValue:n.orderNo,"onUpdate:modelValue":l[2]||(l[2]=t=>n.orderNo=t),placeholder:"来源工单号(可空)",clearable:""},null,8,["modelValue"])]),_:1}),e(d,{label:"区域"},{default:a(()=>[e(m,{modelValue:n.zoneCode,"onUpdate:modelValue":l[3]||(l[3]=t=>n.zoneCode=t),placeholder:"库区(可空)",clearable:""},null,8,["modelValue"])]),_:1}),e(d,{label:"操作人"},{default:a(()=>[e(m,{"model-value":V(y),disabled:""},null,8,["model-value"])]),_:1}),e(d,{label:"扫码录入"},{default:a(()=>[e(m,{modelValue:_.value,"onUpdate:modelValue":l[4]||(l[4]=t=>_.value=t),type:"textarea",rows:3,autofocus:"",placeholder:"连续扫描 SN,每次回车追加(可一次多条,空白分隔)",onKeydown:J(L(O,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})]),_:1}),N("div",re,[l[10]||(l[10]=u("待入库 SN",-1)),N("b",null,b(r.value.length),1),l[11]||(l[11]=u(" 条",-1))]),e(E,{data:r.value.map((t,M)=>({i:M,v:t})),size:"small",border:"","max-height":"260","empty-text":"暂无 SN",style:{"max-width":"760px"}},{default:a(()=>[e(i,{type:"index",label:"#",width:"56",align:"center"}),e(i,{prop:"v",label:"SN 序列号","min-width":"220"}),e(i,{label:"操作",width:"80",align:"center"},{default:a(({row:t})=>[e(v,{link:"",type:"danger",size:"small",onClick:M=>R(t.i)},{default:a(()=>[...l[12]||(l[12]=[u("移除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"]),N("div",ie,[e(v,{type:"primary",loading:k.value,onClick:j},{default:a(()=>[...l[13]||(l[13]=[u("提交入库",-1)])]),_:1},8,["loading"]),e(v,{onClick:l[5]||(l[5]=t=>r.value=[])},{default:a(()=>[...l[14]||(l[14]=[u("清空",-1)])]),_:1})])]),_:1}),e(K,{label:"半成品出库"},{default:a(()=>[e(F,{"label-width":"110px",style:{"max-width":"560px"},onSubmit:L(P,["prevent"])},{default:a(()=>[e(d,{label:"SN"},{default:a(()=>[e(m,{modelValue:w.sn,"onUpdate:modelValue":l[6]||(l[6]=t=>w.sn=t),placeholder:"扫描或输入 SN,回车出库",clearable:"",autofocus:"",onKeyup:J(P,["enter"])},null,8,["modelValue"])]),_:1}),e(d,{label:"操作人"},{default:a(()=>[e(m,{"model-value":V(y),disabled:""},null,8,["model-value"])]),_:1}),e(d,null,{default:a(()=>[e(v,{type:"primary",loading:h.value,onClick:P},{default:a(()=>[...l[15]||(l[15]=[u("出库(重上线)",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1}),e(K,{label:"半成品/成品查询"},{default:a(()=>[e(F,{inline:"",onSubmit:L(A,["prevent"])},{default:a(()=>[e(d,{label:"物料编码"},{default:a(()=>[e(m,{modelValue:c.materialCode,"onUpdate:modelValue":l[7]||(l[7]=t=>c.materialCode=t),placeholder:"物料编码",clearable:"",style:{width:"200px"}},null,8,["modelValue"])]),_:1}),e(d,{label:"状态"},{default:a(()=>[e(D,{modelValue:c.status,"onUpdate:modelValue":l[8]||(l[8]=t=>c.status=t),clearable:"",placeholder:"请选择状态",style:{width:"120px"}},{default:a(()=>[e($,{value:"在库",label:"在库"}),e($,{value:"出库",label:"出库"})]),_:1},8,["modelValue"])]),_:1}),e(d,null,{default:a(()=>[e(v,{type:"primary",loading:C.value,onClick:A},{default:a(()=>[...l[16]||(l[16]=[u("查询",-1)])]),_:1},8,["loading"])]),_:1})]),_:1}),ne((x(),H(E,{data:I.value,border:"",size:"small","empty-text":"暂无记录"},{default:a(()=>[e(i,{prop:"sn",label:"SN","min-width":"200"}),e(i,{prop:"materialCode",label:"物料编码","min-width":"140"}),e(i,{prop:"completedProcess",label:"已完成工序","min-width":"120"},{default:a(({row:t})=>[u(b(t.completedProcess||"-"),1)]),_:1}),e(i,{prop:"zoneCode",label:"区域",width:"90",align:"center"},{default:a(({row:t})=>[u(b(t.zoneCode||"-"),1)]),_:1}),e(i,{prop:"status",label:"状态",width:"90",align:"center"},{default:a(({row:t})=>[e(Q,{type:t.status==="在库"?"success":"info",size:"small"},{default:a(()=>[u(b(t.status),1)]),_:2},1032,["type"])]),_:1}),e(i,{prop:"orderNo",label:"工单号","min-width":"140"},{default:a(({row:t})=>[u(b(t.orderNo||"-"),1)]),_:1}),e(i,{label:"创建时间",width:"160",align:"center"},{default:a(({row:t})=>[u(b(V(se)(t.createdAt)),1)]),_:1})]),_:1},8,["data"])),[[Z,C.value]]),N("div",me,[e(W,{background:"",layout:"total, prev, pager, next",total:q.value,"current-page":f.current,"page-size":f.size,onCurrentChange:l[9]||(l[9]=t=>{f.current=t,U()})},null,8,["total","current-page","page-size"])])]),_:1})]),_:1})]),_:1}),e(ue,{data:V(de)},null,8,["data"])],64)}}},ge=ee(pe,[["__scopeId","data-v-4b96cb2e"]]);export{ge as default};