2 lines
9.5 KiB
JavaScript
2 lines
9.5 KiB
JavaScript
import{a6 as pe,C as ce,D as me,J as _e,K as de,w as fe,F as he,L as ye,c as Ce,a as ge,M as ve,b as we,N as be,O as ke}from"./element-plus.4a7d92a3.js";import{_ as Ee}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as Fe}from"./index.e340c031.js";import{_ as xe}from"./index.vue_vue_type_script_setup_true_lang.9d071c48.js";import{d as K,r as _,Z as I,i as De,af as Be,o as h,c as g,U as e,L as a,u as l,aa as Re,T,a9 as U,R as d,a as p,a0 as Ve,S as c,M as Le,K as Ae,j as Pe,n as A}from"./@vue.18505fe0.js";import{u as Se}from"./usePaging.6a6670f9.js";import{u as $e}from"./useDictOptions.2501ee85.js";import{a as ze}from"./store_product.75c7e4ef.js";import{t as Ne,w as Ie}from"./workbench.7f3d48ab.js";import{_ as Te}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.d27fa072.js";import{_ as Ue}from"./stockDetails.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.5f2b6efb.js";import{_ as Ke}from"./warehouseProduct.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.915ac172.js";import{a as Oe}from"./store_category.d8c78c73.js";import{u as We}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.1bc00f65.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.c28c2057.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./store_order.ab9194f9.js";const je={class:"flex flex-wrap"},qe={class:"mr-2"},Me={class:"text-info"},Je={key:0},Ze={class:"text-2xl mr-2"},Ge={class:"text-2xl mr-2"},He={key:1},Qe={class:"text-6xl mr-2"},Xe={class:"mt-4"},Ye={class:"flex mt-4 justify-end"},et=K({name:"storeProductLists"}),Jt=K({...et,setup(tt){const O=_(!1),W=_(!1),j=_(!1),P=We(),b=_(null),k=_(null),E=_(null),u=I({store_name:"",class_all:"",bar_code:"",field:"stock",order_by:""}),q=async n=>{var o,r;O.value=!0,await A(),(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 A(),(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 A(),(r=E.value)==null||r.open(),(s=E.value)==null||s.getDetail(n,o)},M=_([]),J=n=>{M.value=n.map(({id:o})=>o)};$e("");let $=1;P.query.page_no&&($=parseInt(P.query.page_no));const{pager:y,getLists:z,resetParams:Z,resetPage:v}=Se({page:$,fetchFun:Ie,params:u});let x,D;const B=_(!1);let R;const G=n=>(R=n,B.value=!0,N.lazyLoad(D,x),!1),N={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(n,o){x||(x=o),D||(D=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},Oe({...s}).then(V=>{o(V.lists.map(w=>(w.leaf=!0,B.value=!1,w)))})}},H=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],Q=_(["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}]}),X=()=>{Ne({}).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 De(()=>{z(),X()}),(n,o)=>{const r=ce,s=me,V=pe,w=_e,Y=de,f=fe,ee=xe,te=he,L=ye,oe=Fe,ae=Be("Warning"),le=Ce,ne=ge,i=ve,se=we,re=be,ue=Ee,ie=ke;return h(),g("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(te,{class:"mb-[-16px]",model:l(u),inline:""},{default:a(()=>[e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(r,{class:"w-[280px]",onKeydown:Re(l(v),["enter"]),modelValue:l(u).store_name,"onUpdate:modelValue":o[0]||(o[0]=t=>l(u).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(u).bar_code,"onUpdate:modelValue":o[1]||(o[1]=t=>l(u).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(u).class_all,"onUpdate:modelValue":o[2]||(o[2]=t=>l(u).class_all=t),filterable:"",clearable:"","before-filter":G,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(Y,{modelValue:l(u).order_by,"onUpdate:modelValue":o[3]||(o[3]=t=>l(u).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(f,{type:"primary",onClick:l(v)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(f,{onClick:l(Z)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(ee,{class:"ml-2.5","fetch-fun":l(ze),params:l(u),"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(()=>[p("div",je,[(h(!0),g(T,null,U(l(C).series,(t,m)=>(h(),g("div",{class:"w-1/5 flex mb-6",key:m},[p("div",qe,[p("div",{class:"rounded-full p-2",style:Ve({"background-color":H[m%4]})},[e(oe,{iconName:l(Q)[m],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),p("div",null,[p("div",Me,[d(c(t.name)+" ",1),e(ne,{class:"box-item",effect:"dark",content:t.desc,placement:"top-start"},{default:a(()=>[e(le,null,{default:a(()=>[e(ae)]),_:1})]),_:2},1032,["content"])]),t.total_money!=""?(h(),g("div",Je,[p("span",Ze,"\u5E93\u5B58:"+c(t.total_value),1),p("span",Ge,"\u91D1\u989D:"+c(t.total_money),1)])):(h(),g("div",He,[p("span",Qe,c(t.total_value),1)]))])]))),128))])]),_:1}),Le((h(),Ae(L,{class:"!border-none",shadow:"never"},{default:a(()=>[p("div",Xe,[e(re,{data:l(y).lists,onSelectionChange:J},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:t})=>[e(se,{style:{width:"50px",height:"50px"},src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(i,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>q(t)},{default:a(()=>[d(c(t.sales||0),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u95E8\u5E97\u5E93\u5B58",prop:"store_stock","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>S(t,1)},{default:a(()=>[d(c(t.store_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"warehouse_stock","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>S(t,0)},{default:a(()=>[d(c(t.warehouse_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u603B\u5E93\u5B58",prop:"total_stock","min-width":"100","show-overflow-tooltip":""}),e(i,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_purchase","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>F(t,1)},{default:a(()=>[d(c(t.total_purchase||0),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u5DF2\u7ED3",prop:"total_completed_amount","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>F(t,2)},{default:a(()=>[d(c(t.total_completed_amount||0),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u672A\u7ED3",prop:"total_outstanding_amount","min-width":"100","show-overflow-tooltip":""},{default:a(({row:t})=>[e(f,{type:"primary",link:"",onClick:m=>F(t,3)},{default:a(()=>[d(c(t.total_outstanding_amount||0),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),p("div",Ye,[e(ue,{modelValue:l(y),"onUpdate:modelValue":o[4]||(o[4]=t=>Pe(y)?y.value=t:null),onChange:l(z)},null,8,["modelValue","onChange"])])]),_:1})),[[ie,l(y).loading]]),e(Te,{ref_key:"detailsRef",ref:b},null,512),e(Ue,{ref_key:"stockDetailsRef",ref:k},null,512),e(Ke,{ref_key:"warehouseProductRef",ref:E},null,512)])}}});export{Jt as default};
|