var W=Object.defineProperty,J=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var h=(r,t,e)=>t in r?W(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,S=(r,t)=>{for(var e in t||(t={}))N.call(t,e)&&h(r,e,t[e]);if(g)for(var e of g(t))j.call(t,e)&&h(r,e,t[e]);return r},v=(r,t)=>J(r,A(t));var f=(r,t,e)=>new Promise((a,p)=>{var b=i=>{try{c(e.next(i))}catch(m){p(m)}},l=i=>{try{c(e.throw(i))}catch(m){p(m)}},c=i=>i.done?a(i.value):Promise.resolve(i.value).then(b,l);c((e=e.apply(r,t)).next())});import{d as z,f as u,r as E,u as s,e as G,U as y,a2 as $,ad as H,af as _,k as d,ag as Q}from"./vue-vendor-CxLCUzY4.js";import{B as X}from"./index-D2AmS0aU.js";import"./index-ARbUvvsq.js";import{a8 as Y,bq as Z,_ as oo}from"./index-B_2CoVdl.js";import{useJvxeMethod as eo}from"./useJvxeMethods-DJZKL0Jv.js";import{w as to,f as ro,q as so,h as io}from"./WmsSo.api-DFJ8pSNc.js";import{u as mo,B as no}from"./useForm-CcjrODHR.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.js";import"./vxeUtils-Ck0LG0y-.js";const ao=z({__name:"WmsSoModal",emits:["register","success"],setup(r,{emit:t}){const e=t,a=u(!0),p=u(!1),b=u(["wmsSoItem"]),l=u("wmsSoItem"),c=u(),i={wmsSoItem:c},m=E({loading:!1,dataSource:[],columns:to}),[I,{setProps:F,resetFields:k,setFieldsValue:C,validate:po}]=mo({schemas:io,showActionButtonGroup:!1,baseColProps:{span:12}}),[B,{setModalProps:w,closeModal:M}]=Y(o=>f(this,null,function*(){var n;yield U(),w({confirmLoading:!1,showCancelBtn:o==null?void 0:o.showFooter,showOkBtn:o==null?void 0:o.showFooter}),a.value=!!(o!=null&&o.isUpdate),p.value=!(o!=null&&o.showFooter),s(a)&&(yield C(S({},o.record)),x(so,{id:(n=o==null?void 0:o.record)==null?void 0:n.id},m)),F({disabled:!(o!=null&&o.showFooter)})})),[R,O,x,q]=eo(D,V,i,l,b),K=G(()=>s(a)?s(p)?"详情":"编辑":"新增");function U(){return f(this,null,function*(){yield k(),l.value="wmsSoItem",m.dataSource=[]})}function V(o){let n=Object.assign({},o.formValue);return v(S({},n),{wmsSoItemList:o.tablesValue[0].tableData})}function D(o){return f(this,null,function*(){try{w({confirmLoading:!0}),yield ro(o,a.value),M(),e("success")}finally{w({confirmLoading:!1})}})}return(o,n)=>{const L=y("a-tab-pane"),P=y("a-tabs");return $(),H(s(X),Q(o.$attrs,{onRegister:s(B),destroyOnClose:"",title:K.value,width:896,onOk:s(O)}),{default:_(()=>[d(s(no),{onRegister:s(I),ref_key:"formRef",ref:q,name:"WmsSoForm"},null,8,["onRegister"]),d(P,{activeKey:l.value,"onUpdate:activeKey":n[0]||(n[0]=T=>l.value=T),animated:"",onChange:s(R)},{default:_(()=>[d(L,{tab:"出库单子项",key:"wmsSoItem",forceRender:!0},{default:_(()=>[d(s(Z),{"keep-source":"",resizable:"",ref_key:"wmsSoItem",ref:c,loading:m.loading,columns:m.columns,dataSource:m.dataSource,height:340,disabled:p.value,rowNumber:!0,rowSelection:!0,toolbar:!0},null,8,["loading","columns","dataSource","disabled"])]),_:1})]),_:1},8,["activeKey","onChange"])]),_:1},16,["onRegister","title","onOk"])}}}),ce=oo(ao,[["__scopeId","data-v-3db6fbbc"]]);export{ce as default};
