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-a549099d.js
import"./index-74d93170.js";import{CustomerInvMatch as kn,getPartList as wn,CustomerInventoryToLacal as xn,createPartSend as Cn,getSelectVolume as Sn,getPartSort as Mn,getPartUnit as Ln,putPartNew as Tn,getPartOrderList as Fn,getBomListBySearch as Wn,takeoutByBom as Dn,returnByBom as Rn,getTakeReturnData as Xe,getReservedDatas as On,getBomFullListByItem as zn,bomLock as Bn}from"./po-4f5ed739.js";import{L as Ze,v as ie,ba as Nn,b7 as p}from"./message-2472a54a.js";import{d as Pn,r as n,c as ot,w as et,O as En,b5 as In,b4 as An,G as tt,e as C,l as nt,f as M,F as oe,I as at,n as A,p as se,q as jn,t as R,g as j,x as re,j as Te,U as $n,P as Hn,A as m,o as Vn}from"./runtime-core.esm-bundler-6128546f.js";import{u as Un,d as Yn}from"./vue-router-a383d220.js";import{o as Qn}from"./index-81e4a901.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";/*! *****************************************************************************
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 it(i,f,d,c){function b(s){return s instanceof d?s:new d(function(o){o(s)})}return new(d||(d=Promise))(function(s,o){function k(x){try{w(c.next(x))}catch(F){o(F)}}function l(x){try{w(c.throw(x))}catch(F){o(F)}}function w(x){x.done?s(x.value):b(x.value).then(k,l)}w((c=c.apply(i,f||[])).next())})}function Gn(i,f,d){let c=document.createElement(i);return c.setAttribute("class",f),d&&(c.innerText=d),c}const st=function(i){let f=Array.isArray(i)?[]:{};if(i&&typeof i=="object")for(let d in i)i.hasOwnProperty(d)&&(i[d]&&typeof i[d]=="object"?f[d]=st(i[d]):f[d]=i[d]);return f};var B=Pn({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(i){const f=n(0),d=n(0),c=n(!1),b=n(0),s=n(0),o=n(!1),k=n(null),l=n([]),w=ot(()=>i.menuList.some(_=>_.children&&_.children.length>0)),x=n(10),F=n();et(o,_=>it(this,void 0,void 0,function*(){var v,h;if(_){yield tt();let g=F.value;i.menuWrapperCss&&Object.keys(i.menuWrapperCss).map(y=>{g.style.setProperty(`--menu-${y}`,i.menuWrapperCss&&i.menuWrapperCss[y])}),i.menuItemCss&&Object.keys(i.menuItemCss).map(y=>{g.style.setProperty(`--menu-item-${y}`,i.menuItemCss&&i.menuItemCss[y])});let r=(h=(v=i.menuItemCss)===null||v===void 0?void 0:v.arrowSize)===null||h===void 0?void 0:h.match(/\d+/);r?x.value=~~r[0]||10:x.value=10,g.style.setProperty("--menu-item-arrowRealSize",x.value/2+"px")}}));const ue=(_,v)=>{_.disabled||(_.fn&&typeof _.fn=="function"&&_.fn(i.params,k.value,i.el,v),o.value=!1)},le=(_,v)=>{_.disabled||(_.fn&&typeof _.fn=="function"&&!_.disabled&&(_.fn(i.params,k.value,i.el,v),c.value=!1),o.value=!1)},_e=(_,v)=>{if(v.children&&!v.disabled){c.value=!0;const h=_.currentTarget;if(!h)return;const{offsetWidth:g}=h,r=h.querySelector(".__menu__sub__wrapper");if(!r)return;const{offsetWidth:y,offsetHeight:D}=r,{innerWidth:N,innerHeight:H}=window,{top:V,left:E}=h.getBoundingClientRect();E+g+y>N-5?f.value=E-y+5:f.value=E+g,V+D>H-5?d.value=H-D:d.value=V+5}},$=(_,v,h,g)=>_.map(r=>(r.children&&(r.children=$(r.children,v,h,g)),r.label&&typeof r.label=="function"&&(r.label=r.label(g,v,h)),r.tips&&typeof r.tips=="function"&&(r.tips=r.tips(g,v,h)),r.icon&&typeof r.icon=="function"&&(r.icon=r.icon(g,v,h)),r.hidden&&typeof r.hidden=="function"&&(r.hidden=r.hidden(g,v,h)),r.disabled&&typeof r.disabled=="function"&&(r.disabled=r.disabled(g,v,h)),r)),de=(_=0,v=0)=>it(this,void 0,void 0,function*(){if(k.value=document.elementFromPoint(_-1,v-1),i.menuHiddenFn?o.value=!i.menuHiddenFn(i.params,k.value,i.el):o.value=!0,!o.value)return;l.value=st(i.menuList),l.value=$(l.value,k.value,i.el,i.params),yield tt();const{innerWidth:h,innerHeight:g}=window,y=F.value.offsetHeight,D=i.menuWidth||200;s.value=_+D+1>h?h-D-5:_+1,b.value=v+y+1>g?g-y-5:v+1}),ce=()=>{o.value=!1},P=_=>{F.value&&!F.value.contains(_.currentTarget)&&(o.value=!1,document.oncontextmenu=null)};return et(()=>i.injectCloseListener,_=>{_?document.addEventListener("mousedown",P):document.removeEventListener("mousedown",P)},{immediate:!0}),En(()=>{document.removeEventListener("mousedown",P)}),{subLeft:f,subTop:d,hoverFlag:c,menuTop:b,menuLeft:s,showMenu:o,clickDomEl:k,calcMenuList:l,arrowSize:x,hasSubMenu:w,MenuWrapper:F,handleMenuItemClick:ue,handleSubMenuItemClick:le,handleMenuMouseEnter:_e,show:de,close:ce}}});In("data-v-3d21bc0a");const Jn=["onMousedown","onMouseenter"],Kn={key:0,class:"__menu__item-icon"},Xn=["innerHTML"],Zn={class:"__menu__item-label"},ea={class:"__menu__item-tips"},ta={class:"__menu__item-arrow-after"},na=["onMousedown"],aa={class:"__menu__sub__item-label"},ia={class:"__menu__sub__item-tips"};An();function oa(i,f,d,c,b,s){return C(),nt($n,{to:"body",disabled:!i.appendToBody},[i.showMenu?(C(),M("div",{key:0,ref:"MenuWrapper",class:A(["__menu__wrapper",i.customClass]),style:Te({width:`${i.menuWidth}px`,top:`${i.menuTop}px`,left:`${i.menuLeft}px`})},[(C(!0),M(oe,null,at(i.calcMenuList,(o,k)=>(C(),M(oe,null,[!o.hidden&&!o.line?(C(),M("div",{key:k,class:A(["__menu__item",o.disabled&&"disabled",o.customClass]),onMousedown:Ze(l=>i.handleMenuItemClick(o,l),["stop"]),onMouseenter:l=>i.handleMenuMouseEnter(l,o)},[i.hasIcon?(C(),M("div",Kn,[i.iconType==="font-icon"?se((C(),M("i",{key:0,class:A(o.icon)},null,2)),[[ie,o.icon]]):i.iconType==="svg-icon"?se((C(),M("div",{key:1,class:"__menu__item-icon-svg",innerHTML:o.icon},null,8,Xn)),[[ie,o.icon]]):i.iconType==="vnode-icon"?(C(),nt(jn(o.icon),{key:2})):R("v-if",!0)])):R("v-if",!0),j("span",Zn,re(o.label),1),j("span",ea,re(o.tips||""),1),i.hasSubMenu?(C(),M("span",{key:1,class:A(["__menu__item-arrow",{show:i.hasSubMenu&&o.children}]),style:Te({width:i.arrowSize+"px",height:i.arrowSize+"px"})},[se(j("span",ta,null,512),[[ie,i.hasSubMenu&&o.children]])],6)):R("v-if",!0),o.children&&o.children.length>0?se((C(),M("div",{key:2,class:"__menu__sub__wrapper",style:Te({top:`${i.subTop}px`,left:`${i.subLeft}px`})},[(C(!0),M(oe,null,at(o.children,(l,w)=>(C(),M(oe,null,[!l.hidden&&!l.line?(C(),M("div",{key:w,class:A(["__menu__sub__item",l.disabled&&"disabled",l.customClass]),onMousedown:Ze(x=>i.handleSubMenuItemClick(l,x),["stop"])},[j("span",aa,re(l.label),1),j("span",ia,re(l.tips||""),1)],42,na)):R("v-if",!0),l.line?(C(),M("div",{key:w,class:"__menu__line"})):R("v-if",!0)],64))),256))],4)),[[ie,i.hoverFlag]]):R("v-if",!0)],42,Jn)):R("v-if",!0),!o.hidden&&o.line?(C(),M("div",{key:k,class:"__menu__line"})):R("v-if",!0)],64))),256))],6)):R("v-if",!0)],8,["disabled"])}function sa(i,f){f===void 0&&(f={});var d=f.insertAt;if(!(!i||typeof document>"u")){var c=document.head||document.getElementsByTagName("head")[0],b=document.createElement("style");b.type="text/css",d==="top"&&c.firstChild?c.insertBefore(b,c.firstChild):c.appendChild(b),b.styleSheet?b.styleSheet.cssText=i:b.appendChild(document.createTextNode(i))}}var ra=`.__menu__mask[data-v-3d21bc0a] {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 999;
}
.__menu__wrapper[data-v-3d21bc0a] {
  --menu-background: #c8f2f0;
  --menu-boxShadow: 0 1px 5px #888;
  --menu-padding: 5px 0;
  --menu-borderRadius: 0;
  --menu-item-height: 30px;
  --menu-item-padding: 0 10px;
  --menu-item-iconSize: 20px;
  --menu-item-iconFontSize: 14px;
  --menu-item-iconColor: #484852;
  --menu-item-labelColor: #484852;
  --menu-item-labelFontSize: 14px;
  --menu-item-tipsColor: #889;
  --menu-item-tipsFontSize: 12px;
  --menu-item-arrowColor: #484852;
  --menu-item-disabledColor: #bcc;
  --menu-item-hoverBackground: rgba(255, 255, 255, 0.8);
  --menu-item-hoverIconColor: inherit;
  --menu-item-hoverLabelColor: inherit;
  --menu-item-hoverTipsColor: inherit;
  --menu-item-hoverArrowColor: inherit;
  --menu-lineColor: #ccc;
  --menu-lineMargin: 5px 0;
}
.__menu__wrapper[data-v-3d21bc0a] {
  position: fixed;
  width: 200px;
  background: var(--menu-background);
  box-shadow: var(--menu-boxShadow);
  padding: var(--menu-padding);
  border-radius: var(--menu-borderRadius);
  z-index: 99999;
}
.__menu__line[data-v-3d21bc0a],
.__menu__sub__line[data-v-3d21bc0a] {
  border-top: 1px solid var(--menu-lineColor);
  margin: var(--menu-lineMargin);
}
.__menu__item[data-v-3d21bc0a],
.__menu__sub__item[data-v-3d21bc0a] {
  display: flex;
  height: var(--menu-item-height);
  align-items: center;
  cursor: pointer;
  padding: var(--menu-item-padding);
}
.__menu__item .__menu__item-icon[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-icon[data-v-3d21bc0a] {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--menu-item-iconColor);
  width: var(--menu-item-iconSize);
  height: var(--menu-item-iconSize);
}
.__menu__item .__menu__item-icon i[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-icon i[data-v-3d21bc0a] {
  font-size: var(--menu-item-iconFontSize);
}
.__menu__item .__menu__item-icon .__menu__item-icon-svg[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-icon .__menu__item-icon-svg[data-v-3d21bc0a] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.__menu__item .__menu__item-label[data-v-3d21bc0a],
.__menu__item .__menu__sub__item-label[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-label[data-v-3d21bc0a],
.__menu__sub__item .__menu__sub__item-label[data-v-3d21bc0a] {
  width: 100%;
  max-height: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-size: var(--menu-item-labelFontSize);
  color: var(--menu-item-labelColor);
  margin-right: 5px;
  overflow: hidden;
}
.__menu__item .__menu__item-tips[data-v-3d21bc0a],
.__menu__item .__menu__sub__item-tips[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-tips[data-v-3d21bc0a],
.__menu__sub__item .__menu__sub__item-tips[data-v-3d21bc0a] {
  font-size: var(--menu-item-tipsFontSize);
  color: var(--menu-item-tipsColor);
}
.__menu__item .__menu__item-arrow[data-v-3d21bc0a],
.__menu__sub__item .__menu__item-arrow[data-v-3d21bc0a] {
  width: 10px;
  height: 10px;
  margin-left: 5px;
  position: relative;
}
.__menu__item.disabled[data-v-3d21bc0a],
.__menu__sub__item.disabled[data-v-3d21bc0a] {
  cursor: not-allowed;
}
.__menu__item.disabled .__menu__item-icon[data-v-3d21bc0a],
.__menu__item.disabled .__menu__item-label[data-v-3d21bc0a],
.__menu__item.disabled .__menu__sub__item-label[data-v-3d21bc0a],
.__menu__item.disabled .__menu__item-tips[data-v-3d21bc0a],
.__menu__item.disabled .__menu__sub__item-tips[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__item-icon[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__item-label[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__sub__item-label[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__item-tips[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__sub__item-tips[data-v-3d21bc0a] {
  color: var(--menu-item-disabledColor);
}
.__menu__item.disabled .__menu__item-arrow .__menu__item-arrow-after[data-v-3d21bc0a],
.__menu__sub__item.disabled .__menu__item-arrow .__menu__item-arrow-after[data-v-3d21bc0a] {
  border-left: var(--menu-item-arrowRealSize) solid var(--menu-item-disabledColor);
}
.__menu__item[data-v-3d21bc0a]:not(.disabled):hover {
  background: var(--menu-item-hoverBackground);
}
.__menu__item:not(.disabled):hover .__menu__item-icon[data-v-3d21bc0a] {
  color: var(--menu-item-hoverIconColor);
}
.__menu__item:not(.disabled):hover .__menu__item-label[data-v-3d21bc0a] {
  color: var(--menu-item-hoverLabelColor);
}
.__menu__item:not(.disabled):hover .__menu__item-tips[data-v-3d21bc0a] {
  color: var(--menu-item-hoverTipsColor);
}
.__menu__item:not(.disabled):hover .__menu__item-arrow[data-v-3d21bc0a] {
  color: var(--menu-item-hoverArrowColor);
}
.__menu__sub__item[data-v-3d21bc0a]:not(.disabled):hover {
  background: var(--menu-item-hoverBackground);
}
.__menu__sub__item:not(.disabled):hover .__menu__sub__item-label[data-v-3d21bc0a] {
  color: var(--menu-item-hoverLabelColor);
}
.__menu__sub__item:not(.disabled):hover .__menu__sub__item-tips[data-v-3d21bc0a] {
  color: var(--menu-item-hoverTipsColor);
}
.__menu__item-icon[data-v-3d21bc0a] {
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  margin-right: 4px;
}
.__menu__item-arrow.show .__menu__item-arrow-after[data-v-3d21bc0a] {
  position: absolute;
  width: 0;
  height: 0;
  left: 8px;
  border-left: var(--menu-item-arrowRealSize) solid var(--menu-item-arrowColor);
  border-top: var(--menu-item-arrowRealSize) solid transparent;
  border-bottom: var(--menu-item-arrowRealSize) solid transparent;
}
.__menu__sub__wrapper[data-v-3d21bc0a] {
  position: fixed;
  visibility: hidden;
  width: 200px;
  background: var(--menu-background);
  box-shadow: var(--menu-boxShadow);
  padding: var(--menu-padding);
  border-radius: var(--menu-borderRadius);
}
.__menu__item:hover .__menu__sub__wrapper[data-v-3d21bc0a] {
  visibility: visible;
}`;sa(ra);B.render=oa;B.__scopeId="data-v-3d21bc0a";B.__file="packages/mouse-menu/mouse-menu.vue";B.install=i=>{i.component(B.name,B)};function ua(i){var f;const d="__mouse__menu__container";let c;document.querySelector(`.${d}`)?c=document.querySelector(`.${d}`):c=Gn("div",d);const b=Hn(B,i);return Nn(b,c),document.body.appendChild(c),(f=b.component)===null||f===void 0?void 0:f.proxy}function wa(){const i=m({page:"",results:""});Un();const{query:f,params:d}=Yn(),c=m({});m({qo_item_id:"",seq_id:""}),m({qo_item_id:"",seq_id:""});const b=m({qo_item_id:"",provider:"N",page:1,resault:""}),s=m({orderNum:"",qo_item_id:"",search:""}),o=m({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),k=m({order_no:"",customer_no:"",part_no:""}),l=m({is_ready_value:0,is_takeout:0,is_return:0}),w=n(!1),x=m({}),F=m({}),ue=m({}),le=m({}),_e=m({}),$=m({}),de=m({}),ce=m({}),P=m({}),_=m({}),v=m({}),h=m({page:1,resault:"",search_key:""}),g=m({qo_item_id:"",seq_id:""});m({page:"",results:""});const r=m({trackingNo:"123456",trackingDetail:[{name:"test1",quantitty:"100"},{name:"test2",quantity:"200"}]}),y=n(1),D=n(),N=n(""),H=n(""),V=n(""),E=n(""),rt=n(""),me=n([]),pe=n([]),U=n([]),Y=n([]),z=n([]),ut=n(!1),lt=n(!1),_t=n(!1),fe=n(10),ve=n(1),dt=n(10),ct=n(1),Fe=n(""),he=n(""),Q=n({}),mt=n({}),We=n(""),pt=n(""),De=n(""),ft=n(!1);n("");const G=n(""),be=n(0),Re=n(""),Oe=n(""),ze=n(""),vt=n(""),ht=n(""),J=n([]),bt=n([]),gt=n([]),ge=n([]),S=n([]),yt=n([]),Be=n([]),Ne=n([]),K=n([]),Pe=n([]),Ee=n([]),X=n([]),qt=n([]),ye=n(!1);n({});const kt=n(""),Ie=n(""),qe=n(!1),Z=n(!1),Ae=n(!1),ke=n(!1),ee=n(!1),we=n(!1),xe=n(!1),te=n(!1),je=n([]),q=n([]),wt=n([{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"}]),ne=m({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),$e=n(),xt=n();async function T(e){const{data:t}=await zn(Object.assign(b,{qo_item_id:e,provider:"N",page:1,resault:1e4}));J.value=t.data,ne.total=t.total,qe.value=!1,s.orderNum=t.data[0].sn_order,s.qo_item_id=e}const Ct=(e,t)=>{if(s.orderNum=t.sn_order,s.search=t.sn_order,s.qo_item_id=t.qo_item_id,e.length>1){const a=e.shift();$e.value.toggleRowSelection(a,!1)}ge.value.forEach((a,u)=>{a.po_id==t.po_id}),T(t.qo_item_id)},St=(e,t)=>{if(e.length>1){const a=e.shift();ae.value.toggleRowSelection(a,!1)}y.value!=t.part_id?y.value=t.part_id:y.value=""};async function He(){w.value=!0;const{data:e}=await kn(Object.assign(g,{user_added:1,qo_item_id:S.value[0].qo_item_id,seq_id:S.value[0].seq_id,part_id:y}));e==1&&(ee.value=!1,T(S.value[0].qo_item_id),J.value.forEach((t,a)=>{t.seq_id==S.value[0].seq_id&&(t.part_id=y,Ve(t))}),w.value=!1)}function Ve(e){N.value="",G.value="",be.value="",q.value=[],Z.value=!0,S.value=[],S.value.push(e),Q.value=e}const Mt=[{type:"selection",width:30,align:"left",fixed:"left",hide:({checkList:e})=>!e.includes("勾选列"),selectable:(e,t)=>e.matched_lock=="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("订单号")}],Lt=["勾选列","序号","预定/出库/还料","锁定状态","提供","提供方","实际 / 可用数量","需要数量","预定/出库/还料数量","出库状态","物料ID","物料品牌","物料型号","采购品牌","采购型号","型号规格","详细描述","位号","品牌","是否装配","是否结算","用量 / 每板","预定数量","在制元件","订单号"],Tt={menuList:[{label:"预定",fn:e=>Ke()},{label:"出库",fn:e=>Ge()},{label:"还料",fn:e=>Je()}]};function Ft(e,t,a){a.preventDefault();const{x:u,y:L}=a;ua({el:a.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)"},...Tt}).show(u,L)}const Wt=ot(()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"]);function Dt(e){}const Rt=e=>{fe.value=e,Se()},Ot=e=>{ve.value=e,Se()};function zt(e){ne.pageSize=e,T(s.qo_item_id)}function Bt(e){ne.currentPage=e,T(s.qo_item_id)}function Nt(e){const t=[];l.is_ready_value=0,l.is_takeout=0,l.is_return=0,e.forEach((a,u)=>{a.is_ready_value=="Y"&&(l.is_ready_value=1),a.is_takeout=="Y"&&(l.is_takeout=1),a.is_return=="Y"&&(l.is_return=1),t.push(a.seq_id)}),z.value=t.toString()}function Ce(){Se()}function Pt(){xe.value=!0,Ht(),Vt()}async function Se(){const{data:e}=await wn(Object.assign(h,{page:ve,resault:fe,search_key:he}));Pe.value=e.data,Fe.value=e.total}async function Et(e){w.value=!0;const t=[];let a=0;q.value.forEach((Le,la)=>{Le.quantity>0&&(t.push(Le.quantity),a=a+parseFloat(Le.quantity))});const u=t.toString(),L=S.value[0].part_id,O=S.value[0].qo_item_id,W=S.value[0].seq_id,{data:qn}=await xn(Object.assign(_e,{user_added:1,qo_item_id:O,seq_id:W,part_id:L,trackingNo:Re,express_company:Oe,package_num:ze,inventory_qty_detail:u,localCode:De}));qn==1&&(Z.value=!1,Qe(e),T(O),D.value=1,w.value=!1)}function It(){Z.value=!1,ee.value=!0}function At(e){o.standard_model=e.real_name,o.description=e.value,he.value=e.real_name,o.name=e.real_name,ee.value=!0,S.value=[],S.value.push(e),Q.value=e,Ce()}function jt(){Ce()}function Ue(){const e=S.value[0].max_stock_seq,t=S.value[0].max_seq_no,a=t.substring(0,12),u=t.replace(a,"");new Date().Format("yyMMdd"),q.value.forEach((O,W)=>{q.value[W].seq_no=e+W+1,q.value[W].idx=W+1,q.value[W].name=a+(parseFloat(u)+W)})}async function $t(){await Cn(Object.assign(r,{page:1,resault:500}))}async function Ye(){const{data:e}=await Sn(Object.assign(c,{name:Ie.value.quantity}));je.value=e}async function Ht(){const{data:e}=await Mn(Object.assign(x,{}));Ee.value=e}async function Vt(){const{data:e}=await Ln(Object.assign(F,{}));X.value=e}const ae=n();n([]);const Ut=e=>{e?e.forEach(t=>{ae.value.toggleRowSelection(t,void 0)}):ae.value.clearSelection()};async function Yt(){if(w.value=!0,o.sort_id==""){p.error("请输入物料类别");return}if(o.name==""){p.error("请输入物料编码");return}if(o.qty_unit_id==""){p.error("请选择单位");return}if(o.category==""){p.error("请选择元件类别");return}const{data:e}=await Tn(Object.assign(ue,{name:o.name,standard_model:o.standard_model,part_vendor:o.part_vendor,qty_unit_id:o.qty_unit_id,category:o.category,sort_id:o.sort_id,description:o.description}));e.result=="success"&&(y.value=e.part_id,xe.value=!1,He(),w.value=!1),X.value=e,Ut([X.value[0]])}function Qt(){}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 a in t)new RegExp("("+a+")").test(e)&&(e=e.replace(RegExp.$1,RegExp.$1.length==1?t[a]:("00"+t[a]).substr((""+t[a]).length)));return e};function Gt(){let e=0;if(N.value==""){p.error("请输入总数量");return}if(G.value==""){p.error("请输入卷数量");return}e=parseFloat(G.value),q.value=[];const t=parseFloat(N.value);let a=1;const L=new Date().Format("yyMMdd");if(e==0)q.value.push({quantity:t,name:L+a,idx:a,seq_no:a});else{const O=parseInt(t%e),W=parseInt(t/e);for(a=1;a<=W;a++)q.value.push({quantity:e,name:L+a,idx:a,seq_no:a});O>0&&q.value.push({quantity:O,name:L+a,idx:a,seq_no:a})}I()}function Jt(e){const t=q.value.indexOf(e);q.value.splice(t,1),I(),Ue()}function Me(){let e="";q.value.length>0&&q.value.forEach((L,O)=>{L.quantity>0&&(e=L.quantity)});const a=new Date().Format("yyMMdd"),u=q.value.length+1;q.value.push({quantity:e,name:a+u,idx:u,seq_no:u}),I(),Ue()}function Kt(){Me()}function Xt(){}document.onkeydown=function(e){e.key==="Enter"&&(Me(),I(),Zt(e.key))};const Zt=e=>{e==="Enter"&&document.activeElement.nextElementSibling};function I(){const e=[];let t=0;q.value.forEach((a,u)=>{a.quantity>0&&(e.push(a.quantity),t=t+parseFloat(a.quantity))}),be.value=t}async function en(){ye.value=!0;const{data:e}=await Fn(Object.assign(D,{order_no:k.order_no,customer_no:k.customer_no,part_no:k.part_no,page:1,resault:1e3}));e.data.forEach((t,a)=>{e.data[a].order_time=t.order_time.substring(0,10)}),ge.value=e.data,setTimeout(()=>{ye.value=!1},500)}function Qe(e){Ae.value=!0,me.value=[],me.value.push(e),Q.value=e}function tn(){const e=[];Ne.value.forEach((t,a)=>{e.push(t.part_keep_id)}),window.open(rt.value+"&part_id="+Be.value[0].part_id+"&part_keep_id_str="+e.toString())}function nn(){let e=parseFloat(We.value),t=0;K.value.forEach((a,u)=>{t=parseFloat(a.used_amount)-parseFloat(a.sum_reserved_qty),e>0&&(t>=e?(K.value[u].reserved_qty=e,e=0):(K.value[u].reserved_qty=t,e=e-t))})}const an=e=>{e&&e.resetFields()};async function on(){if(s.search==""){p.error("请输入查询订单");return}const{data:e}=await Wn(Object.assign(le,{search_key:s.search}));e.result=="success"?T(e.qo_item_id):e.result=="failure"&&(p.error("没有该订单"),J.value=[],s.orderNum="")}function sn(){qe.value=!0}function rn(e){s.orderNum=e.orderNum,s.qo_item_id=e.qo_item_id,s.search=e.search,T(s.qo_item_id)}function un(e){T(s.qo_item_id)}async function ln(e,t){const{data:a}=await Bn(Object.assign($,{qo_item_id:e.qo_item_id,seq_id:e.seq_id,lockAction:t}));a.result==1&&(t=="un-lock"?p({type:"success",message:"解锁成功"}):t=="lock"&&p({type:"success",message:"锁定成功"}),T(e.qo_item_id))}function _n(e){let t="",a="";e.matched_lock=="lock"?a="un-lock":e.matched_lock=="un-lock"&&(a="lock"),a=="un-lock"?t="确定要解锁吗":a=="lock"&&(t="确定要锁定吗"),Qn.confirm(t,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ln(e,a)}).catch(()=>{})}const dn=({row:e,column:t,rowIndex:a,columnIndex:u})=>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},cn=({row:e,column:t,rowIndex:a,columnIndex:u})=>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};function mn(){let e=0,t=!1;if(U.value.forEach((a,u)=>{a.takeout_amount>0&&(t=!0),a.takeout_amount>a.real_amount_in_stock&&(e=1)}),!t){p({type:"error",message:"出库数量必须大于0,请输入"});return}if(e==1){p({type:"error",message:"出库数量不能大于实际数量"});return}fn()}function pn(){let e=!1;if(Y.value.forEach((t,a)=>{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)>0}),!e){p({type:"error",message:"还料数量必须大于0,请输入"});return}vn()}async function fn(){const e=[];let t={};U.value.forEach((u,L)=>{u.takeout_amount>0&&(t.part_id=u.part_id,t.seq_id=u.seq_id,t.part_keep_id=u.part_keep_id,t.takeout_amount=u.takeout_amount,e.push(t),t={})});const{data:a}=await Dn(Object.assign(de,{qo_item_id:s.qo_item_id,data_row:e}));a.result==1?(ke.value=!1,p({type:"success",message:"出库成功"}),T(s.qo_item_id)):p({type:"erroy",message:a.msg})}async function vn(){const e=[];let t={};Y.value.forEach((u,L)=>{u.return_amountText>0&&(t.seq_id=u.seq_id,t.part_tempflow_id=u.part_tempflow_id,t.return_amount=u.return_amountText,t.part_id=u.part_id,t.return_lock_code=u.return_lock_code,t.loss_qty=u.loss_qty,e.push(t),t={})});const{data:a}=await Rn(Object.assign(ce,{qo_item_id:s.qo_item_id,data_row:e}));a.result==1?(we.value=!1,p({type:"success",message:"还料成功"}),T(s.qo_item_id)):p({type:"erroy",message:a.msg})}function hn(e){e.loss_qty=e.take_out_amount-e.return_amount-e.used_amount-e.return_amountText,isNaN(e.loss_qty)&&(e.loss_qty="")}function bn(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)}async function Ge(){if(z.value.length==0){p({type:"error",message:"请选择订单"});return}if(l.is_takeout==0){p({type:"error",message:"所选订单不能出库"});return}const{data:e}=await Xe(Object.assign(P,{takeReturn:"takeout",qo_item_id:s.qo_item_id,seq_id_str:z.value}));e.result==1&&(U.value=e.datas,ke.value=!0)}async function Je(){if(z.value.length==0){p({type:"error",message:"请选择订单"});return}if(l.is_return==0){p({type:"error",message:"所选订单不能还料"});return}const{data:e}=await Xe(Object.assign(_,{takeReturn:"return",qo_item_id:s.qo_item_id,seq_id_str:z.value}));e.result==1&&(Y.value=e.datas,we.value=!0)}async function Ke(){if(z.value.length==0){p({type:"error",message:"请选择订单"});return}if(l.is_ready_value==0){p({type:"error",message:"所选订单不能预定"});return}te.value=!0;const{data:e}=await On(Object.assign(v,{qo_item_id:s.qo_item_id,seq_id_str:z.value}));pe.value=e,te.value=!0,e.result==1?(pe.value=e,te.value=!0):p({type:"error",message:e.msg})}function gn(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)}function yn(){f.qo_item_id&&T(f.qo_item_id)}return Vn(()=>{Ye(),$t(),yn()}),{workshop_list:bt,po_list:gt,selectList:Lt,form:i,loading:ye,columns:Mt,dataList:J,pagination:ne,buttonClass:Wt,onSearch:en,resetForm:an,handleUpdate:Dt,handleSizeChange:zt,handleCurrentChange:Bt,handleSelectionChange:Nt,poNumber:vt,supplierValueId:ht,searchList:ge,singleTableRef:$e,singleTableRef1:xt,selectClick:Ct,selectClick1:St,supplierValue:kt,dialogTableVisible:qe,dialogWarehousing:Z,warehousingData:S,onSelectVolume:Ye,volumeDataList:je,volumeValue:Ie,trackingNo:Re,expressCompany:Oe,packagenNum:ze,btnPoInventoryToLocal:Et,automaticallyList:q,btnAutomatically:Gt,currentReceiptQuantity:be,handMovementNum:G,checked:ft,addRoll:Me,delRoll:Jt,localCode:De,tableDialogPrint:Ae,openPrintDialog:Qe,tableDialogMate:ee,openMateDialog:At,printBeltData:yt,printBeltData1:qt,printList:Be,printList1:Ne,printList2:K,quantityNum:pt,btnPrintLabel:tn,btnAutofill:nn,real_stock_total:We,trackingData:mt,currentRow:Q,PartList:Pe,handleSizeChange1:Rt,handleCurrentChange1:Ot,btnSearchPart:Ce,search_key:he,PartListTotal:Fe,small:ut,background:lt,disabled:_t,currentSizeChange:fe,currentMatePage:ve,currentSizeChange1:dt,currentMatePage1:ct,btnAddPart:Pt,addPartDialog:xe,PartSortValue:E,partSortData:Ee,changeSortValue:Qt,partUnitData:X,partTypeData:wt,addPartSubmin:Yt,partAddModel:o,multipleTableRef:ae,btnSubmin:He,btnRematch:It,changeInput:I,scopeQuantity:V,enter:Kt,strname:H,focus:Xt,openDialog:Ve,from:D,parameters:k,bomNum:s,handMovementNum_sum:N,bomListBySearcht:on,printRowData:me,changeSearch_key:jt,btnDialogTableVisible:sn,fullscreenLoading:w,eventIsNum:rn,eventIsNum1:un,lockOpen:_n,outDialog:ke,outBound:U,objectSpanMethod:cn,objectSpanMethod1:dn,submitOut:mn,changeTakeoutAmount:bn,changeTakeoutAmount1:hn,returnDialog:we,returnBound:Y,submitReturn:pn,btnOutDialog:Ge,btnReturnDialog:Je,btnPredetermine:Ke,predetermineDialog:te,predetermineData:pe,showMouseMenu:Ft,blurRemove:gn}}export{wa as useEqu};