moreShopAdmin/build/admin/assets/index.90bd0af8.js

2 lines
9.7 KiB
JavaScript

import{a6 as ce,C as me,D as _e,J as de,K as fe,w as he,F as ye,L as Ce,c as ge,a as ve,M as we,b as be,N as ke,O as Ee}from"./element-plus.4a7d92a3.js";import{_ as Fe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as De}from"./index.a3fee6aa.js";import{_ as xe}from"./index.vue_vue_type_script_setup_true_lang.baee2158.js";import{d as K,r as f,Z as I,i as Be,af as Re,o as h,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.18505fe0.js";import{u as $e}from"./usePaging.6a6670f9.js";import{u as ze}from"./useDictOptions.a54ffff6.js";import{a as Ne}from"./store_product.05ffdd5d.js";import{g as Ie,t as Te,w as Ue}from"./workbench.20aa021b.js";import{_ as Ke}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.56df21f8.js";import{_ as Oe}from"./stockDetails.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.84c22b6b.js";import{_ as We}from"./warehouseProduct.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.a0bb4abb.js";import{a as je}from"./store_category.f82ffe79.js";import{u as qe}from"./vue-router.101084e3.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"./index.d6bf0bc9.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"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./store_order.69499fa7.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"}),Gt=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:y,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"]),C=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=>{C.xAxis.data=[],C.series=[],console.log(n),C.legend.data=Object.values(n.series).map(o=>o.name),C.xAxis.data=n.x,C.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=_e,V=ce,w=de,ee=fe,_=he,te=xe,oe=ye,L=Ce,ae=De,le=Re("Warning"),ne=ge,se=ve,u=we,re=be,ue=ke,ie=Fe,pe=Ee;return h(),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(()=>[(h(),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(_,{type:"primary",onClick:l(v)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(_,{onClick:l(G)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(_,{type:"primary",onClick:q},{default:a(()=>[p("\u91CD\u65B0\u7EDF\u8BA1\u6570\u636E")]),_:1}),e(te,{class:"ml-2.5","fetch-fun":l(Ne),params:l(i),"page-size":l(y).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,[(h(!0),g(T,null,U(l(C).series,(t,d)=>(h(),g("div",{class:"w-1/5 flex mb-6",key:d},[c("div",Je,[c("div",{class:"rounded-full p-2",style:Le({"background-color":Q[d%4]})},[e(ae,{iconName:l(X)[d],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!=""?(h(),g("div",Ge,[c("span",He,"\u5E93\u5B58:"+m(t.total_value),1),c("span",Qe,"\u91D1\u989D:"+m(t.total_money),1)])):(h(),g("div",Xe,[c("span",Ye,m(t.total_value),1)]))])]))),128))])]),_:1}),Pe((h(),Ae(L,{class:"!border-none",shadow:"never"},{default:a(()=>[c("div",et,[e(ue,{data:l(y).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(_,{type:"primary",link:"",onClick:d=>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(_,{type:"primary",link:"",onClick:d=>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(_,{type:"primary",link:"",onClick:d=>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(_,{type:"primary",link:"",onClick:d=>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(_,{type:"primary",link:"",onClick:d=>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(_,{type:"primary",link:"",onClick:d=>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(y),"onUpdate:modelValue":o[4]||(o[4]=t=>Se(y)?y.value=t:null),onChange:l(z)},null,8,["modelValue","onChange"])])]),_:1})),[[pe,l(y).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{Gt as default};