Files
bj_power/bj_power_wms_client/web/static/assets/Semi-DIX6RAyj.js
T
SunYF dd078038e2 feat: 为多个页面添加操作帮助功能,替换旧版静态资源文件
1. 新增PageHelp通用帮助组件,实现页面左下角悬浮帮助按钮
2. 为WMS、MES、工位终端多个业务页面接入帮助系统
3. 替换项目中旧的打包静态资源文件,更新资源引用路径
4. 新增各模块的帮助文档配置数据
2026-08-28 17:23:44 +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 H,a as e,w as a,p as V,F as T,h as p,r as s,J as ae,o as x,k as oe,D as J,e as O,H as B,d as N,f as u,t as _,K as ne,g as S,E as g}from"./index-I7IvEW25.js";import{r as z}from"./request-CgQy1jz7.js";import{b as se}from"./format-C9Ok6skr.js";import{e as de,P as ue}from"./help-CGfNBMNA.js";const re={style:{"margin-bottom":"8px"}},ie={style:{"margin-top":"12px"}},me={class:"pager"},pe={__name:"Semi",setup(ce){const D=p([]);le(async()=>{try{const o=await z.get("/material/list");D.value=Array.isArray(o)?o:(o==null?void 0:o.list)||[]}catch{}});const y=te(),n=S({materialCode:"",zoneCode:"",orderNo:"",completedProcess:""}),b=p(""),r=p([]),k=p(!1);function R(){for(let o of String(b.value).split(/\s+/)){const l=o.trim();l&&!r.value.includes(l)&&r.value.push(l)}b.value=""}function j(o){r.value.splice(o,1)}async function G(){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=[],b.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([]),L=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)||[],L.value=(o==null?void 0:o.total)||0}finally{C.value=!1}}function q(){f.current=1,U()}return(o,l)=>{const $=s("el-option"),A=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(),H(T,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(A,{modelValue:n.materialCode,"onUpdate:modelValue":l[0]||(l[0]=t=>n.materialCode=t),filterable:"",placeholder:"选择物料编码",style:{width:"100%"}},{default:a(()=>[(x(!0),H(T,null,oe(D.value,t=>(x(),J($,{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:b.value,"onUpdate:modelValue":l[4]||(l[4]=t=>b.value=t),type:"textarea",rows:3,autofocus:"",placeholder:"连续扫描 SN,每次回车追加(可一次多条,空白分隔)",onKeydown:O(B(R,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})]),_:1}),N("div",re,[l[10]||(l[10]=u("待入库 SN",-1)),N("b",null,_(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=>j(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:G},{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:B(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:O(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:B(q,["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(A,{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:q},{default:a(()=>[...l[16]||(l[16]=[u("查询",-1)])]),_:1},8,["loading"])]),_:1})]),_:1}),ne((x(),J(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(_(t.completedProcess||"-"),1)]),_:1}),e(i,{prop:"zoneCode",label:"区域",width:"90",align:"center"},{default:a(({row:t})=>[u(_(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(_(t.status),1)]),_:2},1032,["type"])]),_:1}),e(i,{prop:"orderNo",label:"工单号","min-width":"140"},{default:a(({row:t})=>[u(_(t.orderNo||"-"),1)]),_:1}),e(i,{label:"创建时间",width:"160",align:"center"},{default:a(({row:t})=>[u(_(V(se)(t.createdAt)),1)]),_:1})]),_:1},8,["data"])),[[Z,C.value]]),N("div",me,[e(W,{background:"",layout:"total, prev, pager, next",total:L.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-5ad9d2a4"]]);export{ge as default};