moreShopAdmin/dist/admin/assets/index.c8eedf94.js

2 lines
7.8 KiB
JavaScript

import{a6 as X,C as Y,D as ee,w as oe,F as te,L as ae,M as le,b as se,t as re,N as ue,O as ne}from"./element-plus.4a7d92a3.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.19729ecd.js";import{d as I,s as me,r as C,Z as de,i as ce,af as _e,ap as fe,o as m,c as he,U as e,L as a,u as t,aa as we,R as d,M as f,K as _,a as U,j as ve,Q as Ce,n as be}from"./@vue.18505fe0.js";import{u as ge}from"./usePaging.6a6670f9.js";import{u as ye}from"./useDictOptions.b667e2de.js";import{a as q,g as Fe,h as Ee}from"./store_product.cf4dc635.js";import"./lodash.9dc701ad.js";import{f as ke}from"./index.71877caf.js";import{_ as Be}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.11414e7b.js";import{_ as De}from"./copy.vue_vue_type_script_setup_true_name_storeProductEdit_lang.9c53f25d.js";import{a as Ve}from"./store_category.12ba14f1.js";import{u as xe}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.b61e419c.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.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.vue_vue_type_script_setup_true_name_systemStoreLists_lang.d116d3c0.js";import"./system_store.955f1aa9.js";import"./warehouse_product_storege.c7910356.js";const Pe={class:"mt-4"},Se={class:"flex mt-4 justify-end"},$e=I({name:"storeProductLists"}),ko=I({...$e,setup(ze){const P=xe(),b=me(),g=C(null),y=C(!1),i=de({store_name:"",class_all:"",bar_code:""}),F=C([]),N=s=>{F.value=s.map(({id:o})=>o)};ye("");let S=1;P.query.page_no&&(S=parseInt(P.query.page_no));const{pager:c,getLists:v,resetParams:K,resetPage:E}=ge({page:S,fetchFun:q,params:i}),T=async s=>{var o,u;(o=g.value)==null||o.open(),(u=g.value)==null||u.setFormData(s)},M=async s=>{var o,u;y.value=!0,await be(),(o=b.value)==null||o.open("edit"),(u=b.value)==null||u.setFormData(s)};let k,B;const D=C(!1);let V;const j=s=>(V=s,D.value=!0,$.lazyLoad(B,k),!1),$={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(s,o){k||(k=o),B||(B=s);const u=s.value||0;let p={};D.value?(p={name:V},V||(p={pid:u,page_size:1e4})):p={pid:u,page_size:1e4},Ve({...p}).then(x=>{o(x.lists.map(n=>(n.leaf=!0,D.value=!1,n)))})}},A=s=>{Fe({id:s.id,is_show:s.is_show})},z=async s=>{await ke.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ee({id:s}),v()};return ce(()=>{v()}),(s,o)=>{const u=Y,p=ee,x=X,n=oe,O=pe,Q=te,L=ae,R=_e("router-link"),r=le,Z=se,G=re,H=ue,J=ie,h=fe("perms"),W=ne;return m(),he("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(Q,{class:"mb-[-16px]",model:t(i),inline:""},{default:a(()=>[e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[e(u,{class:"w-[280px]",onKeydown:we(t(E),["enter"]),modelValue:t(i).store_name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(i).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:t(i).bar_code,"onUpdate:modelValue":o[1]||(o[1]=l=>t(i).bar_code=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:a(()=>[e(x,{class:"w-[280px]",modelValue:t(i).class_all,"onUpdate:modelValue":o[2]||(o[2]=l=>t(i).class_all=l),filterable:"",clearable:"","before-filter":j,props:$,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:t(E)},null,8,["modelValue","onChange"])]),_:1}),e(p,null,{default:a(()=>[e(n,{type:"primary",onClick:t(E)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(n,{onClick:t(K)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":t(q),params:t(i),"page-size":t(c).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),f((m(),_(L,{class:"!border-none",shadow:"never"},{default:a(()=>[f((m(),_(R,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:a(()=>[e(n,{type:"primary",icon:"Plus"},{default:a(()=>[d(" \u65B0\u589E ")]),_:1})]),_:1})),[[h,["store_product.store_product/add"]]]),f((m(),_(n,{disabled:!t(F).length,onClick:o[3]||(o[3]=l=>z(t(F)))},{default:a(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[h,["store_product.store_product/delete"]]]),U("div",Pe,[e(H,{data:t(c).lists,onSelectionChange:N},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:l})=>[e(Z,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(r,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(r,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(r,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(r,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(r,{label:"\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(r,{label:"\u8D77\u6279\u91CF",prop:"batch","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),e(r,{label:"\u72B6\u6001",prop:"is_show"},{default:a(({row:l})=>[e(G,{size:"large",onChange:w=>A(l),modelValue:l.is_show,"onUpdate:modelValue":w=>l.is_show=w,"active-value":1,"inactive-value":0,"active-text":"\u4E0A\u67B6","inactive-text":"\u4E0B\u67B6","inline-prompt":""},null,8,["onChange","modelValue","onUpdate:modelValue"])]),_:1}),e(r,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:a(({row:l})=>[f((m(),_(R,{to:{path:"store_product_edit",query:{id:l.id,mode:"edit",page:t(c).page}},class:"mr-4"},{default:a(()=>[e(n,{type:"primary",link:""},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[h,["store_product.store_product/edit"]]]),f((m(),_(n,{type:"primary",link:"",onClick:w=>T(l)},{default:a(()=>[d(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[h,["store_product.store_product/edit"]]]),e(n,{type:"primary",link:"",onClick:w=>M(l)},{default:a(()=>[d(" \u590D\u5236 ")]),_:2},1032,["onClick"]),f((m(),_(n,{type:"danger",link:"",onClick:w=>z(l.id)},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),U("div",Se,[e(J,{modelValue:t(c),"onUpdate:modelValue":o[4]||(o[4]=l=>ve(c)?c.value=l:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[W,t(c).loading]]),e(Be,{ref_key:"detailsRef",ref:g},null,512),t(y)?(m(),_(De,{key:0,ref_key:"copyRef",ref:b,onSuccess:t(v),onClose:o[5]||(o[5]=l=>y.value=!1)},null,8,["onSuccess"])):Ce("",!0)])}}});export{ko as default};