Index-878c2138.js 6.3 KB

1
  1. import{d as N,b as Q,e as x,r as _,f as M,g as W,h as X,o as l,c as h,i as a,w as o,a as e,j as g,k as s,l as w,m as $,t as O,F as ee,n as I,E as re,_ as te,p as oe,q as ae,s as ie,v as me}from"./index-34852970.js";import{_ as se}from"./Echart.vue_vue_type_script_setup_true_lang-e44d4b79.js";import{E as le}from"./el-card-73839c3c.js";import{E as ne}from"./el-skeleton-item-f6c778f4.js";import{l as q}from"./echarts-data-2d8ea47f.js";import{T as de,g as pe}from"./ToBeDone-81072f2c.js";import ue from"./index-1bcd8834.js";import{c as f}from"./permission-afef2564.js";import{_ as fe}from"./_plugin-vue_export-helper-1b428a4d.js";import"./ToBeDoneDialog-2fa8ea8f.js";import"./Dialog-e0707d40.js";import"./ContentWrap.vue_vue_type_script_setup_true_lang-eb026e5c.js";import"./SPuUploadImg-9bce0c7f.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-5fc738be.js";import"./index-69e629ed.js";import"./el-image-viewer-619778cc.js";import"./useMessage-f6294882.js";import"./spu-0b44769c.js";import"./InfoForm-43f8acf3.js";import"./UploadImgs-de822d74.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-539bc84a.js";import"./tree-0af4953a.js";import"./category-51c9a940.js";import"./brand-232b935f.js";import"./formRules-25e5f2bb.js";import"./DescriptionForm-93c1cdf4.js";import"./style.css_vue_type_style_index_0_src_true_lang-55bf8ced.js";import"./OtherForm-7b06ccf2.js";import"./SkuForm-fb997e94.js";import"./index-f497ea6b.js";import"./SkuList.vue_vue_type_script_setup_true_lang-c643727b.js";import"./el-image-32cffe65.js";import"./UploadImg-35f0ce47.js";import"./UploadFile.vue_vue_type_style_index_0_scoped_a9e67aa2_lang-ce8f3a03.js";import"./PcComponents.css_vue_type_style_index_0_src_5455114c_scoped_5455114c_lang-876b1f49.js";import"./ProductAttributes.vue_vue_type_script_setup_true_lang-3f378580.js";import"./el-text-4f8c93d1.js";import"./property-fcda96e8.js";import"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-4787c8f8.js";import"./MobileSkuList-40a3631d.js";import"./DeliveryForm-22313c24.js";import"./index-bed445cb.js";import"./dict-5c28424e.js";import"./constants-e43f22dd.js";import"./Service-5f6471c2.js";import"./index-da2349de.js";import"./AfterSale-a5b7021e.js";import"./index.vue_vue_type_script_setup_true_lang-1515f911.js";import"./index-d6d07698.js";import"./index-715c80a7.js";import"./Comment-5b14a749.js";import"./Apply-da9af0e0.js";import"./formatTime-2355f062.js";const ce={class:"flex flex-row flex-wrap gap-8 p-4",style:{"min-height":"200px"}},xe={class:"bg-orange-400 h-48px w-48px flex items-center justify-center rounded text-white"},he={class:"h-3 flex justify-between items-center"},ge={key:0,class:"!w-240px flex"},we=fe(N({name:"Home",__name:"Index",setup(ye){const V=Q(),v=x(()=>V.getMobile),p=_(!0),A=x(()=>f(["trade:order:query"])),F=x(()=>f(["product:spu:create"])),R=x(()=>f(["trade:order:backlog:query"])||f(["after:sale:backlog:query"])),t=M({orderTime:"",orderStatrTime:"",orderEndTime:"",mobileOrderTimeShow:!1}),b=_(),k=_(null),S=W(()=>{k.value.getList()},1e3);let y;function U(i){y=i}const z=new Date(2024,5,12);let c=M(q);const T=async(i,r)=>{const m=await pe({startTime:i,endTime:r});me(c,"xAxis.data",m.xaxis.data);const u=m==null?void 0:m.series.map(n=>({count:n.count,value:n.money/100}));c.series[0].data=u,y&&(y.setOption(c,!0),console.log(c))};function B(i){t.orderStatrTime=i[0],t.orderEndTime=i[1],T(t.orderStatrTime,t.orderEndTime)}function Y(){t.mobileOrderTimeShow=!0}function H(i){t.mobileOrderTimeShow=!1,t.orderStatrTime=I(i[0]).format("YYYY-MM-DD"),t.orderEndTime=I(i[1]).format("YYYY-MM-DD"),T(t.orderStatrTime,t.orderEndTime)}return(async()=>(await Promise.all([T()]),p.value=!1))(),(i,r)=>{const m=ne,u=le,n=re,L=te,P=oe,Z=ae,G=X("van-calendar"),J=se,D=ie;return l(),h(ee,null,[a(D,{class:"mt-8px",gutter:8,justify:"space-between"},{default:o(()=>[e(R)?(l(),g(n,{key:0,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:o(()=>[a(u,{shadow:"never"},{header:o(()=>[s("div",{class:"h-3 flex justify-between cursor-pointer items-center",onClick:r[0]||(r[0]=(...d)=>e(S)&&e(S)(...d))},r[4]||(r[4]=[s("span",null,"\u5F85\u529E",-1)]))]),default:o(()=>[a(m,{loading:e(p),animated:""},{default:o(()=>[a(de,{ref_key:"toBeDoneRef",ref:k},null,512)]),_:1},8,["loading"])]),_:1})]),_:1})):w("",!0),e(F)?(l(),g(n,{key:1,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:o(()=>[a(u,{shadow:"never"},{header:o(()=>r[5]||(r[5]=[s("div",{class:"h-3 flex justify-between items-center"},[s("span",null,"\u5FEB\u6377\u65B9\u5F0F")],-1)])),default:o(()=>[a(m,{loading:e(p),animated:""},{default:o(()=>[s("div",ce,[e(f)(["product:spu:create"])?(l(),h("div",{key:0,class:"h-20 w-20% flex flex-col cursor-pointer items-center justify-center gap-2",onClick:r[1]||(r[1]=d=>{return E="create",C="",j=0,void b.value.open(E,C,j,K);var E,C,j,K})},[s("div",xe,[a(L,{icon:"fluent-mdl2:product",class:"text-7.5!"})]),r[6]||(r[6]=s("span",null,"\u65B0\u589E\u5546\u54C1",-1))])):w("",!0)])]),_:1},8,["loading"])]),_:1})]),_:1})):w("",!0),e(A)?(l(),g(n,{key:2,xl:24,lg:24,md:24,sm:24,xs:24,class:"mb-8px"},{default:o(()=>[a(u,{shadow:"never"},{header:o(()=>[s("div",he,[r[8]||(r[8]=s("span",null,"\u8BA2\u5355",-1)),e(v)?!e(v)||e(t).orderStatrTime||e(t).orderEndTime?(l(),h("span",{key:2,style:{"font-size":"14px"},onClick:Y},O(e(t).orderStatrTime)+" - "+O(e(t).orderEndTime),1)):(l(),g(Z,{key:1,onClick:Y},{default:o(()=>r[7]||(r[7]=[$("\u9009\u62E9\u65E5\u671F")])),_:1})):(l(),h("div",ge,[a(P,{modelValue:e(t).orderTime,"onUpdate:modelValue":r[2]||(r[2]=d=>e(t).orderTime=d),"value-format":"YYYY-MM-DD",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1"),new Date("1")],onChange:B},null,8,["modelValue","default-time"])])),a(G,{show:e(t).mobileOrderTimeShow,"onUpdate:show":r[3]||(r[3]=d=>e(t).mobileOrderTimeShow=d),type:"range","min-date":e(z),onConfirm:H},null,8,["show","min-date"])])]),default:o(()=>[a(m,{loading:e(p),animated:""},{default:o(()=>[a(D,null,{default:o(()=>[a(n,null,{default:o(()=>[a(m,{loading:e(p),animated:""},{default:o(()=>[a(J,{options:e(q),height:250,onChartInit:U},null,8,["options"])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})):w("",!0)]),_:1}),a(ue,{ref_key:"spuFormRef",ref:b},null,512)],64)}}}),[["__scopeId","data-v-5303987b"]]);export{we as default};