File: /var/www/html/public/static/js/hookNo-legacy-8a569604.js
System.register(["./po-legacy-1db6aa77.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-c484260e.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./vue-router-legacy-a12307c3.js","./utils-legacy-c0023c33.js"],(function(t,e){"use strict";var a,n,r,i,o,s,d,l,u,c,_;return{setters:[t=>{a=t.getCustomerList,n=t.getPartSort,r=t.getPartList,i=t.getPartUnit,o=t.putPartNew,s=t.noSingleInventoryToLocal,d=t.BomInventoryReserved},t=>{l=t.b7},t=>{u=t.r,c=t.A,_=t.o},null,null,null,null,null,null,null],execute:function(){t("useEqu",(function(){const t=u(10),e=u(1),m=u([]),p=u([]),g=u([]),y=u([]),v=u([]),h=u(""),f=u(""),k=u(""),b=c({}),q=c({}),j=c({}),P=c({});c({page:1,resault:"",search_key:""});const S=c({qo_item_id:"",seq_id:""}),D=c({}),M=c({}),w=c({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),x=u([]),I=u([]),C=u([]),E=u([]),L=u([]),R=u([]),O=u(!1),F=u(!1),N=u(!1),T=u(""),A=u([{id:1,name:"圆通"},{id:2,name:"中通"},{id:3,name:"申通"},{id:4,name:"京东"},{id:5,name:"顺丰"},{id:6,name:"极兔"},{id:7,name:"自提"},{id:8,name:"送货"}]),$=u(),U=u([{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"}]),Y=c({customerName:"",disabled:!0,sort_id:" ",selectPartId:"",description:"",real_name:"",partId:!1,is_customer:!1,auto_part:!1,vendor:"",name:"",standard_model:"",qty_unit_id:"",category:"",sort_id1:""}),z=c({trackingNo:"",express_company:"",package_num:1,locationSum:"",location:""});async function B(){const{data:t}=await a(Object.assign(b,{page:1,resault:100}));E.value=t.data}async function H(){const{data:t}=await n(Object.assign(q,{}));p.value=t,R.value=t}async function J(){const{data:a}=await r(Object.assign(D,{page:e,resault:t,search_key:T}));m.value=a.data,h.value=a.total}async function G(){const{data:t}=await i(Object.assign(j,{}));g.value=t,y.value=t}function K(){const t="M"+(new Date).Format("yyMMdd");v.value.forEach(((e,a)=>{v.value[a].seq_no=a+1,v.value[a].idx=a+1,v.value[a].name=t+(a+1)}))}function Q(){const t=[];let e=0;v.value.forEach(((a,n)=>{a.quantity>0&&(t.push(a.quantity),e+=parseFloat(a.quantity))})),z.locationSum=e}return c({tracking_id:"",seq_id:""}),Date.prototype.Format=function(t){const e={"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(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(const a in e)new RegExp("("+a+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[a]:("00"+e[a]).substr((""+e[a]).length)));return t},_((()=>{B(),H(),G()})),{loadCustomerList:B,customerList:E,customerObj:Y,btnChecked:function(t){1==t?(Y.disabled=!1,Y.is_customer=!0):(Y.disabled=!0,Y.is_customer=!1)},partSortData:R,tableDialogMate:O,matePart:function(){O.value=!0,J()},search_key:T,btnSearchPart:function(){J()},PartList:m,PartListTotal:h,btnAddPart:function(){F.value=!0,H(),G()},addPartDialog:F,partUnitData:g,partUnitData1:y,selectClick1:(t,e)=>{if(t.length>1){const e=t.shift();$.value.toggleRowSelection(e,!1)}Y.selectPartId!=e.part_id?(Y.selectPartId=e.part_id,Y.sort_id=parseInt(e.sort_id),Y.name=e.name,Y.standard_model=e.standard_model,Y.qty_unit_id=e.qty_unit_id,Y.category=e.category,Y.vendor=e.comp_name,Y.description=e.description):Y.selectPartId=""},multipleTableRef:$,currentSizeChange:t,currentMatePage:e,handleSizeChange1:e=>{t.value=e,J()},handleCurrentChange1:t=>{e.value=t,J()},partAddModel:w,partTypeData:U,addPartSubmin:async function(){if(""==w.sort_id)return void l.error("请输入物料类别");if(""==w.name)return void l.error("请输入物料编码");if(""==w.qty_unit_id)return void l.error("请选择单位");if(""==w.category)return void l.error("请选择元件类别");const{data:t}=await o(Object.assign(P,{name:w.name,standard_model:w.standard_model,part_vendor:w.part_vendor,qty_unit_id:w.qty_unit_id,category:w.category,sort_id:w.sort_id,description:w.description}));"success"==t.result&&(Y.selectPartId=t.part_id,F.value=!1,O.value=!1)},partSortData1:p,checkedPartId:function(t){Y.auto_part=1==t},noSingleObj:z,addRoll:function(){let t="";v.value.length>0&&v.value.forEach(((e,a)=>{e.quantity>0&&(t=e.quantity)}));const e=v.value.length+1,a=(new Date).Format("yyMMdd");v.value.push({quantity:t,idx:e,name:a+e,seq_no:e}),Q(),K()},automaticallyList:v,changeInput:Q,delRoll:function(t){const e=v.value.indexOf(t);v.value.splice(e,1),Q(),K()},btnSubmin:function(){O.value=!1},btnPoInventoryToLocal:async function(t){if(""==z.trackingNo)return void l.error("请输入运单号");if(""==Y.standard_model)return void l.error("请输入型号规格");if(""==Y.qty_unit_id)return void l.error("请选择单位");let e="N";Y.is_customer&&(e="Y");let a="N";Y.auto_part&&(a="Y");const n=[];let r=0;v.value.forEach(((t,e)=>{t.quantity>0&&(n.push(t.quantity),r+=parseFloat(t.quantity))}));const i=n.toString(),{data:o}=await s(Object.assign(M,{is_customer:e,customer_id:Y.customerName,real_name:Y.name,vendor:Y.vendor,description:Y.description,match_part_id:Y.selectPartId,sort_id:Y.sort_id,unit_name:Y.qty_unit_id,name:Y.name,standard_model:Y.standard_model,category:Y.category,auto_part:a,trackingNo:z.trackingNo,express_company:z.express_company,package_num:z.package_num,localCode:z.location,inventory_qty_detail:i}));1==o[0].result&&(L.value=o,N.value=!0)},printMatchDialog:N,printBeltData:x,printList1:I,printList2:C,btnAutofill:function(){let t=parseFloat(f.value),e=0;C.value.forEach(((a,n)=>{e=parseFloat(a.used_amount)-parseFloat(a.sum_reserved_qty),t>0?e>=t?(C.value[n].reserved_qty=t,t=0):(C.value[n].reserved_qty=e,t-=e):C.value[n].reserved_qty=""}))},real_stock_total:f,btnPrintLabel:function(){const t=[];I.value.forEach(((e,a)=>{t.push(e.part_keep_id)})),window.open(k.value+"&part_id="+x.value[0].part_id+"&part_keep_id_str="+t.toString())},btnReservedConfirm:async function(){const t=[];I.value.forEach(((e,a)=>{t.push(e.part_keep_id)}));const{data:e}=await d(Object.assign(S,{part_keep_id_str:t.toString(),reserved_detail:C}));1==e&&(N.value=!1)},printRowData:L,expressCompanyData:A}}))}}}));