moreShopAdmin/build/admin/assets/index.a98457ce.js

2 lines
9.7 KiB
JavaScript

import{a3 as me,Q as ce,N as _e,O as fe,D as be,C as ve,w as Ee,F as we,K as he,G as Ce,b as ge,t as ye,H as Fe,I as ke}from"./element-plus.8e273e86.js";import{_ as Be}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{_ as Ve}from"./index.vue_vue_type_script_setup_true_lang.36c81752.js";import{d as O,s as z,r as d,Z as xe,i as De,ap as A,o as r,c as g,U as o,L as a,u as l,T as S,a9 as R,K as m,aa as I,R as i,M as y,j as N,a as h,a0 as U,S as $,Q as M,n as j}from"./@vue.76ce7aa3.js";import{u as Se}from"./usePaging.f8c888e4.js";import{u as Re}from"./useDictOptions.419e74f2.js";import{a as G,f as Ue,c as $e}from"./store_branch_product.83374ece.js";import"./lodash.4e6d2a38.js";import{a as Pe}from"./system_store.35cdeae1.js";import{f as Le}from"./index.3cbb290e.js";import{_ as Ke}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.6bf5f5d0.js";import{_ as Te}from"./editStock.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.b4e74c8d.js";import{_ as ze}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.774634ae.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"./index.e8e7d23f.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./picker.5d86fed3.js";import"./index.a31ee93b.js";import"./index.ba3c63c9.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";import"./store_product_unit.62cd91ea.js";const Ae={class:"mt-4"},Ie={class:"flex mt-4 justify-end"},Ne=O({name:"storeBranchProductLists"}),Nt=O({...Ne,setup(Me){const F=z(),k=z(),B=d(!1),V=d(!1),Q=d(null),u=xe({store_id:"",store_name:"",bar_code:"",exchange:0,status:null,order_by:"",field:"stock"}),q=d([]),H=s=>{q.value=s.map(({id:e})=>e)},{dictData:Z}=Re(""),{pager:c,getLists:_,resetParams:J,resetPage:f}=Se({fetchFun:G,params:u}),W=async s=>{var e,p;B.value=!0,await j(),(e=F.value)==null||e.open("edit"),(p=F.value)==null||p.setFormData(s)},X=async s=>{var e,p;V.value=!0,await j(),(e=k.value)==null||e.open("edit"),(p=k.value)==null||p.setFormData(s)},Y=async s=>{await Le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ue({id:s}),_()};De(()=>{_()});const C=d(!1),P=d([]),ee=(s="")=>{C.value=!0,Pe({name:s,page_size:50}).then(e=>{P.value=e.lists,setTimeout(()=>{C.value=!1},300)}).catch(e=>{setTimeout(()=>{C.value=!1},300)})},te=s=>{$e({id:s.id,store_name:s.store_name,image:s.image,price:s.price,unit:s.unit,status:s.status})},x=d("0"),oe=s=>{s==0?(u.status=null,u.stock=null):s==1?(u.status=1,u.stock=null):s==2?(u.status=0,u.stock=null):s==3?(u.status=null,u.stock=10):s==4&&(u.status=null,u.stock=0),_()};return(s,e)=>{const p=_e,D=fe,b=be,L=ve,v=Ee,le=Ve,ae=we,K=he,E=me,ue=ce,n=Ce,se=ge,ne=ye,re=Fe,ie=Be,T=A("prems"),pe=A("perms"),de=ke;return r(),g("div",null,[o(K,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(ae,{class:"mb-[-16px]",model:l(u),inline:""},{default:a(()=>[o(b,{label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[o(D,{modelValue:l(u).store_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(u).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":ee,loading:l(C),style:{width:"240px"},onChange:l(f)},{default:a(()=>[(r(!0),g(S,null,R(l(P),t=>(r(),m(p,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(b,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[o(L,{class:"w-[280px]",modelValue:l(u).store_name,"onUpdate:modelValue":e[1]||(e[1]=t=>l(u).store_name=t),onKeydown:I(l(f),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),o(b,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:a(()=>[o(L,{class:"w-[280px]",modelValue:l(u).bar_code,"onUpdate:modelValue":e[2]||(e[2]=t=>l(u).bar_code=t),onKeydown:I(l(f),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue","onKeydown"])]),_:1}),o(b,{label:"\u6392\u5E8F",prop:"order_by"},{default:a(()=>[o(D,{modelValue:l(u).order_by,"onUpdate:modelValue":e[3]||(e[3]=t=>l(u).order_by=t),placeholder:"\u8BF7\u9009\u62E9\u6392\u5E8F",style:{width:"240px"},onChange:l(f)},{default:a(()=>[(r(),g(S,null,R([{id:"asc",name:"\u5347\u5E8F"},{id:"desc",name:"\u964D\u5E8F"}],t=>o(p,{key:t.id,label:t.name,value:t.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),o(b,{label:"\u72B6\u6001",prop:"bar_code"},{default:a(()=>[o(D,{modelValue:l(u).status,"onUpdate:modelValue":e[4]||(e[4]=t=>l(u).status=t),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",style:{width:"240px"},onChange:l(f)},{default:a(()=>[(r(),g(S,null,R([{id:1,name:"\u4E0A\u67B6"},{id:0,name:"\u4E0B\u67B6"}],t=>o(p,{key:t.id,label:t.name,value:t.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),o(b,null,{default:a(()=>[o(v,{type:"primary",onClick:l(f)},{default:a(()=>e[9]||(e[9]=[i("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(v,{onClick:l(J)},{default:a(()=>e[10]||(e[10]=[i("\u91CD\u7F6E")])),_:1},8,["onClick"]),o(le,{class:"ml-2.5","fetch-fun":l(G),params:l(u),"page-size":l(c).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),y((r(),m(K,{class:"!border-none",shadow:"never"},{default:a(()=>[o(ue,{modelValue:l(x),"onUpdate:modelValue":e[5]||(e[5]=t=>N(x)?x.value=t:null),onChange:oe},{default:a(()=>[o(E,{label:"0"},{default:a(()=>e[11]||(e[11]=[i("\u5168\u90E8")])),_:1}),o(E,{label:"1"},{default:a(()=>e[12]||(e[12]=[i("\u4E0A\u67B6")])),_:1}),o(E,{label:"2"},{default:a(()=>e[13]||(e[13]=[i("\u4E0B\u67B6")])),_:1}),o(E,{label:"3"},{default:a(()=>e[14]||(e[14]=[i("\u5E93\u5B58\u8B66\u544A")])),_:1}),o(E,{label:"4"},{default:a(()=>e[15]||(e[15]=[i("\u5DF2\u552E\u7F44")])),_:1})]),_:1},8,["modelValue"]),h("div",Ae,[o(re,{data:l(c).lists,onSelectionChange:H},{default:a(()=>[o(n,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(n,{label:"\u95E8\u5E97",prop:"system_store_name","show-overflow-tooltip":""}),o(n,{label:"\u5206\u7C7B",prop:"cate_name","show-overflow-tooltip":""}),o(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),o(n,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","show-overflow-tooltip":""},{default:a(({row:t})=>[o(se,{class:"w-[40px] h-[40px]",src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(n,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"80","show-overflow-tooltip":""},{default:a(({row:t})=>[h("span",{class:"w-[40px] h-[40px]",style:U(t.purchase==0?"color:red":"")},$(t.purchase),5)]),_:1}),o(n,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"80","show-overflow-tooltip":""},{default:a(({row:t})=>[h("span",{class:"w-[40px] h-[40px]",style:U(t.cost==0?"color:red":"")},$(t.cost),5)]),_:1}),o(n,{label:"\u96F6\u552E\u4EF7",prop:"price","min-width":"80","show-overflow-tooltip":""},{default:a(({row:t})=>[h("span",{class:"w-[40px] h-[40px]",style:U(t.price==0?"color:red":"")},$(t.price),5)]),_:1}),o(n,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code","show-overflow-tooltip":""}),o(n,{label:"\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),o(n,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),o(n,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),o(n,{label:"\u72B6\u6001",prop:"status"},{default:a(({row:t})=>[o(ne,{size:"large",onChange:w=>te(t),modelValue:t.status,"onUpdate:modelValue":w=>t.status=w,"active-value":1,"inactive-value":0,"active-text":"\u4E0A\u67B6","inactive-text":"\u4E0B\u67B6","inline-prompt":""},null,8,["onChange","modelValue","onUpdate:modelValue"])]),_:1}),o(n,{label:"\u64CD\u4F5C","min-width":"140",fixed:"right",align:"center","show-overflow-tooltip":""},{default:a(({row:t})=>[y((r(),m(v,{type:"primary",link:"",onClick:w=>W(t)},{default:a(()=>e[16]||(e[16]=[i("\u7F16\u8F91")])),_:2},1032,["onClick"])),[[T,["store_branch_product.store_branch_product/deit"]]]),y((r(),m(v,{type:"primary",link:"",onClick:w=>X(t)},{default:a(()=>e[17]||(e[17]=[i("\u91CD\u7F6E\u5E93\u5B58")])),_:2},1032,["onClick"])),[[T,["store_branch_product.store_branch_product/deitStock"]]]),y((r(),m(v,{type:"danger",link:"",onClick:w=>Y(t.id)},{default:a(()=>e[18]||(e[18]=[i("\u5220\u9664")])),_:2},1032,["onClick"])),[[pe,["store_branch_product.store_branch_product/delete"]]])]),_:1})]),_:1},8,["data"])]),h("div",Ie,[o(ie,{modelValue:l(c),"onUpdate:modelValue":e[6]||(e[6]=t=>N(c)?c.value=t:null),onChange:l(_)},null,8,["modelValue","onChange"])])]),_:1})),[[de,l(c).loading]]),l(B)?(r(),m(Ke,{key:0,ref_key:"editRef",ref:F,"dict-data":l(Z),onSuccess:l(_),onClose:e[7]||(e[7]=t=>B.value=!1)},null,8,["dict-data","onSuccess"])):M("",!0),l(V)?(r(),m(Te,{key:1,ref_key:"editStockRef",ref:k,onSuccess:l(_),onClose:e[8]||(e[8]=t=>V.value=!1)},null,8,["onSuccess"])):M("",!0),o(ze,{ref_key:"detailsRef",ref:Q},null,512)])}}});export{Nt as default};