2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{a6 as T,C as $,D as j,w as A,F as O,L as Z,M as G,b as H,N as J,O as Q}from"./element-plus.a63a26dd.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.190acaed.js";import{d as x,r as C,Z as Y,i as oo,o as B,c as eo,U as o,L as t,u as a,aa as to,R as V,M as ao,K as lo,a as u,S as p,j as so}from"./@vue.18505fe0.js";import{u as ro}from"./usePaging.6a6670f9.js";import{u as no}from"./useDictOptions.0eb53904.js";import{a as k}from"./store_product.e75e7854.js";import"./lodash.2473fc51.js";import"./index.1cfe89cd.js";import{_ as uo}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.b755514c.js";import{a as io}from"./store_category.8ccba5d1.js";import{u as po}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.c92eb5f0.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.9e41732d.js";import"./system_store.eaac031a.js";import"./warehouse_product_storege.52534b9b.js";const mo={class:"mt-4"},_o={style:{color:"#409eff",cursor:"pointer"}},co={style:{color:"#409eff",cursor:"pointer"}},fo={style:{color:"#409eff",cursor:"pointer"}},ho={style:{color:"#409eff",cursor:"pointer"}},wo={style:{color:"#409eff",cursor:"pointer"}},bo={style:{color:"#409eff",cursor:"pointer"}},go={style:{color:"#409eff",cursor:"pointer"}},Co={class:"flex mt-4 justify-end"},vo=x({name:"storeProductLists"}),_e=x({...vo,setup(Eo){const v=po(),L=C(null),r=Y({store_name:"",class_all:"",bar_code:""}),z=C([]),P=i=>{z.value=i.map(({id:l})=>l)};no("");let E=1;v.query.page_no&&(E=parseInt(v.query.page_no));const{pager:m,getLists:y,resetParams:S,resetPage:d}=ro({page:E,fetchFun:k,params:r});let f,h;const w=C(!1);let b;const I=i=>(b=i,w.value=!0,F.lazyLoad(h,f),!1),F={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(i,l){f||(f=l),h||(h=i);const _=i.value||0;let n={};w.value?(n={name:b},b||(n={pid:_,page_size:1e4})):n={pid:_,page_size:1e4},io({...n}).then(g=>{l(g.lists.map(c=>(c.leaf=!0,w.value=!1,c)))})}};return oo(()=>{y()}),(i,l)=>{const _=$,n=j,g=T,c=A,R=X,U=O,D=Z,s=G,K=H,N=J,q=W,M=Q;return B(),eo("div",null,[o(D,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[o(U,{class:"mb-[-16px]",model:a(r),inline:""},{default:t(()=>[o(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[o(_,{class:"w-[280px]",onKeydown:to(a(d),["enter"]),modelValue:a(r).store_name,"onUpdate:modelValue":l[0]||(l[0]=e=>a(r).store_name=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),o(n,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:t(()=>[o(_,{class:"w-[280px]",modelValue:a(r).bar_code,"onUpdate:modelValue":l[1]||(l[1]=e=>a(r).bar_code=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),o(n,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:t(()=>[o(g,{class:"w-[280px]",modelValue:a(r).class_all,"onUpdate:modelValue":l[2]||(l[2]=e=>a(r).class_all=e),filterable:"",clearable:"","before-filter":I,props:F,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:a(d)},null,8,["modelValue","onChange"])]),_:1}),o(n,null,{default:t(()=>[o(c,{type:"primary",onClick:a(d)},{default:t(()=>[V("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(c,{onClick:a(S)},{default:t(()=>[V("\u91CD\u7F6E")]),_:1},8,["onClick"]),o(R,{class:"ml-2.5","fetch-fun":a(k),params:a(r),"page-size":a(m).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),ao((B(),lo(D,{class:"!border-none",shadow:"never"},{default:t(()=>[u("div",mo,[o(N,{data:a(m).lists,onSelectionChange:P},{default:t(()=>[o(s,{type:"selection",width:"55"}),o(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:e})=>[o(K,{style:{width:"50px",height:"50px"},src:e.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(s,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),o(s,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(s,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",_o,p(e.sales||0),1)]),_:1}),o(s,{label:"\u95E8\u5E97\u5E93\u5B58",prop:"store_stock","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",co,p(e.store_stock||0),1)]),_:1}),o(s,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"warehouse_stock","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",fo,p(e.warehouse_stock||0),1)]),_:1}),o(s,{label:"\u603B\u5E93\u5B58",prop:"total_stock","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",ho,p(e.total_stock||0),1)]),_:1}),o(s,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_purchase","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",wo,p(e.total_purchase||0),1)]),_:1}),o(s,{label:"\u5DF2\u7ED3",prop:"total_completed_amount","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",bo,p(e.total_completed_amount||0),1)]),_:1}),o(s,{label:"\u672A\u7ED3",prop:"total_outstanding_amount","min-width":"100","show-overflow-tooltip":""},{default:t(({row:e})=>[u("span",go,p(e.total_outstanding_amount||0),1)]),_:1})]),_:1},8,["data"])]),u("div",Co,[o(q,{modelValue:a(m),"onUpdate:modelValue":l[3]||(l[3]=e=>so(m)?m.value=e:null),onChange:a(y)},null,8,["modelValue","onChange"])])]),_:1})),[[M,a(m).loading]]),o(uo,{ref_key:"detailsRef",ref:L},null,512)])}}});export{_e as default};
|