2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{a5 as G,H,$ as J,J as Q,K as Z,D as W,w as X,F as Y,L as ee,M as te,b as oe,N as ae,O as le}from"./element-plus.573d45d4.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.ffc076c1.js";import{u as ue}from"./usePaging.6a6670f9.js";import{u as ne}from"./useDictOptions.7c094c06.js";import{d as re}from"./system_store_storage.84e4b4b0.js";import{a as ie}from"./system_store.00a40e99.js";import"./lodash.60201f64.js";import"./index.cac9d859.js";import{_ as me}from"./edit.vue_vue_type_script_setup_true_name_systemStoreStorageEdit_lang.6be0ca4d.js";import{d as T,s as pe,r as f,Z as de,ap as _e,o as s,c as h,U as t,L as o,u as a,T as V,a9 as x,K as i,R as r,M as S,a as L,Q as B,j as ce,n as fe}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.4e4a5c9f.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const Ee={class:"mt-4"},ge={class:"flex mt-4 justify-end"},ve=T({name:"systemStoreStorageLists"}),ut=T({...ve,setup(Ce){const E=pe(),g=f(!1),n=de({store_id:"",admin_name:"",staff_name:"",status:"",type:1}),R=f([]),A=m=>{R.value=m.map(({id:l})=>l)},{dictData:N}=ne(""),{pager:p,getLists:v,resetParams:U,resetPage:_}=ue({fetchFun:re,params:n}),$=async m=>{var l,d;g.value=!0,await fe(),(l=E.value)==null||l.open("edit"),(d=E.value)==null||d.setFormData(m)};v();const c=f(!1),k=f([]),P=(m="")=>{c.value=!0,ie({name:m,page_size:50}).then(l=>{k.value=l.lists,setTimeout(()=>{c.value=!1},300)}).catch(l=>{setTimeout(()=>{c.value=!1},300)})};return(m,l)=>{const d=Q,F=Z,C=W,y=X,M=Y,w=ee,D=G,j=H,u=te,I=oe,b=J,K=ae,O=se,q=_e("perms"),z=le;return s(),h("div",null,[t(w,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(M,{class:"mb-[-16px]",model:a(n),inline:""},{default:o(()=>[t(C,{label:"\u95E8\u5E97",prop:"store_id"},{default:o(()=>[t(F,{modelValue:a(n).store_id,"onUpdate:modelValue":l[0]||(l[0]=e=>a(n).store_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":P,loading:a(c),style:{width:"240px"},onChange:a(_)},{default:o(()=>[(s(!0),h(V,null,x(a(k),e=>(s(),i(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),t(C,{label:"\u72B6\u6001",prop:"status"},{default:o(()=>[t(F,{modelValue:a(n).status,"onUpdate:modelValue":l[1]||(l[1]=e=>a(n).status=e),placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22",style:{width:"240px"},onChange:a(_)},{default:o(()=>[(s(),h(V,null,x([{id:1,name:"\u5DF2\u5165\u5E93"},{id:0,name:"\u5F85\u786E\u8BA4"},{id:-1,name:"\u5E93\u5B58\u4E0D\u8DB3"}],e=>t(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),t(C,null,{default:o(()=>[t(y,{type:"primary",onClick:a(_)},{default:o(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(y,{onClick:a(U)},{default:o(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),S((s(),i(w,{class:"!border-none",shadow:"never"},{default:o(()=>[t(j,{modelValue:a(n).type,"onUpdate:modelValue":l[2]||(l[2]=e=>a(n).type=e),onChange:a(_)},{default:o(()=>[t(D,{label:1,value:1},{default:o(()=>[r("\u552E\u5356\u5E93\u5B58")]),_:1}),t(D,{label:2,value:2},{default:o(()=>[r("\u5151\u6362\u5E93\u5B58")]),_:1})]),_:1},8,["modelValue","onChange"]),L("div",Ee,[t(K,{data:a(p).lists,onSelectionChange:A},{default:o(()=>[t(u,{label:"\u95E8\u5E97",prop:"system_store_name"}),t(u,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),t(u,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"staff_name","show-overflow-tooltip":""}),t(u,{label:"\u5546\u54C1\u56FE",prop:"image","show-overflow-tooltip":""},{default:o(({row:e})=>[t(I,{class:"w-[40px] h-[40px]",src:e.image},null,8,["src"])]),_:1}),t(u,{label:"\u5546\u54C1",prop:"store_name"}),t(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),t(u,{label:"\u72B6\u6001",prop:"status"},{default:o(({row:e})=>[e.status===1?(s(),i(b,{key:0,type:"success"},{default:o(()=>[r("\u5DF2\u5165\u5E93")]),_:1})):e.status===0?(s(),i(b,{key:1,type:"warning"},{default:o(()=>[r("\u5F85\u786E\u8BA4")]),_:1})):e.status===-1?(s(),i(b,{key:2,type:"danger"},{default:o(()=>[r("\u5E93\u5B58\u4E0D\u8DB3")]),_:1})):B("",!0)]),_:1}),t(u,{label:"\u5907\u6CE8",prop:"mark"}),t(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:e})=>[e.status!==1?S((s(),i(y,{key:0,type:"primary",link:"",onClick:ye=>$(e)},{default:o(()=>[r(" \u7F16\u8F91\u5E93\u5B58 ")]),_:2},1032,["onClick"])),[[q,["system_store_storage.system_store_storage/edit"]]]):B("",!0)]),_:1})]),_:1},8,["data"])]),L("div",ge,[t(O,{modelValue:a(p),"onUpdate:modelValue":l[3]||(l[3]=e=>ce(p)?p.value=e:null),onChange:a(v)},null,8,["modelValue","onChange"])])]),_:1})),[[z,a(p).loading]]),a(g)?(s(),i(me,{key:0,ref_key:"editRef",ref:E,"dict-data":a(N),onSuccess:a(v),onClose:l[4]||(l[4]=e=>g.value=!1)},null,8,["dict-data","onSuccess"])):B("",!0)])}}});export{ut as default};
|