capital-modal.23eaf1f6.js 2.7 KB

1
  1. import{_ as E,d as M,E as d,b3 as O,x as s,aA as T,o as p,N as g,K as u,b as c,y as l,O as I,u as a,b5 as R,c as j,M as q,L as K,W as C}from"./index.1417328f.js";import{d as W}from"./index.da2264ed.js";import{C as G}from"./tragelog.5720fe1a.js";const H={flex:"","mb-2":""},J={flex:"","flex-1":"",gap:"5",pr:"20px"},Q={flex:"",width:"120px"},X=C("\u641C\u7D22"),Y=C("\u91CD\u7F6E"),Z={flex:"","justify-between":"","mt-2":""},$=C("\u786E\u5B9A"),ee=M({__name:"capital-modal",emits:["on-add-order"],setup(te,{expose:N,emit:V}){const r=d(!1),_=d([]),w=G.filter(({field:o})=>o!=="status"),m=d(null),{run:D,data:h,getPaginationParams:k,loading:P,pagination:i}=O({initalData:[],isList:!0,initalPagination:{currentPage:1,pageSize:10,total:0}}),n=d({tradNo:"",logNo:""}),f=()=>{D(W({status:"2",...n.value,...k()}))};function S(){r.value=!1,V("on-add-order",a(_.value[0]))}function z(o){if(o.length>1){const e=o.pop();m.value.clearSelection(),m.value.toggleRowSelection(e,!0),_.value=[e]}else _.value=[o[0]]}function y(o=!1){o&&(n.value={tradNo:"",logNo:""}),i.currentPage=1,f()}return N({onDisplay:()=>r.value=!0}),(o,e)=>{const b=s("el-input"),v=s("el-button"),x=s("el-table-column"),A=s("el-pagination"),B=s("el-dialog"),F=T("loading");return p(),g(B,{modelValue:r.value,"onUpdate:modelValue":e[5]||(e[5]=t=>r.value=t),title:"\u8D44\u91D1\u8BA4\u9886",center:"",onOpen:e[6]||(e[6]=()=>f())},{default:u(()=>[c("div",H,[c("div",J,[l(b,{placeholder:"\u8D44\u91D1\u7F16\u53F7",size:"small",modelValue:n.value.tradNo,"onUpdate:modelValue":e[0]||(e[0]=t=>n.value.tradNo=t)},null,8,["modelValue"]),l(b,{placeholder:"\u8BA4\u9886\u7F16\u53F7",size:"small",modelValue:n.value.logNo,"onUpdate:modelValue":e[1]||(e[1]=t=>n.value.logNo=t)},null,8,["modelValue"])]),c("div",Q,[l(v,{size:"small",type:"primary",onClick:e[2]||(e[2]=()=>y())},{default:u(()=>[X]),_:1}),l(v,{size:"small",onClick:e[3]||(e[3]=()=>y(!0))},{default:u(()=>[Y]),_:1})])]),I((p(),g(a(R),{border:"",ref_key:"tableRef",ref:m,data:a(h),size:"small","row-key":"id",onSelectionChange:z},{default:u(()=>[l(x,{type:"selection",width:"55"}),(p(!0),j(K,null,q(a(w),({field:t,label:L,width:U})=>(p(),g(x,{key:t,prop:t,label:L,width:U,"show-overflow-tooltip":""},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])),[[F,a(P)]]),c("div",Z,[l(A,{total:a(i).total,"current-page":a(i).currentPage,"onUpdate:current-page":e[4]||(e[4]=t=>a(i).currentPage=t),onCurrentChange:f},null,8,["total","current-page"]),l(v,{type:"primary",size:"small",onClick:S},{default:u(()=>[$]),_:1})])]),_:1},8,["modelValue"])}}});var ne=E(ee,[["__scopeId","data-v-1492c86a"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/refund/components/create-refund/capital-modal.vue"]]);export{ne as default};