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-Cy4uayzW.js";import{u as V}from"./index-gyz1IdHU.js";import"./index-zKZnG1QC.js";import z from"./JVxeTableModal-aROyNT_B.js";import{Q as A}from"./componentMap-0iK4HQBq.js";import g from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./jvxetable.api-iN4GaeN-.js";import"./useJvxeMethods-B9cBxf6D.js";import"./vxeUtils-XAL4qcPi.js";import"./useFormItem-IOFWTdED.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.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})}}}),Oe=L(N,[["__scopeId","data-v-10a26167"]]);export{Oe as default};
