初始化2
This commit is contained in:
@@ -0,0 +1 @@
|
||||
import{j as k,m as v,w as o,h as f,r as d,i as U,k as c,o as S,a as e,f as u,t as h,E as w}from"./index-1i-O4UWQ.js";const B={__name:"PlcSend",setup(T){const n=c({orderNo:"",sn:"",stationNo:1,processCombination:""}),r=c({orderNo:"",status:""}),m=U([]);async function V(){if(!n.orderNo||!n.processCombination)return w.warning("请填写工单号和工序组合");try{await f.post("/plc/send-process",{...n}),w.success("工序码下发成功(未收到完成信号不会下发下一条)"),i()}catch{}}async function i(){m.value=await f.get("/plc/send-logs",{params:r})||[]}return k(i),(N,l)=>{const p=d("el-input"),s=d("el-form-item"),y=d("el-input-number"),_=d("el-button"),b=d("el-form"),x=d("el-divider"),a=d("el-table-column"),C=d("el-table"),g=d("el-card");return S(),v(g,null,{default:o(()=>[e(b,{inline:""},{default:o(()=>[e(s,{label:"工单号"},{default:o(()=>[e(p,{modelValue:n.orderNo,"onUpdate:modelValue":l[0]||(l[0]=t=>n.orderNo=t),style:{width:"170px"}},null,8,["modelValue"])]),_:1}),e(s,{label:"工件SN"},{default:o(()=>[e(p,{modelValue:n.sn,"onUpdate:modelValue":l[1]||(l[1]=t=>n.sn=t),style:{width:"170px"}},null,8,["modelValue"])]),_:1}),e(s,{label:"工位"},{default:o(()=>[e(y,{modelValue:n.stationNo,"onUpdate:modelValue":l[2]||(l[2]=t=>n.stationNo=t),min:1,max:12},null,8,["modelValue"])]),_:1}),e(s,{label:"工序组合"},{default:o(()=>[e(p,{modelValue:n.processCombination,"onUpdate:modelValue":l[3]||(l[3]=t=>n.processCombination=t),placeholder:"如 135",style:{width:"110px"}},null,8,["modelValue"])]),_:1}),e(s,null,{default:o(()=>[e(_,{type:"primary",onClick:V},{default:o(()=>[...l[6]||(l[6]=[u("下发工序码",-1)])]),_:1})]),_:1})]),_:1}),e(x,{"content-position":"left"},{default:o(()=>[...l[7]||(l[7]=[u("下发日志",-1)])]),_:1}),e(b,{inline:""},{default:o(()=>[e(s,{label:"工单号"},{default:o(()=>[e(p,{modelValue:r.orderNo,"onUpdate:modelValue":l[4]||(l[4]=t=>r.orderNo=t),clearable:"",style:{width:"160px"}},null,8,["modelValue"])]),_:1}),e(s,{label:"状态"},{default:o(()=>[e(p,{modelValue:r.status,"onUpdate:modelValue":l[5]||(l[5]=t=>r.status=t),style:{width:"120px"}},null,8,["modelValue"])]),_:1}),e(s,null,{default:o(()=>[e(_,{onClick:i},{default:o(()=>[...l[8]||(l[8]=[u("刷新",-1)])]),_:1})]),_:1})]),_:1}),e(C,{data:m.value,border:"",size:"small"},{default:o(()=>[e(a,{prop:"id",label:"ID",width:"60"}),e(a,{prop:"orderNo",label:"工单号","min-width":"130"}),e(a,{prop:"sn",label:"SN","min-width":"130"}),e(a,{prop:"stationNo",label:"工位",width:"70"}),e(a,{prop:"processCombination",label:"工序组合",width:"100"}),e(a,{prop:"processCodes",label:"工序码",width:"120"}),e(a,{prop:"status",label:"状态",width:"90"}),e(a,{prop:"ack",label:"完成",width:"70"},{default:o(({row:t})=>[u(h(t.ack?"是":"否"),1)]),_:1}),e(a,{prop:"sendTime",label:"下发时间",width:"170"}),e(a,{prop:"doneTime",label:"完成时间",width:"170"}),e(a,{prop:"operator",label:"操作人",width:"90"})]),_:1},8,["data"])]),_:1})}}};export{B as default};
|
||||
Reference in New Issue
Block a user