2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
|
import{K as Y,V as te,k as oe,C as ae,D as ue,N as le,O as re,w as se,F as ne,G as ie,b as pe,H as de,L as me,I as ce}from"./element-plus.8e273e86.js";import{d as _e,e as fe,f as Ee,g as ve}from"./store_product_price.a660359c.js";import{h as I}from"./moment.40bc58bf.js";import{B as Fe}from"./vue-echarts.fe276ff7.js";import{d as y,Z as N,i as he,o as m,c as R,U as o,L as a,a as n,u,r as v,s as De,ap as Ce,R as F,M as k,K as h,S as s,Q as V,j as L,n as be}from"./@vue.76ce7aa3.js";import{_ as ge}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{u as we}from"./usePaging.f8c888e4.js";import{u as ye}from"./useDictOptions.07ca1b00.js";import"./lodash.41b9567d.js";import{f as Be}from"./index.24fc06d8.js";import{_ as xe}from"./edit.vue_vue_type_script_setup_true_name_storeProductPriceEdit_lang.4e066f7e.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"./resize-detector.4e96b72b.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.d4083d21.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const ke={class:"workbench"},Ve=y({name:"product"}),Se=y({...Ve,props:{type:Number,productId:Number},setup(S){const p=N({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}]}),_=S,D=()=>{let C={type:_.type,product_id:_.productId};_e(C).then(c=>{p.xAxis.data=[],p.series=[],p.legend.data=c.series.map(d=>d.name),c.x.forEach(d=>{p.xAxis.data.push(d)}),p.series=c.series.map(d=>({type:"line",smooth:!0,data:d.value,name:d.name}))})};return he(()=>{D()}),(C,c)=>{const d=Y;return m(),R("div",ke,[o(d,{shadow:"never",class:"mt-4 !border-none"},{default:a(()=>[n("div",null,[o(u(Fe),{style:{height:"400px"},option:u(p),autoresize:!0},null,8,["option"])])]),_:1})])}}}),Pe={class:"mt-4"},Me=["onClick"],Ae={class:"flex mt-4 justify-end"},$e=y({name:"storeProductPriceLists"}),yt=y({...$e,setup(S){const p=v(!1),_=v(""),D=v(0),C=r=>{p.value=!0,_.value=r,D.value++},c=[{text:"\u8FD1\u4E00\u5468",value:()=>{const r=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,r]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const r=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,r]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const r=new Date,t=new Date;return t.setMonth(t.getMonth()-3),[t,r]}}],d=()=>{l.timeScope[0]&&l.timeScope[1]?(l.start_time=I(l.timeScope[0]).format("YYYY-MM-DD")+" 00:00:00",l.end_time=I(l.timeScope[1]).format("YYYY-MM-DD")+" 23:59:59"):(l.start_time="",l.end_time="")},B=De(),x=v(!1),l=N({store_name:"",start_time:"",end_time:"",timeScope:[],status:""});v([]);const{dictData:U}=ye(""),{pager:f,getLists:b,resetParams:T,resetPage:K}=we({fetchFun:ve,params:l}),O=async r=>{var t,g;x.value=!0,await be(),(t=B.value)==null||t.open("edit"),(g=B.value)==null||g.setFormData(r)},j=async r=>{await Be.confirm("\u662F\u5426\u6539\u4EF7:"+r.store_name),await fe({id:r.id}),b()},q=()=>{Ee(l).then(r=>{window.open(r.url,"_blank"),oe.success("\u5BFC
|