import{_ as V,d as F,n as p,aa as N,S as k,r as v,o as C,A as B,y as _,h as f,i,ca as S,e as o,G as A,H as j}from"./index.js";import{order_detail_columns as z}from"./columns.d95d09.js";const E={class:"col-item",style:{width:"247px"}},I={class:"col-value"},T={class:"col-item",style:{width:"248px"}},U={class:"col-value"},G={flex:"","w-full":"","justify-end":"","mt-2":""},H=F({__name:"edit-order",emits:["save-btn-click"],setup(M,{expose:w,emit:b}){const r=p(!1),l=p({}),x=b,c=p(0),d=p(0);function y(){r.value=!1,x("save-btn-click",{row:i(l),inv_fee:i(d),num:i(c)})}const g=N(()=>{const{winv_num:t}=l.value;return t});k(()=>{c.value=g.value});function h(t,e){var n=t.toString(),s=e.toString(),m,u,a=arguments[2];return m=(s.split(".")[1]?s.split(".")[1].length:0)-(n.split(".")[1]?n.split(".")[1].length:0),u=Number(n.replace(".",""))/Number(s.replace(".",""))*Math.pow(10,m),Number(typeof a!="number"?u:u.toFixed(parseInt(a)))}function D(t){const{goodPrice:e}=l.value;c.value=Number(h(t,e)).toFixed(8)}return w({onDisplay({row:t}){r.value=!0,l.value=t,d.value=l.value.winv_fee}}),(t,e)=>{const n=v("el-input-number"),s=v("el-row"),m=v("el-button"),u=v("el-dialog");return C(),B(u,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=a=>r.value=a),title:"\u7F16\u8F91\u9500\u552E\u8BA2\u5355",center:"",width:"1040px","close-on-click-modal":!1},{default:_(()=>[f(i(S),{data:l.value,"col-number":2,columns:i(z)},{custom:_(()=>[f(s,null,{default:_(()=>[o("div",E,[e[2]||(e[2]=o("p",{class:"col-label"},"\u5F00\u7968\u6570\u91CF",-1)),o("p",I,A(c.value),1)]),o("div",T,[e[3]||(e[3]=o("p",{class:"col-label"},"\u5F00\u7968\u91D1\u989D",-1)),o("p",U,[f(n,{placeholder:"\u5F00\u7968\u91D1\u989D",precision:2,min:.1,size:"small",style:{width:"100%"},modelValue:d.value,"onUpdate:modelValue":e[0]||(e[0]=a=>d.value=a),onChange:D,max:l.value.winv_fee},null,8,["modelValue","max"])])])]),_:1})]),_:1},8,["data","columns"]),o("div",G,[f(m,{size:"small",type:"primary",onClick:y},{default:_(()=>e[4]||(e[4]=[j("\u4FDD\u5B58")])),_:1})])]),_:1},8,["modelValue"])}}});var q=V(H,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form-wanyu/edit-order.vue"]]);export{q as default};
