Files
qhmes/web-dist/js/MesXslMixingSpec.data-IK1nvCh3.js
2026-06-16 18:19:57 +08:00

3 lines
25 KiB
Java

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/MesXslMixerMaterialKindCfg.api-B4wNarNn.js","js/index-X7Y8jykP.js","js/emoji-mart-vue-fast-R0uJEDq-.js","js/vue-vendor-DNhG1Cve.js","assets/index-GuhSw_Yp.css"])))=>i.map(i=>d[i]);
var me=Object.defineProperty,de=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var B=(e,t,n)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))ge.call(t,n)&&B(e,n,t[n]);if(j)for(var n of j(t))fe.call(t,n)&&B(e,n,t[n]);return e},_=(e,t)=>de(e,pe(t));var N=(e,t,n)=>new Promise((i,a)=>{var r=c=>{try{l(n.next(c))}catch(g){a(g)}},o=c=>{try{l(n.throw(c))}catch(g){a(g)}},l=c=>c.done?i(c.value):Promise.resolve(c.value).then(r,o);l((n=n.apply(e,t)).next())});import{a_ as Z,_ as he}from"./index-X7Y8jykP.js";import{J as s}from"./JVxeTypes-C-gX5UoZ.js";import{buildUUID as k}from"./uuid-CODpppBC.js";const m=Z(),R="mes_xsl_mixing_spec_material_hidden_columns",E="mes_xsl_mixing_spec_material_column_widths_v2",ee=60,h=40,Me=["materialMajor","materialMinor"],F=["mixerMaterialName"],je=[{title:"规格",align:"center",dataIndex:"specName",width:160,fixed:"left"},{title:"用途",align:"center",dataIndex:"purpose",width:180},{title:"机台",align:"center",dataIndex:"machineName",width:120},{title:"制作日期",align:"center",dataIndex:"makeDate",width:120},{title:"发行编号",align:"center",dataIndex:"issueNumber",width:150},{title:"状态",align:"center",dataIndex:"status_dictText",width:120},{title:"段数",align:"center",dataIndex:"stageCount",width:88},{title:"纯混炼时间(秒)",align:"center",dataIndex:"pureMixSec",width:130},{title:"变更日期",align:"center",dataIndex:"changeDate",width:120},{title:"修改时间",align:"center",dataIndex:"updateTime",width:165}],Be=[{label:"关键字",field:"keyword",component:"Input",colProps:{span:8},componentProps:{placeholder:"规格/用途/发行编号/机台"}},{label:"状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_formula_spec_status",placeholder:"请选择状态"},colProps:{span:8}},{label:"制作日期起",field:"makeDate_begin",component:"DatePicker",colProps:{span:8},componentProps:{valueFormat:"YYYY-MM-DD"}},{label:"制作日期止",field:"makeDate_end",component:"DatePicker",colProps:{span:8},componentProps:{valueFormat:"YYYY-MM-DD"}}],ze=[{label:"",field:"id",component:"Input",show:!1},{label:"",field:"machineId",component:"Input",show:!1},{label:"规格",field:"specName",component:"Input",required:!0,colProps:{span:8}},{label:"用途",field:"purpose",component:"Input",required:!0,colProps:{span:8}},{label:"机台",field:"machineName",component:"Input",colProps:{span:8}},{label:"制作日期",field:"makeDate",component:"DatePicker",colProps:{span:8},componentProps:{valueFormat:"YYYY-MM-DD"}},{label:"发行编号",field:"issueNumber",component:"Input",required:!0,colProps:{span:8},componentProps:{placeholder:"请点击选择密炼PS"},rules:[{required:!0,message:"请选择发行编号"}]},{label:"换算系数",field:"convertFactor",component:"InputNumber",colProps:{span:8},componentProps:{precision:2,style:{width:"100%"}}},{label:"填充体积",field:"fillVolume",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"回收炭黑(秒)",field:"recycleCarbonSec",component:"InputNumber",colProps:{span:8},componentProps:{precision:0,style:{width:"100%"}}},{label:"母胶比重",field:"motherRubberSg",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"终炼胶比重",field:"finalRubberSg",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"适用工厂",field:"applyFactory",component:"Input",colProps:{span:8}},{label:"段数",field:"stageCount",component:"Input",colProps:{span:8},componentProps:{placeholder:"如 2/3"}},{label:"纯混炼时间(秒)",field:"pureMixSec",component:"InputNumber",colProps:{span:8},componentProps:{precision:0,style:{width:"100%"}}},{label:"回收炭黑(KG)",field:"recycleCarbonKg",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"自动小料打印设定",field:"autoSmallPrintSetting",component:"Input",colProps:{span:8}},{label:"设定车数",field:"setTrainCount",component:"InputNumber",colProps:{span:8},componentProps:{precision:0,style:{width:"100%"}}},{label:"侧壁水温",field:"sideWallWaterTemp",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"超时排胶时间",field:"overtimeDischargeSec",component:"InputNumber",colProps:{span:8},componentProps:{precision:0,style:{width:"100%"}}},{label:"超温排胶时间",field:"overtempDischargeSec",component:"InputNumber",colProps:{span:8},componentProps:{precision:0,style:{width:"100%"}}},{label:"超温排胶温度",field:"overtempDischargeTemp",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"卸料门水温",field:"doorWaterTemp",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"转子水温",field:"rotorWaterTemp",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"最高进料温度",field:"maxFeedTemp",component:"InputNumber",colProps:{span:8},componentProps:{precision:6,style:{width:"100%"}}},{label:"起草人",field:"draftBy",component:"Input",colProps:{span:8}},{label:"起草时间",field:"draftTime",component:"DatePicker",colProps:{span:8},componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}},{label:"校对人",field:"proofreadBy",component:"Input",colProps:{span:8}},{label:"校对时间",field:"proofreadTime",component:"DatePicker",colProps:{span:8},componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}},{label:"审核人",field:"auditBy",component:"Input",colProps:{span:8}},{label:"审核时间",field:"auditTime",component:"DatePicker",colProps:{span:8},componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}},{label:"批准人",field:"approveBy",component:"Input",colProps:{span:8}},{label:"批准时间",field:"approveTime",component:"DatePicker",colProps:{span:8},componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}},{label:"变更日期",field:"changeDate",component:"DatePicker",colProps:{span:8},componentProps:{valueFormat:"YYYY-MM-DD"}}],G=[{title:"密炼物料ID",key:"mixerMaterialId",type:s.hidden},{title:"物料大类",key:"materialMajor",type:s.input,width:100,minWidth:h},{title:"种类",key:"materialKind",type:s.input,width:100,minWidth:h,disabled:!0},{title:"物料小类",key:"materialMinor",type:s.input,width:120,minWidth:h},{title:"密炼物料名称",key:"mixerMaterialName",type:s.slot,slotName:"mixerMaterialNameSlot",width:160,minWidth:h},{title:"密炼物料描述",key:"mixerMaterialDesc",type:s.input,width:220,minWidth:h},{title:"单重",key:"unitWeight",type:s.inputNumber,width:72,minWidth:h,align:"center"},{title:"累计",key:"accumWeight",type:s.inputNumber,width:72,minWidth:h,align:"center",disabled:!0},{title:"顺序",key:"seqNo",type:s.inputNumber,width:64,minWidth:h,align:"center"}];function be(){return G.map(e=>({key:String(e.key),title:String(e.title),locked:F.includes(String(e.key))}))}function qe(){const e=m.get(R),t=new Set(be().map(i=>i.key));if(!Array.isArray(e))return Me.filter(i=>t.has(i));let n=e.filter(i=>typeof i=="string"&&!F.includes(i)&&t.has(i));return n.includes("materialKind")&&!n.includes("materialMinor")&&(n=n.filter(i=>i!=="materialKind"),n.push("materialMinor")),n}function Je(e){const t=e.filter(n=>!F.includes(n));if(t.length){m.set(R,t);return}m.remove(R)}function $e(e,t){if(!(t!=null&&t.length))return e;const n=new Set(t);return e.filter(i=>!i.key||!n.has(String(i.key)))}function Qe(){const e=m.get(E),t=new Set(G.map(i=>String(i.key)));if(!e||typeof e!="object")return{};const n={};return Object.entries(e).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),n}function Ze(e){const t=new Set(G.map(i=>String(i.key))),n={};if(Object.entries(e||{}).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),Object.keys(n).length){m.set(E,n);return}m.remove(E)}function et(e,t){return e.map(n=>{const i=t[String(n.key)],a=_(f({},n),{minWidth:h});return i&&(a.width=i),a})}function tt(e,t={}){const n=e.reduce((i,a)=>{var l,c;const r=String(a.key),o=(c=(l=t[r])!=null?l:Number(a.width))!=null?c:80;return i+o},0);return ee+n+1}function b(e){return e?!!(e.mixerMaterialId||e.mixerMaterialName||e.materialKind||e.unitWeight!=null&&e.unitWeight!==""):!1}function z(e){const t=e==null?void 0:e.materialKind;return t!=null&&String(t).trim()!==""?String(t).trim():""}function nt(e=[]){if(!(e!=null&&e.length))return e;let t=0;for(;t<e.length;){const n=e[t];if(!b(n)){n.accumWeight=null,t++;continue}const i=z(n);let a=t,r=0;for(;a<e.length;){const o=e[a];if(!b(o)||z(o)!==i)break;const l=u(o.unitWeight);l!=null&&(r+=l),a++}for(let o=t;o<a;o++)e[o].accumWeight=o===a-1&&r!==0?M(r):null;t=a}return e}function u(e){if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}const O=6,te=2,ne=6;function it(e){if(e==null||e==="")return"";const t=Number(e);return Number.isNaN(t)?String(e):t.toFixed(te)}function at(e){if(e===""||e==null)return null;const t=Number(String(e).replace(/,/g,"").trim());return Number.isNaN(t)?null:Number(t.toFixed(te))}function rt(e,t=ne){if(e==null||e==="")return"";const n=Number(e);if(Number.isNaN(n))return String(e);const i=Number(n.toFixed(t));return Number.isInteger(i),String(i)}function ot(e){if(e===""||e==null)return null;const t=String(e).replace(/,/g,"").trim();if(!t)return null;const n=Number(t);return Number.isNaN(n)?null:Number(n.toFixed(ne))}function M(e){return Number(e.toFixed(O))}function _e(e){const t=u(e);return t==null?"":String(M(t))}function T(e){const t=u(e);return t==null||t<=0?1:t}function Ie(e,t){const n=u(e);return n==null?null:Number((n*T(t)).toFixed(O))}function xe(e,t){if(!e)return;const n=u(e.unitWeight);if(n==null){e.baseUnitWeight=null;return}e.baseUnitWeight=Number((n/T(t)).toFixed(O))}function Ne(e,t,n=!1){if(!b(e)){e.baseUnitWeight=null;return}!n&&u(e.baseUnitWeight)!=null||xe(e,t)}function lt(e=[],t,n=!1){for(const i of e)Ne(i,t,n);return e}function st(e=[],t,n){const i=T(t),a=n!=null?T(n):i;for(const r of e){if(!b(r))continue;let o=u(r.baseUnitWeight);if(o==null){const l=u(r.unitWeight);if(l==null)continue;o=M(l/a),r.baseUnitWeight=o}r.unitWeight=Ie(o,i)}return e}function ye(e){if(e==null||e==="")return null;const t=String(e).trim();if(!t)return null;const n=u(t);if(n!=null&&n>0)return n;const i=t.match(/([0-9]+(?:\.[0-9]+)?)/);if(!i)return null;const a=Number(i[1]);return Number.isFinite(a)&&a>0?a:null}function ct(e={}){const t=u(e.motherRubberSg),n=u(e.finalRubberSg),a=String(e.stageCount||"").trim().match(/^(\d+)\/(\d+)$/);return(a?a[1]===a[2]:!1)&&n!=null&&n>0?n:t!=null&&t>0?t:n!=null&&n>0?n:null}function ut(e,t,n){const i=u(e),a=u(t),r=ye(n);if(i==null||i<=0||a==null||a<=0||r==null||r<=0)return null;const o=i/a;return Number((o/r*100).toFixed(6))}function Te(e=[]){let t=0,n=!1;for(const i of e){if(!b(i))continue;const a=u(i.unitWeight);a!=null&&(t+=a,n=!0)}return n?M(t):null}function mt(e=[]){return Te(e)}function dt(e,t,n){const i=e.findIndex(r=>String(r.key)==="unitWeight"),a=r=>_e(r);return e.map((r,o)=>{var X,V;const l=String(r.key),c=(V=(X=t[l])!=null?X:Number(r.width))!=null?V:80;if(l==="unitWeight")return{key:l,width:c,text:a(n.unitWeight),align:"center",isTotal:!0};if(l==="accumWeight")return{key:l,width:c,text:a(n.accumWeight),align:"center",isTotal:!0};const g=i>0&&o===i-1;return{key:l,width:c,text:g?"合计":"",align:"center",isLabel:g}})}const d=48,v=[{title:"动作",key:"actionName",type:s.slot,slotName:"actionNameSlot",width:120,minWidth:d},{title:'时间(")',key:"actionSec",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"保护时间",key:"protectSec",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"温度()",key:"tempC",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"功率(Kw)",key:"powerKw",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"能量(Kwh)",key:"energyKwh",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"组合",key:"comboMode",type:s.slot,slotName:"comboModeSlot",width:72,minWidth:d,align:"center"},{title:"转速(rpm)",key:"speedRpm",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"压力(Mpa)",key:"pressureMpa",type:s.inputNumber,width:80,minWidth:d,align:"center"},{title:"(%)",key:"boltPercent",type:s.inputNumber,width:72,minWidth:d,align:"center"}],D="mes_xsl_mixing_spec_step_column_widths_v1";function pt(){const e=m.get(D),t=new Set(v.map(i=>String(i.key)));if(!e||typeof e!="object")return{};const n={};return Object.entries(e).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),n}function gt(e){const t=new Set(v.map(i=>String(i.key))),n={};if(Object.entries(e||{}).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),Object.keys(n).length){m.set(D,n);return}m.remove(D)}function ft(e,t){return e.map(n=>{const i=t[String(n.key)],a=_(f({},n),{minWidth:d});return i&&(a.width=i),a})}[...v];const A="mes_xsl_mixing_spec_tcu_column_widths_v3",p=48,S="0";function ie(e){return e===1||e==="1"||e===!0}function q(e){(e.isAttach==null||e.isAttach==="")&&(e.isAttach=S),ie(e.isAttach)||(e.attachWeight=void 0)}const K=[{title:"区分",key:"sectionType",type:s.select,dictCode:"xslmes_mixing_tcu_section",disabled:!0,width:96,minWidth:p,align:"center"},{title:"前转子温度",key:"frontRotorTemp",type:s.inputNumber,width:76,minWidth:p,align:"center"},{title:"后转子温度",key:"rearRotorTemp",type:s.inputNumber,width:76,minWidth:p,align:"center"},{title:"前混炼室温度",key:"frontChamberTemp",type:s.inputNumber,width:76,minWidth:p,align:"center"},{title:"后混炼室温度",key:"rearChamberTemp",type:s.inputNumber,width:76,minWidth:p,align:"center"},{title:"上下顶栓温度",key:"topPlugTemp",type:s.inputNumber,width:76,minWidth:p,align:"center"},{title:"药品称量位置",key:"drugWeighPos",type:s.select,dictCode:"xslmes_mixing_drug_weigh_pos",width:76,minWidth:p,align:"center"},{title:"是否附加",key:"isAttach",type:s.select,dictCode:"yn",defaultValue:S,width:76,minWidth:p,align:"center"},{title:"重量",key:"attachWeight",type:s.inputNumber,width:76,minWidth:p,align:"center",props:{isDisabledCell:({row:e})=>!ie(e==null?void 0:e.isAttach)}}];function ht(){const e=m.get(A),t=new Set(K.map(i=>String(i.key)));if(!e||typeof e!="object")return{};const n={};return Object.entries(e).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),n}function Mt(e){const t=new Set(K.map(i=>String(i.key))),n={};if(Object.entries(e||{}).forEach(([i,a])=>{t.has(i)&&typeof a=="number"&&a>0&&(n[i]=a)}),Object.keys(n).length){m.set(A,n);return}m.remove(A)}function bt(e,t){return e.map(n=>{const i=t[String(n.key)],a=_(f({},n),{minWidth:p});return i&&(a.width=i),a})}function _t(e=K,t={}){const n=e.reduce((i,a)=>{var l,c,g;const r=String(a.key),o=(g=(c=(l=t[r])!=null?l:Number(a.width))!=null?c:Number(a.minWidth))!=null?g:80;return i+o},0);return ee+n+1}const Se=2,Ce=48,We=20,we=30,Pe=17,Re=15,ae=4,P=36,x=32,It=x+1,L="mes_xsl_mixing_spec_table_height_prefs_v1",Ee=24,De=56,U={material:{key:"material",label:"橡胶及配合剂",defaultRowHeight:x,defaultVisibleRowCount:Pe,minVisibleRowCount:5,maxVisibleRowCount:30,headerHeight:P,extraPadding:4},tcu:{key:"tcu",label:"TCU温度条件",defaultRowHeight:x,defaultVisibleRowCount:Se,minVisibleRowCount:2,maxVisibleRowCount:6,headerHeight:Ce,extraPadding:2},step:{key:"step",label:"混合步骤",defaultRowHeight:x,defaultVisibleRowCount:Re,minVisibleRowCount:5,maxVisibleRowCount:40,headerHeight:P,extraPadding:4},downStep:{key:"downStep",label:"下密炼机混炼条件",defaultRowHeight:x,defaultVisibleRowCount:ae,minVisibleRowCount:2,maxVisibleRowCount:12,headerHeight:P,extraPadding:12}};function J(e,t,n,i){const a=Number(e);return Number.isNaN(a)?i:Math.min(n,Math.max(t,Math.round(a)))}function Ae(e){const t=U[e];return{rowHeight:t.defaultRowHeight,visibleRowCount:t.defaultVisibleRowCount}}function Y(e,t){const n=U[e],i=Ae(e);return{rowHeight:J(t==null?void 0:t.rowHeight,Ee,De,i.rowHeight),visibleRowCount:J(t==null?void 0:t.visibleRowCount,n.minVisibleRowCount,n.maxVisibleRowCount,i.visibleRowCount)}}function xt(e){const t=m.get(L),n=t&&typeof t=="object"?t[e]:null;return Y(e,n)}function Nt(e,t){const n=m.get(L),i=n&&typeof n=="object"?f({},n):{};i[e]=Y(e,t),m.set(L,i)}function yt(e,t){const n=U[e],i=Y(e,t);return n.headerHeight+i.visibleRowCount*i.rowHeight+n.extraPadding}function Tt(e){return{isHover:!0,height:e.rowHeight}}function w(e){return Array.from({length:e},()=>({id:k()}))}function St(e=We){return w(e)}function Ct(e=we){return w(e)}function Wt(e=ae){return w(e)}const $="drug_scale";function wt(e=[]){const t=e.find(i=>i.sectionType==="up_mixer")||{sectionType:"up_mixer",drugWeighPos:$,isAttach:S};t.sectionType==="up_mixer"&&!t.drugWeighPos&&(t.drugWeighPos=$);const n=e.find(i=>i.sectionType==="down_mixer")||{sectionType:"down_mixer",drugWeighPos:void 0,isAttach:S};return q(t),q(n),[t,n]}function re(e=[]){return(e||[]).map(t=>_(f({},t),{id:(t==null?void 0:t.id)||k()}))}function Pt(e=[],t){const n=re(e);return n.length>=t?n:[...n,...w(t-n.length)]}const oe="mes_xsl_mixing_spec_material_picker_hidden_categories",le=Z();function Rt(){const e=le.get(oe);return Array.isArray(e)?e.map(String):[]}function Et(e){le.set(oe,e||[])}function Dt(e,t){const n=new Set((e||[]).map(String)),i=(t||[]).map(String).filter(a=>n.has(a));return n.size>0&&i.length>=n.size?[]:i}const Le={byRefId:{},byRefCode:{},byRefName:{},rubberKindName:"胶料"};let y=null,I=null;function At(e=!1){return N(this,null,function*(){return!e&&y?y:(!e&&I||(I=N(null,null,function*(){try{const{loadKindLookup:t}=yield he(()=>N(null,null,function*(){const{loadKindLookup:a}=yield import("./MesXslMixerMaterialKindCfg.api-B4wNarNn.js");return{loadKindLookup:a}}),__vite__mapDeps([0,1,2,3,4])),n=yield t(),i={byRefId:(n==null?void 0:n.byRefId)||{},byRefCode:(n==null?void 0:n.byRefCode)||{},byRefName:(n==null?void 0:n.byRefName)||{},rubberKindName:(n==null?void 0:n.rubberKindName)||"胶料"};return y=i,i}catch(t){return Le}finally{I=null}})),I)})}function Lt(){y=null,I=null}function H(e,t){var a,r,o;if(!e||t==null||String(t).trim()==="")return"";const n=String(t).trim();if((a=e.byRefId)!=null&&a[n])return e.byRefId[n];if((r=e.byRefCode)!=null&&r[n])return e.byRefCode[n];const i=n.toLowerCase();if((o=e.byRefCode)!=null&&o[i])return e.byRefCode[i];for(const[l,c]of Object.entries(e.byRefCode||{}))if(l&&n.includes(l))return c;return""}function se(e,t,n,i){var o;const a=H(e,t);if(a)return a;const r=H(e,n);if(r)return r;if(i!=null&&String(i).trim()!==""){const l=String(i).trim();if((o=e==null?void 0:e.byRefName)!=null&&o[l])return e.byRefName[l]}return""}function Ht(e,t,n,i,a){let r=se(e,t,n,i);return!r&&a&&(r=H(e,a)),!r&&(e!=null&&e.rubberKindName)&&(r=e.rubberKindName),r}function kt(e,t,n,i){return se(e,t,n,i)}const Ft="xslmes_formula_spec_weigh_mode",Gt=[{title:"物料编码",align:"center",width:120,dataIndex:"materialCode"},{title:"物料名称",align:"center",width:160,dataIndex:"materialName"},{title:"自动/人工称量",align:"center",width:132,dataIndex:"pickerWeighMode"},{title:"种类",align:"center",width:100,dataIndex:"pickerMaterialKind"},{title:"物料大类",align:"center",width:120,dataIndex:"majorCategoryId_dictText"},{title:"物料小类",align:"center",width:120,dataIndex:"minorCategoryId_dictText"},{title:"物料描述",align:"center",width:180,ellipsis:!0,dataIndex:"materialDesc"}];function Ot(e,t,n){!e||!t||(e.mixerMaterialId=t.id||t.mixerMaterialId||"",e.mixerMaterialName=t.materialName||t.materialCode||"",e.mixerMaterialDesc=t.materialDesc||t.materialName||t.materialCode||"",e.materialMajor=t.majorCategoryId_dictText||"",e.materialMinor=t.minorCategoryId_dictText||"",e.materialKind=n!=null&&String(n).trim()!==""?String(n).trim():"")}const vt=[{title:"胶料编码",align:"center",width:140,dataIndex:"materialCode"},{title:"胶料名称",align:"center",width:180,dataIndex:"materialName"},{title:"自动/人工称量",align:"center",width:132,dataIndex:"pickerWeighMode"},{title:"种类",align:"center",width:100,dataIndex:"pickerMaterialKind"},{title:"胶料类别",align:"center",width:140,dataIndex:"categoryId_dictText"},{title:"胶料别名",align:"center",width:140,dataIndex:"aliasName"}];function Kt(e,t,n){!e||!t||(e.mixerMaterialId=t.id||"",e.mixerMaterialName=t.materialName||t.materialCode||"",e.mixerMaterialDesc=t.materialName||t.materialCode||"",e.materialMajor="",e.materialMinor=t.categoryId_dictText||"",e.materialKind=n!=null&&String(n).trim()!==""?String(n).trim():"")}const ce=["sortNo","actionName","actionSec","protectSec","tempC","powerKw","energyKwh","comboMode","speedRpm","pressureMpa","boltPercent"];function He(e={}){return ce.some(t=>{const n=e[t];return n!=null&&n!==""})}function Ut(e=[]){return(e||[]).filter(t=>He(t)).map((t,n)=>{const i={id:k()};return ce.forEach(a=>{const r=t[a];r!=null&&r!==""&&(i[a]=r)}),i.sortNo==null&&(i.sortNo=n+1),i})}function ke(e={}){return Number(e.delFlag)===1?"作废":e.approveTime?"审批通过":e.auditTime?"审核通过":e.proofreadTime?"校对通过":"编制中"}function Yt(e={}){return!(e!=null&&e.status)||e.status==="compile"}const Xt=[{title:"示方编号",align:"center",dataIndex:"specName",width:160},{title:"机台",align:"center",dataIndex:"machineName",width:100},{title:"发行编号",align:"center",dataIndex:"issueNumber",width:150},{title:"发行日期",align:"center",dataIndex:"makeDate",width:120},{title:"配方状态",align:"center",dataIndex:"formulaStatus",width:100,customRender:({record:e})=>ke(e)}],Fe=["id","createBy","createTime","updateBy","updateTime","draftBy","draftTime","proofreadBy","proofreadTime","auditBy","auditTime","approveBy","approveTime","changeDate","status","delFlag","tenantId","sysOrgCode"],Ge=["id","mixingSpecId","createBy","createTime","updateBy","updateTime","tenantId"];function Vt(e={}){const t=f({},e);Fe.forEach(i=>delete t[i]),t.id="";const n=(i=[])=>re((i||[]).map(a=>{const r=f({},a);return Ge.forEach(o=>delete r[o]),delete r.baseUnitWeight,r}));return _(f({},t),{materialList:n(e.materialList),stepList:n(e.stepList),downStepList:n(e.downStepList),tcuList:n(e.tcuList)})}const C=.01;function W(e,t){const n=t==="manual"?"manualSmallWeighLowerTol":"autoSmallWeighLowerTol",i=t==="manual"?"manualSmallWeighUpperTol":"autoSmallWeighUpperTol",a=u(e==null?void 0:e[n]),r=u(e==null?void 0:e[i]);return{lower:a!=null&&a>=0?a:C,upper:r!=null&&r>=0?r:C}}function jt(e={}){const t=W(e,"manual"),n=W(e,"auto");return{id:e.id||"",specName:e.specName||"",manualSmallWeighLowerTol:t.lower,manualSmallWeighUpperTol:t.upper,autoSmallWeighLowerTol:n.lower,autoSmallWeighUpperTol:n.upper}}function Oe(e){if(!b(e))return!1;const t=String(e.materialKind||"").trim(),n=String(e.materialMinor||"").trim();return!!(t.includes("人工")||n.includes("人工"))}function ve(e){if(!b(e))return!1;const t=String(e.materialKind||"").trim(),n=String(e.materialMinor||"").trim();return!!(t.includes("自动")||n.includes("自动"))}function Ke(e){const t=u(e);return`自动1-${t!=null&&t>0?Math.round(t):1}`}function Bt(e=[],t){const n=(e||[]).filter(ve);if(!n.length)return[];const i=new Map,a=[];for(const r of n){const o=Ke(r.seqNo);i.has(o)||(i.set(o,[]),a.push(o)),i.get(o).push(r)}return a.sort((r,o)=>Q(r)-Q(o)),a.map(r=>({groupKey:r,groupLabel:r,rows:ue(i.get(r)||[],W(t,"auto"))}))}function Q(e){const t=e.match(/-(\d+)$/);if(!t)return 1;const n=Number(t[1]);return Number.isFinite(n)?n:1}function zt(e=[],t){return ue((e||[]).filter(Oe),W(t,"manual"))}function ue(e=[],t={lower:C,upper:C}){let n=0,i=!1;return(e||[]).map(a=>{const r=u(a.unitWeight),o=r!=null?M(r-t.lower):null,l=r!=null?M(r+t.upper):null;return r!=null&&(n+=r,i=!0),{materialCode:String(a.mixerMaterialName||a.mixerMaterialDesc||a.materialKind||"").trim(),standardWeight:r,lowerLimit:o,upperLimit:l,accumWeight:r!=null&&i?M(n):null}})}function qt(e){return e==="manual"?"混炼母胶药品计量(人工)":"混炼母胶药品计量(自动)"}export{Ct as $,xe as A,p as B,Mt as C,d as D,gt as E,ie as F,S as G,st as H,T as I,nt as J,mt as K,wt as L,C as M,et as N,$e as O,G as P,tt as Q,yt as R,It as S,dt as T,Tt as U,bt as V,K as W,_t as X,ft as Y,v as Z,St as _,je as a,Wt as a0,Pt as a1,lt as a2,Vt as a3,Ot as a4,Ut as a5,we as a6,We as a7,ae as a8,be as a9,F as aa,Je as ab,De as ac,Ee as ad,Ae as ae,Y as af,Nt as ag,U as ah,Rt as ai,Gt as aj,Ft as ak,vt as al,Dt as am,Ht as an,kt as ao,Kt as ap,Et as aq,Le as ar,Xt as as,qt as b,Lt as c,zt as d,jt as e,qe as f,Bt as g,Qe as h,Yt as i,xt as j,ht as k,At as l,pt as m,ze as n,ee as o,h as p,Ze as q,se as r,Be as s,Te as t,ct as u,ut as v,it as w,at as x,rt as y,ot as z};