import{r as e,e as s,a9 as i,c as t,h as a,w as n,z as o,o as d,i as p,a as r,N as c,m as u,s as l,x as _,a0 as m}from"./index-DXvjTqMr.js";import{d as f}from"./business.KmXA2f2I.js";import{d as h}from"./index.D3kEQn5y.js";import{d as g}from"./dropDown.CIF5Aflp.js";import{p as y}from"./payDetail.BUdMTgKK.js";import{t as j}from"./index.B1ULB9IS.js";import{y as v,a5 as x,a6 as b}from"./customer.BB8HSfBC.js";import{f as w}from"./assessment.C7cFhOQt.js";import{_ as $}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-nav-bar.BZJJc0Hh.js";import"./uni-icons.Dxt3pfrw.js";/* empty css                                                                  *//* empty css                                                                    *//* empty css                                                              */import"./passed.ChLrPDzE.js";import"./examine.CLOTCpEn.js";import"./uni-easyinput.D7PPGXPC.js";/* empty css                                                                      */import"./uni-popup-dialog.CT6ZRSND.js";import"./uni-popup.BpvJsdxE.js";import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.BoqUbMLw.js";const D=$({__name:"collectionDetails",setup($){const D=e(null),k=e(null),R=s({info:{},isRight:!0,id:"",eid:"",types:0,defaultTitle:"合同回款详情",isShowTitle:!0,rightIcon:[{type:1,icon:"icon-gengduo1",types:"icon"}]});i((e=>{R.id=e.id,R.eid=e.eid,R.types=e.types,I(e.id)}));const T=t((()=>2==R.info.status?[{name:"删除",id:4,icon:"icon-shanchu1"},{name:"重新提交",id:3,icon:"icon-danchuang-chehui"}]:-1==R.info.status?[]:(R.info.status,[{name:"撤回",id:2,icon:"icon-danchuang-chehui"}]))),I=e=>{v(e).then((e=>{R.info=e.data,-1==R.info.status&&(R.isRight=!1),R.defaultTitle=`合同${w(R.info.types)}详情`}))},N=e=>{k.value.openDropdown()},P=e=>{3===e.id&&(R.info.types<=1?u(`/pages/customer/contract/addPayment?eid=${R.eid}&id=${R.id}`):u(`/pages/customer/list/addSpend?eid=${R.eid}&cid=${R.types}&id=${R.id}`)),2===e.id&&l("您确定要撤回此账目记录吗").then((e=>{f(R.info.apply_id).then((e=>{_.success(e.message)})).catch((e=>{_.error(e.message)}))})).catch((()=>{})),1===e.id&&(R.configData={title:"备注",placeholder:"请填写备注信息",type:e.id},D.value.popupOpen(R.info.mark)),4===e.id&&l("您确定要删除此账目记录吗").then((e=>{C(R.id)})).catch((e=>{}))},S=e=>{let s=R.id,i={mark:e.value};x(s,i).then((e=>{_.success(e.message),I(R.id)})).catch((e=>{_.error(e.message)}))},C=e=>{b(e).then((e=>{_.success(e.message),R.types>0?m(`/pages/customer/contract/details?id=${R.types}&tab=1`):m(`/pages/customer/list/details?id=${R.eid}&type=3`)})).catch((e=>{_.error(e.message)}))};return(e,s)=>{const i=o;return d(),a(i,{class:"content"},{default:n((()=>[p(i,{class:"cr-position-header"},{default:n((()=>[p(i,{class:"status_bar"}),p(r(h),{"is-right":R.isRight,"default-title":R.defaultTitle,"is-show-title":R.isShowTitle,"right-data":R.rightIcon,onHandleNarItem:N},null,8,["is-right","default-title","is-show-title","right-data"])])),_:1}),R.info.id?(d(),a(i,{key:0,class:"examine-content m10"},{default:n((()=>[p(y,{info:R.info},null,8,["info"])])),_:1})):c("",!0),p(g,{ref_key:"dropDownRef",ref:k,"list-data":T.value,onBtnClick:P},null,8,["list-data"]),p(j,{ref_key:"textareaPopupRef",ref:D,"config-data":R.configData,onChange:S},null,8,["config-data"])])),_:1})}}},[["__scopeId","data-v-e1635549"]]);export{D as default};
