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