1 |
- import{aT as p,ac as C,al as b,a$ as x,_ as B,d as D,w as r,r as m,o as w,G as y,C as P,j as h,l as f,aN as v}from"./index.js";import S from"./modal.c5cafd.js";import{s as N}from"./orderRecord.fc407fbf.js";import{u as $}from"./use-page-search.f7bc460e.js";import"./index.da6d65fd.js";import"./tootip.e1d72495.js";const{VITE_PROXY_DOMAIN_REAL:z,VITE_PROXY_USER_REAL:R}=C(),i=R+"/admin/",U=e=>p.request("post",`${i}channellist`,{data:e}),k=e=>p.request("post",`${i}channeladd`,{data:e}),I=e=>p.request("post",`${i}channeledit`,{data:e}),M=e=>p.request("post",`${i}channelstatus`,{data:e}),q=[{prop:"id",label:"ID",minWidth:"60px"},{prop:"channel_name",label:"\u652F\u4ED8\u6E20\u9053\u540D\u79F0",width:"230px"},{prop:"companyName",label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",width:"230px"},{label:"\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:e})=>b(x,{type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{prop:"apply_name",label:"\u521B\u5EFA\u4EBA",width:"230px"},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",width:"260px"},{prop:"",label:"\u64CD\u4F5C",fixed:"right",width:"140px",_noset_:!0,slot:"operation"}],O={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:q,apis:{httpList:U,httpAdd:!0,httpStatus:M,httpUpdate:!0}},_={formItems:[{field:"status",type:"select",options:N,placeholder:"\u72B6\u6001"},{type:"input",field:"channel_name",placeholder:"\u6E20\u9053\u540D\u79F0"},{type:"input",field:"apply_name",placeholder:"\u521B\u5EFA\u4EBA"}]},T=D({__name:"index",setup(e){const g="paymentChannelManage",d=r(null),l=r(!1),n=r(!1),o=r({}),F={pageSearchHook:()=>$(void 0,void 0,_)},E={content:{create:()=>{l.value=!1,n.value=!0},preview:a=>{o.value={...a},l.value=!0,n.value=!0},update:a=>{o.value={...a},l.value=!1,n.value=!0}}};async function A(){const{id:a,channel_name:u,companyNo:c}=o.value,s=a===void 0,t={id:a,channel_name:u,companyNo:c};s&&delete t.id,(await(s?k:I)(t)).code===0?(n.value=!1,v.success(`${s?"\u6DFB\u52A0":"\u66F4\u65B0"}\u6210\u529F`),d.value.onSearch()):v.warning(`${s?"\u6DFB\u52A0":"\u66F4\u65B0"}\u5931\u8D25`)}return(a,u)=>{const c=m("PageContainer"),s=m("PageAuth");return w(),y(s,{pageName:g},{default:P(()=>[h(c,{hooks:F,events:E,contentConfig:f(O),"search-config":f(_),"get-content-ref":t=>d.value=t},null,8,["contentConfig","search-config","get-content-ref"]),h(S,{visible:n.value,"onUpdate:visible":u[0]||(u[0]=t=>n.value=t),data:o.value,"onUpdate:data":u[1]||(u[1]=t=>o.value=t),disabled:l.value,onSubmit:A},null,8,["visible","data","disabled"])]),_:1})}}});var J=B(T,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/paymentChannelManage/index.vue"]]);export{J as default};
|