import{d as e,r as a,e as i,a9 as t,c as n,x as s,o,h as r,w as p,i as u,a as d,W as c,N as _,j as l,s as m,ab as f,a0 as g,z as h,a1 as j}from"./index-DXvjTqMr.js";import{d as y}from"./index.D3kEQn5y.js";import{d as b}from"./dropDown.CIF5Aflp.js";import{p as v}from"./payDetail.BUdMTgKK.js";import{p as x}from"./paymentExamine.d7UYNENB.js";import{g as k,d as w}from"./finance.Bxo1BZoO.js";import{y as D,aj as I}from"./customer.BB8HSfBC.js";import{f as N}from"./assessment.C7cFhOQt.js";import{_ as T}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-data-picker.CB6THmJK.js";import"./uni-load-more.CT32PUQ_.js";import"./uni-cloud.es.Rn_2-D_g.js";/* empty css                                                                        */import"./uni-forms.GA6sNr68.js";import"./uni-forms.vue_vue_type_style_index_0_scoped_a2a9907e_lang.DijPs27m.js";import"./uni-easyinput.D7PPGXPC.js";/* empty css                                                                      */import"./uni-datetime-picker.DoXFjUWA.js";import"./uni-datetime-picker.vue_vue_type_style_index_0_scoped_6f474695_lang.U38A_nZ2.js";import"./uni-popup.BpvJsdxE.js";import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.BoqUbMLw.js";import"./file.u5oGG8Vo.js";const $=T(e({__name:"details",setup(e){const T=a(null),$=i({info:{},id:0,defaultTitle:"合同回款详情",isShowTitle:!0,rightIcon:[{type:1,icon:"icon-gengduo1",types:"icon"}],configData:{},forumMenus:[],jumpUrl:"/pages/finance/payment/index",tab:0});t((e=>{$.id=Number(e.id),e.tab&&($.tab=Number(e.tab),$.jumpUrl=`/pages/finance/payment/index?tab=${e.tab}`),R($.id)}));const C=n((()=>0!==$.info.status?0===$.info.invoice_id?[{name:"撤回审核",id:1,icon:"icon-danchuang-chehuishenhe"},{name:"编辑",id:3,icon:"icon-danchuang-bianji"},{name:"删除",id:2,icon:"icon-shanchu1"}]:[{name:"编辑",id:3,icon:"icon-danchuang-bianji"},{name:"删除",id:2,icon:"icon-shanchu1"}]:[])),R=e=>{D(e).then((e=>{$.info=e.data,$.defaultTitle=`合同${N($.info.types)}详情`,0===$.info.status&&($.rightIcon=[])})).catch((e=>{s.error(e.message)}))},U=()=>{T.value.openDropdown()},B=e=>{2===e.id?m("删除后，对应的合同付款以及收支记账也会删除").then((()=>{q($.info.id)})).catch((()=>{})):1===e.id?m("确定要撤回审核状态吗").then((()=>{z($.info.id,{status:-1})})).catch((()=>{})):$.info.types<2?O(2):($.configData={row:$.info,type:2},E.value.popupOpen())},E=a(null),O=e=>{W(e)},S=()=>{f(`/pages/finance/payment/details?id=${$.info.id}&tab=${$.tab}`)},W=e=>{I($.info.cid).then((a=>{$.configData={row:$.info,type:e,path:a.data.bill_cate_path},E.value.popupOpen()})).catch((e=>{s.error(e.message)}))},q=e=>{k(e).then((e=>{s.error(e.message),g("/pages/finance/payment/index")})).catch((e=>{s.error(e.message)}))},z=(e,a)=>{w(e,a).then((a=>{s.error(a.message),R(e)})).catch((e=>{s.error(e.message)}))};return(e,a)=>{const i=h,t=j;return o(),r(i,{class:"content"},{default:p((()=>[u(i,{class:"cr-position-header"},{default:p((()=>[u(i,{class:"status_bar"}),u(d(y),{"jump-url":d($).jumpUrl,"is-jump-bar":!1,"is-right":!0,"default-title":d($).defaultTitle,"is-show-title":d($).isShowTitle,"right-data":d($).rightIcon,onHandleNarItem:U},null,8,["jump-url","default-title","is-show-title","right-data"])])),_:1}),d($).info.id?(o(),r(i,{key:0,class:"examine-content m10",style:c({paddingBottom:0===d($).info.status?"126rpx":0})},{default:p((()=>[u(v,{info:d($).info},null,8,["info"])])),_:1},8,["style"])):_("",!0),0===d($).info.status?(o(),r(i,{key:1,class:"cr-examine-button"},{default:p((()=>[u(t,{class:"button default-error",onClick:a[0]||(a[0]=e=>O(0))},{default:p((()=>[l("拒绝")])),_:1}),u(t,{class:"button agree",onClick:a[1]||(a[1]=e=>O(1))},{default:p((()=>[l("同意")])),_:1})])),_:1})):_("",!0),u(b,{ref_key:"dropDownRef",ref:T,"list-data":d(C),onBtnClick:B},null,8,["list-data"]),u(x,{ref_key:"paymentExamineRef",ref:E,"config-data":d($).configData,onChange:S},null,8,["config-data"])])),_:1})}}}),[["__scopeId","data-v-45d145fc"]]);export{$ as default};
