import{_ as L,g as M,d as O}from"./EditDialog.vue_vue_type_script_setup_true_lang.4cbaa4cf.js";import{d as $,a6 as j,r as i,b as A,p as R,c as d,at as G,e as g,f as B,u as e,h as t,i as s,A as k,g as n,w as H,k as y,q as J,F as K,m as v,y as D,N as Q,E as S,_ as W}from"./index.0308b213.js";import"./useInstance.233fbdde.js";const X={key:0,class:"filter-form"},Y=v("\u67E5\u8BE2"),Z={class:"data"},ee={class:"operation-container"},te={class:"operation-btn"},ae=v("\u6DFB\u52A0"),le={class:"table"},oe={class:"table-operation-btn"},se={class:"top"},ne=v("\u7F16\u8F91"),ue=v("\u5220\u9664"),ie={class:"bottom"},de={class:"pagination"},ce=$({setup(pe){const{OpPlatform:h}=j();let F=i(!1);const l=A({page:1,limit:10,tmpname:"",tmpcode:""}),m=A({list:[],count:0});i([]);const p=()=>{F.value=!0,h.value=="shangpu"&&M(l).then(u=>{m.list=u.list,m.count=u.count,F.value=!1})};p(),i(!1),i(!1),R(()=>[l.page,l.limit],()=>{p()});const E=()=>{p()};let c=i(!1),r=i(!1),_=i(0);const V=()=>{_.value=0,r.value=!0,D(()=>{c.value=!0})},w=u=>{_.value=u,r.value=!0,D(()=>{c.value=!0})},z=()=>{_.value=0,D(()=>{r.value=!1}),p()},N=u=>{Q.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{h.value=="shangpu"&&O({id:u}).then(()=>{S({message:"\u5220\u9664\u6210\u529F",type:"success"}),p()})}).catch(()=>{})};return(u,o)=>{const x=d("el-input"),b=d("el-form-item"),f=d("el-button"),P=d("el-form"),C=d("el-table-column"),U=d("el-table"),T=d("el-pagination"),q=G("loading");return g(),B(K,null,[e(h)==="shangpu"?(g(),B("div",X,[t(P,{model:e(l),"label-width":"90px"},{default:s(()=>[t(b,{label:"\u6A21\u677F\u540D\u79F0",prop:"tmpname"},{default:s(()=>[t(x,{modelValue:e(l).tmpname,"onUpdate:modelValue":o[0]||(o[0]=a=>e(l).tmpname=a),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(b,{label:"\u6A21\u677F\u7F16\u53F7",prop:"tmpcode"},{default:s(()=>[t(x,{modelValue:e(l).tmpcode,"onUpdate:modelValue":o[1]||(o[1]=a=>e(l).tmpcode=a),placeholder:"\u8BF7\u8F93\u5165\u6A21\u677F\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(b,null,{default:s(()=>[t(f,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:E},{default:s(()=>[Y]),_:1})]),_:1})]),_:1},8,["model"])])):k("",!0),n("div",Z,[n("div",ee,[n("div",te,[t(f,{class:"btn",type:"primary",onClick:V},{default:s(()=>[ae]),_:1})])]),n("div",le,[H((g(),y(U,{data:e(m).list},{default:s(()=>[t(C,{label:"\u6A21\u677F\u540D\u79F0",prop:"tmpname"}),t(C,{label:"\u6A21\u677F\u7F16\u53F7",prop:"tmpcode"}),t(C,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:a})=>[n("div",oe,[n("div",se,[t(f,{size:"small",type:"primary",onClick:I=>w(a.id)},{default:s(()=>[ne]),_:2},1032,["onClick"]),t(f,{size:"small",type:"danger",onClick:I=>N(a.id)},{default:s(()=>[ue]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[q,e(F)]])])]),n("div",ie,[n("div",de,[t(T,{currentPage:e(l).page,"onUpdate:currentPage":o[2]||(o[2]=a=>e(l).page=a),"page-size":e(l).limit,"onUpdate:page-size":o[3]||(o[3]=a=>e(l).limit=a),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(m).count},null,8,["currentPage","page-size","total"])])]),e(r)?(g(),y(L,{key:1,modelValue:e(c),"onUpdate:modelValue":o[4]||(o[4]=a=>J(c)?c.value=a:c=a),id:e(_),onOnClose:z},null,8,["modelValue","id"])):k("",!0)],64)}}});const fe=W(ce,[["__scopeId","data-v-7c462bc2"]]);export{fe as default};
