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-B_2CoVdl.js";import{u as V}from"./index-LwlFn7Y4.js";import"./index-D2AmS0aU.js";import z from"./JVxeTableModal-DAQcnFwP.js";import{Q as A}from"./componentMap-CzCGDP7x.js";import g from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./jvxetable.api-CiLasAH8.js";import"./useJvxeMethods-DJZKL0Jv.js";import"./vxeUtils-Ck0LG0y-.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.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};
