import{Z as P,_ as R,d as M,b9 as z,w as E,aD as S,r as m,al as T,o as i,G as l,C as p,H as q,u as a,b as n,M as d,L as h,a as g,J as V,aJ as I,au as x,bh as L}from"./index.1d5f2f42.js";import{u as H}from"./use-page-search.5b2e253c.js";import{a as f}from"./apis.b3a47976.js";import{h as J}from"./export.669edd93.js";import"./createRequset.f858bea3.js";const{detail:j}=f,G=[{prop:"depart",label:"\u90E8\u95E8",minWidth:"135px"},{prop:"saler",label:"\u9500\u552E\u4EBA\u5458",minWidth:"80px"},{prop:"plat_name",label:"\u5E73\u53F0\u7C7B\u578B",minWidth:"135px"},{prop:"company_name",label:"\u516C\u53F8\u540D\u79F0",minWidth:"155px"},{prop:"order_type",label:"\u8BA2\u5355\u7C7B\u578B",minWidth:"80px"},{prop:"orderCode",label:"\u786E\u8BA4\u5355\u7F16\u53F7",minWidth:"155px"},{prop:"cgdNo",label:"\u91C7\u8D2D\u5355\u7F16\u53F7",minWidth:"155px"},{prop:"customerAttr",label:"\u5BA2\u6237\u5C5E\u6027",minWidth:"80px"},{prop:"branch",label:"\u5BA2\u6237\u5206\u516C\u53F8",minWidth:"80px"},{prop:"customerName",label:"\u5BA2\u6237\u540D\u79F0",minWidth:"155px"},{prop:"good_name",label:"\u4EA7\u54C1\u540D\u79F0",minWidth:"155px"},{prop:"first_cat",label:"\u4E00\u7EA7\u5206\u7C7B",minWidth:"80px"},{prop:"good_price",label:"\u9500\u552E\u5355\u4EF7",minWidth:"120px"},{prop:"oldCode",label:"\u539F\u9500\u552E\u5355\u53F7",minWidth:"155px"},{prop:"cgdPrice",label:"\u91C7\u8D2D\u5355\u4EF7",minWidth:"120px"},{prop:"good_num",label:"\u4E0B\u5355\u6570\u91CF",minWidth:"80px"},{prop:"total_price",label:"\u9500\u552E\u603B\u989D",minWidth:"155px"},{prop:"order_time",label:"\u9500\u552E\u4E0B\u5355\u65F6\u95F4",minWidth:"155px"},{prop:"pay_time",label:"\u56DE\u6B3E\u65E5\u671F",minWidth:"155px"},{prop:"pay_fee",label:"\u56DE\u6B3E\u91D1\u989D",minWidth:"120px"},{prop:"pay_date_num",label:"\u8D26\u671F",minWidth:"70px"}],C={columns:G,showTitle:!1,superUserNoAction:!1,apis:{httpList:j}},O=P(new Date).subtract(1,"month").format("YYYY-MM"),B={formItems:[{field:"year_month",type:"date_picker",defaultValue:O,placeholder:"\u660E\u7EC6\u6708\u4EFD",trigger:"change",otherOptions:{editable:!1,clearable:!1,type:"month",format:"YYYY-MM",valueFormat:"YYYY-MM"}}]},U={style:{display:"flex"}},X={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},Z={style:{color:"red"}},K={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},Q={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},$=M({__name:"detail",setup(ee){const c="customerDepartment",{hasPermissionWithCode:_}=z(c),s=E(null),t=S(!1),u=E({}),F=e=>({result:{...e,depart_type:"2"}}),b=e=>({result:{...e,depart_type:"2"}}),v={onSuccess:()=>t.value=!1,onStart:()=>t.value=!0,onFail:()=>t.value=!1},y={pageSearchHook:()=>H(F,b,B)};async function A(){const e=s.value.getBasicParams();try{await J({fileType:"application/vnd.ms-excel;charset=utf-8",url:"report/exportinfo",name:"\u65B0\u5A92\u4F53\u63D0\u6210\u4E1A\u7EE9\u660E\u7EC6.xlsx",...v,params:e})}catch{}}async function D(){const e=s.value.getBasicParams();t.value=!0;const{data:o}=await f.isConfirm({...e});return t.value=!1,u.value=o||{},L.NEXT}C.beforeRequestList=D;async function W(){I.confirm("\u662F\u5426\u786E\u8BA4\u5168\u90E8\u660E\u7EC6?",{type:"warning"}).then(async()=>{const e=s.value.getBasicParams(),{message:o,code:r}=await f.confirm({...e,depart_type:"2",status:"1"});Number(r)===1?x.success("\u660E\u7EC6\u5DF2\u786E\u8BA4\u5B8C\u6210"):x.warning(o)})}return(e,o)=>{const r=m("ElButton"),w=m("PageContainer"),k=m("PageAuth"),Y=T("loading");return i(),l(k,{"page-name":c},{default:p(()=>[q((i(),l(w,{hooks:y,pageName:c,getContentRef:N=>s.value=N,contentConfig:a(C),searchConfig:a(B)},{content_header:p(()=>[n("div",U,[n("div",X,[d(" \u5F53\u524D\u72B6\u6001\uFF1A "),n("span",Z,h(Number(u.value.status)===1?"\u5DF2\u786E\u8BA4":"\u672A\u786E\u8BA4"),1)]),n("div",K," \u786E\u8BA4\u4EBA\uFF1A"+h(u.value.apply_name||"--"),1),n("div",Q," \u786E\u8BA4\u65F6\u95F4\uFF1A"+h(u.value.createtime||"--"),1),Number(u.value.status)!==1&&a(_)("21")?(i(),l(r,{key:0,onClick:W,size:"small"},{default:p(()=>[d("\u786E\u8BA4\u5168\u90E8\u660E\u7EC6 ")]),_:1})):g("v-if",!0),a(_)("18")?(i(),l(r,{key:1,icon:a(V)("arrow-up-line"),onClick:A,type:"primary",size:"small"},{default:p(()=>[d("\u5BFC\u51FA ")]),_:1},8,["icon"])):g("v-if",!0)])]),_:1},8,["getContentRef","contentConfig","searchConfig"])),[[Y,a(t)]])]),_:1})}}});var se=R($,[["__file","D:/work/rep-v3/report-v3/src/views/time/mediumDepartment/components/detail.vue"]]);export{se as default};
