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/print-2fd112d4.js
import{ab as Q,b7 as G}from"./message-2472a54a.js";import{getBusinessSeq as H,BomInventoryReserved as J}from"./po-4f5ed739.js";import{d as F,A as E,r as v,w as K,o as W,Q as R,e as p,f as b,g as o,n as c,x as h,t as m,y as t,m as n,v as x,l as V,p as X,b5 as Y,b4 as Z}from"./runtime-core.esm-bundler-6128546f.js";import{_ as ee}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-74d93170.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";const u=w=>(Y("data-v-792000c0"),w=w(),Z(),w),te={class:"main"},oe={class:"dialog_procure_box tracking_box_flex"},ae={class:"tracking_box"},le={class:"waybill_desc_flex"},se={class:"tracking_number"},re=u(()=>o("div",{class:"tracking_No"},"运单号",-1)),ie={class:"tracking_box1"},ne={class:"waybill_desc_flex"},_e={class:"tracking_number"},de=u(()=>o("div",{class:"tracking_No"},"快递公司",-1)),pe={class:"tracking_box2"},ce={class:"waybill_desc_flex"},ue={class:"tracking_number"},ve=u(()=>o("div",{class:"tracking_No"},"包裹数量",-1)),me={key:0,class:"legend"},fe={key:1,class:"legend"},be={key:2,class:"legend"},he=u(()=>o("legend",{class:"legend"},"收货单信息",-1)),we=u(()=>o("legend",{class:"legend"},"收货单信息",-1)),ge={class:"fieldset"},ye=u(()=>o("legend",{class:"legend"},"库位信息",-1)),ke={class:"primary_box1"},xe={class:"total_num"},qe={key:0,class:"fieldset_top"},De=u(()=>o("legend",{class:"legend"},"自动预定",-1)),Re={key:0,class:"reservation_required"},Ce={class:"dialog_procure_box"},Be=u(()=>o("div",null,"可预定数量",-1)),Ie=["onUpdate:modelValue"],Ne={class:"primary_box button_flex"},Pe=F({name:"/crm/inventory/components/print"}),Se=F({...Pe,props:{printRowData:{type:Array,default:""},str:{type:String,default:""},tableDialogPrint:{type:Boolean,default:""}},emits:["update:tableDialogPrint"],setup(w,{emit:C}){const a=w,$=E({tracking_id:"",qo_item_id:"",po_id:"",seq_id:""}),A=E({}),B=v(""),I=v(""),f=v(""),q=v({}),g=v([]),y=v([]),r=v([]);K(()=>a.printRowData,s=>{a.printRowData=s,N()});async function N(){let s="",l="",e="",i="";a.printRowData[0].tracking_id>0&&(s=a.printRowData[0].tracking_id),a.printRowData[0].qo_item_id>0&&(l=a.printRowData[0].qo_item_id),a.printRowData[0].po_id>0&&(e=a.printRowData[0].po_id),a.printRowData[0].seq_id>0&&(i=a.printRowData[0].seq_id);const{data:d}=await H(Object.assign($,{tracking_id:s,qo_item_id:l,po_id:e,seq_id:i}));g.value=d,y.value=d[0].local_detail,r.value=d[0].reserved_detail,I.value=d[0].print_url,q.value=d[0],r.value.forEach((D,S)=>{const j=new Proxy(r.value[S],{set(O,T,z,Ee){return O[T]=z,!0}});j.reserved_qty=""});const _=[];let k=0;y.value.forEach((D,S)=>{D.ours_amount_in_stock>0&&(_.push(D.ours_amount_in_stock),k=k+parseFloat(D.ours_amount_in_stock))}),f.value=k,B.value==1&&P(),B.value=""}function P(){const s=[];y.value.forEach((l,e)=>{s.push(l.part_keep_id)}),window.open(I.value+"&part_id="+g.value[0].part_id+"&part_keep_id_str="+s.toString())}function L(){let s=parseFloat(f.value),l=0;r.value.forEach((e,i)=>{l=parseFloat(e.used_amount)-parseFloat(e.sum_reserved_qty),s>0?l>=s?(r.value[i].reserved_qty=s,s=0):(r.value[i].reserved_qty=l,s=s-l):r.value[i].reserved_qty=""})}function M(){C("update:tableDialogPrint",!1)}async function U(){const s=[];y.value.forEach((e,i)=>{s.push(e.part_keep_id)});const{data:l}=await J(Object.assign(A,{part_keep_id_str:s.toString(),reserved_detail:r}));l.result==1?C("update:tableDialogPrint",!1):G({type:"error",message:l.msg})}return W(()=>{N()}),(s,l)=>{const e=R("el-table-column"),i=R("el-table"),d=R("el-button");return p(),b("div",te,[o("div",{class:c(["dialog_tilte",{none:a.str!="1"}])}," 采购单入库打印与预定 ",2),o("div",{class:c(["dialog_tilte",{none:a.str!="2"}])}," 订单入库打印与预定 ",2),o("div",{class:c(["dialog_tilte",{none:a.str!="3"}])}," 收货入库打印与预定 ",2),o("div",null,[o("div",oe,[o("div",ae,[o("div",le,[o("div",se,h(q.value.tracking_No),1),re])]),o("div",ie,[o("div",ne,[o("div",_e,h(q.value.courier),1),de])]),o("div",pe,[o("div",ce,[o("div",ue,h(q.value.package_qty),1),ve])])]),o("fieldset",{class:c(["fieldset",{none:a.str!="1"}])},[a.str=="1"?(p(),b("legend",me,"采购单信息")):m("",!0),a.str=="2"?(p(),b("legend",fe,"客供单信息")):m("",!0),a.str=="3"?(p(),b("legend",be,"收货单信息")):m("",!0),t(i,{data:g.value,border:"",style:{"margin-top":"0px"}},{default:n(()=>[t(e,{type:"index",width:"55",label:"序号"}),t(e,{prop:"name",width:"180",label:"名称"}),t(e,{prop:"part_id","show-overflow-tooltip":"",label:"元件ID"}),t(e,{prop:"standard_model",width:"180",label:"型号名称"}),t(e,{prop:"vendor_name","show-overflow-tooltip":"",width:"150",label:"品牌"}),t(e,{prop:"qty_unit",label:"单位"}),t(e,{prop:"final_vendor",label:"采购品牌"}),t(e,{prop:"final_part_name","show-overflow-tooltip":"",width:"180",label:"采购型号"}),t(e,{prop:"sn_order","show-overflow-tooltip":"",label:"关联订单号",width:"150"}),t(e,{prop:"quantity",label:"采购数量"}),t(e,{prop:"in_stock_quantity",label:"当前入库数量"})]),_:1},8,["data"])],2),o("fieldset",{class:c(["fieldset",{none:a.str!="2"}])},[he,t(i,{class:c({none:a.str!="2"}),data:g.value,border:"",style:{"margin-top":"0px"}},{default:n(()=>[t(e,{width:"55",prop:"seq_id",label:"序号"}),t(e,{prop:"real_name","show-overflow-tooltip":"",label:"型号规格",width:"150"}),t(e,{prop:"value","show-overflow-tooltip":"",width:"200",label:"详细描述"}),t(e,{"show-overflow-tooltip":"",width:"250",prop:"reference",label:"位号"}),t(e,{prop:"vendor",label:"品牌"}),t(e,{prop:"part_id",label:"物料ID"}),t(e,{prop:"vendor_comp_name",label:"物料品牌"}),t(e,{width:"150","show-overflow-tooltip":"",prop:"standard_model",label:"物料型号"}),t(e,{prop:"used_amount",label:"需要数量"}),t(e,{prop:"in_stock_quantity",label:"已入库数量"})]),_:1},8,["class","data"])],2),o("fieldset",{class:c(["fieldset",{none:a.str!="3"}])},[we,t(i,{class:c({none:a.str!="3"}),data:g.value,border:"",style:{"margin-top":"0px"}},{default:n(()=>[t(e,{prop:"loca_code",label:"收货日期"}),t(e,{prop:"ours_amount_in_stock",label:"名称"}),t(e,{prop:"part_id","show-overflow-tooltip":"",label:"物料ID"}),t(e,{prop:"real_name","show-overflow-tooltip":"",label:"型号规格",width:"150"}),t(e,{prop:"vendor",label:"品牌"}),t(e,{prop:"real_amount_in_stock","show-overflow-tooltip":"",label:"关联采购单",width:"150"}),t(e,{prop:"real_amount_in_stock","show-overflow-tooltip":"",label:"关联订单",width:"150"}),t(e,{prop:"in_stock_quantity",label:"入库数量"})]),_:1},8,["class","data"])],2),o("fieldset",ge,[ye,t(i,{data:y.value,border:"","max-height":"300",style:{"margin-top":"0px"}},{default:n(()=>[t(e,{type:"index",width:"55",fixed:"",label:"序号"}),t(e,{prop:"stock_modality_seq",label:"卷序号"}),t(e,{prop:"seq_no",label:"卷名称"}),t(e,{prop:"quantity",label:"卷数量"}),t(e,{prop:"loca_code",label:"存储库位"}),t(e,{prop:"ours_amount_in_stock",label:"可用数量"}),t(e,{prop:"real_amount_in_stock",label:"实际数量"})]),_:1},8,["data"])]),o("div",ke,[t(d,{type:"primary",onClick:l[0]||(l[0]=_=>P())},{default:n(()=>[x("打印标签")]),_:1}),o("div",xe,[x(" 总数量 :"),o("span",null,h(f.value),1)])]),r.value.length>0&&f.value>0?(p(),b("fieldset",qe,[De,r.value.length>0&&f.value>0?(p(),b("div",Re," 有如下订单需要预定,请自动填充数量操作: ")):m("",!0),r.value.length>0?(p(),V(i,{key:1,data:r.value,border:"","max-height":"200",style:{width:"100%","margin-top":"10px"}},{default:n(()=>[t(e,{fixed:"",type:"index",width:"55",label:"序号"}),t(e,{prop:"order_item_id",label:"订单号"},{default:n(_=>[o("span",null,"P"+h(_.row.order_id)+"-"+h(_.row.order_item_id),1)]),_:1}),t(e,{prop:"part_name",label:"型号规格"}),t(e,{prop:"expected_time",label:"交期"}),t(e,{prop:"used_amount",label:"需求数量"}),t(e,{prop:"sum_reserved_qty",label:"已预定数量"}),t(e,{prop:"reserved_qty",label:"可预定数量"},{header:n(()=>[o("div",Ce,[Be,t(d,{style:{"margin-left":"12px"},onClick:l[1]||(l[1]=_=>L())},{default:n(()=>[x("自动预定")]),_:1})])]),default:n(_=>[X(o("input",{class:"input2_1",type:"text","onUpdate:modelValue":k=>_.row.reserved_qty=k},null,8,Ie),[[Q,_.row.reserved_qty]])]),_:1})]),_:1},8,["data"])):m("",!0)])):m("",!0),o("div",Ne,[r.value.length>0&&f.value>0?(p(),V(d,{key:0,type:"primary",onClick:l[2]||(l[2]=_=>U())},{default:n(()=>[x("确定")]),_:1})):m("",!0),t(d,{type:"info",onClick:l[3]||(l[3]=_=>M())},{default:n(()=>[x("关闭")]),_:1})])])])}}});const Qe=ee(Se,[["__scopeId","data-v-792000c0"]]);export{Qe as default};