import{d as R,r as u,s as F,b as A,dx as E,c as m,e as p,k as N,i as f,g as t,H as v,f as y,h as b,A as h,t as L,u as Q,q as U,R as z,S as P,_ as q}from"./index.0308b213.js";const D="/admin/assets/writeoff-introduce.2115e920.png",H=l=>(z("data-v-dd05f239"),l=l(),P(),l),M={class:"my-header"},T=["id"],$={class:"my-tabs"},j={class:"my-content"},G={key:0},J=H(()=>t("img",{src:D,alt:""},null,-1)),K={key:1},O=R({props:{show:{type:Boolean,default:!1},amount:{type:String,default:""},order_id:{type:[String,Number],default:0}},emits:["update:show","scanResult"],setup(l,{emit:d}){const B=l,c=u(null),s=u(0),o=u("");u("");const k=u("");window.setScanQrCode=e=>{d("scanResult",e)};const g=()=>{uni.postMessage({data:{type:"scan"}}),s.value=3},_=()=>{c.value&&setTimeout(()=>{c.value.focus()},0)},i=F({get(){return _(),B.show},set(e){_(),d("update:show",e)}});u(!1),A(null);const w=e=>{o.value="",document.addEventListener("keydown",r)},C=()=>{document.removeEventListener("keydown",r)},r=e=>{if(!(e.key==="Shift"||e.key==="Control"||e.key==="Alt")){if(e.key==="Enter"){S();return}o.value+=e.key}},S=()=>{o.value.length>0&&(console.log("\u626B\u7801\u5B8C\u6210:",o.value),d("scanResult",o.value))};return E(()=>{window.setScanQrCode=null,document.removeEventListener("keydown",r)}),(e,n)=>{const V=m("el-input"),I=m("el-dialog");return p(),N(I,{modelValue:Q(i),"onUpdate:modelValue":n[2]||(n[2]=a=>U(i)?i.value=a:null),width:"400px",class:"my-dialog"},{header:f(({titleId:a,titleClass:x})=>[t("div",M,[t("h4",{id:a,class:v(x)},"\u626B\u7801\u6838\u9500",10,T)])]),default:f(()=>[t("div",$,[t("div",{class:v({active:s.value===0}),onClick:n[0]||(n[0]=a=>s.value=0)},"\u626B\u7801\u67AA",2),t("div",{class:v({active:s.value===3}),onClick:g},"\u626B\u7801",2)]),t("div",j,[s.value===0?(p(),y("div",G,[b(V,{ref_key:"inputRef",ref:c,autofocus:"",modelValue:o.value,"onUpdate:modelValue":n[1]||(n[1]=a=>o.value=a),placeholder:"\u8BF7\u70B9\u51FB\u8F93\u5165\u6846\u805A\u7126\u626B\u7801\u6216\u8F93\u5165\u6838\u9500\u7801",size:"large",readonly:"",onFocus:w,onBlur:C},null,8,["modelValue"]),J])):h("",!0),s.value===3?(p(),y("div",K,[t("p",null,L(k.value),1)])):h("",!0)])]),_:1},8,["modelValue"])}}});const X=q(O,[["__scopeId","data-v-dd05f239"]]);export{X as default};
