import{U as M,w as R,M as j,b as z,N as K,J as $,K as q,D as J,C as Q,F as W,I as Z}from"./element-plus.4a7d92a3.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{u as H}from"./usePaging.6a6670f9.js";import{b as X,c as ee}from"./beforehand_order.b7e0355d.js";import{a as le}from"./warehouse.671ac87f.js";import{a as oe}from"./system_store.26f2f2ff.js";import{d as B,r as m,Z as ae,o as n,c as f,a as E,U as l,L as t,R as b,u as o,K as v,j as k,Q as te,T as w,a9 as C}from"./@vue.18505fe0.js";const ue={class:"flex mt-4 justify-end"},re={class:"dialog-footer"},se=B({name:"subOrder"}),be=B({...se,props:["order_id"],setup(D,{expose:x}){const s=m(!1),g=m([]),h=m([]),F=D,u=m({bhoid:F.order_id,warehouse_id:"",remark:"",delivery_time:"",store_id:""}),O=()=>{X(u.value).then(i=>{s.value=!1,_()})},U=()=>{s.value=!0,le({}).then(i=>{g.value=i.lists}),oe({}).then(i=>{h.value=i.lists})},L=ae({id:F.order_id}),{pager:d,getLists:_,resetParams:ne,resetPage:de}=H({fetchFun:ee,params:L});return x({getLists:_}),(i,a)=>{const c=R,r=j,A=z,I=K,N=G,y=$,V=q,p=J,P=M,S=Q,T=W,Y=Z;return n(),f(w,null,[E("div",null,[l(c,{type:"primary",onClick:U},{default:t(()=>[b(" \u4E00\u952E\u51FA\u5E93 ")]),_:1}),l(I,{data:o(d).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:t(()=>[l(r,{prop:"id",label:"ID",width:"60"}),l(r,{label:"\u5546\u54C1\u56FE\u7247",prop:"image",width:"120"},{default:t(({row:e})=>[l(A,{style:{width:"50px",height:"50px"},src:e.image,"preview-teleported":!0},null,8,["src"])]),_:1}),l(r,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),l(r,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),l(r,{label:"\u51FA\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),l(r,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),l(r,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""})]),_:1},8,["data"]),E("div",ue,[o(d).lists?(n(),v(N,{key:0,modelValue:o(d),"onUpdate:modelValue":a[0]||(a[0]=e=>k(d)?d.value=e:null),onChange:o(_)},null,8,["modelValue","onChange"])):te("",!0)])]),l(Y,{modelValue:o(s),"onUpdate:modelValue":a[6]||(a[6]=e=>k(s)?s.value=e:null),title:"\u51FA\u5E93\u5E93\u8BBE\u7F6E",width:"600"},{footer:t(()=>[E("div",re,[l(c,{onClick:a[5]||(a[5]=e=>s.value=!1)},{default:t(()=>[b("\u53D6\u6D88")]),_:1}),l(c,{type:"primary",onClick:O},{default:t(()=>[b(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[l(T,{ref:"formRef",model:o(u),"label-width":"90px"},{default:t(()=>[l(p,{label:"\u4ED3\u5E93"},{default:t(()=>[l(V,{modelValue:o(u).warehouse_id,"onUpdate:modelValue":a[1]||(a[1]=e=>o(u).warehouse_id=e),placeholder:"\u8BF7\u9009\u62E9\u4ED3\u5E93",size:"large",style:{width:"240px"}},{default:t(()=>[(n(!0),f(w,null,C(o(g),e=>(n(),v(y,{label:e.name,value:e.id,key:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(p,{label:"\u9001\u8D27\u65F6\u95F4"},{default:t(()=>[l(P,{readonly:!1,class:"flex-1 !flex",modelValue:o(u).delivery_time,"onUpdate:modelValue":a[2]||(a[2]=e=>o(u).delivery_time=e),clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u751F\u4EA7\u65E5\u671F"},null,8,["modelValue"])]),_:1}),l(p,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[l(V,{modelValue:o(u).store_id,"onUpdate:modelValue":a[3]||(a[3]=e=>o(u).store_id=e),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:t(()=>[(n(!0),f(w,null,C(o(h),e=>(n(),v(y,{label:e.name,value:e.id,key:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(p,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[l(S,{modelValue:o(u).remark,"onUpdate:modelValue":a[4]||(a[4]=e=>o(u).remark=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",readonly:!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{be as _};
