import{_ as e}from"./index-7266ee79.js";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-a66505b9.js";import{_ as l}from"./operate.vue_vue_type_script_setup_true_lang-b52831fd.js";import{_ as p}from"./search.vue_vue_type_script_setup_true_lang-bbdf4bb9.js";import{d as t,m as s,p as o,r,K as n,o as c,c as i,a as u,w as m,f as _,e as d,J as b,j as y,b as f,Q as g,O as j,$ as v,n as h}from"./index-018fb6dd.js";import{_ as k}from"./create.vue_vue_type_script_setup_true_lang-a6193d4d.js";import{u as w}from"./useGetList-4b13a7ea.js";import{u as C}from"./useDestroy-7132f8f0.js";import{u as V}from"./useOpen-280ec4e6.js";import{c as x}from"./index-62ecbd0d.js";/* empty css             *//* empty css                   */import"./http-338d117f.js";import"./index-765bf96c.js";import"./add.vue_vue_type_script_setup_true_lang-9cf41186.js";import"./useCreate-b3492f2b.js";import"./useShow-ca493df3.js";const M={class:"table-default"},L=d("br",null,null,-1),S=d("br",null,null,-1),U=d("br",null,null,-1),z=t({__name:"index",setup(t){const z="cpManage/cp/manage/cp_list",{data:T,query:J,search:O,reset:q,loading:D}=w(z),{deleted:E}=C(),G=s((()=>{var e;return null==(e=T.value)?void 0:e.data})),{open:H,close:I,title:K,visible:N,id:P}=V();return o((()=>{O(),E(O)})),(t,s)=>{const o=r("el-input"),w=r("el-form-item"),C=p,V=l,T=r("el-table-column"),E=r("el-button"),Q=r("el-table"),R=a,W=e,Y=n("action"),$=n("loading");return c(),i("div",null,[u(C,{search:_(O),reset:_(q)},{body:m((()=>[u(w,{label:"cp名称",prop:"cp_name"},{default:m((()=>[u(o,{modelValue:_(J).cp_name,"onUpdate:modelValue":s[0]||(s[0]=e=>_(J).cp_name=e),name:"cp_name",clearable:""},null,8,["modelValue"])])),_:1}),u(w,{label:"所属公司",prop:"cp_company"},{default:m((()=>[u(o,{modelValue:_(J).cp_company,"onUpdate:modelValue":s[1]||(s[1]=e=>_(J).cp_company=e),name:"cp_company",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),d("div",M,[b(u(V,{show:_(H)},null,8,["show"]),[[Y,"cpManage.cpList.store"]]),b((c(),y(Q,{data:_(G),class:"mt-3"},{default:m((()=>[u(T,{type:"index",width:"100",label:"序号"}),u(T,{prop:"cp_id",label:"cp_id"}),u(T,{prop:"cp_name",label:"cp名称"}),u(T,{prop:"cp_nick",label:"cp简称"}),u(T,{prop:"cp_company",label:"所属公司"}),u(T,{prop:"book_count",label:"采集数量"}),u(T,{prop:"share_per",label:"结算比例"}),u(T,{prop:"created_at",label:"创建时间"}),u(T,{label:"操作",width:"200"},{default:m((e=>[b((c(),y(E,{onClick:a=>(e=>{const a={cp_id:e.cp_id,cp_name:e.cp_name};x(a).then((e=>{j.success(e.message);const a=setTimeout((()=>{v({title:"提示",message:"同步cp书籍任务已经建立，因书籍数量不同，执行时间有几分钟到几十分钟的延迟进入书籍列表！",type:"warning"}),clearTimeout(a)}),500)}))})(e.row),type:"primary",link:"",size:"small"},{default:m((()=>[f("同步CP书籍")])),_:2},1032,["onClick"])),[[Y,"cpManage.cpList.cpCollection"]]),L,b((c(),y(E,{onClick:a=>_(H)(e.row.cp_id),type:"primary",link:"",size:"small"},{default:m((()=>[f("编辑")])),_:2},1032,["onClick"])),[[Y,"cpManage.cpList.update"]]),S,b((c(),y(E,{onClick:a=>((e=0,a="")=>{h.push({path:"/cpManage/cpSettle",params:{cp_id:e,cp_name:a}})})(e.row.cp_id,e.row.cp_name),type:"primary",link:"",size:"small"},{default:m((()=>[f("结算列表")])),_:2},1032,["onClick"])),[[Y,"cpManage.cpSettle.index"]]),U])),_:1})])),_:1},8,["data"])),[[$,_(D)]]),u(R)]),u(W,{modelValue:_(N),"onUpdate:modelValue":s[3]||(s[3]=e=>g(N)?N.value=e:null),title:_(K),"destroy-on-close":""},{default:m((()=>[u(k,{onClose:s[2]||(s[2]=e=>_(I)(_(O))),primary:_(P),api:z},null,8,["primary"])])),_:1},8,["modelValue","title"])])}}});export{z as default};
