File: /var/www/html/public/static/js/hookSingleOut-legacy-31e49285.js
System.register(["./po-legacy-fa46c0c2.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-212fb97f.js","./preload-helper-legacy-f8638e03.js","./message-legacy-10af7c73.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,t){"use strict";var a,n,i,o,l,u,s;return{setters:[e=>{a=e.autoPriceHistories,n=e.getPartList,i=e.getPartDetailByIds,o=e.takeoutsingle},e=>{l=e.A,u=e.r,s=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){const e=l({}),t=u([]),c=u([]),r=u(!1),d=u(!1),m=l({}),_=l({}),p=l({}),h=u(1),k=u(""),g=u(10),y=u(""),b=u([]),f=u(!1),v=u(!1),L=l({}),j=l({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),w=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"}]);async function S(){r.value=!0;const{data:t}=await a(Object.assign(e,{page:j.currentPage,results:j.pageSize}));j.total=t.total,r.value=!1}async function C(){const{data:e}=await n(Object.assign(m,{page:h,resault:g,search_key:y}));b.value=e.data,k.value=e.total}return s((()=>{S()})),{loading:r,small:d,columns:[{type:"selection",width:40,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:40,hide:({checkList:e})=>!e.includes("序号列")},{label:"物料 ID",prop:"part_id",minWidth:55,hide:({checkList:e})=>!e.includes("物料 ID")},{label:"物料名称",prop:"name",minWidth:55,hide:({checkList:e})=>!e.includes("物料名称")},{label:"型号规格",prop:"standard_model",minWidth:60,hide:({checkList:e})=>!e.includes("型号规格")},{label:"品牌",prop:"comp_name",minWidth:55,hide:({checkList:e})=>!e.includes("品牌")},{label:"关联订单",prop:"part_no",slot:"relatedOrders",minWidth:160,hide:({checkList:e})=>!e.includes("关联订单")},{label:"库位",prop:"loca_code",minWidth:60,hide:({checkList:e})=>!e.includes("库位")},{label:"数量 / 卷名称",prop:"modality_quantity",minWidth:60,slot:"modality_quantity",hide:({checkList:e})=>!e.includes("数量 / 卷名称")},{label:"卷序号",prop:"stock_modality_seq",minWidth:60,hide:({checkList:e})=>!e.includes("卷序号")},{label:"实际 / 可用数量",prop:"real_amount_in_stock",slot:"real_amount_in_stock",minWidth:60,hide:({checkList:e})=>!e.includes("实际 / 可用数量")},{label:"出库数量",prop:"takeout_amount",slot:"takeout_amount",minWidth:140,hide:({checkList:e})=>!e.includes("出库数量")},{label:"备注",prop:"pth_point_sum",slot:"textarea",minWidth:60,hide:({checkList:e})=>!e.includes("备注")}],pagination:j,handleSizeChange:function(e){j.pageSize=e,S()},handleCurrentChange:function(e){j.currentPage=e,S()},selectList:["物料 ID","物料名称","型号规格","品牌","关联订单","库位","数量 / 卷名称","卷序号","卷名称","实际 / 可用数量","出库数量","备注"],tableDialogMate:f,addPart:function(){f.value=!0,C()},search_key:y,btnSearchPart:function(){C()},PartList:b,handleSizeChange1:e=>{g.value=e,C()},handleCurrentChange1:e=>{h.value=e,C()},PartListTotal:k,partTypeData:w,selectClick1:(e,t)=>{c.value=e},partData:t,btnConfirm:async function(){const e=[];c.value.forEach(((t,a)=>{e.push(t.part_id)}));const a=e.toString(),{data:n}=await i(Object.assign(_,{part_id_str:a})),o=[];t.value.forEach(((e,t)=>{o.push(e.part_id)})),0==o.length?(t.value=n.data,t.value.forEach(((e,t)=>{e.orderNum="",e.takeout_amount="",e.comment=""}))):n.data.forEach(((e,a)=>{o.includes(e.part_id)||(e.orderNum="",e.takeout_amount="",e.comment="",t.value.push(e))})),f.value=!1,C()},objectSpanMethod:({row:e,column:t,rowIndex:a,columnIndex:n})=>"loca_code"==t.property||"modality_quantity"==t.property||"stock_modality_seq"==t.property||"real_amount_in_stock"==t.property||"takeout_amount"==t.property?{rowspan:1,colspan:1}:e.seq_seq_id>0?{rowspan:0,colspan:0}:{rowspan:e.counter,colspan:1},dialogTableVisible:v,btnSelect:function(e){t.value.forEach(((t,a)=>{t.orderNum1="",t.part_keep_id==e.part_keep_id&&(t.orderNum1=1)})),L.value=e,v.value=!0},bomNum:L,eventIsNum:function(e){t.value.forEach(((t,a)=>{1==t.orderNum1&&(t.orderNum=e.orderNum)})),C()},btnSubmit:async function(){await o(Object.assign(p,{data_row:t}))},btntakeoutAmount:function(e){e.real_amount_in_stock>e.ours_amount_in_stock||e.real_amount_in_stock==e.ours_amount_in_stock?e.takeout_amount>e.ours_amount_in_stock&&(alert("出库数量"+e.takeout_amount+"不能大于可用数量"+e.ours_amount_in_stock),e.takeout_amount=e.ours_amount_in_stock):e.takeout_amount>e.real_amount_in_stock&&(alert("出库数量"+e.takeout_amount+"不能大于实际数量"+e.real_amount_in_stock),e.takeout_amount=e.real_amount_in_stock)}}}))}}}));