import{d as S,f as s,U as x,a2 as B,ad as E,af as r,k as i,u as o,G as U}from"./vue-vendor-CxLCUzY4.js";import{a9 as D,h as p,_ as L}from"./index-CYriLmQo.js";import{u as V}from"./index-BN5Ac_IG.js";import"./index-CF_FJn6P.js";import z from"./JVxeTableModal-UFYU4png.js";import{Q as A}from"./componentMap-7D1QIeNI.js";import g from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./jvxetable.api-B8E5_A3k.js";import"./useJvxeMethods-BYzirYDT.js";import"./vxeUtils-BuNm0uPG.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.js";import"./injectionKey-DPVn4AgL.js";const N=S({__name:"InnerExpandTable",setup(j){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}]=D(),[_,{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(n=>{n.success&&(l.value=n.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 K(e){return[{label:"编辑",onClick:T.bind(null,e)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:k.bind(null,e)}}]}return(e,t)=>{const n=x("a-button"),M=x("a-card");return B(),E(M,{bordered:!1},{default:r(()=>[i(o(g),{onRegister:o(_),expandedRowKeys:d.value,rowSelection:y,onExpand:v},{tableTitle:r(()=>[i(n,{type:"primary",onClick:C,preIcon:"ant-design:plus-outlined"},{default:r(()=>t[1]||(t[1]=[U(" 新增")])),_:1})]),expandedRowRender:r(()=>[i(o(g),{bordered:"",size:"middle",rowKey:"id",canResize:!1,columns:b,dataSource:l.value,pagination:!1},null,8,["dataSource"])]),action:r(({record:f})=>[i(o(A),{actions:K(f)},null,8,["actions"])]),_:1},8,["onRegister","expandedRowKeys"]),i(z,{onRegister:o(I),onSuccess:t[0]||(t[0]=f=>o(u)())},null,8,["onRegister"])]),_:1})}}}),Je=L(N,[["__scopeId","data-v-10a26167"]]);export{Je as default};
