Ben Lin
2024-04-25 e404c076586d9682c3d782a4ecb0dc254f0bfd48
1
var m=(r,p,i)=>new Promise((n,e)=>{var l=o=>{try{a(i.next(o))}catch(c){e(c)}},t=o=>{try{a(i.throw(o))}catch(c){e(c)}},a=o=>o.done?n(o.value):Promise.resolve(o.value).then(l,t);a((i=i.apply(r,p)).next())});import{__tla as y}from"./index-3f7f661e.js";import{B as k,__tla as x}from"./BasicTable-f21ed556.js";import{__tla as D}from"./componentMap-44c327dc.js";import{__tla as z}from"./TableImg.vue_vue_type_style_index_0_lang-0681b671.js";import{u as w,__tla as P}from"./useTable-b66ba709.js";import{n as U,d as M,r as F,a7 as L,_ as Q,$ as W,f as T,a9 as N,E as H,u as I}from"./vue-1631514e.js";import{a2 as v}from"./antd-057b41b1.js";import{a as h,bq as E,O as f,d as B,N as V,l as Y,aN as j,aK as q,b as K,__tla as $}from"./index-f0df2f76.js";import{b as G,__tla as J}from"./Export2Excel-a4fa55f4.js";import{__tla as X}from"./index-206406c4.js";import{__tla as Z}from"./index-7a87ec93.js";import{__tla as ee}from"./index-a2613349.js";import{__tla as te}from"./useWindowSizeFn-53b82e7c.js";import{__tla as re}from"./BasicForm-1f7b4828.js";import{__tla as ae}from"./FormItem.vue_vue_type_script_lang-b8ce4930.js";import{__tla as _e}from"./helper-01a18f25.js";import{__tla as le}from"./BasicForm.vue_vue_type_style_index_0_lang-58da98b0.js";import"./uniqBy-58c2f3f0.js";import{__tla as se}from"./useForm-2e36096a.js";import{__tla as oe}from"./RadioButtonGroup-3086b2b2.js";import"./useFormItem-d5f46e05.js";import"./onMountedOrActivated-5690e97c.js";import{__tla as ie}from"./download-dc45853f.js";import"./base64Conver-39fc0d26.js";import{__tla as ne}from"./index-6f5324ed.js";import{__tla as ce}from"./IconPicker.vue_vue_type_style_index_0_lang-ab92f5b0.js";import{__tla as de}from"./useCopyToClipboard-9d1e4453.js";import{__tla as me}from"./index-79e4735b.js";import"./sortable.esm-f208c0d8.js";let A,pe=Promise.all([(()=>{try{return y}catch(r){}})(),(()=>{try{return x}catch(r){}})(),(()=>{try{return D}catch(r){}})(),(()=>{try{return z}catch(r){}})(),(()=>{try{return P}catch(r){}})(),(()=>{try{return $}catch(r){}})(),(()=>{try{return J}catch(r){}})(),(()=>{try{return X}catch(r){}})(),(()=>{try{return Z}catch(r){}})(),(()=>{try{return ee}catch(r){}})(),(()=>{try{return te}catch(r){}})(),(()=>{try{return re}catch(r){}})(),(()=>{try{return ae}catch(r){}})(),(()=>{try{return _e}catch(r){}})(),(()=>{try{return le}catch(r){}})(),(()=>{try{return se}catch(r){}})(),(()=>{try{return oe}catch(r){}})(),(()=>{try{return ie}catch(r){}})(),(()=>{try{return ne}catch(r){}})(),(()=>{try{return ce}catch(r){}})(),(()=>{try{return de}catch(r){}})(),(()=>{try{return me}catch(r){}})()]).then(()=>m(void 0,null,function*(){const r=[{title:"\u5355\u636E\u4EE3\u7801",dataIndex:"TRANS_NO",width:200,sorter:!0,resizable:!0},{title:"\u6761\u7801",dataIndex:"SN",width:300,sorter:!0,resizable:!0},{title:"\u7269\u6599\u4EE3\u7801",dataIndex:"ITEM_CODE",width:200,sorter:!0,resizable:!0},{title:"\u6761\u7801\u6765\u6E90\u8BF4\u660E",dataIndex:"TRACE_INFO",width:500,resizable:!0},{title:"\u6570\u91CF",dataIndex:"QTY",sorter:!0,resizable:!0},{title:"\u539F\u59CB\u7BB1\u53F7",dataIndex:"CARTON_NO",width:180,sorter:!0,resizable:!0},{title:"\u64CD\u4F5C\u65F6\u95F4",dataIndex:"CREATE_TIME",width:180,sorter:!0,resizable:!0},{title:"\u50A8\u5B58\u72B6\u6001",dataIndex:"STATUS",width:180,resizable:!0,customRender:({record:e})=>{const l=e.STATUS;let t="",a="";switch(l){case 0:t="\u4E0D\u5B58\u5728",a="green";break;case 10:t="\u9001\u8D27\u4E2D",a="blue";break;case 20:t="\u5F85\u68C0\u9A8C",a="green";break;case 30:t="\u5F85\u5165\u5E93",a="blue";break;case 40:t="\u5728\u5E93\u4E2D",a="blue";break;case 50:t="\u5DF2\u4E0B\u67B6",a="green";break;case 60:t="\u5DF2\u53D1\u6599",a="red";break;case 70:t="\u5DF2\u4E0A\u6599",a="red";break;case 80:t="\u5DF2\u8017\u5C3D",a="green";break;case 90:t="\u5DF2\u9000\u6599",a="green";break;case 100:t="\u5DF2\u53D1\u8D27",a="green";break}return U(v,{color:a},()=>t)},sorter:!0},{title:"\u4ED3\u5E93",dataIndex:"WH_CODE",width:100,sorter:!0,resizable:!0},{title:"\u50A8\u4F4D",dataIndex:"LOCATION_CODE",sorter:!0,resizable:!0},{title:"\u5355\u4F4D",dataIndex:"UNIT",resizable:!0},{title:"\u751F\u4EA7\u65E5\u671F",dataIndex:"PROD_DATE",resizable:!0},{title:"\u9996\u6B21\u5165\u5E93\u65E5\u671F",dataIndex:"FIRST_IN_DATE",resizable:!0},{title:"\u5355\u636E\u884C\u53F7",dataIndex:"TRANS_LINE",width:100,resizable:!0},{title:"\u4F9B\u5E94\u5546\u4EE3\u7801",dataIndex:"SUPP_CODE",width:100,resizable:!0},{title:"\u4F9B\u5E94\u5546\u6279\u6B21\u53F7",dataIndex:"SUPP_LOTNO"},{title:"\u6279\u6B21\u53F7",dataIndex:"LOTNO",resizable:!0},{title:"\u7BB1\u53F7",dataIndex:"CARTON_NO",width:180,resizable:!0},{title:"\u6808\u677F\u53F7",dataIndex:"PALLET_NO",width:180,resizable:!0},{title:"\u66F4\u65B0\u4EBA",dataIndex:"UPDATE_USER",resizable:!0}],p=[{field:"TRANS_NO",label:"\u5355\u636E\u4EE3\u7801",component:"Input",colProps:{span:8}},{field:"SN",label:"\u6761\u7801",component:"Input",colProps:{span:8}},{field:"ITEM_CODE",label:"\u7269\u6599\u4EE3\u7801",component:"Input",colProps:{span:8}},{field:"TRACE_INFO",label:"\u6761\u7801\u6765\u6E90\u8BF4\u660E",component:"Input",colProps:{span:8}}],i=e=>m(void 0,null,function*(){let l="";e.order!=null&&(l=e.order=="descend"?e.field+" desc":e.field);let t="1=1";(e==null?void 0:e.SN)!=null&&(e==null?void 0:e.SN)!=""&&(t+=" And SN like '%"+(e==null?void 0:e.SN)+"%'"),(e==null?void 0:e.ITEM_CODE)!=null&&(e==null?void 0:e.ITEM_CODE)!=""&&(t+=" And ITEM_CODE like '%"+(e==null?void 0:e.ITEM_CODE)+"%'"),(e==null?void 0:e.TRANS_NO)!=null&&(e==null?void 0:e.TRANS_NO)!=""&&(t+=" And TRANS_NO like '%"+(e==null?void 0:e.TRANS_NO)+"%'"),(e==null?void 0:e.TRACE_INFO)!=null&&(e==null?void 0:e.TRACE_INFO)!=""&&(t+=" And TRACE_INFO like '%"+(e==null?void 0:e.TRACE_INFO)+"%'");var a={UserId:h().getUserInfo.userId,ByOrg:!0,OrgCode:h().getUserInfo.orgCode};if(E(e.page)){const o=f("V_WMS_ITEM_HIS",{QueryAble_T:"",where:t,option:a},a);return n(o)}else{const o=f("V_WMS_ITEM_HIS",{QueryAble_T:"",where:t,order:l,page:{pageAble_T:"string",draw:1,pageIndex:e.page,pageSize:e.pageSize},option:a},a);return n(o)}});function n(e){return m(this,null,function*(){const l=yield B.post({url:V.QueryUrl,params:e,timeout:6e5},{isTransformResponse:!1});let t={};return E(l.Data.page)?t={items:l.Data.Items}:t={items:l.Data.page.data,total:l.Data.page.totals},t})}A=M({__name:"index",setup(e){const{t:l}=Y(),{createMessage:t}=K(),a=F({absolute:!1,loading:!1,tip:"\u52A0\u8F7D\u4E2D..."}),[o,{reload:c,getForm:g,getPaginationRef:S}]=w({title:"\u8FFD\u6EAF\u67E5\u8BE2",api:i,columns:r,formConfig:{labelWidth:120,schemas:p},useSearchForm:!0,showTableSetting:!0,ellipsis:!0,bordered:!0,showIndexColumn:!1});j();let d=[];function R(){if(S().total<3e4){d=[],a.loading=!0;const b=g().getFieldsValue();i(b).then(O=>{O.items.forEach(_=>{let s="";switch(_.STATUS){case 0:s="\u4E0D\u5B58\u5728";break;case 10:s="\u9001\u8D27\u4E2D";break;case 20:s="\u5F85\u68C0\u9A8C";break;case 30:s="\u5F85\u5165\u5E93";break;case 40:s="\u5728\u5E93\u4E2D";break;case 50:s="\u5DF2\u4E0B\u67B6";break;case 60:s="\u5DF2\u53D1\u6599";break;case 70:s="\u5DF2\u4E0A\u6599";break;case 80:s="\u5DF2\u8017\u5C3D";break;case 90:s="\u5DF2\u9000\u6599";break;case 100:s="\u5DF2\u53D1\u8D27";break}d.push({\u5355\u636E\u4EE3\u7801:_.TRANS_NO,\u6761\u7801:_.SN,\u7269\u6599\u4EE3\u7801:_.ITEM_CODE,\u6761\u7801\u6765\u6E90\u8BF4\u660E:_.TRACE_INFO,\u6570\u91CF:_.QTY,\u539F\u59CB\u7BB1\u53F7:_.CARTON_NO,\u64CD\u4F5C\u65F6\u95F4:_.CREATE_TIME,\u50A8\u5B58\u72B6\u6001:s,\u4ED3\u5E93:_.WH_CODE,\u50A8\u4F4D:_.LOCATION_CODE,\u5355\u4F4D:_.UNIT,\u751F\u4EA7\u65E5\u671F:_.PROD_DATE,\u9996\u6B21\u5165\u5E93\u65E5\u671F:_.FIRST_IN_DATE,\u5355\u636E\u884C\u53F7:_.TRANS_LINE,\u4F9B\u5E94\u5546\u4EE3\u7801:_.SUPP_CODE,\u4F9B\u5E94\u5546\u6279\u6B21\u53F7:_.SUPP_LOTNO,\u6279\u6B21\u53F7:_.LOTNO,\u7BB1\u53F7:_.CARTON_NO,\u6808\u677F\u53F7:_.PALLET_NO,\u66F4\u65B0\u4EBA:_.UPDATE_USER})});const u=r.map(_=>_.title),C=d.map(_=>Object.keys(_).map(s=>_[s]));d.length<3e4?G({data:C,header:u,filename:"\u8FFD\u6EAF\u62A5\u8868.xlsx"}):t.error(l("\u5BFC\u51FA\u6570\u636E\u4E0D\u80FD\u8D85\u8FC7\u4E09\u4E07\u6761\uFF0C\u5982\u9700\u8981\u66F4\u591A\u7684\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458")),a.loading=!1})}else t.error(l("\u5BFC\u51FA\u6570\u636E\u4E0D\u80FD\u8D85\u8FC7\u4E09\u4E07\u6761\uFF0C\u5982\u9700\u8981\u66F4\u591A\u7684\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"))}return(b,O)=>{const u=L("a-button");return Q(),W("div",null,[T(I(k),{onRegister:I(o)},{toolbar:N(()=>[T(u,{preIcon:"OutR|svg",ghost:"",color:"success",onClick:R},{default:N(()=>[H(" \u5BFC\u51FA ")]),_:1})]),_:1},8,["onRegister"]),T(I(q),{loading:a.loading,tip:a.tip},null,8,["loading","tip"])])}}})}));export{pe as __tla,A as default};