import{d as S,b7 as N,b as $,r as B,p as U,c as s,e as d,f as C,g as i,h as e,i as a,u as n,F as h,j as M,k as f,C as P,A as k,m as c,N as j,E,_ as q}from"./index.0308b213.js";import{S as I,l as L,b as T}from"./product.20e23ccf.js";const O={class:"filter-form"},R=c("\u7B5B\u9009"),G={class:"data"},H={class:"operation-btn"},J=c("\u6DFB\u52A0\u5546\u54C1"),K={class:"table"},Q=c("\u7F16\u8F91"),W=c("\u4E0B\u67B6"),X=c("\u4E0A\u67B6"),Y={class:"bottom"},Z={class:"pagination"},ee=S({setup(te){N();const o=$({page:1,page_size:20,product_name:"",sale_status:0,visa_type_id:0,root_visa_type:0}),b=B([]),g=B(0),m=()=>{L(o).then(_=>{b.value=_.list,g.value=_.count})};m(),U(()=>[o.page,o.page_size],()=>{m()});const v=(_,u)=>{let r=u===1?"\u4E0A\u67B6":"\u4E0B\u67B6";j.confirm(`\u786E\u8BA4${r}\u8BE5\u5546\u54C1\u5417\uFF1F`).then(()=>{T(_,u).then(()=>{E.success(`${r}\u6210\u529F`),m()})}).catch(()=>{E.error(`${r}\u5931\u8D25`)})};return(_,u)=>{const r=s("el-input"),F=s("el-form-item"),A=s("el-option"),w=s("el-select"),p=s("el-button"),x=s("el-form"),y=s("router-link"),l=s("el-table-column"),D=s("el-table"),V=s("el-pagination");return d(),C(h,null,[i("div",O,[e(x,{model:n(o),onSubmit:u[2]||(u[2]=P(()=>{},["prevent"]))},{default:a(()=>[e(F,{class:"tn-el-form-item",label:"\u5546\u54C1\u6807\u9898"},{default:a(()=>[e(r,{modelValue:n(o).product_name,"onUpdate:modelValue":u[0]||(u[0]=t=>n(o).product_name=t),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6807\u9898",style:{width:"auto"}},null,8,["modelValue"])]),_:1}),e(w,{modelValue:n(o).sale_status,"onUpdate:modelValue":u[1]||(u[1]=t=>n(o).sale_status=t),placeholder:"\u662F\u5426\u4E0A\u67B6",size:"large",style:{width:"240px"}},{default:a(()=>[(d(!0),C(h,null,M(n(I),t=>(d(),f(A,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e(F,null,{default:a(()=>[e(p,{type:"primary",onClick:m},{default:a(()=>[R]),_:1})]),_:1})]),_:1},8,["model"])]),i("div",G,[i("div",H,[e(y,{to:"/admin/plugin/visa/product/edit"},{default:a(()=>[e(p,{type:"primary"},{default:a(()=>[J]),_:1})]),_:1})]),i("div",K,[e(D,{data:b.value},{default:a(()=>[e(l,{type:"selection",width:"55"}),e(l,{label:"\u5546\u54C1ID",prop:"id"}),e(l,{label:"\u5546\u54C1\u540D\u79F0",prop:"product_name"}),e(l,{label:"\u9500\u552E\u91D1\u989D(\u5355\u4F4D\uFF1A\u5143)",prop:"sale_price"}),e(l,{label:"\u5546\u54C1\u6210\u672C(\u5355\u4F4D\uFF1A\u5143)",prop:"product_costs"}),e(l,{label:"\u662F\u5426\u4E0A\u67B6",prop:"sale_status_text"}),e(l,{label:"\u62A4\u7167\u7C7B\u578B",prop:"visaType.type_name"}),e(l,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"}),e(l,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time"}),e(l,{label:"\u64CD\u4F5C",align:"center",width:"400"},{default:a(t=>[e(y,{class:"m-r-10",to:{path:"/admin/plugin/visa/product/edit",query:{id:t.row.id}}},{default:a(()=>[e(p,{type:"primary"},{default:a(()=>[Q]),_:1})]),_:2},1032,["to"]),t.row.sale_status===1?(d(),f(p,{key:0,type:"danger",onClick:z=>v(t.row.id,2)},{default:a(()=>[W]),_:2},1032,["onClick"])):k("",!0),t.row.sale_status===2?(d(),f(p,{key:1,type:"success",onClick:z=>v(t.row.id,1)},{default:a(()=>[X]),_:2},1032,["onClick"])):k("",!0)]),_:1})]),_:1},8,["data"])])]),i("div",Y,[i("div",Z,[e(V,{currentPage:n(o).page,"onUpdate:currentPage":u[3]||(u[3]=t=>n(o).page=t),"page-size":n(o).limit,"onUpdate:page-size":u[4]||(u[4]=t=>n(o).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:g.value},null,8,["currentPage","page-size","total"])])])],64)}}});const oe=q(ee,[["__scopeId","data-v-b0d018f8"]]);export{oe as default};
