import{_ as C}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{k as d,w as F,M as B,b as y,N as k}from"./element-plus.a63a26dd.js";import{u as D}from"./usePaging.6a6670f9.js";import{d as V}from"./beforehand_order.c61ce065.js";import{b as N}from"./warehouse_order.e72dd6ae.js";import{d as f,r as c,Z as A,o as _,c as L,U as e,L as n,R as P,u as r,a as O,K as R,j as T,Q as j}from"./@vue.18505fe0.js";const I={class:"flex mt-4 justify-end"},M=f({name:"subOrder"}),H=f({...M,setup(U,{expose:w}){const i=c({id:0}),u=c(0),p=A({id:i.value.id}),{pager:a,getLists:m,resetParams:W,resetPage:$}=D({fetchFun:V,params:p}),h=()=>{u.value>0?N({id:u.value}).then(s=>{window.open(s.url,"_blank"),d.success("\u5BFC\u51FA\u6210\u529F")}):d.error("\u5165\u5E93id\u4E0D\u80FD\u4E3A\u7A7A")};function b(s,t){i.value.id=s,p.id=s,m(),u.value=t}return w({getList:b}),(s,t)=>{const g=F,o=B,v=y,E=k,x=C;return _(),L("div",null,[e(g,{type:"primary",onClick:t[0]||(t[0]=l=>h())},{default:n(()=>[P(" \u6253\u5370\u5165\u5E93\u5355 ")]),_:1}),e(E,{data:r(a).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:n(()=>[e(o,{prop:"id",label:"ID"}),e(o,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u56FE\u7247",prop:"image",width:"120"},{default:n(({row:l})=>[e(v,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(o,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(o,{label:"\u5165\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(o,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(o,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""})]),_:1},8,["data"]),O("div",I,[r(a).lists?(_(),R(x,{key:0,modelValue:r(a),"onUpdate:modelValue":t[1]||(t[1]=l=>T(a)?a.value=l:null),onChange:r(m)},null,8,["modelValue","onChange"])):j("",!0)])])}}});export{H as _};
