Files
bj_power/bj_power_mes/public_bak_1790669431/assets/ProcessCard-Dz1htOVs.js
T
SunYF 58f67240d7 feat: 新增拧紧待签任务集中签字功能
新增了巡检终端的拧紧待签任务聚合查询和批量审核签字接口,支持检验员对拧紧任务进行第二签;在权限系统中新增对应按钮权限,前端页面新增指标选择下拉和绩效报表的上机记录页签,同时完善相关帮助文档和配置项。
2026-09-29 17:37:45 +08:00

2 lines
8.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 A,j as L,h as F,c as i,d as _,a as e,w as t,p as c,k as R,F as g,i as f,r,o as n,n as P,f as p,t as s,q as S,E as $}from"./index-BEbw5UwJ.js";import{o as J}from"./print-ngbOsZyB.js";import{r as K,P as O}from"./help-C_mtZRv4.js";const W={class:"hd"},X={class:"sub"},Y={key:0},Z={key:1,class:"off"},ee={key:1},le={key:0},te={key:1,class:"off"},ae={key:0},oe={key:1,class:"off"},ne={class:"blk-t"},se={key:1},de={key:0,class:"ok"},ie={key:1},re={class:"blk-t"},pe={__name:"ProcessCard",setup(ue){const v=f([]),b=f(null),m=f(""),o=f(null),T=f("stations"),k=f(!1);function B(q){const d=v.value.find(C=>C.id===q);d&&(m.value=d.code||"")}async function E(){if(!b.value&&!m.value){$.warning("请选择产品型号或填写产品编号");return}k.value=!0;try{o.value=await F.get("/process-card/model",{params:{productTypeId:b.value||0,productCode:m.value,format:"json"}})}catch{o.value=null}finally{k.value=!1}}function D(){J("/process-card/model",{productTypeId:b.value||0,productCode:m.value})}return L(async()=>{try{v.value=await F.get("/product-types")||[]}catch{v.value=[]}}),(q,d)=>{const C=r("el-alert"),G=r("el-option"),M=r("el-select"),N=r("el-form-item"),U=r("el-input"),I=r("el-button"),j=r("el-form"),V=r("el-card"),u=r("el-descriptions-item"),H=r("el-descriptions"),a=r("el-table-column"),z=r("el-tag"),h=r("el-table"),w=r("el-tab-pane"),y=r("el-empty"),Q=r("el-tabs");return n(),i(g,null,[_("div",null,[e(V,null,{default:t(()=>[e(C,{type:"info",closable:!1,style:{"margin-bottom":"12px"},title:"产品型号全景流程卡:按产品型号全方位展示制造全流程——工艺组合 → 每工位工艺与步骤(采集方式 / 检测点 / 拧紧 / 考核标准 / 工艺图纸)→ 物料清单(含单台用量、损耗、需求总量)→ 检验卡项 → 各环节时间。可打印或另存为 PDF。"}),e(j,{inline:""},{default:t(()=>[e(N,{label:"产品型号"},{default:t(()=>[e(M,{modelValue:b.value,"onUpdate:modelValue":d[0]||(d[0]=l=>b.value=l),filterable:"",clearable:"",placeholder:"请选择产品型号",style:{width:"260px"},onChange:B},{default:t(()=>[(n(!0),i(g,null,P(v.value,l=>(n(),c(G,{key:l.id,label:l.name+(l.code?" / "+l.code:""),value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(N,{label:"产品编号"},{default:t(()=>[e(U,{modelValue:m.value,"onUpdate:modelValue":d[1]||(d[1]=l=>m.value=l),placeholder:"也可直接按产品编号生成",clearable:"",style:{width:"220px"}},null,8,["modelValue"])]),_:1}),e(N,null,{default:t(()=>[e(I,{type:"primary",loading:k.value,onClick:E},{default:t(()=>[...d[3]||(d[3]=[p("生成全景流程卡",-1)])]),_:1},8,["loading"]),e(I,{disabled:!o.value,onClick:D},{default:t(()=>[...d[4]||(d[4]=[p("打印 / 导出 PDF",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1}),o.value?(n(),c(V,{key:0,style:{"margin-top":"12px"}},{header:t(()=>[_("div",W,[d[5]||(d[5]=_("span",{class:"t"},"产品型号全景流程卡",-1)),_("span",X,s(o.value.productName)+"("+s(o.value.productCode)+")",1)])]),default:t(()=>[e(H,{column:4,border:"",size:"small",style:{"margin-bottom":"14px"}},{default:t(()=>[e(u,{label:"产品名称"},{default:t(()=>[p(s(o.value.productName||"-"),1)]),_:1}),e(u,{label:"产品编号"},{default:t(()=>[p(s(o.value.productCode||"-"),1)]),_:1}),e(u,{label:"产品分类"},{default:t(()=>[p(s(o.value.category||"-"),1)]),_:1}),e(u,{label:"工位数"},{default:t(()=>[p(s(o.value.stationCount),1)]),_:1}),e(u,{label:"工位组合",span:2},{default:t(()=>[p(s(o.value.processSeq||"-"),1)]),_:1}),e(u,{label:"组合来源",span:2},{default:t(()=>[p(s(o.value.seqSource),1)]),_:1}),e(u,{label:"参考工单"},{default:t(()=>[p(s(o.value.orderNo||"-"),1)]),_:1}),e(u,{label:"计划开始"},{default:t(()=>[p(s(o.value.planStart||"-"),1)]),_:1}),e(u,{label:"计划结束"},{default:t(()=>[p(s(o.value.planEnd||"-"),1)]),_:1}),e(u,{label:"生成时间"},{default:t(()=>[p(s(o.value.generatedAt),1)]),_:1})]),_:1}),e(Q,{modelValue:T.value,"onUpdate:modelValue":d[2]||(d[2]=l=>T.value=l)},{default:t(()=>[e(w,{label:"工位流程总览",name:"stations"},{default:t(()=>[e(h,{data:o.value.stations,border:"",size:"small"},{default:t(()=>[e(a,{prop:"stationNo",label:"工位号",width:"80",align:"center"}),e(a,{prop:"stationName",label:"工位名称","min-width":"130","show-overflow-tooltip":""}),e(a,{label:"工艺","min-width":"180","show-overflow-tooltip":""},{default:t(({row:l})=>[l.flowName?(n(),i("span",Y,s(l.flowName),1)):(n(),i("span",Z,"未绑定流程"))]),_:1}),e(a,{prop:"flowStatus",label:"流程状态",width:"90",align:"center"}),e(a,{prop:"stepCount",label:"步骤数",width:"80",align:"center"}),e(a,{label:"检验点",width:"80",align:"center"},{default:t(({row:l})=>[l.checkCount?(n(),c(z,{key:0,type:"warning",size:"small"},{default:t(()=>[p(s(l.checkCount),1)]),_:2},1024)):(n(),i("span",ee,"0"))]),_:1}),e(a,{prop:"torqueCount",label:"拧紧步骤",width:"90",align:"center"}),e(a,{label:"工艺图纸","min-width":"150","show-overflow-tooltip":""},{default:t(({row:l})=>[l.pdfFile?(n(),i("span",le,s(l.pdfFile),1)):(n(),i("span",te,"-"))]),_:1}),e(a,{label:"作业时间(本型号实绩)","min-width":"190"},{default:t(({row:l})=>[l.refTime?(n(),i("span",ae,s(l.refTime),1)):(n(),i("span",oe,"暂无实绩"))]),_:1})]),_:1},8,["data"])]),_:1}),e(w,{label:"工艺与步骤",name:"steps"},{default:t(()=>[o.value.stations.some(l=>l.steps&&l.steps.length)?S("",!0):(n(),c(y,{key:0,description:"暂无工艺步骤"})),(n(!0),i(g,null,P(o.value.stations.filter(l=>l.steps&&l.steps.length),l=>(n(),i("div",{key:l.stationNo,class:"blk"},[_("div",ne,"工位"+s(l.stationNo)+" "+s(l.stationName)+" · "+s(l.flowName||"未绑定流程"),1),e(h,{data:l.steps,border:"",size:"small"},{default:t(()=>[e(a,{prop:"seq",label:"步骤号",width:"80",align:"center"}),e(a,{prop:"name",label:"步骤名称","min-width":"180","show-overflow-tooltip":""}),e(a,{prop:"collectType",label:"采集方式",width:"110",align:"center"}),e(a,{label:"检测确认",width:"100",align:"center"},{default:t(({row:x})=>[x.needCheck?(n(),c(z,{key:0,type:"warning",size:"small"},{default:t(()=>[...d[6]||(d[6]=[p("需检验",-1)])]),_:1})):(n(),i("span",se,"否"))]),_:1}),e(a,{label:"拧紧采集",width:"100",align:"center"},{default:t(({row:x})=>[x.isTorque?(n(),i("span",de,"是")):(n(),i("span",ie,"否"))]),_:1}),e(a,{prop:"criteria",label:"考核标准","min-width":"220","show-overflow-tooltip":""})]),_:1},8,["data"])]))),128))]),_:1}),e(w,{label:"物料清单",name:"bom"},{default:t(()=>[!o.value.bomGroups||!o.value.bomGroups.length?(n(),c(y,{key:0,description:"该产品型号暂无工艺物料清单"})):S("",!0),(n(!0),i(g,null,P(o.value.bomGroups,l=>(n(),i("div",{key:l.bomName,class:"blk"},[_("div",re,"工艺物料清单:"+s(l.bomName),1),e(h,{data:l.items,border:"",size:"small"},{default:t(()=>[e(a,{prop:"materialCode",label:"图号","min-width":"140","show-overflow-tooltip":""}),e(a,{prop:"materialName",label:"物料名称","min-width":"150","show-overflow-tooltip":""}),e(a,{prop:"spec",label:"规格","min-width":"120","show-overflow-tooltip":""}),e(a,{prop:"unit",label:"单位",width:"70",align:"center"}),e(a,{prop:"manageMode",label:"管理方式",width:"150",align:"center"}),e(a,{prop:"unitQty",label:"单台用量",width:"90",align:"center"}),e(a,{prop:"lossRate",label:"损耗率(%)",width:"100",align:"center"}),e(a,{prop:"requiredQty",label:"需求总量",width:"100",align:"center"})]),_:1},8,["data"])]))),128))]),_:1}),e(w,{label:`检验卡项(${(o.value.checkItems||[]).length})`,name:"checks"},{default:t(()=>[!o.value.checkItems||!o.value.checkItems.length?(n(),c(y,{key:0,description:"该产品型号暂无检验卡项(工艺未设置「需要检测确认」的步骤)"})):(n(),c(h,{key:1,data:o.value.checkItems,border:"",size:"small"},{default:t(()=>[e(a,{prop:"stationNo",label:"工位号",width:"90",align:"center"}),e(a,{prop:"stationName",label:"工位名称","min-width":"140","show-overflow-tooltip":""}),e(a,{prop:"stepName",label:"检验步骤","min-width":"180","show-overflow-tooltip":""}),e(a,{prop:"criteria",label:"判定标准","min-width":"240","show-overflow-tooltip":""})]),_:1},8,["data"]))]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1})):(n(),c(V,{key:1,style:{"margin-top":"12px"}},{default:t(()=>[e(y,{description:"请选择产品型号(或填写产品编号)后点击「生成全景流程卡」"})]),_:1}))]),e(O,{data:R(K),page:"ProcessCard"},null,8,["data"])],64)}}},fe=A(pe,[["__scopeId","data-v-c66b3dc7"]]);export{fe as default};