import{C as N,D as T,w as j,F as q,K as G,G as H,H as M,I as Q}from"./element-plus.8e273e86.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{f as z,b as J}from"./index.a39f73a6.js";import{d as V,s as O,r as D,Z as W,ap as X,o as n,c as Y,U as t,L as a,u as o,aa as ee,R as u,M as d,K as p,a as E,j as te,Q as oe,n as g}from"./@vue.76ce7aa3.js";import{u as ae}from"./usePaging.f8c888e4.js";import{u as le}from"./useDictOptions.19d08143.js";import{e as ie,a as se}from"./user_ship.ba8a27b1.js";import"./lodash.41b9567d.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_userShipEdit_lang.c7d37d04.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"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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"./index.1c24829c.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const re={class:"mt-4"},ue={class:"flex mt-4 justify-end"},pe=V({name:"userShipLists"}),Ye=V({...pe,setup(me){const c=O(),_=D(!1),f=W({title:""}),F=D([]),x=l=>{F.value=l.map(({id:e})=>e)},{dictData:B}=le(""),{pager:m,getLists:v,resetParams:S,resetPage:b}=ae({fetchFun:se,params:f}),$=async()=>{var l;_.value=!0,await g(),(l=c.value)==null||l.open("add")},A=async l=>{var e,C;_.value=!0,await g(),(e=c.value)==null||e.open("edit"),(C=c.value)==null||C.setFormData(l)},h=async l=>{await z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ie({id:l}),v()};return v(),(l,e)=>{const C=N,k=T,r=j,K=q,y=G,L=J,s=H,P=M,R=Z,w=X("perms"),U=Q;return n(),Y("div",null,[t(y,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(K,{class:"mb-[-16px]",model:o(f),inline:""},{default:a(()=>[t(k,{label:"\u4F1A\u5458\u540D\u79F0",prop:"title"},{default:a(()=>[t(C,{class:"w-[280px]",modelValue:o(f).title,"onUpdate:modelValue":e[0]||(e[0]=i=>o(f).title=i),onKeydown:ee(o(b),["enter"]),onClear:o(b),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u540D\u79F0"},null,8,["modelValue","onKeydown","onClear"])]),_:1}),t(k,null,{default:a(()=>[t(r,{type:"primary",onClick:o(b)},{default:a(()=>e[4]||(e[4]=[u("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(r,{onClick:o(S)},{default:a(()=>e[5]||(e[5]=[u("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((n(),p(y,{class:"!border-none",shadow:"never"},{default:a(()=>[d((n(),p(r,{type:"primary",onClick:$},{icon:a(()=>[t(L,{name:"el-icon-Plus"})]),default:a(()=>[e[6]||(e[6]=u(" \u65B0\u589E "))]),_:1})),[[w,["user_ship.user_ship/add"]]]),d((n(),p(r,{disabled:!o(F).length,onClick:e[1]||(e[1]=i=>h(o(F)))},{default:a(()=>e[7]||(e[7]=[u(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[w,["user_ship.user_ship/delete"]]]),E("div",re,[t(P,{data:o(m).lists,onSelectionChange:x},{default:a(()=>[t(s,{type:"selection",width:"55"}),t(s,{label:"ID",prop:"id","show-overflow-tooltip":""}),t(s,{label:"\u4F1A\u5458\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),t(s,{label:"\u6298\u6263",prop:"discount","show-overflow-tooltip":""}),t(s,{label:"\u5145\u503C\u91D1\u989D",prop:"limit","show-overflow-tooltip":""}),t(s,{label:"\u6392\u5E8F\u5012\u5E8F",prop:"sort","show-overflow-tooltip":""}),t(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:i})=>[d((n(),p(r,{type:"primary",link:"",onClick:I=>A(i)},{default:a(()=>e[8]||(e[8]=[u(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[w,["user_ship.user_ship/edit"]]]),d((n(),p(r,{type:"danger",link:"",onClick:I=>h(i.id)},{default:a(()=>e[9]||(e[9]=[u(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[w,["user_ship.user_ship/delete"]]])]),_:1})]),_:1},8,["data"])]),E("div",ue,[t(R,{modelValue:o(m),"onUpdate:modelValue":e[2]||(e[2]=i=>te(m)?m.value=i:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[U,o(m).loading]]),o(_)?(n(),p(ne,{key:0,ref_key:"editRef",ref:c,"dict-data":o(B),onSuccess:o(v),onClose:e[3]||(e[3]=i=>_.value=!1)},null,8,["dict-data","onSuccess"])):oe("",!0)])}}});export{Ye as default};
