diff --git a/build/assets/authCode-DstEoObn.js b/build/assets/authCode-ueWhWG4S.js similarity index 93% rename from build/assets/authCode-DstEoObn.js rename to build/assets/authCode-ueWhWG4S.js index 6020544..e12af50 100644 --- a/build/assets/authCode-DstEoObn.js +++ b/build/assets/authCode-ueWhWG4S.js @@ -1 +1 @@ -import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,K as x}from"./index-DFqeFzc7.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _}; +import{r as o,b as c,c as m,d as y,w as p,g as v,t as f,K as x}from"./index-zqjuu94d.js";const g={__name:"authCode",props:{type:{type:String,default:"primary"},start:{type:Boolean,default:!0},time:{type:Number,default:60},text:{type:String,default:"发送验证码"},timeText:{type:String,default:"秒重新获取"},width:{type:String,default:"100px"},disabled:{type:Boolean,default:!1}},emits:["sendCode"],setup(t,{expose:s,emit:r}){const l=t,u=r,i=()=>{u("sendCode"),l.start&&n()},e=o(0),a=o(null),n=()=>{e.value=l.time,a.value=setInterval(()=>{e.value--,e.value<=0&&(clearInterval(a.value),e.value=0)},1e3)};return s({startCountDown:n,resetDown:()=>{clearInterval(a.value),e.value=0}}),(b,C)=>{const d=c("el-button");return m(),y(d,{type:t.type,style:x({width:t.width}),onClick:i,disabled:e.value>0||t.disabled},{default:p(()=>[v(f(e.value>0?`${e.value}${t.timeText}`:t.text),1)]),_:1},8,["type","style","disabled"])}}};export{g as _}; diff --git a/build/assets/axiosAPI-DiYhnWHW.js b/build/assets/axiosAPI-YFghoU-n.js similarity index 93% rename from build/assets/axiosAPI-DiYhnWHW.js rename to build/assets/axiosAPI-YFghoU-n.js index e9def2b..974ce9d 100644 --- a/build/assets/axiosAPI-DiYhnWHW.js +++ b/build/assets/axiosAPI-YFghoU-n.js @@ -1 +1 @@ -import{L as o,M as s,E as r,u as d,N as g}from"./index-DFqeFzc7.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r}; +import{L as o,M as s,E as r,u as d,N as g}from"./index-zqjuu94d.js";const m=o.create({baseURL:s.api,timeout:6e4});m.interceptors.request.use(t=>{const a=localStorage.getItem("Token");return a&&(t.headers.token=a),t},t=>(console.error(t),Promise.reject(t)));m.interceptors.response.use(t=>{var a;if(t.data.code===-1&&(t.data.msg=="登录过期"||t.data.msg=="登录超时,请重新登录"))throw r({message:t.data.msg,type:"error"}),setTimeout(()=>{const e=d();e.setUserInfo({}),e.setToken(""),g.push("/login")},500),new Error(t.data.msg);if(t.data.code===400)throw r({message:t.data.msg,type:"error"}),new Error(t.data.msg);if(t.data.show&&r({message:t.data.msg,type:"error"}),t.data.code===500)throw t.data.msg=JSON.parse(t.data.msg),r({message:((a=t.data.msg)==null?void 0:a.msg)||t.data.msg,type:"error"}),new Error(t.data.msg);return t.data.code===0?Promise.reject(t.data):t.data},t=>{var a,e;return console.error(t),r({message:((e=(a=t.response)==null?void 0:a.data)==null?void 0:e.msg)||t,type:"error"}),Promise.reject(t)});export{m as r}; diff --git a/build/assets/index-B2ImU9yq.js b/build/assets/index-B2ImU9yq.js deleted file mode 100644 index c858f26..0000000 --- a/build/assets/index-B2ImU9yq.js +++ /dev/null @@ -1 +0,0 @@ -import{u as ye,r as u,B as Ae,b as y,c as n,k as g,f as l,w as a,F as X,l as ne,d as D,E as P,_ as he,o as ge,m as E,a as be,h as ve,e,g as m,i as Fe,j as ce,z as le,t as $,p as Q,q as ke,s as $e,G as He,n as me,D as Qe,J as Xe}from"./index-DFqeFzc7.js";import{a as Ve,b as Ye,c as Ze,u as el,d as Le,e as De,f as ll,g as tl,h as al,i as sl,j as ol}from"./user-Df1_-QkC.js";import"./moment-Cl4UOzQZ.js";import{r as _e}from"./axiosAPI-DiYhnWHW.js";import{_ as Re}from"./authCode-DstEoObn.js";import{f as il,u as nl,j as ul}from"./store-pG1SPGrt.js";import{p as dl}from"./padding-BlCym4iJ.js";function Ie(w){return _e.get("/city",{params:w})}function Pe(w){return _e.get("/area",{params:w})}function Oe(w){return _e.get("/street",{params:w})}function je(w){return _e.get("/village",{params:w})}function Ee(w){return _e.get("/brigade",{params:w})}const rl={class:"add-user"},cl={__name:"add",emits:["close"],setup(w,{expose:t,emit:_}){const C=ye(),R=u(null),c=Ae({mobile:"",code:"",real_name:"",user_ship:"",selectedValues:[]}),U=Ae({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),N=u([]),B=async(b,i)=>{const v=b.level;let V;if(v!==0&&!b.data.code)return i([]);v===0?(V=await Ie({province_code:51e4}),V=V.data.map(z=>({code:z.city_code,name:z.city_name}))):v===1?(V=await Pe({city_code:b.data.code}),V=V.data.map(z=>({code:z.area_code,name:z.area_name}))):v===2?(V=await Oe({area_code:b.data.code}),V=V.data.map(z=>({code:z.street_code,name:z.street_name}))):v===3?(V=await je({street_code:b.data.code}),V=V.data.map(z=>({code:z.village_code,name:z.village_name}))):v===4&&(V=await Ee({village_code:b.data.code}),V=V.data.map(z=>({code:z.id,name:z.brigade_name,leaf:!0}))),i(V)},K={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:B},S=u([]);(()=>{Ve().then(b=>{S.value=b.data.lists})})();const H=_,ue=()=>{R.value.validate(async b=>{if(b){let i={};i.mobile=c.mobile,i.code=c.code,i.user_ship=c.user_ship,i.real_name=c.real_name,i.province="510000",i.city=c.selectedValues[0],i.area=c.selectedValues[1],i.street=c.selectedValues[2],i.village=c.selectedValues[3],i.brigade=c.selectedValues[4],i.store_id=C.userInfo.store_id,Ye(i).then(v=>{H("close")})}})},te=u(null),de=()=>{R.value.validateField("mobile",b=>{b&&Ze({mobile:c.mobile}).then(i=>{P.success("发送成功"),te.value.startCountDown()}).catch(i=>{P.error("发送失败")})})};return t({addUser:ue}),(b,i)=>{const v=y("el-input"),V=y("el-form-item"),z=y("el-option"),M=y("el-select"),se=y("el-cascader"),j=y("el-form");return n(),g("div",rl,[l(j,{model:c,rules:U,ref_key:"formDataRef",ref:R,"label-width":"80px"},{default:a(()=>[l(V,{label:"用户电话",prop:"mobile"},{default:a(()=>[l(v,{modelValue:c.mobile,"onUpdate:modelValue":i[0]||(i[0]=k=>c.mobile=k),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),l(V,{label:"验证码",prop:"code"},{default:a(()=>[l(v,{modelValue:c.code,"onUpdate:modelValue":i[1]||(i[1]=k=>c.code=k),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),l(Re,{ref_key:"authCodeRef",ref:te,style:{"margin-left":"1rem"},onSendCode:de,start:!1},null,512)]),_:1}),l(V,{label:"用户姓名",prop:"real_name"},{default:a(()=>[l(v,{modelValue:c.real_name,"onUpdate:modelValue":i[2]||(i[2]=k=>c.real_name=k),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),l(V,{label:"用户类型",prop:"user_ship"},{default:a(()=>[l(M,{modelValue:c.user_ship,"onUpdate:modelValue":i[3]||(i[3]=k=>c.user_ship=k),placeholder:"请选择用户类型",style:{width:"100%"}},{default:a(()=>[(n(!0),g(X,null,ne(S.value,k=>(n(),D(z,{key:k.id,label:k.title,value:k.id,disabled:k.id==1||k.id==2||k.id==3},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(V,{label:"用户地址",prop:"selectedValues"},{default:a(()=>[l(se,{style:{width:"100%"},modelValue:c.selectedValues,"onUpdate:modelValue":i[4]||(i[4]=k=>c.selectedValues=k),options:N.value,props:K,load:B,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Ne=w=>(ke("data-v-5773e463"),w=w(),$e(),w),vl={class:"my-order"},_l={class:"header-nav"},pl=Ne(()=>e("div",{class:"nav-item"},$("用户列表"),-1)),fl={class:"header-row"},ml=Ne(()=>e("div",{class:"label"},"用户类型",-1)),yl={class:"header-input"},hl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},gl=["onClick"],bl={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},kl={class:"top flex"},$l={class:"r-1"},Vl={class:"bold"},wl={class:"bottom flex",style:{"justify-content":"space-between"}},Cl={class:"red"},Sl={class:"red"},xl={class:"red"},Ul={class:"red"},zl={key:0,class:"load-end"},Al={key:1,class:"load-end"},Ll={class:"dialog-footer"},Dl={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(w){const t=ye();u([]);const _=u({page_no:1,page_size:20,mobile:"",user_ship:""}),C=u(!1),R=u(0),c=u(0),U=u(!1),N=u([]),B=(i=!1)=>{if(i)_.value.page_no=1;else if(U.value||C.value)return;C.value=!0,_.value.mobile==""&&_.value.user_ship==""?_.value.store_id=t.userInfo.store_id:_.value.store_id=null,el(_.value).then(v=>{i?N.value=v.data.lists:N.value=[...N.value,...v.data.lists],_.value.page_no==1&&N.value.length>0&&E.emit("set-user-detail",N.value[0]),v.data.lists.length<_.value.page_size?U.value=!0:_.value.page_no++,c.value=0,R.value=v.data.count,C.value=!1}).catch(v=>{U.value=!0,C.value=!1})},K=(i,v)=>{c.value=v,E.emit("set-user-detail",i)},S=u(!1),G=u(null),H=()=>{var i;(i=G.value)==null||i.addUser()},ue=()=>{S.value=!1,B(!0)},te=u([]);(()=>{Ve().then(i=>{te.value=i.data.lists})})();const b=()=>{_.value.mobile="",_.value.user_ship="",B(!0)};return ge(()=>{E.on("re-load-user-list",i=>{i&&B(!0)})}),be(()=>{E.off("re-load-user-list")}),(i,v)=>{const V=y("Plus"),z=y("el-icon"),M=y("el-button"),se=y("el-option"),j=y("el-select"),k=y("el-input"),I=y("el-avatar"),x=y("el-tag"),Y=y("el-dialog"),T=ve("loading"),W=ve("infinite-scroll");return n(),g("div",vl,[e("div",_l,[pl,l(M,{type:"primary",onClick:v[0]||(v[0]=s=>S.value=!0)},{default:a(()=>[l(z,null,{default:a(()=>[l(V)]),_:1}),m(" 添加用户")]),_:1})]),e("div",fl,[ml,l(j,{modelValue:_.value.user_ship,"onUpdate:modelValue":v[1]||(v[1]=s=>_.value.user_ship=s),onChange:v[2]||(v[2]=s=>B(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:a(()=>[(n(!0),g(X,null,ne(te.value,s=>(n(),D(se,{key:s.id,label:s.title,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(M,{onClick:b,style:{"margin-left":"1rem"}},{default:a(()=>[m("重置")]),_:1})]),e("div",yl,[l(k,{modelValue:_.value.mobile,"onUpdate:modelValue":v[4]||(v[4]=s=>_.value.mobile=s),placeholder:"搜索手机号/ID",onKeydown:v[5]||(v[5]=Fe(s=>B(!0),["enter"])),onClear:v[6]||(v[6]=s=>B(!0)),clearable:""},{append:a(()=>[l(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:v[3]||(v[3]=s=>B(!0))},{default:a(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),ce((n(),g("div",hl,[(n(!0),g(X,null,ne(N.value,(s,Z)=>{var ee,O;return n(),g("div",{class:le(["item",{"item-active":c.value==Z}]),key:Z,onClick:ae=>K(s,Z)},[l(I,{class:"avatar",src:s.avatar},null,8,["src"]),e("div",bl,[e("div",kl,[e("div",$l,[e("span",Vl,$(s.nickname),1),e("span",null,$(" (ID:"+s.id+")"),1)]),e("div",null,"手机号: "+$(s.mobile),1)]),e("div",wl,[e("div",null,[m("余额: "),e("span",Cl,$(s.now_money),1)]),e("div",null,[m("采购款: "),e("span",Sl,$(s.purchase_funds),1)]),e("div",null,[m("返还金: "),e("span",xl,$((ee=s.return_money)==null?void 0:ee.toFixed(2)),1)]),e("div",null,[m("礼品券: "),e("span",Ul,$((O=s.get_frozen)==null?void 0:O.toFixed(2)),1)]),e("div",null,[s.user_ship!=1?(n(),D(x,{key:0,type:"primary"},{default:a(()=>[m($(s.user_ship_name),1)]),_:2},1024)):(n(),D(x,{key:1,type:"success"},{default:a(()=>[m($(s.user_ship_name),1)]),_:2},1024))])])])],10,gl)}),128)),U.value?(n(),g("div",zl,"没有更多了")):Q("",!0),C.value?(n(),g("div",Al,"加载中...")):Q("",!0)])),[[T,C.value],[W,B]]),l(Y,{modelValue:S.value,"onUpdate:modelValue":v[8]||(v[8]=s=>S.value=s),title:"添加用户",width:"600"},{footer:a(()=>[e("div",Ll,[l(M,{onClick:v[7]||(v[7]=s=>S.value=!1)},{default:a(()=>[m("取消")]),_:1}),l(M,{type:"primary",onClick:H},{default:a(()=>[m(" 添加 ")]),_:1})])]),default:a(()=>[l(cl,{ref_key:"addRef",ref:G,onClose:ue},null,512)]),_:1},8,["modelValue"])])}}},Fl=he(Dl,[["__scopeId","data-v-5773e463"]]),re=w=>(ke("data-v-a725bf38"),w=w(),$e(),w),Rl=re(()=>e("h4",null,"选择支付方式",-1)),Il={class:"dra-body"},Pl={class:"header"},Ol={style:{display:"inline-block"}},jl=re(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),El={style:{color:"#f5222d","padding-bottom":"2rem"}},Nl={style:{"font-size":"1.6rem"}},Bl={key:0,"element-loading-text":"支付中",class:"card1"},ql=re(()=>e("div",{class:"tips"},null,-1)),Tl={key:1,class:"card2"},Jl={class:"drawer-body"},Kl={class:"counter"},Ml={class:"received"},Wl={key:0},Gl={key:1,style:{"font-size":"1rem",color:"#999"}},Hl={key:0,class:"balance"},Ql={class:"money"},Xl=re(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Yl={key:1,class:"balance"},Zl=re(()=>e("div",null,"不够找零, 请支付更多金额",-1)),et=re(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),lt=[Zl,et],tt={class:"keypad"},at={class:"left"},st={class:"right"},ot={style:{width:"100%",display:"flex","justify-content":"center"}},it={__name:"payUser",emits:["paySuccess"],setup(w,{expose:t,emit:_}){const C=u(!1),R=u(1),c=u(""),U=u("");ye();const N=()=>{j()},B=()=>{me(()=>{setTimeout(()=>{var f;k.value=!1,c.value="",b.value=!0,(f=U.value)==null||f.focus(),K(R.value)},300)})},K=f=>{f!=1&&U.value.blur(),R.value=f,console.log(R.value),R.value==2?window.addEventListener("keydown",ee):(window.removeEventListener("keydown",ee),me(()=>{var p;c.value="",(p=U.value)==null||p.focus()}))},S=u({price:0,uid:""}),G=u([]),H=u(!1),ue=f=>{S.value=f.data,S.value.total=f.data.price,G.value=f.cart_id,H.value=f.isRePay||!1},te=f=>{S.value.total=f.price,z.value=f.order_id},de=_,b=u(!1),i=u(["1","2","3","4","5","6","7","8","9","0","00","."]),v=/^(10|11|12|13|14|15)\d{16}$/,V=/^(25|26|27|28|29|30)\d{14,22}$/,z=u(""),M=()=>{if(k.value=!0,U.value.blur(),H.value)se();else{let f;if(v.test(c.value))f="9";else if(V.test(c.value))f="13";else return k.value=!1,c.value="",U.value.focus(),P.error("请输入正确的支付码");Le({uid:S.value.uid,price:S.value.price,pay_type:f,auth_code:c.value}).then(p=>{p.data.out_trade_no&&p.msg=="支付成功"?(C.value=!1,P({message:"支付成功",type:"success"}),j(p.data)):p.msg=="用户支付中"&&p.code==1&&(P.warning(p.msg),E.on("pay_success",A=>{P({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),C.value=!1,j(A)}))}).catch(p=>{k.value=!1,me(()=>{var A;(A=U.value)==null||A.focus()})})}},se=()=>{let f=17;if(R.value==1)if(v.test(c.value))f="9";else if(V.test(c.value))f="13";else return k.value=!1,c.value="",U.value.focus(),P.error("请输入正确的支付码");il({order_id:S.value.order_id,pay_type:f,auth_code:c.value}).then(p=>{var A;(A=p.msg)!=null&&A.includes("成功")?(C.value=!1,P({message:"支付成功",type:"success"}),j({msg:"支付成功"})):p.msg=="用户支付中"&&p.code==1&&(P.warning(p.msg),E.on("pay_success",d=>{P({message:"支付成功",type:"success"}),setTimeout(()=>{E.off("pay_success")},200),C.value=!1,j(d)}))}).catch(p=>{c.value="",k.value=!1,me(()=>{var A;(A=U.value)==null||A.focus()})})};u(0);const j=(f=null)=>{var p;window.removeEventListener("keydown",ee),b.value=!1,k.value=!1,c.value="",x.value="",I.value=[],(p=U.value)==null||p.blur(),typeof f=="function"&&(f=null),de("paySuccess",f),C.value=!1},k=u(!1);t({drawer:C,setForm:ue,setRePay:te,beforeClose:j});const I=u([]),x=u(""),Y=He(()=>+x.value>0?(x.value-S.value.total).toFixed(2):-1),T=u(!1),W=f=>{f===-1?I.value=[]:I.value.pop(),x.value=I.value.length?I.value.join(""):0},s=f=>{T.value===!1&&(x.value="",T.value=!0);let p=String(x.value).indexOf(".")+1,A=String(x.value).length-p;console.log(p,A),(p===0||A<2)&&(I.value.join("")<=9999999&&I.value.push(f),x.value=I.value.join("")>99999999?99999999:I.value.join(""))},Z=()=>{if(Y.value===""||Y.value===null||Y.value===void 0||+x.value<+S.value.total)return P.error("收款金额应该大于等于应收金额");H.value?se():Le({uid:S.value.uid,price:S.value.price,pay_type:17}).then(f=>{console.log("========"),C.value=!1,P({message:f.msg,type:"success"}),R.value=1,j({msg:"收款成功"})}).catch(f=>{k.value=!1})},ee=f=>{let A=(f||window.event).keyCode;if(A==37)return K(2);if(A==120)return E.emit("F9");if(A==27)return j();switch(f.stopPropagation(),f.preventDefault(),A){case 96:case 48:s(0);break;case 97:case 49:s(1);break;case 98:case 50:s(2);break;case 99:case 51:s(3);break;case 100:case 52:s(4);break;case 101:case 53:s(5);break;case 102:case 54:s(6);break;case 103:case 55:s(7);break;case 104:case 56:s(8);break;case 105:case 57:s(9);break;case 110:s(".");break;case 190:s(".");break;case 8:W();break;case 13:Z();break}},O=u(!1),ae=()=>{if(!(!C.value||O.value&&c.value.length>0)&&R.value==2)return K(1)},pe=()=>{if(!(!C.value||O.value&&c.value.length>0)&&R.value==1)return K(2)};return ge(()=>{E.on("left",ae),E.on("right",pe)}),be(()=>{E.off("left",ae),E.off("right",pe)}),(f,p)=>{const A=y("el-input"),d=y("el-button"),o=y("Delete"),q=y("el-icon"),L=y("el-drawer"),h=ve("loading");return n(),D(L,{size:"60rem",modelValue:C.value,"onUpdate:modelValue":p[6]||(p[6]=ie=>C.value=ie),direction:"rtl",onOpen:B,"before-close":j},{header:a(()=>[Rl]),default:a(()=>{var ie;return[e("div",Il,[e("div",Pl,[e("div",{class:le(["left",{active:R.value==1}]),onClick:p[0]||(p[0]=J=>K(1))}," 微信/支付宝 ",2),e("div",{class:le(["right",{active:R.value==2}]),onClick:p[1]||(p[1]=J=>K(2))}," 现金收款 ",2)]),e("div",null,[e("div",Ol,[jl,e("div",El,[m(" ¥"),e("span",Nl,$((ie=S.value)==null?void 0:ie.price),1)])])]),R.value==1?ce((n(),g("div",Bl,[l(A,{ref_key:"codeRef",ref:U,modelValue:c.value,"onUpdate:modelValue":p[2]||(p[2]=J=>c.value=J),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Fe(M,["enter"]),onFocus:p[3]||(p[3]=J=>O.value=!0),onBlur:p[4]||(p[4]=J=>O.value=!1)},null,8,["modelValue"]),ql])),[[h,k.value]]):(n(),g("div",Tl,[e("div",Jl,[e("div",Kl,[e("div",Ml,[x.value?(n(),g("span",Wl,$(x.value),1)):(n(),g("span",Gl,"按下键盘输入客户支付金额"))]),Y.value>=0?(n(),g("div",Hl,[e("div",null,[m(" 需找零(元):"),e("span",Ql,"¥"+$(Y.value),1)]),Xl])):(n(),g("div",Yl,lt)),e("div",tt,[e("div",at,[(n(!0),g(X,null,ne(i.value,J=>(n(),D(d,{key:J,onClick:we=>s(J)},{default:a(()=>[m($(J),1)]),_:2},1032,["onClick"]))),128))]),e("div",st,[l(d,{onClick:W},{default:a(()=>[l(q,null,{default:a(()=>[l(o)]),_:1})]),_:1}),l(d,{onClick:p[5]||(p[5]=J=>W(-1))},{default:a(()=>[m("C")]),_:1}),l(d,{class:le(["enter",{"enter-disable":+x.value<+S.value.total}]),disabled:+x.value<+S.value.total,onClick:Z},{default:a(()=>[m(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:a(()=>[e("div",ot,[l(d,{class:"cancel-btn",onClick:N},{default:a(()=>[m("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},nt=he(it,[["__scopeId","data-v-a725bf38"]]),F=w=>(ke("data-v-c277bb87"),w=w(),$e(),w),ut={class:"my-order"},dt={class:"header-nav"},rt=["onClick"],ct={key:0,class:"detail"},vt={class:"table"},_t=F(()=>e("div",{class:"table-title"},"用户信息",-1)),pt={class:"table-info"},ft={class:"info-item"},mt=F(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),yt={class:"info-item-info red"},ht={class:"info-item"},gt=F(()=>e("div",{class:"info-item-title"},"采购款:",-1)),bt={class:"info-item-info red"},kt={class:"info-item"},$t=F(()=>e("div",{class:"info-item-title"},"返还金:",-1)),Vt={class:"info-item-info red"},wt={class:"info-item"},Ct=F(()=>e("div",{class:"info-item-title"},"头像:",-1)),St={class:"info-item-info"},xt={class:"info-item"},Ut=F(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),zt={class:"info-item-info red"},At={class:"info-item"},Lt=F(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),Dt={class:"info-item-info red"},Ft={class:"info-item"},Rt=F(()=>e("div",{class:"info-item-title"},"ID:",-1)),It={class:"info-item-info"},Pt={class:"info-item"},Ot=F(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),jt={class:"info-item-info"},Et={class:"info-item"},Nt=F(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Bt={class:"info-item-info"},qt={class:"info-item"},Tt=F(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Jt={class:"info-item-info"},Kt={class:"info-item"},Mt=F(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Wt={class:"info-item-info"},Gt={class:"info-item"},Ht=F(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Qt={class:"info-item-info"},Xt={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Yt=F(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Zt={class:"info-item-info"},ea={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},la=F(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),ta={class:"info-item-info"},aa={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},sa=F(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),oa=F(()=>e("div",{class:"table-title"},[m("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),ia={class:"table-info"},na={class:"pay-btn"},ua=F(()=>e("div",null,"¥1000.00",-1)),da=[ua],ra=F(()=>e("div",null,"¥2000.00",-1)),ca=[ra],va=F(()=>e("div",null,"¥5000.00",-1)),_a=[va],pa={key:1,class:"detail"},fa={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},ma={style:{display:"flex","align-items":"center"}},ya={style:{"margin-left":"0.5rem"}},ha={key:0,style:{display:"flex","align-items":"center"}},ga={class:"footer"},ba={key:0},ka={key:1},$a={key:2},Va={class:"dialog-footer"},wa={__name:"detail",setup(w){ye(),Qe();const t=u({id:""}),_=u({price:"",type:1}),C=u(null),R=()=>{_.value.type==1?_.value.price="1000":_.value.type==2?_.value.price="2000":_.value.type==3&&(_.value.price="5000"),_.value.type==0&&(_.value.price=Number(_.value.price).toFixed(2)),console.log("支付",_.value),C.value.setForm({data:{uid:t.value.id,price:_.value.price}}),C.value.drawer=!0},c=(d=null)=>{A()},U=u(!1),N=u([]);(()=>{Ve().then(d=>{N.value=d.data.lists})})();const K=()=>{ll({id:t.value.id,user_ship:t.value.user_ship}).then(d=>{var o;P.success("修改成功"),t.value.user_ship_name=(o=N.value.find(q=>q.id==t.value.user_ship))==null?void 0:o.title,U.value=!1})},S=()=>{U.value=!1},G=u(!1),H=u([]);(()=>{tl().then(d=>{H.value=d.data.lists})})();const te=()=>{al({id:t.value.id,label_id:t.value.label_id}).then(d=>{var o;P.success("修改成功"),t.value.label_name=(o=H.value.find(q=>q.label_id==t.value.label_id))==null?void 0:o.label_name,G.value=!1})},de=()=>{G.value=!1},b=u({id:"",province:"",city:"",area:"",street:"",brigade:""}),i=u([]),v=u([]),V=()=>{sl({uid:t.value.id}).then(d=>{d.data.village&&(i.value=[d.data.city,d.data.area,d.data.street,d.data.village,+d.data.brigade],v.value=JSON.parse(JSON.stringify(i.value)),b.value=Object.assign(b.value,d.data))})},z=u([]),M=async(d,o)=>{const q=d.level;let L;if(q!==0&&!d.data.code)return o([]);q===0?(L=await Ie({province_code:51e4}),L=L.data.map(h=>({code:h.city_code,name:h.city_name}))):q===1?(L=await Pe({city_code:d.data.code}),L=L.data.map(h=>({code:h.area_code,name:h.area_name}))):q===2?(L=await Oe({area_code:d.data.code}),L=L.data.map(h=>({code:h.street_code,name:h.street_name}))):q===3?(L=await je({street_code:d.data.code}),L=L.data.map(h=>({code:h.village_code,name:h.village_name}))):q===4&&(L=await Ee({village_code:d.data.code}),L=L.data.map(h=>({code:h.id,name:h.brigade_name,leaf:!0}))),o(L)},se={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:M},j=async()=>{b.value.city=i.value[0],b.value.area=i.value[1],b.value.street=i.value[2],b.value.village=i.value[3],b.value.brigade=i.value[4],b.value.phone||(b.value.phone=t.value.account),b.value.real_name||(b.value.real_name=t.value.real_name||t.value.nickname),ol({...b.value,uid:t.value.id}).then(d=>{P.success("编辑成功"),I.value=!0})},k=()=>{i.value=JSON.parse(JSON.stringify(v.value)),I.value=!0},I=u(!0),x=u(0),Y=u(["基本信息","用户资产"]),T=u(!1),W=u([]),s=u({page_no:1,page_size:10,loading:!1,loadend:!1});let Z=[];const ee=(d=!1)=>{d&&(W.value=[],s.value.page_no=1,s.value.loadend=!1),!(s.value.loadend||s.value.loading)&&(s.value.loading=!0,nl({uid:t.value.id,page_no:s.value.page_no,page_size:s.value.page_size}).then(o=>{W.value=[...W.value,...o.data.lists],s.value.loading=!1,s.value.page_no++,o.data.lists.length{if(O.value.mobile=t.value.phone,O.value.code="",Z=W.value.filter(d=>d.n_num).map(d=>({product_id:d.product_id,nums:d.n_num})),Z.length==0)return P.error("请选择商品");ae.value=!0},f=()=>{console.log("发送短信验证码"),P.success("验证码已发送")},p=()=>{if(O.value.code=="")return P.error("请输入验证码");ul({uid:t.value.id,info:Z}).then(d=>{T.value=!1,P.success("出库成功"),ae.value=!1,ee(!0)})},A=()=>{De({id:t.value.id}).then(({data:d})=>{d.phone=d.mobile+"",delete d.mobile,t.value=Object.assign(t.value,d)})};return ge(()=>{E.on("set-user-detail",d=>{t.value=d,T.value=!1,De({id:t.value.id}).then(({data:o})=>{o.phone=o.mobile+"",delete o.mobile,t.value=Object.assign(d,o),console.log(t.value)}),V(),ee(!0)})}),be(()=>{E.off("set-user-detail")}),(d,o)=>{var xe,Ue,ze;const q=y("el-avatar"),L=y("el-tag"),h=y("el-button"),ie=y("el-option"),J=y("el-select"),we=y("el-cascader"),Be=y("el-image"),fe=y("el-table-column"),qe=y("el-input-number"),Te=y("el-table"),Je=y("el-empty"),Ce=y("el-input"),Se=y("el-form-item"),Ke=y("el-form"),Me=y("el-dialog"),We=ve("infinite-scroll"),Ge=ve("loading");return n(),g("div",ut,[e("div",dt,[(n(!0),g(X,null,ne(Y.value,(r,oe)=>(n(),g("div",{key:oe,class:le(["nav-item",{"nav-item-active":x.value==oe,"nav-item-radius1":x.value==oe+1,"nav-item-radius2":x.value==oe-1}]),onClick:xa=>x.value=oe},$(r),11,rt))),128)),e("div",{class:le(["nav-item",{"nav-item-radius2":x.value==Y.value.length-1}]),style:{flex:"1"}},null,2)]),t.value.id&&x.value==0?(n(),g("div",ct,[e("div",vt,[_t,e("div",pt,[e("div",ft,[mt,e("div",yt,"¥"+$(t.value.now_money),1)]),e("div",ht,[gt,e("div",bt,"¥"+$(t.value.purchase_funds),1)]),e("div",kt,[$t,e("div",Vt,"¥"+$((xe=t.value.return_money)==null?void 0:xe.toFixed(2)),1)]),e("div",wt,[Ct,e("div",St,[l(q,{style:{width:"4rem",height:"4rem"},src:t.value.avatar},null,8,["src"])])]),e("div",xt,[Ut,e("div",zt,"¥"+$((Ue=t.value.get_frozen)==null?void 0:Ue.toFixed(2)),1)]),e("div",At,[Lt,e("div",Dt,"¥"+$((ze=t.value.amount_frozen)==null?void 0:ze.toFixed(2)),1)]),e("div",Ft,[Rt,e("div",It,$(t.value.id),1)]),e("div",Pt,[Ot,e("div",jt,$(t.value.nickname),1)]),e("div",Et,[Nt,e("div",Bt,$(t.value.phone),1)]),e("div",qt,[Tt,e("div",Jt,$(t.value.account),1)]),e("div",Kt,[Mt,e("div",Wt,$(t.value.real_name),1)]),e("div",Gt,[Ht,e("div",Qt,$(t.value.create_time),1)]),e("div",Xt,[Yt,e("div",Zt,[U.value==!1?(n(),g(X,{key:0},[t.value.user_ship!=1?(n(),D(L,{key:0,type:"primary",size:"large"},{default:a(()=>[m($(t.value.user_ship_name),1)]),_:1})):(n(),D(L,{key:1,type:"success",size:"large"},{default:a(()=>[m($(t.value.user_ship_name),1)]),_:1})),t.value.user_ship!=1?(n(),D(h,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:o[0]||(o[0]=r=>U.value=!0)},{default:a(()=>[m("修改")]),_:1})):Q("",!0)],64)):(n(),g(X,{key:1},[l(J,{modelValue:t.value.user_ship,"onUpdate:modelValue":o[1]||(o[1]=r=>t.value.user_ship=r),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:a(()=>[(n(!0),g(X,null,ne(N.value,r=>(n(),D(ie,{key:r.id,label:r.title,value:r.id,disabled:r.id==1||r.id==2||r.id==3},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),l(h,{type:"primary",style:{"margin-left":"1rem"},onClick:K},{default:a(()=>[m("确认")]),_:1}),l(h,{style:{"margin-left":"1rem"},onClick:S},{default:a(()=>[m("取消")]),_:1})],64))])]),t.value.user_ship==1?(n(),g("div",ea,[la,e("div",ta,[G.value==!1?(n(),g(X,{key:0},[t.value.label_name?(n(),D(L,{key:0,type:"primary",size:"large"},{default:a(()=>[m($(t.value.label_name),1)]),_:1})):Q("",!0),t.value.label_name?(n(),D(h,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:o[2]||(o[2]=r=>G.value=!0)},{default:a(()=>[m("修改")]),_:1})):(n(),D(h,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:o[3]||(o[3]=r=>{t.value.label_id="",G.value=!0})},{default:a(()=>[m("添加")]),_:1}))],64)):(n(),g(X,{key:1},[l(J,{modelValue:t.value.label_id,"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.label_id=r),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:a(()=>[(n(!0),g(X,null,ne(H.value,r=>(n(),D(ie,{key:r.label_id,label:r.label_name,value:r.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(h,{type:"primary",style:{"margin-left":"1rem"},onClick:te},{default:a(()=>[m("确认")]),_:1}),l(h,{style:{"margin-left":"1rem"},onClick:de},{default:a(()=>[m("取消")]),_:1})],64))])])):Q("",!0),e("div",aa,[sa,(n(),D(we,{key:t.value.id,style:{flex:"1"},modelValue:i.value,"onUpdate:modelValue":o[5]||(o[5]=r=>i.value=r),options:z.value,props:se,load:M,class:"w-full",disabled:I.value},null,8,["modelValue","options","disabled"])),I.value?(n(),D(h,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:o[6]||(o[6]=r=>I.value=!1)},{default:a(()=>[m("修改")]),_:1})):Q("",!0),I.value?Q("",!0):(n(),D(h,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:j},{default:a(()=>[m("确认")]),_:1})),I.value?Q("",!0):(n(),D(h,{key:2,style:{"margin-left":"1rem"},onClick:k},{default:a(()=>[m("取消")]),_:1}))])]),oa,e("div",ia,[e("div",na,[e("div",{class:le(["pay-item",{"pay-item-active":_.value.type==1}]),onClick:o[7]||(o[7]=r=>_.value.type=1)},da,2),e("div",{class:le(["pay-item",{"pay-item-active":_.value.type==2}]),onClick:o[8]||(o[8]=r=>_.value.type=2)},ca,2),e("div",{class:le(["pay-item",{"pay-item-active":_.value.type==3}]),onClick:o[9]||(o[9]=r=>_.value.type=3)},_a,2),e("div",{class:le(["pay-item",{"pay-item-active":_.value.type==0}]),onClick:o[11]||(o[11]=r=>_.value.type=0)},[ce(e("input",{type:"number",class:"input","onUpdate:modelValue":o[10]||(o[10]=r=>_.value.price=r),placeholder:"自定义金额"},null,512),[[Xe,_.value.price]])],2)]),l(h,{type:"primary",size:"large",class:"pay",onClick:R},{default:a(()=>[m("立即支付")]),_:1})])])])):Q("",!0),t.value.id&&x.value==1?ce((n(),g("div",pa,[ce((n(),g("div",fa,[l(Te,{data:W.value},{default:a(()=>[l(fe,{label:"商品信息"},{default:a(({row:r})=>[e("div",ma,[l(Be,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:r.image},null,8,["src"]),e("span",ya,$(r.store_name),1)])]),_:1}),l(fe,{prop:"price",label:"单价",width:T.value?130:200},null,8,["width"]),l(fe,{prop:"nums",label:"存量",width:T.value?100:200},null,8,["width"]),T.value?(n(),D(fe,{key:0,prop:"nums",label:"出库量",width:"250"},{default:a(({row:r})=>[r.nums?(n(),g("div",ha,[l(qe,{modelValue:r.n_num,"onUpdate:modelValue":oe=>r.n_num=oe,"step-strictly":"",min:0,max:r.nums},null,8,["modelValue","onUpdate:modelValue","max"]),l(h,{type:"primary",style:{"margin-left":"1rem"},onClick:oe=>r.n_num=r.nums},{default:a(()=>[m("全部")]),_:2},1032,["onClick"])])):Q("",!0)]),_:1})):Q("",!0)]),_:1},8,["data"])])),[[We,ee]]),e("div",ga,[T.value?(n(),g("div",ka,[l(h,{type:"primary",size:"large",onClick:pe},{default:a(()=>[m("确认出库")]),_:1}),l(h,{size:"large",onClick:o[13]||(o[13]=r=>T.value=!1)},{default:a(()=>[m("取消")]),_:1})])):(n(),g("div",ba,[l(h,{type:"warning",size:"large",onClick:o[12]||(o[12]=r=>T.value=!0),disabled:W.value.length==0},{default:a(()=>[m("商品出库")]),_:1},8,["disabled"])]))])])),[[Ge,s.value.loading]]):(n(),g("div",$a,[l(Je)])),l(nt,{ref_key:"payRef",ref:C,onPaySuccess:c},null,512),l(Me,{modelValue:ae.value,"onUpdate:modelValue":o[17]||(o[17]=r=>ae.value=r),title:"出库验证",width:"500"},{footer:a(()=>[e("div",Va,[l(h,{onClick:o[16]||(o[16]=r=>ae.value=!1)},{default:a(()=>[m("取消")]),_:1}),l(h,{type:"primary",onClick:p},{default:a(()=>[m(" 确认 ")]),_:1})])]),default:a(()=>[l(Ke,{model:O.value},{default:a(()=>[l(Se,{label:"手机号:"},{default:a(()=>[l(Ce,{modelValue:O.value.mobile,"onUpdate:modelValue":o[14]||(o[14]=r=>O.value.mobile=r),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),l(Se,{label:"验证码:"},{default:a(()=>[l(Ce,{modelValue:O.value.code,"onUpdate:modelValue":o[15]||(o[15]=r=>O.value.code=r),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(n(),D(Re,{style:{"margin-left":"1rem"},onSendCode:f,key:O.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])}}},Ca=he(wa,[["__scopeId","data-v-c277bb87"]]),Sa={class:"my-card"},Ia={__name:"index",setup(w){return(t,_)=>(n(),g("div",Sa,[l(Fl,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(dl),l(Ca,{ref:"detailRef"},null,512)]))}};export{Ia as default}; diff --git a/build/assets/index-BNW5h8If.js b/build/assets/index-BNW5h8If.js new file mode 100644 index 0000000..c984e5e --- /dev/null +++ b/build/assets/index-BNW5h8If.js @@ -0,0 +1 @@ +import{u as ye,r as n,B as Pe,b as g,c as i,k,f as a,w as s,F as X,l as ne,d as R,E as j,_ as he,o as ge,m as B,a as be,h as _e,e,g as m,i as Ee,j as ve,z as le,t as w,p as Q,q as ke,s as $e,G as He,n as me,D as Qe,J as Xe}from"./index-zqjuu94d.js";import{a as Ve,b as Ye,c as Ze,u as el,d as Ie,e as je,f as ll,g as al,h as tl,i as sl,j as ol}from"./user-CILZiEFt.js";import"./moment-Cl4UOzQZ.js";import{r as pe}from"./axiosAPI-YFghoU-n.js";import{_ as Ne}from"./authCode-ueWhWG4S.js";import{f as il,u as nl,j as ul}from"./store-B9VgAm7I.js";import{p as dl}from"./padding-SV9GOhiy.js";function we(S){return pe.get("/city",{params:S})}function Ce(S){return pe.get("/area",{params:S})}function Se(S){return pe.get("/street",{params:S})}function xe(S){return pe.get("/village",{params:S})}function Ue(S){return pe.get("/brigade",{params:S})}const rl={class:"add-user"},cl={__name:"add",emits:["close"],setup(S,{expose:t,emit:c}){const z=ye(),P=n(null),p=Pe({mobile:"",code:"",real_name:"",user_ship:"",selectedValues:[]}),L=Pe({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),q=n([]),N=async($,d)=>{const I=$.level;let V;if(I!==0&&!$.data.code)return d([]);I===0?(V=await we({province_code:51e4}),V=V.data.map(D=>({code:D.city_code,name:D.city_name}))):I===1?(V=await Ce({city_code:$.data.code}),V=V.data.map(D=>({code:D.area_code,name:D.area_name}))):I===2?(V=await Se({area_code:$.data.code}),V=V.data.map(D=>({code:D.street_code,name:D.street_name}))):I===3?(V=await xe({street_code:$.data.code}),V=V.data.map(D=>({code:D.village_code,name:D.village_name}))):I===4&&(V=await Ue({village_code:$.data.code}),V=V.data.map(D=>({code:D.id,name:D.brigade_name,leaf:!0}))),d(V)},M={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:N},A=n([]);(()=>{Ve().then($=>{A.value=$.data.lists})})();const H=c,ue=()=>{P.value.validate(async $=>{if($){let d={};d.mobile=p.mobile,d.code=p.code,d.user_ship=p.user_ship,d.real_name=p.real_name,d.province="510000",d.city=p.selectedValues[0],d.area=p.selectedValues[1],d.street=p.selectedValues[2],d.village=p.selectedValues[3],d.brigade=p.selectedValues[4],d.store_id=z.userInfo.store_id,Ye(d).then(I=>{H("close")})}})},ae=n(null),de=()=>{P.value.validateField("mobile",$=>{$&&Ze({mobile:p.mobile}).then(d=>{j.success("发送成功"),ae.value.startCountDown()}).catch(d=>{j.error("发送失败")})})};return t({addUser:ue}),($,d)=>{const I=g("el-input"),V=g("el-form-item"),D=g("el-option"),te=g("el-select"),x=g("el-cascader"),v=g("el-form");return i(),k("div",rl,[a(v,{model:p,rules:L,ref_key:"formDataRef",ref:P,"label-width":"80px"},{default:s(()=>[a(V,{label:"用户电话",prop:"mobile"},{default:s(()=>[a(I,{modelValue:p.mobile,"onUpdate:modelValue":d[0]||(d[0]=y=>p.mobile=y),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),a(V,{label:"验证码",prop:"code"},{default:s(()=>[a(I,{modelValue:p.code,"onUpdate:modelValue":d[1]||(d[1]=y=>p.code=y),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),a(Ne,{ref_key:"authCodeRef",ref:ae,style:{"margin-left":"1rem"},onSendCode:de,start:!1},null,512)]),_:1}),a(V,{label:"用户姓名",prop:"real_name"},{default:s(()=>[a(I,{modelValue:p.real_name,"onUpdate:modelValue":d[2]||(d[2]=y=>p.real_name=y),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),a(V,{label:"用户类型",prop:"user_ship"},{default:s(()=>[a(te,{modelValue:p.user_ship,"onUpdate:modelValue":d[3]||(d[3]=y=>p.user_ship=y),placeholder:"请选择用户类型",style:{width:"100%"}},{default:s(()=>[(i(!0),k(X,null,ne(A.value,y=>(i(),R(D,{key:y.id,label:y.title,value:y.id,disabled:y.id==1||y.id==2||y.id==3},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(V,{label:"用户地址",prop:"selectedValues"},{default:s(()=>[a(x,{style:{width:"100%"},modelValue:p.selectedValues,"onUpdate:modelValue":d[4]||(d[4]=y=>p.selectedValues=y),options:q.value,props:M,load:N,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},ze=S=>(ke("data-v-4cf0061b"),S=S(),$e(),S),vl={class:"my-order"},_l={class:"header-nav"},pl=ze(()=>e("div",{class:"nav-item"},w("用户列表"),-1)),fl={class:"header-row"},ml=ze(()=>e("div",{class:"label"},"用户类型",-1)),yl={class:"header-row"},hl=ze(()=>e("div",{class:"label"},"用户地区",-1)),gl={class:"header-input"},bl={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},kl=["onClick"],$l={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},Vl={class:"top flex"},wl={class:"r-1"},Cl={class:"bold"},Sl={class:"bottom flex",style:{"justify-content":"space-between"}},xl={class:"red"},Ul={class:"red"},zl={class:"red"},Al={class:"red"},Ll={key:0,class:"load-end"},Dl={key:1,class:"load-end"},Fl={class:"dialog-footer"},Rl={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(S){const t=ye();n([]);const c=n({page_no:1,page_size:20,mobile:"",user_ship:"",street:null}),z=n(!1),P=n(0),p=n(0),L=n(!1),q=n([]),N=(x=!1)=>{if(x)c.value.page_no=1;else if(L.value||z.value)return;z.value=!0,c.value.mobile==""&&c.value.user_ship==""?c.value.store_id=t.userInfo.store_id:c.value.store_id=null,el(c.value).then(v=>{x?q.value=v.data.lists:q.value=[...q.value,...v.data.lists],c.value.page_no==1&&q.value.length>0&&B.emit("set-user-detail",q.value[0]),v.data.lists.length{L.value=!0,z.value=!1})},M=(x,v)=>{p.value=v,B.emit("set-user-detail",x)},A=n(!1),G=n(null),H=()=>{var x;(x=G.value)==null||x.addUser()},ue=()=>{A.value=!1,N(!0)},ae=n([]);(()=>{Ve().then(x=>{ae.value=x.data.lists})})();const $=()=>{c.value.mobile="",c.value.user_ship="",c.value.street=null,d.value=[],N(!0)},d=n([]),I=n([]),V=async(x,v)=>{const y=x.level;let h;if(y!==0&&!x.data.code)return v([]);y===0?(h=await we({province_code:51e4}),h=h.data.map(f=>({code:f.city_code,name:f.city_name}))):y===1?(h=await Ce({city_code:x.data.code}),h=h.data.map(f=>({code:f.area_code,name:f.area_name}))):y===2?(h=await Se({area_code:x.data.code}),h=h.data.map(f=>({code:f.street_code,name:f.street_name,leaf:!0}))):y===3?(h=await xe({street_code:x.data.code}),h=h.data.map(f=>({code:f.village_code,name:f.village_name}))):y===4&&(h=await Ue({village_code:x.data.code}),h=h.data.map(f=>({code:f.id,name:f.brigade_name,leaf:!0}))),v(h)},D={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:V},te=()=>{d.value.length?c.value.street=d.value[d.value.length-1]:c.value.street="",N(!0)};return ge(()=>{B.on("re-load-user-list",x=>{x&&N(!0)})}),be(()=>{B.off("re-load-user-list")}),(x,v)=>{const y=g("Plus"),h=g("el-icon"),f=g("el-button"),Y=g("el-option"),J=g("el-select"),W=g("el-cascader"),C=g("el-input"),se=g("el-avatar"),Z=g("el-tag"),E=g("el-dialog"),ee=_e("loading"),re=_e("infinite-scroll");return i(),k("div",vl,[e("div",_l,[pl,a(f,{type:"primary",onClick:v[0]||(v[0]=l=>A.value=!0)},{default:s(()=>[a(h,null,{default:s(()=>[a(y)]),_:1}),m(" 添加用户")]),_:1})]),e("div",fl,[ml,a(J,{modelValue:c.value.user_ship,"onUpdate:modelValue":v[1]||(v[1]=l=>c.value.user_ship=l),onChange:v[2]||(v[2]=l=>N(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:s(()=>[(i(!0),k(X,null,ne(ae.value,l=>(i(),R(Y,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(f,{onClick:$,style:{"margin-left":"1rem"}},{default:s(()=>[m("重置")]),_:1})]),e("div",yl,[hl,a(W,{style:{flex:"1"},options:I.value,modelValue:d.value,"onUpdate:modelValue":v[3]||(v[3]=l=>d.value=l),props:D,load:V,class:"w-full",onChange:te},null,8,["options","modelValue"])]),e("div",gl,[a(C,{modelValue:c.value.mobile,"onUpdate:modelValue":v[5]||(v[5]=l=>c.value.mobile=l),placeholder:"搜索手机号",onKeydown:v[6]||(v[6]=Ee(l=>N(!0),["enter"])),onClear:v[7]||(v[7]=l=>N(!0)),clearable:""},{append:s(()=>[a(f,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:v[4]||(v[4]=l=>N(!0))},{default:s(()=>[m("搜索")]),_:1})]),_:1},8,["modelValue"])]),ve((i(),k("div",bl,[(i(!0),k(X,null,ne(q.value,(l,_)=>{var U,u;return i(),k("div",{class:le(["item",{"item-active":p.value==_}]),key:_,onClick:o=>M(l,_)},[a(se,{class:"avatar",src:l.avatar},null,8,["src"]),e("div",$l,[e("div",Vl,[e("div",wl,[e("span",Cl,w(l.real_name||l.nickname),1),e("span",null,w(" (ID:"+l.id+")"),1)]),e("div",null,"手机号: "+w(l.mobile),1)]),e("div",Sl,[e("div",null,[m("余额: "),e("span",xl,w(l.now_money),1)]),e("div",null,[m("采购款: "),e("span",Ul,w(l.purchase_funds),1)]),e("div",null,[m("返还金: "),e("span",zl,w((U=l.return_money)==null?void 0:U.toFixed(2)),1)]),e("div",null,[m("礼品券: "),e("span",Al,w((u=l.get_frozen)==null?void 0:u.toFixed(2)),1)]),e("div",null,[l.user_ship==0||l.user_ship==4?(i(),R(Z,{key:0,type:"primary"},{default:s(()=>[m(w(l.user_ship_name),1)]),_:2},1024)):(i(),R(Z,{key:1,type:"success"},{default:s(()=>[m(w(l.user_ship_name),1)]),_:2},1024))])])])],10,kl)}),128)),L.value?(i(),k("div",Ll,"没有更多了")):Q("",!0),z.value?(i(),k("div",Dl,"加载中...")):Q("",!0)])),[[ee,z.value],[re,N]]),a(E,{modelValue:A.value,"onUpdate:modelValue":v[9]||(v[9]=l=>A.value=l),title:"添加用户",width:"600"},{footer:s(()=>[e("div",Fl,[a(f,{onClick:v[8]||(v[8]=l=>A.value=!1)},{default:s(()=>[m("取消")]),_:1}),a(f,{type:"primary",onClick:H},{default:s(()=>[m(" 添加 ")]),_:1})])]),default:s(()=>[a(cl,{ref_key:"addRef",ref:G,onClose:ue},null,512)]),_:1},8,["modelValue"])])}}},Ol=he(Rl,[["__scopeId","data-v-4cf0061b"]]),ce=S=>(ke("data-v-a725bf38"),S=S(),$e(),S),Pl=ce(()=>e("h4",null,"选择支付方式",-1)),Il={class:"dra-body"},jl={class:"header"},El={style:{display:"inline-block"}},Nl=ce(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Bl={style:{color:"#f5222d","padding-bottom":"2rem"}},ql={style:{"font-size":"1.6rem"}},Tl={key:0,"element-loading-text":"支付中",class:"card1"},Jl=ce(()=>e("div",{class:"tips"},null,-1)),Kl={key:1,class:"card2"},Ml={class:"drawer-body"},Wl={class:"counter"},Gl={class:"received"},Hl={key:0},Ql={key:1,style:{"font-size":"1rem",color:"#999"}},Xl={key:0,class:"balance"},Yl={class:"money"},Zl=ce(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ea={key:1,class:"balance"},la=ce(()=>e("div",null,"不够找零, 请支付更多金额",-1)),aa=ce(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),ta=[la,aa],sa={class:"keypad"},oa={class:"left"},ia={class:"right"},na={style:{width:"100%",display:"flex","justify-content":"center"}},ua={__name:"payUser",emits:["paySuccess"],setup(S,{expose:t,emit:c}){const z=n(!1),P=n(1),p=n(""),L=n("");ye();const q=()=>{v()},N=()=>{me(()=>{setTimeout(()=>{var l;y.value=!1,p.value="",$.value=!0,(l=L.value)==null||l.focus(),M(P.value)},300)})},M=l=>{l!=1&&L.value.blur(),P.value=l,console.log(P.value),P.value==2?window.addEventListener("keydown",Z):(window.removeEventListener("keydown",Z),me(()=>{var _;p.value="",(_=L.value)==null||_.focus()}))},A=n({price:0,uid:""}),G=n([]),H=n(!1),ue=l=>{A.value=l.data,A.value.total=l.data.price,G.value=l.cart_id,H.value=l.isRePay||!1},ae=l=>{A.value.total=l.price,D.value=l.order_id},de=c,$=n(!1),d=n(["1","2","3","4","5","6","7","8","9","0","00","."]),I=/^(10|11|12|13|14|15)\d{16}$/,V=/^(25|26|27|28|29|30)\d{14,22}$/,D=n(""),te=()=>{if(y.value=!0,L.value.blur(),H.value)x();else{let l;if(I.test(p.value))l="9";else if(V.test(p.value))l="13";else return y.value=!1,p.value="",L.value.focus(),j.error("请输入正确的支付码");Ie({uid:A.value.uid,price:A.value.price,pay_type:l,auth_code:p.value}).then(_=>{_.data.out_trade_no&&_.msg=="支付成功"?(z.value=!1,j({message:"支付成功",type:"success"}),v(_.data)):_.msg=="用户支付中"&&_.code==1&&(j.warning(_.msg),B.on("pay_success",U=>{j({message:"支付成功",type:"success"}),setTimeout(()=>{B.off("pay_success")},200),z.value=!1,v(U)}))}).catch(_=>{y.value=!1,me(()=>{var U;(U=L.value)==null||U.focus()})})}},x=()=>{let l=17;if(P.value==1)if(I.test(p.value))l="9";else if(V.test(p.value))l="13";else return y.value=!1,p.value="",L.value.focus(),j.error("请输入正确的支付码");il({order_id:A.value.order_id,pay_type:l,auth_code:p.value}).then(_=>{var U;(U=_.msg)!=null&&U.includes("成功")?(z.value=!1,j({message:"支付成功",type:"success"}),v({msg:"支付成功"})):_.msg=="用户支付中"&&_.code==1&&(j.warning(_.msg),B.on("pay_success",u=>{j({message:"支付成功",type:"success"}),setTimeout(()=>{B.off("pay_success")},200),z.value=!1,v(u)}))}).catch(_=>{p.value="",y.value=!1,me(()=>{var U;(U=L.value)==null||U.focus()})})};n(0);const v=(l=null)=>{var _;window.removeEventListener("keydown",Z),$.value=!1,y.value=!1,p.value="",f.value="",h.value=[],(_=L.value)==null||_.blur(),typeof l=="function"&&(l=null),de("paySuccess",l),z.value=!1},y=n(!1);t({drawer:z,setForm:ue,setRePay:ae,beforeClose:v});const h=n([]),f=n(""),Y=He(()=>+f.value>0?(f.value-A.value.total).toFixed(2):-1),J=n(!1),W=l=>{l===-1?h.value=[]:h.value.pop(),f.value=h.value.length?h.value.join(""):0},C=l=>{J.value===!1&&(f.value="",J.value=!0);let _=String(f.value).indexOf(".")+1,U=String(f.value).length-_;console.log(_,U),(_===0||U<2)&&(h.value.join("")<=9999999&&h.value.push(l),f.value=h.value.join("")>99999999?99999999:h.value.join(""))},se=()=>{if(Y.value===""||Y.value===null||Y.value===void 0||+f.value<+A.value.total)return j.error("收款金额应该大于等于应收金额");H.value?x():Ie({uid:A.value.uid,price:A.value.price,pay_type:17}).then(l=>{console.log("========"),z.value=!1,j({message:l.msg,type:"success"}),P.value=1,v({msg:"收款成功"})}).catch(l=>{y.value=!1})},Z=l=>{let U=(l||window.event).keyCode;if(U==37)return M(2);if(U==120)return B.emit("F9");if(U==27)return v();switch(l.stopPropagation(),l.preventDefault(),U){case 96:case 48:C(0);break;case 97:case 49:C(1);break;case 98:case 50:C(2);break;case 99:case 51:C(3);break;case 100:case 52:C(4);break;case 101:case 53:C(5);break;case 102:case 54:C(6);break;case 103:case 55:C(7);break;case 104:case 56:C(8);break;case 105:case 57:C(9);break;case 110:C(".");break;case 190:C(".");break;case 8:W();break;case 13:se();break}},E=n(!1),ee=()=>{if(!(!z.value||E.value&&p.value.length>0)&&P.value==2)return M(1)},re=()=>{if(!(!z.value||E.value&&p.value.length>0)&&P.value==1)return M(2)};return ge(()=>{B.on("left",ee),B.on("right",re)}),be(()=>{B.off("left",ee),B.off("right",re)}),(l,_)=>{const U=g("el-input"),u=g("el-button"),o=g("Delete"),T=g("el-icon"),F=g("el-drawer"),b=_e("loading");return i(),R(F,{size:"60rem",modelValue:z.value,"onUpdate:modelValue":_[6]||(_[6]=ie=>z.value=ie),direction:"rtl",onOpen:N,"before-close":v},{header:s(()=>[Pl]),default:s(()=>{var ie;return[e("div",Il,[e("div",jl,[e("div",{class:le(["left",{active:P.value==1}]),onClick:_[0]||(_[0]=K=>M(1))}," 微信/支付宝 ",2),e("div",{class:le(["right",{active:P.value==2}]),onClick:_[1]||(_[1]=K=>M(2))}," 现金收款 ",2)]),e("div",null,[e("div",El,[Nl,e("div",Bl,[m(" ¥"),e("span",ql,w((ie=A.value)==null?void 0:ie.price),1)])])]),P.value==1?ve((i(),k("div",Tl,[a(U,{ref_key:"codeRef",ref:L,modelValue:p.value,"onUpdate:modelValue":_[2]||(_[2]=K=>p.value=K),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Ee(te,["enter"]),onFocus:_[3]||(_[3]=K=>E.value=!0),onBlur:_[4]||(_[4]=K=>E.value=!1)},null,8,["modelValue"]),Jl])),[[b,y.value]]):(i(),k("div",Kl,[e("div",Ml,[e("div",Wl,[e("div",Gl,[f.value?(i(),k("span",Hl,w(f.value),1)):(i(),k("span",Ql,"按下键盘输入客户支付金额"))]),Y.value>=0?(i(),k("div",Xl,[e("div",null,[m(" 需找零(元):"),e("span",Yl,"¥"+w(Y.value),1)]),Zl])):(i(),k("div",ea,ta)),e("div",sa,[e("div",oa,[(i(!0),k(X,null,ne(d.value,K=>(i(),R(u,{key:K,onClick:Ae=>C(K)},{default:s(()=>[m(w(K),1)]),_:2},1032,["onClick"]))),128))]),e("div",ia,[a(u,{onClick:W},{default:s(()=>[a(T,null,{default:s(()=>[a(o)]),_:1})]),_:1}),a(u,{onClick:_[5]||(_[5]=K=>W(-1))},{default:s(()=>[m("C")]),_:1}),a(u,{class:le(["enter",{"enter-disable":+f.value<+A.value.total}]),disabled:+f.value<+A.value.total,onClick:se},{default:s(()=>[m(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:s(()=>[e("div",na,[a(u,{class:"cancel-btn",onClick:q},{default:s(()=>[m("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},da=he(ua,[["__scopeId","data-v-a725bf38"]]),O=S=>(ke("data-v-175f683d"),S=S(),$e(),S),ra={class:"my-order"},ca={class:"header-nav"},va=["onClick"],_a={key:0,class:"detail"},pa={class:"table"},fa=O(()=>e("div",{class:"table-title"},"用户信息",-1)),ma={class:"table-info"},ya={class:"info-item"},ha=O(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),ga={class:"info-item-info red"},ba={class:"info-item"},ka=O(()=>e("div",{class:"info-item-title"},"采购款:",-1)),$a={class:"info-item-info red"},Va={class:"info-item"},wa=O(()=>e("div",{class:"info-item-title"},"返还金:",-1)),Ca={class:"info-item-info red"},Sa={class:"info-item"},xa=O(()=>e("div",{class:"info-item-title"},"头像:",-1)),Ua={class:"info-item-info"},za={class:"info-item"},Aa=O(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),La={class:"info-item-info red"},Da={class:"info-item"},Fa=O(()=>e("div",{class:"info-item-title"},"冻结礼品券:",-1)),Ra={class:"info-item-info red"},Oa={class:"info-item"},Pa=O(()=>e("div",{class:"info-item-title"},"ID:",-1)),Ia={class:"info-item-info"},ja={class:"info-item"},Ea=O(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Na={class:"info-item-info"},Ba={class:"info-item"},qa=O(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Ta={class:"info-item-info"},Ja={class:"info-item"},Ka=O(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),Ma={class:"info-item-info"},Wa={class:"info-item"},Ga=O(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Ha={class:"info-item-info"},Qa={class:"info-item"},Xa=O(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ya={class:"info-item-info"},Za={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},et=O(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),lt={class:"info-item-info"},at={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},tt=O(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),st={class:"info-item-info"},ot={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},it=O(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),nt=O(()=>e("div",{class:"table-title"},[m("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),ut={class:"table-info"},dt={class:"pay-btn"},rt=O(()=>e("div",null,"¥1000.00",-1)),ct=[rt],vt=O(()=>e("div",null,"¥2000.00",-1)),_t=[vt],pt=O(()=>e("div",null,"¥5000.00",-1)),ft=[pt],mt={key:1,class:"detail"},yt={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},ht={style:{display:"flex","align-items":"center"}},gt={style:{"margin-left":"0.5rem"}},bt={key:0,style:{display:"flex","align-items":"center"}},kt={class:"footer"},$t={key:0},Vt={key:1},wt={key:2},Ct={class:"dialog-footer"},St={__name:"detail",setup(S){ye(),Qe();const t=n({id:""}),c=n({price:"",type:1}),z=n(null),P=()=>{c.value.type==1?c.value.price="1000":c.value.type==2?c.value.price="2000":c.value.type==3&&(c.value.price="5000"),c.value.type==0&&(c.value.price=Number(c.value.price).toFixed(2)),console.log("支付",c.value),z.value.setForm({data:{uid:t.value.id,price:c.value.price}}),z.value.drawer=!0},p=(u=null)=>{U()},L=n(!1),q=n([]);(()=>{Ve().then(u=>{q.value=u.data.lists})})();const M=()=>{ll({id:t.value.id,user_ship:t.value.user_ship}).then(u=>{var o;j.success("修改成功"),t.value.user_ship_name=(o=q.value.find(T=>T.id==t.value.user_ship))==null?void 0:o.title,L.value=!1})},A=()=>{L.value=!1},G=n(!1),H=n([]);(()=>{al().then(u=>{H.value=u.data.lists})})();const ae=()=>{tl({id:t.value.id,label_id:t.value.label_id}).then(u=>{var o;j.success("修改成功"),t.value.label_name=(o=H.value.find(T=>T.label_id==t.value.label_id))==null?void 0:o.label_name,G.value=!1})},de=()=>{G.value=!1},$=n({id:"",province:"",city:"",area:"",street:"",brigade:""}),d=n([]),I=n([]),V=()=>{sl({uid:t.value.id}).then(u=>{u.data.village&&(d.value=[u.data.city,u.data.area,u.data.street,u.data.village,+u.data.brigade],I.value=JSON.parse(JSON.stringify(d.value)),$.value=Object.assign($.value,u.data))})},D=n([]),te=async(u,o)=>{const T=u.level;let F;if(T!==0&&!u.data.code)return o([]);T===0?(F=await we({province_code:51e4}),F=F.data.map(b=>({code:b.city_code,name:b.city_name}))):T===1?(F=await Ce({city_code:u.data.code}),F=F.data.map(b=>({code:b.area_code,name:b.area_name}))):T===2?(F=await Se({area_code:u.data.code}),F=F.data.map(b=>({code:b.street_code,name:b.street_name}))):T===3?(F=await xe({street_code:u.data.code}),F=F.data.map(b=>({code:b.village_code,name:b.village_name}))):T===4&&(F=await Ue({village_code:u.data.code}),F=F.data.map(b=>({code:b.id,name:b.brigade_name,leaf:!0}))),o(F)},x={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:te},v=async()=>{$.value.city=d.value[0],$.value.area=d.value[1],$.value.street=d.value[2],$.value.village=d.value[3],$.value.brigade=d.value[4],$.value.phone||($.value.phone=t.value.account),$.value.real_name||($.value.real_name=t.value.real_name||t.value.nickname),ol({...$.value,uid:t.value.id}).then(u=>{j.success("编辑成功"),h.value=!0})},y=()=>{d.value=JSON.parse(JSON.stringify(I.value)),h.value=!0},h=n(!0),f=n(0),Y=n(["基本信息"]),J=n(!1),W=n([]),C=n({page_no:1,page_size:10,loading:!1,loadend:!1});let se=[];const Z=(u=!1)=>{u&&(W.value=[],C.value.page_no=1,C.value.loadend=!1),!(C.value.loadend||C.value.loading)&&(C.value.loading=!0,nl({uid:t.value.id,page_no:C.value.page_no,page_size:C.value.page_size}).then(o=>{W.value=[...W.value,...o.data.lists],C.value.loading=!1,C.value.page_no++,o.data.lists.length{if(E.value.mobile=t.value.phone,E.value.code="",se=W.value.filter(u=>u.n_num).map(u=>({product_id:u.product_id,nums:u.n_num})),se.length==0)return j.error("请选择商品");ee.value=!0},l=()=>{console.log("发送短信验证码"),j.success("验证码已发送")},_=()=>{if(E.value.code=="")return j.error("请输入验证码");ul({uid:t.value.id,info:se}).then(u=>{J.value=!1,j.success("出库成功"),ee.value=!1,Z(!0)})},U=()=>{je({id:t.value.id}).then(({data:u})=>{u.phone=u.mobile+"",delete u.mobile,t.value=Object.assign(t.value,u)})};return ge(()=>{B.on("set-user-detail",u=>{t.value=u,J.value=!1,je({id:t.value.id}).then(({data:o})=>{o.phone=o.mobile+"",delete o.mobile,t.value=Object.assign(u,o),console.log(t.value)}),V(),Z(!0)})}),be(()=>{B.off("set-user-detail")}),(u,o)=>{var Fe,Re,Oe;const T=g("el-avatar"),F=g("el-tag"),b=g("el-button"),ie=g("el-option"),K=g("el-select"),Ae=g("el-cascader"),Be=g("el-image"),fe=g("el-table-column"),qe=g("el-input-number"),Te=g("el-table"),Je=g("el-empty"),Le=g("el-input"),De=g("el-form-item"),Ke=g("el-form"),Me=g("el-dialog"),We=_e("infinite-scroll"),Ge=_e("loading");return i(),k("div",ra,[e("div",ca,[(i(!0),k(X,null,ne(Y.value,(r,oe)=>(i(),k("div",{key:oe,class:le(["nav-item",{"nav-item-active":f.value==oe,"nav-item-radius1":f.value==oe+1,"nav-item-radius2":f.value==oe-1}]),onClick:zt=>f.value=oe},w(r),11,va))),128)),e("div",{class:le(["nav-item",{"nav-item-radius2":f.value==Y.value.length-1}]),style:{flex:"1"}},null,2)]),t.value.id&&f.value==0?(i(),k("div",_a,[e("div",pa,[fa,e("div",ma,[e("div",ya,[ha,e("div",ga,"¥"+w(t.value.now_money),1)]),e("div",ba,[ka,e("div",$a,"¥"+w(t.value.purchase_funds),1)]),e("div",Va,[wa,e("div",Ca,"¥"+w((Fe=t.value.return_money)==null?void 0:Fe.toFixed(2)),1)]),e("div",Sa,[xa,e("div",Ua,[a(T,{style:{width:"4rem",height:"4rem"},src:t.value.avatar},null,8,["src"])])]),e("div",za,[Aa,e("div",La,"¥"+w((Re=t.value.get_frozen)==null?void 0:Re.toFixed(2)),1)]),e("div",Da,[Fa,e("div",Ra,"¥"+w((Oe=t.value.amount_frozen)==null?void 0:Oe.toFixed(2)),1)]),e("div",Oa,[Pa,e("div",Ia,w(t.value.id),1)]),e("div",ja,[Ea,e("div",Na,w(t.value.nickname),1)]),e("div",Ba,[qa,e("div",Ta,w(t.value.phone),1)]),e("div",Ja,[Ka,e("div",Ma,w(t.value.account),1)]),e("div",Wa,[Ga,e("div",Ha,w(t.value.real_name),1)]),e("div",Qa,[Xa,e("div",Ya,w(t.value.create_time),1)]),e("div",Za,[et,e("div",lt,[L.value==!1?(i(),k(X,{key:0},[t.value.user_ship!=1?(i(),R(F,{key:0,type:"primary",size:"large"},{default:s(()=>[m(w(t.value.user_ship_name),1)]),_:1})):(i(),R(F,{key:1,type:"success",size:"large"},{default:s(()=>[m(w(t.value.user_ship_name),1)]),_:1})),t.value.user_ship!=1?(i(),R(b,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:o[0]||(o[0]=r=>L.value=!0)},{default:s(()=>[m("修改")]),_:1})):Q("",!0)],64)):(i(),k(X,{key:1},[a(K,{modelValue:t.value.user_ship,"onUpdate:modelValue":o[1]||(o[1]=r=>t.value.user_ship=r),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:s(()=>[(i(!0),k(X,null,ne(q.value,r=>(i(),R(ie,{key:r.id,label:r.title,value:r.id,disabled:r.id==1||r.id==2||r.id==3},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:M},{default:s(()=>[m("确认")]),_:1}),a(b,{style:{"margin-left":"1rem"},onClick:A},{default:s(()=>[m("取消")]),_:1})],64))])]),t.value.user_ship==1?(i(),k("div",at,[tt,e("div",st,[G.value==!1?(i(),k(X,{key:0},[t.value.label_name?(i(),R(F,{key:0,type:"primary",size:"large"},{default:s(()=>[m(w(t.value.label_name),1)]),_:1})):Q("",!0),t.value.label_name?(i(),R(b,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:o[2]||(o[2]=r=>G.value=!0)},{default:s(()=>[m("修改")]),_:1})):(i(),R(b,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:o[3]||(o[3]=r=>{t.value.label_id="",G.value=!0})},{default:s(()=>[m("添加")]),_:1}))],64)):(i(),k(X,{key:1},[a(K,{modelValue:t.value.label_id,"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.label_id=r),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:s(()=>[(i(!0),k(X,null,ne(H.value,r=>(i(),R(ie,{key:r.label_id,label:r.label_name,value:r.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:ae},{default:s(()=>[m("确认")]),_:1}),a(b,{style:{"margin-left":"1rem"},onClick:de},{default:s(()=>[m("取消")]),_:1})],64))])])):Q("",!0),e("div",ot,[it,(i(),R(Ae,{key:t.value.id,style:{flex:"1"},modelValue:d.value,"onUpdate:modelValue":o[5]||(o[5]=r=>d.value=r),options:D.value,props:x,load:te,class:"w-full",disabled:h.value},null,8,["modelValue","options","disabled"])),h.value?(i(),R(b,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:o[6]||(o[6]=r=>h.value=!1)},{default:s(()=>[m("修改")]),_:1})):Q("",!0),h.value?Q("",!0):(i(),R(b,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:v},{default:s(()=>[m("确认")]),_:1})),h.value?Q("",!0):(i(),R(b,{key:2,style:{"margin-left":"1rem"},onClick:y},{default:s(()=>[m("取消")]),_:1}))])]),nt,e("div",ut,[e("div",dt,[e("div",{class:le(["pay-item",{"pay-item-active":c.value.type==1}]),onClick:o[7]||(o[7]=r=>c.value.type=1)},ct,2),e("div",{class:le(["pay-item",{"pay-item-active":c.value.type==2}]),onClick:o[8]||(o[8]=r=>c.value.type=2)},_t,2),e("div",{class:le(["pay-item",{"pay-item-active":c.value.type==3}]),onClick:o[9]||(o[9]=r=>c.value.type=3)},ft,2),e("div",{class:le(["pay-item",{"pay-item-active":c.value.type==0}]),onClick:o[11]||(o[11]=r=>c.value.type=0)},[ve(e("input",{type:"number",class:"input","onUpdate:modelValue":o[10]||(o[10]=r=>c.value.price=r),placeholder:"自定义金额"},null,512),[[Xe,c.value.price]])],2)]),a(b,{type:"primary",size:"large",class:"pay",onClick:P},{default:s(()=>[m("立即支付")]),_:1})])])])):Q("",!0),t.value.id&&f.value==1?ve((i(),k("div",mt,[ve((i(),k("div",yt,[a(Te,{data:W.value},{default:s(()=>[a(fe,{label:"商品信息"},{default:s(({row:r})=>[e("div",ht,[a(Be,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:r.image},null,8,["src"]),e("span",gt,w(r.store_name),1)])]),_:1}),a(fe,{prop:"price",label:"单价",width:J.value?130:200},null,8,["width"]),a(fe,{prop:"nums",label:"存量",width:J.value?100:200},null,8,["width"]),J.value?(i(),R(fe,{key:0,prop:"nums",label:"出库量",width:"250"},{default:s(({row:r})=>[r.nums?(i(),k("div",bt,[a(qe,{modelValue:r.n_num,"onUpdate:modelValue":oe=>r.n_num=oe,"step-strictly":"",min:0,max:r.nums},null,8,["modelValue","onUpdate:modelValue","max"]),a(b,{type:"primary",style:{"margin-left":"1rem"},onClick:oe=>r.n_num=r.nums},{default:s(()=>[m("全部")]),_:2},1032,["onClick"])])):Q("",!0)]),_:1})):Q("",!0)]),_:1},8,["data"])])),[[We,Z]]),e("div",kt,[J.value?(i(),k("div",Vt,[a(b,{type:"primary",size:"large",onClick:re},{default:s(()=>[m("确认出库")]),_:1}),a(b,{size:"large",onClick:o[13]||(o[13]=r=>J.value=!1)},{default:s(()=>[m("取消")]),_:1})])):(i(),k("div",$t,[a(b,{type:"warning",size:"large",onClick:o[12]||(o[12]=r=>J.value=!0),disabled:W.value.length==0},{default:s(()=>[m("商品出库")]),_:1},8,["disabled"])]))])])),[[Ge,C.value.loading]]):(i(),k("div",wt,[a(Je)])),a(da,{ref_key:"payRef",ref:z,onPaySuccess:p},null,512),a(Me,{modelValue:ee.value,"onUpdate:modelValue":o[17]||(o[17]=r=>ee.value=r),title:"出库验证",width:"500"},{footer:s(()=>[e("div",Ct,[a(b,{onClick:o[16]||(o[16]=r=>ee.value=!1)},{default:s(()=>[m("取消")]),_:1}),a(b,{type:"primary",onClick:_},{default:s(()=>[m(" 确认 ")]),_:1})])]),default:s(()=>[a(Ke,{model:E.value},{default:s(()=>[a(De,{label:"手机号:"},{default:s(()=>[a(Le,{modelValue:E.value.mobile,"onUpdate:modelValue":o[14]||(o[14]=r=>E.value.mobile=r),autocomplete:"off",readonly:""},null,8,["modelValue"])]),_:1}),a(De,{label:"验证码:"},{default:s(()=>[a(Le,{modelValue:E.value.code,"onUpdate:modelValue":o[15]||(o[15]=r=>E.value.code=r),autocomplete:"off",placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),(i(),R(Ne,{style:{"margin-left":"1rem"},onSendCode:l,key:E.value.mobile}))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])])}}},xt=he(St,[["__scopeId","data-v-175f683d"]]),Ut={class:"my-card"},It={__name:"index",setup(S){return(t,c)=>(i(),k("div",Ut,[a(Ol,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),a(dl),a(xt,{ref:"detailRef"},null,512)]))}};export{It as default}; diff --git a/build/assets/index-DGmEWjKM.css b/build/assets/index-BexOAj1q.css similarity index 58% rename from build/assets/index-DGmEWjKM.css rename to build/assets/index-BexOAj1q.css index 2987ca1..9d90c66 100644 --- a/build/assets/index-DGmEWjKM.css +++ b/build/assets/index-BexOAj1q.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-44aa5565]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-44aa5565]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-44aa5565]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-44aa5565]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-44aa5565]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-44aa5565]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-44aa5565]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-44aa5565]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-44aa5565]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-44aa5565]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-44aa5565]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-44aa5565]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-44aa5565]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-44aa5565]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-44aa5565]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-44aa5565]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-44aa5565]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-44aa5565]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-44aa5565]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-44aa5565]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-44aa5565]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-44aa5565]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-44aa5565]{background-color:#efefef}.my-order .load-end[data-v-44aa5565]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-0f1c9a1a]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-0f1c9a1a]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-0f1c9a1a]{padding:1rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-0f1c9a1a]{font-weight:700}.my-order .detail .table .table-info[data-v-0f1c9a1a]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-0f1c9a1a]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-0f1c9a1a]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-0f1c9a1a]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-0f1c9a1a]{position:absolute;bottom:0;left:0;z-index:1;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-97f2bd1d]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden}.my-order .header-nav[data-v-97f2bd1d]{display:flex;flex-direction:column;justify-content:space-between;padding:1rem;height:3.5rem}.my-order .header-nav span[data-v-97f2bd1d]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-97f2bd1d]{font-weight:700}.my-order .header-nav .nav-item-btn[data-v-97f2bd1d]{display:flex;justify-content:space-between;align-items:center}.my-order .header-input[data-v-97f2bd1d]{padding:1rem;padding-top:0;height:2.5rem;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-97f2bd1d]{height:calc(100vh - 16.45rem);overflow-y:auto}.my-order .order-lists .item[data-v-97f2bd1d]{padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-lists .item .top[data-v-97f2bd1d]{display:flex;justify-content:space-between;align-items:flex-end}.my-order .order-lists .item .top .sn[data-v-97f2bd1d]{font-weight:700;font-size:.9rem}.my-order .order-lists .item .top .cahier[data-v-97f2bd1d]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #2ec479;color:#2ec479;border-radius:.187rem}.my-order .order-lists .item .top .cahier2[data-v-97f2bd1d]:before{content:"平台";font-weight:400;font-size:.7rem;padding:.1rem;margin-right:.2rem;border:.0625rem solid #ff4a00;color:#ff4a00;border-radius:.187rem}.my-order .order-lists .item .top .create-time[data-v-97f2bd1d]{font-size:.8rem}.my-order .order-lists .item .shop[data-v-97f2bd1d]{display:flex;justify-content:space-between}.my-order .order-lists .item .shop .right[data-v-97f2bd1d]{flex-shrink:0;display:flex;flex-direction:column;justify-content:center}.my-order .order-lists .item .shop .right .money[data-v-97f2bd1d]{font-size:1rem;color:#ff4a00;font-weight:700}.my-order .order-lists .item .shop .right .count[data-v-97f2bd1d]{font-size:.7rem;color:#999}.my-order .order-lists .item .shop .left[data-v-97f2bd1d]{height:4.5rem;display:flex;align-items:center}.my-order .order-lists .item .shop .left .shop-img[data-v-97f2bd1d]{width:3.5rem;height:3.5rem;border-radius:.3rem;margin-right:.4rem}.my-order .order-lists .item .shop .left .shop-name[data-v-97f2bd1d]{font-size:.9rem;color:#333;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.my-order .order-lists .item .bottom[data-v-97f2bd1d]{display:flex;justify-content:space-between;font-size:.9rem;color:#777}.my-order .order-lists .item .bottom .manage-btn[data-v-97f2bd1d]{color:#fff;background-color:#e6a23c;border-radius:.2rem;padding:0 .2rem;margin-left:.5rem}.my-order .order-lists .item-active[data-v-97f2bd1d]{background-color:#efefef}.my-order .load-end[data-v-97f2bd1d]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-0f1c9a1a]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .detail[data-v-0f1c9a1a]{height:100%;box-sizing:border-box;position:relative}.my-order .detail .table[data-v-0f1c9a1a]{padding:1rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-0f1c9a1a]{font-weight:700}.my-order .detail .table .table-info[data-v-0f1c9a1a]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-0f1c9a1a]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-0f1c9a1a]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .info-item-title[data-v-0f1c9a1a]{flex-shrink:0;padding-right:1rem}.my-order .detail .footer[data-v-0f1c9a1a]{position:absolute;bottom:0;left:0;z-index:1;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-Czc5lk_Z.js b/build/assets/index-BhfJ8Bue.js similarity index 94% rename from build/assets/index-Czc5lk_Z.js rename to build/assets/index-BhfJ8Bue.js index 2c8eb94..676cc47 100644 --- a/build/assets/index-Czc5lk_Z.js +++ b/build/assets/index-BhfJ8Bue.js @@ -1 +1 @@ -import{a as B,b as L}from"./shop-DGLf8liO.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-DFqeFzc7.js";import"./axiosAPI-DiYhnWHW.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{t.value.page_no=1,t.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default}; +import{a as B,b as L}from"./shop-nU50lE2m.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-zqjuu94d.js";import"./axiosAPI-YFghoU-n.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{t.value.page_no=1,t.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default}; diff --git a/build/assets/index-C9r2rUGY.js b/build/assets/index-BmjaLKjF.js similarity index 96% rename from build/assets/index-C9r2rUGY.js rename to build/assets/index-BmjaLKjF.js index 14427fd..abd7d55 100644 --- a/build/assets/index-C9r2rUGY.js +++ b/build/assets/index-BmjaLKjF.js @@ -1 +1 @@ -import{_ as T,u as R,r as y,b as m,c as s,k as p,e as t,t as v,g as _,F as B,l as E,z as j,f as l,w as d,E as $,m as D,q as J,s as q,o as W,a as G,h as L,d as b,p as w,j as N}from"./index-DFqeFzc7.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-CFNc6ZHU.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-BlCym4iJ.js";const z=k=>(J("data-v-e01d9d71"),k=k(),q(),k),ee={class:"my-order"},ae={class:"header-nav"},te=z(()=>t("div",{class:"nav-item"},v("提现"),-1)),le={class:"nav-body"},ne={class:"my-money"},oe=z(()=>t("div",null,"我的余额:",-1)),se={style:{"text-align":"center",color:"#2ec479"}},ie={class:"my-count"},de={class:"count"},_e={class:"money"},re={style:{color:"#ff4a00"}},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ce=["onClick"],ve={style:{color:"#1890ff"}},me={class:"own"},pe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),fe={class:"order-footer"},he={class:"input-btn"},ge={class:"order-btn"},be={__name:"order",setup(k){R();const e=y({balance:0,count:0,total:0}),h=y([]),r=()=>{H().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),h.value=o.data.bank_list,e.value.balance=o.data.balance}),K().then(o=>{e.value=Object.assign(e.value,o.data)})};r();const a=y({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",$.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),r()})};return(o,i)=>{const g=m("el-input"),V=m("el-button");return s(),p("div",ee,[t("div",ae,[te,t("div",le,[t("div",ne,[oe,t("div",se,[t("span",null,v(e.value.balance),1),_("元 ")])]),t("div",ie,[t("div",de,[_("提现次数: "),t("span",null,v(e.value.count),1),_("次")]),t("div",_e,[_("累计提现到账: "),t("span",re,v(e.value.total),1),_("元")])])])]),t("div",ue,[(s(!0),p(B,null,E(h.value,(u,C)=>(s(),p("div",{class:j(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:C,onClick:c=>f(u)},[t("div",null,[_(" 提现至 "),t("span",ve,v(u.bank_name)+"("+v(u.bank_code.slice(-4))+")",1),t("span",me,v(u.is_own==1?"对公":"个人"),1)])],10,ce))),128))]),pe,t("div",fe,[t("div",he,[l(g,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=u=>a.value.amount=u),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(V,{class:"btn",type:"primary",onClick:i[1]||(i[1]=u=>a.value.amount=e.value.balance)},{default:d(()=>[_("全部")]),_:1})]),t("div",ge,[l(V,{class:"btn",type:"primary",onClick:x,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ke=T(be,[["__scopeId","data-v-e01d9d71"]]),ye={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={key:1},Ce={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(k){const e=y({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),h=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()},r=y(1),a=y([]),f=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,r.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,$.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?U(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?U(e.value.start_time[1]).format("YYYY-MM-DD"):"";X({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(g=>{a.value=[...a.value,...g.data.lists],g.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()};return W(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const g=m("el-date-picker"),V=m("el-button"),u=m("el-radio-button"),C=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),Y=m("el-tag"),M=m("el-table"),I=L("loading"),S=L("infinite-scroll");return s(),p("div",ye,[t("div",we,[t("div",null,[r.value==1?(s(),b(g,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:h,clearable:!1},null,8,["modelValue"])):w("",!0),r.value==2?(s(),b(g,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:h,format:"YYYY-MM-DD",clearable:!1},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(C,{modelValue:r.value,"onUpdate:modelValue":i[2]||(i[2]=n=>r.value=n),onChange:x},{default:d(()=>[l(u,{label:"提现记录",value:1}),l(u,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Ve,[r.value==1?N((s(),p("div",Ye,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(c,{prop:"price",label:"银行卡"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.bank_info.name)+" ("+v(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(c,{prop:"amount",label:"提现金额",width:"150"}),l(c,{label:"备注/凭证",width:"200"},{default:d(({row:n})=>[n.arrival_proof?(s(),p("div",$e,[(s(!0),p(B,null,E(JSON.parse(n.arrival_proof),(F,A)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:A,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":A},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),p("div",xe,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(Y,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(Y,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(Y,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(Y,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0),r.value==2?N((s(),p("div",Ce,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"number_sn",label:"订单号",width:"250"}),l(c,{prop:"number",label:"变动金额",width:"180"}),l(c,{prop:"financial_type",label:"变动类型",width:"180"}),l(c,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0)])])}}},ze=T(De,[["__scopeId","data-v-b27fe34a"]]),Me={class:"my-card"},Ne={__name:"index",setup(k){return(e,h)=>(s(),p("div",Me,[l(ke,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(Z),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; +import{_ as T,u as R,r as y,b as m,c as s,k as p,e as t,t as v,g as _,F as B,l as E,z as j,f as l,w as d,E as $,m as D,q as J,s as q,o as W,a as G,h as L,d as b,p as w,j as N}from"./index-zqjuu94d.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-QcOZvzkY.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-SV9GOhiy.js";const z=k=>(J("data-v-e01d9d71"),k=k(),q(),k),ee={class:"my-order"},ae={class:"header-nav"},te=z(()=>t("div",{class:"nav-item"},v("提现"),-1)),le={class:"nav-body"},ne={class:"my-money"},oe=z(()=>t("div",null,"我的余额:",-1)),se={style:{"text-align":"center",color:"#2ec479"}},ie={class:"my-count"},de={class:"count"},_e={class:"money"},re={style:{color:"#ff4a00"}},ue={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ce=["onClick"],ve={style:{color:"#1890ff"}},me={class:"own"},pe=z(()=>t("div",{style:{height:"8.2rem"}},null,-1)),fe={class:"order-footer"},he={class:"input-btn"},ge={class:"order-btn"},be={__name:"order",setup(k){R();const e=y({balance:0,count:0,total:0}),h=y([]),r=()=>{H().then(o=>{o.data.bank_list.forEach(i=>{i.is_check&&(a.value.merchant_bank_id=i.id)}),a.value.merchant_bank_id||(a.value.merchant_bank_id=o.data.bank_list[0].id),h.value=o.data.bank_list,e.value.balance=o.data.balance}),K().then(o=>{e.value=Object.assign(e.value,o.data)})};r();const a=y({merchant_bank_id:"",amount:""}),f=o=>{a.value.merchant_bank_id=o.id},x=()=>{if(a.value.amount=Math.floor(a.value.amount*100)/100,+a.value.amount<=0)return a.value.amount="",$.error("提现金额必须大于0");if(+a.value.amount>+e.value.balance)return a.value.amount=e.value.balance,$.error("提现金额不能大于余额");P(a.value).then(o=>{a.value.amount="",$.success("提现成功,等待管理员审核"),D.emit("get-taking-lists"),r()})};return(o,i)=>{const g=m("el-input"),V=m("el-button");return s(),p("div",ee,[t("div",ae,[te,t("div",le,[t("div",ne,[oe,t("div",se,[t("span",null,v(e.value.balance),1),_("元 ")])]),t("div",ie,[t("div",de,[_("提现次数: "),t("span",null,v(e.value.count),1),_("次")]),t("div",_e,[_("累计提现到账: "),t("span",re,v(e.value.total),1),_("元")])])])]),t("div",ue,[(s(!0),p(B,null,E(h.value,(u,C)=>(s(),p("div",{class:j(["item",{"item-active":a.value.merchant_bank_id==u.id}]),key:C,onClick:c=>f(u)},[t("div",null,[_(" 提现至 "),t("span",ve,v(u.bank_name)+"("+v(u.bank_code.slice(-4))+")",1),t("span",me,v(u.is_own==1?"对公":"个人"),1)])],10,ce))),128))]),pe,t("div",fe,[t("div",he,[l(g,{modelValue:a.value.amount,"onUpdate:modelValue":i[0]||(i[0]=u=>a.value.amount=u),placeholder:"请输入提现金额",type:"number"},null,8,["modelValue"]),l(V,{class:"btn",type:"primary",onClick:i[1]||(i[1]=u=>a.value.amount=e.value.balance)},{default:d(()=>[_("全部")]),_:1})]),t("div",ge,[l(V,{class:"btn",type:"primary",onClick:x,disabled:e.value.balance<=0||h.value.length==0},{default:d(()=>[_("立即提现")]),_:1},8,["disabled"])])])])}}},ke=T(be,[["__scopeId","data-v-e01d9d71"]]),ye={class:"my-order"},we={class:"date"},Ve={class:"detail"},Ye={key:0,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},$e={key:0},xe={key:1},Ce={key:1,class:"table",":infinite-scroll-delay":500,"infinite-scroll-distance":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},De={__name:"detail",setup(k){const e=y({page_no:1,page_size:15,loadend:!1,loading:!1,create_time:"",start_time:""}),h=()=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()},r=y(1),a=y([]),f=()=>{if(console.log("触底",!e.value.loadend,!e.value.loading),!e.value.loadend&&!e.value.loading&&(console.log("加载"),e.value.loading=!0,r.value==1&&Q({page_no:e.value.page_no,page_size:e.value.page_size,create_time:e.value.create_time}).then(o=>{a.value=[...a.value,...o.data.lists],o.data.lists.length=e.value.start_time[1])return e.value.loading=!1,$.error("开始时间不能大于等于结束时间");let o=e.value.start_time[0]?U(e.value.start_time[0]).format("YYYY-MM-DD"):"",i=e.value.start_time[1]?U(e.value.start_time[1]).format("YYYY-MM-DD"):"";X({page_no:e.value.page_no,page_size:e.value.page_size,start_time:o,end_time:i}).then(g=>{a.value=[...a.value,...g.data.lists],g.data.lists.length{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()};return W(()=>{D.on("get-taking-lists",o=>{e.value.page_no=1,e.value.loadend=!1,e.value.loading=!1,a.value=[],f()})}),G(()=>{D.off("get-taking-lists")}),(o,i)=>{const g=m("el-date-picker"),V=m("el-button"),u=m("el-radio-button"),C=m("el-radio-group"),c=m("el-table-column"),O=m("el-image"),Y=m("el-tag"),M=m("el-table"),I=L("loading"),S=L("infinite-scroll");return s(),p("div",ye,[t("div",we,[t("div",null,[r.value==1?(s(),b(g,{key:0,modelValue:e.value.create_time,"onUpdate:modelValue":i[0]||(i[0]=n=>e.value.create_time=n),type:"month",placeholder:"请选择月份",onChange:h,clearable:!1},null,8,["modelValue"])):w("",!0),r.value==2?(s(),b(g,{key:1,modelValue:e.value.start_time,"onUpdate:modelValue":i[1]||(i[1]=n=>e.value.start_time=n),type:"daterange",placeholder:"请选择日期",onChange:h,format:"YYYY-MM-DD",clearable:!1},null,8,["modelValue"])):w("",!0),l(V,{type:"primary",style:{"margin-left":"1rem"}},{default:d(()=>[_("重置")]),_:1})]),l(C,{modelValue:r.value,"onUpdate:modelValue":i[2]||(i[2]=n=>r.value=n),onChange:x},{default:d(()=>[l(u,{label:"提现记录",value:1}),l(u,{label:"余额明细",value:2})]),_:1},8,["modelValue"])]),t("div",Ve,[r.value==1?N((s(),p("div",Ye,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"merchant_bank_info.is_own",label:"账户类型",width:"100"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.is_own?"对公账户":"个人账户"),1)]),_:1}),l(c,{prop:"price",label:"银行卡"},{default:d(({row:n})=>[t("div",null,v(n.merchant_bank_info.bank_info.name)+" ("+v(n.merchant_bank_info.bank_code.slice(-4))+") ",1)]),_:1}),l(c,{prop:"amount",label:"提现金额",width:"150"}),l(c,{label:"备注/凭证",width:"200"},{default:d(({row:n})=>[n.arrival_proof?(s(),p("div",$e,[(s(!0),p(B,null,E(JSON.parse(n.arrival_proof),(F,A)=>(s(),b(O,{style:{width:"3rem",height:"3rem","margin-right":"0.2rem"},key:A,src:F,"preview-src-list":JSON.parse(n.arrival_proof),"initial-index":A},null,8,["src","preview-src-list","initial-index"]))),128))])):(s(),p("div",xe,v(n.fail_msg),1))]),_:1}),l(c,{label:"提现状态",width:"100"},{default:d(({row:n})=>[n.arrival_proof?(s(),b(Y,{key:0,type:"success"},{default:d(()=>[_("已到账")]),_:1})):n.is_check==1?(s(),b(Y,{key:1,type:"primary"},{default:d(()=>[_("待转账")]),_:1})):n.is_check==0?(s(),b(Y,{key:2,type:"info"},{default:d(()=>[_("待审核")]),_:1})):n.is_check==2?(s(),b(Y,{key:3,type:"danger"},{default:d(()=>[_("提现失败")]),_:1})):w("",!0)]),_:1}),l(c,{prop:"create_time",label:"提现时间",width:"200"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0),r.value==2?N((s(),p("div",Ce,[l(M,{data:a.value},{default:d(()=>[l(c,{prop:"number_sn",label:"订单号",width:"250"}),l(c,{prop:"number",label:"变动金额",width:"180"}),l(c,{prop:"financial_type",label:"变动类型",width:"180"}),l(c,{prop:"create_time",label:"时间"})]),_:1},8,["data"])])),[[I,e.value.loading],[S,f]]):w("",!0)])])}}},ze=T(De,[["__scopeId","data-v-b27fe34a"]]),Me={class:"my-card"},Ne={__name:"index",setup(k){return(e,h)=>(s(),p("div",Me,[l(ke,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),l(Z),l(ze,{ref:"detailRef"},null,512)]))}};export{Ne as default}; diff --git a/build/assets/index-DUlLucAb.js b/build/assets/index-C5u_lqxK.js similarity index 84% rename from build/assets/index-DUlLucAb.js rename to build/assets/index-C5u_lqxK.js index 6853fe2..7477531 100644 --- a/build/assets/index-DUlLucAb.js +++ b/build/assets/index-C5u_lqxK.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-DFqeFzc7.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; +import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-zqjuu94d.js";const r={style:{width:"100vw",height:"100vh"}},_={style:{display:"flex","justify-content":"center","padding-top":"20vh"}},m={style:{display:"flex","flex-direction":"column","justify-content":"center","padding-left":"3rem"}},p=e("div",{style:{"font-size":"5rem","font-weight":"bold"}},"404",-1),h=e("div",{style:{"padding-bottom":"1rem"}},"您的页面没有找到",-1),v={__name:"index",setup(f){const s=()=>{window.location="/"};return(y,g)=>{const n=t("el-image"),i=t("el-button");return c(),a("div",r,[e("div",_,[o(n,{loading:"lazy",style:{width:"30rem",height:"20rem"},src:"/src/assets/icon-404-color.svg"}),e("div",m,[p,h,o(i,{type:"primary",onClick:s},{default:d(()=>[l("返回首页")]),_:1})])])])}}};export{v as default}; diff --git a/build/assets/index-Dgq6KP52.js b/build/assets/index-CFuFSk7N.js similarity index 96% rename from build/assets/index-Dgq6KP52.js rename to build/assets/index-CFuFSk7N.js index b52a224..f642de1 100644 --- a/build/assets/index-Dgq6KP52.js +++ b/build/assets/index-CFuFSk7N.js @@ -1 +1 @@ -import{_ as U,u as I,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as L,q as B,s as C,D as E,E as w}from"./index-DFqeFzc7.js";import{l as K}from"./user-Df1_-QkC.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),D={__name:"index",setup(l){const d=I(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(D,[["__scopeId","data-v-f9ff2ce9"]]);export{z as default}; +import{_ as U,u as I,r as u,o as R,b as n,c as S,k as b,e as v,f as e,w as t,i as m,g as L,q as B,s as C,D as E,E as w}from"./index-zqjuu94d.js";import{l as K}from"./user-CILZiEFt.js";const N=l=>(B("data-v-f9ff2ce9"),l=l(),C(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),D={__name:"index",setup(l){const d=I(),y=E(),k=u(null),p=u(null),s=u({account:"",password:"",terminal:1}),_=()=>{if(!s.value.account)return w({message:"请填写账号",type:"error"});if(!s.value.password)return w({message:"请填写密码",type:"error"});K(s.value).then(a=>{var o;(o=a.data)!=null&&o.token&&(d.setToken(a.data.token),d.setUserInfo(a.data),y.push("/"))}).catch(a=>{})};return R(()=>{}),(a,o)=>{const h=n("User"),f=n("el-icon"),i=n("el-input"),c=n("el-form-item"),x=n("Lock"),V=n("el-button"),g=n("el-form");return S(),b("div",M,[v("div",T,[q,e(g,null,{default:t(()=>[e(c,null,{default:t(()=>[e(i,{ref_key:"accRef",ref:k,modelValue:s.value.account,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.account=r),placeholder:"请输入账号",onKeydown:o[1]||(o[1]=m(r=>p.value.focus(),["enter"]))},{prefix:t(()=>[e(f,null,{default:t(()=>[e(h)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(i,{ref_key:"pwdRef",ref:p,modelValue:s.value.password,"onUpdate:modelValue":o[2]||(o[2]=r=>s.value.password=r),type:"password",placeholder:"请输入密码","show-password":"",onKeydown:m(_,["enter"])},{prefix:t(()=>[e(f,null,{default:t(()=>[e(x)]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:t(()=>[e(V,{style:{width:"100%"},type:"primary",onClick:_},{default:t(()=>[L("登录")]),_:1})]),_:1})]),_:1})])])}}},z=U(D,[["__scopeId","data-v-f9ff2ce9"]]);export{z as default}; diff --git a/build/assets/index-DQdoUcCB.js b/build/assets/index-Creb3_PS.js similarity index 98% rename from build/assets/index-DQdoUcCB.js rename to build/assets/index-Creb3_PS.js index cc8e508..e734bda 100644 --- a/build/assets/index-DQdoUcCB.js +++ b/build/assets/index-Creb3_PS.js @@ -1 +1 @@ -import{_ as G,u as H,r as n,o as J,m as S,a as Q,b as v,h as R,c as s,k as o,e,f as d,w as y,g as b,i as te,j as F,F as A,l as E,z as K,t as l,d as j,p as g,q as W,s as X,D as se}from"./index-DFqeFzc7.js";import{s as oe,d as ae}from"./store-pG1SPGrt.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ie}from"./pay-BMjw3Xka.js";import{p as le}from"./padding-BlCym4iJ.js";import"./authCode-DstEoObn.js";/* empty css */const ne=p=>(W("data-v-74a6e87a"),p=p(),X(),p),de={class:"my-order"},_e={class:"header-nav"},ce=ne(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},be={class:"money"},$e={class:"count"},we={class:"bottom"},De={class:"pay"},Se={key:0},Ve={key:1},Ye={key:2},Ce={key:3},xe={key:4},ze={key:5},Pe={key:1,style:{color:"#ff4a00"}},Re={key:0,class:"load-end"},Ie={key:1,class:"load-end"},Me={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(p,{expose:w}){H(),n([]);const t=n(1),f=r=>{_.value.page_no=1,$.value=!1,h.value=!1,c.value=[],k(!0)};n(null);const m=n(""),I=()=>{_.value.start_time=q(m.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=q(m.value[1]).format("YYYY-MM-DD 23:59:59"),k(!0)},V=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),h=n(!1),M=n(0),D=n(0),$=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if($.value||h.value)return;h.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),oe(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&S.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,D.value=0,console.log(_.value.page_no),M.value=i.data.count,h.value=!1}).catch(i=>{$.value=!0,h.value=!1})},L=(r,i)=>{D.value=i,S.emit("set-sale-order-detail",r)};return w({getOrderList:k}),J(()=>{S.on("update-sale-order-detail",r=>{console.log("==="),c.value[D.value].paid=1})}),Q(()=>{S.off("update-sale-order-detail")}),(r,i)=>{const Y=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),C=v("el-input"),x=v("el-image"),z=v("spna"),P=R("loading"),Z=R("infinite-scroll");return s(),o("div",de,[e("div",_e,[ce,e("div",re,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:f,size:"small"},{default:y(()=>[d(Y,{value:1},{default:y(()=>[b("全部")]),_:1}),d(Y,{value:2},{default:y(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=a=>m.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":V,onChange:I,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[d(C,{modelValue:_.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=te(a=>k(!0),["enter"])),onClear:i[5]||(i[5]=a=>k(!0)),clearable:""},{append:y(()=>[d(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>k(!0))},{default:y(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),o("div",ve,[(s(!0),o(A,null,E(c.value,(a,U)=>(s(),o("div",{class:K(["item",{"item-active":D.value==U}]),key:U,onClick:O=>L(a,U)},[e("div",fe,[e("div",{class:K(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",me,l(a.pay_time),1)]),e("div",he,[a.product_info?(s(),o("div",ye,[(s(!0),o(A,null,E(a.product_info.slice(0,5),(O,ee)=>(s(),j(x,{key:ee,src:O.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",ge,l(a.product_info[0].store_name),1)):g("",!0)])):g("",!0),e("div",ke,[e("div",be,"¥"+l(a.pay_price),1),e("div",$e,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[a.paid?(s(),o("div",Se,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(z,{key:0},{default:y(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ve,"(微信收款)")):a.pay_type==17?(s(),o("span",Ye,"(现金支付)")):a.pay_type==13?(s(),o("span",Ce,"(支付宝收款)")):a.pay_type==3?(s(),o("span",xe,"(余额支付)")):a.pay_type==1?(s(),o("span",ze,"(微信支付)")):g("",!0)])):(s(),o("div",Pe,l(a.paid_name),1))])])],10,pe))),128)),$.value?(s(),o("div",Re,"没有更多了")):g("",!0),h.value?(s(),o("div",Ie,"加载中...")):g("",!0)])),[[P,h.value],[Z,k]])])}}},Le=G(Me,[["__scopeId","data-v-74a6e87a"]]),u=p=>(W("data-v-b5c92dd9"),p=p(),X(),p),Be={class:"my-order"},Ne={key:0,class:"detail"},Te={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=u(()=>e("div",{class:"table-title"},"订单信息",-1)),Fe={class:"table-info"},Oe={class:"info-item"},Ae=u(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ee={class:"info-item-info"},Ke={class:"info-item"},je=u(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),qe={class:"info-item-info"},Ge={class:"info-item"},He=u(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=u(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=u(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=u(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=u(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=u(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ct={class:"info-item-info"},rt={key:0},ut={key:1},vt={key:2},pt={key:3},ft={key:4},mt={key:5},ht={key:0,class:"table-title"},yt={key:1,class:"table-info"},gt={class:"info-item"},kt=u(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},$t={class:"info-item"},wt=u(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Dt={class:"info-item-info"},St={class:"info-item"},Vt=u(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Yt={class:"info-item-info"},Ct={style:{"font-size":"0.9rem"}},xt={style:{color:"#ff4a00"}},zt={style:{display:"flex","align-items":"center"}},Pt={style:{"margin-left":"0.5rem"}},Rt=u(()=>e("div",{style:{height:"8rem"}},null,-1)),It={key:0,class:"footer"},Mt={key:1},Lt={__name:"detail",emits:["rePaySuccess"],setup(p,{emit:w}){H(),se();const t=n({id:""});n([]);const f=n(null),m=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const I=()=>{f.value.setForm({isRePay:!0,data:t.value}),f.value.drawer=!0},V=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),h=()=>console.log("触底"),M=()=>{m.value=!0,ae({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{m.value=!1},200)})},D=w,$=(c=null)=>{setTimeout(()=>{D("rePaySuccess")})};return J(()=>{S.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,V.value.page_no=1,V.value.loadend=!1,V.value.loading=!1,_.value=[],M()})}),Q(()=>{S.off("set-sale-order-detail")}),(c,k)=>{var C;const L=v("el-image"),r=v("el-table-column"),i=v("el-table"),Y=v("el-button"),B=v("el-empty"),N=R("infinite-scroll"),T=R("loading");return s(),o("div",Be,[t.value.id?F((s(),o("div",Ne,[F((s(),o("div",Te,[Ue,e("div",Fe,[e("div",Oe,[Ae,e("div",Ee,l(t.value.order_id),1)]),e("div",Ke,[je,e("div",qe,l(t.value.total_num||0),1)]),e("div",Ge,[He,e("div",Je,"¥"+l(t.value.pay_price),1)]),e("div",Qe,[We,e("div",Xe,l(t.value.pay_time),1)]),e("div",Ze,[et,e("div",tt,"¥"+l(t.value.deduction_price),1)]),e("div",st,[ot,e("div",at,"¥"+l(t.value.pay_price),1)]),e("div",it,[lt,e("div",nt,l(t.value.pay_time),1)]),e("div",dt,[_t,e("div",ct,[t.value.pay_type_name?(s(),o("span",rt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",vt,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ft,"余额支付")):t.value.pay_type==1?(s(),o("span",mt,"微信支付")):g("",!0)])])]),t.value.uid?(s(),o("div",ht,"用户信息")):g("",!0),t.value.uid?(s(),o("div",yt,[e("div",gt,[kt,e("div",bt,l(t.value.uid),1)]),e("div",$t,[wt,e("div",Dt,l(t.value.nickname),1)]),e("div",St,[Vt,e("div",Yt,l(t.value.mobile),1)])])):g("",!0),e("div",Ct,[b(" 共计 "),e("span",xt,l(((C=t.value.product)==null?void 0:C.length)||" "),1),b(" 款商品 ")]),d(i,{data:t.value.product},{default:y(()=>[d(r,{label:"商品信息"},{default:y(({row:x})=>{var z,P;return[e("div",zt,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Pt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Rt])),[[N,h]]),t.value.paid?g("",!0):(s(),o("div",It,[d(Y,{type:"primary",size:"large",onClick:I},{default:y(()=>[b("重新支付")]),_:1})]))])),[[T,m.value]]):(s(),o("div",Mt,[d(B)])),d(ie,{ref_key:"payRef",ref:f,onPaySuccess:$},null,512)])}}},Bt=G(Lt,[["__scopeId","data-v-b5c92dd9"]]),Nt={class:"my-card"},jt={__name:"index",setup(p){const w=n(null),t=()=>{var f;(f=w.value)==null||f.getOrderList(!0)};return(f,m)=>(s(),o("div",Nt,[d(Le,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(le),d(Bt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{jt as default}; +import{_ as G,u as H,r as n,o as J,m as S,a as Q,b as v,h as R,c as s,k as o,e,f as d,w as y,g as b,i as te,j as F,F as A,l as E,z as K,t as l,d as j,p as g,q as W,s as X,D as se}from"./index-zqjuu94d.js";import{s as oe,d as ae}from"./store-B9VgAm7I.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ie}from"./pay-Bp1INias.js";import{p as le}from"./padding-SV9GOhiy.js";import"./authCode-ueWhWG4S.js";/* empty css */const ne=p=>(W("data-v-74a6e87a"),p=p(),X(),p),de={class:"my-order"},_e={class:"header-nav"},ce=ne(()=>e("div",{class:"nav-item"},l("收银订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},be={class:"money"},$e={class:"count"},we={class:"bottom"},De={class:"pay"},Se={key:0},Ve={key:1},Ye={key:2},Ce={key:3},xe={key:4},ze={key:5},Pe={key:1,style:{color:"#ff4a00"}},Re={key:0,class:"load-end"},Ie={key:1,class:"load-end"},Me={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(p,{expose:w}){H(),n([]);const t=n(1),f=r=>{_.value.page_no=1,$.value=!1,h.value=!1,c.value=[],k(!0)};n(null);const m=n(""),I=()=>{_.value.start_time=q(m.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=q(m.value[1]).format("YYYY-MM-DD 23:59:59"),k(!0)},V=r=>r.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:1}),h=n(!1),M=n(0),D=n(0),$=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if($.value||h.value)return;h.value=!0,t.value==1&&(_.value.paid=null),t.value==2&&(_.value.paid=0),oe(_.value).then(i=>{r?c.value=i.data.lists:c.value=[...c.value,...i.data.lists],_.value.page_no==1&&c.value.length>0&&S.emit("set-sale-order-detail",c.value[0]),i.data.lists.length<_.value.page_size?$.value=!0:_.value.page_no++,D.value=0,console.log(_.value.page_no),M.value=i.data.count,h.value=!1}).catch(i=>{$.value=!0,h.value=!1})},L=(r,i)=>{D.value=i,S.emit("set-sale-order-detail",r)};return w({getOrderList:k}),J(()=>{S.on("update-sale-order-detail",r=>{console.log("==="),c.value[D.value].paid=1})}),Q(()=>{S.off("update-sale-order-detail")}),(r,i)=>{const Y=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),C=v("el-input"),x=v("el-image"),z=v("spna"),P=R("loading"),Z=R("infinite-scroll");return s(),o("div",de,[e("div",_e,[ce,e("div",re,[d(B,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=a=>t.value=a),onChange:f,size:"small"},{default:y(()=>[d(Y,{value:1},{default:y(()=>[b("全部")]),_:1}),d(Y,{value:2},{default:y(()=>[b("未支付")]),_:1})]),_:1},8,["modelValue"]),d(N,{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=a=>m.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":V,onChange:I,clearable:!1,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ue,[d(C,{modelValue:_.value.order_id,"onUpdate:modelValue":i[3]||(i[3]=a=>_.value.order_id=a),placeholder:"请输入订单编号",onKeydown:i[4]||(i[4]=te(a=>k(!0),["enter"])),onClear:i[5]||(i[5]=a=>k(!0)),clearable:""},{append:y(()=>[d(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:i[2]||(i[2]=a=>k(!0))},{default:y(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),F((s(),o("div",ve,[(s(!0),o(A,null,E(c.value,(a,U)=>(s(),o("div",{class:K(["item",{"item-active":D.value==U}]),key:U,onClick:O=>L(a,U)},[e("div",fe,[e("div",{class:K(["sn","cahier"])},"单号: "+l(a.order_id),1),e("div",me,l(a.pay_time),1)]),e("div",he,[a.product_info?(s(),o("div",ye,[(s(!0),o(A,null,E(a.product_info.slice(0,5),(O,ee)=>(s(),j(x,{key:ee,src:O.image,class:"shop-img"},null,8,["src"]))),128)),a.product_info.length==1?(s(),o("div",ge,l(a.product_info[0].store_name),1)):g("",!0)])):g("",!0),e("div",ke,[e("div",be,"¥"+l(a.pay_price),1),e("div",$e,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[a.paid?(s(),o("div",Se,[b(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(z,{key:0},{default:y(()=>[b("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ve,"(微信收款)")):a.pay_type==17?(s(),o("span",Ye,"(现金支付)")):a.pay_type==13?(s(),o("span",Ce,"(支付宝收款)")):a.pay_type==3?(s(),o("span",xe,"(余额支付)")):a.pay_type==1?(s(),o("span",ze,"(微信支付)")):g("",!0)])):(s(),o("div",Pe,l(a.paid_name),1))])])],10,pe))),128)),$.value?(s(),o("div",Re,"没有更多了")):g("",!0),h.value?(s(),o("div",Ie,"加载中...")):g("",!0)])),[[P,h.value],[Z,k]])])}}},Le=G(Me,[["__scopeId","data-v-74a6e87a"]]),u=p=>(W("data-v-b5c92dd9"),p=p(),X(),p),Be={class:"my-order"},Ne={key:0,class:"detail"},Te={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=u(()=>e("div",{class:"table-title"},"订单信息",-1)),Fe={class:"table-info"},Oe={class:"info-item"},Ae=u(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),Ee={class:"info-item-info"},Ke={class:"info-item"},je=u(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),qe={class:"info-item-info"},Ge={class:"info-item"},He=u(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Je={class:"info-item-info"},Qe={class:"info-item"},We=u(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Xe={class:"info-item-info"},Ze={class:"info-item"},et=u(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),tt={class:"info-item-info"},st={class:"info-item"},ot=u(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},it={class:"info-item"},lt=u(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),nt={class:"info-item-info"},dt={class:"info-item"},_t=u(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ct={class:"info-item-info"},rt={key:0},ut={key:1},vt={key:2},pt={key:3},ft={key:4},mt={key:5},ht={key:0,class:"table-title"},yt={key:1,class:"table-info"},gt={class:"info-item"},kt=u(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},$t={class:"info-item"},wt=u(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Dt={class:"info-item-info"},St={class:"info-item"},Vt=u(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),Yt={class:"info-item-info"},Ct={style:{"font-size":"0.9rem"}},xt={style:{color:"#ff4a00"}},zt={style:{display:"flex","align-items":"center"}},Pt={style:{"margin-left":"0.5rem"}},Rt=u(()=>e("div",{style:{height:"8rem"}},null,-1)),It={key:0,class:"footer"},Mt={key:1},Lt={__name:"detail",emits:["rePaySuccess"],setup(p,{emit:w}){H(),se();const t=n({id:""});n([]);const f=n(null),m=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const I=()=>{f.value.setForm({isRePay:!0,data:t.value}),f.value.drawer=!0},V=n({page_no:1,page_size:15,loadend:!1,loading:!1}),_=n([]),h=()=>console.log("触底"),M=()=>{m.value=!0,ae({id:t.value.id}).then(c=>{t.value=c.data,setTimeout(()=>{m.value=!1},200)})},D=w,$=(c=null)=>{setTimeout(()=>{D("rePaySuccess")})};return J(()=>{S.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,V.value.page_no=1,V.value.loadend=!1,V.value.loading=!1,_.value=[],M()})}),Q(()=>{S.off("set-sale-order-detail")}),(c,k)=>{var C;const L=v("el-image"),r=v("el-table-column"),i=v("el-table"),Y=v("el-button"),B=v("el-empty"),N=R("infinite-scroll"),T=R("loading");return s(),o("div",Be,[t.value.id?F((s(),o("div",Ne,[F((s(),o("div",Te,[Ue,e("div",Fe,[e("div",Oe,[Ae,e("div",Ee,l(t.value.order_id),1)]),e("div",Ke,[je,e("div",qe,l(t.value.total_num||0),1)]),e("div",Ge,[He,e("div",Je,"¥"+l(t.value.pay_price),1)]),e("div",Qe,[We,e("div",Xe,l(t.value.pay_time),1)]),e("div",Ze,[et,e("div",tt,"¥"+l(t.value.deduction_price),1)]),e("div",st,[ot,e("div",at,"¥"+l(t.value.pay_price),1)]),e("div",it,[lt,e("div",nt,l(t.value.pay_time),1)]),e("div",dt,[_t,e("div",ct,[t.value.pay_type_name?(s(),o("span",rt,l(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",vt,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ft,"余额支付")):t.value.pay_type==1?(s(),o("span",mt,"微信支付")):g("",!0)])])]),t.value.uid?(s(),o("div",ht,"用户信息")):g("",!0),t.value.uid?(s(),o("div",yt,[e("div",gt,[kt,e("div",bt,l(t.value.uid),1)]),e("div",$t,[wt,e("div",Dt,l(t.value.nickname),1)]),e("div",St,[Vt,e("div",Yt,l(t.value.mobile),1)])])):g("",!0),e("div",Ct,[b(" 共计 "),e("span",xt,l(((C=t.value.product)==null?void 0:C.length)||" "),1),b(" 款商品 ")]),d(i,{data:t.value.product},{default:y(()=>[d(r,{label:"商品信息"},{default:y(({row:x})=>{var z,P;return[e("div",zt,[d(L,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(z=x.cart_info)==null?void 0:z.image},null,8,["src"]),e("span",Pt,l((P=x.cart_info)==null?void 0:P.name),1)])]}),_:1}),d(r,{prop:"cart_info.price",label:"单价",width:"150"}),d(r,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(r,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Rt])),[[N,h]]),t.value.paid?g("",!0):(s(),o("div",It,[d(Y,{type:"primary",size:"large",onClick:I},{default:y(()=>[b("重新支付")]),_:1})]))])),[[T,m.value]]):(s(),o("div",Mt,[d(B)])),d(ie,{ref_key:"payRef",ref:f,onPaySuccess:$},null,512)])}}},Bt=G(Lt,[["__scopeId","data-v-b5c92dd9"]]),Nt={class:"my-card"},jt={__name:"index",setup(p){const w=n(null),t=()=>{var f;(f=w.value)==null||f.getOrderList(!0)};return(f,m)=>(s(),o("div",Nt,[d(Le,{style:{"flex-shrink":"0"},ref_key:"orderRef",ref:w},null,512),d(le),d(Bt,{ref:"detailRef",onRePaySuccess:t},null,512)]))}};export{jt as default}; diff --git a/build/assets/index-CtWLo4yY.js b/build/assets/index-CtWLo4yY.js new file mode 100644 index 0000000..6ca06ff --- /dev/null +++ b/build/assets/index-CtWLo4yY.js @@ -0,0 +1,27 @@ +import{c as Wp,a as Bp,b as zo,o as Up}from"./store-B9VgAm7I.js";import{_ as lt,r as S,o as Ut,m as re,a as Mt,b as rn,c as W,d as Be,w as dn,e as v,f as U,g as on,t as N,n as ou,E as $t,u as Wr,h as Ft,i as ko,j as lu,k as X,F as Wt,l as Bt,p as ae,q as fu,s as au,v as Pt,x as Mp,y as Pr,z as $r,A as Dp,B as Np,C as Kp}from"./index-zqjuu94d.js";import{u as Gp}from"./user-CILZiEFt.js";import"./moment-Cl4UOzQZ.js";import{p as Ho}from"./padding-SV9GOhiy.js";import"./axiosAPI-YFghoU-n.js";import{m as su,s as Hp}from"./shop-nU50lE2m.js";import{p as zp}from"./pay-Bp1INias.js";import"./authCode-ueWhWG4S.js";/* empty css */const kp={class:"price"},qp={class:"flex"},Vp={style:{margin:"0.625rem","padding-bottom":"40px"}},Zp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Yp={class:"dialog-footer"},Xp={__name:"price",emits:["changeAllPrice"],setup(K,{expose:xn,emit:o}){const T=S(!1),z=S(null),nn=S(0),x=(k=!0,y=0)=>{V.value.nowPrice="",V.value.percentage="",T.value=k,nn.value=y,ou(()=>{setTimeout(()=>{var ln;(ln=z.value)==null||ln.focus()},150)})},V=S({nowPrice:"",percentage:""}),an=k=>{V.value.percentage=(k/nn.value*100).toFixed(2)},cn=k=>{V.value.nowPrice=(nn.value*k/100).toFixed(2)},Q=o,Z=()=>{if(V.value.percentage>100)return V.value.nowPrice="",V.value.percentage="",$t.error("改价金额不能大于当前订单金额");if(V.value.nowPrice<=0)return V.value.nowPrice="",V.value.percentage="",$t.error("金额不能小于0");Q("changeAllPrice",V.value.nowPrice)};xn({show:x,dialogVisible:T});const wn=()=>{T.value&&Z()};return Ut(()=>{re.on("enter",wn)}),Mt(()=>{re.off("enter",wn)}),(k,y)=>{const ln=rn("el-input"),P=rn("el-button"),M=rn("el-dialog");return W(),Be(M,{modelValue:T.value,"onUpdate:modelValue":y[2]||(y[2]=en=>T.value=en),title:"订单改价",width:"650"},{footer:dn(()=>[v("div",Yp,[U(P,{class:"ok-btn",type:"primary",onClick:Z},{default:dn(()=>[on(" 确定 (Enter) ")]),_:1})])]),default:dn(()=>[v("div",kp,[v("div",qp,[U(ln,{ref_key:"priceRef",ref:z,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=en=>V.value.nowPrice=en),type:"number",placeholder:"请输入改价后的价格",onInput:an},{suffix:dn(()=>[on("元")]),_:1},8,["modelValue"]),U(ln,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=en=>V.value.percentage=en),type:"number",placeholder:"请输入比例",onInput:cn},{suffix:dn(()=>[on("%")]),_:1},8,["modelValue"])]),v("div",Vp,[on(" 改价后金额: "),v("span",Zp,"¥"+N(V.value.nowPrice||nn.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Jp=lt(Xp,[["__scopeId","data-v-924edcc0"]]),Qp={class:"check-user-list"},jp={class:"header-input"},ng={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},eg=["onClick"],tg={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},rg={class:"top"},ig={class:"bold"},ug={class:"flex-between"},sg={class:"mr-2"},og={class:"bottom flex",style:{"justify-content":"space-between"}},lg={class:"red"},fg={class:"red"},ag={key:0,class:"load-end"},cg={key:1,class:"load-end"},hg={__name:"userList",emits:["setUser"],setup(K,{expose:xn,emit:o}){Wr();const T=S(!1),z=S({page_no:1,page_size:20,mobile:""}),nn=o,x=S(!1),V=S(0),an=S(!1),cn=S([]),Q=(k=!1)=>{if(k)z.value.page_no=1;else if(an.value||x.value)return;x.value=!0,Gp(z.value).then(y=>{k?cn.value=y.data.lists:cn.value=[...cn.value,...y.data.lists],y.data.lists.length{an.value=!0,x.value=!1})},Z=(k,y)=>{nn("setUser",k),T.value=!1};return xn({open:(k=null)=>{k||(z.value.mobile=""),T.value=!0,Q(!0)}}),(k,y)=>{const ln=rn("el-button"),P=rn("el-input"),M=rn("el-avatar"),en=rn("el-tag"),G=rn("el-dialog"),un=Ft("loading"),hn=Ft("infinite-scroll");return W(),Be(G,{modelValue:T.value,"onUpdate:modelValue":y[4]||(y[4]=Y=>T.value=Y),title:"选择用户",width:"800"},{default:dn(()=>[v("div",Qp,[v("div",jp,[U(P,{modelValue:z.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=Y=>z.value.mobile=Y),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=ko(Y=>Q(!0),["enter"])),onClear:y[3]||(y[3]=Y=>Q(!0)),clearable:""},{append:dn(()=>[U(ln,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=Y=>Q(!0))},{default:dn(()=>[on("搜索")]),_:1})]),_:1},8,["modelValue"])]),lu((W(),X("div",ng,[(W(!0),X(Wt,null,Bt(cn.value,(Y,O)=>(W(),X("div",{class:"item",key:O,onClick:gn=>Z(Y,O)},[U(M,{class:"avatar",src:Y.avatar},null,8,["src"]),v("div",tg,[v("div",rg,[v("div",null,[v("span",ig,N(Y.nickname),1),v("span",null,N(" (ID:"+Y.id+")"),1)]),v("div",ug,[v("div",sg,"手机号: "+N(Y.mobile||Y.account),1),Y.user_ship!=1?(W(),Be(en,{key:0,type:"primary"},{default:dn(()=>[on(N(Y.user_ship_name),1)]),_:2},1024)):(W(),Be(en,{key:1,type:"success"},{default:dn(()=>[on(N(Y.user_ship_name),1)]),_:2},1024))])]),v("div",og,[v("div",null,[on("采购款: "),v("span",lg,N(Y.purchase_funds),1)]),v("div",null,[on("礼品券: "),v("span",fg,N(Y.get_frozen),1)])])])],8,eg))),128)),an.value?(W(),X("div",ag,"没有更多了")):ae("",!0),x.value?(W(),X("div",cg,"加载中...")):ae("",!0)])),[[un,x.value],[hn,Q]])])]),_:1},8,["modelValue"])}}},_g=lt(hg,[["__scopeId","data-v-76a67240"]]),dg=K=>(fu("data-v-e39f74e3"),K=K(),au(),K),pg={class:"my-order"},gg={class:"user-nav"},vg={class:"user-info"},mg={key:0,class:"info"},wg={class:"flex-bewteen"},yg={class:"flex-bewteen",style:{"align-items":"flex-end"}},xg={style:{display:"flex"}},Ag={style:{"margin-right":"0.5rem"}},Ig={style:{color:"#f70"}},Cg={style:{color:"#f70"}},Lg={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Rg={class:"flex-bewteen",style:{width:"100%"}},Sg=dg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),bg={class:"header-nav"},Eg={class:"nav-item"},Tg={class:"order-list"},Og={class:"order-item-info"},Pg={class:"order-item-title"},$g={class:"title"},Fg=["onClick"],Wg={class:"order-item-sku"},Bg={class:"order-item-price"},Ug={class:"order-footer"},Mg={class:"order-total"},Dg={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Ng={class:"total-item",style:{"flex-shrink":"0"}},Kg={style:{"font-size":"1.4rem"}},Gg={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},Hg={style:{"font-size":"0.8rem"}},zg={class:"order-btn"},kg={__name:"order",emits:["goPay","editAttr"],setup(K,{expose:xn,emit:o}){const T=S([]),z=S(0),nn=S(0),x=S(0);Wr();const V=S(null),an=()=>{let I=[];T.value.map(sn=>{I.push(sn.id)}),I.length!=0&&Q(I)},cn=I=>{T.value=T.value.filter(sn=>sn.id!=I),Q([I])},Q=I=>{Wp({id:I}).then(sn=>{wn()})},Z=S({}),wn=()=>{z.value=0,nn.value=0,x.value=0,Bp().then(I=>{var sn;Z.value=I.data.extend,T.value=I.data.lists||[],(sn=Z.value)!=null&&sn.pay_price||(G.value.uid="")})};wn();const k=o,y=()=>{k("goPay")},ln=(I,sn)=>{zo({product_id:I.product_id,cart_num:I.cart_num}).then(bn=>{wn()}).catch(bn=>{var $n;let Kn=($n=bn==null?void 0:bn.msg)==null?void 0:$n.match(/\b\d+(\.\d+)?\b/);Kn?I.cart_num=+Kn[0]:I.cart_num=1})},P=I=>{x.value=nn.value-I,z.value=+I,ou(()=>{setTimeout(()=>{en(!1)},150)})};S(0);const M=S(null),en=(I=!0)=>{M.value.show(I,nn.value)},G=S({uid:""}),un=I=>{G.value=I,G.value.uid=I.id},hn=S(!1);xn({getList:wn,resetView:()=>{hn.value=!1,wn()},list:T,discounts:x,allPrice:z,userInfo:G,is_storage:hn});const O=()=>{M.value.dialogVisible?M.value.dialogVisible=!1:en()},gn=()=>{T.value.length>0&&an()};return Ut(()=>{re.on("insert",O),re.on("delete",gn)}),Mt(()=>{re.off("insert",O),re.off("delete",gn)}),(I,sn)=>{const bn=rn("el-avatar"),Kn=rn("ArrowRight"),$n=rn("el-icon"),ce=rn("el-button"),Br=rn("RefreshLeft"),Ur=rn("Delete"),ge=rn("el-empty"),he=rn("el-image"),Mr=rn("el-input-number");return W(),X("div",pg,[v("div",gg,[v("div",vg,[U(bn,{class:"avatar",src:G.value.avatar},null,8,["src"]),G.value.uid?(W(),X("div",mg,[v("div",wg,[v("div",null,"手机号: "+N(G.value.mobile||G.value.account),1),U(ce,{type:"primary",link:"",class:"change-user",onClick:sn[0]||(sn[0]=Rn=>V.value.open(G.value.uid))},{default:dn(()=>[on("切换用户"),U($n,null,{default:dn(()=>[U(Kn)]),_:1})]),_:1})]),v("div",yg,[v("div",xg,[v("div",Ag,[on("采购款: "),v("span",Ig,N(G.value.purchase_funds),1)]),v("div",null,[on("礼品券: "),v("span",Cg,N(G.value.get_frozen),1)])]),U(ce,{link:"",onClick:sn[1]||(sn[1]=Rn=>G.value.uid="")},{default:dn(()=>[on("重置"),U($n,null,{default:dn(()=>[U(Br)]),_:1})]),_:1})])])):(W(),X("div",Lg,[v("div",Rg,[Sg,U(ce,{type:"primary",link:"",class:"change-user",onClick:sn[2]||(sn[2]=Rn=>V.value.open())},{default:dn(()=>[on("切换用户"),U($n,null,{default:dn(()=>[U(Kn)]),_:1})]),_:1})])]))]),U(_g,{ref_key:"userListRef",ref:V,onSetUser:un},null,512)]),v("div",bg,[v("div",Eg,[on(" 已选购 "),v("span",null,N(T.value.length),1),on(" 款 ")]),v("div",{class:"nav-item-clear",onClick:an},[U($n,null,{default:dn(()=>[U(Ur)]),_:1}),on("清空 (Delete) ")])]),v("div",Tg,[T.value.length==0?(W(),Be(ge,{key:0,description:"请点击右侧添加商品"})):(W(!0),X(Wt,{key:1},Bt(T.value,(Rn,Zn)=>(W(),X("div",{class:"order-item",key:Zn},[U(he,{loading:"lazy",class:"order-item-img",src:Rn.image},null,8,["src"]),v("div",Og,[v("div",Pg,[v("div",$g,N(Rn.store_name),1),v("div",{class:"delete",onClick:ft=>cn(Rn.id)},"删除",8,Fg)]),v("div",Wg,[v("span",null,N(Rn.unit_name),1)]),v("div",Bg,[v("div",null,[on(" ¥"),v("span",null,N(Rn.price),1)]),v("div",null,[U(Mr,{modelValue:Rn.cart_num,"onUpdate:modelValue":ft=>Rn.cart_num=ft,min:+Rn.batch>0?+Rn.batch:1,step:1,"step-strictly":"",onChange:ft=>ln(Rn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Ug,[v("div",Mg,[v("div",Dg,[v("div",Ng,[on(" 合计: "),v("span",null,[on("¥"),v("span",Kg,N(Z.value.pay_price||"0.00"),1)])]),Z.value.msg?(W(),X("div",Gg,[v("span",Hg,N(Z.value.msg),1)])):ae("",!0)])]),v("div",zg,[U(ce,{class:"btn",type:"primary",onClick:y,disabled:T.value.length==0},{default:dn(()=>[on(N("立即结账 (F9)"))]),_:1},8,["disabled"])])]),U(Jp,{ref_key:"priceRef",ref:M,onChangeAllPrice:P},null,512)])}}},qg=lt(kg,[["__scopeId","data-v-e39f74e3"]]);var Fr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Fr.exports;(function(K,xn){(function(){var o,T="4.17.21",z=200,nn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",V="Invalid `variable` option passed into `_.template`",an="__lodash_hash_undefined__",cn=500,Q="__lodash_placeholder__",Z=1,wn=2,k=4,y=1,ln=2,P=1,M=2,en=4,G=8,un=16,hn=32,Y=64,O=128,gn=256,I=512,sn=30,bn="...",Kn=800,$n=16,ce=1,Br=2,Ur=3,ge=1/0,he=9007199254740991,Mr=17976931348623157e292,Rn=NaN,Zn=4294967295,ft=Zn-1,Vo=Zn>>>1,Zo=[["ary",O],["bind",P],["bindKey",M],["curry",G],["curryRight",un],["flip",I],["partial",hn],["partialRight",Y],["rearg",gn]],qe="[object Arguments]",Nt="[object Array]",Yo="[object AsyncFunction]",at="[object Boolean]",ct="[object Date]",Xo="[object DOMException]",Kt="[object Error]",Gt="[object Function]",cu="[object GeneratorFunction]",ie="[object Map]",ht="[object Number]",Jo="[object Null]",ve="[object Object]",hu="[object Promise]",Qo="[object Proxy]",_t="[object RegExp]",ue="[object Set]",dt="[object String]",Ht="[object Symbol]",jo="[object Undefined]",pt="[object WeakMap]",nl="[object WeakSet]",gt="[object ArrayBuffer]",Ve="[object DataView]",Dr="[object Float32Array]",Nr="[object Float64Array]",Kr="[object Int8Array]",Gr="[object Int16Array]",Hr="[object Int32Array]",zr="[object Uint8Array]",kr="[object Uint8ClampedArray]",qr="[object Uint16Array]",Vr="[object Uint32Array]",el=/\b__p \+= '';/g,tl=/\b(__p \+=) '' \+/g,rl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_u=/&(?:amp|lt|gt|quot|#39);/g,du=/[&<>"']/g,il=RegExp(_u.source),ul=RegExp(du.source),sl=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,pu=/<%=([\s\S]+?)%>/g,ll=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fl=/^\w*$/,al=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/[\\^$.*+?()[\]{}|]/g,cl=RegExp(Zr.source),Yr=/^\s+/,hl=/\s/,_l=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dl=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,gl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vl=/[()=,{}\[\]\/\s]/,ml=/\\(\\)?/g,wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gu=/\w*$/,yl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,Al=/^\[object .+?Constructor\]$/,Il=/^0o[0-7]+$/i,Cl=/^(?:0|[1-9]\d*)$/,Ll=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zt=/($^)/,Rl=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Sl="\\u0300-\\u036f",bl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",vu=Sl+bl+El,mu="\\u2700-\\u27bf",wu="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",Ol="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pl="\\u2000-\\u206f",$l=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yu="A-Z\\xc0-\\xd6\\xd8-\\xde",xu="\\ufe0e\\ufe0f",Au=Tl+Ol+Pl+$l,Xr="['’]",Fl="["+kt+"]",Iu="["+Au+"]",qt="["+vu+"]",Cu="\\d+",Wl="["+mu+"]",Lu="["+wu+"]",Ru="[^"+kt+Au+Cu+mu+wu+yu+"]",Jr="\\ud83c[\\udffb-\\udfff]",Bl="(?:"+qt+"|"+Jr+")",Su="[^"+kt+"]",Qr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ze="["+yu+"]",bu="\\u200d",Eu="(?:"+Lu+"|"+Ru+")",Ul="(?:"+Ze+"|"+Ru+")",Tu="(?:"+Xr+"(?:d|ll|m|re|s|t|ve))?",Ou="(?:"+Xr+"(?:D|LL|M|RE|S|T|VE))?",Pu=Bl+"?",$u="["+xu+"]?",Ml="(?:"+bu+"(?:"+[Su,Qr,jr].join("|")+")"+$u+Pu+")*",Dl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fu=$u+Pu+Ml,Kl="(?:"+[Wl,Qr,jr].join("|")+")"+Fu,Gl="(?:"+[Su+qt+"?",qt,Qr,jr,Fl].join("|")+")",Hl=RegExp(Xr,"g"),zl=RegExp(qt,"g"),ni=RegExp(Jr+"(?="+Jr+")|"+Gl+Fu,"g"),kl=RegExp([Ze+"?"+Lu+"+"+Tu+"(?="+[Iu,Ze,"$"].join("|")+")",Ul+"+"+Ou+"(?="+[Iu,Ze+Eu,"$"].join("|")+")",Ze+"?"+Eu+"+"+Tu,Ze+"+"+Ou,Nl,Dl,Cu,Kl].join("|"),"g"),ql=RegExp("["+bu+kt+vu+xu+"]"),Vl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yl=-1,pn={};pn[Dr]=pn[Nr]=pn[Kr]=pn[Gr]=pn[Hr]=pn[zr]=pn[kr]=pn[qr]=pn[Vr]=!0,pn[qe]=pn[Nt]=pn[gt]=pn[at]=pn[Ve]=pn[ct]=pn[Kt]=pn[Gt]=pn[ie]=pn[ht]=pn[ve]=pn[_t]=pn[ue]=pn[dt]=pn[pt]=!1;var _n={};_n[qe]=_n[Nt]=_n[gt]=_n[Ve]=_n[at]=_n[ct]=_n[Dr]=_n[Nr]=_n[Kr]=_n[Gr]=_n[Hr]=_n[ie]=_n[ht]=_n[ve]=_n[_t]=_n[ue]=_n[dt]=_n[Ht]=_n[zr]=_n[kr]=_n[qr]=_n[Vr]=!0,_n[Kt]=_n[Gt]=_n[pt]=!1;var Xl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Jl={"&":"&","<":"<",">":">",'"':""","'":"'"},Ql={"&":"&","<":"<",">":">",""":'"',"'":"'"},jl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nf=parseFloat,ef=parseInt,Wu=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,tf=typeof self=="object"&&self&&self.Object===Object&&self,En=Wu||tf||Function("return this")(),ei=xn&&!xn.nodeType&&xn,Ue=ei&&!0&&K&&!K.nodeType&&K,Bu=Ue&&Ue.exports===ei,ti=Bu&&Wu.process,Yn=function(){try{var a=Ue&&Ue.require&&Ue.require("util").types;return a||ti&&ti.binding&&ti.binding("util")}catch{}}(),Uu=Yn&&Yn.isArrayBuffer,Mu=Yn&&Yn.isDate,Du=Yn&&Yn.isMap,Nu=Yn&&Yn.isRegExp,Ku=Yn&&Yn.isSet,Gu=Yn&&Yn.isTypedArray;function Gn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function rf(a,_,h,w){for(var b=-1,J=a==null?0:a.length;++b-1}function ri(a,_,h){for(var w=-1,b=a==null?0:a.length;++w-1;);return h}function Xu(a,_){for(var h=a.length;h--&&Ye(_,a[h],0)>-1;);return h}function _f(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var df=oi(Xl),pf=oi(Jl);function gf(a){return"\\"+jl[a]}function vf(a,_){return a==null?o:a[_]}function Xe(a){return ql.test(a)}function mf(a){return Vl.test(a)}function wf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function ci(a){var _=-1,h=Array(a.size);return a.forEach(function(w,b){h[++_]=[b,w]}),h}function Ju(a,_){return function(h){return a(_(h))}}function Ee(a,_){for(var h=-1,w=a.length,b=0,J=[];++h-1}function sa(n,e){var t=this.__data__,r=ar(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}me.prototype.clear=ta,me.prototype.delete=ra,me.prototype.get=ia,me.prototype.has=ua,me.prototype.set=sa;function we(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function jn(n,e,t,r,i,s){var l,f=e&Z,c=e&wn,d=e&k;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!mn(n))return n;var p=E(n);if(p){if(l=ac(n),!f)return Un(n,l)}else{var g=Pn(n),m=g==Gt||g==cu;if(We(n))return $s(n,f);if(g==ve||g==qe||m&&!i){if(l=c||m?{}:Qs(n),!f)return c?ja(n,Aa(l,n)):Qa(n,fs(l,n))}else{if(!_n[g])return i?n:{};l=cc(n,g,f)}}s||(s=new oe);var A=s.get(n);if(A)return A;s.set(n,l),bo(n)?n.forEach(function(R){l.add(jn(R,e,t,R,n,s))}):Ro(n)&&n.forEach(function(R,D){l.set(D,jn(R,e,t,D,n,s))});var L=d?c?Ui:Bi:c?Dn:Sn,F=p?o:L(n);return Xn(F||n,function(R,D){F&&(D=R,R=n[D]),It(l,D,jn(R,e,t,D,n,s))}),l}function Ia(n){var e=Sn(n);return function(t){return as(t,n,e)}}function as(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function cs(n,e,t){if(typeof n!="function")throw new Jn(x);return Tt(function(){n.apply(o,t)},e)}function Ct(n,e,t,r){var i=-1,s=Vt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=vn(e,Hn(t))),r?(s=ri,l=!1):e.length>=z&&(s=vt,l=!1,e=new Ne(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:$(r),r<0&&(r+=i),r=t>r?0:To(r);t0&&t(f)?e>1?Tn(f,e-1,t,r,i):be(i,f):r||(i[i.length]=f)}return i}var mi=Ds(),ds=Ds(!0);function _e(n,e){return n&&mi(n,e,Sn)}function wi(n,e){return n&&ds(n,e,Sn)}function hr(n,e){return Se(e,function(t){return Ce(n[t])})}function Ge(n,e){e=$e(e,n);for(var t=0,r=e.length;n!=null&&te}function Ra(n,e){return n!=null&&tn.call(n,e)}function Sa(n,e){return n!=null&&e in fn(n)}function ba(n,e,t){return n>=On(e,t)&&n=120&&p.length>=120)?new Ne(l&&p):o}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&rr.call(f,c,1),rr.call(n,c,1);return n}function Ls(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ie(i)?rr.call(n,i,1):Ei(n,i)}}return n}function Ri(n,e){return n+sr(us()*(e-n+1))}function Ka(n,e,t,r){for(var i=-1,s=Ln(ur((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function Si(n,e){var t="";if(!n||e<1||e>he)return t;do e%2&&(t+=n),e=sr(e/2),e&&(n+=n);while(e);return t}function B(n,e){return zi(eo(n,e,Nn),n+"")}function Ga(n){return ls(ot(n))}function Ha(n,e){var t=ot(n);return Ir(t,Ke(e,0,t.length))}function St(n,e,t,r){if(!mn(n))return n;e=$e(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=z){var d=e?null:rc(n);if(d)return Yt(d);l=!1,i=vt,c=new Ne}else c=e?[]:f;n:for(;++r=r?n:ne(n,e,t)}var Ps=Ff||function(n){return En.clearTimeout(n)};function $s(n,e){if(e)return n.slice();var t=n.length,r=ns?ns(t):new n.constructor(t);return n.copy(r),r}function $i(n){var e=new n.constructor(n.byteLength);return new er(e).set(new er(n)),e}function Za(n,e){var t=e?$i(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Ya(n){var e=new n.constructor(n.source,gu.exec(n));return e.lastIndex=n.lastIndex,e}function Xa(n){return At?fn(At.call(n)):{}}function Fs(n,e){var t=e?$i(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Ws(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,d=kn(e);if(!f&&!d&&!s&&n>e||s&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Bs(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,d=Ln(s-l,0),p=h(c+d),g=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Wn(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=fn(e);++r-1?i[s?e[l]:l]:o}}function Gs(n){return Ae(function(e){var t=e.length,r=t,i=Qn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Jn(x);if(i&&!l&&xr(s)=="wrapper")var l=new Qn([],!0)}for(r=l?r:t;++r1&&q.reverse(),p&&cf))return!1;var d=s.get(n),p=s.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,A=t&ln?new Ne:o;for(s.set(n,e),s.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(_l,`{ +/* [wrapped with `+e+`] */ +`)}function _c(n){return E(n)||ke(n)||!!(rs&&n&&n[rs])}function Ie(n,e){var t=typeof n;return e=e??he,!!e&&(t=="number"||t!="symbol"&&Cl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Kn)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Ir(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,_o(n,t)});function po(n){var e=u(n);return e.__chain__=!0,e}function Ch(n,e){return e(n),n}function Cr(n,e){return e(n)}var Lh=Ae(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return vi(s,n)};return e>1||this.__actions__.length||!(r instanceof H)||!Ie(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Cr,args:[i],thisArg:o}),new Qn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Rh(){return po(this)}function Sh(){return new Qn(this.value(),this.__chain__)}function bh(){this.__values__===o&&(this.__values__=Eo(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Eh(){return this}function Th(n){for(var e,t=this;t instanceof fr;){var r=oo(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Oh(){var n=this.__wrapped__;if(n instanceof H){var e=n;return this.__actions__.length&&(e=new H(this)),e=e.reverse(),e.__actions__.push({func:Cr,args:[ki],thisArg:o}),new Qn(e,this.__chain__)}return this.thru(ki)}function Ph(){return Ts(this.__wrapped__,this.__actions__)}var $h=gr(function(n,e,t){tn.call(n,t)?++n[t]:ye(n,t,1)});function Fh(n,e,t){var r=E(n)?Hu:Ca;return t&&Wn(n,e,t)&&(e=o),r(n,C(e,3))}function Wh(n,e){var t=E(n)?Se:_s;return t(n,C(e,3))}var Bh=Ks(lo),Uh=Ks(fo);function Mh(n,e){return Tn(Lr(n,e),1)}function Dh(n,e){return Tn(Lr(n,e),ge)}function Nh(n,e,t){return t=t===o?1:$(t),Tn(Lr(n,e),t)}function go(n,e){var t=E(n)?Xn:Oe;return t(n,C(e,3))}function vo(n,e){var t=E(n)?uf:hs;return t(n,C(e,3))}var Kh=gr(function(n,e,t){tn.call(n,t)?n[t].push(e):ye(n,t,[e])});function Gh(n,e,t,r){n=Mn(n)?n:ot(n),t=t&&!r?$(t):0;var i=n.length;return t<0&&(t=Ln(i+t,0)),Tr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Ye(n,e,t)>-1}var Hh=B(function(n,e,t){var r=-1,i=typeof e=="function",s=Mn(n)?h(n.length):[];return Oe(n,function(l){s[++r]=i?Gn(e,l,t):Lt(l,e,t)}),s}),zh=gr(function(n,e,t){ye(n,t,e)});function Lr(n,e){var t=E(n)?vn:ws;return t(n,C(e,3))}function kh(n,e,t,r){return n==null?[]:(E(e)||(e=e==null?[]:[e]),t=r?o:t,E(t)||(t=t==null?[]:[t]),Is(n,e,t))}var qh=gr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Vh(n,e,t){var r=E(n)?ii:Vu,i=arguments.length<3;return r(n,C(e,4),t,i,Oe)}function Zh(n,e,t){var r=E(n)?sf:Vu,i=arguments.length<3;return r(n,C(e,4),t,i,hs)}function Yh(n,e){var t=E(n)?Se:_s;return t(n,br(C(e,3)))}function Xh(n){var e=E(n)?ls:Ga;return e(n)}function Jh(n,e,t){(t?Wn(n,e,t):e===o)?e=1:e=$(e);var r=E(n)?wa:Ha;return r(n,e)}function Qh(n){var e=E(n)?ya:ka;return e(n)}function jh(n){if(n==null)return 0;if(Mn(n))return Tr(n)?Je(n):n.length;var e=Pn(n);return e==ie||e==ue?n.size:Ii(n).length}function n_(n,e,t){var r=E(n)?ui:qa;return t&&Wn(n,e,t)&&(e=o),r(n,C(e,3))}var e_=B(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Wn(n,e[0],e[1])?e=[]:t>2&&Wn(e[0],e[1],e[2])&&(e=[e[0]]),Is(n,Tn(e,1),[])}),Rr=Wf||function(){return En.Date.now()};function t_(n,e){if(typeof e!="function")throw new Jn(x);return n=$(n),function(){if(--n<1)return e.apply(this,arguments)}}function mo(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,xe(n,O,o,o,o,o,e)}function wo(n,e){var t;if(typeof e!="function")throw new Jn(x);return n=$(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Vi=B(function(n,e,t){var r=P;if(t.length){var i=Ee(t,ut(Vi));r|=hn}return xe(n,r,e,t,i)}),yo=B(function(n,e,t){var r=P|M;if(t.length){var i=Ee(t,ut(yo));r|=hn}return xe(e,r,n,t,i)});function xo(n,e,t){e=t?o:e;var r=xe(n,G,o,o,o,o,o,e);return r.placeholder=xo.placeholder,r}function Ao(n,e,t){e=t?o:e;var r=xe(n,un,o,o,o,o,o,e);return r.placeholder=Ao.placeholder,r}function Io(n,e,t){var r,i,s,l,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new Jn(x);e=te(e)||0,mn(t)&&(p=!!t.leading,g="maxWait"in t,s=g?Ln(te(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function A(In){var fe=r,Re=i;return r=i=o,d=In,l=n.apply(Re,fe),l}function L(In){return d=In,f=Tt(D,e),p?A(In):l}function F(In){var fe=In-c,Re=In-d,Go=e-fe;return g?On(Go,s-Re):Go}function R(In){var fe=In-c,Re=In-d;return c===o||fe>=e||fe<0||g&&Re>=s}function D(){var In=Rr();if(R(In))return q(In);f=Tt(D,F(In))}function q(In){return f=o,m&&r?A(In):(r=i=o,l)}function qn(){f!==o&&Ps(f),d=0,r=c=i=f=o}function Bn(){return f===o?l:q(Rr())}function Vn(){var In=Rr(),fe=R(In);if(r=arguments,i=this,c=In,fe){if(f===o)return L(c);if(g)return Ps(f),f=Tt(D,e),A(c)}return f===o&&(f=Tt(D,e)),l}return Vn.cancel=qn,Vn.flush=Bn,Vn}var r_=B(function(n,e){return cs(n,1,e)}),i_=B(function(n,e,t){return cs(n,te(e)||0,t)});function u_(n){return xe(n,I)}function Sr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Jn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(Sr.Cache||we),t}Sr.Cache=we;function br(n){if(typeof n!="function")throw new Jn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function s_(n){return wo(2,n)}var o_=Va(function(n,e){e=e.length==1&&E(e[0])?vn(e[0],Hn(C())):vn(Tn(e,1),Hn(C()));var t=e.length;return B(function(r){for(var i=-1,s=On(r.length,t);++i=e}),ke=gs(function(){return arguments}())?gs:function(n){return yn(n)&&tn.call(n,"callee")&&!ts.call(n,"callee")},E=h.isArray,A_=Uu?Hn(Uu):Ta;function Mn(n){return n!=null&&Er(n.length)&&!Ce(n)}function An(n){return yn(n)&&Mn(n)}function I_(n){return n===!0||n===!1||yn(n)&&Fn(n)==at}var We=Uf||uu,C_=Mu?Hn(Mu):Oa;function L_(n){return yn(n)&&n.nodeType===1&&!Ot(n)}function R_(n){if(n==null)return!0;if(Mn(n)&&(E(n)||typeof n=="string"||typeof n.splice=="function"||We(n)||st(n)||ke(n)))return!n.length;var e=Pn(n);if(e==ie||e==ue)return!n.size;if(Et(n))return!Ii(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function S_(n,e){return Rt(n,e)}function b_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Rt(n,e,o,t):!!r}function Yi(n){if(!yn(n))return!1;var e=Fn(n);return e==Kt||e==Xo||typeof n.message=="string"&&typeof n.name=="string"&&!Ot(n)}function E_(n){return typeof n=="number"&&is(n)}function Ce(n){if(!mn(n))return!1;var e=Fn(n);return e==Gt||e==cu||e==Yo||e==Qo}function Lo(n){return typeof n=="number"&&n==$(n)}function Er(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=he}function mn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function yn(n){return n!=null&&typeof n=="object"}var Ro=Du?Hn(Du):$a;function T_(n,e){return n===e||Ai(n,e,Di(e))}function O_(n,e,t){return t=typeof t=="function"?t:o,Ai(n,e,Di(e),t)}function P_(n){return So(n)&&n!=+n}function $_(n){if(gc(n))throw new b(nn);return vs(n)}function F_(n){return n===null}function W_(n){return n==null}function So(n){return typeof n=="number"||yn(n)&&Fn(n)==ht}function Ot(n){if(!yn(n)||Fn(n)!=ve)return!1;var e=tr(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Qt.call(t)==Of}var Xi=Nu?Hn(Nu):Fa;function B_(n){return Lo(n)&&n>=-he&&n<=he}var bo=Ku?Hn(Ku):Wa;function Tr(n){return typeof n=="string"||!E(n)&&yn(n)&&Fn(n)==dt}function kn(n){return typeof n=="symbol"||yn(n)&&Fn(n)==Ht}var st=Gu?Hn(Gu):Ba;function U_(n){return n===o}function M_(n){return yn(n)&&Pn(n)==pt}function D_(n){return yn(n)&&Fn(n)==nl}var N_=yr(Ci),K_=yr(function(n,e){return n<=e});function Eo(n){if(!n)return[];if(Mn(n))return Tr(n)?se(n):Un(n);if(mt&&n[mt])return wf(n[mt]());var e=Pn(n),t=e==ie?ci:e==ue?Yt:ot;return t(n)}function Le(n){if(!n)return n===0?n:0;if(n=te(n),n===ge||n===-ge){var e=n<0?-1:1;return e*Mr}return n===n?n:0}function $(n){var e=Le(n),t=e%1;return e===e?t?e-t:e:0}function To(n){return n?Ke($(n),0,Zn):0}function te(n){if(typeof n=="number")return n;if(kn(n))return Rn;if(mn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=mn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Zu(n);var t=xl.test(n);return t||Il.test(n)?ef(n.slice(2),t?2:8):yl.test(n)?Rn:+n}function Oo(n){return de(n,Dn(n))}function G_(n){return n?Ke($(n),-he,he):n===0?n:0}function j(n){return n==null?"":zn(n)}var H_=rt(function(n,e){if(Et(e)||Mn(e)){de(e,Sn(e),n);return}for(var t in e)tn.call(e,t)&&It(n,t,e[t])}),Po=rt(function(n,e){de(e,Dn(e),n)}),Or=rt(function(n,e,t,r){de(e,Dn(e),n,r)}),z_=rt(function(n,e,t,r){de(e,Sn(e),n,r)}),k_=Ae(vi);function q_(n,e){var t=tt(n);return e==null?t:fs(t,e)}var V_=B(function(n,e){n=fn(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Wn(e[0],e[1],i)&&(r=1);++t1),s}),de(n,Ui(n),t),r&&(t=jn(t,Z|wn|k,ic));for(var i=e.length;i--;)Ei(t,e[i]);return t});function cd(n,e){return Fo(n,br(C(e)))}var hd=Ae(function(n,e){return n==null?{}:Da(n,e)});function Fo(n,e){if(n==null)return{};var t=vn(Ui(n),function(r){return[r]});return e=C(e),Cs(n,t,function(r,i){return e(r,i[0])})}function _d(n,e,t){e=$e(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=us();return On(n+i*(e-n+nf("1e-"+((i+"").length-1))),e)}return Ri(n,e)}var Cd=it(function(n,e,t){return e=e.toLowerCase(),n+(t?Uo(e):e)});function Uo(n){return ji(j(n).toLowerCase())}function Mo(n){return n=j(n),n&&n.replace(Ll,df).replace(zl,"")}function Ld(n,e,t){n=j(n),e=zn(e);var r=n.length;t=t===o?r:Ke($(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Rd(n){return n=j(n),n&&ul.test(n)?n.replace(du,pf):n}function Sd(n){return n=j(n),n&&cl.test(n)?n.replace(Zr,"\\$&"):n}var bd=it(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ed=it(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Td=Ns("toLowerCase");function Od(n,e,t){n=j(n),e=$(e);var r=e?Je(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return wr(sr(i),t)+n+wr(ur(i),t)}function Pd(n,e,t){n=j(n),e=$(e);var r=e?Je(n):0;return e&&r>>0,t?(n=j(n),n&&(typeof e=="string"||e!=null&&!Xi(e))&&(e=zn(e),!e&&Xe(n))?Fe(se(n),0,t):n.split(e,t)):[]}var Dd=it(function(n,e,t){return n+(t?" ":"")+ji(e)});function Nd(n,e,t){return n=j(n),t=t==null?0:Ke($(t),0,n.length),e=zn(e),n.slice(t,t+e.length)==e}function Kd(n,e,t){var r=u.templateSettings;t&&Wn(n,e,t)&&(e=o),n=j(n),e=Or({},e,r,Vs);var i=Or({},e.imports,r.imports,Vs),s=Sn(i),l=ai(i,s),f,c,d=0,p=e.interpolate||zt,g="__p += '",m=hi((e.escape||zt).source+"|"+p.source+"|"+(p===pu?wl:zt).source+"|"+(e.evaluate||zt).source+"|$","g"),A="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yl+"]")+` +`;n.replace(m,function(R,D,q,qn,Bn,Vn){return q||(q=qn),g+=n.slice(d,Vn).replace(Rl,gf),D&&(f=!0,g+=`' + +__e(`+D+`) + +'`),Bn&&(c=!0,g+=`'; +`+Bn+`; +__p += '`),q&&(g+=`' + +((__t = (`+q+`)) == null ? '' : __t) + +'`),d=Vn+R.length,R}),g+=`'; +`;var L=tn.call(e,"variable")&&e.variable;if(!L)g=`with (obj) { +`+g+` +} +`;else if(vl.test(L))throw new b(V);g=(c?g.replace(el,""):g).replace(tl,"$1").replace(rl,"$1;"),g="function("+(L||"obj")+`) { +`+(L?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+g+`return __p +}`;var F=No(function(){return J(s,A+"return "+g).apply(o,l)});if(F.source=g,Yi(F))throw F;return F}function Gd(n){return j(n).toLowerCase()}function Hd(n){return j(n).toUpperCase()}function zd(n,e,t){if(n=j(n),n&&(t||e===o))return Zu(n);if(!n||!(e=zn(e)))return n;var r=se(n),i=se(e),s=Yu(r,i),l=Xu(r,i)+1;return Fe(r,s,l).join("")}function kd(n,e,t){if(n=j(n),n&&(t||e===o))return n.slice(0,Qu(n)+1);if(!n||!(e=zn(e)))return n;var r=se(n),i=Xu(r,se(e))+1;return Fe(r,0,i).join("")}function qd(n,e,t){if(n=j(n),n&&(t||e===o))return n.replace(Yr,"");if(!n||!(e=zn(e)))return n;var r=se(n),i=Yu(r,se(e));return Fe(r,i).join("")}function Vd(n,e){var t=sn,r=bn;if(mn(e)){var i="separator"in e?e.separator:i;t="length"in e?$(e.length):t,r="omission"in e?zn(e.omission):r}n=j(n);var s=n.length;if(Xe(n)){var l=se(n);s=l.length}if(t>=s)return n;var f=t-Je(r);if(f<1)return r;var c=l?Fe(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),Xi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=hi(i.source,j(gu.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===o?f:g)}}else if(n.indexOf(zn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Zd(n){return n=j(n),n&&il.test(n)?n.replace(_u,If):n}var Yd=it(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),ji=Ns("toUpperCase");function Do(n,e,t){return n=j(n),e=t?o:e,e===o?mf(n)?Rf(n):ff(n):n.match(e)||[]}var No=B(function(n,e){try{return Gn(n,o,e)}catch(t){return Yi(t)?t:new b(t)}}),Xd=Ae(function(n,e){return Xn(e,function(t){t=pe(t),ye(n,t,Vi(n[t],n))}),n});function Jd(n){var e=n==null?0:n.length,t=C();return n=e?vn(n,function(r){if(typeof r[1]!="function")throw new Jn(x);return[t(r[0]),r[1]]}):[],B(function(r){for(var i=-1;++ihe)return[];var t=Zn,r=On(n,Zn);e=C(e),n-=Zn;for(var i=fi(r,e);++t0||e<0)?new H(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=$(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},H.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},H.prototype.toArray=function(){return this.take(Zn)},_e(H.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof H,d=f[0],p=c||E(l),g=function(D){var q=i.apply(u,be([D],f));return r&&m?q[0]:q};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,A=!!this.__actions__.length,L=s&&!m,F=c&&!A;if(!s&&p){l=F?l:new H(this);var R=n.apply(l,f);return R.__actions__.push({func:Cr,args:[g],thisArg:o}),new Qn(R,m)}return L&&F?n.apply(this,f):(R=this.thru(g),L?r?R.value()[0]:R.value():R)})}),Xn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Xt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(E(s)?s:[],i)}return this[t](function(l){return e.apply(E(l)?l:[],i)})}}),_e(H.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";tn.call(et,r)||(et[r]=[]),et[r].push({name:e,func:t})}}),et[vr(o,M).name]=[{name:"wrapper",func:o}],H.prototype.clone=Zf,H.prototype.reverse=Yf,H.prototype.value=Xf,u.prototype.at=Lh,u.prototype.chain=Rh,u.prototype.commit=Sh,u.prototype.next=bh,u.prototype.plant=Th,u.prototype.reverse=Oh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Ph,u.prototype.first=u.prototype.head,mt&&(u.prototype[mt]=Eh),u},Qe=Sf();Ue?((Ue.exports=Qe)._=Qe,ei._=Qe):En._=Qe}).call(Pt)})(Fr,Fr.exports);var Vg=Fr.exports;const Zg=Mp(Vg),Dt=K=>(fu("data-v-7d75d07a"),K=K(),au(),K),Yg={class:"my-order"},Xg=Dt(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Jg={class:"nav-item-input"},Qg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},jg=["onClick"],nv={class:"shop-name"},ev={key:0,class:"shop-price"},tv=Dt(()=>v("span",{class:"unit-name"},"活动价:",-1)),rv={key:0,class:"unit-name"},iv={key:1,class:"shop-price"},uv=Dt(()=>v("span",{class:"unit-name"},"原价: ",-1)),sv={class:"unit-name del"},ov={key:2,class:"shop-price"},lv={class:"unit-name"},fv={key:3,class:"no-stock"},av=Dt(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),cv=[av],hv={key:4,class:"no-stock"},_v=Dt(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),dv=[_v],pv={key:1,class:"no-data"},gv={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(K,{expose:xn,emit:o}){const T=S(null),z=o,nn=S(""),x=()=>{z("loadMore",{store_name_code:nn.value})},V=y=>{if(y.is_used==0)return $t.error("该商品已被平台关闭");if(y.stock==0)return $t.warning("该商品无库存");z("changeItem",y)},an=Zg.throttle(()=>{let y={store_name:nn.value};z("getStoreList",y,!0)},300);xn({name:nn,inputBlur:()=>{var y;(y=T.value)==null||y.blur()}});const Q=S(!1),Z=()=>{Q.value=!0},wn=()=>{Q.value=!1},k=()=>{var y;(y=T.value)==null||y.focus()};return Ut(()=>{ou(()=>{var y;(y=T.value)==null||y.focus(),Z()}),re.on("shift",k)}),Mt(()=>{re.off("shift",k)}),(y,ln)=>{const P=rn("el-input"),M=rn("Search"),en=rn("el-icon"),G=rn("el-button"),un=rn("el-image"),hn=rn("el-space"),Y=rn("el-empty"),O=Ft("loading"),gn=Ft("infinite-scroll");return W(),X("div",Yg,[v("div",{class:$r(["header-nav",{"input-focus":Q.value}])},[Xg,v("div",Jg,[U(P,{modelValue:nn.value,"onUpdate:modelValue":ln[0]||(ln[0]=I=>nn.value=I),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:T,onFocus:Z,onBlur:wn,onKeyup:ko(Pr(an),["enter"]),onClear:Pr(an)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:ln[1]||(ln[1]=(...I)=>Pr(an)&&Pr(an)(...I))},[U(G,{class:"btn",type:"primary"},{default:dn(()=>[U(en,null,{default:dn(()=>[U(M)]),_:1})]),_:1})])],2),lu((W(),X("div",Qg,[K.storeList.length?(W(),Be(hn,{key:0,wrap:"",size:14},{default:dn(()=>[(W(!0),X(Wt,null,Bt(K.storeList,(I,sn)=>(W(),X("div",{class:"shop-item",key:sn,onClick:bn=>V(I)},[U(un,{loading:"lazy",src:I.image},null,8,["src"]),v("div",nv,N(I.store_name),1),K.priceKey.off_activity==1?(W(),X("div",ev,[tv,on(" ¥"),v("span",null,N(I[K.priceKey.price]),1),I.unit_name?(W(),X("span",rv,"/"+N(I.unit_name),1)):ae("",!0)])):ae("",!0),K.priceKey.off_activity==1?(W(),X("div",iv,[uv,on(),v("span",sv,"¥"+N(I[K.priceKey.op_price])+" /"+N(I.unit_name),1)])):(W(),X("div",ov,[on(" ¥"),v("span",null,N(I[K.priceKey.op_price]),1),v("span",lv,"/"+N(I.unit_name),1)])),I.stock==0?(W(),X("div",fv,cv)):ae("",!0),I.is_used==0?(W(),X("div",hv,dv)):ae("",!0)],8,jg))),128))]),_:1})):ae("",!0),K.storeList.length?ae("",!0):(W(),X("div",pv,[U(Y,{"image-size":200,description:"没有找到对应商品"})]))])),[[O,K.loading],[gn,x]])])}}},vv=lt(gv,[["__scopeId","data-v-7d75d07a"]]),qo=K=>(fu("data-v-6c040b11"),K=K(),au(),K),mv={class:"shop"},wv={class:"shop-info"},yv={class:"shop-info-left"},xv={class:"shop-info-right"},Av={class:"shop-info-right-top"},Iv={key:0,class:"shop-info-right-price"},Cv=qo(()=>v("span",{class:"unit-name"},"活动价:",-1)),Lv={key:0,class:"unit-name"},Rv={key:1,class:"shop-info-right-price"},Sv=qo(()=>v("span",{class:"unit-name"},"原价: ",-1)),bv={class:"unit-name del"},Ev={key:2,class:"shop-info-right-price"},Tv={class:"unit-name"},Ov={class:"shop-sku"},Pv={class:"title"},$v={class:"sku"},Fv={class:"dialog-footer"},Wv={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(K,{expose:xn,emit:o}){const T=S(!1),z=S(null),nn=k=>{T.value=k},x=S({}),V=S(!1),an=S("add"),cn=(k,y="add")=>{an.value=y,x.value=JSON.parse(JSON.stringify(k))},Q=o,Z=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),Q("changeItem",x.value),T.value=!1};xn({show:nn,setForm:cn});const wn=()=>{T.value&&Z()};return Ut(()=>{re.on("enter",wn)}),Mt(()=>{re.off("enter",wn)}),(k,y)=>{const ln=rn("el-image"),P=rn("el-input-number"),M=rn("el-button"),en=rn("el-dialog"),G=Ft("loading");return W(),Be(en,{modelValue:T.value,"onUpdate:modelValue":y[1]||(y[1]=un=>T.value=un),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=un=>z.value.focus())},Dp({default:dn(()=>[lu((W(),X("div",mv,[v("div",wv,[v("div",yv,[U(ln,{loading:"lazy",src:x.value.image},null,8,["src"])]),v("div",xv,[v("div",Av,N(x.value.store_name),1),v("div",null,[K.priceKey.off_activity==1?(W(),X("div",Iv,[Cv,on(" ¥"),v("span",null,N(x.value[K.priceKey.price]),1),x.value.unit_name?(W(),X("span",Lv,"/"+N(x.value.unit_name),1)):ae("",!0)])):ae("",!0),K.priceKey.off_activity==1?(W(),X("div",Rv,[Sv,on(),v("span",bv,"¥"+N(x.value[K.priceKey.op_price])+" /"+N(x.value.unit_name),1)])):(W(),X("div",Ev,[on(" ¥"),v("span",null,N(x.value[K.priceKey.op_price]),1),v("span",Tv,"/"+N(x.value.unit_name),1)]))])])]),v("div",Ov,[v("div",Pv,"购买数量 ( "+N(x.value.unit_name)+" )",1),v("div",$v,[U(P,{ref_key:"inputRef",ref:z,modelValue:x.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=un=>x.value.cart_num=un),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[G,V.value]])]),_:2},[an.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:dn(()=>[v("div",Fv,[U(M,{class:"ok-btn",type:"primary",onClick:Z},{default:dn(()=>[on(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Bv=lt(Wv,[["__scopeId","data-v-6c040b11"]]),Uv=["onClick","onMousemove"],Mv=["onMousemove"],Dv={class:"title"},Nv={class:"list"},Kv=["onClick"],Gv={__name:"classify",emits:["getStoreList"],setup(K,{emit:xn}){const o=xn,T=S([]),z=S([]),nn=S([]),x=S(-1),V=S(-1),an=S(-1),cn=S(-1),Q=S(!1),Z=Wr();(()=>{su({pid:0,page_no:1,page_size:30,level:1,store_id:Z.userInfo.store_id}).then(P=>{T.value=P.data.lists,x.value=-1})})();const k=P=>{su({pid:P,page_no:1,page_size:30,level:2,store_id:Z.userInfo.store_id}).then(M=>{z.value=M.data.lists})},y=P=>{su({pid:P,page_no:1,page_size:30,level:3,store_id:Z.userInfo.store_id}).then(M=>{nn.value=M.data.lists})},ln=(P=-1,M=1)=>{cn.value=P,Q.value=!0;let en="";console.log(P,M),M==1?(x.value=P,V.value=-1,an.value=-1,P!=-1&&(en=T.value[P].id),k(en),o("getStoreList",{top_cate_id:en,two_cate_id:null},!0)):M==2&&(V.value=P,an.value=-1,P!=-1&&(en=z.value[P].id),y(en),o("getStoreList",{two_cate_id:en},!0))};return(P,M)=>{const en=rn("el-popover");return W(),X("div",{class:"classify",onMouseout:M[2]||(M[2]=G=>Q.value?Q.value=!1:Q.value=!0)},[v("div",{class:$r(["itemP",{"itemP-active":x.value==-1}]),onClick:M[0]||(M[0]=G=>ln(-1))},N("全部"),2),(W(!0),X(Wt,null,Bt(T.value,(G,un)=>(W(),Be(en,{placement:"left",width:"20rem",trigger:"click",key:un,visible:un==x.value&&cn.value==un},{reference:dn(()=>[v("div",{class:$r(["itemP",{"itemP-active":un==x.value}]),onClick:hn=>ln(un),onMousemove:hn=>cn.value=un},N(G.name),43,Uv)]),default:dn(()=>[v("div",{class:"active-card",onMouseout:M[1]||(M[1]=hn=>cn.value=-1),onMousemove:hn=>cn.value=un},[v("div",Dv,N(G.name),1),v("div",Nv,[(W(!0),X(Wt,null,Bt(z.value,(hn,Y)=>(W(),X("div",{class:$r({"list-active":Y==V.value}),link:"",type:"primary",key:hn.id,onClick:O=>ln(Y,2)},N(hn.name),11,Kv))),128))])],40,Mv)]),_:2},1032,["visible"]))),128))],32)}}},Hv=lt(Gv,[["__scopeId","data-v-4d5623b0"]]),zv={class:"my-card"},e1={__name:"index",setup(K){const xn=S(null),o=S(null),T=S(null),z=S(null),nn=S([]),x=Np({off_activity:"",op_price:"",price:""}),V=Wr(),an=Kp(),cn=S({page_no:1,page_size:30}),Q=S(!1),Z=(O={},gn=!1)=>{var I;cn.value={...cn.value,...O},gn&&(nn.value=[],cn.value.page_no=1,wn.value=!1),Q.value=!0,Hp({...cn.value,store_id:(I=V.userInfo)==null?void 0:I.store_id}).then(sn=>{var bn,Kn;Q.value=!1;for(let $n in sn.data.extend)x[$n]=sn.data.extend[$n];((Kn=(bn=sn.data)==null?void 0:bn.lists)==null?void 0:Kn.length){wn.value||Z(O)};function y(O){return/^\d+$/.test(O)}const ln=(O,gn="")=>{console.log(O,gn);let I={product_id:O.product_id,cart_num:O.cart_num};zo(I).then(sn=>{o.value.getList()})},P=(O,gn)=>{xn.value.setForm(O,"add"),xn.value.show(!0)},M=O=>{xn.value.setForm(O,"edit"),xn.value.show(!0)},en=S({}),G=()=>{var I,sn;let O=o.value.list.map(bn=>bn.id),gn={cart_id:O,uid:((sn=(I=o.value)==null?void 0:I.userInfo)==null?void 0:sn.uid)||""};o.value.discounts>0&&(gn.deduction_price=o.value.discounts.toFixed(2),gn.pay_type="micropay"),Up(gn).then(bn=>{var Kn,$n,ce;en.value=bn.data.order,z.value.setForm({data:bn.data.order,cart_id:O,uid:(($n=(Kn=o.value)==null?void 0:Kn.userInfo)==null?void 0:$n.uid)||"",is_storage:(ce=o.value)!=null&&ce.is_storage?1:0})})},un=()=>{var O,gn,I;if((O=o.value)!=null&&O.is_storage&&!((I=(gn=o.value)==null?void 0:gn.userInfo)!=null&&I.uid))return $t.error("选择用户才可以存货");G(),z.value.drawer=!0},hn=(O=null)=>{setTimeout(()=>{o.value.resetView()})},Y=()=>{an.name=="saleHome"&&(!z.value.drawer&&o.value.list.length>0?un():z.value.beforeClose())};return Ut(()=>{Z(),re.on("F9",Y)}),Mt(()=>{re.off("F9",Y)}),(O,gn)=>(W(),X("div",zv,[U(qg,{ref_key:"orderRef",ref:o,onGoPay:un,onEditPupop:M},null,512),U(Ho),U(vv,{ref_key:"shopRef",ref:T,style:{flex:"1"},storeList:nn.value,priceKey:x,loading:Q.value,onGetStoreList:Z,onChangeItem:P,onLoadMore:k},null,8,["storeList","priceKey","loading"]),U(Bv,{ref_key:"pupopRef",ref:xn,priceKey:x,onChangeItem:ln},null,8,["priceKey"]),U(Ho),U(Hv,{ref:"classifyRef",onGetStoreList:Z},null,512),U(zp,{ref_key:"payRef",ref:z,onPaySuccess:hn},null,512)]))}};export{e1 as default}; diff --git a/build/assets/index-C8Yyi5Ew.css b/build/assets/index-DUGURfAc.css similarity index 61% rename from build/assets/index-C8Yyi5Ew.css rename to build/assets/index-DUGURfAc.css index e24f02b..ad104fc 100644 --- a/build/assets/index-C8Yyi5Ew.css +++ b/build/assets/index-DUGURfAc.css @@ -1 +1 @@ -@charset "UTF-8";.my-order[data-v-5773e463]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-5773e463]{display:flex;justify-content:space-between;padding:1rem}.my-order .header-nav span[data-v-5773e463]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-5773e463]{font-weight:700}.my-order .header-row[data-v-5773e463]{display:flex;padding:0 1rem 1rem;align-items:center}.my-order .header-row .label[data-v-5773e463]{flex-shrink:0;margin-right:1rem;font-size:.9rem}.my-order .header-input[data-v-5773e463]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-5773e463]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-5773e463]{padding:1rem;border-bottom:.0625rem solid #eee;display:flex}.my-order .order-lists .item .avatar[data-v-5773e463]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.my-order .order-lists .item .flex[data-v-5773e463]{display:flex;flex-wrap:wrap}.my-order .order-lists .item .bold[data-v-5773e463]{font-weight:700}.my-order .order-lists .item .r-1[data-v-5773e463]{margin-right:1rem}.my-order .order-lists .item .bottom>div[data-v-5773e463]{margin-left:.5rem}.my-order .order-lists .item .red[data-v-5773e463]{color:#ff4a00}.my-order .order-lists .item-active[data-v-5773e463]{background-color:#efefef}.my-order .load-end[data-v-5773e463]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.dra-body[data-v-a725bf38]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-a725bf38]{width:25rem;display:flex}.dra-body .header>div[data-v-a725bf38]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-a725bf38]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-a725bf38]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-a725bf38]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-a725bf38]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-a725bf38]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-a725bf38]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-a725bf38]{width:100%;overflow-x:hidden}.counter[data-v-a725bf38]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-a725bf38]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-a725bf38]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-a725bf38]{color:#ff4a00}.counter .balance .tips[data-v-a725bf38]{font-size:.8rem;color:#999}.counter .keypad[data-v-a725bf38]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-a725bf38]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-a725bf38]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-a725bf38]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-a725bf38]:focus{box-shadow:none}.counter .keypad .enter[data-v-a725bf38]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-a725bf38]{background-color:#ccc}.my-order[data-v-c277bb87]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-c277bb87]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-c277bb87]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-c277bb87]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-c277bb87]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-c277bb87]{border-radius:0 0 0 1rem}.my-order .detail[data-v-c277bb87]{height:calc(100% - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-c277bb87]{padding:1rem 1rem 7rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-c277bb87]{font-weight:700}.my-order .detail .table .table-title .tips[data-v-c277bb87]{font-weight:400;color:#999;font-size:.8rem;margin-left:1rem}.my-order .detail .table .table-info[data-v-c277bb87]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-c277bb87]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-c277bb87]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .red[data-v-c277bb87]{color:#ff4a00}.my-order .detail .table .table-info .info-item .info-item-title[data-v-c277bb87]{flex-shrink:0;padding-right:1rem}.my-order .detail .table .table-info .pay-btn[data-v-c277bb87]{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.my-order .detail .table .table-info .pay-btn .pay-item[data-v-c277bb87]{flex:1;min-width:10rem;margin:1rem .5rem 0;height:5rem;background-color:#67c23a1a;color:#67c23a;border-radius:1rem;border:.125rem solid #67c23a;cursor:pointer;font-size:1.5rem;display:flex;justify-content:center;align-items:center}.my-order .detail .table .table-info .pay-btn .pay-item .input[data-v-c277bb87]{font-size:1.5rem;width:100%;height:100%;text-align:center;color:#67c23a}.my-order .detail .table .table-info .pay-btn .pay-item-active[data-v-c277bb87]{background-color:#67c23a;color:#fff}.my-order .detail .table .table-info .pay-btn .pay-item-active .input[data-v-c277bb87]{color:#fff}.my-order .detail .table .table-info .pay[data-v-c277bb87]{width:100%;border-radius:3rem;margin:.5rem}.my-order .detail .footer[data-v-c277bb87]{position:absolute;z-index:1000;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-order input[type=number][data-v-c277bb87]{border:none;padding:0;background-color:transparent;outline:none;-webkit-text-fill-color:inherit;-webkit-appearance:none;box-shadow:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.my-order[data-v-4cf0061b]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-4cf0061b]{display:flex;justify-content:space-between;padding:1rem}.my-order .header-nav span[data-v-4cf0061b]{color:#ff4a00}.my-order .header-nav .nav-item[data-v-4cf0061b]{font-weight:700}.my-order .header-row[data-v-4cf0061b]{display:flex;padding:0 1rem 1rem;align-items:center}.my-order .header-row .label[data-v-4cf0061b]{flex-shrink:0;margin-right:1rem;font-size:.9rem}.my-order .header-input[data-v-4cf0061b]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.my-order .order-lists[data-v-4cf0061b]{flex:1;overflow-y:auto}.my-order .order-lists .item[data-v-4cf0061b]{padding:1rem;border-bottom:.0625rem solid #eee;display:flex}.my-order .order-lists .item .avatar[data-v-4cf0061b]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.my-order .order-lists .item .flex[data-v-4cf0061b]{display:flex;flex-wrap:wrap}.my-order .order-lists .item .bold[data-v-4cf0061b]{font-weight:700}.my-order .order-lists .item .r-1[data-v-4cf0061b]{margin-right:1rem}.my-order .order-lists .item .bottom>div[data-v-4cf0061b]{margin-left:.5rem}.my-order .order-lists .item .red[data-v-4cf0061b]{color:#ff4a00}.my-order .order-lists .item-active[data-v-4cf0061b]{background-color:#efefef}.my-order .load-end[data-v-4cf0061b]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.dra-body[data-v-a725bf38]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-a725bf38]{width:25rem;display:flex}.dra-body .header>div[data-v-a725bf38]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-a725bf38]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-a725bf38]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-a725bf38]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-a725bf38]{width:100%;height:3rem}.dra-body .card1 .tips[data-v-a725bf38]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.cancel-btn[data-v-a725bf38]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-a725bf38]{width:100%;overflow-x:hidden}.counter[data-v-a725bf38]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-a725bf38]{height:3rem;padding:0 1.25rem;border:.0625rem solid #1890ff;box-shadow:0 0 .18rem #1890ff;border-radius:.5rem;background-color:#fff;font-size:1.62rem;line-height:3rem;color:#333}.counter .balance[data-v-a725bf38]{width:100%;box-sizing:border-box;padding:1.12rem 0 1.12rem .625rem;text-align:start;font-size:.95rem;color:#303133;display:flex;justify-content:space-between}.counter .balance .money[data-v-a725bf38]{color:#ff4a00}.counter .balance .tips[data-v-a725bf38]{font-size:.8rem;color:#999}.counter .keypad[data-v-a725bf38]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-a725bf38]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-a725bf38]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-a725bf38]{height:3.875rem;width:8.125rem;margin:0!important;border:0;border-radius:.5rem;font-weight:500;font-size:1.75rem!important;line-height:3.87rem;color:#1890ff}.counter .keypad .el-button[data-v-a725bf38]:focus{box-shadow:none}.counter .keypad .enter[data-v-a725bf38]{grid-row-end:span 4;height:8.37rem;line-height:8.37rem;background-color:#1890ff;font-weight:500;font-size:1.35rem!important;color:#fff;position:relative}.counter .keypad .enter-disable[data-v-a725bf38]{background-color:#ccc}.my-order[data-v-175f683d]{border-radius:1.2rem;height:100%;flex:1;background-color:#fff;position:relative;overflow:hidden}.my-order .header-nav[data-v-175f683d]{display:flex;background:linear-gradient(to bottom,#f5f5f5 50%,#fff 50%)}.my-order .header-nav .nav-item[data-v-175f683d]{height:4rem;width:8rem;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:1.2rem;background-color:#f5f5f5;border-radius:1rem 1rem 0 0}.my-order .header-nav .nav-item-active[data-v-175f683d]{background-color:#fff;position:relative;transition:.3s}.my-order .header-nav .nav-item-radius1[data-v-175f683d]{border-radius:0 0 1rem}.my-order .header-nav .nav-item-radius2[data-v-175f683d]{border-radius:0 0 0 1rem}.my-order .detail[data-v-175f683d]{height:calc(100% - 4rem);box-sizing:border-box;position:relative}.my-order .detail .table[data-v-175f683d]{padding:1rem 1rem 7rem;box-sizing:border-box;overflow-y:auto;height:100%}.my-order .detail .table .table-title[data-v-175f683d]{font-weight:700}.my-order .detail .table .table-title .tips[data-v-175f683d]{font-weight:400;color:#999;font-size:.8rem;margin-left:1rem}.my-order .detail .table .table-info[data-v-175f683d]{display:flex;flex-wrap:wrap;color:#777;font-size:.9rem;padding-bottom:1rem;margin-bottom:1rem;border-bottom:.0625rem solid #eee}.my-order .detail .table .table-info[data-v-175f683d]:last-child{border-bottom:none}.my-order .detail .table .table-info .info-item[data-v-175f683d]{width:33%;display:flex;padding-top:1rem}.my-order .detail .table .table-info .info-item .red[data-v-175f683d]{color:#ff4a00}.my-order .detail .table .table-info .info-item .info-item-title[data-v-175f683d]{flex-shrink:0;padding-right:1rem}.my-order .detail .table .table-info .pay-btn[data-v-175f683d]{width:100%;display:flex;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}.my-order .detail .table .table-info .pay-btn .pay-item[data-v-175f683d]{flex:1;min-width:10rem;margin:1rem .5rem 0;height:5rem;background-color:#67c23a1a;color:#67c23a;border-radius:1rem;border:.125rem solid #67c23a;cursor:pointer;font-size:1.5rem;display:flex;justify-content:center;align-items:center}.my-order .detail .table .table-info .pay-btn .pay-item .input[data-v-175f683d]{font-size:1.5rem;width:100%;height:100%;text-align:center;color:#67c23a}.my-order .detail .table .table-info .pay-btn .pay-item-active[data-v-175f683d]{background-color:#67c23a;color:#fff}.my-order .detail .table .table-info .pay-btn .pay-item-active .input[data-v-175f683d]{color:#fff}.my-order .detail .table .table-info .pay[data-v-175f683d]{width:100%;border-radius:3rem;margin:.5rem}.my-order .detail .footer[data-v-175f683d]{position:absolute;z-index:1000;bottom:0;left:0;width:100%;height:6rem;box-sizing:border-box;background-color:#fff;display:flex;justify-content:flex-end;align-items:center;padding:0 2rem;border-top:.0625rem solid #eee}.my-order input[type=number][data-v-175f683d]{border:none;padding:0;background-color:transparent;outline:none;-webkit-text-fill-color:inherit;-webkit-appearance:none;box-shadow:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-BKWr8hGk.css b/build/assets/index-Dc36t-bR.css similarity index 81% rename from build/assets/index-BKWr8hGk.css rename to build/assets/index-Dc36t-bR.css index d0d7e16..f5ac407 100644 --- a/build/assets/index-BKWr8hGk.css +++ b/build/assets/index-Dc36t-bR.css @@ -1 +1 @@ -@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-76a67240]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-76a67240]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-76a67240]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-76a67240]{font-weight:700}.check-user-list .header-input[data-v-76a67240]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-76a67240]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-76a67240]{width:45%;height:6rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-76a67240]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-76a67240]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-76a67240]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-76a67240]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-76a67240]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-76a67240]{flex:1}.check-user-list .order-lists .item .red[data-v-76a67240]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-76a67240]{background-color:#efefef}.check-user-list .load-end[data-v-76a67240]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-af63b72d]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-af63b72d]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-af63b72d]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-af63b72d]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-af63b72d]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-af63b72d]{font-size:1rem}.my-order .header-nav[data-v-af63b72d]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-af63b72d]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-af63b72d]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-af63b72d]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-af63b72d]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-af63b72d]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-af63b72d]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-af63b72d]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-af63b72d]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-af63b72d]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-af63b72d]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-af63b72d]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-af63b72d]{height:3.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-af63b72d]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-af63b72d]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-af63b72d]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-af63b72d]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-af63b72d]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-af63b72d]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-7d75d07a]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-7d75d07a]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-7d75d07a]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-7d75d07a]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-7d75d07a]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-7d75d07a] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-7d75d07a]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-7d75d07a]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-7d75d07a]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-7d75d07a]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-7d75d07a]{width:11.5rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.7rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-7d75d07a]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-7d75d07a]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-7d75d07a]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-7d75d07a]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-7d75d07a]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-7d75d07a]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-7d75d07a]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-7d75d07a],.my-order .shop-list .shop-item:hover .unit-name[data-v-7d75d07a]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-7d75d07a]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-7d75d07a]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-6c040b11]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-6c040b11]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-6c040b11]{display:flex}.shop .shop-info .shop-info-left[data-v-6c040b11]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-6c040b11]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-6c040b11]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-6c040b11]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-6c040b11]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-6c040b11]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-6c040b11]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-6c040b11]{text-decoration:line-through}.shop .shop-sku[data-v-6c040b11]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} +@charset "UTF-8";.dialog-footer .ok-btn[data-v-924edcc0]{width:100%;height:2.5rem;border-radius:2.5rem}.price[data-v-924edcc0]{border-top:.0625rem solid #eee;padding-top:1rem}.price .flex[data-v-924edcc0]{display:flex}.check-user-list[data-v-76a67240]{border-radius:1.2rem;height:70vh;background-color:#fff;width:100%;position:relative;overflow:hidden;display:flex;flex-direction:column}.check-user-list .header-nav[data-v-76a67240]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-76a67240]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-76a67240]{font-weight:700}.check-user-list .header-input[data-v-76a67240]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-76a67240]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:flex-start}.check-user-list .order-lists .item[data-v-76a67240]{width:45%;height:6rem;border-radius:.5rem;cursor:pointer;box-sizing:border-box;padding:1rem;margin:.5rem;background-color:#f5f5f5;display:flex}.check-user-list .order-lists .item .avatar[data-v-76a67240]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-76a67240]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-76a67240]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-76a67240]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-76a67240]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-76a67240]{flex:1}.check-user-list .order-lists .item .red[data-v-76a67240]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-76a67240]{background-color:#efefef}.check-user-list .load-end[data-v-76a67240]{text-align:center;padding:1rem;color:#333;font-size:.8rem;width:100%;height:100%}.my-order[data-v-e39f74e3]{border-radius:1.2rem;height:100%;background-color:#fff;width:30rem;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .user-nav .user-info[data-v-e39f74e3]{padding:1rem;margin:1rem;margin-bottom:0;border:.125rem solid #f70;background-color:#ff77001a;border-radius:.5rem;display:flex}.my-order .user-nav .user-info .avatar[data-v-e39f74e3]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-e39f74e3]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-e39f74e3]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-e39f74e3]{font-size:1rem}.my-order .header-nav[data-v-e39f74e3]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-e39f74e3]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-e39f74e3]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-e39f74e3]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-e39f74e3]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-e39f74e3]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-e39f74e3]{flex:1;box-sizing:border-box;padding-left:.75rem;display:flex;flex-direction:column;justify-content:space-between}.my-order .order-list .order-item .order-item-info>div[data-v-e39f74e3]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-e39f74e3]{width:18rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.my-order .order-list .order-item .order-item-info .order-item-title .delete[data-v-e39f74e3]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-e39f74e3]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-e39f74e3]{position:absolute;bottom:0;left:0;z-index:20;width:100%;box-shadow:0 -.0625rem .625rem #eee;background-color:#fff}.my-order .order-footer .order-total[data-v-e39f74e3]{height:3.5rem;padding:1rem 2rem;display:flex;justify-content:space-between;border-bottom:.0625rem solid #eee;align-items:center}.my-order .order-footer .order-total .price[data-v-e39f74e3]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-e39f74e3]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-e39f74e3]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-e39f74e3]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-e39f74e3]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-e39f74e3]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-7d75d07a]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-7d75d07a]{border-radius:.8rem;background-color:#fff;display:flex;justify-content:space-between;overflow:hidden;width:auto;border:.0625rem solid rgba(0,0,0,0)}.my-order .header-nav .nav-item-label[data-v-7d75d07a]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-7d75d07a]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-7d75d07a]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-7d75d07a] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-7d75d07a]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-7d75d07a]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-7d75d07a]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-7d75d07a]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-7d75d07a]{width:11.5rem;height:16rem;cursor:pointer;background-color:#fff;border-radius:1rem;padding:.7rem;display:flex;justify-content:space-between;flex-direction:column;position:relative;overflow:hidden}.my-order .shop-list .shop-item .el-image[data-v-7d75d07a]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-7d75d07a]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;margin-top:.5rem}.my-order .shop-list .shop-item .shop-price[data-v-7d75d07a]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-7d75d07a]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-7d75d07a]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item .shop-price .del[data-v-7d75d07a]{text-decoration:line-through}.my-order .shop-list .shop-item[data-v-7d75d07a]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-7d75d07a],.my-order .shop-list .shop-item:hover .unit-name[data-v-7d75d07a]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-7d75d07a]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#0003;display:flex;justify-content:center;align-items:center}.my-order .shop-list .shop-item .no-stock div[data-v-7d75d07a]{background-color:#4e4e4e;color:#fff;border-radius:50%;width:5rem;height:5rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.dialog-footer .ok-btn[data-v-6c040b11]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-6c040b11]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-6c040b11]{display:flex}.shop .shop-info .shop-info-left[data-v-6c040b11]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-6c040b11]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-6c040b11]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;font-size:1.1rem}.shop .shop-info .shop-info-right .shop-info-right-center[data-v-6c040b11]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-6c040b11]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-6c040b11]{font-size:1.4rem;margin-left:.2rem}.shop .shop-info .shop-info-right .shop-info-right-price .unit-name[data-v-6c040b11]{font-size:.9rem;color:#999;font-weight:400}.shop .shop-info .shop-info-right .shop-info-right-price .del[data-v-6c040b11]{text-decoration:line-through}.shop .shop-sku[data-v-6c040b11]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-4d5623b0]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-4d5623b0]{width:4rem;margin:1rem;padding:.5rem 1rem;text-align:center;border-radius:3rem;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.classify .itemP-active[data-v-4d5623b0]{background-color:#1890ff;color:#fff}.active-card .title[data-v-4d5623b0]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-4d5623b0]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-4d5623b0]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-4d5623b0]{color:#1890ff}[data-v-4d5623b0]::-webkit-scrollbar{display:none}.my-card{display:flex}::-webkit-scrollbar{width:.315rem}::-webkit-scrollbar-track{background-color:#f1f1f1;margin:1.25rem 0}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:.315rem}::-webkit-scrollbar-thumb:hover{background-color:#999} diff --git a/build/assets/index-D9cv8Rzj.js b/build/assets/index-DgKMBdPb.js similarity index 98% rename from build/assets/index-D9cv8Rzj.js rename to build/assets/index-DgKMBdPb.js index dfaf791..4583177 100644 --- a/build/assets/index-D9cv8Rzj.js +++ b/build/assets/index-DgKMBdPb.js @@ -1 +1 @@ -import{_ as q,u as J,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as y,g as b,i as W,j as $,F as P,l as T,p as u,m as x,E as U,z as j,d as F,D as X,o as G,a as Y,q as Z,s as ee,n as K,I as L,J as te}from"./index-DFqeFzc7.js";import{d as se,i as oe,w as ie,h as ae}from"./store-pG1SPGrt.js";/* empty css */import{p as le}from"./padding-BlCym4iJ.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},De={key:5},Oe={key:1,style:{color:"#ff4a00"}},Ve={key:0,class:"cashier"},Be={key:1,class:"cashier",style:{color:"#ff4a00"}},Se={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Le={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(w,{expose:t,emit:h}){J(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),m=l(0),k=l(0),I=l(!1),c=l([]),p=(C=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],k.value=0,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&U.warning("订单已核销过")}).catch(d=>{r.value=!1})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(C,d)=>{k.value=d,x.emit("set-sale-order-detail",C)},g=C=>{n.value.verify_code=C,k.value=0,n.value.page_no=1,p(!0)},R=h,D=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(C,d)=>{const O=f("el-button"),V=f("el-input"),B=f("el-image"),S=f("spna"),A=E("loading"),H=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(w.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(O,{type:"primary",size:"small",onClick:D},{default:y(()=>[b("返回上一页")]),_:1})])]),e("div",re,[_(V,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=W(i=>p(!0),["enter"])),clearable:""},{append:y(()=>[_(O,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:y(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,N)=>(s(),o("div",{class:j(["item",{"item-active":k.value==N}]),key:N,onClick:M=>z(i,N)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(M,Q)=>(s(),F(B,{key:Q,src:M.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[b(a(i.paid_name)+" ",1),i.pay_type_name?(s(),F(S,{key:0},{default:y(()=>[b("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",De,"(微信支付)")):u("",!0)])):(s(),o("div",Oe,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Ve,"核销码:"+a(i.verify_code),1)):(s(),o("div",Be,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Se,"没有更多了")):u("",!0),r.value?(s(),o("div",Ae,"加载中...")):u("",!0)])),[[A,r.value],[H,p]])])}}},Ee=q(Le,[["__scopeId","data-v-8d729586"]]),v=w=>(Z("data-v-1950b4ed"),w=w(),ee(),w),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Me={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Ge={class:"info-item"},He=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Dt={style:{"font-size":"0.9rem"}},Ot={style:{color:"#ff4a00"}},Vt={style:{display:"flex","align-items":"center"}},Bt={style:{"margin-left":"0.5rem"}},St=v(()=>e("div",{style:{height:"8rem"}},null,-1)),At={class:"footer"},Lt={key:1},Et={key:1},Ft={__name:"detail",setup(w){J(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),m=()=>console.log("触底"),k=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&U.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{x.emit("letPrintReceipt",c.data)})};return G(()=>{x.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{x.off("set-sale-order-detail")}),(c,p)=>{var V;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),D=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),O=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Ue,e("div",Me,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[Je,e("div",We,a(t.value.total_num||0),1)]),e("div",Ge,[He,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Dt,[b(" 共计 "),e("span",Ot,a(((V=t.value.product)==null?void 0:V.length)||" "),1),b(" 款商品 ")]),_(R,{data:t.value.product},{default:y(()=>[_(g,{label:"商品信息"},{default:y(({row:B})=>{var S,A;return[e("div",Vt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(S=B.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",Bt,a((A=B.cart_info)==null?void 0:A.name),1)])]}),_:1}),_(g,{prop:"cart_info.price",label:"单价",width:"150"}),_(g,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(g,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),St])),[[d,m]]),e("div",At,[t.value.is_writeoff==0?(s(),F(D,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:y(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",Lt,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(D,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:y(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[O,h.value]]):(s(),o("div",Et,[_(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-1950b4ed"]]),Kt={class:"my-card"},Ut={class:"my-code"},Mt=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Gt={__name:"index",setup(w){const t=l(1),h=l(""),n=l(null),r=l(null),m=()=>{if(h.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{r.value.setCode(h.value)})},k=()=>{t.value=3,K(()=>{r.value.setCode("")})},I=()=>{m()};return G(()=>{K(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),g=f("el-icon");return s(),o("div",Kt,[$(e("div",Ut,[Mt,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:y(()=>[_(z)]),_:1})])],512),[[L,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[L,t.value!=1]]),$(_(le,null,null,512),[[L,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[L,t.value!=1]])])}}};export{Gt as default}; +import{_ as q,u as J,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as y,g as b,i as W,j as $,F as P,l as T,p as u,m as x,E as U,z as j,d as F,D as X,o as G,a as Y,q as Z,s as ee,n as K,I as L,J as te}from"./index-zqjuu94d.js";import{d as se,i as oe,w as ie,h as ae}from"./store-B9VgAm7I.js";/* empty css */import{p as le}from"./padding-SV9GOhiy.js";const ne={class:"my-order"},ce={class:"header-nav"},de={class:"nav-item"},_e={class:"nav-item-clear"},re={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ue=["onClick"],fe={class:"top"},pe={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},me={key:0,class:"shop-name"},ke={class:"right"},ge={class:"money"},$e={class:"count"},be={class:"bottom"},we={class:"pay"},Ce={key:0},xe={key:1},Re={key:2},Ie={key:3},ze={key:4},De={key:5},Oe={key:1,style:{color:"#ff4a00"}},Ve={key:0,class:"cashier"},Be={key:1,class:"cashier",style:{color:"#ff4a00"}},Se={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Le={__name:"order",props:{type:{type:Number,default:2}},emits:["backOne"],setup(w,{expose:t,emit:h}){J(),l([]),l(null);const n=l({verify_code:"",page_no:1,page_size:15}),r=l(!1),m=l(0),k=l(0),I=l(!1),c=l([]),p=(C=!1)=>{r.value||(r.value=!0,n.value.verify_code?(n.value.verify_code=n.value.verify_code.replace("—","-"),n.value.verify_code=n.value.verify_code.replace(/\uFF0D/,"-"),n.value.verify_code=n.value.verify_code.replace(" ",""),se({verify_code:n.value.verify_code}).then(d=>{c.value=[d.data],k.value=0,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,r.value=!1,c.value[0].is_writeoff&&U.warning("订单已核销过")}).catch(d=>{r.value=!1})):oe(n.value).then(d=>{c.value=[...c.value,...d.data.lists],n.value.page_no==1&&x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,n.value.page_no++,r.value=!1}).catch(d=>{r.value=!1}))},z=(C,d)=>{k.value=d,x.emit("set-sale-order-detail",C)},g=C=>{n.value.verify_code=C,k.value=0,n.value.page_no=1,p(!0)},R=h,D=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(C,d)=>{const O=f("el-button"),V=f("el-input"),B=f("el-image"),S=f("spna"),A=E("loading"),H=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(w.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(O,{type:"primary",size:"small",onClick:D},{default:y(()=>[b("返回上一页")]),_:1})])]),e("div",re,[_(V,{modelValue:n.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=i=>n.value.verify_code=i),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=W(i=>p(!0),["enter"])),clearable:""},{append:y(()=>[_(O,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=i=>p(!0))},{default:y(()=>[b("搜索")]),_:1})]),_:1},8,["modelValue"])]),$((s(),o("div",ve,[(s(!0),o(P,null,T(c.value,(i,N)=>(s(),o("div",{class:j(["item",{"item-active":k.value==N}]),key:N,onClick:M=>z(i,N)},[e("div",fe,[e("div",{class:j(["sn","cahier"])},"单号: "+a(i.order_id),1),e("div",pe,a(i.pay_time),1)]),e("div",he,[i.product?(s(),o("div",ye,[(s(!0),o(P,null,T(i.product.slice(0,5),(M,Q)=>(s(),F(B,{key:Q,src:M.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),i.product.length==1?(s(),o("div",me,a(i.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ke,[e("div",ge,"¥"+a(i.pay_price),1),e("div",$e,"共"+a(i.total_num)+"款商品",1)])]),e("div",be,[e("div",we,[i.paid?(s(),o("div",Ce,[b(a(i.paid_name)+" ",1),i.pay_type_name?(s(),F(S,{key:0},{default:y(()=>[b("("+a(i.pay_type_name)+")",1)]),_:2},1024)):i.pay_type==9?(s(),o("span",xe,"(微信收款)")):i.pay_type==17?(s(),o("span",Re,"(现金支付)")):i.pay_type==13?(s(),o("span",Ie,"(支付宝收款)")):i.pay_type==3?(s(),o("span",ze,"(余额支付)")):i.pay_type==1?(s(),o("span",De,"(微信支付)")):u("",!0)])):(s(),o("div",Oe,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Ve,"核销码:"+a(i.verify_code),1)):(s(),o("div",Be,"已核销:"+a(i.verify_code),1))])],10,ue))),128)),I.value?(s(),o("div",Se,"没有更多了")):u("",!0),r.value?(s(),o("div",Ae,"加载中...")):u("",!0)])),[[A,r.value],[H,p]])])}}},Ee=q(Le,[["__scopeId","data-v-8d729586"]]),v=w=>(Z("data-v-1950b4ed"),w=w(),ee(),w),Fe={class:"my-order"},Ne={key:0,class:"detail"},Ke={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ue=v(()=>e("div",{class:"table-title"},"订单信息",-1)),Me={class:"table-info"},Pe={class:"info-item"},Te=v(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Je=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Ge={class:"info-item"},He=v(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Qe={class:"info-item-info"},Xe={class:"info-item"},Ye=v(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ze={class:"info-item-info"},et={class:"info-item"},tt=v(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),st={class:"info-item-info"},ot={class:"info-item"},it=v(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),at={class:"info-item-info"},lt={class:"info-item"},nt=v(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),ct={class:"info-item-info"},dt={class:"info-item"},_t=v(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),rt={class:"info-item-info"},vt={key:0},ut={key:1},ft={key:2},pt={key:3},ht={key:4},yt={key:5},mt={key:0,class:"table-title"},kt={key:1,class:"table-info"},gt={class:"info-item"},$t=v(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),bt={class:"info-item-info"},wt={class:"info-item"},Ct=v(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),xt={class:"info-item-info"},Rt={class:"info-item"},It=v(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},Dt={style:{"font-size":"0.9rem"}},Ot={style:{color:"#ff4a00"}},Vt={style:{display:"flex","align-items":"center"}},Bt={style:{"margin-left":"0.5rem"}},St=v(()=>e("div",{style:{height:"8rem"}},null,-1)),At={class:"footer"},Lt={key:1},Et={key:1},Ft={__name:"detail",setup(w){J(),X();const t=l({id:""});l([]),l(null);const h=l(!1);l(0),l(0),l(["商品信息","订单详情"]),l(""),l(!1);const n=l({page_no:1,page_size:15,loadend:!1,loading:!1}),r=l([]),m=()=>console.log("触底"),k=()=>{ie({verify_code:t.value.verify_code}).then(c=>{c.show==0&&c.msg=="核销成功"&&U.success(c.msg),t.value.is_writeoff=1})},I=()=>{ae({id:t.value.id}).then(c=>{x.emit("letPrintReceipt",c.data)})};return G(()=>{x.on("set-sale-order-detail",c=>{console.log("===",c),t.value=c,n.value.page_no=1,n.value.loadend=!1,n.value.loading=!1,r.value=[]})}),Y(()=>{x.off("set-sale-order-detail")}),(c,p)=>{var V;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),D=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),O=E("loading");return s(),o("div",Fe,[t.value.id?$((s(),o("div",Ne,[$((s(),o("div",Ke,[Ue,e("div",Me,[e("div",Pe,[Te,e("div",je,a(t.value.order_id),1)]),e("div",qe,[Je,e("div",We,a(t.value.total_num||0),1)]),e("div",Ge,[He,e("div",Qe,"¥"+a(t.value.pay_price),1)]),e("div",Xe,[Ye,e("div",Ze,a(t.value.pay_time),1)]),e("div",et,[tt,e("div",st,"¥"+a(t.value.deduction_price),1)]),e("div",ot,[it,e("div",at,"¥"+a(t.value.pay_price),1)]),e("div",lt,[nt,e("div",ct,a(t.value.pay_time),1)]),e("div",dt,[_t,e("div",rt,[t.value.pay_type_name?(s(),o("span",vt,a(t.value.pay_type_name),1)):t.value.pay_type==9?(s(),o("span",ut,"微信收款")):t.value.pay_type==17?(s(),o("span",ft,"现金支付")):t.value.pay_type==13?(s(),o("span",pt,"支付宝收款")):t.value.pay_type==3?(s(),o("span",ht,"余额支付")):t.value.pay_type==1?(s(),o("span",yt,"微信支付")):u("",!0)])])]),t.value.uid?(s(),o("div",mt,"用户信息")):u("",!0),t.value.uid?(s(),o("div",kt,[e("div",gt,[$t,e("div",bt,a(t.value.uid),1)]),e("div",wt,[Ct,e("div",xt,a(t.value.nickname),1)]),e("div",Rt,[It,e("div",zt,a(t.value.mobile),1)])])):u("",!0),e("div",Dt,[b(" 共计 "),e("span",Ot,a(((V=t.value.product)==null?void 0:V.length)||" "),1),b(" 款商品 ")]),_(R,{data:t.value.product},{default:y(()=>[_(g,{label:"商品信息"},{default:y(({row:B})=>{var S,A;return[e("div",Vt,[_(z,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(S=B.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",Bt,a((A=B.cart_info)==null?void 0:A.name),1)])]}),_:1}),_(g,{prop:"cart_info.price",label:"单价",width:"150"}),_(g,{prop:"cart_info.cart_num",label:"数量",width:"150"}),_(g,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),St])),[[d,m]]),e("div",At,[t.value.is_writeoff==0?(s(),F(D,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:y(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",Lt,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(D,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:y(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[O,h.value]]):(s(),o("div",Et,[_(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-1950b4ed"]]),Kt={class:"my-card"},Ut={class:"my-code"},Mt=e("h2",null,"订单核销",-1),Pt={class:"box"},Tt=e("span",null,"查看核销记录",-1),Gt={__name:"index",setup(w){const t=l(1),h=l(""),n=l(null),r=l(null),m=()=>{if(h.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{r.value.setCode(h.value)})},k=()=>{t.value=3,K(()=>{r.value.setCode("")})},I=()=>{m()};return G(()=>{K(()=>{n.value.focus()})}),(c,p)=>{const z=f("ArrowRightBold"),g=f("el-icon");return s(),o("div",Kt,[$(e("div",Ut,[Mt,e("div",Pt,[$(e("input",{ref_key:"inputRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=R=>h.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,h.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:y(()=>[_(z)]),_:1})])],512),[[L,t.value==1]]),$(_(Ee,{type:t.value,style:{"flex-shrink":"0"},ref_key:"orderRef",ref:r,onBackOne:p[1]||(p[1]=R=>{t.value=1,h.value=""})},null,8,["type"]),[[L,t.value!=1]]),$(_(le,null,null,512),[[L,t.value!=1]]),$(_(Nt,{ref:"detailRef",onReInit:I},null,512),[[L,t.value!=1]])])}}};export{Gt as default}; diff --git a/build/assets/index-DkGkSwVv.js b/build/assets/index-DkGkSwVv.js deleted file mode 100644 index 4f5b617..0000000 --- a/build/assets/index-DkGkSwVv.js +++ /dev/null @@ -1,27 +0,0 @@ -import{c as Wp,a as Bp,b as ko,o as Up}from"./store-pG1SPGrt.js";import{_ as lt,r as S,o as Ut,m as te,a as Mt,b as en,c as B,d as We,w as pn,e as g,f as W,g as ln,t as N,n as lu,E as $t,u as Wr,h as Ft,i as qo,j as fu,k as X,F as Wt,l as Bt,p as fe,q as au,s as cu,v as Pt,x as Mp,y as Pr,z as $r,A as Dp,B as Np,C as Kp}from"./index-DFqeFzc7.js";import{u as Gp}from"./user-Df1_-QkC.js";import"./moment-Cl4UOzQZ.js";import{p as Ho}from"./padding-BlCym4iJ.js";import"./axiosAPI-DiYhnWHW.js";import{m as ou,s as zp}from"./shop-DGLf8liO.js";import{p as Hp}from"./pay-BMjw3Xka.js";import"./authCode-DstEoObn.js";/* empty css */const kp={class:"price"},qp={class:"flex"},Vp={style:{margin:"0.625rem","padding-bottom":"40px"}},Zp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Yp={class:"dialog-footer"},Xp={__name:"price",emits:["changeAllPrice"],setup(K,{expose:An,emit:o}){const T=S(!1),H=S(null),tn=S(0),x=(k=!0,y=0)=>{V.value.nowPrice="",V.value.percentage="",T.value=k,tn.value=y,lu(()=>{setTimeout(()=>{var fn;(fn=H.value)==null||fn.focus()},150)})},V=S({nowPrice:"",percentage:""}),cn=k=>{V.value.percentage=(k/tn.value*100).toFixed(2)},hn=k=>{V.value.nowPrice=(tn.value*k/100).toFixed(2)},Q=o,Z=()=>{if(V.value.percentage>100)return V.value.nowPrice="",V.value.percentage="",$t.error("改价金额不能大于当前订单金额");if(V.value.nowPrice<=0)return V.value.nowPrice="",V.value.percentage="",$t.error("金额不能小于0");Q("changeAllPrice",V.value.nowPrice)};An({show:x,dialogVisible:T});const yn=()=>{T.value&&Z()};return Ut(()=>{te.on("enter",yn)}),Mt(()=>{te.off("enter",yn)}),(k,y)=>{const fn=en("el-input"),P=en("el-button"),M=en("el-dialog");return B(),We(M,{modelValue:T.value,"onUpdate:modelValue":y[2]||(y[2]=rn=>T.value=rn),title:"订单改价",width:"650"},{footer:pn(()=>[g("div",Yp,[W(P,{class:"ok-btn",type:"primary",onClick:Z},{default:pn(()=>[ln(" 确定 (Enter) ")]),_:1})])]),default:pn(()=>[g("div",kp,[g("div",qp,[W(fn,{ref_key:"priceRef",ref:H,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=rn=>V.value.nowPrice=rn),type:"number",placeholder:"请输入改价后的价格",onInput:cn},{suffix:pn(()=>[ln("元")]),_:1},8,["modelValue"]),W(fn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:V.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=rn=>V.value.percentage=rn),type:"number",placeholder:"请输入比例",onInput:hn},{suffix:pn(()=>[ln("%")]),_:1},8,["modelValue"])]),g("div",Vp,[ln(" 改价后金额: "),g("span",Zp,"¥"+N(V.value.nowPrice||tn.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Jp=lt(Xp,[["__scopeId","data-v-924edcc0"]]),Qp={class:"check-user-list"},jp={class:"header-input"},nv={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},ev=["onClick"],tv={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},rv={class:"top"},iv={class:"bold"},uv={class:"flex-between"},sv={class:"mr-2"},ov={class:"bottom flex",style:{"justify-content":"space-between"}},lv={class:"red"},fv={class:"red"},av={key:0,class:"load-end"},cv={key:1,class:"load-end"},hv={__name:"userList",emits:["setUser"],setup(K,{expose:An,emit:o}){Wr();const T=S(!1),H=S({page_no:1,page_size:20,mobile:""}),tn=o,x=S(!1),V=S(0),cn=S(!1),hn=S([]),Q=(k=!1)=>{if(k)H.value.page_no=1;else if(cn.value||x.value)return;x.value=!0,Gp(H.value).then(y=>{k?hn.value=y.data.lists:hn.value=[...hn.value,...y.data.lists],y.data.lists.length{cn.value=!0,x.value=!1})},Z=(k,y)=>{tn("setUser",k),T.value=!1};return An({open:(k=null)=>{k||(H.value.mobile=""),T.value=!0,Q(!0)}}),(k,y)=>{const fn=en("el-button"),P=en("el-input"),M=en("el-avatar"),rn=en("el-tag"),G=en("el-dialog"),sn=Ft("loading"),on=Ft("infinite-scroll");return B(),We(G,{modelValue:T.value,"onUpdate:modelValue":y[4]||(y[4]=Y=>T.value=Y),title:"选择用户",width:"800"},{default:pn(()=>[g("div",Qp,[g("div",jp,[W(P,{modelValue:H.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=Y=>H.value.mobile=Y),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=qo(Y=>Q(!0),["enter"])),onClear:y[3]||(y[3]=Y=>Q(!0)),clearable:""},{append:pn(()=>[W(fn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=Y=>Q(!0))},{default:pn(()=>[ln("搜索")]),_:1})]),_:1},8,["modelValue"])]),fu((B(),X("div",nv,[(B(!0),X(Wt,null,Bt(hn.value,(Y,O)=>(B(),X("div",{class:"item",key:O,onClick:gn=>Z(Y,O)},[W(M,{class:"avatar",src:Y.avatar},null,8,["src"]),g("div",tv,[g("div",rv,[g("div",null,[g("span",iv,N(Y.nickname),1),g("span",null,N(" (ID:"+Y.id+")"),1)]),g("div",uv,[g("div",sv,"手机号: "+N(Y.mobile||Y.account),1),Y.user_ship!=1?(B(),We(rn,{key:0,type:"primary"},{default:pn(()=>[ln(N(Y.user_ship_name),1)]),_:2},1024)):(B(),We(rn,{key:1,type:"success"},{default:pn(()=>[ln(N(Y.user_ship_name),1)]),_:2},1024))])]),g("div",ov,[g("div",null,[ln("采购款: "),g("span",lv,N(Y.purchase_funds),1)]),g("div",null,[ln("礼品券: "),g("span",fv,N(Y.get_frozen),1)])])])],8,ev))),128)),cn.value?(B(),X("div",av,"没有更多了")):fe("",!0),x.value?(B(),X("div",cv,"加载中...")):fe("",!0)])),[[sn,x.value],[on,Q]])])]),_:1},8,["modelValue"])}}},_v=lt(hv,[["__scopeId","data-v-76a67240"]]),dv=K=>(au("data-v-af63b72d"),K=K(),cu(),K),pv={class:"my-order"},vv={class:"user-nav"},gv={class:"user-info"},mv={key:0,class:"info"},wv={class:"flex-bewteen"},yv={class:"flex-bewteen",style:{"align-items":"flex-end"}},xv={style:{display:"flex"}},Av={style:{"margin-right":"0.5rem"}},Iv={style:{color:"#f70"}},Cv={style:{color:"#f70"}},Lv={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Rv={class:"flex-bewteen",style:{width:"100%"}},Sv=dv(()=>g("div",{style:{"font-size":"1.2rem"}},"游客",-1)),bv={class:"header-nav"},Ev={class:"nav-item"},Tv={class:"order-list"},Ov={class:"order-item-info"},Pv={class:"order-item-title"},$v={class:"title"},Fv=["onClick"],Wv={class:"order-item-sku"},Bv={class:"order-item-price"},Uv={class:"order-footer"},Mv={class:"order-total"},Dv={class:"price",style:{"flex-direction":"column","align-items":"flex-start"}},Nv={class:"total-item",style:{"flex-shrink":"0"}},Kv={style:{"font-size":"1.4rem"}},Gv={key:0,class:"total-item",style:{"padding-right":"0","line-height":"0.8rem"}},zv={style:{"font-size":"0.8rem"}},Hv={class:"update-price"},kv={class:"order-btn"},qv={__name:"order",emits:["goPay","editAttr"],setup(K,{expose:An,emit:o}){const T=S([]),H=S(0),tn=S(0),x=S(0);Wr();const V=S(null),cn=()=>{let I=[];T.value.map(j=>{I.push(j.id)}),I.length!=0&&Q(I)},hn=I=>{T.value=T.value.filter(j=>j.id!=I),Q([I])},Q=I=>{Wp({id:I}).then(j=>{yn()})},Z=S({}),yn=()=>{H.value=0,tn.value=0,x.value=0,Bp().then(I=>{var j;Z.value=I.data.extend,T.value=I.data.lists||[],(j=Z.value)!=null&&j.pay_price||(G.value.uid="")})};yn();const k=o,y=()=>{k("goPay")},fn=(I,j)=>{ko({product_id:I.product_id,cart_num:I.cart_num}).then(bn=>{yn()}).catch(bn=>{var $n;let Kn=($n=bn==null?void 0:bn.msg)==null?void 0:$n.match(/\b\d+(\.\d+)?\b/);Kn?I.cart_num=+Kn[0]:I.cart_num=1})},P=I=>{x.value=tn.value-I,H.value=+I,lu(()=>{setTimeout(()=>{rn(!1)},150)})};S(0);const M=S(null),rn=(I=!0)=>{M.value.show(I,tn.value)},G=S({uid:""}),sn=I=>{G.value=I,G.value.uid=I.id},on=S(!1);An({getList:yn,resetView:()=>{on.value=!1,yn()},list:T,discounts:x,allPrice:H,userInfo:G,is_storage:on});const O=()=>{M.value.dialogVisible?M.value.dialogVisible=!1:rn()},gn=()=>{T.value.length>0&&cn()};return Ut(()=>{te.on("insert",O),te.on("delete",gn)}),Mt(()=>{te.off("insert",O),te.off("delete",gn)}),(I,j)=>{const bn=en("el-avatar"),Kn=en("ArrowRight"),$n=en("el-icon"),ae=en("el-button"),Br=en("RefreshLeft"),Ur=en("Delete"),pe=en("el-empty"),ce=en("el-image"),Mr=en("el-input-number"),ke=en("el-switch");return B(),X("div",pv,[g("div",vv,[g("div",gv,[W(bn,{class:"avatar",src:G.value.avatar},null,8,["src"]),G.value.uid?(B(),X("div",mv,[g("div",wv,[g("div",null,"手机号: "+N(G.value.mobile||G.value.account),1),W(ae,{type:"primary",link:"",class:"change-user",onClick:j[0]||(j[0]=_n=>V.value.open(G.value.uid))},{default:pn(()=>[ln("切换用户"),W($n,null,{default:pn(()=>[W(Kn)]),_:1})]),_:1})]),g("div",yv,[g("div",xv,[g("div",Av,[ln("采购款: "),g("span",Iv,N(G.value.purchase_funds),1)]),g("div",null,[ln("礼品券: "),g("span",Cv,N(G.value.get_frozen),1)])]),W(ae,{link:"",onClick:j[1]||(j[1]=_n=>G.value.uid="")},{default:pn(()=>[ln("重置"),W($n,null,{default:pn(()=>[W(Br)]),_:1})]),_:1})])])):(B(),X("div",Lv,[g("div",Rv,[Sv,W(ae,{type:"primary",link:"",class:"change-user",onClick:j[2]||(j[2]=_n=>V.value.open())},{default:pn(()=>[ln("切换用户"),W($n,null,{default:pn(()=>[W(Kn)]),_:1})]),_:1})])]))]),W(_v,{ref_key:"userListRef",ref:V,onSetUser:sn},null,512)]),g("div",bv,[g("div",Ev,[ln(" 已选购 "),g("span",null,N(T.value.length),1),ln(" 款 ")]),g("div",{class:"nav-item-clear",onClick:cn},[W($n,null,{default:pn(()=>[W(Ur)]),_:1}),ln("清空 (Delete) ")])]),g("div",Tv,[T.value.length==0?(B(),We(pe,{key:0,description:"请点击右侧添加商品"})):(B(!0),X(Wt,{key:1},Bt(T.value,(_n,Dr)=>(B(),X("div",{class:"order-item",key:Dr},[W(ce,{loading:"lazy",class:"order-item-img",src:_n.image},null,8,["src"]),g("div",Ov,[g("div",Pv,[g("div",$v,N(_n.store_name),1),g("div",{class:"delete",onClick:ft=>hn(_n.id)},"删除",8,Fv)]),g("div",Wv,[g("span",null,N(_n.unit_name),1)]),g("div",Bv,[g("div",null,[ln(" ¥"),g("span",null,N(_n.price),1)]),g("div",null,[W(Mr,{modelValue:_n.cart_num,"onUpdate:modelValue":ft=>_n.cart_num=ft,min:+_n.batch>0?+_n.batch:1,step:1,"step-strictly":"",onChange:ft=>fn(_n)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),g("div",Uv,[g("div",Mv,[g("div",Dv,[g("div",Nv,[ln(" 合计: "),g("span",null,[ln("¥"),g("span",Kv,N(Z.value.pay_price||"0.00"),1)])]),Z.value.msg?(B(),X("div",Gv,[g("span",zv,N(Z.value.msg),1)])):fe("",!0)]),g("div",Hv,[W(ke,{modelValue:on.value,"onUpdate:modelValue":j[3]||(j[3]=_n=>on.value=_n),size:"large","inline-prompt":"","active-text":"存货","inactive-text":"不存"},null,8,["modelValue"])])]),g("div",kv,[W(ae,{class:"btn",type:"primary",onClick:y,disabled:T.value.length==0},{default:pn(()=>[ln(N("立即结账 (F9)"))]),_:1},8,["disabled"])])]),W(Jp,{ref_key:"priceRef",ref:M,onChangeAllPrice:P},null,512)])}}},Vv=lt(qv,[["__scopeId","data-v-af63b72d"]]);var Fr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Fr.exports;(function(K,An){(function(){var o,T="4.17.21",H=200,tn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",V="Invalid `variable` option passed into `_.template`",cn="__lodash_hash_undefined__",hn=500,Q="__lodash_placeholder__",Z=1,yn=2,k=4,y=1,fn=2,P=1,M=2,rn=4,G=8,sn=16,on=32,Y=64,O=128,gn=256,I=512,j=30,bn="...",Kn=800,$n=16,ae=1,Br=2,Ur=3,pe=1/0,ce=9007199254740991,Mr=17976931348623157e292,ke=NaN,_n=4294967295,Dr=_n-1,ft=_n>>>1,Zo=[["ary",O],["bind",P],["bindKey",M],["curry",G],["curryRight",sn],["flip",I],["partial",on],["partialRight",Y],["rearg",gn]],qe="[object Arguments]",Nt="[object Array]",Yo="[object AsyncFunction]",at="[object Boolean]",ct="[object Date]",Xo="[object DOMException]",Kt="[object Error]",Gt="[object Function]",hu="[object GeneratorFunction]",re="[object Map]",ht="[object Number]",Jo="[object Null]",ve="[object Object]",_u="[object Promise]",Qo="[object Proxy]",_t="[object RegExp]",ie="[object Set]",dt="[object String]",zt="[object Symbol]",jo="[object Undefined]",pt="[object WeakMap]",nl="[object WeakSet]",vt="[object ArrayBuffer]",Ve="[object DataView]",Nr="[object Float32Array]",Kr="[object Float64Array]",Gr="[object Int8Array]",zr="[object Int16Array]",Hr="[object Int32Array]",kr="[object Uint8Array]",qr="[object Uint8ClampedArray]",Vr="[object Uint16Array]",Zr="[object Uint32Array]",el=/\b__p \+= '';/g,tl=/\b(__p \+=) '' \+/g,rl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,du=/&(?:amp|lt|gt|quot|#39);/g,pu=/[&<>"']/g,il=RegExp(du.source),ul=RegExp(pu.source),sl=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,vu=/<%=([\s\S]+?)%>/g,ll=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fl=/^\w*$/,al=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/[\\^$.*+?()[\]{}|]/g,cl=RegExp(Yr.source),Xr=/^\s+/,hl=/\s/,_l=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dl=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,vl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gl=/[()=,{}\[\]\/\s]/,ml=/\\(\\)?/g,wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gu=/\w*$/,yl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,Al=/^\[object .+?Constructor\]$/,Il=/^0o[0-7]+$/i,Cl=/^(?:0|[1-9]\d*)$/,Ll=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Rl=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Sl="\\u0300-\\u036f",bl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",mu=Sl+bl+El,wu="\\u2700-\\u27bf",yu="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",Ol="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pl="\\u2000-\\u206f",$l=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xu="A-Z\\xc0-\\xd6\\xd8-\\xde",Au="\\ufe0e\\ufe0f",Iu=Tl+Ol+Pl+$l,Jr="['’]",Fl="["+kt+"]",Cu="["+Iu+"]",qt="["+mu+"]",Lu="\\d+",Wl="["+wu+"]",Ru="["+yu+"]",Su="[^"+kt+Iu+Lu+wu+yu+xu+"]",Qr="\\ud83c[\\udffb-\\udfff]",Bl="(?:"+qt+"|"+Qr+")",bu="[^"+kt+"]",jr="(?:\\ud83c[\\udde6-\\uddff]){2}",ni="[\\ud800-\\udbff][\\udc00-\\udfff]",Ze="["+xu+"]",Eu="\\u200d",Tu="(?:"+Ru+"|"+Su+")",Ul="(?:"+Ze+"|"+Su+")",Ou="(?:"+Jr+"(?:d|ll|m|re|s|t|ve))?",Pu="(?:"+Jr+"(?:D|LL|M|RE|S|T|VE))?",$u=Bl+"?",Fu="["+Au+"]?",Ml="(?:"+Eu+"(?:"+[bu,jr,ni].join("|")+")"+Fu+$u+")*",Dl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wu=Fu+$u+Ml,Kl="(?:"+[Wl,jr,ni].join("|")+")"+Wu,Gl="(?:"+[bu+qt+"?",qt,jr,ni,Fl].join("|")+")",zl=RegExp(Jr,"g"),Hl=RegExp(qt,"g"),ei=RegExp(Qr+"(?="+Qr+")|"+Gl+Wu,"g"),kl=RegExp([Ze+"?"+Ru+"+"+Ou+"(?="+[Cu,Ze,"$"].join("|")+")",Ul+"+"+Pu+"(?="+[Cu,Ze+Tu,"$"].join("|")+")",Ze+"?"+Tu+"+"+Ou,Ze+"+"+Pu,Nl,Dl,Lu,Kl].join("|"),"g"),ql=RegExp("["+Eu+kt+mu+Au+"]"),Vl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yl=-1,vn={};vn[Nr]=vn[Kr]=vn[Gr]=vn[zr]=vn[Hr]=vn[kr]=vn[qr]=vn[Vr]=vn[Zr]=!0,vn[qe]=vn[Nt]=vn[vt]=vn[at]=vn[Ve]=vn[ct]=vn[Kt]=vn[Gt]=vn[re]=vn[ht]=vn[ve]=vn[_t]=vn[ie]=vn[dt]=vn[pt]=!1;var dn={};dn[qe]=dn[Nt]=dn[vt]=dn[Ve]=dn[at]=dn[ct]=dn[Nr]=dn[Kr]=dn[Gr]=dn[zr]=dn[Hr]=dn[re]=dn[ht]=dn[ve]=dn[_t]=dn[ie]=dn[dt]=dn[zt]=dn[kr]=dn[qr]=dn[Vr]=dn[Zr]=!0,dn[Kt]=dn[Gt]=dn[pt]=!1;var Xl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Jl={"&":"&","<":"<",">":">",'"':""","'":"'"},Ql={"&":"&","<":"<",">":">",""":'"',"'":"'"},jl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nf=parseFloat,ef=parseInt,Bu=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,tf=typeof self=="object"&&self&&self.Object===Object&&self,En=Bu||tf||Function("return this")(),ti=An&&!An.nodeType&&An,Be=ti&&!0&&K&&!K.nodeType&&K,Uu=Be&&Be.exports===ti,ri=Uu&&Bu.process,Zn=function(){try{var a=Be&&Be.require&&Be.require("util").types;return a||ri&&ri.binding&&ri.binding("util")}catch{}}(),Mu=Zn&&Zn.isArrayBuffer,Du=Zn&&Zn.isDate,Nu=Zn&&Zn.isMap,Ku=Zn&&Zn.isRegExp,Gu=Zn&&Zn.isSet,zu=Zn&&Zn.isTypedArray;function Gn(a,_,h){switch(h.length){case 0:return a.call(_);case 1:return a.call(_,h[0]);case 2:return a.call(_,h[0],h[1]);case 3:return a.call(_,h[0],h[1],h[2])}return a.apply(_,h)}function rf(a,_,h,w){for(var b=-1,J=a==null?0:a.length;++b-1}function ii(a,_,h){for(var w=-1,b=a==null?0:a.length;++w-1;);return h}function Ju(a,_){for(var h=a.length;h--&&Ye(_,a[h],0)>-1;);return h}function _f(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var df=li(Xl),pf=li(Jl);function vf(a){return"\\"+jl[a]}function gf(a,_){return a==null?o:a[_]}function Xe(a){return ql.test(a)}function mf(a){return Vl.test(a)}function wf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function hi(a){var _=-1,h=Array(a.size);return a.forEach(function(w,b){h[++_]=[b,w]}),h}function Qu(a,_){return function(h){return a(_(h))}}function be(a,_){for(var h=-1,w=a.length,b=0,J=[];++h-1}function sa(n,e){var t=this.__data__,r=ar(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ge.prototype.clear=ta,ge.prototype.delete=ra,ge.prototype.get=ia,ge.prototype.has=ua,ge.prototype.set=sa;function me(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,i,s){var l,f=e&Z,c=e&yn,d=e&k;if(t&&(l=i?t(n,r,i,s):t(n)),l!==o)return l;if(!wn(n))return n;var p=E(n);if(p){if(l=ac(n),!f)return Un(n,l)}else{var v=Pn(n),m=v==Gt||v==hu;if(Fe(n))return Fs(n,f);if(v==ve||v==qe||m&&!i){if(l=c||m?{}:js(n),!f)return c?ja(n,Aa(l,n)):Qa(n,as(l,n))}else{if(!dn[v])return i?n:{};l=cc(n,v,f)}}s||(s=new se);var A=s.get(n);if(A)return A;s.set(n,l),Eo(n)?n.forEach(function(R){l.add(Qn(R,e,t,R,n,s))}):So(n)&&n.forEach(function(R,D){l.set(D,Qn(R,e,t,D,n,s))});var L=d?c?Mi:Ui:c?Dn:Sn,F=p?o:L(n);return Yn(F||n,function(R,D){F&&(D=R,R=n[D]),It(l,D,Qn(R,e,t,D,n,s))}),l}function Ia(n){var e=Sn(n);return function(t){return cs(t,n,e)}}function cs(n,e,t){var r=t.length;if(n==null)return!r;for(n=an(n);r--;){var i=t[r],s=e[i],l=n[i];if(l===o&&!(i in n)||!s(l))return!1}return!0}function hs(n,e,t){if(typeof n!="function")throw new Xn(x);return Tt(function(){n.apply(o,t)},e)}function Ct(n,e,t,r){var i=-1,s=Vt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=mn(e,zn(t))),r?(s=ii,l=!1):e.length>=H&&(s=gt,l=!1,e=new De(e));n:for(;++ii?0:i+t),r=r===o||r>i?i:$(r),r<0&&(r+=i),r=t>r?0:Oo(r);t0&&t(f)?e>1?Tn(f,e-1,t,r,i):Se(i,f):r||(i[i.length]=f)}return i}var wi=Ns(),ps=Ns(!0);function he(n,e){return n&&wi(n,e,Sn)}function yi(n,e){return n&&ps(n,e,Sn)}function hr(n,e){return Re(e,function(t){return Ie(n[t])})}function Ke(n,e){e=Pe(e,n);for(var t=0,r=e.length;n!=null&&te}function Ra(n,e){return n!=null&&un.call(n,e)}function Sa(n,e){return n!=null&&e in an(n)}function ba(n,e,t){return n>=On(e,t)&&n=120&&p.length>=120)?new De(l&&p):o}p=n[0];var v=-1,m=f[0];n:for(;++v-1;)f!==n&&rr.call(f,c,1),rr.call(n,c,1);return n}function Rs(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==s){var s=i;Ae(i)?rr.call(n,i,1):Ti(n,i)}}return n}function Si(n,e){return n+sr(ss()*(e-n+1))}function Ka(n,e,t,r){for(var i=-1,s=Rn(ur((e-n)/(t||1)),0),l=h(s);s--;)l[r?s:++i]=n,n+=t;return l}function bi(n,e){var t="";if(!n||e<1||e>ce)return t;do e%2&&(t+=n),e=sr(e/2),e&&(n+=n);while(e);return t}function U(n,e){return ki(to(n,e,Nn),n+"")}function Ga(n){return fs(ot(n))}function za(n,e){var t=ot(n);return Ir(t,Ne(e,0,t.length))}function St(n,e,t,r){if(!wn(n))return n;e=Pe(e,n);for(var i=-1,s=e.length,l=s-1,f=n;f!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=h(i);++r>>1,l=n[s];l!==null&&!kn(l)&&(t?l<=e:l=H){var d=e?null:rc(n);if(d)return Yt(d);l=!1,i=gt,c=new De}else c=e?[]:f;n:for(;++r=r?n:jn(n,e,t)}var $s=Ff||function(n){return En.clearTimeout(n)};function Fs(n,e){if(e)return n.slice();var t=n.length,r=es?es(t):new n.constructor(t);return n.copy(r),r}function Fi(n){var e=new n.constructor(n.byteLength);return new er(e).set(new er(n)),e}function Za(n,e){var t=e?Fi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Ya(n){var e=new n.constructor(n.source,gu.exec(n));return e.lastIndex=n.lastIndex,e}function Xa(n){return At?an(At.call(n)):{}}function Ws(n,e){var t=e?Fi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function Bs(n,e){if(n!==e){var t=n!==o,r=n===null,i=n===n,s=kn(n),l=e!==o,f=e===null,c=e===e,d=kn(e);if(!f&&!d&&!s&&n>e||s&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!s&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Us(n,e,t,r){for(var i=-1,s=n.length,l=t.length,f=-1,c=e.length,d=Rn(s-l,0),p=h(c+d),v=!r;++f1?t[i-1]:o,l=i>2?t[2]:o;for(s=n.length>3&&typeof s=="function"?(i--,s):o,l&&Wn(t[0],t[1],l)&&(s=i<3?o:s,i=1),e=an(e);++r-1?i[s?e[l]:l]:o}}function zs(n){return xe(function(e){var t=e.length,r=t,i=Jn.prototype.thru;for(n&&e.reverse();r--;){var s=e[r];if(typeof s!="function")throw new Xn(x);if(i&&!l&&xr(s)=="wrapper")var l=new Jn([],!0)}for(r=l?r:t;++r1&&q.reverse(),p&&cf))return!1;var d=s.get(n),p=s.get(e);if(d&&p)return d==e&&p==n;var v=-1,m=!0,A=t&fn?new De:o;for(s.set(n,e),s.set(e,n);++v1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(_l,`{ -/* [wrapped with `+e+`] */ -`)}function _c(n){return E(n)||He(n)||!!(is&&n&&n[is])}function Ae(n,e){var t=typeof n;return e=e??ce,!!e&&(t=="number"||t!="symbol"&&Cl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Kn)return arguments[0]}else e=0;return n.apply(o,arguments)}}function Ir(n,e){var t=-1,r=n.length,i=r-1;for(e=e===o?r:e;++t1?n[e-1]:o;return t=typeof t=="function"?(n.pop(),t):o,po(n,t)});function vo(n){var e=u(n);return e.__chain__=!0,e}function Ch(n,e){return e(n),n}function Cr(n,e){return e(n)}var Lh=xe(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(s){return mi(s,n)};return e>1||this.__actions__.length||!(r instanceof z)||!Ae(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Cr,args:[i],thisArg:o}),new Jn(r,this.__chain__).thru(function(s){return e&&!s.length&&s.push(o),s}))});function Rh(){return vo(this)}function Sh(){return new Jn(this.value(),this.__chain__)}function bh(){this.__values__===o&&(this.__values__=To(this.value()));var n=this.__index__>=this.__values__.length,e=n?o:this.__values__[this.__index__++];return{done:n,value:e}}function Eh(){return this}function Th(n){for(var e,t=this;t instanceof fr;){var r=lo(t);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Oh(){var n=this.__wrapped__;if(n instanceof z){var e=n;return this.__actions__.length&&(e=new z(this)),e=e.reverse(),e.__actions__.push({func:Cr,args:[qi],thisArg:o}),new Jn(e,this.__chain__)}return this.thru(qi)}function Ph(){return Os(this.__wrapped__,this.__actions__)}var $h=vr(function(n,e,t){un.call(n,t)?++n[t]:we(n,t,1)});function Fh(n,e,t){var r=E(n)?Hu:Ca;return t&&Wn(n,e,t)&&(e=o),r(n,C(e,3))}function Wh(n,e){var t=E(n)?Re:ds;return t(n,C(e,3))}var Bh=Gs(fo),Uh=Gs(ao);function Mh(n,e){return Tn(Lr(n,e),1)}function Dh(n,e){return Tn(Lr(n,e),pe)}function Nh(n,e,t){return t=t===o?1:$(t),Tn(Lr(n,e),t)}function go(n,e){var t=E(n)?Yn:Te;return t(n,C(e,3))}function mo(n,e){var t=E(n)?uf:_s;return t(n,C(e,3))}var Kh=vr(function(n,e,t){un.call(n,t)?n[t].push(e):we(n,t,[e])});function Gh(n,e,t,r){n=Mn(n)?n:ot(n),t=t&&!r?$(t):0;var i=n.length;return t<0&&(t=Rn(i+t,0)),Tr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Ye(n,e,t)>-1}var zh=U(function(n,e,t){var r=-1,i=typeof e=="function",s=Mn(n)?h(n.length):[];return Te(n,function(l){s[++r]=i?Gn(e,l,t):Lt(l,e,t)}),s}),Hh=vr(function(n,e,t){we(n,t,e)});function Lr(n,e){var t=E(n)?mn:ys;return t(n,C(e,3))}function kh(n,e,t,r){return n==null?[]:(E(e)||(e=e==null?[]:[e]),t=r?o:t,E(t)||(t=t==null?[]:[t]),Cs(n,e,t))}var qh=vr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Vh(n,e,t){var r=E(n)?ui:Zu,i=arguments.length<3;return r(n,C(e,4),t,i,Te)}function Zh(n,e,t){var r=E(n)?sf:Zu,i=arguments.length<3;return r(n,C(e,4),t,i,_s)}function Yh(n,e){var t=E(n)?Re:ds;return t(n,br(C(e,3)))}function Xh(n){var e=E(n)?fs:Ga;return e(n)}function Jh(n,e,t){(t?Wn(n,e,t):e===o)?e=1:e=$(e);var r=E(n)?wa:za;return r(n,e)}function Qh(n){var e=E(n)?ya:ka;return e(n)}function jh(n){if(n==null)return 0;if(Mn(n))return Tr(n)?Je(n):n.length;var e=Pn(n);return e==re||e==ie?n.size:Ci(n).length}function n_(n,e,t){var r=E(n)?si:qa;return t&&Wn(n,e,t)&&(e=o),r(n,C(e,3))}var e_=U(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Wn(n,e[0],e[1])?e=[]:t>2&&Wn(e[0],e[1],e[2])&&(e=[e[0]]),Cs(n,Tn(e,1),[])}),Rr=Wf||function(){return En.Date.now()};function t_(n,e){if(typeof e!="function")throw new Xn(x);return n=$(n),function(){if(--n<1)return e.apply(this,arguments)}}function wo(n,e,t){return e=t?o:e,e=n&&e==null?n.length:e,ye(n,O,o,o,o,o,e)}function yo(n,e){var t;if(typeof e!="function")throw new Xn(x);return n=$(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=o),t}}var Zi=U(function(n,e,t){var r=P;if(t.length){var i=be(t,ut(Zi));r|=on}return ye(n,r,e,t,i)}),xo=U(function(n,e,t){var r=P|M;if(t.length){var i=be(t,ut(xo));r|=on}return ye(e,r,n,t,i)});function Ao(n,e,t){e=t?o:e;var r=ye(n,G,o,o,o,o,o,e);return r.placeholder=Ao.placeholder,r}function Io(n,e,t){e=t?o:e;var r=ye(n,sn,o,o,o,o,o,e);return r.placeholder=Io.placeholder,r}function Co(n,e,t){var r,i,s,l,f,c,d=0,p=!1,v=!1,m=!0;if(typeof n!="function")throw new Xn(x);e=ee(e)||0,wn(t)&&(p=!!t.leading,v="maxWait"in t,s=v?Rn(ee(t.maxWait)||0,e):s,m="trailing"in t?!!t.trailing:m);function A(Cn){var le=r,Le=i;return r=i=o,d=Cn,l=n.apply(Le,le),l}function L(Cn){return d=Cn,f=Tt(D,e),p?A(Cn):l}function F(Cn){var le=Cn-c,Le=Cn-d,zo=e-le;return v?On(zo,s-Le):zo}function R(Cn){var le=Cn-c,Le=Cn-d;return c===o||le>=e||le<0||v&&Le>=s}function D(){var Cn=Rr();if(R(Cn))return q(Cn);f=Tt(D,F(Cn))}function q(Cn){return f=o,m&&r?A(Cn):(r=i=o,l)}function qn(){f!==o&&$s(f),d=0,r=c=i=f=o}function Bn(){return f===o?l:q(Rr())}function Vn(){var Cn=Rr(),le=R(Cn);if(r=arguments,i=this,c=Cn,le){if(f===o)return L(c);if(v)return $s(f),f=Tt(D,e),A(c)}return f===o&&(f=Tt(D,e)),l}return Vn.cancel=qn,Vn.flush=Bn,Vn}var r_=U(function(n,e){return hs(n,1,e)}),i_=U(function(n,e,t){return hs(n,ee(e)||0,t)});function u_(n){return ye(n,I)}function Sr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Xn(x);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var l=n.apply(this,r);return t.cache=s.set(i,l)||s,l};return t.cache=new(Sr.Cache||me),t}Sr.Cache=me;function br(n){if(typeof n!="function")throw new Xn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function s_(n){return yo(2,n)}var o_=Va(function(n,e){e=e.length==1&&E(e[0])?mn(e[0],zn(C())):mn(Tn(e,1),zn(C()));var t=e.length;return U(function(r){for(var i=-1,s=On(r.length,t);++i=e}),He=gs(function(){return arguments}())?gs:function(n){return xn(n)&&un.call(n,"callee")&&!rs.call(n,"callee")},E=h.isArray,A_=Mu?zn(Mu):Ta;function Mn(n){return n!=null&&Er(n.length)&&!Ie(n)}function In(n){return xn(n)&&Mn(n)}function I_(n){return n===!0||n===!1||xn(n)&&Fn(n)==at}var Fe=Uf||su,C_=Du?zn(Du):Oa;function L_(n){return xn(n)&&n.nodeType===1&&!Ot(n)}function R_(n){if(n==null)return!0;if(Mn(n)&&(E(n)||typeof n=="string"||typeof n.splice=="function"||Fe(n)||st(n)||He(n)))return!n.length;var e=Pn(n);if(e==re||e==ie)return!n.size;if(Et(n))return!Ci(n).length;for(var t in n)if(un.call(n,t))return!1;return!0}function S_(n,e){return Rt(n,e)}function b_(n,e,t){t=typeof t=="function"?t:o;var r=t?t(n,e):o;return r===o?Rt(n,e,o,t):!!r}function Xi(n){if(!xn(n))return!1;var e=Fn(n);return e==Kt||e==Xo||typeof n.message=="string"&&typeof n.name=="string"&&!Ot(n)}function E_(n){return typeof n=="number"&&us(n)}function Ie(n){if(!wn(n))return!1;var e=Fn(n);return e==Gt||e==hu||e==Yo||e==Qo}function Ro(n){return typeof n=="number"&&n==$(n)}function Er(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ce}function wn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function xn(n){return n!=null&&typeof n=="object"}var So=Nu?zn(Nu):$a;function T_(n,e){return n===e||Ii(n,e,Ni(e))}function O_(n,e,t){return t=typeof t=="function"?t:o,Ii(n,e,Ni(e),t)}function P_(n){return bo(n)&&n!=+n}function $_(n){if(vc(n))throw new b(tn);return ms(n)}function F_(n){return n===null}function W_(n){return n==null}function bo(n){return typeof n=="number"||xn(n)&&Fn(n)==ht}function Ot(n){if(!xn(n)||Fn(n)!=ve)return!1;var e=tr(n);if(e===null)return!0;var t=un.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Qt.call(t)==Of}var Ji=Ku?zn(Ku):Fa;function B_(n){return Ro(n)&&n>=-ce&&n<=ce}var Eo=Gu?zn(Gu):Wa;function Tr(n){return typeof n=="string"||!E(n)&&xn(n)&&Fn(n)==dt}function kn(n){return typeof n=="symbol"||xn(n)&&Fn(n)==zt}var st=zu?zn(zu):Ba;function U_(n){return n===o}function M_(n){return xn(n)&&Pn(n)==pt}function D_(n){return xn(n)&&Fn(n)==nl}var N_=yr(Li),K_=yr(function(n,e){return n<=e});function To(n){if(!n)return[];if(Mn(n))return Tr(n)?ue(n):Un(n);if(mt&&n[mt])return wf(n[mt]());var e=Pn(n),t=e==re?hi:e==ie?Yt:ot;return t(n)}function Ce(n){if(!n)return n===0?n:0;if(n=ee(n),n===pe||n===-pe){var e=n<0?-1:1;return e*Mr}return n===n?n:0}function $(n){var e=Ce(n),t=e%1;return e===e?t?e-t:e:0}function Oo(n){return n?Ne($(n),0,_n):0}function ee(n){if(typeof n=="number")return n;if(kn(n))return ke;if(wn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=wn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Yu(n);var t=xl.test(n);return t||Il.test(n)?ef(n.slice(2),t?2:8):yl.test(n)?ke:+n}function Po(n){return _e(n,Dn(n))}function G_(n){return n?Ne($(n),-ce,ce):n===0?n:0}function nn(n){return n==null?"":Hn(n)}var z_=rt(function(n,e){if(Et(e)||Mn(e)){_e(e,Sn(e),n);return}for(var t in e)un.call(e,t)&&It(n,t,e[t])}),$o=rt(function(n,e){_e(e,Dn(e),n)}),Or=rt(function(n,e,t,r){_e(e,Dn(e),n,r)}),H_=rt(function(n,e,t,r){_e(e,Sn(e),n,r)}),k_=xe(mi);function q_(n,e){var t=tt(n);return e==null?t:as(t,e)}var V_=U(function(n,e){n=an(n);var t=-1,r=e.length,i=r>2?e[2]:o;for(i&&Wn(e[0],e[1],i)&&(r=1);++t1),s}),_e(n,Mi(n),t),r&&(t=Qn(t,Z|yn|k,ic));for(var i=e.length;i--;)Ti(t,e[i]);return t});function cd(n,e){return Wo(n,br(C(e)))}var hd=xe(function(n,e){return n==null?{}:Da(n,e)});function Wo(n,e){if(n==null)return{};var t=mn(Mi(n),function(r){return[r]});return e=C(e),Ls(n,t,function(r,i){return e(r,i[0])})}function _d(n,e,t){e=Pe(e,n);var r=-1,i=e.length;for(i||(i=1,n=o);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=ss();return On(n+i*(e-n+nf("1e-"+((i+"").length-1))),e)}return Si(n,e)}var Cd=it(function(n,e,t){return e=e.toLowerCase(),n+(t?Mo(e):e)});function Mo(n){return nu(nn(n).toLowerCase())}function Do(n){return n=nn(n),n&&n.replace(Ll,df).replace(Hl,"")}function Ld(n,e,t){n=nn(n),e=Hn(e);var r=n.length;t=t===o?r:Ne($(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Rd(n){return n=nn(n),n&&ul.test(n)?n.replace(pu,pf):n}function Sd(n){return n=nn(n),n&&cl.test(n)?n.replace(Yr,"\\$&"):n}var bd=it(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ed=it(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Td=Ks("toLowerCase");function Od(n,e,t){n=nn(n),e=$(e);var r=e?Je(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return wr(sr(i),t)+n+wr(ur(i),t)}function Pd(n,e,t){n=nn(n),e=$(e);var r=e?Je(n):0;return e&&r>>0,t?(n=nn(n),n&&(typeof e=="string"||e!=null&&!Ji(e))&&(e=Hn(e),!e&&Xe(n))?$e(ue(n),0,t):n.split(e,t)):[]}var Dd=it(function(n,e,t){return n+(t?" ":"")+nu(e)});function Nd(n,e,t){return n=nn(n),t=t==null?0:Ne($(t),0,n.length),e=Hn(e),n.slice(t,t+e.length)==e}function Kd(n,e,t){var r=u.templateSettings;t&&Wn(n,e,t)&&(e=o),n=nn(n),e=Or({},e,r,Zs);var i=Or({},e.imports,r.imports,Zs),s=Sn(i),l=ci(i,s),f,c,d=0,p=e.interpolate||Ht,v="__p += '",m=_i((e.escape||Ht).source+"|"+p.source+"|"+(p===vu?wl:Ht).source+"|"+(e.evaluate||Ht).source+"|$","g"),A="//# sourceURL="+(un.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yl+"]")+` -`;n.replace(m,function(R,D,q,qn,Bn,Vn){return q||(q=qn),v+=n.slice(d,Vn).replace(Rl,vf),D&&(f=!0,v+=`' + -__e(`+D+`) + -'`),Bn&&(c=!0,v+=`'; -`+Bn+`; -__p += '`),q&&(v+=`' + -((__t = (`+q+`)) == null ? '' : __t) + -'`),d=Vn+R.length,R}),v+=`'; -`;var L=un.call(e,"variable")&&e.variable;if(!L)v=`with (obj) { -`+v+` -} -`;else if(gl.test(L))throw new b(V);v=(c?v.replace(el,""):v).replace(tl,"$1").replace(rl,"$1;"),v="function("+(L||"obj")+`) { -`+(L?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(f?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+v+`return __p -}`;var F=Ko(function(){return J(s,A+"return "+v).apply(o,l)});if(F.source=v,Xi(F))throw F;return F}function Gd(n){return nn(n).toLowerCase()}function zd(n){return nn(n).toUpperCase()}function Hd(n,e,t){if(n=nn(n),n&&(t||e===o))return Yu(n);if(!n||!(e=Hn(e)))return n;var r=ue(n),i=ue(e),s=Xu(r,i),l=Ju(r,i)+1;return $e(r,s,l).join("")}function kd(n,e,t){if(n=nn(n),n&&(t||e===o))return n.slice(0,ju(n)+1);if(!n||!(e=Hn(e)))return n;var r=ue(n),i=Ju(r,ue(e))+1;return $e(r,0,i).join("")}function qd(n,e,t){if(n=nn(n),n&&(t||e===o))return n.replace(Xr,"");if(!n||!(e=Hn(e)))return n;var r=ue(n),i=Xu(r,ue(e));return $e(r,i).join("")}function Vd(n,e){var t=j,r=bn;if(wn(e)){var i="separator"in e?e.separator:i;t="length"in e?$(e.length):t,r="omission"in e?Hn(e.omission):r}n=nn(n);var s=n.length;if(Xe(n)){var l=ue(n);s=l.length}if(t>=s)return n;var f=t-Je(r);if(f<1)return r;var c=l?$e(l,0,f).join(""):n.slice(0,f);if(i===o)return c+r;if(l&&(f+=c.length-f),Ji(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=_i(i.source,nn(gu.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var v=d.index;c=c.slice(0,v===o?f:v)}}else if(n.indexOf(Hn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Zd(n){return n=nn(n),n&&il.test(n)?n.replace(du,If):n}var Yd=it(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),nu=Ks("toUpperCase");function No(n,e,t){return n=nn(n),e=t?o:e,e===o?mf(n)?Rf(n):ff(n):n.match(e)||[]}var Ko=U(function(n,e){try{return Gn(n,o,e)}catch(t){return Xi(t)?t:new b(t)}}),Xd=xe(function(n,e){return Yn(e,function(t){t=de(t),we(n,t,Zi(n[t],n))}),n});function Jd(n){var e=n==null?0:n.length,t=C();return n=e?mn(n,function(r){if(typeof r[1]!="function")throw new Xn(x);return[t(r[0]),r[1]]}):[],U(function(r){for(var i=-1;++ice)return[];var t=_n,r=On(n,_n);e=C(e),n-=_n;for(var i=ai(r,e);++t0||e<0)?new z(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=$(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},z.prototype.toArray=function(){return this.take(_n)},he(z.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof z,d=f[0],p=c||E(l),v=function(D){var q=i.apply(u,Se([D],f));return r&&m?q[0]:q};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,A=!!this.__actions__.length,L=s&&!m,F=c&&!A;if(!s&&p){l=F?l:new z(this);var R=n.apply(l,f);return R.__actions__.push({func:Cr,args:[v],thisArg:o}),new Jn(R,m)}return L&&F?n.apply(this,f):(R=this.thru(v),L?r?R.value()[0]:R.value():R)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Xt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(E(s)?s:[],i)}return this[t](function(l){return e.apply(E(l)?l:[],i)})}}),he(z.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";un.call(et,r)||(et[r]=[]),et[r].push({name:e,func:t})}}),et[gr(o,M).name]=[{name:"wrapper",func:o}],z.prototype.clone=Zf,z.prototype.reverse=Yf,z.prototype.value=Xf,u.prototype.at=Lh,u.prototype.chain=Rh,u.prototype.commit=Sh,u.prototype.next=bh,u.prototype.plant=Th,u.prototype.reverse=Oh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Ph,u.prototype.first=u.prototype.head,mt&&(u.prototype[mt]=Eh),u},Qe=Sf();Be?((Be.exports=Qe)._=Qe,ti._=Qe):En._=Qe}).call(Pt)})(Fr,Fr.exports);var Zv=Fr.exports;const Yv=Mp(Zv),Dt=K=>(au("data-v-7d75d07a"),K=K(),cu(),K),Xv={class:"my-order"},Jv=Dt(()=>g("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Qv={class:"nav-item-input"},jv={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},ng=["onClick"],eg={class:"shop-name"},tg={key:0,class:"shop-price"},rg=Dt(()=>g("span",{class:"unit-name"},"活动价:",-1)),ig={key:0,class:"unit-name"},ug={key:1,class:"shop-price"},sg=Dt(()=>g("span",{class:"unit-name"},"原价: ",-1)),og={class:"unit-name del"},lg={key:2,class:"shop-price"},fg={class:"unit-name"},ag={key:3,class:"no-stock"},cg=Dt(()=>g("div",null,[g("span",null,"暂无"),g("span",null,"库存")],-1)),hg=[cg],_g={key:4,class:"no-stock"},dg=Dt(()=>g("div",null,[g("span",null,"平台"),g("span",null,"关闭")],-1)),pg=[dg],vg={key:1,class:"no-data"},gg={__name:"shop",props:{storeList:{type:Array,default:()=>[]},priceKey:{type:Object,default:()=>({})},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(K,{expose:An,emit:o}){const T=S(null),H=o,tn=S(""),x=()=>{H("loadMore",{store_name_code:tn.value})},V=y=>{if(y.is_used==0)return $t.error("该商品已被平台关闭");if(y.stock==0)return $t.warning("该商品无库存");H("changeItem",y)},cn=Yv.throttle(()=>{let y={store_name:tn.value};H("getStoreList",y,!0)},300);An({name:tn,inputBlur:()=>{var y;(y=T.value)==null||y.blur()}});const Q=S(!1),Z=()=>{Q.value=!0},yn=()=>{Q.value=!1},k=()=>{var y;(y=T.value)==null||y.focus()};return Ut(()=>{lu(()=>{var y;(y=T.value)==null||y.focus(),Z()}),te.on("shift",k)}),Mt(()=>{te.off("shift",k)}),(y,fn)=>{const P=en("el-input"),M=en("Search"),rn=en("el-icon"),G=en("el-button"),sn=en("el-image"),on=en("el-space"),Y=en("el-empty"),O=Ft("loading"),gn=Ft("infinite-scroll");return B(),X("div",Xv,[g("div",{class:$r(["header-nav",{"input-focus":Q.value}])},[Jv,g("div",Qv,[W(P,{modelValue:tn.value,"onUpdate:modelValue":fn[0]||(fn[0]=I=>tn.value=I),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:T,onFocus:Z,onBlur:yn,onKeyup:qo(Pr(cn),["enter"]),onClear:Pr(cn)},null,8,["modelValue","onKeyup","onClear"])]),g("div",{class:"nav-item-btn",onClick:fn[1]||(fn[1]=(...I)=>Pr(cn)&&Pr(cn)(...I))},[W(G,{class:"btn",type:"primary"},{default:pn(()=>[W(rn,null,{default:pn(()=>[W(M)]),_:1})]),_:1})])],2),fu((B(),X("div",jv,[K.storeList.length?(B(),We(on,{key:0,wrap:"",size:14},{default:pn(()=>[(B(!0),X(Wt,null,Bt(K.storeList,(I,j)=>(B(),X("div",{class:"shop-item",key:j,onClick:bn=>V(I)},[W(sn,{loading:"lazy",src:I.image},null,8,["src"]),g("div",eg,N(I.store_name),1),K.priceKey.off_activity==1?(B(),X("div",tg,[rg,ln(" ¥"),g("span",null,N(I[K.priceKey.price]),1),I.unit_name?(B(),X("span",ig,"/"+N(I.unit_name),1)):fe("",!0)])):fe("",!0),K.priceKey.off_activity==1?(B(),X("div",ug,[sg,ln(),g("span",og,"¥"+N(I[K.priceKey.op_price])+" /"+N(I.unit_name),1)])):(B(),X("div",lg,[ln(" ¥"),g("span",null,N(I[K.priceKey.op_price]),1),g("span",fg,"/"+N(I.unit_name),1)])),I.stock==0?(B(),X("div",ag,hg)):fe("",!0),I.is_used==0?(B(),X("div",_g,pg)):fe("",!0)],8,ng))),128))]),_:1})):fe("",!0),K.storeList.length?fe("",!0):(B(),X("div",vg,[W(Y,{"image-size":200,description:"没有找到对应商品"})]))])),[[O,K.loading],[gn,x]])])}}},mg=lt(gg,[["__scopeId","data-v-7d75d07a"]]),Vo=K=>(au("data-v-6c040b11"),K=K(),cu(),K),wg={class:"shop"},yg={class:"shop-info"},xg={class:"shop-info-left"},Ag={class:"shop-info-right"},Ig={class:"shop-info-right-top"},Cg={key:0,class:"shop-info-right-price"},Lg=Vo(()=>g("span",{class:"unit-name"},"活动价:",-1)),Rg={key:0,class:"unit-name"},Sg={key:1,class:"shop-info-right-price"},bg=Vo(()=>g("span",{class:"unit-name"},"原价: ",-1)),Eg={class:"unit-name del"},Tg={key:2,class:"shop-info-right-price"},Og={class:"unit-name"},Pg={class:"shop-sku"},$g={class:"title"},Fg={class:"sku"},Wg={class:"dialog-footer"},Bg={__name:"pupop",props:{priceKey:{type:Object,default:()=>({})}},emits:["changeItem"],setup(K,{expose:An,emit:o}){const T=S(!1),H=S(null),tn=k=>{T.value=k},x=S({}),V=S(!1),cn=S("add"),hn=(k,y="add")=>{cn.value=y,x.value=JSON.parse(JSON.stringify(k))},Q=o,Z=()=>{x.value.cart_num||(x.value.cart_num=x.value.batch>0?x.value.batch:1),Q("changeItem",x.value),T.value=!1};An({show:tn,setForm:hn});const yn=()=>{T.value&&Z()};return Ut(()=>{te.on("enter",yn)}),Mt(()=>{te.off("enter",yn)}),(k,y)=>{const fn=en("el-image"),P=en("el-input-number"),M=en("el-button"),rn=en("el-dialog"),G=Ft("loading");return B(),We(rn,{modelValue:T.value,"onUpdate:modelValue":y[1]||(y[1]=sn=>T.value=sn),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=sn=>H.value.focus())},Dp({default:pn(()=>[fu((B(),X("div",wg,[g("div",yg,[g("div",xg,[W(fn,{loading:"lazy",src:x.value.image},null,8,["src"])]),g("div",Ag,[g("div",Ig,N(x.value.store_name),1),g("div",null,[K.priceKey.off_activity==1?(B(),X("div",Cg,[Lg,ln(" ¥"),g("span",null,N(x.value[K.priceKey.price]),1),x.value.unit_name?(B(),X("span",Rg,"/"+N(x.value.unit_name),1)):fe("",!0)])):fe("",!0),K.priceKey.off_activity==1?(B(),X("div",Sg,[bg,ln(),g("span",Eg,"¥"+N(x.value[K.priceKey.op_price])+" /"+N(x.value.unit_name),1)])):(B(),X("div",Tg,[ln(" ¥"),g("span",null,N(x.value[K.priceKey.op_price]),1),g("span",Og,"/"+N(x.value.unit_name),1)]))])])]),g("div",Pg,[g("div",$g,"购买数量 ( "+N(x.value.unit_name)+" )",1),g("div",Fg,[W(P,{ref_key:"inputRef",ref:H,modelValue:x.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=sn=>x.value.cart_num=sn),placeholder:`请输入数量(默认为${+x.value.batch>0?x.value.batch:"1"})`,min:+x.value.batch>0?+x.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[G,V.value]])]),_:2},[cn.value!="add"&&x.value.attr&&x.value.attr.length==1?void 0:{name:"footer",fn:pn(()=>[g("div",Wg,[W(M,{class:"ok-btn",type:"primary",onClick:Z},{default:pn(()=>[ln(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},Ug=lt(Bg,[["__scopeId","data-v-6c040b11"]]),Mg=["onClick","onMousemove"],Dg=["onMousemove"],Ng={class:"title"},Kg={class:"list"},Gg=["onClick"],zg={__name:"classify",emits:["getStoreList"],setup(K,{emit:An}){const o=An,T=S([]),H=S([]),tn=S([]),x=S(-1),V=S(-1),cn=S(-1),hn=S(-1),Q=S(!1),Z=Wr();(()=>{ou({pid:0,page_no:1,page_size:30,level:1,store_id:Z.userInfo.store_id}).then(P=>{T.value=P.data.lists,x.value=-1})})();const k=P=>{ou({pid:P,page_no:1,page_size:30,level:2,store_id:Z.userInfo.store_id}).then(M=>{H.value=M.data.lists})},y=P=>{ou({pid:P,page_no:1,page_size:30,level:3,store_id:Z.userInfo.store_id}).then(M=>{tn.value=M.data.lists})},fn=(P=-1,M=1)=>{hn.value=P,Q.value=!0;let rn="";console.log(P,M),M==1?(x.value=P,V.value=-1,cn.value=-1,P!=-1&&(rn=T.value[P].id),k(rn),o("getStoreList",{top_cate_id:rn,two_cate_id:null},!0)):M==2&&(V.value=P,cn.value=-1,P!=-1&&(rn=H.value[P].id),y(rn),o("getStoreList",{two_cate_id:rn},!0))};return(P,M)=>{const rn=en("el-popover");return B(),X("div",{class:"classify",onMouseout:M[2]||(M[2]=G=>Q.value?Q.value=!1:Q.value=!0)},[g("div",{class:$r(["itemP",{"itemP-active":x.value==-1}]),onClick:M[0]||(M[0]=G=>fn(-1))},N("全部"),2),(B(!0),X(Wt,null,Bt(T.value,(G,sn)=>(B(),We(rn,{placement:"left",width:"20rem",trigger:"click",key:sn,visible:sn==x.value&&hn.value==sn},{reference:pn(()=>[g("div",{class:$r(["itemP",{"itemP-active":sn==x.value}]),onClick:on=>fn(sn),onMousemove:on=>hn.value=sn},N(G.name),43,Mg)]),default:pn(()=>[g("div",{class:"active-card",onMouseout:M[1]||(M[1]=on=>hn.value=-1),onMousemove:on=>hn.value=sn},[g("div",Ng,N(G.name),1),g("div",Kg,[(B(!0),X(Wt,null,Bt(H.value,(on,Y)=>(B(),X("div",{class:$r({"list-active":Y==V.value}),link:"",type:"primary",key:on.id,onClick:O=>fn(Y,2)},N(on.name),11,Gg))),128))])],40,Dg)]),_:2},1032,["visible"]))),128))],32)}}},Hg=lt(zg,[["__scopeId","data-v-4d5623b0"]]),kg={class:"my-card"},t1={__name:"index",setup(K){const An=S(null),o=S(null),T=S(null),H=S(null),tn=S([]),x=Np({off_activity:"",op_price:"",price:""}),V=Wr(),cn=Kp(),hn=S({page_no:1,page_size:30}),Q=S(!1),Z=(O={},gn=!1)=>{var I;hn.value={...hn.value,...O},gn&&(tn.value=[],hn.value.page_no=1,yn.value=!1),Q.value=!0,zp({...hn.value,store_id:(I=V.userInfo)==null?void 0:I.store_id}).then(j=>{var bn,Kn;Q.value=!1;for(let $n in j.data.extend)x[$n]=j.data.extend[$n];((Kn=(bn=j.data)==null?void 0:bn.lists)==null?void 0:Kn.length){yn.value||Z(O)};function y(O){return/^\d+$/.test(O)}const fn=(O,gn="")=>{console.log(O,gn);let I={product_id:O.product_id,cart_num:O.cart_num};ko(I).then(j=>{o.value.getList()})},P=(O,gn)=>{An.value.setForm(O,"add"),An.value.show(!0)},M=O=>{An.value.setForm(O,"edit"),An.value.show(!0)},rn=S({}),G=()=>{var I,j;let O=o.value.list.map(bn=>bn.id),gn={cart_id:O,uid:((j=(I=o.value)==null?void 0:I.userInfo)==null?void 0:j.uid)||""};o.value.discounts>0&&(gn.deduction_price=o.value.discounts.toFixed(2),gn.pay_type="micropay"),Up(gn).then(bn=>{var Kn,$n,ae;rn.value=bn.data.order,H.value.setForm({data:bn.data.order,cart_id:O,uid:(($n=(Kn=o.value)==null?void 0:Kn.userInfo)==null?void 0:$n.uid)||"",is_storage:(ae=o.value)!=null&&ae.is_storage?1:0})})},sn=()=>{var O,gn,I;if((O=o.value)!=null&&O.is_storage&&!((I=(gn=o.value)==null?void 0:gn.userInfo)!=null&&I.uid))return $t.error("选择用户才可以存货");G(),H.value.drawer=!0},on=(O=null)=>{setTimeout(()=>{o.value.resetView()})},Y=()=>{cn.name=="saleHome"&&(!H.value.drawer&&o.value.list.length>0?sn():H.value.beforeClose())};return Ut(()=>{Z(),te.on("F9",Y)}),Mt(()=>{te.off("F9",Y)}),(O,gn)=>(B(),X("div",kg,[W(Vv,{ref_key:"orderRef",ref:o,onGoPay:sn,onEditPupop:M},null,512),W(Ho),W(mg,{ref_key:"shopRef",ref:T,style:{flex:"1"},storeList:tn.value,priceKey:x,loading:Q.value,onGetStoreList:Z,onChangeItem:P,onLoadMore:k},null,8,["storeList","priceKey","loading"]),W(Ug,{ref_key:"pupopRef",ref:An,priceKey:x,onChangeItem:fn},null,8,["priceKey"]),W(Ho),W(Hg,{ref:"classifyRef",onGetStoreList:Z},null,512),W(Hp,{ref_key:"payRef",ref:H,onPaySuccess:on},null,512)]))}};export{t1 as default}; diff --git a/build/assets/index-FaoBXU76.js b/build/assets/index-FaoBXU76.js deleted file mode 100644 index 922884e..0000000 --- a/build/assets/index-FaoBXU76.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as E,u as K,r as n,o as P,m as b,a as j,b as p,h as z,c as o,k as i,e,f as d,w as r,g as y,i as oe,j as B,F as T,l as F,z as O,t as l,d as R,p as w,q,s as G,D as ae}from"./index-DFqeFzc7.js";import{s as ie,d as le}from"./store-pG1SPGrt.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ne}from"./padding-BlCym4iJ.js";const H=f=>(q("data-v-44aa5565"),f=f(),G(),f),de={class:"my-order"},_e={class:"header-nav"},ce=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},$e={class:"money"},be={class:"count"},we={class:"bottom"},De={class:"pay"},Ve={key:0},Ce={key:1},Ye={key:2},xe={key:3},ze={key:4},Se={key:5},Ie={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Ue={key:1,class:"load-end"},Be=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Le={class:"dialog-footer"},Ne={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f){K(),n([]);const s=n(1),D=v=>{_.value.page_no=1,m.value=!1,c.value=!1,h.value=[],g(!0)};n(null);const k=n(""),S=()=>{_.value.start_time=A(k.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A(k.value[1]).format("YYYY-MM-DD 23:59:59"),g(!0)},I=v=>v.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),c=n(!1),L=n(0),V=n(0),m=n(!1),h=n([]),g=(v=!1)=>{if(v)_.value.page_no=1;else if(m.value||c.value)return;c.value=!0,s.value==1&&(_.value.paid=null),s.value==2&&(_.value.paid=0),ie(_.value).then(a=>{v?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&b.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?m.value=!0:_.value.page_no++,V.value=0,L.value=a.data.count,c.value=!1}).catch(a=>{m.value=!0,c.value=!1})},M=(v,a)=>{V.value=a,b.emit("set-sale-order-detail",v)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",v=>{console.log("==="),h.value[V.value].paid=1}),b.on("new_order",()=>{$.value||($.value=!0)})}),j(()=>{b.off("update-sale-order-detail"),b.off("new_order")}),(v,a)=>{const C=p("el-radio-button"),Y=p("el-radio-group"),J=p("el-date-picker"),x=p("el-button"),Q=p("el-input"),W=p("el-image"),X=p("spna"),Z=p("el-dialog"),ee=z("loading"),te=z("infinite-scroll");return o(),i("div",de,[e("div",_e,[ce,e("div",re,[d(Y,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=t=>s.value=t),onChange:D,size:"small"},{default:r(()=>[d(C,{value:1},{default:r(()=>[y("全部")]),_:1}),d(C,{value:2},{default:r(()=>[y("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:k.value,"onUpdate:modelValue":a[1]||(a[1]=t=>k.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":I,onChange:S,clearable:!1,style:{width:"10rem",margin:"0 1rem"}},null,8,["modelValue"]),d(x,{size:"small"},{default:r(()=>[y("重置")]),_:1})])]),e("div",ue,[d(Q,{modelValue:_.value.order_id,"onUpdate:modelValue":a[3]||(a[3]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[4]||(a[4]=oe(t=>g(!0),["enter"])),onClear:a[5]||(a[5]=t=>g(!0)),clearable:""},{append:r(()=>[d(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[2]||(a[2]=t=>g(!0))},{default:r(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),B((o(),i("div",ve,[(o(!0),i(T,null,F(h.value,(t,U)=>(o(),i("div",{class:O(["item",{"item-active":V.value==U}]),key:U,onClick:N=>M(t,U)},[e("div",fe,[e("div",{class:O(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",me,l(t.pay_time),1)]),e("div",he,[t.product_info?(o(),i("div",ye,[(o(!0),i(T,null,F(t.product_info.slice(0,5),(N,se)=>(o(),R(W,{key:se,src:N.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(o(),i("div",ge,l(t.product_info[0].store_name),1)):w("",!0)])):w("",!0),e("div",ke,[e("div",$e,"¥"+l(t.pay_price),1),e("div",be,"共"+l(t.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[t.paid?(o(),i("div",Ve,[y(l(t.paid_name)+" ",1),t.pay_type_name?(o(),R(X,{key:0},{default:r(()=>[y("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(o(),i("span",Ce,"(微信收款)")):t.pay_type==17?(o(),i("span",Ye,"(现金支付)")):t.pay_type==13?(o(),i("span",xe,"(支付宝收款)")):t.pay_type==3?(o(),i("span",ze,"(余额支付)")):t.pay_type==1?(o(),i("span",Se,"(微信支付)")):w("",!0)])):(o(),i("div",Ie,l(t.paid_name),1))])])],10,pe))),128)),m.value?(o(),i("div",Me,"没有更多了")):w("",!0),c.value?(o(),i("div",Ue,"加载中...")):w("",!0)])),[[ee,c.value],[te,g]]),d(Z,{modelValue:$.value,"onUpdate:modelValue":a[8]||(a[8]=t=>$.value=t),title:"新订单提醒",width:"500"},{footer:r(()=>[e("div",Le,[d(x,{onClick:a[6]||(a[6]=t=>$.value=!1)},{default:r(()=>[y("稍后刷新")]),_:1}),d(x,{type:"primary",onClick:a[7]||(a[7]=t=>{g(!0),$.value=!1})},{default:r(()=>[y(" 立即刷新 ")]),_:1})])]),default:r(()=>[Be]),_:1},8,["modelValue"])])}}},Te=E(Ne,[["__scopeId","data-v-44aa5565"]]),u=f=>(q("data-v-0f1c9a1a"),f=f(),G(),f),Fe={class:"my-order"},Oe={key:0,class:"detail"},Re={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ae=u(()=>e("div",{class:"table-title"},"订单信息",-1)),Ee={class:"table-info"},Ke={class:"info-item"},Pe=u(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=u(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=u(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=u(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=u(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=u(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=u(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=u(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=u(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Dt={class:"info-item"},Vt=u(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Ct={class:"info-item-info"},Yt={class:"info-item"},xt=u(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},St={style:{"font-size":"0.9rem"}},It={style:{color:"#ff4a00"}},Mt={style:{display:"flex","align-items":"center"}},Ut={style:{"margin-left":"0.5rem"}},Bt=u(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:1},Nt={__name:"detail",setup(f){K(),ae();const s=n({id:""});n([]),n(null);const D=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const k=n({page_no:1,page_size:15,loadend:!1,loading:!1}),S=n([]),I=()=>console.log("触底"),_=()=>{D.value=!0,le({id:s.value.id}).then(c=>{s.value=c.data,setTimeout(()=>{D.value=!1},200)})};return P(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),s.value=c,k.value.page_no=1,k.value.loadend=!1,k.value.loading=!1,S.value=[],_()})}),j(()=>{b.off("set-sale-order-detail")}),(c,L)=>{var v;const V=p("el-image"),m=p("el-table-column"),h=p("el-table"),g=p("el-empty"),M=z("infinite-scroll"),$=z("loading");return o(),i("div",Fe,[s.value.id?B((o(),i("div",Oe,[B((o(),i("div",Re,[Ae,e("div",Ee,[e("div",Ke,[Pe,e("div",je,l(s.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(s.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(s.value.pay_price),1)]),e("div",Xe,[Ze,e("div",et,l(s.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(s.value.deduction_price),1)]),e("div",at,[it,e("div",lt,"¥"+l(s.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(s.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[s.value.pay_type_name?(o(),i("span",vt,l(s.value.pay_type_name),1)):s.value.pay_type==9?(o(),i("span",pt,"微信收款")):s.value.pay_type==17?(o(),i("span",ft,"现金支付")):s.value.pay_type==13?(o(),i("span",mt,"支付宝收款")):s.value.pay_type==3?(o(),i("span",ht,"余额支付")):s.value.pay_type==1?(o(),i("span",yt,"微信支付")):w("",!0)])])]),s.value.uid?(o(),i("div",gt,"用户信息")):w("",!0),s.value.uid?(o(),i("div",kt,[e("div",$t,[bt,e("div",wt,l(s.value.uid),1)]),e("div",Dt,[Vt,e("div",Ct,l(s.value.nickname),1)]),e("div",Yt,[xt,e("div",zt,l(s.value.mobile),1)])])):w("",!0),e("div",St,[y(" 共计 "),e("span",It,l(((v=s.value.product)==null?void 0:v.length)||" "),1),y(" 款商品 ")]),d(h,{data:s.value.product},{default:r(()=>[d(m,{label:"商品信息"},{default:r(({row:a})=>{var C,Y;return[e("div",Mt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(C=a.cart_info)==null?void 0:C.image},null,8,["src"]),e("span",Ut,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(m,{prop:"cart_info.price",label:"单价",width:"150"}),d(m,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(m,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Bt])),[[M,I]])])),[[$,D.value]]):(o(),i("div",Lt,[d(g)]))])}}},Tt=E(Nt,[["__scopeId","data-v-0f1c9a1a"]]),Ft={class:"my-card"},Pt={__name:"index",setup(f){return(s,D)=>(o(),i("div",Ft,[d(Te,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ne),d(Tt,{ref:"detailRef"},null,512)]))}};export{Pt as default}; diff --git a/build/assets/index-JScXvOtN.js b/build/assets/index-JScXvOtN.js new file mode 100644 index 0000000..6669df6 --- /dev/null +++ b/build/assets/index-JScXvOtN.js @@ -0,0 +1 @@ +import{_ as E,u as K,r as n,o as P,m as b,a as j,b as p,h as x,c as o,k as i,e,f as d,w as v,g,i as oe,j as B,F as T,l as F,z as O,t as l,d as R,p as w,q,s as G,D as ae}from"./index-zqjuu94d.js";import{s as ie,d as le}from"./store-B9VgAm7I.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ne}from"./padding-SV9GOhiy.js";const H=f=>(q("data-v-97f2bd1d"),f=f(),G(),f),de={class:"my-order"},_e={class:"header-nav"},ce=H(()=>e("div",{class:"nav-item"},l("线上订单"),-1)),re={class:"nav-item-btn"},ue={class:"header-input"},ve={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},pe=["onClick"],fe={class:"top"},me={class:"create-time"},he={class:"shop"},ye={key:0,class:"left"},ge={key:0,class:"shop-name"},ke={class:"right"},$e={class:"money"},be={class:"count"},we={class:"bottom"},De={class:"pay"},Ve={key:0},Ce={key:1},Ye={key:2},xe={key:3},ze={key:4},Se={key:5},Ie={key:1,style:{color:"#ff4a00"}},Me={key:0,class:"load-end"},Ue={key:1,class:"load-end"},Be=H(()=>e("span",null,"您有新订单了, 是否立即刷新",-1)),Le={class:"dialog-footer"},Ne={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(f){K(),n([]);const s=n(1),D=u=>{_.value.page_no=1,m.value=!1,c.value=!1,h.value=[],y(!0)};n(null);const k=n(""),z=()=>{_.value.start_time=A(k.value[0]).format("YYYY-MM-DD 00:00:00"),_.value.end_time=A(k.value[1]).format("YYYY-MM-DD 23:59:59"),y(!0)},S=u=>u.getTime()>Date.now(),_=n({page_no:1,page_size:20,order_id:"",start_time:"",end_time:"",is_sashier:2}),c=n(!1),L=n(0),V=n(0),m=n(!1),h=n([]),y=(u=!1)=>{if(u)_.value.page_no=1;else if(m.value||c.value)return;c.value=!0,s.value==1&&(_.value.paid=null),s.value==2&&(_.value.paid=0),ie(_.value).then(a=>{u?h.value=a.data.lists:h.value=[...h.value,...a.data.lists],_.value.page_no==1&&h.value.length>0&&b.emit("set-sale-order-detail",h.value[0]),a.data.lists.length<_.value.page_size?m.value=!0:_.value.page_no++,V.value=0,L.value=a.data.count,c.value=!1}).catch(a=>{m.value=!0,c.value=!1})},I=(u,a)=>{V.value=a,b.emit("set-sale-order-detail",u)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",u=>{console.log("==="),h.value[V.value].paid=1}),b.on("new_order",()=>{$.value||($.value=!0)})}),j(()=>{b.off("update-sale-order-detail"),b.off("new_order")}),(u,a)=>{const C=p("el-radio-button"),Y=p("el-radio-group"),J=p("el-date-picker"),M=p("el-button"),Q=p("el-input"),W=p("el-image"),X=p("spna"),Z=p("el-dialog"),ee=x("loading"),te=x("infinite-scroll");return o(),i("div",de,[e("div",_e,[ce,e("div",re,[d(Y,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=t=>s.value=t),onChange:D,size:"small"},{default:v(()=>[d(C,{value:1},{default:v(()=>[g("全部")]),_:1}),d(C,{value:2},{default:v(()=>[g("未支付")]),_:1})]),_:1},8,["modelValue"]),d(J,{modelValue:k.value,"onUpdate:modelValue":a[1]||(a[1]=t=>k.value=t),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD","disabled-date":S,onChange:z,clearable:!1,style:{width:"10rem",margin:"0 0 0 1rem"}},null,8,["modelValue"])])]),e("div",ue,[d(Q,{modelValue:_.value.order_id,"onUpdate:modelValue":a[3]||(a[3]=t=>_.value.order_id=t),placeholder:"请输入订单编号",onKeydown:a[4]||(a[4]=oe(t=>y(!0),["enter"])),onClear:a[5]||(a[5]=t=>y(!0)),clearable:""},{append:v(()=>[d(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[2]||(a[2]=t=>y(!0))},{default:v(()=>[g("搜索")]),_:1})]),_:1},8,["modelValue"])]),B((o(),i("div",ve,[(o(!0),i(T,null,F(h.value,(t,U)=>(o(),i("div",{class:O(["item",{"item-active":V.value==U}]),key:U,onClick:N=>I(t,U)},[e("div",fe,[e("div",{class:O(["sn","cahier"])},"单号: "+l(t.order_id),1),e("div",me,l(t.pay_time),1)]),e("div",he,[t.product_info?(o(),i("div",ye,[(o(!0),i(T,null,F(t.product_info.slice(0,5),(N,se)=>(o(),R(W,{key:se,src:N.image,class:"shop-img"},null,8,["src"]))),128)),t.product_info.length==1?(o(),i("div",ge,l(t.product_info[0].store_name),1)):w("",!0)])):w("",!0),e("div",ke,[e("div",$e,"¥"+l(t.pay_price),1),e("div",be,"共"+l(t.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[t.paid?(o(),i("div",Ve,[g(l(t.paid_name)+" ",1),t.pay_type_name?(o(),R(X,{key:0},{default:v(()=>[g("("+l(t.pay_type_name)+")",1)]),_:2},1024)):t.pay_type==9?(o(),i("span",Ce,"(微信收款)")):t.pay_type==17?(o(),i("span",Ye,"(现金支付)")):t.pay_type==13?(o(),i("span",xe,"(支付宝收款)")):t.pay_type==3?(o(),i("span",ze,"(余额支付)")):t.pay_type==1?(o(),i("span",Se,"(微信支付)")):w("",!0)])):(o(),i("div",Ie,l(t.paid_name),1))])])],10,pe))),128)),m.value?(o(),i("div",Me,"没有更多了")):w("",!0),c.value?(o(),i("div",Ue,"加载中...")):w("",!0)])),[[ee,c.value],[te,y]]),d(Z,{modelValue:$.value,"onUpdate:modelValue":a[8]||(a[8]=t=>$.value=t),title:"新订单提醒",width:"500"},{footer:v(()=>[e("div",Le,[d(M,{onClick:a[6]||(a[6]=t=>$.value=!1)},{default:v(()=>[g("稍后刷新")]),_:1}),d(M,{type:"primary",onClick:a[7]||(a[7]=t=>{y(!0),$.value=!1})},{default:v(()=>[g(" 立即刷新 ")]),_:1})])]),default:v(()=>[Be]),_:1},8,["modelValue"])])}}},Te=E(Ne,[["__scopeId","data-v-97f2bd1d"]]),r=f=>(q("data-v-0f1c9a1a"),f=f(),G(),f),Fe={class:"my-order"},Oe={key:0,class:"detail"},Re={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ae=r(()=>e("div",{class:"table-title"},"订单信息",-1)),Ee={class:"table-info"},Ke={class:"info-item"},Pe=r(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),je={class:"info-item-info"},qe={class:"info-item"},Ge=r(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),He={class:"info-item-info"},Je={class:"info-item"},Qe=r(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),We={class:"info-item-info"},Xe={class:"info-item"},Ze=r(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),et={class:"info-item-info"},tt={class:"info-item"},st=r(()=>e("div",{class:"info-item-title"},"优惠抵扣:",-1)),ot={class:"info-item-info"},at={class:"info-item"},it=r(()=>e("div",{class:"info-item-title"},"实际支付:",-1)),lt={class:"info-item-info"},nt={class:"info-item"},dt=r(()=>e("div",{class:"info-item-title"},"支付时间:",-1)),_t={class:"info-item-info"},ct={class:"info-item"},rt=r(()=>e("div",{class:"info-item-title"},"支付方式:",-1)),ut={class:"info-item-info"},vt={key:0},pt={key:1},ft={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:0,class:"table-title"},kt={key:1,class:"table-info"},$t={class:"info-item"},bt=r(()=>e("div",{class:"info-item-title"},"用户ID:",-1)),wt={class:"info-item-info"},Dt={class:"info-item"},Vt=r(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),Ct={class:"info-item-info"},Yt={class:"info-item"},xt=r(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),zt={class:"info-item-info"},St={style:{"font-size":"0.9rem"}},It={style:{color:"#ff4a00"}},Mt={style:{display:"flex","align-items":"center"}},Ut={style:{"margin-left":"0.5rem"}},Bt=r(()=>e("div",{style:{height:"8rem"}},null,-1)),Lt={key:1},Nt={__name:"detail",setup(f){K(),ae();const s=n({id:""});n([]),n(null);const D=n(!1);n(0),n(0),n(["商品信息","订单详情"]),n(""),n(!1);const k=n({page_no:1,page_size:15,loadend:!1,loading:!1}),z=n([]),S=()=>console.log("触底"),_=()=>{D.value=!0,le({id:s.value.id}).then(c=>{s.value=c.data,setTimeout(()=>{D.value=!1},200)})};return P(()=>{b.on("set-sale-order-detail",c=>{console.log("===",c),s.value=c,k.value.page_no=1,k.value.loadend=!1,k.value.loading=!1,z.value=[],_()})}),j(()=>{b.off("set-sale-order-detail")}),(c,L)=>{var u;const V=p("el-image"),m=p("el-table-column"),h=p("el-table"),y=p("el-empty"),I=x("infinite-scroll"),$=x("loading");return o(),i("div",Fe,[s.value.id?B((o(),i("div",Oe,[B((o(),i("div",Re,[Ae,e("div",Ee,[e("div",Ke,[Pe,e("div",je,l(s.value.order_id),1)]),e("div",qe,[Ge,e("div",He,l(s.value.total_num||0),1)]),e("div",Je,[Qe,e("div",We,"¥"+l(s.value.pay_price),1)]),e("div",Xe,[Ze,e("div",et,l(s.value.pay_time),1)]),e("div",tt,[st,e("div",ot,"¥"+l(s.value.deduction_price),1)]),e("div",at,[it,e("div",lt,"¥"+l(s.value.pay_price),1)]),e("div",nt,[dt,e("div",_t,l(s.value.pay_time),1)]),e("div",ct,[rt,e("div",ut,[s.value.pay_type_name?(o(),i("span",vt,l(s.value.pay_type_name),1)):s.value.pay_type==9?(o(),i("span",pt,"微信收款")):s.value.pay_type==17?(o(),i("span",ft,"现金支付")):s.value.pay_type==13?(o(),i("span",mt,"支付宝收款")):s.value.pay_type==3?(o(),i("span",ht,"余额支付")):s.value.pay_type==1?(o(),i("span",yt,"微信支付")):w("",!0)])])]),s.value.uid?(o(),i("div",gt,"用户信息")):w("",!0),s.value.uid?(o(),i("div",kt,[e("div",$t,[bt,e("div",wt,l(s.value.uid),1)]),e("div",Dt,[Vt,e("div",Ct,l(s.value.nickname),1)]),e("div",Yt,[xt,e("div",zt,l(s.value.mobile),1)])])):w("",!0),e("div",St,[g(" 共计 "),e("span",It,l(((u=s.value.product)==null?void 0:u.length)||" "),1),g(" 款商品 ")]),d(h,{data:s.value.product},{default:v(()=>[d(m,{label:"商品信息"},{default:v(({row:a})=>{var C,Y;return[e("div",Mt,[d(V,{style:{height:"3rem",width:"3rem","flex-shrink":"0"},src:(C=a.cart_info)==null?void 0:C.image},null,8,["src"]),e("span",Ut,l((Y=a.cart_info)==null?void 0:Y.name),1)])]}),_:1}),d(m,{prop:"cart_info.price",label:"单价",width:"150"}),d(m,{prop:"cart_info.cart_num",label:"数量",width:"150"}),d(m,{prop:"cart_info.pay_price",label:"总价",width:"150"})]),_:1},8,["data"]),Bt])),[[I,S]])])),[[$,D.value]]):(o(),i("div",Lt,[d(y)]))])}}},Tt=E(Nt,[["__scopeId","data-v-0f1c9a1a"]]),Ft={class:"my-card"},Pt={__name:"index",setup(f){return(s,D)=>(o(),i("div",Ft,[d(Te,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),d(ne),d(Tt,{ref:"detailRef"},null,512)]))}};export{Pt as default}; diff --git a/build/assets/index-DFqeFzc7.js b/build/assets/index-zqjuu94d.js similarity index 99% rename from build/assets/index-DFqeFzc7.js rename to build/assets/index-zqjuu94d.js index dda10b1..d8d23e7 100644 --- a/build/assets/index-DFqeFzc7.js +++ b/build/assets/index-zqjuu94d.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-DkGkSwVv.js","./store-pG1SPGrt.js","./user-Df1_-QkC.js","./moment-Cl4UOzQZ.js","./padding-BlCym4iJ.js","./axiosAPI-DiYhnWHW.js","./shop-DGLf8liO.js","./pay-BMjw3Xka.js","./authCode-DstEoObn.js","./pay-BVHNKgtG.css","./index-BKWr8hGk.css","./index-DQdoUcCB.js","./index-Bpdg0kHz.css","./index-FaoBXU76.js","./index-DGmEWjKM.css","./indexCount-Xdnk11Md.js","./merchant-CFNc6ZHU.js","./indexCount-quL7L4Zi.css","./index-C9r2rUGY.js","./index-ZYBKJJNc.css","./index-D9cv8Rzj.js","./index-CS4cKjQV.css","./index-Czc5lk_Z.js","./index-Bfak7bLR.css","./index-B2ImU9yq.js","./index-C8Yyi5Ew.css","./test-DXXlFOIf.js","./test-CmC8-tN2.css","./index-Dgq6KP52.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-CtWLo4yY.js","./store-B9VgAm7I.js","./user-CILZiEFt.js","./moment-Cl4UOzQZ.js","./padding-SV9GOhiy.js","./axiosAPI-YFghoU-n.js","./shop-nU50lE2m.js","./pay-Bp1INias.js","./authCode-ueWhWG4S.js","./pay-BVHNKgtG.css","./index-Dc36t-bR.css","./index-Creb3_PS.js","./index-Bpdg0kHz.css","./index-JScXvOtN.js","./index-BexOAj1q.css","./indexCount-D8TSPduM.js","./merchant-QcOZvzkY.js","./indexCount-quL7L4Zi.css","./index-BmjaLKjF.js","./index-ZYBKJJNc.css","./index-DgKMBdPb.js","./index-CS4cKjQV.css","./index-BhfJ8Bue.js","./index-Bfak7bLR.css","./index-BNW5h8If.js","./index-DUGURfAc.css","./test-DPMcYJpc.js","./test-CmC8-tN2.css","./index-CFuFSk7N.js","./index-BA6nwZsc.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -98,4 +98,4 @@ function __vite__mapDeps(indexes) { `,n+=sl(" ")+` `,n+=x4()+`欢迎下次光临! `,n+=Yce(" ")+` -`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-4e1f74b3"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=yd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?eo.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Sf(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(eo.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Sf(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(eo.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Sf({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Jt.on("printReceipt",f),Jt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),eo.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{Jt.off("printReceipt",f),Jt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Jt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-4e1f74b3"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),eo.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,eo.error("播放失败")}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"线上订单",ico:"DataAnalysis",count:0},{name:"convert",title:"订单核销",ico:"FullScreen",count:0},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"user",title:"用户",ico:"User",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{Jt.on("up",c),Jt.on("down",f),Jt.on("new_order",l),Jt.on("set-order-count-zero",()=>{r(0)}),r(0)}),xo(()=>{Jt.off("aup",c),Jt.off("adown",f),Jt.off("new_order",l),Jt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-577f16bb"]]),Oo=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};Oo.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new Qa({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};Oo.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};Qa.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};Qa.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Wb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Li(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var fu=function(){var e={};function t(y){for(var C=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new Oo({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&Jt.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&Jt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Jt.emit("letPrintReceipt",(p=a==null?void 0:a.content)==null?void 0:p.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Jt.emit("shift"),a.keyCode==120&&Jt.emit("F9"),a.keyCode==13&&Jt.emit("enter"),a.keyCode==37&&Jt.emit("left"),a.keyCode==39&&Jt.emit("right"),a.keyCode==38&&Jt.emit("up"),a.keyCode==40&&Jt.emit("down"),a.keyCode==46&&Jt.emit("delete")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),xo(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv($de,[["__scopeId","data-v-a17bc345"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>yo(()=>import("./index-DkGkSwVv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-DQdoUcCB.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-FaoBXU76.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-Xdnk11Md.js"),__vite__mapDeps([15,16,17]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-C9r2rUGY.js"),__vite__mapDeps([18,16,3,4,19]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-D9cv8Rzj.js"),__vite__mapDeps([20,1,4,21,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-Czc5lk_Z.js"),__vite__mapDeps([22,6,5,23]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index-B2ImU9yq.js"),__vite__mapDeps([24,2,3,5,8,1,4,25]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-DXXlFOIf.js"),__vite__mapDeps([26,27]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-Dgq6KP52.js"),__vite__mapDeps([28,2,29]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-DUlLucAb.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,wt as B,bue as C,hb as D,eo as E,Fe as F,S as G,Db as H,bt as I,Tp as J,De as K,un as L,Wce as M,Ub as N,wv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Nc as h,Mt as i,tt as j,M as k,ht as l,Jt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,yd as u,kr as v,X as w,Er as x,i as y,$ as z}; +`,n+=Xce(),n},wv=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ii=e=>(Vw("data-v-4e1f74b3"),e=e(),Bw(),e),Qce={class:"my-card"},ede={class:"card-header"},tde={style:{width:"4.5rem"}},nde=Ii(()=>k("div",{class:"card-title"},"泸优采收银系统",-1)),ode={style:{"margin-left":"1rem",display:"flex","flex-direction":"column","justify-content":"center",cursor:"pointer"}},rde={class:"card-body"},ade={style:{"margin-right":"1rem"}},lde=Ii(()=>k("span",null,"打印自检",-1)),sde={key:0,style:{"margin-right":"1rem"}},ide=Ii(()=>k("span",null,"点击自动连接打印机",-1)),ude=Ii(()=>k("div",null,"已连接打印机T58",-1)),cde={style:{"font-size":"0.7rem",color:"#ccc"}},dde=Ii(()=>k("span",null,"打印机已连接,是否重新连接",-1)),fde={class:"dialog-footer"},pde={class:"el-dropdown-link"},vde={class:"info"},hde={__name:"myHeader",setup(e){const t=yd(),n=qce(),o=L({});o.value=t.userInfo;const r=hb(),a=()=>{t.setUserInfo({}),t.setToken(""),r.push("/login")},l=()=>{window.location.reload()},s=L(!1),u=()=>{console.log("连接打印机"),uni.getEnv(h=>{h.h5?eo.error("请使用APP连接打印机"):(n.setConnect(!1),n.setPrintAddress(""),s.value=!1,uni.postMessage({data:{type:"connect"}}))})};let c=!1;const f=(h="")=>{console.log("预打印"),console.log(Sf(h,!0)),!c&&(c=!0,uni.getEnv(m=>{m.h5?(eo.error("请使用APP打印小票"),c=!1):(p(h),setTimeout(()=>{c=!1},4e3))}))},d=(h="")=>{console.log("预打印");let m=Sf(h,!0);console.log(m),!c&&(c=!0,uni.getEnv(v=>{v.h5?(eo.error("请使用APP打印小票"),c=!1):(p(m),setTimeout(()=>{c=!1},4e3))}))},p=(h="")=>{let m="";h===""?(m=Sf({},!0),console.log(m)):m=h,uni.postMessage({data:{type:"print",content:m}})};return et(()=>{Jt.on("printReceipt",f),Jt.on("letPrintReceipt",d),window.addEventListener("message",function(h){if(h.data.type==="connect"){let m=h.data.data.address;n.setConnect(!0),n.setPrintAddress(m),eo.success("已连接打印机T58("+m+")")}},!1)}),xo(()=>{Jt.off("printReceipt",f),Jt.off("letPrintReceipt",d)}),(h,m)=>{const v=Ze("el-image"),_=Ze("Refresh"),g=Ze("el-icon"),w=Ze("el-button"),y=Ze("el-dialog"),C=Ze("el-avatar"),E=Ze("arrow-down"),x=Ze("el-dropdown-item"),A=Ze("el-dropdown-menu"),T=Ze("el-dropdown");return b(),M("div",Qce,[k("div",ede,[k("div",tde,[W(v,{style:{height:"2.5rem",width:"2.5rem",margin:"0 auto"},src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/12c93202404101530591311.png"})]),nde,k("div",ode,[W(g,{color:"#fff",size:"18",onClick:l},{default:X(()=>[W(_)]),_:1})])]),k("div",rde,[k("div",ade,[W(w,{onClick:m[0]||(m[0]=R=>i(Jt).emit("letPrintReceipt")),type:"primary"},{default:X(()=>[lde]),_:1})]),!i(n).is_connect||!i(n).printAddress?(b(),M("div",sde,[W(w,{onClick:u,type:"warning"},{default:X(()=>[ide]),_:1})])):(b(),M("div",{key:1,style:{"margin-right":"1rem","font-size":"0.9rem"},onClick:m[1]||(m[1]=R=>s.value=!0)},[ude,k("div",cde,"("+Te(i(n).printAddress)+")",1)])),W(y,{modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=R=>s.value=R),title:"提示",width:"500"},{footer:X(()=>[k("div",fde,[W(w,{onClick:m[2]||(m[2]=R=>s.value=!1)},{default:X(()=>[mt("取消")]),_:1}),W(w,{type:"primary",onClick:u},{default:X(()=>[mt(" 重新连接 ")]),_:1})])]),default:X(()=>[dde]),_:1},8,["modelValue"]),W(T,{trigger:"hover"},{dropdown:X(()=>[W(A,null,{default:X(()=>[W(x,{onClick:a},{default:X(()=>[mt("退出登录")]),_:1})]),_:1})]),default:X(()=>[k("div",pde,[W(C,{src:o.value.avatar,icon:"user-filled"},null,8,["src"]),k("div",vde,[k("div",null,Te(o.value.name),1),k("div",null,"("+Te(o.value.role_name)+")",1)]),W(g,{class:"el-icon--right"},{default:X(()=>[W(E)]),_:1})])]),_:1})])])}}},mde=wv(hde,[["__scopeId","data-v-4e1f74b3"]]),gde=vv("order",()=>{const e=L(localStorage.getItem("orderCount")||0);return{orderCount:e,setOrderCount:n=>{e.value=n,localStorage.setItem("orderCount",n)}}}),yde={class:"my-card"},_de=["onClick"],bde={key:0,class:"badge"},wde={__name:"myAside",setup(e){const t=hb(),n=bue(),o=gde(),r=(d=1)=>{o.setOrderCount(d),u.value.forEach(p=>{p.name=="order"&&(p.count=d)})};let a=!1;const l=d=>{try{if(r(0),eo.success("您有新的订单"),a)return;var p=new Audio("/public/order.mp3");p.play(),a=!0,console.log("播放中"),p.addEventListener("ended",function(){a=!1})}catch(h){console.error(h),a=!1,eo.error("播放失败")}},s=d=>{t.push({name:d})},u=L([{name:"saleHome",title:"收银",ico:"Sell",count:0},{name:"saleOrder",title:"收银订单",ico:"DataLine",count:0},{name:"order",title:"线上订单",ico:"DataAnalysis",count:0},{name:"convert",title:"订单核销",ico:"FullScreen",count:0},{name:"putStorage",title:"入库登记",ico:"Van",count:0},{name:"user",title:"用户",ico:"User",count:0}]),c=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==0&&(d=u.value.length),d>0&&s(u.value[d-1].name)},f=()=>{let d=u.value.findIndex(p=>p.name==n.name);d==u.value.length-1&&(d=-1),d{Jt.on("up",c),Jt.on("down",f),Jt.on("new_order",l),Jt.on("set-order-count-zero",()=>{r(0)}),r(0)}),xo(()=>{Jt.off("aup",c),Jt.off("adown",f),Jt.off("new_order",l),Jt.on("set-order-count-zero")}),(d,p)=>{const h=Ze("el-icon");return b(),M("div",yde,[(b(!0),M(Fe,null,ht(u.value,m=>(b(),M("div",{key:m.name,class:$(["list-item",{active:i(n).name==m.name}]),onClick:v=>s(m.name)},[W(h,{size:"2rem"},{default:X(()=>[(b(),le(st(m.ico)))]),_:2},1024),k("div",null,Te(m.title),1),m.count?(b(),M("div",bde,Te(m.count),1)):ne("",!0)],10,_de))),128))])}}},Cde=wv(wde,[["__scopeId","data-v-577f16bb"]]),Oo=function e(t){this.doNotConnect=0,t=t||{},t.heartbeat=t.heartbeat||25e3,t.pingTimeout=t.pingTimeout||1e4,this.config=t,this.uid=0,this.channels={},this.connection=null,this.pingTimeoutTimer=0,e.instances.push(this),this.createConnection()};Oo.prototype.checkoutPing=function(){var e=this;e.checkoutPingTimer&&clearTimeout(e.checkoutPingTimer),e.checkoutPingTimer=setTimeout(function(){e.checkoutPingTimer=0,e.connection.state==="connected"&&(e.connection.send('{"event":"pusher:ping","data":{}}'),e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),e.pingTimeoutTimer=setTimeout(function(){e.connection.closeAndClean(),e.connection.doNotConnect||e.connection.waitReconnect()},e.config.pingTimeout))},this.config.heartbeat)};Oo.prototype.channel=function(e){return this.channels.find(e)};Oo.prototype.allChannels=function(){return this.channels.all()};Oo.prototype.createConnection=function(){if(this.connection)throw Error("Connection already exist");var e=this,t=this.config.url;function n(){for(var o in e.channels)e.channels[o].subscribed=!1}this.connection=new Qa({url:t,app_key:this.config.app_key,onOpen:function(){e.connection.state="connecting",e.checkoutPing()},onMessage:function(o){e.pingTimeoutTimer&&(clearTimeout(e.pingTimeoutTimer),e.pingTimeoutTimer=0),o=JSON.parse(o.data);var r=o.event,a=o.channel;if(r==="pusher:pong"){e.checkoutPing();return}if(r==="pusher:error")throw Error(o.data.message);var l=JSON.parse(o.data),s;if(r==="pusher_internal:subscription_succeeded"){s=e.channels[a],s.subscribed=!0,s.processQueue(),s.emit("pusher:subscription_succeeded");return}if(r==="pusher:connection_established"&&(e.connection.socket_id=l.socket_id,e.connection.updateNetworkState("connected"),e.subscribeAll()),r.indexOf("pusher_internal")!==-1){console.log("Event '"+r+"' not implement");return}s=e.channels[a],s&&s.emit(r,l)},onClose:function(){n()},onError:function(){n()}})};Oo.prototype.disconnect=function(){this.connection.doNotConnect=1,this.connection.close()};Oo.prototype.subscribeAll=function(){if(this.connection.state==="connected")for(var e in this.channels)this.channels[e].processSubscribe()};Oo.prototype.unsubscribe=function(e){this.channels[e]&&(delete this.channels[e],this.connection.state==="connected"&&this.connection.send(JSON.stringify({event:"pusher:unsubscribe",data:{channel:e}})))};Oo.prototype.unsubscribeAll=function(){var e=Object.keys(this.channels);if(e.length&&this.connection.state==="connected")for(var t in this.channels)this.unsubscribe(t);this.channels={}};Oo.prototype.subscribe=function(e){return this.channels[e]?this.channels[e]:e.indexOf("private-")===0?Kb(e,this):e.indexOf("presence-")===0?kde(e,this):Sde(e,this)};Oo.instances=[];function Sde(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){t.connection.send(JSON.stringify({event:"pusher:subscribe",data:{channel:e}}))},n.processSubscribe(),n}function Kb(e,t){var n=new Li(t.connection,e);return t.channels[e]=n,n.subscribeCb=function(){xde({url:t.config.auth,type:"POST",data:{channel_name:e,socket_id:t.connection.socket_id},success:function(o){o=JSON.parse(o),o.channel=e,t.connection.send(JSON.stringify({event:"pusher:subscribe",data:o}))},error:function(o){throw Error(o)}})},n.processSubscribe(),n}function kde(e,t){return Kb(e,t)}function Qa(e){this.dispatcher=new jb,Wb(this,this.dispatcher);var t=["on","off","emit"];for(var n in t)this[t[n]]=this.dispatcher[t[n]];this.options=e,this.state="initialized",this.doNotConnect=0,this.reconnectInterval=1,this.connection=null,this.reconnectTimer=0,this.connect()}Qa.prototype.updateNetworkState=function(e){var t=this.state;this.state=e,t!==e&&this.emit("state_change",{previous:t,current:e})};Qa.prototype.connect=function(){if(this.doNotConnect=0,this.state==="connected"){console.log('networkState is "'+this.state+'" and do not need connect');return}this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=0),this.closeAndClean();var e=this.options,t=new WebSocket(e.url+"/app/"+e.app_key);this.updateNetworkState("connecting");var n=this;t.onopen=function(o){if(n.reconnectInterval=1,n.doNotConnect){n.updateNetworkState("disconnected"),t.close();return}e.onOpen&&e.onOpen(o)},e.onMessage&&(t.onmessage=e.onMessage),t.onclose=function(o){t.onmessage=t.onopen=t.onclose=t.onerror=null,n.updateNetworkState("disconnected"),n.doNotConnect||n.waitReconnect(),e.onClose&&e.onClose(o)},t.onerror=function(o){n.close(),n.doNotConnect||n.waitReconnect(),e.onError&&e.onError(o)},this.connection=t};Qa.prototype.closeAndClean=function(){if(this.connection){var e=this.connection;e.onmessage=e.onopen=e.onclose=e.onerror=null;try{e.close()}catch{}this.updateNetworkState("disconnected")}};Qa.prototype.waitReconnect=function(){if(!(this.state==="connected"||this.state==="connecting")&&!this.doNotConnect){this.updateNetworkState("connecting");var e=this;this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(function(){e.connect()},this.reconnectInterval),this.reconnectInterval<1e3?this.reconnectInterval=1e3:this.reconnectInterval=this.reconnectInterval*2,this.reconnectInterval>2e3&&navigator.onLine&&(e.reconnectInterval=2e3)}};Qa.prototype.send=function(e){if(this.state!=="connected"){console.trace('networkState is "'+this.state+'", can not send '+e);return}this.connection.send(e)};Qa.prototype.close=function(){this.updateNetworkState("disconnected"),this.connection.close()};var Wb=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)};function Li(e,t){this.subscribed=!1,this.dispatcher=new jb,this.connection=e,this.channelName=t,this.subscribeCb=null,this.queue=[],Wb(this,this.dispatcher);var n=["on","off","emit"];for(var o in n)this[n[o]]=this.dispatcher[n[o]]}Li.prototype.processSubscribe=function(){this.connection.state==="connected"&&this.subscribeCb()};Li.prototype.processQueue=function(){if(!(this.connection.state!=="connected"||!this.subscribed)){for(var e in this.queue)this.queue[e]();this.queue=[]}};Li.prototype.trigger=function(e,t){if(e.indexOf("client-")!==0)throw new Error("Event '"+e+"' should start with 'client-'");var n=this;this.queue.push(function(){n.connection.send(JSON.stringify({event:e,data:t,channel:n.channelName}))}),this.processQueue()};var fu=function(){var e={};function t(y){for(var C=[],E=1;E0)for(o=0;o=200&&n<300?e.success&&e.success(t.responseText,t.responseXML):e.error&&e.error(n)}},e.type==="GET"?(t.open("GET",e.url+"?"+params,!0),t.send(null)):e.type==="POST"&&(t.open("POST",e.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(params))}function Mde(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}const Tde={class:"common-layout"},$de={__name:"index",setup(e){const t=yd(),o=new Oo({url:"wss://multi-store.lihaink.cn/pull",app_key:"2ce3ce22329517213caa7dad261f5695"}).subscribe(`store_merchant_${t.userInfo.store_id}`);o.on("message",function(a){var l,s,u,c,f,d,p;console.log("收到消息--",a);try{((l=a==null?void 0:a.content)==null?void 0:l.type)=="cash_register"&&((s=a==null?void 0:a.content)==null?void 0:s.msg)=="您有一笔订单已支付"&&Jt.emit("pay_success",(u=a==null?void 0:a.content)==null?void 0:u.data),((c=a==null?void 0:a.content)==null?void 0:c.type)=="store_merchant"&&((f=a==null?void 0:a.content)==null?void 0:f.msg)=="您有一笔新的订单"&&Jt.emit("new_order",a==null?void 0:a.content),((d=a==null?void 0:a.content)==null?void 0:d.type)=="platform_print"&&Jt.emit("letPrintReceipt",(p=a==null?void 0:a.content)==null?void 0:p.data)}catch{}}),o.on("close",function(){});const r=a=>{console.log("按下",a.keyCode),a.keyCode==16&&Jt.emit("shift"),a.keyCode==120&&Jt.emit("F9"),a.keyCode==13&&Jt.emit("enter"),a.keyCode==37&&Jt.emit("left"),a.keyCode==39&&Jt.emit("right"),a.keyCode==38&&Jt.emit("up"),a.keyCode==40&&Jt.emit("down"),a.keyCode==46&&Jt.emit("delete")};return et(()=>{window.addEventListener("keydown",r),console.log("开启键盘监听")}),xo(()=>{window.removeEventListener("keydown",r),console.log("关闭键盘监听")}),(a,l)=>{const s=Ze("el-header"),u=Ze("el-aside"),c=Ze("router-view"),f=Ze("el-main"),d=Ze("el-container");return b(),M("div",Tde,[W(d,null,{default:X(()=>[W(s,null,{default:X(()=>[W(mde)]),_:1}),W(d,null,{default:X(()=>[W(u,{width:"6.25rem"},{default:X(()=>[W(Cde)]),_:1}),W(f,{style:{color:"#333"}},{default:X(()=>[W(c,{class:"my-main"},{default:X(({Component:p})=>[W(nn,{name:"el-zoom-in-top"},{default:X(()=>[(b(),le(st(p)))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})])}}},Ode=wv($de,[["__scopeId","data-v-a17bc345"]]),Ade=[{path:"/",name:"layout",component:Ode,redirect:"/saleHome",meta:{title:"里海收银系统"},children:[{path:"/saleHome",name:"saleHome",meta:{title:"收银"},component:()=>yo(()=>import("./index-CtWLo4yY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-Creb3_PS.js"),__vite__mapDeps([11,1,3,7,8,9,4,12]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-JScXvOtN.js"),__vite__mapDeps([13,1,3,4,14,9]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-D8TSPduM.js"),__vite__mapDeps([15,16,17]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-BmjaLKjF.js"),__vite__mapDeps([18,16,3,4,19]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-DgKMBdPb.js"),__vite__mapDeps([20,1,4,21,9]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-BhfJ8Bue.js"),__vite__mapDeps([22,6,5,23]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index-BNW5h8If.js"),__vite__mapDeps([24,2,3,5,8,1,4,25]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-DPMcYJpc.js"),__vite__mapDeps([26,27]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-CFuFSk7N.js"),__vite__mapDeps([28,2,29]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-C5u_lqxK.js"),__vite__mapDeps([]),import.meta.url)}],qb=yue({history:Uie(),routes:Ade});qb.beforeEach((e,t,n)=>{const o=yd();e.name!=="login"&&!o.Token?n({name:"login"}):n()});const Ub=qb,Vi=Fg(g9);for(const[e,t]of Object.entries(qL))Vi.component(e,t);const Nde=Cue();Vi.use(Ub);Vi.use(Nde);Vi.use(fie,{locale:pie});Vi.mount("#app");export{cr as A,wt as B,bue as C,hb as D,eo as E,Fe as F,S as G,Db as H,bt as I,Tp as J,De as K,un as L,Wce as M,Ub as N,wv as _,xo as a,Ze as b,b as c,le as d,k as e,W as f,mt as g,Nc as h,Mt as i,tt as j,M as k,ht as l,Jt as m,We as n,et as o,ne as p,Vw as q,L as r,Bw as s,Te as t,yd as u,kr as v,X as w,Er as x,i as y,$ as z}; diff --git a/build/assets/indexCount-Xdnk11Md.js b/build/assets/indexCount-D8TSPduM.js similarity index 86% rename from build/assets/indexCount-Xdnk11Md.js rename to build/assets/indexCount-D8TSPduM.js index a8db16c..6e37bbe 100644 --- a/build/assets/indexCount-Xdnk11Md.js +++ b/build/assets/indexCount-D8TSPduM.js @@ -1 +1 @@ -import{f as i}from"./merchant-CFNc6ZHU.js";import{_ as d,r as a,b as l,h as p,j as m,c as u,k as h,e as f,f as e,w as v}from"./index-DFqeFzc7.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,k)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; +import{f as i}from"./merchant-QcOZvzkY.js";import{_ as d,r as a,b as l,h as p,j as m,c as u,k as h,e as f,f as e,w as v}from"./index-zqjuu94d.js";const b={"element-loading-text":"加载中",class:"my-order"},g={class:"table"},x={__name:"indexCount",setup(w){const o=a([]),n=a({page_no:1,page_size:15}),r=a(!1);return(()=>{i(n.value).then(s=>{o.value=s.data.lists})})(),(s,k)=>{const t=l("el-table-column"),c=l("el-table"),_=p("loading");return m((u(),h("div",b,[f("div",g,[e(c,{data:o.value,style:{width:"100%"}},{default:v(()=>[e(t,{prop:"record_date",label:"时间",width:"260"}),e(t,{prop:"cashier_cash_total_amount",label:"现金收银金额(元)"}),e(t,{prop:"cashier_total_amount",label:"线上收银金额(元)"}),e(t,{prop:"platofrm_total_amount",label:"平台订单金额(元)"}),e(t,{prop:"total_amount",label:"总金额(元)"})]),_:1},8,["data"])])])),[[_,r.value]])}}},y=d(x,[["__scopeId","data-v-d25755c6"]]);export{y as default}; diff --git a/build/assets/merchant-CFNc6ZHU.js b/build/assets/merchant-QcOZvzkY.js similarity index 87% rename from build/assets/merchant-CFNc6ZHU.js rename to build/assets/merchant-QcOZvzkY.js index ebdce72..f38443e 100644 --- a/build/assets/merchant-CFNc6ZHU.js +++ b/build/assets/merchant-QcOZvzkY.js @@ -1 +1 @@ -import{H as a}from"./index-DFqeFzc7.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f}; +import{H as a}from"./index-zqjuu94d.js";function i(){return a.get("/merchant/Merchant/amount_account")}function r(n){return a.get("/merchant/Merchant/taking_lists",{params:n})}function c(){return a.get("/merchant/Merchant/taking_info")}function e(n){return a.post("/merchant/Merchant/withdraw",n)}function o(n){return a.get("/financial/FinancialRecord/lists",{params:n})}function s(n){return a.get("/financial/FinancialRecord/api_lists",{params:n})}export{i as a,c as b,e as c,r as d,s as e,o as f}; diff --git a/build/assets/padding-BlCym4iJ.js b/build/assets/padding-SV9GOhiy.js similarity index 65% rename from build/assets/padding-BlCym4iJ.js rename to build/assets/padding-SV9GOhiy.js index f5c0725..dfda8d0 100644 --- a/build/assets/padding-BlCym4iJ.js +++ b/build/assets/padding-SV9GOhiy.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-DFqeFzc7.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; +import{_ as e,c as t,k as c}from"./index-zqjuu94d.js";const n={},o={style:{width:"1rem",height:"100%"}};function r(s,_){return t(),c("div",o)}const i=e(n,[["render",r]]);export{i as p}; diff --git a/build/assets/pay-BMjw3Xka.js b/build/assets/pay-Bp1INias.js similarity index 97% rename from build/assets/pay-BMjw3Xka.js rename to build/assets/pay-Bp1INias.js index 0a61545..c40fc6d 100644 --- a/build/assets/pay-BMjw3Xka.js +++ b/build/assets/pay-Bp1INias.js @@ -1 +1 @@ -import{_ as fe,r as o,u as ye,G as me,o as ge,m as y,a as he,b as j,h as ke,c as _,d as I,w as m,e as s,z as A,k as w,g as C,t as S,p as Y,j as be,f as x,i as Z,F as we,l as Ce,n as L,E as u,q as xe,s as Ve}from"./index-DFqeFzc7.js";import{e as O,f as $e,g as Se,h as Pe}from"./store-pG1SPGrt.js";import{_ as Ee}from"./authCode-DstEoObn.js";/* empty css */const $=D=>(xe("data-v-a76a4ead"),D=D(),Ve(),D),Fe=$(()=>s("h4",null,"选择支付方式",-1)),ze={class:"dra-body"},Be={class:"header"},je={key:0,style:{display:"inline-block","margin-right":"20px"}},Ae={style:{display:"inline-block","margin-right":"20px"}},De=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Le={style:{color:"#f5222d","padding-bottom":"2rem"}},Re={style:{"font-size":"1.6rem"}},Te={style:{display:"inline-block"}},Ne=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ue={style:{color:"#f5222d","padding-bottom":"2rem"}},Ie={style:{"font-size":"1.6rem"}},Oe={style:{display:"inline-block"}},Ke=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Me={style:{color:"#f5222d","padding-bottom":"2rem"}},qe={style:{"font-size":"1.6rem"}},Ge={key:0,"element-loading-text":"支付中",class:"card1"},We=$(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Je={class:"drawer-body"},Qe={class:"counter"},Xe={class:"received"},Ye={key:0},Ze={key:1,style:{"font-size":"1rem",color:"#999"}},ea={key:0,class:"balance"},aa={class:"money"},sa=$(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ta={key:1,class:"balance"},la=$(()=>s("div",null,"不够找零, 请支付更多金额",-1)),oa=$(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),na=[la,oa],ia={class:"keypad"},ca={class:"left"},ua={class:"right"},ra={key:2,class:"card3"},da={class:"codes"},va={style:{width:"100%",display:"flex","justify-content":"center"}},_a={__name:"pay",emits:["paySuccess"],setup(D,{expose:ee,emit:ae}){const v=o(!1),l=o(1),i=o(""),g=o("");ye(),o(0);const P=a=>{Pe({id:a}).then(e=>{y.emit("letPrintReceipt",e.data)})},se=()=>{f()},te=()=>{L(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",K.value=!0,(a=g.value)==null||a.focus(),h(l.value)},300)})},h=a=>{l.value=a,l.value==2?window.addEventListener("keydown",N):(window.removeEventListener("keydown",N),L(()=>{var e;i.value="",(e=g.value)==null||e.focus()}))},c=o({}),z=o([]),p=o(""),R=o(!1);let E=0;const le=a=>{c.value=a.data,z.value=a.cart_id,p.value=a.uid,E=a.is_storage||0,console.log("选择了用户==",p.value||"游客"),R.value=a.isRePay||!1},oe=a=>{c.value.pay_price=a.price,ce.value=a.order_id,E=a.is_storage||0},ne=ae,K=o(!1),ie=o(["1","2","3","4","5","6","7","8","9","0","00","."]),M=/^(10|11|12|13|14|15)\d{16}$/,q=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),ue=()=>{if(k.value=!0,g.value.blur(),R.value)G();else{let a;if(M.test(i.value))a="9";else if(q.test(i.value))a="13";else return k.value=!1,i.value="",g.value.focus(),u.error("请输入正确的支付码");O({key:c.value.key,cart_id:z.value,pay_type:a,is_storage:E,auth_code:i.value,uid:p.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,u({message:"支付成功",type:"success"}),f(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),y.on("pay_success",t=>{u({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{y.off("pay_success")},200),v.value=!1,f(t)}))}).catch(e=>{k.value=!1,L(()=>{var t;(t=g.value)==null||t.focus()})})}},G=()=>{let a=17;if(l.value==1)if(M.test(i.value))a="9";else if(q.test(i.value))a="13";else return k.value=!1,i.value="",g.value.focus(),u.error("请输入正确的支付码");$e({order_id:c.value.order_id,pay_type:a,is_storage:E,auth_code:i.value,uid:p.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(v.value=!1,u({message:"支付成功",type:"success"}),P(e.data.id),f()):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),y.on("pay_success",V=>{u({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{y.off("pay_success")},200),v.value=!1,f(V)}))}).catch(e=>{i.value="",k.value=!1,L(()=>{var t;(t=g.value)==null||t.focus()})})};o(0);const f=a=>{var e;try{window.removeEventListener("keydown",N),K.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=g.value)==null||e.blur(),ne("paySuccess",a),v.value=!1}catch{}},k=o(!1);ee({drawer:v,setForm:le,setRePay:oe,beforeClose:f});const b=o([]),r=o(""),B=me(()=>+r.value>0?(+r.value-c.value.pay_price).toFixed(2):-1),W=o(!1),T=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{W.value===!1&&(r.value="",W.value=!0);let e=String(r.value).indexOf(".")+1,t=String(r.value).length-e;console.log(e,t),(e===0||t<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(B.value===""||B.value===null||B.value===void 0||+r.value<+c.value.pay_price)return u.error("收款金额应该大于等于应收金额");R.value?G():O({cart_id:z.value,pay_type:"17",is_storage:E,uid:p.value}).then(a=>{v.value=!1,u({message:a.msg,type:"success"}),P(a.data.id),l.value=1,f()}).catch(a=>{k.value=!1})},N=a=>{let t=(a||window.event).keyCode;if(t==37)return h(2);if(t==120)return y.emit("F9");if(t==27)return f();switch(a.stopPropagation(),a.preventDefault(),t){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:T();break;case 13:H();break}},re=()=>{if(!p.value)return u.error("请先选择用户");let a=1;l.value==4&&(a=2),Se({cart_id:z.value,uid:p.value,type:a}).then(e=>{u({message:"发送成功",type:"success"})})},U=o(""),J=()=>{if(!p.value)return u.error("请先选择用户");let a=18;l.value==4&&(a=19),O({pay_type:a,is_storage:E,sms_code:U.value,cart_id:z.value,uid:p.value}).then(e=>{v.value=!1,u({message:e.msg,type:"success"}),P(e.data.id),h(1),f()})},F=o(!1),Q=()=>{if(!(!v.value||F.value&&i.value.length>0)&&l.value!=1)return h(l.value-1)},X=()=>{if(!(!v.value||F.value&&i.value.length>0)&&l.value!=4)return h(l.value+1)};return ge(()=>{y.on("left",Q),y.on("right",X)}),he(()=>{y.off("left",Q),y.off("right",X)}),(a,e)=>{const t=j("el-input"),V=j("el-button"),de=j("Delete"),ve=j("el-icon"),_e=j("el-drawer"),pe=ke("loading");return _(),I(_e,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[11]||(e[11]=n=>v.value=n),direction:"rtl",onOpen:te,"before-close":f},{header:m(()=>[Fe]),default:m(()=>[s("div",ze,[s("div",Be,[s("div",{class:A(["left",{active:l.value==1}]),onClick:e[0]||(e[0]=n=>h(1))}," 微信/支付宝 ",2),s("div",{class:A(["center",{active:l.value==2}]),onClick:e[1]||(e[1]=n=>h(2))}," 现金收款 ",2),s("div",{class:A(["center",{active:l.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>h(3))}," 采购款 ",2),s("div",{class:A(["right",{active:l.value==4}]),onClick:e[3]||(e[3]=n=>h(4))}," 礼品券兑换 ",2)]),s("div",null,[c.value.activities==1&&l.value!=4?(_(),w("div",je,[s("div",Ae,[De,s("div",Le,[C(" ¥"),s("span",Re,S(c.value.total_price),1)])]),s("div",Te,[Ne,s("div",Ue,[C(S(c.value.activity)+"¥",1),s("span",Ie,S(c.value.activity_price),1)])])])):Y("",!0),s("div",Oe,[Ke,s("div",Me,[C(" ¥"),s("span",qe,S(l.value==4?c.value.total_price:c.value.pay_price),1)])])]),l.value==1?be((_(),w("div",Ge,[x(t,{ref_key:"codeRef",ref:g,modelValue:i.value,"onUpdate:modelValue":e[4]||(e[4]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Z(ue,["enter"]),onFocus:e[5]||(e[5]=n=>F.value=!0),onBlur:e[6]||(e[6]=n=>F.value=!1)},null,8,["modelValue"]),We])),[[pe,k.value]]):l.value==2?(_(),w("div",He,[s("div",Je,[s("div",Qe,[s("div",Xe,[r.value?(_(),w("span",Ye,S(r.value),1)):(_(),w("span",Ze,"按下键盘输入客户支付金额"))]),B.value>=0?(_(),w("div",ea,[s("div",null,[C(" 需找零(元):"),s("span",aa,"¥"+S(B.value),1)]),sa])):(_(),w("div",ta,na)),s("div",ia,[s("div",ca,[(_(!0),w(we,null,Ce(ie.value,n=>(_(),I(V,{key:n,onClick:pa=>d(n)},{default:m(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ua,[x(V,{onClick:T},{default:m(()=>[x(ve,null,{default:m(()=>[x(de)]),_:1})]),_:1}),x(V,{onClick:e[7]||(e[7]=n=>T(-1))},{default:m(()=>[C("C")]),_:1}),x(V,{class:A(["enter",{"enter-disable":+r.value<+c.value.pay_price}]),disabled:+r.value<+c.value.pay_price,onClick:H},{default:m(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):l.value==3||l.value==4?(_(),w("div",ra,[s("div",da,[x(t,{modelValue:U.value,"onUpdate:modelValue":e[8]||(e[8]=n=>U.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:Z(J,["enter"]),onFocus:e[9]||(e[9]=n=>F.value=!0),onBlur:e[10]||(e[10]=n=>F.value=!1)},null,8,["modelValue"]),(_(),I(Ee,{style:{"margin-left":"1rem"},onSendCode:re,start:p.value>0,key:c.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x(V,{type:"primary",onClick:J,class:"code-pay"},{default:m(()=>[C("确认支付")]),_:1})])):Y("",!0)])]),footer:m(()=>[s("div",va,[x(V,{class:"cancel-btn",onClick:se},{default:m(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ha=fe(_a,[["__scopeId","data-v-a76a4ead"]]);export{ha as p}; +import{_ as fe,r as o,u as ye,G as me,o as ge,m as y,a as he,b as j,h as ke,c as _,d as I,w as m,e as s,z as A,k as w,g as C,t as S,p as Y,j as be,f as x,i as Z,F as we,l as Ce,n as L,E as u,q as xe,s as Ve}from"./index-zqjuu94d.js";import{e as O,f as $e,g as Se,h as Pe}from"./store-B9VgAm7I.js";import{_ as Ee}from"./authCode-ueWhWG4S.js";/* empty css */const $=D=>(xe("data-v-a76a4ead"),D=D(),Ve(),D),Fe=$(()=>s("h4",null,"选择支付方式",-1)),ze={class:"dra-body"},Be={class:"header"},je={key:0,style:{display:"inline-block","margin-right":"20px"}},Ae={style:{display:"inline-block","margin-right":"20px"}},De=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Le={style:{color:"#f5222d","padding-bottom":"2rem"}},Re={style:{"font-size":"1.6rem"}},Te={style:{display:"inline-block"}},Ne=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Ue={style:{color:"#f5222d","padding-bottom":"2rem"}},Ie={style:{"font-size":"1.6rem"}},Oe={style:{display:"inline-block"}},Ke=$(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Me={style:{color:"#f5222d","padding-bottom":"2rem"}},qe={style:{"font-size":"1.6rem"}},Ge={key:0,"element-loading-text":"支付中",class:"card1"},We=$(()=>s("div",{class:"tips"},null,-1)),He={key:1,class:"card2"},Je={class:"drawer-body"},Qe={class:"counter"},Xe={class:"received"},Ye={key:0},Ze={key:1,style:{"font-size":"1rem",color:"#999"}},ea={key:0,class:"balance"},aa={class:"money"},sa=$(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ta={key:1,class:"balance"},la=$(()=>s("div",null,"不够找零, 请支付更多金额",-1)),oa=$(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),na=[la,oa],ia={class:"keypad"},ca={class:"left"},ua={class:"right"},ra={key:2,class:"card3"},da={class:"codes"},va={style:{width:"100%",display:"flex","justify-content":"center"}},_a={__name:"pay",emits:["paySuccess"],setup(D,{expose:ee,emit:ae}){const v=o(!1),l=o(1),i=o(""),g=o("");ye(),o(0);const P=a=>{Pe({id:a}).then(e=>{y.emit("letPrintReceipt",e.data)})},se=()=>{f()},te=()=>{L(()=>{setTimeout(()=>{var a;k.value=!1,i.value="",K.value=!0,(a=g.value)==null||a.focus(),h(l.value)},300)})},h=a=>{l.value=a,l.value==2?window.addEventListener("keydown",N):(window.removeEventListener("keydown",N),L(()=>{var e;i.value="",(e=g.value)==null||e.focus()}))},c=o({}),z=o([]),p=o(""),R=o(!1);let E=0;const le=a=>{c.value=a.data,z.value=a.cart_id,p.value=a.uid,E=a.is_storage||0,console.log("选择了用户==",p.value||"游客"),R.value=a.isRePay||!1},oe=a=>{c.value.pay_price=a.price,ce.value=a.order_id,E=a.is_storage||0},ne=ae,K=o(!1),ie=o(["1","2","3","4","5","6","7","8","9","0","00","."]),M=/^(10|11|12|13|14|15)\d{16}$/,q=/^(25|26|27|28|29|30)\d{14,22}$/,ce=o(""),ue=()=>{if(k.value=!0,g.value.blur(),R.value)G();else{let a;if(M.test(i.value))a="9";else if(q.test(i.value))a="13";else return k.value=!1,i.value="",g.value.focus(),u.error("请输入正确的支付码");O({key:c.value.key,cart_id:z.value,pay_type:a,is_storage:E,auth_code:i.value,uid:p.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(v.value=!1,u({message:"支付成功",type:"success"}),f(e.data),P(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),y.on("pay_success",t=>{u({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{y.off("pay_success")},200),v.value=!1,f(t)}))}).catch(e=>{k.value=!1,L(()=>{var t;(t=g.value)==null||t.focus()})})}},G=()=>{let a=17;if(l.value==1)if(M.test(i.value))a="9";else if(q.test(i.value))a="13";else return k.value=!1,i.value="",g.value.focus(),u.error("请输入正确的支付码");$e({order_id:c.value.order_id,pay_type:a,is_storage:E,auth_code:i.value,uid:p.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(v.value=!1,u({message:"支付成功",type:"success"}),P(e.data.id),f()):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),y.on("pay_success",V=>{u({message:"支付成功",type:"success"}),P(e.data.id),setTimeout(()=>{y.off("pay_success")},200),v.value=!1,f(V)}))}).catch(e=>{i.value="",k.value=!1,L(()=>{var t;(t=g.value)==null||t.focus()})})};o(0);const f=a=>{var e;try{window.removeEventListener("keydown",N),K.value=!1,k.value=!1,i.value="",r.value="",b.value=[],(e=g.value)==null||e.blur(),ne("paySuccess",a),v.value=!1}catch{}},k=o(!1);ee({drawer:v,setForm:le,setRePay:oe,beforeClose:f});const b=o([]),r=o(""),B=me(()=>+r.value>0?(+r.value-c.value.pay_price).toFixed(2):-1),W=o(!1),T=a=>{a===-1?b.value=[]:b.value.pop(),r.value=b.value.length?b.value.join(""):0},d=a=>{W.value===!1&&(r.value="",W.value=!0);let e=String(r.value).indexOf(".")+1,t=String(r.value).length-e;console.log(e,t),(e===0||t<2)&&(b.value.join("")<=9999999&&b.value.push(a),r.value=b.value.join("")>99999999?99999999:b.value.join(""))},H=()=>{if(B.value===""||B.value===null||B.value===void 0||+r.value<+c.value.pay_price)return u.error("收款金额应该大于等于应收金额");R.value?G():O({cart_id:z.value,pay_type:"17",is_storage:E,uid:p.value}).then(a=>{v.value=!1,u({message:a.msg,type:"success"}),P(a.data.id),l.value=1,f()}).catch(a=>{k.value=!1})},N=a=>{let t=(a||window.event).keyCode;if(t==37)return h(2);if(t==120)return y.emit("F9");if(t==27)return f();switch(a.stopPropagation(),a.preventDefault(),t){case 96:case 48:d(0);break;case 97:case 49:d(1);break;case 98:case 50:d(2);break;case 99:case 51:d(3);break;case 100:case 52:d(4);break;case 101:case 53:d(5);break;case 102:case 54:d(6);break;case 103:case 55:d(7);break;case 104:case 56:d(8);break;case 105:case 57:d(9);break;case 110:d(".");break;case 190:d(".");break;case 8:T();break;case 13:H();break}},re=()=>{if(!p.value)return u.error("请先选择用户");let a=1;l.value==4&&(a=2),Se({cart_id:z.value,uid:p.value,type:a}).then(e=>{u({message:"发送成功",type:"success"})})},U=o(""),J=()=>{if(!p.value)return u.error("请先选择用户");let a=18;l.value==4&&(a=19),O({pay_type:a,is_storage:E,sms_code:U.value,cart_id:z.value,uid:p.value}).then(e=>{v.value=!1,u({message:e.msg,type:"success"}),P(e.data.id),h(1),f()})},F=o(!1),Q=()=>{if(!(!v.value||F.value&&i.value.length>0)&&l.value!=1)return h(l.value-1)},X=()=>{if(!(!v.value||F.value&&i.value.length>0)&&l.value!=4)return h(l.value+1)};return ge(()=>{y.on("left",Q),y.on("right",X)}),he(()=>{y.off("left",Q),y.off("right",X)}),(a,e)=>{const t=j("el-input"),V=j("el-button"),de=j("Delete"),ve=j("el-icon"),_e=j("el-drawer"),pe=ke("loading");return _(),I(_e,{size:"60rem",modelValue:v.value,"onUpdate:modelValue":e[11]||(e[11]=n=>v.value=n),direction:"rtl",onOpen:te,"before-close":f},{header:m(()=>[Fe]),default:m(()=>[s("div",ze,[s("div",Be,[s("div",{class:A(["left",{active:l.value==1}]),onClick:e[0]||(e[0]=n=>h(1))}," 微信/支付宝 ",2),s("div",{class:A(["center",{active:l.value==2}]),onClick:e[1]||(e[1]=n=>h(2))}," 现金收款 ",2),s("div",{class:A(["center",{active:l.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>h(3))}," 采购款 ",2),s("div",{class:A(["right",{active:l.value==4}]),onClick:e[3]||(e[3]=n=>h(4))}," 礼品券兑换 ",2)]),s("div",null,[c.value.activities==1&&l.value!=4?(_(),w("div",je,[s("div",Ae,[De,s("div",Le,[C(" ¥"),s("span",Re,S(c.value.total_price),1)])]),s("div",Te,[Ne,s("div",Ue,[C(S(c.value.activity)+"¥",1),s("span",Ie,S(c.value.activity_price),1)])])])):Y("",!0),s("div",Oe,[Ke,s("div",Me,[C(" ¥"),s("span",qe,S(l.value==4?c.value.total_price:c.value.pay_price),1)])])]),l.value==1?be((_(),w("div",Ge,[x(t,{ref_key:"codeRef",ref:g,modelValue:i.value,"onUpdate:modelValue":e[4]||(e[4]=n=>i.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Z(ue,["enter"]),onFocus:e[5]||(e[5]=n=>F.value=!0),onBlur:e[6]||(e[6]=n=>F.value=!1)},null,8,["modelValue"]),We])),[[pe,k.value]]):l.value==2?(_(),w("div",He,[s("div",Je,[s("div",Qe,[s("div",Xe,[r.value?(_(),w("span",Ye,S(r.value),1)):(_(),w("span",Ze,"按下键盘输入客户支付金额"))]),B.value>=0?(_(),w("div",ea,[s("div",null,[C(" 需找零(元):"),s("span",aa,"¥"+S(B.value),1)]),sa])):(_(),w("div",ta,na)),s("div",ia,[s("div",ca,[(_(!0),w(we,null,Ce(ie.value,n=>(_(),I(V,{key:n,onClick:pa=>d(n)},{default:m(()=>[C(S(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ua,[x(V,{onClick:T},{default:m(()=>[x(ve,null,{default:m(()=>[x(de)]),_:1})]),_:1}),x(V,{onClick:e[7]||(e[7]=n=>T(-1))},{default:m(()=>[C("C")]),_:1}),x(V,{class:A(["enter",{"enter-disable":+r.value<+c.value.pay_price}]),disabled:+r.value<+c.value.pay_price,onClick:H},{default:m(()=>[C(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):l.value==3||l.value==4?(_(),w("div",ra,[s("div",da,[x(t,{modelValue:U.value,"onUpdate:modelValue":e[8]||(e[8]=n=>U.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:Z(J,["enter"]),onFocus:e[9]||(e[9]=n=>F.value=!0),onBlur:e[10]||(e[10]=n=>F.value=!1)},null,8,["modelValue"]),(_(),I(Ee,{style:{"margin-left":"1rem"},onSendCode:re,start:p.value>0,key:c.value.order_id,class:"get-code-btn"},null,8,["start"]))]),x(V,{type:"primary",onClick:J,class:"code-pay"},{default:m(()=>[C("确认支付")]),_:1})])):Y("",!0)])]),footer:m(()=>[s("div",va,[x(V,{class:"cancel-btn",onClick:se},{default:m(()=>[C("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ha=fe(_a,[["__scopeId","data-v-a76a4ead"]]);export{ha as p}; diff --git a/build/assets/shop-DGLf8liO.js b/build/assets/shop-nU50lE2m.js similarity index 68% rename from build/assets/shop-DGLf8liO.js rename to build/assets/shop-nU50lE2m.js index ecb6980..744bd56 100644 --- a/build/assets/shop-DGLf8liO.js +++ b/build/assets/shop-nU50lE2m.js @@ -1 +1 @@ -import{H as s}from"./index-DFqeFzc7.js";import{r}from"./axiosAPI-DiYhnWHW.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function m(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{n as a,m as b,i as m,a as s}; +import{H as s}from"./index-zqjuu94d.js";import{r}from"./axiosAPI-YFghoU-n.js";function a(t){return r.get("/product/product/lists",{params:t})}function i(t){return s.get("/cate/cate/lists",{params:t})}function n(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function m(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{n as a,m as b,i as m,a as s}; diff --git a/build/assets/store-pG1SPGrt.js b/build/assets/store-B9VgAm7I.js similarity index 94% rename from build/assets/store-pG1SPGrt.js rename to build/assets/store-B9VgAm7I.js index 4d8843a..b70995f 100644 --- a/build/assets/store-pG1SPGrt.js +++ b/build/assets/store-B9VgAm7I.js @@ -1 +1 @@ -import{H as e}from"./index-DFqeFzc7.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function n(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(r){return e.post("/store_order/StoreOrder/pay",r)}function c(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function d(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function f(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function O(r){return e.post("/store_order/StoreOrder/checkSms",r)}function _(r){return e.get("/store_order/StoreOrder/print",{params:r})}function A(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function S(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,p as d,n as e,u as f,O as g,_ as h,d as i,S as j,a as o,c as s,A as u,f as w}; +import{H as e}from"./index-zqjuu94d.js";function o(r){return e.post("/cart/cart/create",r)}function s(r){return e.get("/cart/cart/list",{params:r})}function a(r){return e.post("/store_order/StoreOrder/checkOrder",r)}function i(r){return e.post("/cart/cart/delete",r)}function n(r){return e.post("/store_order/StoreOrder/createOrder",r)}function u(r){return e.post("/store_order/StoreOrder/pay",r)}function c(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function d(r){return e.get("/store_order/storeOrder/writeoff_list",{params:r})}function f(r){return e.post("/store_order/StoreOrder/writeoff_order",r)}function O(r){return e.post("/store_order/StoreOrder/checkSms",r)}function _(r){return e.get("/store_order/StoreOrder/print",{params:r})}function A(r){return e.get("/user_product_storage/UserProductStorage/lists",{params:r})}function S(r){return e.post("/user_product_storage/UserProductStorage/supply",r)}export{s as a,o as b,i as c,p as d,n as e,u as f,O as g,_ as h,d as i,S as j,a as o,c as s,A as u,f as w}; diff --git a/build/assets/test-DXXlFOIf.js b/build/assets/test-DPMcYJpc.js similarity index 99% rename from build/assets/test-DXXlFOIf.js rename to build/assets/test-DPMcYJpc.js index b599fd4..7a35557 100644 --- a/build/assets/test-DXXlFOIf.js +++ b/build/assets/test-DPMcYJpc.js @@ -1,4 +1,4 @@ -import{r as O,b as S,c as w,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-DFqeFzc7.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** +import{r as O,b as S,c as w,k as C,e as g,f as T,w as A,F as x,E as I,g as L}from"./index-zqjuu94d.js";var D={exports:{}};(function(j,M){(function(a,e){j.exports=e()})(window,function(){return function(h){var a={};function e(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return h[o].call(d.exports,d,d.exports,e),d.l=!0,d.exports}return e.m=h,e.c=a,e.d=function(o,d,f){e.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:f})},e.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,d){if(d&1&&(o=e(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(e.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var b in o)e.d(f,b,(function(i){return o[i]}).bind(null,b));return f},e.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(d,"a",d),d},e.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},e.p="",e(e.s=0)}({"./src/index.js":function(h,a,e){e.r(a),e("./src/sass/index.scss");var o=e("./src/js/init.js"),d=o.default.init;typeof window<"u"&&(window.printJS=d),a.default=d},"./src/js/browser.js":function(h,a,e){e.r(a);var o={isFirefox:function(){return typeof InstallTrigger<"u"},isIE:function(){return navigator.userAgent.indexOf("MSIE")!==-1||!!document.documentMode},isEdge:function(){return!o.isIE()&&!!window.StyleMedia},isChrome:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;return!!f.chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||navigator.userAgent.toLowerCase().indexOf("safari")!==-1},isIOSChrome:function(){return navigator.userAgent.toLowerCase().indexOf("crios")!==-1}};a.default=o},"./src/js/functions.js":function(h,a,e){e.r(a),e.d(a,"addWrapper",function(){return b}),e.d(a,"capitalizePrint",function(){return i}),e.d(a,"collectStyles",function(){return l}),e.d(a,"addHeader",function(){return n}),e.d(a,"cleanUp",function(){return u}),e.d(a,"isRawHTML",function(){return p});var o=e("./src/js/modal.js"),d=e("./src/js/browser.js");function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(t)}function b(t,s){var c="font-family:"+s.font+" !important; font-size: "+s.font_size+" !important; width:100%;";return'
'+t+"
"}function i(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t,s){for(var c=document.defaultView||window,E="",y=c.getComputedStyle(t,""),m=0;m]*>(.*?)");return s.test(t)}},"./src/js/html.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(n){return typeof n}:f=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f(l)}a.default={print:function(r,n){var u=i(r.printable)?r.printable:document.getElementById(r.printable);if(!u){window.console.error("Invalid HTML element id: "+r.printable);return}r.printableElement=b(u,r),r.header&&Object(o.addHeader)(r.printableElement,r),d.default.send(r,n)}};function b(l,r){for(var n=l.cloneNode(),u=Array.prototype.slice.call(l.childNodes),p=0;p"+t.documentTitle+"",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(v){y.srcdoc+=''})),y.srcdoc+=""),t.type){case"pdf":if(o.default.isIE())try{console.info("Print.js doesn't support PDF printing in Internet Explorer.");var m=window.open(t.fallbackPrintable,"_blank");m.focus(),t.onIncompatibleBrowser()}catch(v){t.onError(v)}finally{t.showModal&&d.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else f.default.print(t,y);break;case"image":l.default.print(t,y);break;case"html":b.default.print(t,y);break;case"raw-html":i.default.print(t,y);break;case"json":r.default.print(t,y);break}}}},"./src/js/json.js":function(h,a,e){e.r(a);var o=e("./src/js/functions.js"),d=e("./src/js/print.js");function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(i)}a.default={print:function(l,r){if(f(l.printable)!=="object")throw new Error("Invalid javascript data object (JSON).");if(typeof l.repeatTableHeader!="boolean")throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!l.properties||!Array.isArray(l.properties))throw new Error("Invalid properties array for your JSON data.");l.properties=l.properties.map(function(n){return{field:f(n)==="object"?n.field:n,displayName:f(n)==="object"?n.displayName:n,columnSize:f(n)==="object"&&n.columnSize?n.columnSize+";":100/l.properties.length+"%;"}}),l.printableElement=document.createElement("div"),l.header&&Object(o.addHeader)(l.printableElement,l),l.printableElement.innerHTML+=b(l),d.default.send(l,r)}};function b(i){var l=i.printable,r=i.properties,n='';i.repeatTableHeader&&(n+=""),n+="";for(var u=0;u'+Object(o.capitalizePrint)(r[u].displayName)+"";n+="",i.repeatTableHeader&&(n+=""),n+="";for(var p=0;p";for(var t=0;t1)for(var E=0;E'+s+""}n+=""}return n+="
",n}},"./src/js/modal.js":function(h,a,e){e.r(a);var o={show:function(f){var b="font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;",i=document.createElement("div");i.setAttribute("style",b),i.setAttribute("id","printJS-Modal");var l=document.createElement("div");l.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var r=document.createElement("div");r.setAttribute("class","printClose"),r.setAttribute("id","printClose"),l.appendChild(r);var n=document.createElement("span");n.setAttribute("class","printSpinner"),l.appendChild(n);var u=document.createTextNode(f.modalMessage);l.appendChild(u),i.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),document.getElementById("printClose").addEventListener("click",function(){o.close()})},close:function(){var f=document.getElementById("printJS-Modal");f&&f.parentNode.removeChild(f)}};a.default=o},"./src/js/pdf.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js"),d=e("./src/js/functions.js");a.default={print:function(i,l){if(i.base64){var r=Uint8Array.from(atob(i.printable),function(u){return u.charCodeAt(0)});f(i,l,r);return}i.printable=/^(blob|http|\/\/)/i.test(i.printable)?i.printable:window.location.origin+(i.printable.charAt(0)!=="/"?"/"+i.printable:i.printable);var n=new window.XMLHttpRequest;n.responseType="arraybuffer",n.addEventListener("error",function(){Object(d.cleanUp)(i),i.onError(n.statusText,n)}),n.addEventListener("load",function(){if([200,201].indexOf(n.status)===-1){Object(d.cleanUp)(i),i.onError(n.statusText,n);return}f(i,l,n.response)}),n.open("GET",i.printable,!0),n.send()}};function f(b,i,l){var r=new window.Blob([l],{type:"application/pdf"});r=window.URL.createObjectURL(r),i.setAttribute("src",r),o.default.send(b,i)}},"./src/js/print.js":function(h,a,e){e.r(a);var o=e("./src/js/browser.js"),d=e("./src/js/functions.js"),f={send:function(n,u){document.getElementsByTagName("body")[0].appendChild(u);var p=document.getElementById(n.frameId);p.onload=function(){if(n.type==="pdf"){o.default.isFirefox()?setTimeout(function(){return b(p,n)},1e3):b(p,n);return}var t=p.contentWindow||p.contentDocument;if(t.document&&(t=t.document),t.body.appendChild(n.printableElement),n.type!=="pdf"&&n.style){var s=document.createElement("style");s.innerHTML=n.style,t.head.appendChild(s)}var c=t.getElementsByTagName("img");c.length>0?i(Array.from(c)).then(function(){return b(p,n)}):b(p,n)}}};function b(r,n){try{if(r.focus(),o.default.isEdge()||o.default.isIE())try{r.contentWindow.document.execCommand("print",!1,null)}catch{r.contentWindow.print()}else r.contentWindow.print()}catch(u){n.onError(u)}finally{o.default.isFirefox()&&(r.style.visibility="hidden",r.style.left="-1px"),Object(d.cleanUp)(n)}}function i(r){var n=r.map(function(u){if(u.src&&u.src!==window.location.href)return l(u)});return Promise.all(n)}function l(r){return new Promise(function(n){var u=function p(){!r||typeof r.naturalWidth>"u"||r.naturalWidth===0||!r.complete?setTimeout(p,500):n()};u()})}a.default=f},"./src/js/raw-html.js":function(h,a,e){e.r(a);var o=e("./src/js/print.js");a.default={print:function(f,b){f.printableElement=document.createElement("div"),f.printableElement.setAttribute("style","width:100%"),f.printableElement.innerHTML=f.printable,o.default.send(f,b)}}},"./src/sass/index.scss":function(h,a,e){},0:function(h,a,e){h.exports=e("./src/index.js")}}).default})})(D);const B=g("h2",null,"小票标题",-1),U=g("p",null,"商品名称: 商品1",-1),R=g("p",null,"价格: ¥10.00",-1),W=g("p",null,"数量: 1",-1),H=g("p",null,"-------------------",-1),N=g("p",null,"总计: ¥10.00",-1),K=g("p",null,"-------------------",-1),z=[B,U,R,W,H,N,K],F={__name:"test",setup(j){const M=O(null),h=()=>{uni.getEnv(e=>{e.h5?I.error("请使用APP打印小票"):a()})},a=()=>{let e="";e+=`******************************** `,e+=`泸优采-小票 `,e+=`单号: CG171565043141139102 `,e+=`测试商品1 * 1 1.00元 diff --git a/build/assets/user-Df1_-QkC.js b/build/assets/user-CILZiEFt.js similarity index 92% rename from build/assets/user-Df1_-QkC.js rename to build/assets/user-CILZiEFt.js index c0f6880..08391f4 100644 --- a/build/assets/user-Df1_-QkC.js +++ b/build/assets/user-CILZiEFt.js @@ -1 +1 @@ -import{H as e}from"./index-DFqeFzc7.js";function u(s){return e.post("/login/account",s)}function t(s){return e.get("/user/UserShip/lists",{params:s})}function i(s){return e.post("/user/user/add",s)}function n(s){return e.post("/user/user/archives_sms",s)}function a(s){return e.get("/user/user/lists",{params:s})}function p(s){return e.get("/user/user/detail",{params:s})}function o(s){return e.get("/user/Address/detail",{params:s})}function d(s){return e.post("/user/Address/edit",s)}function c(s){return e.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return e.post("/user/user/user_ship",s)}function l(s){return e.get("/user/UserLabel/lists",{params:s})}function f(s){return e.post("/user/user/user_label",s)}export{t as a,i as b,n as c,c as d,p as e,A as f,l as g,f as h,o as i,d as j,u as l,a as u}; +import{H as e}from"./index-zqjuu94d.js";function u(s){return e.post("/login/account",s)}function t(s){return e.get("/user/UserShip/lists",{params:s})}function i(s){return e.post("/user/user/add",s)}function n(s){return e.post("/user/user/archives_sms",s)}function a(s){return e.get("/user/user/lists",{params:s})}function p(s){return e.get("/user/user/detail",{params:s})}function o(s){return e.get("/user/Address/detail",{params:s})}function d(s){return e.post("/user/Address/edit",s)}function c(s){return e.post("/store_order/StoreOrder/rechange_amount",s)}function A(s){return e.post("/user/user/user_ship",s)}function l(s){return e.get("/user/UserLabel/lists",{params:s})}function f(s){return e.post("/user/user/user_label",s)}export{t as a,i as b,n as c,c as d,p as e,A as f,l as g,f as h,o as i,d as j,u as l,a as u}; diff --git a/build/index.html b/build/index.html index ffb6320..4a92d75 100644 --- a/build/index.html +++ b/build/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index 2205b5f..13cc3ae 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -123,8 +123,7 @@ onUnmounted(() => { - 重置 + :clearable="false" style="width: 10rem; margin: 0 0 0 1rem" />
diff --git a/src/views/saleHome/component/order.vue b/src/views/saleHome/component/order.vue index e5868b0..a76ae91 100644 --- a/src/views/saleHome/component/order.vue +++ b/src/views/saleHome/component/order.vue @@ -233,7 +233,7 @@ onUnmounted(() => { >
--> -
+
{{ "立即结账 (F9)" diff --git a/src/views/user/component/detail.vue b/src/views/user/component/detail.vue index 7b232f9..b05e439 100644 --- a/src/views/user/component/detail.vue +++ b/src/views/user/component/detail.vue @@ -219,7 +219,7 @@ const cancelUpdate = () => { const isDisabled = ref(true); const activeStore = ref(0); -const activeStoreList = ref(["基本信息", "用户资产"]); +const activeStoreList = ref(["基本信息"]); const isOut = ref(false); // 是否为出库状态 const productList = ref([]); // 商品列表 diff --git a/src/views/user/component/order.vue b/src/views/user/component/order.vue index 2fae689..1f6d6ba 100644 --- a/src/views/user/component/order.vue +++ b/src/views/user/component/order.vue @@ -10,6 +10,7 @@ import { useRouter } from "vue-router"; import mitt from "@/utils/mitt.js"; import moment from "moment"; import add from './add.vue'; +import { apiProvince, apiCity, apiArea, apiStreet, apiVillage, apiBrigade } from '@/api/public' const userStore = useUserStore(); const props = defineProps({ @@ -30,6 +31,7 @@ const where = ref({ page_size: 20, mobile: "", user_ship: "", + street: null }); const loading = ref(false); @@ -89,6 +91,101 @@ getUserShip() const resetWhere = ()=>{ where.value.mobile = ""; where.value.user_ship = ""; + where.value.street = null; + selectedValues.value = []; + getOrderList(true); +} + + +const selectedValues = ref([]) +const options = ref([]); +// 异步加载数据的方法 +const loadOptions = async (node, resolve) => { + const level = node.level; + let response; + if (level !== 0 && !node.data.code) return resolve([]); + // if (level === 0) { + // response = await apiProvince(); + // response = response.data.map((item) => { + // return { + // code: item.province_code, + // name: item.province_name + // } + // }) + // } else + if (level === 0) { + response = await apiCity({ + province_code: 510000 // 四川省 + }); + response = response.data.map((item) => { + return { + code: item.city_code, + name: item.city_name + } + }) + } else if (level === 1) { + response = await apiArea({ + city_code: node.data.code + }); + response = response.data.map((item) => { + return { + code: item.area_code, + name: item.area_name + } + }) + } + else if (level === 2) { + response = await apiStreet({ + area_code: node.data.code + }); + response = response.data.map((item) => { + return { + code: item.street_code, + name: item.street_name, + leaf: true + } + }) + } + else if (level === 3) { + response = await apiVillage({ + street_code: node.data.code + }); + response = response.data.map((item) => { + return { + code: item.village_code, + name: item.village_name, + } + }) + } + else if (level === 4) { + response = await apiBrigade({ + village_code: node.data.code + }); + response = response.data.map((item) => { + return { + code: item.id, + name: item.brigade_name, + leaf: true + } + }) + } + + resolve(response); +}; +const propOptions = { + value: 'code', + label: 'name', + children: 'children', + multiple: false, + lazy: true, + lazyLoad: loadOptions +}; +const changeAddress = ()=>{ + if(selectedValues.value.length){ + where.value.street = selectedValues.value[selectedValues.value.length - 1]; + }else{ + where.value.street = ""; + } getOrderList(true); } @@ -119,8 +216,13 @@ onUnmounted(() => { 重置
+
+
用户地区
+ +
-