2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
import{m as E,_ as z,r as n,aT as N,bh as m,b as S,bg as R,p as g,q as U,t as e,v as s,u as t,i as v,a2 as b,L as $,y as j,x as C,aX as J,ae as X,aY as A,b5 as G,b6 as H,J as K,b7 as O,b8 as Q}from"./.pnpm.1b0299fb.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.7b0278dc.js";import{u as ee}from"./usePaging.00aa976d.js";import{u as te}from"./useDictOptions.e9843f63.js";import{p as D}from"./workbench.f568dc98.js";import"./lodash.c3b66c05.js";import"./index.689cfa31.js";import"./index.6c48d0ba.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.abac7546.js";import"./@vueuse.72d44d91.js";import"./@vue.9d708d7c.js";const oe={class:"mt-4"},ae={class:"flex mt-4 justify-end"},le=E({name:"storeProductLists"}),ge=E({...le,setup(ne){const _=z();n(null);const l=n([new Date,new Date]),r=N({start_time:m(l.value[0]).format("YYYY-MM-DD")+" 00:00:00",end_time:m(l.value[1]).format("YYYY-MM-DD")+" 23:59:59",is_all:"",store_id:""}),Y=()=>{l.value[0]&&l.value[1]?(r.start_time=m(l.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=m(l.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time=""),p()};n(!1),n([]);const F=n([]),k=c=>{F.value=c.map(({id:o})=>o)};te("");let d=1;_.query.page_no&&(d=parseInt(_.query.page_no));const y=n(D),{pager:i,getLists:p,resetParams:x,resetPage:B}=ee({page:d,fetchFun:y.value,params:r});return n(!1),n("primary"),n(""),S(()=>{p()}),(c,o)=>{const M=R,f=J,h=X,V=Z,P=A,w=G,a=H,T=K,q=O,I=W,L=Q;return g(),U("div",null,[e(w,{class:"!border-none mb-4",shadow:"never"},{default:s(()=>[e(P,{class:"mb-[-16px]",model:t(r),inline:""},{default:s(()=>[e(f,{label:"",prop:"create_time"},{default:s(()=>[e(M,{modelValue:t(l),"onUpdate:modelValue":o[0]||(o[0]=u=>v(l)?l.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:Y},null,8,["modelValue"])]),_:1}),e(f,null,{default:s(()=>[e(h,{type:"primary",onClick:t(B)},{default:s(()=>o[2]||(o[2]=[b("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(h,{onClick:t(x)},{default:s(()=>o[3]||(o[3]=[b("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(V,{class:"ml-2.5","fetch-fun":t(D),params:t(r),"page-size":t(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),$((g(),j(w,{class:"!border-none",shadow:"never"},{default:s(()=>[C("div",oe,[e(q,{data:t(i).lists,onSelectionChange:k},{default:s(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:s(({row:u})=>[e(T,{style:{width:"50px",height:"50px"},src:u.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(a,{label:"\u89C4\u683C",prop:"store_info","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u6570\u91CF",prop:"cart_num","min-width":"100","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u603B\u4EF7",prop:"total_price","min-width":"120","show-overflow-tooltip":""})]),_:1},8,["data"])]),C("div",ae,[e(I,{modelValue:t(i),"onUpdate:modelValue":o[1]||(o[1]=u=>v(i)?i.value=u:null),onChange:t(p)},null,8,["modelValue","onChange"])])]),_:1})),[[L,t(i).loading]])])}}});export{ge as default};
|