import{a as T,r as w,w as y,f as x,aj as u,J as j,o as q,K as t,S as l,b as f,P as p,Q as k}from"./vue.YrNK8sx4.js";import{_ as I}from"./_plugin-vue_export-helper.DlAUqK2U.js";const J=T({__name:"SettlementDialog",props:{visible:{type:Boolean},settlementData:{},modelValue:{}},emits:["update:visible","update:modelValue"],setup(U,{emit:C}){const m=U,b=C,_=w(!1),a=w({});y(()=>m.visible,n=>{_.value=n,n&&(a.value=m.modelValue||m.settlementData||{})}),y(()=>m.modelValue,n=>{console.log("val:::",n),n&&(a.value=n)},{immediate:!0});const v=x(()=>{var n,e,d;return((n=a.value)==null?void 0:n.app_user_borrower)||((d=(e=a.value)==null?void 0:e.borrower_info)==null?void 0:d.user_code)||""}),V=x(()=>{var n,e;return((n=a.value)==null?void 0:n.borrow_type_label)||((e=a.value)==null?void 0:e.borrow_type)||""}),c=()=>{b("update:visible",!1),b("update:modelValue",a.value)},D=()=>{window.print()};return(n,e)=>{const d=u("el-input"),r=u("el-form-item"),s=u("el-col"),B=u("el-row"),i=u("el-table-column"),S=u("el-table"),N=u("el-form"),g=u("el-button"),P=u("el-dialog");return q(),j(P,{modelValue:_.value,"onUpdate:modelValue":e[8]||(e[8]=o=>_.value=o),title:"领取设备结算单",width:"75%","close-on-click-modal":!1,onClose:c},{footer:t(()=>[l(g,{onClick:c},{default:t(()=>e[12]||(e[12]=[p("关闭")])),_:1}),l(g,{type:"primary",onClick:D},{default:t(()=>e[13]||(e[13]=[p("打印")])),_:1})]),default:t(()=>[l(N,{model:a.value,"label-width":"110px","label-position":"top"},{default:t(()=>[l(B,{gutter:16},{default:t(()=>[l(s,{span:8},{default:t(()=>[l(r,{label:"借用单编号"},{default:t(()=>[l(d,{modelValue:a.value.application_no,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.application_no=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{span:8},{default:t(()=>[l(r,{label:"借用人"},{default:t(()=>[l(d,{modelValue:a.value.emergency_contact,"onUpdate:modelValue":e[1]||(e[1]=o=>a.value.emergency_contact=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{span:8},{default:t(()=>[l(r,{label:"学号/工号"},{default:t(()=>[l(d,{modelValue:v.value,"onUpdate:modelValue":e[2]||(e[2]=o=>v.value=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{span:8},{default:t(()=>[l(r,{label:"借用性质"},{default:t(()=>[l(d,{modelValue:V.value,"onUpdate:modelValue":e[3]||(e[3]=o=>V.value=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{span:8},{default:t(()=>[l(r,{label:"借出时间"},{default:t(()=>[l(d,{modelValue:a.value.expected_start_time,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.expected_start_time=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{span:8},{default:t(()=>[l(r,{label:"预计归还时间"},{default:t(()=>[l(d,{modelValue:a.value.expected_end_time,"onUpdate:modelValue":e[5]||(e[5]=o=>a.value.expected_end_time=o),disabled:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e[9]||(e[9]=f("div",{style:{margin:"16px 0 8px 0","font-weight":"bold"}},"借用明细表",-1)),l(S,{data:a.value.items,border:"",style:{width:"100%"}},{default:t(()=>[l(i,{type:"index",label:"序号",width:"60",align:"center"}),l(i,{prop:"device_code",label:"设备编号",align:"center"}),l(i,{prop:"device_category_name",label:"设备分类",align:"center"}),l(i,{prop:"device_name",label:"设备名称",align:"center"}),l(i,{prop:"quantity",label:"借用数量",align:"center"}),l(i,{prop:"device_specification",label:"规格型号",align:"center"}),l(i,{prop:"device_storage_location",label:"存放位置",align:"center"},{default:t(o=>[p(k(o.row.device_storage_location||"-"),1)]),_:1}),l(i,{prop:"remark",label:"备注",align:"center"},{default:t(o=>[p(k(o.row.remark||"-"),1)]),_:1})]),_:1},8,["data"]),e[10]||(e[10]=f("div",{style:{margin:"16px 0 8px 0","font-weight":"bold"}},"配件信息",-1)),l(d,{modelValue:a.value.accessory_info,"onUpdate:modelValue":e[6]||(e[6]=o=>a.value.accessory_info=o),disabled:""},null,8,["modelValue"]),e[11]||(e[11]=f("div",{style:{margin:"16px 0 8px 0","font-weight":"bold"}},"备注",-1)),l(d,{modelValue:a.value.remark,"onUpdate:modelValue":e[7]||(e[7]=o=>a.value.remark=o),type:"textarea",disabled:""},null,8,["modelValue"])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),z=I(J,[["__scopeId","data-v-f2e362ac"]]);export{z as default};
