moreShopAdmin/dist/admin/assets/index.2e9adab8.js

2 lines
8.8 KiB
JavaScript

import{a6 as ee,C as te,D as oe,w as ae,F as le,L as ne,c as se,a as ie,M as re,b as ue,N as pe,O as ce}from"./element-plus.a63a26dd.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as _e}from"./index.e9b11dfe.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.66098b57.js";import{d as S,r as g,Z as $,i as fe,af as Ce,o as y,c as v,U as e,L as o,u as l,aa as he,R as p,a as c,T as ye,a9 as ge,a0 as ve,S as r,M as we,K as be,j as ke,n as xe}from"./@vue.18505fe0.js";import{u as Fe}from"./usePaging.6a6670f9.js";import{u as Ee}from"./useDictOptions.798027a7.js";import{a as z}from"./store_product.ad22c96e.js";import{t as De}from"./workbench.652c5043.js";import"./lodash.2473fc51.js";import"./index.4eacc1fd.js";import{_ as Be}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.a19fcebf.js";import{a as Re}from"./store_category.4846b732.js";import{u as Le}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.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.51a7d64e.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.58af5558.js";import"./system_store.4ee984bb.js";import"./warehouse_product_storege.74c2a590.js";const Ve={class:"flex flex-wrap"},Ae={class:"mr-2"},$e={class:"text-info"},ze={key:0},Se={class:"text-2xl mr-2"},Ne={class:"text-2xl mr-2"},Pe={key:1},Ie={class:"text-6xl mr-2"},Te={class:"mt-4"},Ue={class:"flex mt-4 justify-end"},je=S({name:"storeProductLists"}),zt=S({...je,setup(Ke){const N=g(!1),R=Le(),w=g(null),m=$({store_name:"",class_all:"",bar_code:""}),f=async n=>{var a,d;N.value=!0,await xe(),(a=w.value)==null||a.open(),(d=w.value)==null||d.getDetail(n)},P=g([]),I=n=>{P.value=n.map(({id:a})=>a)};Ee("");let L=1;R.query.page_no&&(L=parseInt(R.query.page_no));const{pager:C,getLists:V,resetParams:T,resetPage:b}=Fe({page:L,fetchFun:z,params:m});let k,x;const F=g(!1);let E;const U=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},Re({..._}).then(D=>{a(D.lists.map(i=>(i.leaf=!0,F.value=!1,i)))})}},j=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],K=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}]}),O=()=>{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 fe(()=>{V(),O()}),(n,a)=>{const d=te,_=oe,D=ee,i=ae,q=de,M=le,B=ne,W=_e,Z=Ce("Warning"),G=se,H=ie,s=re,J=ue,Q=pe,X=me,Y=ce;return y(),v("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(M,{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:he(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":U,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(T)},{default:o(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(q,{class:"ml-2.5","fetch-fun":l(z),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",Ve,[(y(!0),v(ye,null,ge(l(h).series,(t,u)=>(y(),v("div",{class:"w-1/5 flex mb-6",key:u},[c("div",Ae,[c("div",{class:"rounded-full p-2",style:ve({"background-color":j[u%4]})},[e(W,{iconName:l(K)[u],white:"",className:"text-6xl"},null,8,["iconName"])],4)]),c("div",null,[c("div",$e,[p(r(t.name)+" ",1),e(H,{class:"box-item",effect:"dark",content:t.desc,placement:"top-start"},{default:o(()=>[e(G,null,{default:o(()=>[e(Z)]),_:1})]),_:2},1032,["content"])]),t.total_money!=""?(y(),v("div",ze,[c("span",Se,"\u5E93\u5B58:"+r(t.total_value),1),c("span",Ne,"\u91D1\u989D:"+r(t.total_money),1)])):(y(),v("div",Pe,[c("span",Ie,r(t.total_value),1)]))])]))),128))])]),_:1}),we((y(),be(B,{class:"!border-none",shadow:"never"},{default:o(()=>[c("div",Te,[e(Q,{data:l(C).lists,onSelectionChange:I},{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(J,{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",Ue,[e(X,{modelValue:l(C),"onUpdate:modelValue":a[3]||(a[3]=t=>ke(C)?C.value=t:null),onChange:l(V)},null,8,["modelValue","onChange"])])]),_:1})),[[Y,l(C).loading]]),e(Be,{ref_key:"detailsRef",ref:w},null,512)])}}});export{zt as default};