moreShopAdmin/build/admin/assets/index.685cc7d8.js

2 lines
8.7 KiB
JavaScript

import{a6 as Y,C as ee,D as te,w as oe,F as ae,L as le,c as ne,a as se,M as ie,b as re,N as ue,O as pe}from"./element-plus.4a7d92a3.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as me}from"./index.f792e2c9.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.f1e07395.js";import{d as z,r as g,Z as $,i as de,af as fe,o as y,c as v,U as e,L as o,u as l,aa as Ce,R as p,a as c,T as he,a9 as ye,a0 as ge,S as r,M as ve,K as we,j as be,n as ke}from"./@vue.18505fe0.js";import{u as xe}from"./usePaging.6a6670f9.js";import{u as Fe}from"./useDictOptions.d26b50f5.js";import{a as Ee}from"./store_product.4d10c196.js";import{t as De,w as Be}from"./workbench.3d496008.js";import{_ as Re}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.fae2c8dd.js";import{a as Le}from"./store_category.01b46e8c.js";import{u as Ve}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.5488da9c.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.fc5b29ca.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./store_order.ef674416.js";const Ae={class:"flex flex-wrap"},$e={class:"mr-2"},ze={class:"text-info"},Se={key:0},Ne={class:"text-2xl mr-2"},Pe={class:"text-2xl mr-2"},Ie={key:1},Te={class:"text-6xl mr-2"},Ue={class:"mt-4"},je={class:"flex mt-4 justify-end"},Ke=z({name:"storeProductLists"}),$t=z({...Ke,setup(Oe){const S=g(!1),R=Ve(),w=g(null),m=$({store_name:"",class_all:"",bar_code:""}),f=async n=>{var a,d;S.value=!0,await ke(),(a=w.value)==null||a.open(),(d=w.value)==null||d.getDetail(n)},N=g([]),P=n=>{N.value=n.map(({id:a})=>a)};Fe("");let L=1;R.query.page_no&&(L=parseInt(R.query.page_no));const{pager:C,getLists:V,resetParams:I,resetPage:b}=xe({page:L,fetchFun:Be,params:m});let k,x;const F=g(!1);let E;const T=n=>(E=n,F.value=!0,A.lazyLoad(x,k),!1),A={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(n,a){k||(k=a),x||(x=n);const d=n.value||0;let _={};F.value?(_={name:E},E||(_={pid:d,page_size:1e4})):_={pid:d,page_size:1e4},Le({..._}).then(D=>{a(D.lists.map(i=>(i.leaf=!0,F.value=!1,i)))})}},U=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],j=g(["RectangleCopy58","RectangleCopy48","RectangleCopy65","RectangleCopy62","RectangleCopy56","RectangleCopy55","RectangleCopy57","RectangleCopy65","RectangleCopy61","RectangleCopy52","RectangleCopy14","RectangleCopy32"]),h=$({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}]}),K=()=>{De({}).then(n=>{h.xAxis.data=[],h.series=[],console.log(n),h.legend.data=Object.values(n.series).map(a=>a.name),h.xAxis.data=n.x,h.series=Object.values(n.series).map(a=>({type:"line",smooth:!0,data:a.value,name:a.name,total_value:a.total_value,rate:a.rate,desc:a.desc,total_money:a.total_money}))})};return de(()=>{V(),K()}),(n,a)=>{const d=ee,_=te,D=Y,i=oe,O=_e,q=ae,B=le,M=me,W=fe("Warning"),Z=ne,G=se,s=ie,H=re,J=ue,Q=ce,X=pe;return y(),v("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(q,{class:"mb-[-16px]",model:l(m),inline:""},{default:o(()=>[e(_,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(d,{class:"w-[280px]",onKeydown:Ce(l(b),["enter"]),modelValue:l(m).store_name,"onUpdate:modelValue":a[0]||(a[0]=t=>l(m).store_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(_,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:l(m).bar_code,"onUpdate:modelValue":a[1]||(a[1]=t=>l(m).bar_code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:o(()=>[e(D,{class:"w-[280px]",modelValue:l(m).class_all,"onUpdate:modelValue":a[2]||(a[2]=t=>l(m).class_all=t),filterable:"",clearable:"","before-filter":T,props:A,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:l(b)},null,8,["modelValue","onChange"])]),_:1}),e(_,null,{default:o(()=>[e(i,{type:"primary",onClick:l(b)},{default:o(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(i,{onClick:l(I)},{default:o(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":l(Ee),params:l(m),"page-size":l(C).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),e(B,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[c("div",Ae,[(y(!0),v(he,null,ye(l(h).series,(t,u)=>(y(),v("div",{class:"w-1/5 flex mb-6",key:u},[c("div",$e,[c("div",{class:"rounded-full p-2",style:ge({"background-color":U[u%4]})},[e(M,{iconName:l(j)[u],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),c("div",null,[c("div",ze,[p(r(t.name)+" ",1),e(G,{class:"box-item",effect:"dark",content:t.desc,placement:"top-start"},{default:o(()=>[e(Z,null,{default:o(()=>[e(W)]),_:1})]),_:2},1032,["content"])]),t.total_money!=""?(y(),v("div",Se,[c("span",Ne,"\u5E93\u5B58:"+r(t.total_value),1),c("span",Pe,"\u91D1\u989D:"+r(t.total_money),1)])):(y(),v("div",Ie,[c("span",Te,r(t.total_value),1)]))])]))),128))])]),_:1}),ve((y(),we(B,{class:"!border-none",shadow:"never"},{default:o(()=>[c("div",Ue,[e(J,{data:l(C).lists,onSelectionChange:P},{default:o(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:t})=>[e(H,{style:{width:"50px",height:"50px"},src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(s,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(s,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(s,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.sales||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u95E8\u5E97\u5E93\u5B58",prop:"store_stock","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.store_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"warehouse_stock","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.warehouse_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u603B\u5E93\u5B58",prop:"total_stock","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.total_stock||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_purchase","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.total_purchase||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u5DF2\u7ED3",prop:"total_completed_amount","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.total_completed_amount||0),1)]),_:2},1032,["onClick"])]),_:1}),e(s,{label:"\u672A\u7ED3",prop:"total_outstanding_amount","min-width":"100","show-overflow-tooltip":""},{default:o(({row:t})=>[e(i,{type:"primary",link:"",onClick:u=>f(t)},{default:o(()=>[p(r(t.total_outstanding_amount||0),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),c("div",je,[e(Q,{modelValue:l(C),"onUpdate:modelValue":a[3]||(a[3]=t=>be(C)?C.value=t:null),onChange:l(V)},null,8,["modelValue","onChange"])])]),_:1})),[[X,l(C).loading]]),e(Re,{ref_key:"detailsRef",ref:w},null,512)])}}});export{$t as default};