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.66936935.js";import{a as le}from"./warehouse.e19d633b.js";import{a as oe}from"./system_store.f8ef17d8.js";import{d as D,r as p,Z as ae,o as d,c as E,a as b,U as l,L as t,R as v,u as o,K as g,j as C,Q as te,T as h,a9 as B}from"./@vue.18505fe0.js";const ue={class:"flex mt-4 justify-end"},re={class:"dialog-footer"},se=D({name:"subOrder"}),ve=D({...se,setup(ne,{expose:x}){const n=p(!1),w=p([]),F=p([]),_=p({id:0}),u=p({bhoid:_.value.id,warehouse_id:"",remark:"",delivery_time:"",store_id:""}),O=()=>{X(u.value).then(r=>{n.value=!1,c()})},U=()=>{n.value=!0,le({}).then(r=>{w.value=r.lists}),oe({}).then(r=>{F.value=r.lists})},y=ae({id:_.value.id}),{pager:i,getLists:c,resetParams:de,resetPage:ie}=H({fetchFun:ee,params:y});function L(r){_.value.id=r,u.value.bhoid=r,y.id=r,c()}return x({getList:L}),(r,a)=>{const f=R,s=j,A=z,I=K,N=G,V=$,k=q,m=J,P=M,S=Q,T=W,Y=Z;return d(),E(h,null,[b("div",null,[l(f,{type:"primary",onClick:U},{default:t(()=>[v(" \u4E00\u952E\u51FA\u5E93 ")]),_:1}),l(I,{data:o(i).lists,border:"",style:{width:"100%","margin-top":"10px"}},{default:t(()=>[l(s,{prop:"id",label:"ID",width:"60"}),l(s,{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(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),l(s,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),l(s,{label:"\u51FA\u5E93\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),l(s,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),l(s,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""})]),_:1},8,["data"]),b("div",ue,[o(i).lists?(d(),g(N,{key:0,modelValue:o(i),"onUpdate:modelValue":a[0]||(a[0]=e=>C(i)?i.value=e:null),onChange:o(c)},null,8,["modelValue","onChange"])):te("",!0)])]),l(Y,{modelValue:o(n),"onUpdate:modelValue":a[6]||(a[6]=e=>C(n)?n.value=e:null),title:"\u51FA\u5E93\u5E93\u8BBE\u7F6E",width:"600"},{footer:t(()=>[b("div",re,[l(f,{onClick:a[5]||(a[5]=e=>n.value=!1)},{default:t(()=>[v("\u53D6\u6D88")]),_:1}),l(f,{type:"primary",onClick:O},{default:t(()=>[v(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[l(T,{ref:"formRef",model:o(u),"label-width":"90px"},{default:t(()=>[l(m,{label:"\u4ED3\u5E93"},{default:t(()=>[l(k,{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(()=>[(d(!0),E(h,null,B(o(w),e=>(d(),g(V,{label:e.name,value:e.id,key:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,{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(m,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[l(k,{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(()=>[(d(!0),E(h,null,B(o(F),e=>(d(),g(V,{label:e.name,value:e.id,key:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,{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{ve as _};
