import{x as Ce,y as ke,U as we,k as g,w as Ve,L as Ae,M as Be,b as Oe,C as $e,N as Ue,F as Le,I as Re,J as Se,K as Pe,D as Ie}from"./element-plus.2c2b06a1.js";import{_ as Te}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.9bcd2945.js";import{g as je}from"./beforehand_order_cart_info.14f012f1.js";import{e as Ye,f as Me,g as Ne,h as ze,i as We,j as qe,k as Ke}from"./beforehand_order.05abc919.js";import{u as Ge}from"./vue-router.101084e3.js";import{_ as Je}from"./goodsOffer.vue_vue_type_script_setup_true_name_subOrder_lang.1236f8df.js";import{_ as Qe}from"./orderCartInfo.vue_vue_type_script_setup_true_name_subOrder_lang.0a18a70c.js";import{_ as Ze}from"./warehousing.vue_vue_type_script_setup_true_name_subOrder_lang.138b748f.js";import{_ as He}from"./outbound.vue_vue_type_script_setup_true_name_subOrder_lang.285a8009.js";import{_ as Xe}from"./returnWarehouse.vue_vue_type_script_setup_true_name_subOrder_lang.74153b4b.js";import{_ as eo}from"./returnSupplier.vue_vue_type_script_setup_true_name_subOrder_lang.aafef424.js";import{h as oo}from"./index.2553fe38.js";import{a as to}from"./system_store.38b8dde0.js";import"./vue-plugin-hiprint.838ee9c9.js";import{d as ue,r,Z as lo,o as b,c as U,U as o,L as u,a as t,S as _,u as a,R as p,K as L,Q as uo,j as w,T as R,a9 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.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.vue_vue_type_script_setup_true_lang.7141614b.js";import"./usePaging.6a6670f9.js";import"./useDictOptions.6b476fae.js";import"./store_product.3151226c.js";import"./store_branch_product.4eb3600d.js";import"./warehouse_product_storege.8a72a451.js";import"./lodash.4e6d2a38.js";import"./purchase_product_offer.b679abc9.js";import"./warehouse.4068dc09.js";import"./supplier.d83d4d8d.js";import"./delivery_service.ff65a173.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.a2239847.js";import"./index.eaceccd8.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./warehouse_order.bdad4f80.js";import"./warehouse_product_return.1910930e.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./jquery.da0c3ace.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.3d1dc32f.js";import"./engine.io-client.6bbd7bb9.js";import"./engine.io-parser.4305f785.js";import"./@socket.io.573b606e.js";import"./debug.b392f131.js";import"./socket.io-parser.4db37fe5.js";import"./html2canvas.c8f3682e.js";import"./canvg.90844e8b.js";import"./core-js.02a9a8e7.js";import"./raf.4a8e4708.js";import"./performance-now.36ef0a90.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.200d31ca.js";import"./stackblur-canvas.7cb77c32.js";const ao={class:"flex items-center justify-between m-4"},so={class:"flex flex-col"},io=t("div",{style:{color:"gray"}},"\u59D3\u540D\uFF1A",-1),ro={style:{color:"black"}},no={class:"flex flex-col"},_o=t("div",{style:{color:"gray"}},"\u624B\u673A\uFF1A",-1),co={style:{color:"black"}},po={class:"flex flex-col"},mo=t("div",{style:{color:"gray"}},"\u9001\u8D27\u5730\u5740\uFF1A",-1),fo={style:{color:"black"}},ho={class:"flex items-center justify-between m-4"},vo={class:"flex flex-col"},Fo=t("div",{style:{color:"gray"}},"\u5355\u53F7\uFF1A",-1),yo={style:{color:"black"}},bo={class:"flex flex-col"},xo=t("div",{style:{color:"gray"}},"\u652F\u4ED8\u5355\u53F7\uFF1A",-1),Eo={style:{color:"black"}},go={class:"flex flex-col"},Do=t("div",{style:{color:"gray"}},"\u95E8\u5E97\uFF1A",-1),Co={style:{color:"black"}},ko={class:"flex items-center justify-between m-4"},wo={class:"flex flex-col"},Vo=t("div",{style:{color:"gray"}},"\u5230\u8D27\u65F6\u95F4\uFF1A",-1),Ao={style:{color:"black"}},Bo={class:"flex flex-col"},Oo=t("div",{style:{color:"gray"}},"\u684C\u6570\uFF1A",-1),$o={style:{color:"black"}},Uo={class:"flex flex-col"},Lo=t("div",{style:{color:"gray"}},"\u529E\u4E8B\u5929\u6570\uFF1A",-1),Ro={style:{color:"black"}},So={class:"flex flex-col"},Po=t("div",{style:{color:"gray"}},"\u53A8\u5E08\uFF1A",-1),Io={style:{color:"black"}},To={class:"flex flex-col"},jo=t("div",{style:{color:"gray"}},"\u7535\u8BDD\uFF1A",-1),Yo={style:{color:"black"}},Mo={class:"flex items-center justify-between m-4"},No={class:"flex flex-col"},zo=t("div",{style:{color:"gray"}},"\u91C7\u8D2D\u4E8B\u7531\uFF1A",-1),Wo={style:{color:"black"}},qo={class:"flex flex-col"},Ko=t("div",{style:{color:"gray"}},"\u5907\u6CE8\uFF1A",-1),Go={style:{color:"black"}},Jo={class:"flex items-center justify-between m-4"},Qo={class:"flex flex-col"},Zo=t("div",{style:{color:"gray"}},"\u603B\u4EF7",-1),Ho={style:{color:"black"}},Xo={class:"flex flex-col flex-2"},et=t("div",{style:{color:"gray"}},"\u65F6\u95F4",-1),ot={style:{color:"black"}},tt={class:"justify-between m-4"},lt={class:"mb-2"},ut={class:"dialog-footer"},at={class:"dialog-footer"},st=ue({name:"storeOrderDETAILS"}),$l=ue({...st,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(it,{expose:ae,emit:rt}){const x=r(!1),S=r(null),P=r(null),I=r(null),T=r(null),j=r(null),Y=r(null),se=Ge(),ie=s=>{var e,d,f,C,k,c;s=="second"&&((e=T.value)==null||e.getList(i.value)),s=="offer"&&((d=S.value)==null||d.getList(i.value.id)),s=="warehousing"&&((f=P.value)==null||f.getList(i.value.id,i.value.warehousing_id)),s=="outbound"&&((C=I.value)==null||C.getList(i.value.id,i.value)),s=="returnWarehouse"&&((k=j.value)==null||k.getList(i.value)),s=="returnSupplier"&&((c=Y.value)==null||c.getList(i.value))},re=r(!1),F=r(!1),V=r("second"),M=r(0),N=r(0),de=r(0),i=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:""}),ne=()=>{const s=h.value.map(e=>({id:e.id,nums:e.num||0,purchase:e.price||0,prices:e.purchase||0,total_price:e.total_price||0,manufacture:e.manufacture,expiration_date:e.expiration_date}));je({id:z.bhoid,product_arr:s}).then(e=>{F.value=!1})},z=lo({bhoid:se.query.id,pay_type:"",top_cate:"",top_cate_value:""});(()=>{Ye({id:z.bhoid}).then(s=>{i.value={...s},M.value=s.warehouse_id,m.value.id=s.id,s.financial_pm==0?N.value=1:de.value=1,h.value=[]})})();const _e=s=>{Me({id:s}).then(e=>{window.open(e.url,"_blank"),g.success("\u5BFC\u51FA\u6210\u529F")})},ce=s=>{Ne({id:s}).then(e=>{window.open(e.url,"_blank"),g.success("\u5BFC\u51FA\u6210\u529F")})},pe=s=>{ze({id:s}).then(e=>{window.open(e.url,"_blank"),g.success("\u5BFC\u51FA\u6210\u529F")})},me=s=>{We({id:s}).then(e=>{window.open(e.url,"_blank"),g.success("\u5BFC\u51FA\u6210\u529F")})},fe=s=>{qe({id:s}).then(e=>{window.open(e.url,"_blank"),g.success("\u5BFC\u51FA\u6210\u529F")})},E=r(!1),h=r([]),he=s=>{h.value=h.value.filter(e=>e.id!==s)},ve=s=>{s.forEach(e=>{h.value.find(d=>d.id==e.id)||h.value.push(e)}),E.value=!1};function W(s){s.total_price=s.num*s.price}const Fe=()=>{re.value=!0},D=r(!1),q=r([]),ye=(s="")=>{D.value=!0,oo({nickname:s,page_size:10}).then(e=>{q.value=e.lists,setTimeout(()=>{D.value=!1},300)}).catch(e=>{setTimeout(()=>{D.value=!1},300)})},K=r([]),be=()=>{x.value=!0,to({page_no:1,page_size:100}).then(s=>{K.value=s.lists})},xe=()=>{Ke(m.value).then(s=>{})};return ae({open:Fe}),(s,e)=>{const d=Ve,f=Ce,C=ke,k=Ae,c=Be,Ee=Oe,A=$e,G=we,ge=Ue,J=Le,B=Re,De=Te,y=Se,O=Pe,$=Ie;return b(),U(R,null,[o(k,null,{default:u(()=>{var l,n,Q,Z,H,X,ee,oe,te;return[t("div",ao,[t("div",so,[io,t("div",ro,_((l=a(i).other_data)==null?void 0:l.nickname),1)]),t("div",no,[_o,t("div",co,_((n=a(i).other_data)==null?void 0:n.phone),1)]),t("div",po,[mo,t("div",fo,_((Q=a(i).other_data)==null?void 0:Q.address),1)])]),t("div",ho,[t("div",vo,[Fo,t("div",yo,_(a(i).order_id),1)]),t("div",bo,[xo,t("div",Eo,_(a(i).order_sn),1)]),t("div",go,[Do,t("div",Co,_(a(i).system_store),1)])]),t("div",ko,[t("div",wo,[Vo,t("div",Ao,_((Z=a(i).other_data)==null?void 0:Z.arrival_time),1)]),t("div",Bo,[Oo,t("div",$o,_((H=a(i).other_data)==null?void 0:H.tables),1)]),t("div",Uo,[Lo,t("div",Ro,_((X=a(i).other_data)==null?void 0:X.days),1)]),t("div",So,[Po,t("div",Io,_((ee=a(i).other_data)==null?void 0:ee.chef),1)]),t("div",To,[jo,t("div",Yo,_((oe=a(i).other_data)==null?void 0:oe.chef_phone),1)])]),t("div",Mo,[t("div",No,[zo,t("div",Wo,_((te=a(i).other_data)==null?void 0:te.purpose),1)]),t("div",qo,[Ko,t("div",Go,_(a(i).mark),1)])]),t("div",Jo,[t("div",Qo,[Zo,t("div",Ho,"\uFFE5"+_(a(i).total_price),1)]),t("div",Xo,[et,t("div",ot,_(a(i).create_time),1)]),o(d,{onClick:e[0]||(e[0]=v=>_e(a(i).id))},{default:u(()=>[p(" \u6253\u5370\u5546\u54C1\u6807\u7B7E ")]),_:1}),o(d,{onClick:be},{default:u(()=>[p(" \u751F\u6210\u5546\u54C1\u8BA2\u5355 ")]),_:1})]),t("div",tt,[o(d,{onClick:e[1]||(e[1]=v=>ce(a(i).id))},{default:u(()=>[p(" \u6253\u5370\u4E0B\u5355\u6E05\u5355 ")]),_:1}),o(d,{onClick:e[2]||(e[2]=v=>pe(a(i).id))},{default:u(()=>[p(" \u6253\u5370\u5206\u914D\u5355 ")]),_:1}),o(d,{onClick:e[3]||(e[3]=v=>me(a(i).id))},{default:u(()=>[p(" \u6253\u5370\u91C7\u8D2D\u5355 ")]),_:1}),a(i).outbound_id>0?(b(),L(d,{key:0,onClick:e[4]||(e[4]=v=>fe(a(i).id))},{default:u(()=>[p(" \u6253\u5370\u51FA\u5E93\u5355 ")]),_:1})):uo("",!0)]),o(d,{type:"primary",onClick:e[5]||(e[5]=v=>F.value=!0)},{default:u(()=>[p(" \u8FFD\u52A0 ")]),_:1}),o(C,{modelValue:a(V),"onUpdate:modelValue":e[6]||(e[6]=v=>w(V)?V.value=v:null),class:"demo-tabs mt-3",type:"border-card",onTabChange:ie},{default:u(()=>[o(f,{label:"\u660E\u7EC6",name:"second"},{default:u(()=>[o(Qe,{ref_key:"orderCartInfoRef",ref:T,id:a(i).id},null,8,["id"])]),_:1}),o(f,{label:"\u91C7\u8D2D",name:"offer"},{default:u(()=>[o(Je,{ref_key:"goodsOfferRef",ref:S,order_id:a(i).id},null,8,["order_id"])]),_:1}),o(f,{label:"\u5165\u5E93",name:"warehousing"},{default:u(()=>[o(Ze,{ref_key:"warehousingRef",ref:P,order_id:a(i).id},null,8,["order_id"])]),_:1}),o(f,{label:"\u51FA\u5E93",name:"outbound"},{default:u(()=>[o(He,{ref_key:"outboundRef",ref:I,order_id:a(i).id},null,8,["order_id"])]),_:1}),o(f,{label:"\u9000\u5E93\u623F",name:"returnWarehouse"},{default:u(()=>[o(Xe,{ref_key:"returnWarehouseRef",ref:j},null,512)]),_:1}),o(f,{label:"\u9000\u4F9B\u5E94\u5546",name:"returnSupplier"},{default:u(()=>[o(eo,{ref_key:"returnSupplierRef",ref:Y},null,512)]),_:1})]),_:1},8,["modelValue"])]}),_:1}),o(B,{modelValue:a(F),"onUpdate:modelValue":e[9]||(e[9]=l=>w(F)?F.value=l:null),title:"\u8FFD\u52A0\u5546\u54C1",width:"1200"},{footer:u(()=>[t("div",ut,[o(d,{onClick:e[8]||(e[8]=l=>F.value=!1)},{default:u(()=>[p("\u53D6\u6D88")]),_:1}),o(d,{type:"primary",onClick:ne},{default:u(()=>[p(" \u786E\u8BA4 ")]),_:1})])]),default:u(()=>[o(J,{ref:"formRef","label-width":"90px"},{default:u(()=>[t("div",lt,[o(d,{type:"primary",onClick:e[7]||(e[7]=l=>E.value=!0)},{default:u(()=>[p("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),o(ge,{data:a(h)},{default:u(()=>[o(c,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(c,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:u(({row:l})=>[o(Ee,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(c,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"180","show-overflow-tooltip":""}),o(c,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"80","show-overflow-tooltip":""}),o(c,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(c,{label:"\u6570\u91CF","min-width":"150"},{default:u(({row:l})=>[o(A,{modelValue:l.num,"onUpdate:modelValue":n=>l.num=n,onChange:n=>W(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),o(c,{label:"\u4EF7\u683C","min-width":"150"},{default:u(({row:l})=>[o(A,{modelValue:l.price,"onUpdate:modelValue":n=>l.price=n,onChange:n=>W(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),o(c,{label:"\u603B\u4EF7","min-width":"150"},{default:u(({row:l})=>[o(A,{modelValue:l.total_price,"onUpdate:modelValue":n=>l.total_price=n},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),o(c,{label:"\u751F\u4EA7\u65E5\u671F","min-width":"140"},{default:u(({row:l})=>[o(G,{readonly:!1,class:"flex-1 !flex",modelValue:l.manufacture,"onUpdate:modelValue":n=>l.manufacture=n,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u751F\u4EA7\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),o(c,{label:"\u4FDD\u8D28\u671F","min-width":"140"},{default:u(({row:l})=>[o(G,{readonly:!1,class:"flex-1 !flex",modelValue:l.expiration_date,"onUpdate:modelValue":n=>l.expiration_date=n,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u4FDD\u8D28\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),o(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:l})=>[o(d,{type:"danger",link:"",onClick:n=>he(l.id)},{default:u(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},512)]),_:1},8,["modelValue"]),o(B,{modelValue:a(E),"onUpdate:modelValue":e[10]||(e[10]=l=>w(E)?E.value=l:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:u(()=>[o(De,{onOnBindStore:ve,warehouse_id:a(M),is_warehouse:a(N)},null,8,["warehouse_id","is_warehouse"])]),_:1},8,["modelValue"]),o(B,{modelValue:a(x),"onUpdate:modelValue":e[15]||(e[15]=l=>w(x)?x.value=l:null),title:"\u751F\u6210\u652F\u4ED8\u8BA2\u5355\u8BBE\u7F6E",width:"600"},{footer:u(()=>[t("div",at,[o(d,{onClick:e[14]||(e[14]=l=>x.value=!1)},{default:u(()=>[p("\u53D6\u6D88")]),_:1}),o(d,{type:"primary",onClick:xe},{default:u(()=>[p(" \u786E\u8BA4 ")]),_:1})])]),default:u(()=>[o(J,{model:a(m),"label-width":"90px"},{default:u(()=>[o($,{label:"\u7528\u6237"},{default:u(()=>[o(O,{modelValue:a(m).user_id,"onUpdate:modelValue":e[11]||(e[11]=l=>a(m).user_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":ye,loading:a(D),style:{width:"240px"}},{default:u(()=>[(b(!0),U(R,null,le(a(q),l=>(b(),L(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}),o($,{label:"\u95E8\u5E97",prop:"store_id"},{default:u(()=>[o(O,{modelValue:a(m).store_id,"onUpdate:modelValue":e[12]||(e[12]=l=>a(m).store_id=l),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:u(()=>[(b(!0),U(R,null,le(a(K),l=>(b(),L(y,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o($,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:u(()=>[o(O,{modelValue:a(m).pay_type,"onUpdate:modelValue":e[13]||(e[13]=l=>a(m).pay_type=l),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",size:"large",style:{width:"240px"}},{default:u(()=>[o(y,{label:"\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u652F\u4ED8",value:"7"}),o(y,{label:"\u91C7\u8D2D\u6B3E\u652F\u4ED8",value:"18"}),o(y,{label:"\u4F59\u989D\u652F\u4ED8",value:"3"}),o(y,{label:"\u73B0\u91D1\u652F\u4ED8",value:"17"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{$l as default};