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/hookCustomerSupply-46f2ed11.js
import"./index-cd902a19.js";import{CustomerInvMatch as Ct,getPartList as Et,CustomerInventoryToLacal as Lt,createPartSend as Nt,getSelectVolume as Rt,getPartSort as wt,getPartUnit as It,putPartNew as Ft,getPartOrderList as Ot,getBomListBySearch as Tt,getBomListByItem as Wt}from"./po-9e920be8.js";import{b7 as m}from"./message-2472a54a.js";import{A as o,r as t,c as jt,o as At}from"./runtime-core.esm-bundler-6128546f.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./vue-router-a383d220.js";import"./utils-2ab4f76a.js";function Xt(){const _e=o({page:"",results:""}),pe=o({});o({qo_item_id:"",seq_id:""}),o({qo_item_id:"",seq_id:""});const fe=o({qo_item_id:"",provider:"N",page:1,resault:""}),u=o({orderNum:"",qo_item_id:"",search:""}),s=o({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),y=o({order_no:"",customer_no:"",part_no:""}),_=t(!1),$=t(!1),ve=o({}),ge=o({}),he=o({}),ye=o({}),qe=o({}),be=o({page:1,resault:"",search_key:""}),ke=o({qo_item_id:"",seq_id:""});o({page:"",results:""});const Se=o({trackingNo:"123456",trackingDetail:[{name:"test1",quantitty:"100"},{name:"test2",quantity:"200"}]}),v=t(1),E=t(),q=t(""),xe=t(""),De=t(""),L=t("N"),Pe=t(""),Me=t(""),Ce=t(""),N=t([]),Q=t([]),Ee=t(!1),Le=t(!1),Ne=t(!1),R=t(10),w=t(1),Re=t(10),we=t(1),Y=t(""),I=t(""),b=t({}),Ie=t({}),H=t(""),Fe=t(""),F=t(""),Oe=t(!1);t("");const k=t(""),O=t(0),J=t(""),K=t(""),G=t(""),Te=t(""),We=t(""),S=t([]),je=t([]),Ae=t([]),T=t([]),r=t([]),Ve=t([]),X=t([]),Z=t([]),x=t([]),ee=t([]),te=t([]),D=t([]),ze=t([]),W=t(!1);t({});const Be=t(""),ae=t(""),j=t(!1),P=t(!1),ne=t(!1),M=t(!1),A=t(!1),ie=t([]),i=t([]),Ue=t([{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"}]),g=o({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),oe=t(),$e=t();async function p(e){const{data:a}=await Wt(Object.assign(fe,{qo_item_id:e,provider:"N",page:g.currentPage,resault:g.pageSize}));S.value=a.data,g.total=a.total,j.value=!1,u.orderNum=a.data[0].sn_order}const Qe=(e,a)=>{if(u.orderNum=a.sn_order,u.search=a.sn_order,u.qo_item_id=a.qo_item_id,e.length>1){const n=e.shift();oe.value.toggleRowSelection(n,!1)}T.value.forEach((n,l)=>{n.po_id==a.po_id}),p(a.qo_item_id)},Ye=(e,a)=>{if(e.length>1){const n=e.shift();C.value.toggleRowSelection(n,!1)}v.value!=a.part_id?v.value=a.part_id:v.value=""};async function se(){_.value=!0;const{data:e}=await Ct(Object.assign(ke,{user_added:1,qo_item_id:r.value[0].qo_item_id,seq_id:r.value[0].seq_id,part_id:v}));e==1&&(M.value=!1,p(r.value[0].qo_item_id),S.value.forEach((a,n)=>{a.seq_id==r.value[0].seq_id&&(a.part_id=v,re(a))}),_.value=!1)}function re(e){q.value="",k.value="",O.value="",i.value=[],P.value=!0,r.value=[],r.value.push(e),F.value=r.value[0].local_code,b.value=e}const He=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列"),selectable:(e,a)=>!(e.used_amount<e.in_stock_quantity||e.used_amount==e.in_stock_quantity||e.part_id==0||e.part_id=="")},{label:"序号列",prop:"seq_id",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"订单号",prop:"sn_order",minWidth:100,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:150,hide:({checkList:e})=>!e.includes("位号")},{label:"供应商",prop:"vendor",minWidth:120,hide:({checkList:e})=>!e.includes("供应商")},{label:"物料ID",prop:"part_id",minWidth:120,hide:({checkList:e})=>!e.includes("物料ID")},{label:"物料品牌",prop:"vendor_comp_name",minWidth:120,hide:({checkList:e})=>!e.includes("物料品牌")},{label:"物料型号",prop:"standard_model",minWidth:120,hide:({checkList:e})=>!e.includes("物料型号")},{label:"需要数量",prop:"used_amount",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("操作")}],Je=["勾选列","订单号","型号规格","详细描述","位号","供应商","物料ID","物料品牌","物料型号","需要数量","入库数量","入库状态","操作"],Ke=t([{id:1,name:"圆通"},{id:2,name:"中通"},{id:3,name:"申通"},{id:4,name:"京东"},{id:5,name:"顺丰"},{id:6,name:"极兔"},{id:7,name:"自提"},{id:8,name:"送货"}]),Ge=jt(()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"]);function Xe(e){}const Ze=e=>{R.value=e,z()},et=e=>{w.value=e,z()};function tt(e){g.pageSize=e,p(u.qo_item_id)}function at(e){g.currentPage=e,p(u.qo_item_id)}function nt(e){Q.value=e}function V(){z()}function it(){A.value=!0,ct(),dt()}async function z(){const{data:e}=await Et(Object.assign(be,{page:w,resault:R,search_key:I}));ee.value=e.data,Y.value=e.total}async function ot(e){const a=[];let n=0;i.value.forEach((U,Vt)=>{U.quantity>0&&(a.push(U.quantity),n=n+parseFloat(U.quantity))});const l=a.toString(),d=r.value[0].part_id,f=r.value[0].qo_item_id,c=r.value[0].seq_id,{data:me}=await Lt(Object.assign(qe,{user_added:1,qo_item_id:f,seq_id:c,part_id:d,trackingNo:J,express_company:K,package_num:G,inventory_qty_detail:l,localCode:F,is_package:L}));me.result==1?(_.value=!0,P.value=!1,de(e),p(f),E.value=1,_.value=!1):m({type:"error",message:me.msg})}function st(){P.value=!1,M.value=!0}function rt(e){s.standard_model=e.real_name,s.description=e.value,I.value=e.real_name,s.name=e.real_name,M.value=!0,r.value=[],r.value.push(e),b.value=e,V()}function lt(){V()}function le(){const e=r.value[0].max_stock_seq,a=r.value[0].max_seq_no,n=a.substring(0,12),l=a.replace(n,"");new Date().Format("yyMMdd"),i.value.forEach((f,c)=>{i.value[c].seq_no=e+c+1,i.value[c].idx=c+1,i.value[c].name=n+(parseFloat(l)+c)})}async function ut(){await Nt(Object.assign(Se,{page:1,resault:500}))}async function ue(){const{data:e}=await Rt(Object.assign(pe,{name:ae.value.quantity}));ie.value=e}async function ct(){const{data:e}=await wt(Object.assign(ve,{}));te.value=e}async function dt(){const{data:e}=await It(Object.assign(ge,{}));D.value=e}const C=t();t([]);const mt=e=>{e?e.forEach(a=>{C.value.toggleRowSelection(a,void 0)}):C.value.clearSelection()};async function _t(){if(_.value=!0,s.sort_id==""){m.error("请输入物料类别");return}if(s.name==""){m.error("请输入物料编码");return}if(s.qty_unit_id==""){m.error("请选择单位");return}if(s.category==""){m.error("请选择元件类别");return}const{data:e}=await Ft(Object.assign(he,{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}));e.result=="success"&&(v.value=e.part_id,A.value=!1,se(),_.value=!1),D.value=e,mt([D.value[0]])}function pt(){}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 n in a)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,RegExp.$1.length==1?a[n]:("00"+a[n]).substr((""+a[n]).length)));return e};function ft(){let e=0;if(q.value==""){m.error("请输入总数量");return}if(k.value==""){m.error("请输入卷数量");return}e=parseFloat(k.value),i.value=[];const a=parseFloat(q.value);let n=1;const d=new Date().Format("yyMMdd");if(e==0)i.value.push({quantity:a,name:d+n,idx:n,seq_no:n});else{const f=parseInt(a%e),c=parseInt(a/e);for(n=1;n<=c;n++)i.value.push({quantity:e,name:d+n,idx:n,seq_no:n});f>0&&i.value.push({quantity:f,name:d+n,idx:n,seq_no:n})}h()}function vt(e){const a=i.value.indexOf(e);i.value.splice(a,1),h(),le()}function B(){let e="";i.value.length>0&&i.value.forEach((d,f)=>{d.quantity>0&&(e=d.quantity)});const n=new Date().Format("yyMMdd"),l=i.value.length+1;i.value.push({quantity:e,name:n+l,idx:l,seq_no:l}),h(),le()}function gt(){B()}function ht(){}document.onkeydown=function(e){e.key==="Enter"&&(B(),h(),yt(e.key))};const yt=e=>{e==="Enter"&&document.activeElement.nextElementSibling};function h(){const e=[];let a=0;i.value.forEach((n,l)=>{n.quantity>0&&(e.push(n.quantity),a=a+parseFloat(n.quantity))}),O.value=a}async function ce(){W.value=!0;const{data:e}=await Ot(Object.assign(E,{order_no:y.order_no,customer_no:y.customer_no,part_no:y.part_no,page:1,resault:1e3}));e.data.forEach((a,n)=>{e.data[n].order_time=a.order_time.substring(0,10)}),T.value=e.data,setTimeout(()=>{W.value=!1},500)}function de(e){ne.value=!0,N.value=[],N.value.push(e),b.value=e}function qt(){const e=[];Z.value.forEach((a,n)=>{e.push(a.part_keep_id)}),window.open(Ce.value+"&part_id="+X.value[0].part_id+"&part_keep_id_str="+e.toString())}function bt(){let e=parseFloat(H.value),a=0;x.value.forEach((n,l)=>{a=parseFloat(n.used_amount)-parseFloat(n.sum_reserved_qty),e>0&&(a>=e?(x.value[l].reserved_qty=e,e=0):(x.value[l].reserved_qty=a,e=e-a))})}const kt=e=>{e&&(e.resetFields(),ce())};async function St(){if(u.search==""){m.error("请输入查询订单");return}const{data:e}=await Tt(Object.assign(ye,{search_key:u.search}));e.result=="success"?p(e.qo_item_id):e.result=="failure"&&(m.error("没有该订单"),S.value=[],u.orderNum="")}function xt(){j.value=!0}function Dt(e){e==!0?L.value="Y":L.value="N"}function Pt(){$.value=!0}function Mt(e){p(e)}return At(()=>{ue(),ut()}),{workshop_list:je,po_list:Ae,selectList:Je,form:_e,loading:W,columns:He,dataList:S,pagination:g,buttonClass:Ge,onSearch:ce,resetForm:kt,handleUpdate:Xe,handleSizeChange:tt,handleCurrentChange:at,handleSelectionChange:nt,poNumber:Te,supplierValueId:We,searchList:T,singleTableRef:oe,singleTableRef1:$e,selectClick:Qe,selectClick1:Ye,supplierValue:Be,dialogTableVisible:j,dialogWarehousing:P,warehousingData:r,onSelectVolume:ue,volumeDataList:ie,volumeValue:ae,trackingNo:J,expressCompany:K,packagenNum:G,btnPoInventoryToLocal:ot,automaticallyList:i,btnAutomatically:ft,currentReceiptQuantity:O,handMovementNum:k,checked:Oe,addRoll:B,delRoll:vt,localCode:F,tableDialogPrint:ne,openPrintDialog:de,tableDialogMate:M,openMateDialog:rt,printBeltData:Ve,printBeltData1:ze,printList:X,printList1:Z,printList2:x,quantityNum:Fe,btnPrintLabel:qt,btnAutofill:bt,real_stock_total:H,trackingData:Ie,currentRow:b,PartList:ee,handleSizeChange1:Ze,handleCurrentChange1:et,btnSearchPart:V,search_key:I,PartListTotal:Y,small:Ee,background:Le,disabled:Ne,currentSizeChange:R,currentMatePage:w,currentSizeChange1:Re,currentMatePage1:we,btnAddPart:it,addPartDialog:A,PartSortValue:Me,partSortData:te,changeSortValue:pt,partUnitData:D,partTypeData:Ue,addPartSubmin:_t,partAddModel:s,multipleTableRef:C,btnSubmin:se,btnRematch:st,changeInput:h,scopeQuantity:De,enter:gt,strname:xe,focus:ht,openDialog:re,from:E,parameters:y,bomNum:u,handMovementNum_sum:q,bomListBySearcht:St,printRowData:N,changeSearch_key:lt,btnDialogTableVisible:xt,fullscreenLoading:_,expressCompanyData:Ke,container:Pe,btnContainer:Dt,multipleWarehousingDialog:$,multipleData:Q,btnMultiple:Pt,eventIsNum:Mt}}export{Xt as useEqu};