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/hook-legacy-9ee017bc.js
System.register(["./index-legacy-4d0149c6.js","./po-legacy-0cc6360b.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.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(e,a){"use strict";var t,n,i,l,o,r,u,s,c,d,p,_,v,m,h,g,y;return{setters:[null,e=>{t=e.PoDetailSeqMatch,n=e.getPartList,i=e.PoInventoryToLocal,l=e.createPartSend,o=e.getSelectVolume,r=e.getPartSort,u=e.getPartUnit,s=e.putPartNew,c=e.getPoList1,d=e.PoInventoryReserved,p=e.getPoIdBySearch,_=e.getPoDetail},e=>{v=e.b7},e=>{m=e.A,h=e.r,g=e.c,y=e.o},null,null,null,null,null,null],execute:function(){e("useEqu",(function(){const e=m({name:"",workshop:""}),a=m({}),f=m({});m({po_id:"",seq_id:""});const b=m({po_id:"",seq_id:""}),k=m({po_id:"",page:1,resault:""}),q=m({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),w=h(!1),S=h([]),D=h([]),L=m({}),x=m({}),P=m({}),j=m({}),M=m({page:1,resault:"",search_key:""}),E=m({po_id:"",seq_id:""}),C=m({orderNum:"",po_id:"",search:""}),R=m({trackingNo:"123456",trackingDetail:[{name:"test1",quantitty:"100"},{name:"test2",quantity:"200"}]}),I=h(""),N=h(),F=h(""),O=h("N"),W=h(""),T=h(""),V=h(""),z=h(""),A=h(""),B=h(!1),$=h(!1),U=h(!1),H=h(10),Q=h(1),Y=h(""),J=h(""),G=h(""),K=h({}),X=h({}),Z=h(""),ee=h(""),ae=h(""),te=h(!1);h("");const ne=h(""),ie=h(0),le=h(""),oe=h(""),re=h(""),ue=h(""),se=h(""),ce=h([]),de=h([]),pe=h([]),_e=h([]),ve=h([]),me=h([]),he=h([]),ge=h([]),ye=h([]),fe=h([]),be=h([]),ke=h([]),qe=h([]),we=h(!1);h({});const Se=h(""),De=h(""),Le=h(!1),xe=h(!1),Pe=h(!1),je=h(!1),Me=h(!1),Ee=h(!1),Ce=h([]),Re=h([]),Ie=h([{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=h([{id:1,name:"圆通"},{id:2,name:"中通"},{id:3,name:"申通"},{id:4,name:"京东"},{id:5,name:"顺丰"},{id:6,name:"极兔"},{id:7,name:"自提"},{id:8,name:"送货"}]),Fe=m({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSize:10}),Oe=h(),We=h();async function Te(e){const{data:a}=await _(Object.assign(k,{po_id:e,page:1,resault:1e3}));ce.value=a,Le.value=!1,Fe.total=a.length,C.orderNum=a[0].po_number}async function Ve(){if(""==I.value)return void v({type:"error",message:"请选择元件"});w.value=!0;const{data:e}=await t(Object.assign(E,{user_added:1,po_id:ve.value[0].po_id,seq_id:ve.value[0].seq_id,part_id:I}));1==e&&(je.value=!1,Te(ve.value[0].po_id),ce.value.forEach(((e,a)=>{e.seq_id==ve.value[0].seq_id&&(e.part_id=I,ze(e))})),w.value=!1)}function ze(e){W.value="",ne.value="",ie.value="",Re.value=[],xe.value=!0,ve.value=[],ve.value.push(e),ae.value=ve.value[0].local_code,K.value=e}const Ae=g((()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"]));function Be(){$e()}async function $e(){const{data:e}=await n(Object.assign(M,{page:Q,resault:H,search_key:J}));fe.value=e.data,Y.value=e.total}function Ue(){const e=ve.value[0].max_stock_seq,a=ve.value[0].max_seq_no,t=a.substring(0,7),n=a.replace(t,"");(new Date).Format("yyMMdd"),Re.value.forEach(((a,i)=>{Re.value[i].seq_no=e+i+1,Re.value[i].idx=i+1,Re.value[i].name=t+(parseFloat(n)+i)}))}async function He(){const{data:e}=await o(Object.assign(f,{name:De.value.quantity}));Ce.value=e}async function Qe(){const{data:e}=await r(Object.assign(L,{}));be.value=e}async function Ye(){const{data:e}=await u(Object.assign(x,{}));ke.value=e}const Je=h();h([]);const Ge=e=>{e?e.forEach((e=>{Je.value.toggleRowSelection(e,void 0)})):Je.value.clearSelection()};function Ke(){let e="";Re.value.length>0&&Re.value.forEach(((a,t)=>{a.quantity>0&&(e=a.quantity)}));const a=(new Date).Format("yyMMdd"),t=Re.value.length+1;Re.value.push({quantity:e,name:a+t,idx:t,seq_no:t}),Ze(),Ue()}Date.prototype.Format=function(e){const a={"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 t in a)new RegExp("("+t+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?a[t]:("00"+a[t]).substr((""+a[t]).length)));return e},document.onkeydown=function(e){"Enter"===e.key&&(Ke(),Ze(),Xe(e.key))};const Xe=e=>{"Enter"===e&&document.activeElement.nextElementSibling};function Ze(){const e=[];let a=0;Re.value.forEach(((t,n)=>{t.quantity>0&&(e.push(t.quantity),a+=parseFloat(t.quantity))})),ie.value=a}async function ea(){we.value=!0;const{data:a,total:t}=await c(Object.assign(e,{ponumber:ue,param_key:G,part_distr_id:Se.value,page:Fe.currentPage,resault:50}));a.forEach(((e,t)=>{a[t].date_added=e.date_added.substring(0,10)})),_e.value=a,setTimeout((()=>{we.value=!1}),500)}function aa(e){Pe.value=!0,S.value=[],S.value.push(e),K.value=e}return y((()=>{He(),async function(){await l(Object.assign(R,{page:1,resault:500}))}()})),{workshop_list:de,po_list:pe,selectList:["勾选列","采购单","名称","元件ID","型号名称","供应商","单位","采购品牌","采购型号","关联订单号","采购数量","入库数量","入库状态","操作"],form:e,loading:we,columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列"),selectable:(e,a)=>!(e.in_stock_quantity>e.quantity||e.in_stock_quantity==e.quantity||0==e.part_id||""==e.part_id)},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"采购单",prop:"po_number",minWidth:100,hide:({checkList:e})=>!e.includes("采购单")},{label:"名称",prop:"name",minWidth:100,hide:({checkList:e})=>!e.includes("名称")},{label:"元件ID",prop:"part_id",minWidth:100,hide:({checkList:e})=>!e.includes("元件ID")},{label:"型号名称",prop:"final_part_name",minWidth:150,hide:({checkList:e})=>!e.includes("型号名称")},{label:"供应商",prop:"vendor",minWidth:120,hide:({checkList:e})=>!e.includes("供应商")},{label:"单位",prop:"qty_unit",minWidth:80,hide:({checkList:e})=>!e.includes("单位")},{label:"采购品牌",prop:"final_vendor",minWidth:100,hide:({checkList:e})=>!e.includes("采购品牌")},{label:"采购型号",prop:"final_part_name",minWidth:120,hide:({checkList:e})=>!e.includes("采购型号")},{label:"关联订单号",prop:"sn_order",minWidth:120,hide:({checkList:e})=>!e.includes("关联订单号")},{label:"采购数量",prop:"quantity",minWidth:80,fixed:"right",hide:({checkList:e})=>!e.includes("采购数量")},{label:"入库数量",prop:"in_stock_quantity",minWidth:80,fixed:"right",hide:({checkList:e})=>!e.includes("入库数量")},{label:"入库状态",width:100,slot:"state",fixed:"right",hide:({checkList:e})=>!e.includes("入库状态")},{label:"操作",fixed:"right",width:160,slot:"operation",hide:({checkList:e})=>!e.includes("操作")}],dataList:ce,pagination:Fe,buttonClass:Ae,onSearch:ea,resetForm:e=>{e&&(e.resetFields(),ea())},handleUpdate:function(e){},handleSizeChange:function(e){Fe.pageSize=e,Te(C.po_id)},handleCurrentChange:function(e){Fe.currentPage=e,Te(C.po_id)},handleSelectionChange:function(e){D.value=e},poNumber:ue,supplierValueId:se,searchList:_e,objectSpanMethod:({row:e,column:a,rowIndex:t,columnIndex:n})=>n>3?{rowspan:1,colspan:1}:e.seq_seq_id>0?{rowspan:0,colspan:0}:{rowspan:e.counter,colspan:1},singleTableRef:Oe,singleTableRef1:We,selectClick:(e,a)=>{if(C.orderNum=a.po_number,C.search=a.po_number,C.po_id=a.po_id,e.length>1){const a=e.shift();Oe.value.toggleRowSelection(a,!1)}_e.value.forEach(((e,t)=>{e.po_id,a.po_id})),Te(a.po_id)},selectClick1:(e,a)=>{if(e.length>1){const a=e.shift();Je.value.toggleRowSelection(a,!1)}I.value!=a.part_id?I.value=a.part_id:I.value=""},supplierValue:Se,dialogTableVisible:Le,dialogWarehousing:xe,warehousingData:ve,onSelectVolume:He,volumeDataList:Ce,volumeValue:De,trackingNo:le,expressCompany:oe,packagenNum:re,btnPoInventoryToLocal:async function(e){const a=[];let t=0;Re.value.forEach(((e,n)=>{e.quantity>0&&(a.push(e.quantity),t+=parseFloat(e.quantity))}));const n=a.toString(),l=ve.value[0].part_id,o=ve.value[0].po_id,r=ve.value[0].seq_id,{data:u}=await i(Object.assign(j,{user_added:1,po_id:o,seq_id:r,part_id:l,trackingNo:le,express_company:oe,package_num:re,to_inventory_qty:ie,roll_id:De.value,roll_userdefined:te.value,roll_userdefined_qty:ne,inventory_qty_detail:n,localCode:ae,is_package:O}));1==u.result?(w.value=!0,aa(e),N.value=1,Te(o),xe.value=!1,w.value=!1):v({type:"error",message:u.msg})},automaticallyList:Re,btnAutomatically:function(){let e=0;if(""==W.value)return void v.error("请输入总数量");if(""==ne.value)return void v.error("请输入卷数量");e=parseFloat(ne.value),Re.value=[];const a=parseFloat(W.value);let t=1;const n=(new Date).Format("yyMMdd");if(0==e)Re.value.push({quantity:a,name:n+t,idx:t,seq_no:t});else{const i=parseInt(a%e),l=parseInt(a/e);for(t=1;t<=l;t++)Re.value.push({quantity:e,name:n+t,idx:t,seq_no:t});i>0&&Re.value.push({quantity:i,name:n+t,idx:t,seq_no:t})}Ze()},currentReceiptQuantity:ie,handMovementNum:ne,checked:te,addRoll:Ke,delRoll:function(e){const a=Re.value.indexOf(e);Re.value.splice(a,1),Ze(),Ue()},localCode:ae,tableDialogPrint:Pe,openPrintDialog:aa,tableDialogMate:je,openMateDialog:function(e){e.final_part_name?(J.value=e.final_part_name,q.name=e.final_part_name,q.description=e.name):(q.name=e.name,J.value=e.name),q.part_vendor=e.final_vendor,je.value=!0,ve.value=[],ve.value.push(e),K.value=e,Be()},printBeltData:me,printBeltData1:qe,printList:he,printList1:ge,printList2:ye,quantityNum:ee,btnPrintLabel:function(){const e=[];ge.value.forEach(((a,t)=>{e.push(a.part_keep_id)})),window.open(F.value+"&part_id="+he.value[0].part_id+"&part_keep_id_str="+e.toString())},btnAutofill:function(){let e=parseFloat(Z.value),a=0;ye.value.forEach(((t,n)=>{a=parseFloat(t.used_amount)-parseFloat(t.sum_reserved_qty),e>0&&(a>=e?(ye.value[n].reserved_qty=e,e=0):(ye.value[n].reserved_qty=a,e-=a))}))},real_stock_total:Z,trackingData:X,btnReservedConfirm:async function(){const e=me.value[0].po_id,a=me.value[0].seq_id,t=[];ge.value.forEach(((e,a)=>{t.push(e.part_keep_id)}));const{data:n}=await d(Object.assign(b,{po_id:e,seq_id:a,user_added:"1",part_keep_id_str:t.toString(),reserved_detail:ye}));1==n&&(Pe.value=!1)},currentRow:K,PartList:fe,handleSizeChange1:e=>{H.value=e,$e()},handleCurrentChange1:e=>{Q.value=e,$e()},btnSearchPart:Be,search_key:J,PartListTotal:Y,small:B,background:$,disabled:U,currentSizeChange:H,currentMatePage:Q,btnAddPart:function(){Me.value=!0,Qe(),Ye()},addPartDialog:Me,PartSortValue:A,partSortData:be,changeSortValue:function(){},partUnitData:ke,partTypeData:Ie,addPartSubmin:async function(){if(w.value=!0,""==q.sort_id)return void v.error("请输入物料类别");if(""==q.name)return void v.error("请输入物料编码");if(""==q.qty_unit_id)return void v.error("请选择单位");if(""==q.category)return void v.error("请选择元件类别");const{data:e}=await s(Object.assign(P,{name:q.name,standard_model:q.standard_model,part_vendor:q.part_vendor,qty_unit_id:q.qty_unit_id,category:q.category,sort_id:q.sort_id,description:q.description}));"success"==e.result&&(I.value=e.part_id,Me.value=!1,Ve(),w.value=!1),ke.value=e,Ge([ke.value[0]])},partAddModel:q,multipleTableRef:Je,btnSubmin:Ve,btnRematch:function(){xe.value=!1,je.value=!0},changeInput:Ze,scopeQuantity:z,enter:function(){Ke()},strname:V,focus:function(){},openDialog:ze,from:N,bomNum:C,handMovementNum_sum:W,printRowData:S,poIdBySearch:async function(){if(""==C.search)return void v.error("请输入查询订单");const{data:e}=await p(Object.assign(a,{search_key:C.search}));"success"==e.result?Te(e.po_id):"failure"==e.result&&(v.error("没有该订单"),ce.value=[],C.orderNum="")},changeSearch_key:function(){Be()},btnDialogTableVisible:function(){Le.value=!0},fullscreenLoading:w,param_key:G,expressCompanyData:Ne,container:T,btnContainer:function(e){O.value=1==e?"Y":"N"},multipleWarehousingDialog:Ee,btnMultiple:function(){Ee.value=!0},multipleData:D,eventIsNum:function(e){Te(e)}}}))}}}));