moreShopAdmin/build/admin/assets/index.59ceebab.js

2 lines
9.8 KiB
JavaScript

import{a8 as ce,C as me,D as de,J as _e,K as fe,w as ye,F as Ce,L as he,c as ge,a as ve,M as we,b as be,N as ke,O as Ee}from"./element-plus.91c68cc0.js";import{_ as Fe}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{_ as De}from"./index.9d5ebfa3.js";import{_ as xe}from"./index.vue_vue_type_script_setup_true_lang.96f62f54.js";import{d as K,r as f,Z as I,i as Be,af as Re,o as y,c as g,U as e,L as a,u as l,aa as Ve,T,a9 as U,R as p,a as c,a0 as Le,S as m,M as Pe,K as Ae,j as Se,n as P}from"./@vue.76ce7aa3.js";import{u as $e}from"./usePaging.f8c888e4.js";import{u as ze}from"./useDictOptions.1cd81cc1.js";import{a as Ne}from"./store_product.95e574d3.js";import{g as Ie,t as Te,w as Ue}from"./workbench.ced7354b.js";import{_ as Ke}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.ba0b860c.js";import{_ as Oe}from"./stockDetails.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.9b527cde.js";import{_ as We}from"./warehouseProduct.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.e6f1875a.js";import{a as je}from"./store_category.3fcc23e3.js";import{u as qe}from"./vue-router.10bd5b90.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.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.0e5577f4.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.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.8d65305c.js";import"./index.395bb96e.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./store_order.29a4dd3c.js";const Me={class:"flex flex-wrap"},Je={class:"mr-2"},Ze={class:"text-info"},Ge={key:0},He={class:"text-2xl mr-2"},Qe={class:"text-2xl mr-2"},Xe={key:1},Ye={class:"text-6xl mr-2"},et={class:"mt-4"},tt={class:"flex mt-4 justify-end"},ot=K({name:"storeProductLists"}),Xt=K({...ot,setup(at){const O=f(!1),W=f(!1),j=f(!1),A=qe(),b=f(null),k=f(null),E=f(null),i=I({store_name:"",class_all:"",bar_code:"",field:"stock",order_by:""}),q=()=>{Ie({}).then(n=>{})},M=async n=>{var o,r;O.value=!0,await P(),(o=b.value)==null||o.open(),(r=b.value)==null||r.getDetail(n)},S=async(n,o=1)=>{var r,s;W.value=!0,await P(),(r=k.value)==null||r.open(),(s=k.value)==null||s.getDetail(n,o)},F=async(n,o=1)=>{var r,s;j.value=!0,await P(),(r=E.value)==null||r.open(),(s=E.value)==null||s.getDetail(n,o)},J=f([]),Z=n=>{J.value=n.map(({id:o})=>o)};ze("");let $=1;A.query.page_no&&($=parseInt(A.query.page_no));const{pager:C,getLists:z,resetParams:G,resetPage:v}=$e({page:$,fetchFun:Ue,params:i});let D,x;const B=f(!1);let R;const H=n=>(R=n,B.value=!0,N.lazyLoad(x,D),!1),N={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(n,o){D||(D=o),x||(x=n);const r=n.value||0;let s={};B.value?(s={name:R},R||(s={pid:r,page_size:1e4})):s={pid:r,page_size:1e4},je({...s}).then(V=>{o(V.lists.map(w=>(w.leaf=!0,B.value=!1,w)))})}},Q=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],X=f(["RectangleCopy58","RectangleCopy48","RectangleCopy65","RectangleCopy62","RectangleCopy56","RectangleCopy55","RectangleCopy57","RectangleCopy65","RectangleCopy61","RectangleCopy52","RectangleCopy14","RectangleCopy32"]),h=I({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:{type:"value",name:"\u91D1\u989D",position:"left",axisLabel:{formatter:"{value}"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u8BBF\u95EE\u91CF"]},itemStyle:{color:"red"},tooltip:{trigger:"axis"},series:[{name:"\u8BBF\u95EE\u91CF",data:[0],type:"line",smooth:!0}]}),Y=()=>{Te({}).then(n=>{h.xAxis.data=[],h.series=[],console.log(n),h.legend.data=Object.values(n.series).map(o=>o.name),h.xAxis.data=n.x,h.series=Object.values(n.series).map(o=>({type:"line",smooth:!0,data:o.value,name:o.name,total_value:o.total_value,rate:o.rate,desc:o.desc,total_money:o.total_money}))})};return Be(()=>{z(),Y()}),(n,o)=>{const r=me,s=de,V=ce,w=_e,ee=fe,d=ye,te=xe,oe=Ce,L=he,ae=De,le=Re("Warning"),ne=ge,se=ve,u=we,re=be,ue=ke,ie=Fe,pe=Ee;return y(),g("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(oe,{class:"mb-[-16px]",model:l(i),inline:""},{default:a(()=>[e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(r,{class:"w-[280px]",onKeydown:Ve(l(v),["enter"]),modelValue:l(i).store_name,"onUpdate:modelValue":o[0]||(o[0]=t=>l(i).store_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(s,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:l(i).bar_code,"onUpdate:modelValue":o[1]||(o[1]=t=>l(i).bar_code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:a(()=>[e(V,{class:"w-[280px]",modelValue:l(i).class_all,"onUpdate:modelValue":o[2]||(o[2]=t=>l(i).class_all=t),filterable:"",clearable:"","before-filter":H,props:N,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:l(v)},null,8,["modelValue","onChange"])]),_:1}),e(s,{label:"\u6392\u5E8F",prop:"order_by"},{default:a(()=>[e(ee,{modelValue:l(i).order_by,"onUpdate:modelValue":o[3]||(o[3]=t=>l(i).order_by=t),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:l(v)},{default:a(()=>[(y(),g(T,null,U([{id:"asc",name:"\u5347\u5E8F"},{id:"desc",name:"\u964D\u5E8F"}],t=>e(w,{key:t.id,label:t.name,value:t.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),e(s,null,{default:a(()=>[e(d,{type:"primary",onClick:l(v)},{default:a(()=>o[5]||(o[5]=[p("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(d,{onClick:l(G)},{default:a(()=>o[6]||(o[6]=[p("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(d,{type:"primary",onClick:q},{default:a(()=>o[7]||(o[7]=[p("\u91CD\u65B0\u7EDF\u8BA1\u6570\u636E")])),_:1}),e(te,{class:"ml-2.5","fetch-fun":l(Ne),params:l(i),"page-size":l(C).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[c("div",Me,[(y(!0),g(T,null,U(l(h).series,(t,_)=>(y(),g("div",{class:"w-1/5 flex mb-6",key:_},[c("div",Je,[c("div",{class:"rounded-full p-2",style:Le({"background-color":Q[_%4]})},[e(ae,{iconName:l(X)[_],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),c("div",null,[c("div",Ze,[p(m(t.name)+" ",1),e(se,{class:"box-item",effect:"dark",content:t.desc,placement:"top-start"},{default:a(()=>[e(ne,null,{default:a(()=>[e(le)]),_:1})]),_:2},1032,["content"])]),t.total_money!=""?(y(),g("div",Ge,[c("span",He,"\u5E93\u5B58:"+m(t.total_value),1),c("span",Qe,"\u91D1\u989D:"+m(t.total_money),1)])):(y(),g("div",Xe,[c("span",Ye,m(t.total_value),1)]))])]))),128))])]),_:1}),Pe((y(),Ae(L,{class:"!border-none",shadow:"never"},{default:a(()=>[c("div",et,[e(ue,{data:l(C).lists,onSelectionChange:Z},{default:a(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:t})=>[e(re,{style:{width:"50px",height:"50px"},src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(u,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>M(t)},{default:a(()=>[p(m(t.sales||0),1)]),_:2},1032,["onClick"])]),_:1}),e(u,{label:"\u95E8\u5E97\u5E93\u5B58",prop:"store_stock","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>S(t,1)},{default:a(()=>[p(m(t.store_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(u,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"warehouse_stock","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>S(t,0)},{default:a(()=>[p(m(t.warehouse_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(u,{label:"\u5E93\u5B58",prop:"total_stock","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u4EF7\u503C",prop:"total_price","min-width":"100","show-overflow-tooltip":""}),e(u,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_purchase","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>F(t,1)},{default:a(()=>[p(m(t.total_purchase||0),1)]),_:2},1032,["onClick"])]),_:1}),e(u,{label:"\u5DF2\u7ED3",prop:"total_completed_amount","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>F(t,2)},{default:a(()=>[p(m(t.total_completed_amount||0),1)]),_:2},1032,["onClick"])]),_:1}),e(u,{label:"\u672A\u7ED3",prop:"total_outstanding_amount","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(d,{type:"primary",link:"",onClick:_=>F(t,3)},{default:a(()=>[p(m(t.total_outstanding_amount||0),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),c("div",tt,[e(ie,{modelValue:l(C),"onUpdate:modelValue":o[4]||(o[4]=t=>Se(C)?C.value=t:null),onChange:l(z)},null,8,["modelValue","onChange"])])]),_:1})),[[pe,l(C).loading]]),e(Ke,{ref_key:"detailsRef",ref:b},null,512),e(Oe,{ref_key:"stockDetailsRef",ref:k},null,512),e(We,{ref_key:"warehouseProductRef",ref:E},null,512)])}}});export{Xt as default};