import{x as be,y as ge,U as Ee,k as xe,w as De,L as Ce,M as ke,b as we,C as Ve,N as Ae,F as Be,I as Ue,J as $e,K as Re,D as Le}from"./element-plus.a63a26dd.js";import{_ as Oe}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.b651f149.js";import{g as Se}from"./beforehand_order_cart_info.6d859e00.js";import{e as Ie,f as Te,g as Pe}from"./beforehand_order.c8bd3ceb.js";import{u as Ye}from"./vue-router.101084e3.js";import{_ as je}from"./goodsOffer.vue_vue_type_script_setup_true_name_subOrder_lang.332553d8.js";import{_ as Me}from"./orderCartInfo.vue_vue_type_script_setup_true_name_subOrder_lang.61cc513e.js";import{_ as Ne}from"./warehousing.vue_vue_type_script_setup_true_name_subOrder_lang.daf4d6ba.js";import{_ as ze}from"./outbound.vue_vue_type_script_setup_true_name_subOrder_lang.8f3e9bf0.js";import{_ as We}from"./returnWarehouse.vue_vue_type_script_setup_true_name_subOrder_lang.7f7c5493.js";import{_ as qe}from"./returnSupplier.vue_vue_type_script_setup_true_name_subOrder_lang.90d7ec0a.js";import{h as Ke}from"./index.914e16f9.js";import{a as Ge}from"./system_store.0a321149.js";import{d as te,r,Z as Je,o as g,c as $,U as e,L as a,a as o,S as n,u,R as f,j as C,T as R,a9 as oe,K as le}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.f757f46e.js";import"./store_product.22e2a1b2.js";import"./store_branch_product.9586a3e4.js";import"./warehouse_product_storege.a3485e96.js";import"./lodash.2473fc51.js";import"./purchase_product_offer.d8ded807.js";import"./warehouse.06fa072e.js";import"./supplier.6c2e696a.js";import"./delivery_service.311514dd.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.dfa07781.js";import"./index.da3823b2.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./warehouse_order.85326891.js";import"./warehouse_product_return.186aa14f.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const Ze={class:"flex items-center justify-between m-4"},He={class:"flex flex-col"},Qe=o("div",{style:{color:"gray"}},"\u59D3\u540D\uFF1A",-1),Xe={style:{color:"black"}},eo={class:"flex flex-col"},oo=o("div",{style:{color:"gray"}},"\u624B\u673A\uFF1A",-1),lo={style:{color:"black"}},to={class:"flex flex-col"},ao=o("div",{style:{color:"gray"}},"\u9001\u8D27\u5730\u5740\uFF1A",-1),uo={style:{color:"black"}},so={class:"flex items-center justify-between m-4"},io={class:"flex flex-col"},ro=o("div",{style:{color:"gray"}},"\u5355\u53F7\uFF1A",-1),no={style:{color:"black"}},_o={class:"flex flex-col"},co=o("div",{style:{color:"gray"}},"\u652F\u4ED8\u5355\u53F7\uFF1A",-1),mo={style:{color:"black"}},po={class:"flex flex-col"},fo=o("div",{style:{color:"gray"}},"\u95E8\u5E97\uFF1A",-1),ho={style:{color:"black"}},vo={class:"flex items-center justify-between m-4"},yo={class:"flex flex-col"},Fo=o("div",{style:{color:"gray"}},"\u5230\u8D27\u65F6\u95F4\uFF1A",-1),bo={style:{color:"black"}},go={class:"flex flex-col"},Eo=o("div",{style:{color:"gray"}},"\u684C\u6570\uFF1A",-1),xo={style:{color:"black"}},Do={class:"flex flex-col"},Co=o("div",{style:{color:"gray"}},"\u529E\u4E8B\u5929\u6570\uFF1A",-1),ko={style:{color:"black"}},wo={class:"flex flex-col"},Vo=o("div",{style:{color:"gray"}},"\u53A8\u5E08\uFF1A",-1),Ao={style:{color:"black"}},Bo={class:"flex flex-col"},Uo=o("div",{style:{color:"gray"}},"\u7535\u8BDD\uFF1A",-1),$o={style:{color:"black"}},Ro={class:"flex items-center justify-between m-4"},Lo={class:"flex flex-col"},Oo=o("div",{style:{color:"gray"}},"\u91C7\u8D2D\u4E8B\u7531\uFF1A",-1),So={style:{color:"black"}},Io={class:"flex flex-col"},To=o("div",{style:{color:"gray"}},"\u5907\u6CE8\uFF1A",-1),Po={style:{color:"black"}},Yo={class:"flex items-center justify-between m-4"},jo={class:"flex flex-col"},Mo=o("div",{style:{color:"gray"}},"\u603B\u4EF7",-1),No={style:{color:"black"}},zo={class:"flex flex-col flex-2"},Wo=o("div",{style:{color:"gray"}},"\u65F6\u95F4",-1),qo={style:{color:"black"}},Ko={class:"mb-2"},Go={class:"dialog-footer"},Jo={class:"dialog-footer"},Zo=te({name:"storeOrderDETAILS"}),lt=te({...Zo,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ho,{expose:ae,emit:Qo}){const F=r(!1),L=r(null),O=r(null),S=r(null),I=r(null),T=r(null),P=r(null),ue=Ye(),se=i=>{var t,_,p,x,D,c;i=="second"&&((t=I.value)==null||t.getList(s.value)),i=="offer"&&((_=L.value)==null||_.getList(s.value.id)),i=="warehousing"&&((p=O.value)==null||p.getList(s.value.id,s.value.warehousing_id)),i=="outbound"&&((x=S.value)==null||x.getList(s.value.id,s.value)),i=="returnWarehouse"&&((D=T.value)==null||D.getList(s.value)),i=="returnSupplier"&&((c=P.value)==null||c.getList(s.value))},ie=r(!1),v=r(!1),k=r("second"),Y=r(0),j=r(0),re=r(0),s=r({id:"",code:"",total_price:"",supplier_name:"",warehouse_name:"",system_store:"",financial_pm:"",order_sn:"",warehousing_id:"",top_cate:[]}),m=r({id:"",user_id:"",pay_type:"",store_id:""}),de=()=>{const i=h.value.map(t=>({id:t.id,nums:t.num||0,purchase:t.price||0,prices:t.purchase||0,total_price:t.total_price||0,manufacture:t.manufacture,expiration_date:t.expiration_date}));Se({id:M.bhoid,product_arr:i}).then(t=>{v.value=!1})},M=Je({bhoid:ue.query.id,pay_type:"",top_cate:"",top_cate_value:""});(()=>{Ie({id:M.bhoid}).then(i=>{s.value={...i},Y.value=i.warehouse_id,m.value.id=i.id,i.financial_pm==0?j.value=1:re.value=1,h.value=[]})})();const ne=i=>{Te({id:i}).then(t=>{window.open(t.url,"_blank"),xe.success("\u5BFC\u51FA\u6210\u529F")})},b=r(!1),h=r([]),_e=i=>{h.value=h.value.filter(t=>t.id!==i)},ce=i=>{i.forEach(t=>{h.value.find(_=>_.id==t.id)||h.value.push(t)}),b.value=!1};function N(i){i.total_price=i.num*i.price}const me=()=>{ie.value=!0},E=r(!1),z=r([]),pe=(i="")=>{E.value=!0,Ke({nickname:i,page_size:10}).then(t=>{z.value=t.lists,setTimeout(()=>{E.value=!1},300)}).catch(t=>{setTimeout(()=>{E.value=!1},300)})},W=r([]),fe=()=>{F.value=!0,Ge({page_no:1,page_size:100}).then(i=>{W.value=i.lists})},he=()=>{Pe(m.value).then(i=>{})};return ae({open:me}),(i,t)=>{const _=De,p=be,x=ge,D=Ce,c=ke,ve=we,w=Ve,q=Ee,ye=Ae,K=Be,V=Ue,Fe=Oe,y=$e,A=Re,B=Le;return g(),$(R,null,[e(D,null,{default:a(()=>{var l,d,G,J,Z,H,Q,X,ee;return[o("div",Ze,[o("div",He,[Qe,o("div",Xe,n((l=u(s).other_data)==null?void 0:l.nickname),1)]),o("div",eo,[oo,o("div",lo,n((d=u(s).other_data)==null?void 0:d.phone),1)]),o("div",to,[ao,o("div",uo,n((G=u(s).other_data)==null?void 0:G.address),1)])]),o("div",so,[o("div",io,[ro,o("div",no,n(u(s).order_id),1)]),o("div",_o,[co,o("div",mo,n(u(s).order_sn),1)]),o("div",po,[fo,o("div",ho,n(u(s).system_store),1)])]),o("div",vo,[o("div",yo,[Fo,o("div",bo,n((J=u(s).other_data)==null?void 0:J.arrival_time),1)]),o("div",go,[Eo,o("div",xo,n((Z=u(s).other_data)==null?void 0:Z.tables),1)]),o("div",Do,[Co,o("div",ko,n((H=u(s).other_data)==null?void 0:H.days),1)]),o("div",wo,[Vo,o("div",Ao,n((Q=u(s).other_data)==null?void 0:Q.chef),1)]),o("div",Bo,[Uo,o("div",$o,n((X=u(s).other_data)==null?void 0:X.chef_phone),1)])]),o("div",Ro,[o("div",Lo,[Oo,o("div",So,n((ee=u(s).other_data)==null?void 0:ee.purpose),1)]),o("div",Io,[To,o("div",Po,n(u(s).mark),1)])]),o("div",Yo,[o("div",jo,[Mo,o("div",No,"\uFFE5"+n(u(s).total_price),1)]),o("div",zo,[Wo,o("div",qo,n(u(s).create_time),1)]),e(_,{onClick:t[0]||(t[0]=U=>ne(u(s).id))},{default:a(()=>[f(" \u6253\u5370\u5546\u54C1\u6807\u7B7E ")]),_:1}),e(_,{onClick:fe},{default:a(()=>[f(" \u751F\u6210\u5546\u54C1\u8BA2\u5355 ")]),_:1})]),e(_,{type:"primary",onClick:t[1]||(t[1]=U=>v.value=!0)},{default:a(()=>[f(" \u8FFD\u52A0 ")]),_:1}),e(x,{modelValue:u(k),"onUpdate:modelValue":t[2]||(t[2]=U=>C(k)?k.value=U:null),class:"demo-tabs mt-3",type:"border-card",onTabChange:se},{default:a(()=>[e(p,{label:"\u660E\u7EC6",name:"second"},{default:a(()=>[e(Me,{ref_key:"orderCartInfoRef",ref:I,id:u(s).id},null,8,["id"])]),_:1}),e(p,{label:"\u91C7\u8D2D",name:"offer"},{default:a(()=>[e(je,{ref_key:"goodsOfferRef",ref:L,order_id:u(s).id},null,8,["order_id"])]),_:1}),e(p,{label:"\u5165\u5E93",name:"warehousing"},{default:a(()=>[e(Ne,{ref_key:"warehousingRef",ref:O,order_id:u(s).id},null,8,["order_id"])]),_:1}),e(p,{label:"\u51FA\u5E93",name:"outbound"},{default:a(()=>[e(ze,{ref_key:"outboundRef",ref:S,order_id:u(s).id},null,8,["order_id"])]),_:1}),e(p,{label:"\u9000\u5E93\u623F",name:"returnWarehouse"},{default:a(()=>[e(We,{ref_key:"returnWarehouseRef",ref:T},null,512)]),_:1}),e(p,{label:"\u9000\u4F9B\u5E94\u5546",name:"returnSupplier"},{default:a(()=>[e(qe,{ref_key:"returnSupplierRef",ref:P},null,512)]),_:1})]),_:1},8,["modelValue"])]}),_:1}),e(V,{modelValue:u(v),"onUpdate:modelValue":t[5]||(t[5]=l=>C(v)?v.value=l:null),title:"\u8FFD\u52A0\u5546\u54C1",width:"1200"},{footer:a(()=>[o("div",Go,[e(_,{onClick:t[4]||(t[4]=l=>v.value=!1)},{default:a(()=>[f("\u53D6\u6D88")]),_:1}),e(_,{type:"primary",onClick:de},{default:a(()=>[f(" \u786E\u8BA4 ")]),_:1})])]),default:a(()=>[e(K,{ref:"formRef","label-width":"90px"},{default:a(()=>[o("div",Ko,[e(_,{type:"primary",onClick:t[3]||(t[3]=l=>b.value=!0)},{default:a(()=>[f("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),e(ye,{data:u(h)},{default:a(()=>[e(c,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(c,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:l})=>[e(ve,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(c,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"180","show-overflow-tooltip":""}),e(c,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"80","show-overflow-tooltip":""}),e(c,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(c,{label:"\u6570\u91CF","min-width":"150"},{default:a(({row:l})=>[e(w,{modelValue:l.num,"onUpdate:modelValue":d=>l.num=d,onChange:d=>N(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(c,{label:"\u4EF7\u683C","min-width":"150"},{default:a(({row:l})=>[e(w,{modelValue:l.price,"onUpdate:modelValue":d=>l.price=d,onChange:d=>N(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(c,{label:"\u603B\u4EF7","min-width":"150"},{default:a(({row:l})=>[e(w,{modelValue:l.total_price,"onUpdate:modelValue":d=>l.total_price=d},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(c,{label:"\u751F\u4EA7\u65E5\u671F","min-width":"140"},{default:a(({row:l})=>[e(q,{readonly:!1,class:"flex-1 !flex",modelValue:l.manufacture,"onUpdate:modelValue":d=>l.manufacture=d,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u751F\u4EA7\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(c,{label:"\u4FDD\u8D28\u671F","min-width":"140"},{default:a(({row:l})=>[e(q,{readonly:!1,class:"flex-1 !flex",modelValue:l.expiration_date,"onUpdate:modelValue":d=>l.expiration_date=d,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u4FDD\u8D28\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[e(_,{type:"danger",link:"",onClick:d=>_e(l.id)},{default:a(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},512)]),_:1},8,["modelValue"]),e(V,{modelValue:u(b),"onUpdate:modelValue":t[6]||(t[6]=l=>C(b)?b.value=l:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:a(()=>[e(Fe,{onOnBindStore:ce,warehouse_id:u(Y),is_warehouse:u(j)},null,8,["warehouse_id","is_warehouse"])]),_:1},8,["modelValue"]),e(V,{modelValue:u(F),"onUpdate:modelValue":t[11]||(t[11]=l=>C(F)?F.value=l:null),title:"\u751F\u6210\u652F\u4ED8\u8BA2\u5355\u8BBE\u7F6E",width:"600"},{footer:a(()=>[o("div",Jo,[e(_,{onClick:t[10]||(t[10]=l=>F.value=!1)},{default:a(()=>[f("\u53D6\u6D88")]),_:1}),e(_,{type:"primary",onClick:he},{default:a(()=>[f(" \u786E\u8BA4 ")]),_:1})])]),default:a(()=>[e(K,{model:u(m),"label-width":"90px"},{default:a(()=>[e(B,{label:"\u7528\u6237"},{default:a(()=>[e(A,{modelValue:u(m).user_id,"onUpdate:modelValue":t[7]||(t[7]=l=>u(m).user_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":pe,loading:u(E),style:{width:"240px"}},{default:a(()=>[(g(!0),$(R,null,oe(u(z),l=>(g(),le(y,{key:l.id,label:`${l.real_name}|${l.mobile} (ID:${l.id})`,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(B,{label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[e(A,{modelValue:u(m).store_id,"onUpdate:modelValue":t[8]||(t[8]=l=>u(m).store_id=l),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:a(()=>[(g(!0),$(R,null,oe(u(W),l=>(g(),le(y,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(B,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:a(()=>[e(A,{modelValue:u(m).pay_type,"onUpdate:modelValue":t[9]||(t[9]=l=>u(m).pay_type=l),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",size:"large",style:{width:"240px"}},{default:a(()=>[e(y,{label:"\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u652F\u4ED8",value:"7"}),e(y,{label:"\u91C7\u8D2D\u6B3E\u652F\u4ED8",value:"18"}),e(y,{label:"\u4F59\u989D\u652F\u4ED8",value:"3"}),e(y,{label:"\u73B0\u91D1\u652F\u4ED8",value:"17"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{lt as default};