var U=(r,g,v)=>new Promise((I,f)=>{var L=s=>{try{o(v.next(s))}catch(S){f(S)}},x=s=>{try{o(v.throw(s))}catch(S){f(S)}},o=s=>s.done?I(s.value):Promise.resolve(s.value).then(L,x);o((v=v.apply(r,g)).next())});import{d as X,f as b,r as N,e as J,n as V,U as d,a2 as z,ad as H,af as l,k as e,ag as p,u as _}from"./vue-vendor-CxLCUzY4.js";import{h as C,u as h,c as $,_ as q}from"./index-Cy4uayzW.js";import{l as T}from"./JDictSelectTag-CalJXNVe.js";import{a5 as G}from"./antd-vue-vendor-CahNzUUa.js";import{J as K}from"./JFormContainer-CRf0114d.js";const{createConfirm:Q}=h();const na="/agv/agvStorageInfo/exportXls",sa="/agv/agvStorageInfo/importExcel",ua=r=>C.get({url:"/agv/agvStorageInfo/list",params:r}),ga=(r,g)=>C.delete({url:"/agv/agvStorageInfo/delete",params:r},{joinParamsToUrl:!0}).then(()=>{g()}),va=(r,g)=>{Q({iconType:"warning",title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>C.delete({url:"/agv/agvStorageInfo/deleteBatch",data:r},{joinParamsToUrl:!0}).then(()=>{g()})})},W=(r,g)=>{let v=g?"/agv/agvStorageInfo/edit":"/agv/agvStorageInfo/add";return C.post({url:v,params:r},{isTransformResponse:!1})},Y=X({__name:"AgvStorageInfoForm",props:{formDisabled:{type:Boolean,default:!1},formData:{type:Object,default:()=>({})},formBpm:{type:Boolean,default:!0}},emits:["register","ok"],setup(r,{expose:g,emit:v}){const I=r,f=b(),L=G.useForm,x=v,o=N({id:"",agvId:"",agvLocCode:"",agvLocState:"",agvLocMaxNum:void 0,agvLocCurNum:void 0,status:""}),{createMessage:s}=h(),S=b({xs:{span:24},sm:{span:5}}),O=b({xs:{span:24},sm:{span:16}}),F=b(!1),j=N({}),{resetFields:k,validate:B,validateInfos:c}=L(o,j,{immediate:!1}),M=J(()=>I.formBpm===!0?I.formData.disabled!==!1:I.formDisabled);function D(){w({})}function w(m){V(()=>{k();const a={};Object.keys(o).forEach(t=>{m.hasOwnProperty(t)&&(a[t]=m[t])}),Object.assign(o,a)})}function P(){return U(this,null,function*(){try{yield B()}catch({errorFields:t}){if(t){const u=t[0];u&&f.value.scrollToField(u.name,{behavior:"smooth",block:"center"})}return Promise.reject(t)}F.value=!0;const m=b(!1);let a=o;a.id&&(m.value=!0);for(let t in a)a[t]instanceof Array&&$(f.value.getProps,t)==="string"&&(a[t]=a[t].join(","));yield W(a,m.value).then(t=>{t.success?(s.success(t.message),x("ok")):s.warning(t.message)}).finally(()=>{F.value=!1})})}return g({add:D,edit:w,submitForm:P}),(m,a)=>{const t=d("a-input"),u=d("a-form-item"),i=d("a-col"),y=d("a-input-number"),A=d("a-row"),E=d("a-form"),R=d("a-spin");return z(),H(R,{spinning:F.value},{default:l(()=>[e(K,{disabled:M.value},{detail:l(()=>[e(E,{ref_key:"formRef",ref:f,class:"antd-modal-form",labelCol:S.value,wrapperCol:O.value,name:"AgvStorageInfoForm"},{default:l(()=>[e(A,null,{default:l(()=>[e(i,{span:24},{default:l(()=>[e(u,p({label:"agv编号"},_(c).agvId,{id:"AgvStorageInfoForm-agvId",name:"agvId"}),{default:l(()=>[e(t,{value:o.agvId,"onUpdate:value":a[0]||(a[0]=n=>o.agvId=n),placeholder:"请输入agv编号","allow-clear":""},null,8,["value"])]),_:1},16)]),_:1}),e(i,{span:24},{default:l(()=>[e(u,p({label:"agv存储编号"},_(c).agvLocCode,{id:"AgvStorageInfoForm-agvLocCode",name:"agvLocCode"}),{default:l(()=>[e(t,{value:o.agvLocCode,"onUpdate:value":a[1]||(a[1]=n=>o.agvLocCode=n),placeholder:"请输入agv存储编号","allow-clear":""},null,8,["value"])]),_:1},16)]),_:1}),e(i,{span:24},{default:l(()=>[e(u,p({label:"agv存储状态（0,1,2）"},_(c).agvLocState,{id:"AgvStorageInfoForm-agvLocState",name:"agvLocState"}),{default:l(()=>[e(T,{value:o.agvLocState,"onUpdate:value":a[2]||(a[2]=n=>o.agvLocState=n),dictCode:"storage_status",placeholder:"请选择agv存储状态（0,1,2）","allow-clear":""},null,8,["value"])]),_:1},16)]),_:1}),e(i,{span:24},{default:l(()=>[e(u,p({label:"agv存储最大数量"},_(c).agvLocMaxNum,{id:"AgvStorageInfoForm-agvLocMaxNum",name:"agvLocMaxNum"}),{default:l(()=>[e(y,{value:o.agvLocMaxNum,"onUpdate:value":a[3]||(a[3]=n=>o.agvLocMaxNum=n),placeholder:"请输入agv存储最大数量",style:{width:"100%"}},null,8,["value"])]),_:1},16)]),_:1}),e(i,{span:24},{default:l(()=>[e(u,p({label:"agv存储当前数量"},_(c).agvLocCurNum,{id:"AgvStorageInfoForm-agvLocCurNum",name:"agvLocCurNum"}),{default:l(()=>[e(y,{value:o.agvLocCurNum,"onUpdate:value":a[4]||(a[4]=n=>o.agvLocCurNum=n),placeholder:"请输入agv存储当前数量",style:{width:"100%"}},null,8,["value"])]),_:1},16)]),_:1}),e(i,{span:24},{default:l(()=>[e(u,p({label:"是否可用（0,1）"},_(c).status,{id:"AgvStorageInfoForm-status",name:"status"}),{default:l(()=>[e(T,{value:o.status,"onUpdate:value":a[5]||(a[5]=n=>o.status=n),dictCode:"isCanUse",placeholder:"请选择是否可用（0,1）","allow-clear":""},null,8,["value"])]),_:1},16)]),_:1})]),_:1})]),_:1},8,["labelCol","wrapperCol"])]),_:1},8,["disabled"])]),_:1},8,["spinning"])}}}),Z=q(Y,[["__scopeId","data-v-d90c9347"]]),da=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{Z as A,na as a,va as b,da as c,ga as d,sa as g,ua as l};
