2 lines
7.3 KiB
Java
2 lines
7.3 KiB
Java
var D=Object.defineProperty;var T=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var M=(t,r,i)=>r in t?D(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,x=(t,r)=>{for(var i in r||(r={}))S.call(r,i)&&M(t,i,r[i]);if(T)for(var i of T(r))U.call(r,i)&&M(t,i,r[i]);return t};var b=(t,r,i)=>new Promise((w,n)=>{var d=l=>{try{u(i.next(l))}catch(h){n(h)}},p=l=>{try{u(i.throw(l))}catch(h){n(h)}},u=l=>l.done?w(l.value):Promise.resolve(l.value).then(d,p);u((i=i.apply(t,r)).next())});import{B as j}from"./index-BDvqZ5j4.js";import{B as J}from"./BasicForm-ClUSoD_-.js";import"./helper-DcLcf4v6.js";import{u as q}from"./useForm-D61zovon.js";import H from"./JDictSelectTag-DqzD0_k1.js";import{d as g,s as L,au as z}from"./index-X7Y8jykP.js";import{a as A}from"./useModal-DaJ3Bflg.js";import{e as E,y as V,A as v,B as $,c as G,u as a,z as Q,f as y,r as P}from"./vue-vendor-DNhG1Cve.js";const ce=[{title:"胶料名称",align:"center",dataIndex:"materialName",width:160},{title:"胶料别名",align:"center",dataIndex:"materialCode",width:130},{title:"R0进胶时间(秒)",align:"center",dataIndex:"r0FeedTime",width:120},{title:"R0成环时间(秒)",align:"center",dataIndex:"r0RingTime",width:120},{title:"R0拉断时间(秒)",align:"center",dataIndex:"r0BreakTime",width:120},{title:"R0排胶时间(秒)",align:"center",dataIndex:"r0DischargeTime",width:120},{title:"R1进胶时间(秒)",align:"center",dataIndex:"r1FeedTime",width:120},{title:"R1成环时间(秒)",align:"center",dataIndex:"r1RingTime",width:120},{title:"R1拉断时间(秒)",align:"center",dataIndex:"r1BreakTime",width:120},{title:"R1排胶时间(秒)",align:"center",dataIndex:"r1DischargeTime",width:120},{title:"创建人",align:"center",dataIndex:"createBy",width:100,defaultHidden:!0},{title:"创建时间",align:"center",dataIndex:"createTime",width:165},{title:"修改人",align:"center",dataIndex:"updateBy",width:100,defaultHidden:!0}],de=[{label:"胶料",field:"materialId",component:"JDictSelectTag",componentProps:{dictCode:"mes_material,material_name,id",placeholder:"请选择胶料"},colProps:{span:6}},{label:"胶料别名",field:"materialCode",component:"JInput",colProps:{span:6}},{label:"胶料名称",field:"materialName",component:"JInput",colProps:{span:6}}],W=[{label:"",field:"id",component:"Input",show:!1},{label:"胶料",field:"materialId",component:"Input",slot:"materialPicker",dynamicRules:()=>[{required:!0,message:"请选择胶料"}]},{label:"胶料名称",field:"materialName",component:"Input",componentProps:{disabled:!0,placeholder:"选择胶料后自动带出"}},{label:"胶料别名",field:"materialCode",component:"Input",componentProps:{disabled:!0,placeholder:"选择胶料后自动带出别名"}},{label:"R0进胶时间",field:"r0FeedTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R0成环时间",field:"r0RingTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R0拉断时间",field:"r0BreakTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R0排胶时间",field:"r0DischargeTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R1进胶时间",field:"r1FeedTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R1成环时间",field:"r1RingTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R1拉断时间",field:"r1BreakTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}},{label:"R1排胶时间",field:"r1DischargeTime",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"单位:秒",style:{width:"100%"}}}],pe={materialId:{title:"胶料",order:0,view:"sel_search",dictTable:"mes_material",dictCode:"id",dictText:"material_name"},materialCode:{title:"胶料别名",order:1,view:"text"},materialName:{title:"胶料名称",order:2,view:"text"},r0FeedTime:{title:"R0进胶时间",order:3,view:"number"},r0RingTime:{title:"R0成环时间",order:4,view:"number"},r0BreakTime:{title:"R0拉断时间",order:5,view:"number"},r0DischargeTime:{title:"R0排胶时间",order:6,view:"number"},r1FeedTime:{title:"R1进胶时间",order:7,view:"number"},r1RingTime:{title:"R1成环时间",order:8,view:"number"},r1BreakTime:{title:"R1拉断时间",order:9,view:"number"},r1DischargeTime:{title:"R1排胶时间",order:10,view:"number"}},ue=t=>g.get({url:"/xslmes/mesXslOpenMillParam/list",params:t}),K=t=>g.get({url:"/mes/material/material/queryById",params:t},{successMessageMode:"none"}),he=(t,r)=>g.delete({url:"/xslmes/mesXslOpenMillParam/delete",params:t},{joinParamsToUrl:!0}).then(()=>r()),fe=(t,r)=>g.delete({url:"/xslmes/mesXslOpenMillParam/deleteBatch",params:t},{joinParamsToUrl:!0}).then(()=>r()),Y=(t,r)=>{const i=r?"/xslmes/mesXslOpenMillParam/edit":"/xslmes/mesXslOpenMillParam/add";return g.post({url:i,params:t},{successMessageMode:"none"})},ge="/xslmes/mesXslOpenMillParam/exportXls",be="/xslmes/mesXslOpenMillParam/importExcel",Z=E({__name:"MesXslOpenMillParamModal",emits:["register","success"],setup(t,{emit:r}){const{createMessage:i}=L(),w=r,n=P(!0),d=P(!1),p=P(!1),[u,{setProps:l,resetFields:h,setFieldsValue:_,validate:B,scrollToField:F}]=q({labelWidth:130,schemas:W,showActionButtonGroup:!1,baseColProps:{span:24}}),[N,{setModalProps:I,closeModal:C}]=A(e=>b(null,null,function*(){p.value=!0,yield h(),I({confirmLoading:!1,showCancelBtn:!!(e!=null&&e.showFooter),showOkBtn:!!(e!=null&&e.showFooter)}),n.value=!!(e!=null&&e.isUpdate),d.value=!(e!=null&&e.showFooter),a(n)&&(yield _(x({},e.record))),l({disabled:!(e!=null&&e.showFooter)}),p.value=!1})),O=G(()=>a(n)?a(d)?"详情":"编辑":"新增");function k(e,s){return b(this,null,function*(){var f,c;if(p.value)return;const m=s!=null&&s!==""?String(s):"";if(!m){e.materialName="",e.materialCode="";return}try{const o=yield K({id:m}),R=(o==null?void 0:o.materialName)!=null?o:o==null?void 0:o.result;R&&(e.materialName=(f=R.materialName)!=null?f:"",e.materialCode=(c=R.aliasName)!=null?c:"")}catch(o){e.materialName="",e.materialCode=""}})}function X(){return b(this,null,function*(){try{const e=yield B();if(!e.materialId){i.warning("请选择胶料");return}I({confirmLoading:!0}),yield Y(e,a(n)),i.success(a(n)?"编辑成功":"新增成功"),C(),w("success")}catch(e){if(e!=null&&e.errorFields){const s=e.errorFields[0];s&&F(s.name,{behavior:"smooth",block:"center"})}return Promise.reject(e)}finally{I({confirmLoading:!1})}})}return(e,s)=>(Q(),V(a(j),$(e.$attrs,{onRegister:a(N),destroyOnClose:"",title:O.value,width:800,onOk:X}),{default:v(()=>[y(a(J),{onRegister:a(u)},{materialPicker:v(({model:m,field:f})=>[y(H,{value:m[f],"onUpdate:value":[c=>m[f]=c,c=>k(m,c)],dictCode:"mes_material,material_name,id",placeholder:"请选择胶料",disabled:d.value},null,8,["value","onUpdate:value","disabled"])]),_:1},8,["onRegister"])]),_:1},16,["onRegister","title"]))}}),ee=z(Z,[["__scopeId","data-v-ece21557"]]),we=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"}));export{ee as M,ge as a,pe as b,ce as c,fe as d,he as e,we as f,be as g,ue as l,de as s};
|