moreShopAdmin/build/admin/assets/details.0ef6ec28.js

2 lines
15 KiB
JavaScript

import{x as ke,y as we,U as Be,k as xe,w as Ue,b as Ae,M as $e,N as Oe,L as Le,C as Pe,F as Re,I as Se,J as Ie,K as Te,D as Me,O as Ye}from"./element-plus.a63a26dd.js";import{_ as ze}from"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.8fd0b09e.js";import{_ as Ne}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import{c as je}from"./purchase_product_offer.5a56e6cc.js";import{b as qe,c as Ke,d as Ge,e as Je}from"./beforehand_order_cart_info.e03ee610.js";import{e as Qe,f as Ze,g as He}from"./beforehand_order.21441899.js";import{u as We}from"./usePaging.6a6670f9.js";import{u as Xe}from"./vue-router.101084e3.js";import{f as el,h as ll}from"./index.c3c26e2f.js";import{_ as tl}from"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.23508299.js";import{e as ol}from"./delivery_service.d6dd16ed.js";import{_ as al}from"./goodsOffer.vue_vue_type_script_setup_true_name_subOrder_lang.637d0d9d.js";import{_ as ul}from"./warehousing.vue_vue_type_script_setup_true_name_subOrder_lang.9e769893.js";import{_ as rl}from"./outbound.vue_vue_type_script_setup_true_name_subOrder_lang.07e4151b.js";import{a as nl}from"./system_store.f6a7c6eb.js";import{d as oe,s as dl,r as n,Z as sl,ap as il,o as p,c as v,U as l,L as o,a as d,S as U,u as a,R as m,j as V,M as z,K as C,Q as P,T as R,a9 as N,n as pl}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"./useDictOptions.1c525481.js";import"./store_product.12b05f18.js";import"./store_branch_product.676a5151.js";import"./warehouse_product_storege.6c504a16.js";import"./lodash.2473fc51.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";import"./index.3d678e42.js";import"./warehouse.f63a3d99.js";import"./supplier.eba87b44.js";import"./warehouse_order.7edcadf3.js";const ml={class:"flex items-center justify-between m-4"},_l={class:"flex flex-col"},fl=d("div",{style:{color:"gray"}},"\u5355\u53F7\uFF1A",-1),cl={style:{color:"black"}},vl={class:"flex items-center justify-between m-4"},hl={class:"flex flex-col"},bl=d("div",{style:{color:"gray"}},"\u603B\u4EF7",-1),yl={style:{color:"black"}},Fl={class:"flex flex-col flex-2"},Cl=d("div",{style:{color:"gray"}},"\u65F6\u95F4",-1),Dl={style:{color:"black"}},El={class:"flex items-center"},gl={key:0},Vl={key:1},kl={key:0},wl={key:1},Bl={key:0,class:"flex mt-4 justify-end"},xl={class:"mb-2"},Ul={class:"dialog-footer"},Al={class:"dialog-footer"},$l={class:"dialog-footer"},Ol=oe({name:"storeOrderDETAILS"}),St=oe({...Ol,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(Ll,{expose:ae,emit:Pl}){const S=dl(),I=n(!1),D=n(!1),k=n(!1),j=n(null),q=n(null),K=n(null),ue=Xe(),re=u=>{var t,r,B;u=="offer"&&((t=j.value)==null||t.getList(f.value.id)),u=="warehousing"&&((r=q.value)==null||r.getList(f.value.id)),u=="outbound"&&((B=K.value)==null||B.getList(f.value.id,f.value))},ne=n(!1),E=n(!1),T=n("second"),G=n(0),J=n(0),de=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:""}),se=()=>{je(_.value).then(u=>{y(),D.value=!1})},ie=()=>{const u=h.value.map(t=>({id:t.id,nums:t.num||0,purchase:t.purchases||0,prices:t.purchase||0,total_price:t.total_price||0,manufacture:t.manufacture,expiration_date:t.expiration_date}));qe({id:M.bhoid,product_arr:u}).then(t=>{console.log(t),E.value=!1,y()})},M=sl({bhoid:ue.query.id,pay_type:""});(()=>{Qe({id:M.bhoid}).then(u=>{f.value={...u},G.value=u.warehouse_id,c.value.id=u.id,u.financial_pm==0?J.value=1:de.value=1,h.value=[],y()})})();const pe=u=>{Ze({id:u}).then(t=>{window.open(t.url,"_blank"),xe.success("\u5BFC\u51FA\u6210\u529F")})},w=n(!1),h=n([]),me=u=>{h.value=h.value.filter(t=>t.id!==u)},_e=u=>{u.forEach(t=>{h.value.find(r=>r.id==t.id)||h.value.push(t)}),w.value=!1};function Q(u){u.total_price=u.num*u.purchases}const Z=n([]),fe=()=>{ol({type:3}).then(u=>{Z.value=u.lists})},H=(u,t)=>{u==1?(_.value.order_id=t.bhoid,_.value.product_id=t.product_id,_.value.unit=t.unit,_.value.need_num=t.cart_num,_.value.mark=t.mark,_.value.is_buyer="1",fe(),D.value=!0):Ke({id:t.id}).then(()=>{y()})},ce=async u=>{var t,r;I.value=!0,await pl(),(t=S.value)==null||t.open("edit"),(r=S.value)==null||r.setFormData(u)},ve=async u=>{await el.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ge({id:u}),y()},he=()=>{ne.value=!0},{pager:b,getLists:y,resetParams:Sl,resetPage:Il}=We({fetchFun:Je,params:M}),A=n(!1),W=n([]),be=(u="")=>{A.value=!0,ll({nickname:u,page_size:10}).then(t=>{W.value=t.lists,setTimeout(()=>{A.value=!1},300)}).catch(t=>{setTimeout(()=>{A.value=!1},300)})},X=n([]),ye=()=>{k.value=!0,nl({page_no:1,page_size:100}).then(u=>{X.value=u.lists})},Fe=()=>{He(c.value).then(u=>{})};return ae({open:he}),(u,t)=>{const r=Ue,B=Ae,s=$e,ee=Oe,Ce=Ne,$=ke,De=we,Ee=Le,x=Pe,le=Be,Y=Re,O=Se,ge=ze,F=Ie,L=Te,g=Me,te=il("perms"),Ve=Ye;return p(),v(R,null,[l(Ee,null,{default:o(()=>[d("div",ml,[d("div",_l,[fl,d("div",cl,U(a(f).order_id),1)])]),d("div",vl,[d("div",hl,[bl,d("div",yl,"\uFFE5"+U(a(f).total_price),1)]),d("div",Fl,[Cl,d("div",Dl,U(a(f).create_time),1)]),l(r,{onClick:t[0]||(t[0]=e=>pe(a(f).id))},{default:o(()=>[m(" \u6253\u5370\u5546\u54C1\u6807\u7B7E ")]),_:1}),l(r,{onClick:ye},{default:o(()=>[m(" \u751F\u6210\u5546\u54C1\u8BA2\u5355 ")]),_:1})]),l(r,{type:"primary",onClick:t[1]||(t[1]=e=>E.value=!0)},{default:o(()=>[m(" \u8FFD\u52A0 ")]),_:1}),l(De,{modelValue:a(T),"onUpdate:modelValue":t[3]||(t[3]=e=>V(T)?T.value=e:null),class:"demo-tabs mt-3",type:"border-card",onTabChange:re},{default:o(()=>[l($,{label:"\u660E\u7EC6",name:"second"},{default:o(()=>[d("div",null,[d("div",null,[z((p(),C(ee,{data:a(b).lists},{default:o(()=>[l(s,{label:"\u5546\u54C1\u4FE1\u606F",prop:"store_name","show-overflow-tooltip":""},{default:o(({row:e})=>[d("div",El,[l(B,{src:e.image,class:"w-16 h-16 mr-2","preview-teleported":!0},null,8,["src"]),d("div",null,U(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:o(({row:e})=>[e.is_buyer==0?(p(),v("div",gl,[l(r,{type:"danger",round:"",size:"small",onClick:i=>H(-1,e)},{default:o(()=>[m("\u5426")]),_:2},1032,["onClick"]),l(r,{type:"success",round:"",size:"small",onClick:i=>H(1,e)},{default:o(()=>[m("\u662F")]),_:2},1032,["onClick"])])):(p(),v("div",Vl,[e.is_buyer==1?(p(),v("span",kl,U(e.status_name),1)):P("",!0),e.is_buyer==-1?(p(),v("span",wl,"\u65E0\u9700\u91C7\u8D2D")):P("",!0)]))]),_:1}),l(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:e})=>[z((p(),C(r,{type:"primary",link:"",onClick:i=>ce(e)},{default:o(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[te,["beforehand_order_cart_info.beforehand_order_cart_info/edit"]]]),z((p(),C(r,{type:"danger",link:"",onClick:i=>ve(e.id)},{default:o(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[te,["beforehand_order_cart_info.beforehand_order_cart_info/delete"]]])]),_:1})]),_:1},8,["data"])),[[Ve,a(b).loading]])]),a(b).lists.length<a(b).count?(p(),v("div",Bl,[l(Ce,{modelValue:a(b),"onUpdate:modelValue":t[2]||(t[2]=e=>V(b)?b.value=e:null),onChange:a(y)},null,8,["modelValue","onChange"])])):P("",!0)])]),_:1}),l($,{label:"\u91C7\u8D2D",name:"offer"},{default:o(()=>[l(al,{ref_key:"goodsOfferRef",ref:j,order_id:a(f).id},null,8,["order_id"])]),_:1}),l($,{label:"\u5165\u5E93",name:"warehousing"},{default:o(()=>[l(ul,{ref_key:"warehousingRef",ref:q,order_id:a(f).id},null,8,["order_id"])]),_:1}),l($,{label:"\u51FA\u5E93",name:"outbound"},{default:o(()=>[l(rl,{ref_key:"outboundRef",ref:K,order_id:a(f).id},null,8,["order_id"])]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(O,{modelValue:a(E),"onUpdate:modelValue":t[6]||(t[6]=e=>V(E)?E.value=e:null),title:"\u8FFD\u52A0\u5546\u54C1",width:"1200"},{footer:o(()=>[d("div",Ul,[l(r,{onClick:t[5]||(t[5]=e=>E.value=!1)},{default:o(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:ie},{default:o(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:o(()=>[l(Y,{ref:"formRef",model:u.updateInfo,"label-width":"90px"},{default:o(()=>[d("div",xl,[l(r,{type:"primary",onClick:t[4]||(t[4]=e=>w.value=!0)},{default:o(()=>[m("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),l(ee,{data:a(h)},{default:o(()=>[l(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),l(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({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:o(({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:o(({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:o(({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:o(({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:o(({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:o(({row:e})=>[l(r,{type:"danger",link:"",onClick:i=>me(e.id)},{default:o(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1},8,["model"])]),_:1},8,["modelValue"]),l(O,{modelValue:a(w),"onUpdate:modelValue":t[7]||(t[7]=e=>V(w)?w.value=e:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:o(()=>[l(ge,{onOnBindStore:_e,warehouse_id:a(G),is_warehouse:a(J)},null,8,["warehouse_id","is_warehouse"])]),_:1},8,["modelValue"]),a(I)?(p(),C(tl,{key:0,ref_key:"editRef",ref:S,onSuccess:a(y),onClose:t[8]||(t[8]=e=>I.value=!1)},null,8,["onSuccess"])):P("",!0),l(O,{modelValue:a(D),"onUpdate:modelValue":t[13]||(t[13]=e=>V(D)?D.value=e:null),title:"\u8BBE\u7F6E\u91C7\u8D2D",width:"600"},{footer:o(()=>[d("div",Al,[l(r,{onClick:t[12]||(t[12]=e=>D.value=!1)},{default:o(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:se},{default:o(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:o(()=>[l(Y,{ref:"formRef",model:a(_),"label-width":"90px"},{default:o(()=>[l(g,{label:"\u91C7\u8D2D\u4EBA\u5458"},{default:o(()=>[l(L,{modelValue:a(_).buyer_id,"onUpdate:modelValue":t[9]||(t[9]=e=>a(_).buyer_id=e),placeholder:"\u8BF7\u9009\u62E9\u91C7\u8D2D\u4EBA\u5458",size:"large",style:{width:"240px"}},{default:o(()=>[(p(!0),v(R,null,N(a(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:o(()=>[l(x,{modelValue:a(_).need_num,"onUpdate:modelValue":t[10]||(t[10]=e=>a(_).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:o(()=>[l(x,{modelValue:a(_).mark,"onUpdate:modelValue":t[11]||(t[11]=e=>a(_).mark=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",readonly:!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),l(O,{modelValue:a(k),"onUpdate:modelValue":t[18]||(t[18]=e=>V(k)?k.value=e:null),title:"\u751F\u6210\u652F\u4ED8\u8BA2\u5355\u8BBE\u7F6E",width:"600"},{footer:o(()=>[d("div",$l,[l(r,{onClick:t[17]||(t[17]=e=>k.value=!1)},{default:o(()=>[m("\u53D6\u6D88")]),_:1}),l(r,{type:"primary",onClick:Fe},{default:o(()=>[m(" \u786E\u8BA4 ")]),_:1})])]),default:o(()=>[l(Y,{model:a(c),"label-width":"90px"},{default:o(()=>[l(g,{label:"\u7528\u6237"},{default:o(()=>[l(L,{modelValue:a(c).user_id,"onUpdate:modelValue":t[14]||(t[14]=e=>a(c).user_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":be,loading:a(A),style:{width:"240px"}},{default:o(()=>[(p(!0),v(R,null,N(a(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:o(()=>[l(L,{modelValue:a(c).store_id,"onUpdate:modelValue":t[15]||(t[15]=e=>a(c).store_id=e),placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",size:"large",style:{width:"240px"}},{default:o(()=>[(p(!0),v(R,null,N(a(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:o(()=>[l(L,{modelValue:a(c).pay_type,"onUpdate:modelValue":t[16]||(t[16]=e=>a(c).pay_type=e),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",size:"large",style:{width:"240px"}},{default:o(()=>[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{St as default};