2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
import{x as xe,y as Ae,U as Ue,k as te,w as $e,b as Oe,M as Le,N as Pe,L as Re,C as Se,F as Ie,I as Te,J as Me,K as Ye,D as ze,O as Ne}from"./element-plus.4a7d92a3.js";import{_ as je}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.dfafdc86.js";import{_ as qe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import{c as Ke}from"./purchase_product_offer.5b9135bb.js";import{b as Ge,c as Je,d as Qe,e as ue}from"./beforehand_order_cart_info.236cb99b.js";import{e as Ze,f as He,g as We}from"./beforehand_order.4c0f8dbc.js";import{u as Xe}from"./usePaging.6a6670f9.js";import{u as el}from"./vue-router.101084e3.js";import{f as ll,h as ol}from"./index.d6bf0bc9.js";import{_ as tl}from"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.13d0aa84.js";import{e as ul}from"./delivery_service.ca7716a5.js";import{_ as al}from"./goodsOffer.vue_vue_type_script_setup_true_name_subOrder_lang.791f7c92.js";import{_ as rl}from"./warehousing.vue_vue_type_script_setup_true_name_subOrder_lang.a5ed6058.js";import{_ as nl}from"./outbound.vue_vue_type_script_setup_true_name_subOrder_lang.2d8a4d51.js";import{a as dl}from"./system_store.c87bc554.js";import{d as ae,s as sl,r as n,Z as il,ap as pl,o as p,c as v,U as l,L as t,a as d,S as A,u,R as m,j as k,M as z,K as C,Q as P,T as R,a9 as N,n as ml}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.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./useDictOptions.a54ffff6.js";import"./store_product.05ffdd5d.js";import"./store_branch_product.d83d05c2.js";import"./warehouse_product_storege.edf3b83e.js";import"./lodash.9dc701ad.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.4e9cb769.js";import"./warehouse.f098c284.js";import"./supplier.4a1a3065.js";import"./warehouse_order.653ccc9a.js";const _l={class:"flex items-center justify-between m-4"},fl={class:"flex flex-col"},cl=d("div",{style:{color:"gray"}},"\u5355\u53F7\uFF1A",-1),vl={style:{color:"black"}},hl={class:"flex items-center justify-between m-4"},bl={class:"flex flex-col"},yl=d("div",{style:{color:"gray"}},"\u603B\u4EF7",-1),Fl={style:{color:"black"}},Cl={class:"flex flex-col flex-2"},Dl=d("div",{style:{color:"gray"}},"\u65F6\u95F4",-1),El={style:{color:"black"}},gl={class:"flex items-center"},kl={key:0},Vl={key:1},wl={key:0},Bl={key:1},xl={key:0,class:"flex mt-4 justify-end"},Al={class:"mb-2"},Ul={class:"dialog-footer"},$l={class:"dialog-footer"},Ol={class:"dialog-footer"},Ll=ae({name:"storeOrderDETAILS"}),To=ae({...Ll,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Pl,{expose:re,emit:Rl}){const S=sl(),I=n(!1),D=n(!1),V=n(!1),j=n(null),q=n(null),K=n(null),ne=el(),de=a=>{var o,r,B;a=="offer"&&((o=j.value)==null||o.getList(f.value.id)),a=="warehousing"&&((r=q.value)==null||r.getList(f.value.id)),a=="outbound"&&((B=K.value)==null||B.getList(f.value.id,f.value))},se=n(!1),E=n(!1),T=n("second"),G=n(0),J=n(0),ie=n(0),f=n({id:"",code:"",total_price:"",supplier_name:"",warehouse_name:"",system_store:"",financial_pm:"",order_sn:""}),c=n({id:"",user_id:"",pay_type:"",store_id:""}),_=n({order_id:"",product_id:"",need_num:"",unit:"",is_buyer:"",buyer_id:"",mark:""}),pe=()=>{Ke(_.value).then(a=>{y(),D.value=!1})},me=()=>{const a=h.value.map(o=>({id:o.id,nums:o.num||0,purchase:o.purchases||0,prices:o.purchase||0,total_price:o.total_price||0,manufacture:o.manufacture,expiration_date:o.expiration_date}));Ge({id:M.bhoid,product_arr:a}).then(o=>{console.log(o),E.value=!1,y()})},M=il({bhoid:ne.query.id,pay_type:""});(()=>{Ze({id:M.bhoid}).then(a=>{f.value={...a},G.value=a.warehouse_id,c.value.id=a.id,a.financial_pm==0?J.value=1:ie.value=1,h.value=[],y()})})();const _e=a=>{He({id:a}).then(o=>{window.open(o.url,"_blank"),te.success("\u5BFC\u51FA\u6210\u529F")})},w=n(!1),h=n([]),fe=a=>{h.value=h.value.filter(o=>o.id!==a)},ce=a=>{a.forEach(o=>{h.value.find(r=>r.id==o.id)||h.value.push(o)}),w.value=!1};function Q(a){a.total_price=a.num*a.purchases}const Z=n([]),ve=()=>{ul({type:3}).then(a=>{Z.value=a.lists})},H=(a,o)=>{a==1?(_.value.order_id=o.bhoid,_.value.product_id=o.product_id,_.value.unit=o.unit,_.value.need_num=o.cart_num,_.value.mark=o.mark,_.value.is_buyer="1",ve(),D.value=!0):Je({id:o.id}).then(()=>{y()})},he=async a=>{var o,r;I.value=!0,await ml(),(o=S.value)==null||o.open("edit"),(r=S.value)==null||r.setFormData(a)},be=async a=>{await ll.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Qe({id:a}),y()},ye=()=>{se.value=!0},{pager:b,getLists:y,resetParams:Il,resetPage:Tl}=Xe({fetchFun:ue,params:M}),U=n(!1),W=n([]),Fe=(a="")=>{U.value=!0,ol({nickname:a,page_size:10}).then(o=>{W.value=o.lists,setTimeout(()=>{U.value=!1},300)}).catch(o=>{setTimeout(()=>{U.value=!1},300)})},X=n([]),Ce=()=>{V.value=!0,dl({page_no:1,page_size:100}).then(a=>{X.value=a.lists})},De=()=>{We(c.value).then(a=>{})},Ee=()=>{ue({export:2,bhoid:f.value.id}).then(a=>{window.open(a.url,"_blank"),te.success("\u5BFC\u51FA\u6210\u529F")})};return re({open:ye}),(a,o)=>{const r=$e,B=Oe,s=Le,ee=Pe,ge=qe,$=xe,ke=Ae,Ve=Re,x=Se,le=Ue,Y=Ie,O=Te,we=je,F=Me,L=Ye,g=ze,oe=pl("perms"),Be=Ne;return p(),v(R,null,[l(Ve,null,{default:t(()=>[d("div",_l,[d("div",fl,[cl,d("div",vl,A(u(f).order_id),1)])]),d("div",hl,[d("div",bl,[yl,d("div",Fl,"\uFFE5"+A(u(f).total_price),1)]),d("div",Cl,[Dl,d("div",El,A(u(f).create_time),1)]),l(r,{onClick:o[0]||(o[0]=e=>_e(u(f).id))},{default:t(()=>[m(" \u6253\u5370\u5546\u54C1\u6807\u7B7E ")]),_:1}),l(r,{onClick:Ce},{default:t(()=>[m(" \u751F\u6210\u5546\u54C1\u8BA2\u5355 ")]),_:1})]),l(r,{type:"primary",onClick:o[1]||(o[1]=e=>E.value=!0)},{default:t(()=>[m(" \u8FFD\u52A0 ")]),_:1}),l(ke,{modelValue:u(T),"onUpdate:modelValue":o[3]||(o[3]=e=>k(T)?T.value=e:null),class:"demo-tabs mt-3",type:"border-card",onTabChange:de},{default:t(()=>[l($,{label:"\u660E\u7EC6",name:"second"},{default:t(()=>[l(r,{type:"primary",onClick:Ee},{default:t(()=>[m("\u5BFC\u51FA\u8868\u683C ")]),_:1}),d("div",null,[d("div",null,[z((p(),C(ee,{data:u(b).lists},{default:t(()=>[l(s,{label:"\u5546\u54C1\u4FE1\u606F",prop:"store_name","show-overflow-tooltip":""},{default:t(({row:e})=>[d("div",gl,[l(B,{src:e.image,class:"w-16 h-16 mr-2","preview-teleported":!0},null,8,["src"]),d("div",null,A(e.store_name),1)])]),_:1}),l(s,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"warehouse_stock","show-overflow-tooltip":""}),l(s,{label:"\u9700\u8981\u6570\u91CF",prop:"cart_num","show-overflow-tooltip":""}),l(s,{label:"\u96F6\u552E\u4EF7",prop:"price","show-overflow-tooltip":""}),l(s,{label:"\u5408\u8BA1",prop:"total_price","show-overflow-tooltip":""}),l(s,{label:"\u662F\u5426\u9700\u91C7\u8D2D",prop:"is_buyer","show-overflow-tooltip":"",width:"100"},{default:t(({row:e})=>[e.is_buyer==0?(p(),v("div",kl,[l(r,{type:"danger",round:"",size:"small",onClick:i=>H(-1,e)},{default:t(()=>[m("\u5426")]),_:2},1032,["onClick"]),l(r,{type:"success",round:"",size:"small",onClick:i=>H(1,e)},{default:t(()=>[m("\u662F")]),_:2},1032,["onClick"])])):(p(),v("div",Vl,[e.is_buyer==1?(p(),v("span",wl,A(e.status_name),1)):P("",!0),e.is_buyer==-1?(p(),v("span",Bl,"\u65E0\u9700\u91C7\u8D2D")):P("",!0)]))]),_:1}),l(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:e})=>[z((p(),C(r,{type:"primary",link:"",onClick:i=>he(e)},{default:t(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[oe,["beforehand_order_cart_info.beforehand_order_cart_info/edit"]]]),z((p(),C(r,{type:"danger",link:"",onClick:i=>be(e.id)},{default:t(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[oe,["beforehand_order_cart_info.beforehand_order_cart_info/delete"]]])]),_:1})]),_:1},8,["data"])),[[Be,u(b).loading]])]),u(b).lists.length<u(b).count?(p(),v("div",xl,[l(ge,{modelValue:u(b),"onUpdate:modelValue":o[2]||(o[2]=e=>k(b)?b.value=e:null),onChange:u(y)},null,8,["modelValue","onChange"])])):P("",!0)])]),_:1}),l($,{label:"\u91C7\u8D2D",name:"offer"},{default:t(()=>[l(al,{ref_key:"goodsOfferRef",ref:j,order_id:u(f).id},null,8,["order_id"])]),_:1}),l($,{label:"\u5165\u5E93",name:"warehousing"},{default:t(()=>[l(rl,{ref_key:"warehousingRef",ref:q,order_id:u(f).id},null,8,["order_id"])]),_:1}),l($,{label:"\u51FA\u5E93",name:"outbound"},{default:t(()=>[l(nl,{ref_key:"outboundRef",ref:K,order_id:u(f).id},null,8,["order_id"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(O,{modelValue:u(E),"onUpdate:modelValue":o[6]||(o[6]=e=>k(E)?E.value=e:null),title:"\u8FFD\u52A0\u5546\u54C1",width:"1200"},{footer:t(()=>[d("div",Ul,[l(r,{onClick:o[5]||(o[5]=e=>E.value=!1)},{default:t(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:me},{default:t(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[l(Y,{ref:"formRef",model:a.updateInfo,"label-width":"90px"},{default:t(()=>[d("div",Al,[l(r,{type:"primary",onClick:o[4]||(o[4]=e=>w.value=!0)},{default:t(()=>[m("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),l(ee,{data:u(h)},{default:t(()=>[l(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),l(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:e})=>[l(B,{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","min-width":"180","show-overflow-tooltip":""}),l(s,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"80","show-overflow-tooltip":""}),l(s,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),l(s,{label:"\u6570\u91CF","min-width":"150"},{default:t(({row:e})=>[l(x,{modelValue:e.num,"onUpdate:modelValue":i=>e.num=i,onChange:i=>Q(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),l(s,{label:"\u4EF7\u683C","min-width":"150"},{default:t(({row:e})=>[l(x,{modelValue:e.purchases,"onUpdate:modelValue":i=>e.purchases=i,onChange:i=>Q(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),l(s,{label:"\u603B\u4EF7","min-width":"150"},{default:t(({row:e})=>[l(x,{modelValue:e.total_price,"onUpdate:modelValue":i=>e.total_price=i},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l(s,{label:"\u751F\u4EA7\u65E5\u671F","min-width":"140"},{default:t(({row:e})=>[l(le,{readonly:!1,class:"flex-1 !flex",modelValue:e.manufacture,"onUpdate:modelValue":i=>e.manufacture=i,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u751F\u4EA7\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l(s,{label:"\u4FDD\u8D28\u671F","min-width":"140"},{default:t(({row:e})=>[l(le,{readonly:!1,class:"flex-1 !flex",modelValue:e.expiration_date,"onUpdate:modelValue":i=>e.expiration_date=i,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u4FDD\u8D28\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:e})=>[l(r,{type:"danger",link:"",onClick:i=>fe(e.id)},{default:t(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},8,["model"])]),_:1},8,["modelValue"]),l(O,{modelValue:u(w),"onUpdate:modelValue":o[7]||(o[7]=e=>k(w)?w.value=e:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:t(()=>[l(we,{onOnBindStore:ce,warehouse_id:u(G),is_warehouse:u(J)},null,8,["warehouse_id","is_warehouse"])]),_:1},8,["modelValue"]),u(I)?(p(),C(tl,{key:0,ref_key:"editRef",ref:S,onSuccess:u(y),onClose:o[8]||(o[8]=e=>I.value=!1)},null,8,["onSuccess"])):P("",!0),l(O,{modelValue:u(D),"onUpdate:modelValue":o[13]||(o[13]=e=>k(D)?D.value=e:null),title:"\u8BBE\u7F6E\u91C7\u8D2D",width:"600"},{footer:t(()=>[d("div",$l,[l(r,{onClick:o[12]||(o[12]=e=>D.value=!1)},{default:t(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:pe},{default:t(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[l(Y,{ref:"formRef",model:u(_),"label-width":"90px"},{default:t(()=>[l(g,{label:"\u91C7\u8D2D\u4EBA\u5458"},{default:t(()=>[l(L,{modelValue:u(_).buyer_id,"onUpdate:modelValue":o[9]||(o[9]=e=>u(_).buyer_id=e),placeholder:"\u8BF7\u9009\u62E9\u91C7\u8D2D\u4EBA\u5458",size:"large",style:{width:"240px"}},{default:t(()=>[(p(!0),v(R,null,N(u(Z),e=>(p(),C(F,{label:e.nickname,value:e.uid},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1}),l(g,{label:"\u91C7\u8D2D\u6570\u91CF",prop:"need_num"},{default:t(()=>[l(x,{modelValue:u(_).need_num,"onUpdate:modelValue":o[10]||(o[10]=e=>u(_).need_num=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91C7\u8D2D\u6570\u91CF",readonly:!1},null,8,["modelValue"])]),_:1}),l(g,{label:"\u5907\u6CE8",prop:"mark"},{default:t(()=>[l(x,{modelValue:u(_).mark,"onUpdate:modelValue":o[11]||(o[11]=e=>u(_).mark=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",readonly:!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),l(O,{modelValue:u(V),"onUpdate:modelValue":o[18]||(o[18]=e=>k(V)?V.value=e:null),title:"\u751F\u6210\u652F\u4ED8\u8BA2\u5355\u8BBE\u7F6E",width:"600"},{footer:t(()=>[d("div",Ol,[l(r,{onClick:o[17]||(o[17]=e=>V.value=!1)},{default:t(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:De},{default:t(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[l(Y,{model:u(c),"label-width":"90px"},{default:t(()=>[l(g,{label:"\u7528\u6237"},{default:t(()=>[l(L,{modelValue:u(c).user_id,"onUpdate:modelValue":o[14]||(o[14]=e=>u(c).user_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":Fe,loading:u(U),style:{width:"240px"}},{default:t(()=>[(p(!0),v(R,null,N(u(W),e=>(p(),C(F,{key:e.id,label:`${e.real_name}|${e.mobile} (ID:${e.id})`,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l(g,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[l(L,{modelValue:u(c).store_id,"onUpdate:modelValue":o[15]||(o[15]=e=>u(c).store_id=e),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:t(()=>[(p(!0),v(R,null,N(u(X),e=>(p(),C(F,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(g,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:t(()=>[l(L,{modelValue:u(c).pay_type,"onUpdate:modelValue":o[16]||(o[16]=e=>u(c).pay_type=e),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",size:"large",style:{width:"240px"}},{default:t(()=>[l(F,{label:"\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u652F\u4ED8",value:"7"}),l(F,{label:"\u91C7\u8D2D\u6B3E\u652F\u4ED8",value:"18"}),l(F,{label:"\u4F59\u989D\u652F\u4ED8",value:"3"}),l(F,{label:"\u73B0\u91D1\u652F\u4ED8",value:"17"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});export{To as default};
|