HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookOut-legacy-8e32f586.js
System.register(["./index-legacy-06c5db9c.js","./po-legacy-d10a66a5.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./vue-router-legacy-a12307c3.js","./index-legacy-42c17c53.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./utils-legacy-c0023c33.js","./focus-trap-legacy-631b7396.js","./error-legacy-e98f9e58.js"],(function(e,t){"use strict";var n,a,i,o,u,r,l,s,_,d,m,c,p,v,h,b,f,g,y,k,w,q,x,C,S,L,M,j,T,D,F,I,W,E,R,P,O,z,N,B,A,$,H,V,U,Y,Q;return{setters:[null,e=>{n=e.CustomerInvMatch,a=e.getPartList,i=e.CustomerInventoryToLacal,o=e.createPartSend,u=e.getSelectVolume,r=e.getPartSort,l=e.getPartUnit,s=e.putPartNew,_=e.getPartOrderList,d=e.getBomListBySearch,m=e.takeoutByBom,c=e.returnByBom,p=e.getTakeReturnData,v=e.getReservedDatas,h=e.getBomFullListByItem,b=e.bomLock},e=>{f=e.L,g=e.v,y=e.ba,k=e.b7},e=>{w=e.d,q=e.r,x=e.c,C=e.w,S=e.O,L=e.b5,M=e.b4,j=e.G,T=e.e,D=e.l,F=e.f,I=e.F,W=e.I,E=e.n,R=e.p,P=e.q,O=e.t,z=e.g,N=e.x,B=e.j,A=e.U,$=e.P,H=e.A,V=e.o},e=>{U=e.u,Y=e.d},e=>{Q=e.o},null,null,null,null,null,null,null],execute:function(){
/*! *****************************************************************************
            Copyright (c) Microsoft Corporation.

            Permission to use, copy, modify, and/or distribute this software for any
            purpose with or without fee is hereby granted.

            THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
            REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
            AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
            INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
            LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
            OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
            PERFORMANCE OF THIS SOFTWARE.
            ***************************************************************************** */
function t(e,t,n,a){return new(n||(n=Promise))((function(i,o){function u(e){try{l(a.next(e))}catch(t){o(t)}}function r(e){try{l(a.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,r)}l((a=a.apply(e,t||[])).next())}))}e("useEqu",(function(){const e=H({page:"",results:""});U();const{query:t,params:f}=Y(),g=H({});H({qo_item_id:"",seq_id:""}),H({qo_item_id:"",seq_id:""});const w=H({qo_item_id:"",provider:"N",page:1,resault:""}),C=H({orderNum:"",qo_item_id:"",search:""}),S=H({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),L=H({order_no:"",customer_no:"",part_no:""}),M=H({is_ready_value:0,is_takeout:0,is_return:0}),j=q(!1),T=H({}),D=H({}),F=H({}),I=H({}),W=H({}),E=H({}),R=H({}),P=H({}),O=H({}),z=H({}),N=H({}),B=H({page:1,resault:"",search_key:""}),A=H({qo_item_id:"",seq_id:""});H({page:"",results:""});const G=H({trackingNo:"123456",trackingDetail:[{name:"test1",quantitty:"100"},{name:"test2",quantity:"200"}]}),K=q(1),X=q(),Z=q(""),ee=q(""),te=q(""),ne=q(""),ae=q(""),ie=q([]),oe=q([]),ue=q([]),re=q([]),le=q([]),se=q(!1),_e=q(!1),de=q(!1),me=q(10),ce=q(1),pe=q(10),ve=q(1),he=q(""),be=q(""),fe=q({}),ge=q({}),ye=q(""),ke=q(""),we=q(""),qe=q(!1);q("");const xe=q(""),Ce=q(0),Se=q(""),Le=q(""),Me=q(""),je=q(""),Te=q(""),De=q([]),Fe=q([]),Ie=q([]),We=q([]),Ee=q([]),Re=q([]),Pe=q([]),Oe=q([]),ze=q([]),Ne=q([]),Be=q([]),Ae=q([]),$e=q([]),He=q(!1);q({});const Ve=q(""),Ue=q(""),Ye=q(!1),Qe=q(!1),Ge=q(!1),Je=q(!1),Ke=q(!1),Xe=q(!1),Ze=q(!1),et=q(!1),tt=q([]),nt=q([]),at=q([{id:1,name:"电阻",name_k:"Resistor"},{id:2,name:"电容",name_k:"Capacitor"},{id:3,name:"二极管",name_k:"Diode"},{id:4,name:"晶体",name_k:"Transistor"},{id:5,name:"发光二极管",name_k:"LEDs"},{id:6,name:"连接",name_k:"Connector"},{id:7,name:"跳线",name_k:"Jumper"},{id:8,name:"电子芯片",name_k:"IC"},{id:9,name:"电感器",name_k:"Inductor"},{id:10,name:"转换器",name_k:"Switch"},{id:11,name:"其他",name_k:"Misc"}]),it=H({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),ot=q(),ut=q();async function rt(e){const{data:t}=await h(Object.assign(w,{qo_item_id:e,provider:"N",page:1,resault:1e4}));De.value=t.data,it.total=t.total,Ye.value=!1,C.orderNum=t.data[0].sn_order,C.qo_item_id=e}async function lt(){j.value=!0;const{data:e}=await n(Object.assign(A,{user_added:1,qo_item_id:Ee.value[0].qo_item_id,seq_id:Ee.value[0].seq_id,part_id:K}));1==e&&(Ke.value=!1,rt(Ee.value[0].qo_item_id),De.value.forEach(((e,t)=>{e.seq_id==Ee.value[0].seq_id&&(e.part_id=K,st(e))})),j.value=!1)}function st(e){Z.value="",xe.value="",Ce.value="",nt.value=[],Qe.value=!0,Ee.value=[],Ee.value.push(e),fe.value=e}const _t={menuList:[{label:"预定",fn:e=>jt()},{label:"出库",fn:e=>Lt()},{label:"还料",fn:e=>Mt()}]},dt=x((()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"]));function mt(){ct()}async function ct(){const{data:e}=await a(Object.assign(B,{page:ce,resault:me,search_key:be}));Ne.value=e.data,he.value=e.total}function pt(){const e=Ee.value[0].max_stock_seq,t=Ee.value[0].max_seq_no,n=t.substring(0,12),a=t.replace(n,"");(new Date).Format("yyMMdd"),nt.value.forEach(((t,i)=>{nt.value[i].seq_no=e+i+1,nt.value[i].idx=i+1,nt.value[i].name=n+(parseFloat(a)+i)}))}async function vt(){const{data:e}=await u(Object.assign(g,{name:Ue.value.quantity}));tt.value=e}async function ht(){const{data:e}=await r(Object.assign(T,{}));Be.value=e}async function bt(){const{data:e}=await l(Object.assign(D,{}));Ae.value=e}const ft=q();q([]);const gt=e=>{e?e.forEach((e=>{ft.value.toggleRowSelection(e,void 0)})):ft.value.clearSelection()};function yt(){let e="";nt.value.length>0&&nt.value.forEach(((t,n)=>{t.quantity>0&&(e=t.quantity)}));const t=(new Date).Format("yyMMdd"),n=nt.value.length+1;nt.value.push({quantity:e,name:t+n,idx:n,seq_no:n}),wt(),pt()}Date.prototype.Format=function(e){const t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(const n in t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e},document.onkeydown=function(e){"Enter"===e.key&&(yt(),wt(),kt(e.key))};const kt=e=>{"Enter"===e&&document.activeElement.nextElementSibling};function wt(){const e=[];let t=0;nt.value.forEach(((n,a)=>{n.quantity>0&&(e.push(n.quantity),t+=parseFloat(n.quantity))})),Ce.value=t}function qt(e){Ge.value=!0,ie.value=[],ie.value.push(e),fe.value=e}async function xt(e,t){const{data:n}=await b(Object.assign(E,{qo_item_id:e.qo_item_id,seq_id:e.seq_id,lockAction:t}));1==n.result&&("un-lock"==t?k({type:"success",message:"解锁成功"}):"lock"==t&&k({type:"success",message:"锁定成功"}),rt(e.qo_item_id))}async function Ct(){const e=[];let t={};ue.value.forEach(((n,a)=>{n.takeout_amount>0&&(t.part_id=n.part_id,t.seq_id=n.seq_id,t.part_keep_id=n.part_keep_id,t.takeout_amount=n.takeout_amount,e.push(t),t={})}));const{data:n}=await m(Object.assign(R,{qo_item_id:C.qo_item_id,data_row:e}));1==n.result?(Je.value=!1,k({type:"success",message:"出库成功"}),rt(C.qo_item_id)):k({type:"erroy",message:n.msg})}async function St(){const e=[];let t={};re.value.forEach(((n,a)=>{n.return_amountText>0&&(t.seq_id=n.seq_id,t.part_tempflow_id=n.part_tempflow_id,t.return_amount=n.return_amountText,t.part_id=n.part_id,t.return_lock_code=n.return_lock_code,t.loss_qty=n.loss_qty,e.push(t),t={})}));const{data:n}=await c(Object.assign(P,{qo_item_id:C.qo_item_id,data_row:e}));1==n.result?(Xe.value=!1,k({type:"success",message:"还料成功"}),rt(C.qo_item_id)):k({type:"erroy",message:n.msg})}async function Lt(){if(0==le.value.length)return void k({type:"error",message:"请选择订单"});if(0==M.is_takeout)return void k({type:"error",message:"所选订单不能出库"});const{data:e}=await p(Object.assign(O,{takeReturn:"takeout",qo_item_id:C.qo_item_id,seq_id_str:le.value}));1==e.result&&(ue.value=e.datas,Je.value=!0)}async function Mt(){if(0==le.value.length)return void k({type:"error",message:"请选择订单"});if(0==M.is_return)return void k({type:"error",message:"所选订单不能还料"});const{data:e}=await p(Object.assign(z,{takeReturn:"return",qo_item_id:C.qo_item_id,seq_id_str:le.value}));1==e.result&&(re.value=e.datas,Xe.value=!0)}async function jt(){if(0==le.value.length)return void k({type:"error",message:"请选择订单"});if(0==M.is_ready_value)return void k({type:"error",message:"所选订单不能预定"});et.value=!0;const{data:e}=await v(Object.assign(N,{qo_item_id:C.qo_item_id,seq_id_str:le.value}));oe.value=e,et.value=!0,1==e.result?(oe.value=e,et.value=!0):k({type:"error",message:e.msg})}return V((()=>{vt(),async function(){await o(Object.assign(G,{page:1,resault:500}))}(),t.qo_item_id&&rt(t.qo_item_id)})),{workshop_list:Fe,po_list:Ie,selectList:["勾选列","序号","预定/出库/还料","锁定状态","提供","提供方","实际 / 可用数量","需要数量","预定/出库/还料数量","出库状态","物料ID","物料品牌","物料型号","采购品牌","采购型号","型号规格","详细描述","位号","品牌","是否装配","是否结算","用量 / 每板","预定数量","在制元件","订单号"],form:e,loading:He,columns:[{type:"selection",width:30,align:"left",fixed:"left",hide:({checkList:e})=>!e.includes("勾选列"),selectable:(e,t)=>"lock"==e.matched_lock&&(e.sum_real_qty>0||e.take_out_amount>e.used_amount)},{label:"序号",type:"index",width:55,fixed:"left",hide:({checkList:e})=>!e.includes("序号")},{label:"预定/出库/还料",width:120,slot:"outReturn",fixed:"left",hide:({checkList:e})=>!e.includes("预定/出库/还料")},{label:"锁定状态",minWidth:100,slot:"lock",fixed:"left",hide:({checkList:e})=>!e.includes("锁定状态")},{label:"提供",prop:"is_order",minWidth:50,fixed:"left",hide:({checkList:e})=>!e.includes("提供")},{label:"是否到齐",width:110,slot:"provide",fixed:"left",hide:({checkList:e})=>!e.includes("提供方")},{label:"实际 / 可用数量",minWidth:100,slot:"realQuantity",fixed:"left",hide:({checkList:e})=>!e.includes("实际 / 可用数量")},{label:"需要数量",prop:"used_amount",fixed:"left",minWidth:72,hide:({checkList:e})=>!e.includes("需要数量")},{label:"预定/出库/还料数量",prop:"take_out_amount",minWidth:120,fixed:"left",slot:"takeOutAmount",hide:({checkList:e})=>!e.includes("预定/出库/还料数量")},{label:"出库状态",width:110,slot:"outState",fixed:"left",hide:({checkList:e})=>!e.includes("出库状态")},{label:"物料ID",prop:"part_id",minWidth:90,fixed:"left",hide:({checkList:e})=>!e.includes("物料ID")},{label:"物料品牌",prop:"vendor_comp_name",minWidth:110,hide:({checkList:e})=>!e.includes("物料品牌")},{label:"物料型号",prop:"standard_model",minWidth:110,hide:({checkList:e})=>!e.includes("物料型号")},{label:"采购品牌",prop:"final_vendor",minWidth:120,hide:({checkList:e})=>!e.includes("采购品牌")},{label:"采购型号",prop:"final_part_name",minWidth:120,hide:({checkList:e})=>!e.includes("采购型号")},{label:"型号规格",prop:"real_name",minWidth:100,hide:({checkList:e})=>!e.includes("型号规格")},{label:"详细描述",prop:"value",minWidth:100,hide:({checkList:e})=>!e.includes("详细描述")},{label:"位号",prop:"reference",minWidth:100,hide:({checkList:e})=>!e.includes("位号")},{label:"品牌",prop:"vendor",minWidth:100,hide:({checkList:e})=>!e.includes("品牌")},{label:"是否装配",prop:"population",minWidth:70,hide:({checkList:e})=>!e.includes("是否装配")},{label:"是否结算",prop:"is_balance",minWidth:70,hide:({checkList:e})=>!e.includes("是否结算")},{label:"用量 / 每板",prop:"quantity",minWidth:120,hide:({checkList:e})=>!e.includes("用量 / 每板")},{label:"预定数量",minWidth:100,slot:"predetermine",hide:({checkList:e})=>!e.includes("预定数量")},{label:"在制元件",minWidth:80,slot:"priceBom",hide:({checkList:e})=>!e.includes("在制元件")},{label:"订单号",prop:"sn_order",minWidth:100,hide:({checkList:e})=>!e.includes("订单号")}],dataList:De,pagination:it,buttonClass:dt,onSearch:async function(){He.value=!0;const{data:e}=await _(Object.assign(X,{order_no:L.order_no,customer_no:L.customer_no,part_no:L.part_no,page:1,resault:1e3}));e.data.forEach(((t,n)=>{e.data[n].order_time=t.order_time.substring(0,10)})),We.value=e.data,setTimeout((()=>{He.value=!1}),500)},resetForm:e=>{e&&e.resetFields()},handleUpdate:function(e){},handleSizeChange:function(e){it.pageSize=e,rt(C.qo_item_id)},handleCurrentChange:function(e){it.currentPage=e,rt(C.qo_item_id)},handleSelectionChange:function(e){const t=[];M.is_ready_value=0,M.is_takeout=0,M.is_return=0,e.forEach(((e,n)=>{"Y"==e.is_ready_value&&(M.is_ready_value=1),"Y"==e.is_takeout&&(M.is_takeout=1),"Y"==e.is_return&&(M.is_return=1),t.push(e.seq_id)})),le.value=t.toString()},poNumber:je,supplierValueId:Te,searchList:We,singleTableRef:ot,singleTableRef1:ut,selectClick:(e,t)=>{if(C.orderNum=t.sn_order,C.search=t.sn_order,C.qo_item_id=t.qo_item_id,e.length>1){const t=e.shift();ot.value.toggleRowSelection(t,!1)}We.value.forEach(((e,n)=>{e.po_id,t.po_id})),rt(t.qo_item_id)},selectClick1:(e,t)=>{if(e.length>1){const t=e.shift();ft.value.toggleRowSelection(t,!1)}K.value!=t.part_id?K.value=t.part_id:K.value=""},supplierValue:Ve,dialogTableVisible:Ye,dialogWarehousing:Qe,warehousingData:Ee,onSelectVolume:vt,volumeDataList:tt,volumeValue:Ue,trackingNo:Se,expressCompany:Le,packagenNum:Me,btnPoInventoryToLocal:async function(e){j.value=!0;const t=[];let n=0;nt.value.forEach(((e,a)=>{e.quantity>0&&(t.push(e.quantity),n+=parseFloat(e.quantity))}));const a=t.toString(),o=Ee.value[0].part_id,u=Ee.value[0].qo_item_id,r=Ee.value[0].seq_id,{data:l}=await i(Object.assign(W,{user_added:1,qo_item_id:u,seq_id:r,part_id:o,trackingNo:Se,express_company:Le,package_num:Me,inventory_qty_detail:a,localCode:we}));1==l&&(Qe.value=!1,qt(e),rt(u),X.value=1,j.value=!1)},automaticallyList:nt,btnAutomatically:function(){let e=0;if(""==Z.value)return void k.error("请输入总数量");if(""==xe.value)return void k.error("请输入卷数量");e=parseFloat(xe.value),nt.value=[];const t=parseFloat(Z.value);let n=1;const a=(new Date).Format("yyMMdd");if(0==e)nt.value.push({quantity:t,name:a+n,idx:n,seq_no:n});else{const i=parseInt(t%e),o=parseInt(t/e);for(n=1;n<=o;n++)nt.value.push({quantity:e,name:a+n,idx:n,seq_no:n});i>0&&nt.value.push({quantity:i,name:a+n,idx:n,seq_no:n})}wt()},currentReceiptQuantity:Ce,handMovementNum:xe,checked:qe,addRoll:yt,delRoll:function(e){const t=nt.value.indexOf(e);nt.value.splice(t,1),wt(),pt()},localCode:we,tableDialogPrint:Ge,openPrintDialog:qt,tableDialogMate:Ke,openMateDialog:function(e){S.standard_model=e.real_name,S.description=e.value,be.value=e.real_name,S.name=e.real_name,Ke.value=!0,Ee.value=[],Ee.value.push(e),fe.value=e,mt()},printBeltData:Re,printBeltData1:$e,printList:Pe,printList1:Oe,printList2:ze,quantityNum:ke,btnPrintLabel:function(){const e=[];Oe.value.forEach(((t,n)=>{e.push(t.part_keep_id)})),window.open(ae.value+"&part_id="+Pe.value[0].part_id+"&part_keep_id_str="+e.toString())},btnAutofill:function(){let e=parseFloat(ye.value),t=0;ze.value.forEach(((n,a)=>{t=parseFloat(n.used_amount)-parseFloat(n.sum_reserved_qty),e>0&&(t>=e?(ze.value[a].reserved_qty=e,e=0):(ze.value[a].reserved_qty=t,e-=t))}))},real_stock_total:ye,trackingData:ge,currentRow:fe,PartList:Ne,handleSizeChange1:e=>{me.value=e,ct()},handleCurrentChange1:e=>{ce.value=e,ct()},btnSearchPart:mt,search_key:be,PartListTotal:he,small:se,background:_e,disabled:de,currentSizeChange:me,currentMatePage:ce,currentSizeChange1:pe,currentMatePage1:ve,btnAddPart:function(){Ze.value=!0,ht(),bt()},addPartDialog:Ze,PartSortValue:ne,partSortData:Be,changeSortValue:function(){},partUnitData:Ae,partTypeData:at,addPartSubmin:async function(){if(j.value=!0,""==S.sort_id)return void k.error("请输入物料类别");if(""==S.name)return void k.error("请输入物料编码");if(""==S.qty_unit_id)return void k.error("请选择单位");if(""==S.category)return void k.error("请选择元件类别");const{data:e}=await s(Object.assign(F,{name:S.name,standard_model:S.standard_model,part_vendor:S.part_vendor,qty_unit_id:S.qty_unit_id,category:S.category,sort_id:S.sort_id,description:S.description}));"success"==e.result&&(K.value=e.part_id,Ze.value=!1,lt(),j.value=!1),Ae.value=e,gt([Ae.value[0]])},partAddModel:S,multipleTableRef:ft,btnSubmin:lt,btnRematch:function(){Qe.value=!1,Ke.value=!0},changeInput:wt,scopeQuantity:te,enter:function(){yt()},strname:ee,focus:function(){},openDialog:st,from:X,parameters:L,bomNum:C,handMovementNum_sum:Z,bomListBySearcht:async function(){if(""==C.search)return void k.error("请输入查询订单");const{data:e}=await d(Object.assign(I,{search_key:C.search}));"success"==e.result?rt(e.qo_item_id):"failure"==e.result&&(k.error("没有该订单"),De.value=[],C.orderNum="")},printRowData:ie,changeSearch_key:function(){mt()},btnDialogTableVisible:function(){Ye.value=!0},fullscreenLoading:j,eventIsNum:function(e){C.orderNum=e.orderNum,C.qo_item_id=e.qo_item_id,C.search=e.search,rt(C.qo_item_id)},eventIsNum1:function(e){rt(C.qo_item_id)},lockOpen:function(e){let t="",n="";"lock"==e.matched_lock?n="un-lock":"un-lock"==e.matched_lock&&(n="lock"),"un-lock"==n?t="确定要解锁吗":"lock"==n&&(t="确定要锁定吗"),Q.confirm(t,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{xt(e,n)})).catch((()=>{}))},outDialog:Je,outBound:ue,objectSpanMethod:({row:e,column:t,rowIndex:n,columnIndex:a})=>"库位"==t.label||"数量 / 卷名称"==t.label||"卷序号"==t.label||"卷名称"==t.label||"实际 / 可用数量"==t.label||"出库数量"==t.label?{rowspan:1,colspan:1}:e.seq_seq_id>0?{rowspan:0,colspan:0}:{rowspan:e.counter,colspan:1},objectSpanMethod1:({row:e,column:t,rowIndex:n,columnIndex:a})=>"已出库数量"==t.label||"卷序号"==t.label||"已还料数量"==t.label||"还料数量"==t.label||"损耗数量"==t.label||"库位"==t.label?{rowspan:1,colspan:1}:e.seq_seq_id>0?{rowspan:0,colspan:0}:{rowspan:e.counter,colspan:1},submitOut:function(){let e=0,t=!1;ue.value.forEach(((n,a)=>{n.takeout_amount>0&&(t=!0),n.takeout_amount>n.real_amount_in_stock&&(e=1)})),t?1!=e?Ct():k({type:"error",message:"出库数量不能大于实际数量"}):k({type:"error",message:"出库数量必须大于0,请输入"})},changeTakeoutAmount:function(e){e.loss_qty=e.take_out_amount-e.return_amount-e.used_amount-e.return_amountText,isNaN(e.loss_qty)&&(e.loss_qty=""),e.loss_qty<0&&(e.loss_qty=0)},changeTakeoutAmount1:function(e){e.loss_qty=e.take_out_amount-e.return_amount-e.used_amount-e.return_amountText,isNaN(e.loss_qty)&&(e.loss_qty="")},returnDialog:Xe,returnBound:re,submitReturn:function(){let e=!1;re.value.forEach(((t,n)=>{t.return_amountText>0&&(e=!0),parseFloat(t.return_amountText)>parseFloat(t.take_out_amount)-parseFloat(t.used_amount)-parseFloat(t.return_amount)&&(parseFloat(t.take_out_amount),parseFloat(t.used_amount),parseFloat(t.return_amount))})),e?St():k({type:"error",message:"还料数量必须大于0,请输入"})},btnOutDialog:Lt,btnReturnDialog:Mt,btnPredetermine:jt,predetermineDialog:et,predetermineData:oe,showMouseMenu:function(e,t,n){n.preventDefault();const{x:a,y:i}=n;(function(e){var t;const n="__mouse__menu__container";let a;a=document.querySelector(`.${n}`)?document.querySelector(`.${n}`):function(e,t,n){let a=document.createElement(e);return a.setAttribute("class",t),n&&(a.innerText=n),a}("div",n);const i=$(J,e);return y(i,a),document.body.appendChild(a),null===(t=i.component)||void 0===t?void 0:t.proxy})({el:n.currentTarget,params:e,menuWrapperCss:{background:"var(--el-bg-color)"},menuItemCss:{labelColor:"var(--el-text-color)",hoverLabelColor:"var(--el-color-primary)",hoverTipsColor:"var(--el-color-primary)"},..._t}).show(a,i)},blurRemove:function(e){e.modality_quantity>0&&(e.takeout_amount=e.real_amount_in_stock),e.takeout_amount>e.real_amount_in_stock&&(alert("出库数量不能大于实际数量"),e.takeout_amount=e.real_amount_in_stock)}}}));const G=function(e){let t=Array.isArray(e)?[]:{};if(e&&"object"==typeof e)for(let n in e)e.hasOwnProperty(n)&&(e[n]&&"object"==typeof e[n]?t[n]=G(e[n]):t[n]=e[n]);return t};var J=w({name:"MouseMenu",props:{appendToBody:{type:Boolean,default:!0},menuWidth:{type:Number,default:200},menuList:{type:Array,required:!0},menuHiddenFn:{type:Function},hasIcon:{type:Boolean,default:!1},iconType:{type:String,default:"font-icon"},menuWrapperCss:Object,menuItemCss:Object,el:{type:Object,required:!0},params:{type:[String,Number,Array,Object]},useLongPressInMobile:Boolean,longPressDuration:Number,injectCloseListener:{type:Boolean,default:!0},customClass:String,disabled:{type:Function}},setup(e){const n=q(0),a=q(0),i=q(!1),o=q(0),u=q(0),r=q(!1),l=q(null),s=q([]),_=x((()=>e.menuList.some((e=>e.children&&e.children.length>0)))),d=q(10),m=q();C(r,(n=>t(this,void 0,void 0,(function*(){var t,a;if(n){yield j();let n=m.value;e.menuWrapperCss&&Object.keys(e.menuWrapperCss).map((t=>{n.style.setProperty(`--menu-${t}`,e.menuWrapperCss&&e.menuWrapperCss[t])})),e.menuItemCss&&Object.keys(e.menuItemCss).map((t=>{n.style.setProperty(`--menu-item-${t}`,e.menuItemCss&&e.menuItemCss[t])}));let i=null===(a=null===(t=e.menuItemCss)||void 0===t?void 0:t.arrowSize)||void 0===a?void 0:a.match(/\d+/);d.value=i&&~~i[0]||10,n.style.setProperty("--menu-item-arrowRealSize",d.value/2+"px")}}))));const c=(e,t,n,a)=>e.map((e=>(e.children&&(e.children=c(e.children,t,n,a)),e.label&&"function"==typeof e.label&&(e.label=e.label(a,t,n)),e.tips&&"function"==typeof e.tips&&(e.tips=e.tips(a,t,n)),e.icon&&"function"==typeof e.icon&&(e.icon=e.icon(a,t,n)),e.hidden&&"function"==typeof e.hidden&&(e.hidden=e.hidden(a,t,n)),e.disabled&&"function"==typeof e.disabled&&(e.disabled=e.disabled(a,t,n)),e))),p=e=>{m.value&&!m.value.contains(e.currentTarget)&&(r.value=!1,document.oncontextmenu=null)};return C((()=>e.injectCloseListener),(e=>{e?document.addEventListener("mousedown",p):document.removeEventListener("mousedown",p)}),{immediate:!0}),S((()=>{document.removeEventListener("mousedown",p)})),{subLeft:n,subTop:a,hoverFlag:i,menuTop:o,menuLeft:u,showMenu:r,clickDomEl:l,calcMenuList:s,arrowSize:d,hasSubMenu:_,MenuWrapper:m,handleMenuItemClick:(t,n)=>{t.disabled||(t.fn&&"function"==typeof t.fn&&t.fn(e.params,l.value,e.el,n),r.value=!1)},handleSubMenuItemClick:(t,n)=>{t.disabled||(t.fn&&"function"==typeof t.fn&&!t.disabled&&(t.fn(e.params,l.value,e.el,n),i.value=!1),r.value=!1)},handleMenuMouseEnter:(e,t)=>{if(t.children&&!t.disabled){i.value=!0;const t=e.currentTarget;if(!t)return;const{offsetWidth:o}=t,u=t.querySelector(".__menu__sub__wrapper");if(!u)return;const{offsetWidth:r,offsetHeight:l}=u,{innerWidth:s,innerHeight:_}=window,{top:d,left:m}=t.getBoundingClientRect();n.value=m+o+r>s-5?m-r+5:m+o,a.value=d+l>_-5?_-l:d+5}},show:(n=0,a=0)=>t(this,void 0,void 0,(function*(){if(l.value=document.elementFromPoint(n-1,a-1),e.menuHiddenFn?r.value=!e.menuHiddenFn(e.params,l.value,e.el):r.value=!0,!r.value)return;s.value=G(e.menuList),s.value=c(s.value,l.value,e.el,e.params),yield j();const{innerWidth:t,innerHeight:i}=window,_=m.value.offsetHeight,d=e.menuWidth||200;u.value=n+d+1>t?t-d-5:n+1,o.value=a+_+1>i?i-_-5:a+1})),close:()=>{r.value=!1}}}});L("data-v-3d21bc0a");const K=["onMousedown","onMouseenter"],X={key:0,class:"__menu__item-icon"},Z=["innerHTML"],ee={class:"__menu__item-label"},te={class:"__menu__item-tips"},ne={class:"__menu__item-arrow-after"},ae=["onMousedown"],ie={class:"__menu__sub__item-label"},oe={class:"__menu__sub__item-tips"};M(),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".__menu__mask[data-v-3d21bc0a] {\n  position: fixed;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  z-index: 999;\n}\n.__menu__wrapper[data-v-3d21bc0a] {\n  --menu-background: #c8f2f0;\n  --menu-boxShadow: 0 1px 5px #888;\n  --menu-padding: 5px 0;\n  --menu-borderRadius: 0;\n  --menu-item-height: 30px;\n  --menu-item-padding: 0 10px;\n  --menu-item-iconSize: 20px;\n  --menu-item-iconFontSize: 14px;\n  --menu-item-iconColor: #484852;\n  --menu-item-labelColor: #484852;\n  --menu-item-labelFontSize: 14px;\n  --menu-item-tipsColor: #889;\n  --menu-item-tipsFontSize: 12px;\n  --menu-item-arrowColor: #484852;\n  --menu-item-disabledColor: #bcc;\n  --menu-item-hoverBackground: rgba(255, 255, 255, 0.8);\n  --menu-item-hoverIconColor: inherit;\n  --menu-item-hoverLabelColor: inherit;\n  --menu-item-hoverTipsColor: inherit;\n  --menu-item-hoverArrowColor: inherit;\n  --menu-lineColor: #ccc;\n  --menu-lineMargin: 5px 0;\n}\n.__menu__wrapper[data-v-3d21bc0a] {\n  position: fixed;\n  width: 200px;\n  background: var(--menu-background);\n  box-shadow: var(--menu-boxShadow);\n  padding: var(--menu-padding);\n  border-radius: var(--menu-borderRadius);\n  z-index: 99999;\n}\n.__menu__line[data-v-3d21bc0a],\n.__menu__sub__line[data-v-3d21bc0a] {\n  border-top: 1px solid var(--menu-lineColor);\n  margin: var(--menu-lineMargin);\n}\n.__menu__item[data-v-3d21bc0a],\n.__menu__sub__item[data-v-3d21bc0a] {\n  display: flex;\n  height: var(--menu-item-height);\n  align-items: center;\n  cursor: pointer;\n  padding: var(--menu-item-padding);\n}\n.__menu__item .__menu__item-icon[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-icon[data-v-3d21bc0a] {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--menu-item-iconColor);\n  width: var(--menu-item-iconSize);\n  height: var(--menu-item-iconSize);\n}\n.__menu__item .__menu__item-icon i[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-icon i[data-v-3d21bc0a] {\n  font-size: var(--menu-item-iconFontSize);\n}\n.__menu__item .__menu__item-icon .__menu__item-icon-svg[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-icon .__menu__item-icon-svg[data-v-3d21bc0a] {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 100%;\n  height: 100%;\n}\n.__menu__item .__menu__item-label[data-v-3d21bc0a],\n.__menu__item .__menu__sub__item-label[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-label[data-v-3d21bc0a],\n.__menu__sub__item .__menu__sub__item-label[data-v-3d21bc0a] {\n  width: 100%;\n  max-height: 100%;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  flex: 1;\n  font-size: var(--menu-item-labelFontSize);\n  color: var(--menu-item-labelColor);\n  margin-right: 5px;\n  overflow: hidden;\n}\n.__menu__item .__menu__item-tips[data-v-3d21bc0a],\n.__menu__item .__menu__sub__item-tips[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-tips[data-v-3d21bc0a],\n.__menu__sub__item .__menu__sub__item-tips[data-v-3d21bc0a] {\n  font-size: var(--menu-item-tipsFontSize);\n  color: var(--menu-item-tipsColor);\n}\n.__menu__item .__menu__item-arrow[data-v-3d21bc0a],\n.__menu__sub__item .__menu__item-arrow[data-v-3d21bc0a] {\n  width: 10px;\n  height: 10px;\n  margin-left: 5px;\n  position: relative;\n}\n.__menu__item.disabled[data-v-3d21bc0a],\n.__menu__sub__item.disabled[data-v-3d21bc0a] {\n  cursor: not-allowed;\n}\n.__menu__item.disabled .__menu__item-icon[data-v-3d21bc0a],\n.__menu__item.disabled .__menu__item-label[data-v-3d21bc0a],\n.__menu__item.disabled .__menu__sub__item-label[data-v-3d21bc0a],\n.__menu__item.disabled .__menu__item-tips[data-v-3d21bc0a],\n.__menu__item.disabled .__menu__sub__item-tips[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__item-icon[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__item-label[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__sub__item-label[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__item-tips[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__sub__item-tips[data-v-3d21bc0a] {\n  color: var(--menu-item-disabledColor);\n}\n.__menu__item.disabled .__menu__item-arrow .__menu__item-arrow-after[data-v-3d21bc0a],\n.__menu__sub__item.disabled .__menu__item-arrow .__menu__item-arrow-after[data-v-3d21bc0a] {\n  border-left: var(--menu-item-arrowRealSize) solid var(--menu-item-disabledColor);\n}\n.__menu__item[data-v-3d21bc0a]:not(.disabled):hover {\n  background: var(--menu-item-hoverBackground);\n}\n.__menu__item:not(.disabled):hover .__menu__item-icon[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverIconColor);\n}\n.__menu__item:not(.disabled):hover .__menu__item-label[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverLabelColor);\n}\n.__menu__item:not(.disabled):hover .__menu__item-tips[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverTipsColor);\n}\n.__menu__item:not(.disabled):hover .__menu__item-arrow[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverArrowColor);\n}\n.__menu__sub__item[data-v-3d21bc0a]:not(.disabled):hover {\n  background: var(--menu-item-hoverBackground);\n}\n.__menu__sub__item:not(.disabled):hover .__menu__sub__item-label[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverLabelColor);\n}\n.__menu__sub__item:not(.disabled):hover .__menu__sub__item-tips[data-v-3d21bc0a] {\n  color: var(--menu-item-hoverTipsColor);\n}\n.__menu__item-icon[data-v-3d21bc0a] {\n  width: 20px;\n  height: 20px;\n  text-align: center;\n  line-height: 20px;\n  margin-right: 4px;\n}\n.__menu__item-arrow.show .__menu__item-arrow-after[data-v-3d21bc0a] {\n  position: absolute;\n  width: 0;\n  height: 0;\n  left: 8px;\n  border-left: var(--menu-item-arrowRealSize) solid var(--menu-item-arrowColor);\n  border-top: var(--menu-item-arrowRealSize) solid transparent;\n  border-bottom: var(--menu-item-arrowRealSize) solid transparent;\n}\n.__menu__sub__wrapper[data-v-3d21bc0a] {\n  position: fixed;\n  visibility: hidden;\n  width: 200px;\n  background: var(--menu-background);\n  box-shadow: var(--menu-boxShadow);\n  padding: var(--menu-padding);\n  border-radius: var(--menu-borderRadius);\n}\n.__menu__item:hover .__menu__sub__wrapper[data-v-3d21bc0a] {\n  visibility: visible;\n}"),J.render=function(e,t,n,a,i,o){return T(),D(A,{to:"body",disabled:!e.appendToBody},[e.showMenu?(T(),F("div",{key:0,ref:"MenuWrapper",class:E(["__menu__wrapper",e.customClass]),style:B({width:`${e.menuWidth}px`,top:`${e.menuTop}px`,left:`${e.menuLeft}px`})},[(T(!0),F(I,null,W(e.calcMenuList,((t,n)=>(T(),F(I,null,[t.hidden||t.line?O("v-if",!0):(T(),F("div",{key:n,class:E(["__menu__item",t.disabled&&"disabled",t.customClass]),onMousedown:f((n=>e.handleMenuItemClick(t,n)),["stop"]),onMouseenter:n=>e.handleMenuMouseEnter(n,t)},[e.hasIcon?(T(),F("div",X,["font-icon"===e.iconType?R((T(),F("i",{key:0,class:E(t.icon)},null,2)),[[g,t.icon]]):"svg-icon"===e.iconType?R((T(),F("div",{key:1,class:"__menu__item-icon-svg",innerHTML:t.icon},null,8,Z)),[[g,t.icon]]):"vnode-icon"===e.iconType?(T(),D(P(t.icon),{key:2})):O("v-if",!0)])):O("v-if",!0),z("span",ee,N(t.label),1),z("span",te,N(t.tips||""),1),e.hasSubMenu?(T(),F("span",{key:1,class:E(["__menu__item-arrow",{show:e.hasSubMenu&&t.children}]),style:B({width:e.arrowSize+"px",height:e.arrowSize+"px"})},[R(z("span",ne,null,512),[[g,e.hasSubMenu&&t.children]])],6)):O("v-if",!0),t.children&&t.children.length>0?R((T(),F("div",{key:2,class:"__menu__sub__wrapper",style:B({top:`${e.subTop}px`,left:`${e.subLeft}px`})},[(T(!0),F(I,null,W(t.children,((t,n)=>(T(),F(I,null,[t.hidden||t.line?O("v-if",!0):(T(),F("div",{key:n,class:E(["__menu__sub__item",t.disabled&&"disabled",t.customClass]),onMousedown:f((n=>e.handleSubMenuItemClick(t,n)),["stop"])},[z("span",ie,N(t.label),1),z("span",oe,N(t.tips||""),1)],42,ae)),t.line?(T(),F("div",{key:n,class:"__menu__line"})):O("v-if",!0)],64)))),256))],4)),[[g,e.hoverFlag]]):O("v-if",!0)],42,K)),!t.hidden&&t.line?(T(),F("div",{key:n,class:"__menu__line"})):O("v-if",!0)],64)))),256))],6)):O("v-if",!0)],8,["disabled"])},J.__scopeId="data-v-3d21bc0a",J.__file="packages/mouse-menu/mouse-menu.vue",J.install=e=>{e.component(J.name,J)}}}}));