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/hookNo-41c8b5bc.js
import{getCustomerList as _t,getPartSort as mt,getPartList as pt,getPartUnit as ft,putPartNew as yt,noSingleInventoryToLocal as gt,BomInventoryReserved as vt}from"./po-9e920be8.js";import{b7 as l}from"./message-2472a54a.js";import{r as n,A as c,o as ht}from"./runtime-core.esm-bundler-6128546f.js";import"./index-cd902a19.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 Lt(){const f=n(10),y=n(1),b=n([]),P=n([]),S=n([]),M=n([]),o=n([]),D=n(""),x=n(""),U=n(""),$=c({}),Y=c({}),z=c({}),B=c({});c({page:1,resault:"",search_key:""});const H=c({qo_item_id:"",seq_id:""}),J=c({}),G=c({}),i=c({name:"",standard_model:"",part_vendor:"",qty_unit_id:5,category:"Misc",sort_id:"",description:""}),E=n([]),g=n([]),_=n([]),I=n([]),C=n([]),L=n([]),m=n(!1),v=n(!1),h=n(!1),R=n(""),K=n([{id:1,name:"圆通"},{id:2,name:"中通"},{id:3,name:"申通"},{id:4,name:"京东"},{id:5,name:"顺丰"},{id:6,name:"极兔"},{id:7,name:"自提"},{id:8,name:"送货"}]),w=n(),Q=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"}]),a=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:""}),u=c({trackingNo:"",express_company:"",package_num:1,locationSum:"",location:""});c({tracking_id:"",seq_id:""});async function N(){const{data:t}=await _t(Object.assign($,{page:1,resault:100}));I.value=t.data}function V(t){t==!0?(a.disabled=!1,a.is_customer=!0):(a.disabled=!0,a.is_customer=!1)}function W(t){t==!0?a.auto_part=!0:a.auto_part=!1}async function O(){const{data:t}=await mt(Object.assign(Y,{}));P.value=t,L.value=t}function X(){m.value=!0,p()}async function p(){const{data:t}=await pt(Object.assign(J,{page:y,resault:f,search_key:R}));b.value=t.data,D.value=t.total}function Z(){p()}function tt(){v.value=!0,O(),j()}async function j(){const{data:t}=await ft(Object.assign(z,{}));S.value=t,M.value=t}const et=(t,e)=>{if(t.length>1){const r=t.shift();w.value.toggleRowSelection(r,!1)}a.selectPartId!=e.part_id?(a.selectPartId=e.part_id,a.sort_id=parseInt(e.sort_id),a.name=e.name,a.standard_model=e.standard_model,a.qty_unit_id=e.qty_unit_id,a.category=e.category,a.vendor=e.comp_name,a.description=e.description):a.selectPartId=""},at=t=>{f.value=t,p()},nt=t=>{y.value=t,p()};async function rt(){if(i.sort_id==""){l.error("请输入物料类别");return}if(i.name==""){l.error("请输入物料编码");return}if(i.qty_unit_id==""){l.error("请选择单位");return}if(i.category==""){l.error("请选择元件类别");return}const{data:t}=await yt(Object.assign(B,{name:i.name,standard_model:i.standard_model,part_vendor:i.part_vendor,qty_unit_id:i.qty_unit_id,category:i.category,sort_id:i.sort_id,description:i.description}));t.result=="success"&&(a.selectPartId=t.part_id,v.value=!1,m.value=!1)}function ot(){m.value=!1}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 r in e)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,RegExp.$1.length==1?e[r]:("00"+e[r]).substr((""+e[r]).length)));return t};function F(){const r="M"+new Date().Format("yyMMdd");o.value.forEach((d,s)=>{o.value[s].seq_no=s+1,o.value[s].idx=s+1,o.value[s].name=r+(s+1)})}function it(){let t="";o.value.length>0&&o.value.forEach((s,A)=>{s.quantity>0&&(t=s.quantity)});const e=o.value.length+1,d=new Date().Format("yyMMdd");o.value.push({quantity:t,idx:e,name:d+e,seq_no:e}),q(),F()}function q(){const t=[];let e=0;o.value.forEach((r,d)=>{r.quantity>0&&(t.push(r.quantity),e=e+parseFloat(r.quantity))}),u.locationSum=e}function st(t){const e=o.value.indexOf(t);o.value.splice(e,1),q(),F()}async function ct(t){if(u.trackingNo==""){l.error("请输入运单号");return}if(a.standard_model==""){l.error("请输入型号规格");return}if(a.qty_unit_id==""){l.error("请选择单位");return}let e="N";a.is_customer&&(e="Y");let r="N";a.auto_part&&(r="Y");const d=[];let s=0;o.value.forEach((k,qt)=>{k.quantity>0&&(d.push(k.quantity),s=s+parseFloat(k.quantity))});const A=d.toString(),{data:T}=await gt(Object.assign(G,{is_customer:e,customer_id:a.customerName,real_name:a.name,vendor:a.vendor,description:a.description,match_part_id:a.selectPartId,sort_id:a.sort_id,unit_name:a.qty_unit_id,name:a.name,standard_model:a.standard_model,category:a.category,auto_part:r,trackingNo:u.trackingNo,express_company:u.express_company,package_num:u.package_num,localCode:u.location,inventory_qty_detail:A}));T[0].result==1&&(C.value=T,h.value=!0)}function dt(){let t=parseFloat(x.value),e=0;_.value.forEach((r,d)=>{e=parseFloat(r.used_amount)-parseFloat(r.sum_reserved_qty),t>0?e>=t?(_.value[d].reserved_qty=t,t=0):(_.value[d].reserved_qty=e,t=t-e):_.value[d].reserved_qty=""})}function ut(){const t=[];g.value.forEach((e,r)=>{t.push(e.part_keep_id)}),window.open(U.value+"&part_id="+E.value[0].part_id+"&part_keep_id_str="+t.toString())}async function lt(){const t=[];g.value.forEach((r,d)=>{t.push(r.part_keep_id)});const{data:e}=await vt(Object.assign(H,{part_keep_id_str:t.toString(),reserved_detail:_}));e==1&&(h.value=!1)}return ht(()=>{N(),O(),j()}),{loadCustomerList:N,customerList:I,customerObj:a,btnChecked:V,partSortData:L,tableDialogMate:m,matePart:X,search_key:R,btnSearchPart:Z,PartList:b,PartListTotal:D,btnAddPart:tt,addPartDialog:v,partUnitData:S,partUnitData1:M,selectClick1:et,multipleTableRef:w,currentSizeChange:f,currentMatePage:y,handleSizeChange1:at,handleCurrentChange1:nt,partAddModel:i,partTypeData:Q,addPartSubmin:rt,partSortData1:P,checkedPartId:W,noSingleObj:u,addRoll:it,automaticallyList:o,changeInput:q,delRoll:st,btnSubmin:ot,btnPoInventoryToLocal:ct,printMatchDialog:h,printBeltData:E,printList1:g,printList2:_,btnAutofill:dt,real_stock_total:x,btnPrintLabel:ut,btnReservedConfirm:lt,printRowData:C,expressCompanyData:K}}export{Lt as useEqu};