import{d as M,f as s,ag as g,aB as S,ar as E,aD as r,k as n,u as o,G as D}from"./vue-vendor-Be68asQ6.js";import{ad as L,j as p,a as U}from"./index-BFfnEkVs.js";import{u as V}from"./index-D2G57Sln.js";import"./index-CETWS1o0.js";import j from"./JVxeTableModal-YqOehh3k.js";import{Q as z}from"./componentMap-BUTAcOmo.js";import x from"./BasicTable-CuSLkXEu.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./jvxetable.api-C5vn_4MO.js";import"./useJvxeMethods-Bm6rYcfH.js";import"./vxeUtils-CRiZfirF.js";import"./useFormItem-CtGMPcLp.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./index-D68l__AG.js";import"./BasicForm-Cv-dsB-e.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./JCodeEditor-CSivhUhT.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./EasyCronInput-wCv2YMHn.js";import"./injectionKey-DPVn4AgL.js";const A=M({__name:"InnerExpandTable",setup(N){const a={list:"/test/order/orderList",delete:"/test/order/delete",deleteBatch:"/test/order/deleteBatch",customerListByMainId:"/test/order/listOrderCustomerByMainId"},d=s([]),m=s([]),l=s([]),h=[{title:"订单号",align:"center",dataIndex:"orderCode",width:100},{title:"订单类型",align:"center",dataIndex:"ctype",width:100,customRender:({text:e})=>{let t="";return e==="1"?t="国内订单":e==="2"&&(t="国际订单"),t}},{title:"订单日期",align:"center",width:100,dataIndex:"orderDate"},{title:"订单金额",align:"center",dataIndex:"orderMoney",width:100},{title:"订单备注",align:"center",dataIndex:"content",width:100}],b=[{title:"客户名",align:"center",width:100,dataIndex:"name",key:"name"},{title:"性别",align:"center",dataIndex:"sex",customRender:function(e){return e.value=="1"?"男":e.value=="2"?"女":e}},{title:"身份证号码",align:"center",dataIndex:"idcard"},{title:"电话",dataIndex:"telphone",align:"center"}],w=e=>p.get({url:a.list,params:e}),[I,{openModal:c}]=L(),[_,{reload:u}]=V({columns:h,api:w,rowKey:"id",striped:!0,useSearchForm:!1,showTableSetting:!0,clickToRowSelect:!1,bordered:!0,actionColumn:{width:110,title:"操作",dataIndex:"action",slots:{customRender:"action"},fixed:void 0}}),y={type:"checkbox",columnWidth:30,selectedRowKeys:m,onChange:R};function R(e){m.value=e}function v(e,t){d.value=[],l.value=[],e===!0&&(d.value.push(t.id),p.get({url:a.customerListByMainId,params:{orderId:t.id}},{isTransformResponse:!1}).then(i=>{i.success&&(l.value=i.result.records)}))}function C(){c(!0,{isUpdate:!1})}function T(e){c(!0,{record:e,isUpdate:!0})}function k(e){p.delete({url:a.delete,data:{id:e.id}},{joinParamsToUrl:!0}).then(()=>{u()})}function B(e){return[{label:"编辑",onClick:T.bind(null,e)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:k.bind(null,e)}}]}return(e,t)=>{const i=g("a-button"),K=g("a-card");return E(),S(K,{bordered:!1},{default:r(()=>[n(o(x),{onRegister:o(_),expandedRowKeys:d.value,rowSelection:y,onExpand:v},{tableTitle:r(()=>[n(i,{type:"primary",onClick:C,preIcon:"ant-design:plus-outlined"},{default:r(()=>t[1]||(t[1]=[D(" 新增")])),_:1})]),expandedRowRender:r(()=>[n(o(x),{bordered:"",size:"middle",rowKey:"id",canResize:!1,columns:b,dataSource:l.value,pagination:!1},null,8,["dataSource"])]),action:r(({record:f})=>[n(o(z),{actions:B(f)},null,8,["actions"])]),_:1},8,["onRegister","expandedRowKeys"]),n(j,{onRegister:o(I),onSuccess:t[0]||(t[0]=f=>o(u)())},null,8,["onRegister"])]),_:1})}}}),Ne=U(A,[["__scopeId","data-v-eb82fc77"]]);export{Ne as default};