var z=Object.defineProperty;var C=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var S=(r,n,o)=>n in r?z(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,D=(r,n)=>{for(var o in n||(n={}))k.call(n,o)&&S(r,o,n[o]);if(C)for(var o of C(n))v.call(n,o)&&S(r,o,n[o]);return r};var l=(r,n,o)=>new Promise((p,d)=>{var t=s=>{try{a(o.next(s))}catch(i){d(i)}},e=s=>{try{a(o.throw(s))}catch(i){d(i)}},a=s=>s.done?p(s.value):Promise.resolve(s.value).then(t,e);a((o=o.apply(r,n)).next())});import{B as Y,__tla as B}from"./BasicForm-1f7b4828.js";import{__tla as q}from"./componentMap-44c327dc.js";import{u as H,__tla as U}from"./useForm-2e36096a.js";import{__tla as W}from"./RadioButtonGroup-3086b2b2.js";import{n as E,d as X,k as G,u as f,e as j,a7 as T,_ as J,a8 as K,a9 as Q,f as V,ac as Z}from"./vue-1631514e.js";import{a2 as N}from"./antd-057b41b1.js";import{B as $,a as tt,__tla as et}from"./index-49ac20fc.js";import{af as at,d as O,N as _,O as L,J as rt,_ as ot,__tla as st}from"./index-f0df2f76.js";let M,b,g,y,R,P,nt=Promise.all([(()=>{try{return B}catch(r){}})(),(()=>{try{return q}catch(r){}})(),(()=>{try{return U}catch(r){}})(),(()=>{try{return W}catch(r){}})(),(()=>{try{return et}catch(r){}})(),(()=>{try{return st}catch(r){}})()]).then(()=>l(void 0,null,function*(){let r;y=[{resizable:!0,sorter:!0,title:"\u8D27\u67B6",dataIndex:"SHELF_CODE"},{resizable:!0,sorter:!0,title:"\u50A8\u4F4D\u7F16\u7801",dataIndex:"LOCATION_CODE"},{resizable:!0,sorter:!0,title:"\u50A8\u4F4D\u540D\u79F0",dataIndex:"LOCATION_NAME"},{resizable:!0,sorter:!0,title:"\u6240\u5904\u5C42\u6570",dataIndex:"FLOOR_NO"},{resizable:!0,sorter:!0,title:"\u662F\u5426\u4F7F\u7528",dataIndex:"ISUSE",customRender:({record:t})=>{const e=t.ISUSE==="Y",a=e?"green":"red",s=e?"\u4F7F\u7528":"\u4E0D\u53EF\u7528";return E(N,{color:a},()=>s)}},{resizable:!0,sorter:!0,title:"\u662F\u5426\u6DF7\u653E",dataIndex:"ISMIX",customRender:({record:t})=>{const e=t.ISMIX==="Y",a=e?"green":"red",s=e?"\u6DF7\u653E":"\u5426";return E(N,{color:a},()=>s)}},{resizable:!0,sorter:!0,title:"\u662F\u5426\u635F\u574F",dataIndex:"IS_DAMAGE",customRender:({record:t})=>{const e=t.ISMIX==="Y",a=e?"red":"green",s=e?"\u635F\u574F":"\u5B8C\u597D";return E(N,{color:a},()=>s)}},{resizable:!0,sorter:!0,title:"\u65B9\u5411",dataIndex:"SEQ_NO"},{resizable:!0,sorter:!0,title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"CREATE_TIME",width:180},{resizable:!0,sorter:!0,title:"\u5907\u6CE8",dataIndex:"REMARK"}],P=[{field:"SHELF_CODE",label:"\u8D27\u67B6",component:"Input",colProps:{span:8}},{field:"LOCATION_CODE",label:"\u50A8\u4F4D\u7F16\u7801",component:"Input",colProps:{span:8}},{field:"LOCATION_NAME",label:"\u50A8\u4F4D\u540D\u79F0",component:"Input",colProps:{span:8}},{field:"FLOOR_NO",label:"\u6240\u5904\u5C42\u6570",component:"Input",colProps:{span:8}}],r=[{field:"SHELF_CODE",label:"\u8D27\u67B6\u503C",required:!0,component:"Input",colProps:{span:8}},{field:"ID",label:"ID",component:"Input",show:!1},{field:"LOCATION_CODE",label:"\u50A8\u4F4D\u7F16\u7801",required:!0,component:"Input",colProps:{span:8}},{field:"LOCATION_NAME",label:"\u50A8\u4F4D\u540D\u79F0",required:!0,component:"Input",colProps:{span:8}},{field:"FLOOR_NO",label:"\u6240\u5904\u5C42\u6570",component:"Input",colProps:{span:8}},{field:"FLOOR_COUNT",label:"\u6BCF\u5C42\u50A8\u4F4D\u6570",component:"Input",colProps:{span:8}},{field:"SIDE",label:"\u50A8\u4F4D\u65B9\u5411",required:!0,component:"Input",colProps:{span:8}},{field:"ISUSE",label:"\u662F\u5426\u4F7F\u7528",required:!0,component:"Select",colProps:{span:8},componentProps:{options:[{label:"\u662F",value:"Y",key:"Y"},{label:"\u5426",value:"N",key:"N"}]}},{field:"ISMIX",label:"\u662F\u5426\u6DF7\u653E",required:!0,component:"Select",colProps:{span:8},componentProps:{options:[{label:"\u662F",value:"Y",key:"Y"},{label:"\u5426",value:"N",key:"N"}]}},{field:"IS_DAMAGE",label:"\u662F\u5426\u635F\u574F",required:!0,component:"Select",colProps:{span:8},componentProps:{options:[{label:"\u662F",value:"Y",key:"Y"},{label:"\u5426",value:"N",key:"N"}]}},{field:"SEQ_NO",label:"\u50A8\u4F4D\u5E8F\u53F7",component:"Input",colProps:{span:8}},{field:"REMARK",label:"\u5907\u6CE8",component:"Input",colProps:{span:24}}],R=t=>l(void 0,null,function*(){let e="";(t==null?void 0:t.SHELF_CODE)!=null&&(t==null?void 0:t.SHELF_CODE)!=""&&(e+=" And SHELF_CODE = '"+(t==null?void 0:t.SHELF_CODE)+"'"),(t==null?void 0:t.LOCATION_CODE)!=null&&(t==null?void 0:t.LOCATION_CODE)!=""&&(e+="And LOCATION_CODE like '%"+(t==null?void 0:t.LOCATION_CODE)+"%'"),(t==null?void 0:t.LOCATION_NAME)!=null&&(t==null?void 0:t.LOCATION_NAME)!=""&&(e+="And LOCATION_NAME = '"+(t==null?void 0:t.LOCATION_NAME)+"'"),(t==null?void 0:t.FLOOR_NO)!=null&&(e+="And FLOOR_NO = '"+(t==null?void 0:t.FLOOR_NO)+"'");const a=at("WMS_LOCATION",e,t.page,t.pageSize);return n(a)});function n(t){return l(this,null,function*(){const e=yield O.post({url:_.EntityPageList,params:t},{isTransformResponse:!1});return{items:e.Data.data,total:e.Data.totals}})}let o,p;o=(t,e)=>l(void 0,null,function*(){let a;return e?a=yield O.post({url:_.UpdateEntity,params:L("WMS_LOCATION",t)},{errorMessageMode:"none",isTransformResponse:!1}):(t.ID=rt(),a=yield O.post({url:_.AddEntity,params:L("WMS_LOCATION",t)},{errorMessageMode:"none",isTransformResponse:!1})),a}),M=t=>l(void 0,null,function*(){const e=L("WMS_LOCATION",[t]);return yield O.post({url:_.DeleteList,params:e},{errorMessageMode:"none",isTransformResponse:!1})}),p=X({name:"LocationDrawer",components:{BasicDrawer:$,BasicForm:Y},emits:["success","register"],setup(t,{emit:e}){const a=G(!0),[s,{resetFields:i,setFieldsValue:A,validate:u}]=H({labelWidth:120,schemas:r,actionColOptions:{span:24},showActionButtonGroup:!1}),[m,{setDrawerProps:I,closeDrawer:F}]=tt(c=>l(this,null,function*(){i(),I({confirmLoading:!1}),a.value=!!(c!=null&&c.isUpdate),f(a)&&A(D({},c.record))})),h=j(()=>f(a)?"\u7F16\u8F91\u50A8\u4F4D":"\u65B0\u589E\u50A8\u4F4D");function w(){return l(this,null,function*(){try{const c=yield u();I({confirmLoading:!0}),o(c,f(a)).then(x=>{x.IsSuccessed&&(F(),e("success"))})}finally{I({confirmLoading:!1})}})}return{registerDrawer:m,registerForm:s,getTitle:h,handleSubmit:w}}});function d(t,e,a,s,i,A){const u=T("BasicForm"),m=T("BasicDrawer");return J(),K(m,Z(t.$attrs,{onRegister:t.registerDrawer,showFooter:"",title:t.getTitle,width:"800px",onOk:t.handleSubmit}),{default:Q(()=>[V(u,{onRegister:t.registerForm},null,8,["onRegister"])]),_:1},16,["onRegister","title","onOk"])}b=ot(p,[["render",d]]),g=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}))}));export{M as D,b as L,nt as __tla,g as a,y as c,R as g,P as s};
|