moreShopAdmin/build/admin/assets/index.2a5ca78a.js

2 lines
8.7 KiB
JavaScript

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