diff --git a/dist/assets/axiosAPI-Cd-ap3gb.js b/dist/assets/axiosAPI-Cd-ap3gb.js new file mode 100644 index 0000000..61c1e5e --- /dev/null +++ b/dist/assets/axiosAPI-Cd-ap3gb.js @@ -0,0 +1 @@ +import{K as o,L as s,E as r,u as d,M as g}from"./index-BVz4Ohfy.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/dist/assets/index--1tYNtpI.js b/dist/assets/index--1tYNtpI.js new file mode 100644 index 0000000..c122a5f --- /dev/null +++ b/dist/assets/index--1tYNtpI.js @@ -0,0 +1 @@ +import{r as v,J as ye,b,c as s,k as $,f as u,w as i,g as y,F as T,l as te,d as I,E as j,_ as ue,u as re,o as ce,m as P,a as ve,h as de,e,i as ge,j as _e,z as W,t as k,p as M,q as pe,s as fe,D as Le,n as ne,C as De,I as Re}from"./index-BVz4Ohfy.js";import{a as me,b as ze,c as Ie,u as Fe,d as he,e as Pe,f as je,g as Ee,h as Ne,i as Oe,j as Be}from"./user-CmzBi8Mn.js";import"./moment-Cl4UOzQZ.js";import{r as se}from"./axiosAPI-Cd-ap3gb.js";import{f as qe}from"./store-C3TkF7fN.js";import{p as Te}from"./padding-DDV9klbG.js";function be(V){return se.get("/city",{params:V})}function ke(V){return se.get("/area",{params:V})}function $e(V){return se.get("/street",{params:V})}function Ve(V){return se.get("/village",{params:V})}function we(V){return se.get("/brigade",{params:V})}const Je={class:"add-user"},Ke={__name:"add",emits:["close"],setup(V,{expose:l,emit:m}){const x=v(null),p=ye({mobile:"",code:"",real_name:"",user_ship:"",selectedValues:[]}),w=ye({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"}]}),S=v([]),F=async(z,r)=>{const a=z.level;let f;if(a!==0&&!z.data.code)return r([]);a===0?(f=await be({province_code:51e4}),f=f.data.map(C=>({code:C.city_code,name:C.city_name}))):a===1?(f=await ke({city_code:z.data.code}),f=f.data.map(C=>({code:C.area_code,name:C.area_name}))):a===2?(f=await $e({area_code:z.data.code}),f=f.data.map(C=>({code:C.street_code,name:C.street_name}))):a===3?(f=await Ve({street_code:z.data.code}),f=f.data.map(C=>({code:C.village_code,name:C.village_name}))):a===4&&(f=await we({village_code:z.data.code}),f=f.data.map(C=>({code:C.id,name:C.brigade_name,leaf:!0}))),r(f)},X={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:F},R=v([]);(()=>{me().then(z=>{R.value=z.data.lists})})();const N=m,O=()=>{x.value.validate(async z=>{if(z){let r={};r.mobile=p.mobile,r.code=p.code,r.user_ship=p.user_ship,r.real_name=p.real_name,r.province="510000",r.city=p.selectedValues[0],r.area=p.selectedValues[1],r.street=p.selectedValues[2],r.village=p.selectedValues[3],r.brigade=p.selectedValues[4],ze(r).then(a=>{N("close")})}})},G=()=>{x.value.validateField("mobile",z=>{z&&Ie({mobile:p.mobile}).then(r=>{j.success("发送成功")}).catch(r=>{j.error("发送失败")})})};return l({addUser:O}),(z,r)=>{const a=b("el-input"),f=b("el-form-item"),C=b("el-button"),B=b("el-option"),H=b("el-select"),J=b("el-cascader"),K=b("el-form");return s(),$("div",Je,[u(K,{model:p,rules:w,ref_key:"formDataRef",ref:x,"label-width":"80px"},{default:i(()=>[u(f,{label:"用户电话",prop:"mobile"},{default:i(()=>[u(a,{modelValue:p.mobile,"onUpdate:modelValue":r[0]||(r[0]=h=>p.mobile=h),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),u(f,{label:"验证码",prop:"code"},{default:i(()=>[u(a,{modelValue:p.code,"onUpdate:modelValue":r[1]||(r[1]=h=>p.code=h),placeholder:"请输入验证码",style:{flex:"1"}},null,8,["modelValue"]),u(C,{type:"primary",style:{"margin-left":"1rem"},onClick:G},{default:i(()=>[y("获取验证码")]),_:1})]),_:1}),u(f,{label:"用户姓名",prop:"real_name"},{default:i(()=>[u(a,{modelValue:p.real_name,"onUpdate:modelValue":r[2]||(r[2]=h=>p.real_name=h),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),u(f,{label:"用户类型",prop:"user_ship"},{default:i(()=>[u(H,{modelValue:p.user_ship,"onUpdate:modelValue":r[3]||(r[3]=h=>p.user_ship=h),placeholder:"请选择用户类型",style:{width:"100%"}},{default:i(()=>[(s(!0),$(T,null,te(R.value,h=>(s(),I(B,{key:h.id,label:h.title,value:h.id,disabled:h.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),u(f,{label:"用户地址",prop:"selectedValues"},{default:i(()=>[u(J,{style:{width:"100%"},modelValue:p.selectedValues,"onUpdate:modelValue":r[4]||(r[4]=h=>p.selectedValues=h),options:S.value,props:X,load:F,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Ce=V=>(pe("data-v-e2b0bc71"),V=V(),fe(),V),Me={class:"my-order"},We={class:"header-nav"},Ge=Ce(()=>e("div",{class:"nav-item"},k("用户列表"),-1)),He={class:"header-row"},Qe=Ce(()=>e("div",{class:"label"},"用户类型",-1)),Xe={class:"header-input"},Ye={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},Ze=["onClick"],et={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},tt={class:"top flex"},lt={class:"r-1"},at={class:"bold"},st={class:"bottom flex",style:{"justify-content":"space-between"}},ot={class:"red"},it={class:"red"},nt={class:"red"},dt={class:"red"},ut={key:0,class:"load-end"},rt={key:1,class:"load-end"},ct={class:"dialog-footer"},vt={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(V){re(),v([]);const l=v({page_no:1,page_size:20,mobile:"",user_ship:""}),m=v(!1),x=v(0),p=v(0),w=v(!1),S=v([]),F=(r=!1)=>{if(r)l.value.page_no=1;else if(w.value||m.value)return;m.value=!0,Fe(l.value).then(a=>{r?S.value=a.data.lists:S.value=[...S.value,...a.data.lists],l.value.page_no==1&&S.value.length>0&&P.emit("set-user-detail",S.value[0]),a.data.lists.length{w.value=!0,m.value=!1})},X=(r,a)=>{p.value=a,P.emit("set-user-detail",r)},R=v(!1),A=v(null),N=()=>{var r;(r=A.value)==null||r.addUser()},O=()=>{R.value=!1,F(!0)},G=v([]);return(()=>{me().then(r=>{G.value=r.data.lists})})(),ce(()=>{P.on("re-load-user-list",()=>{F(!0)})}),ve(()=>{P.off("re-load-user-list")}),(r,a)=>{const f=b("Plus"),C=b("el-icon"),B=b("el-button"),H=b("el-option"),J=b("el-select"),K=b("el-input"),h=b("el-avatar"),E=b("el-tag"),L=b("el-dialog"),c=de("loading"),n=de("infinite-scroll");return s(),$("div",Me,[e("div",We,[Ge,u(B,{type:"primary",onClick:a[0]||(a[0]=o=>R.value=!0)},{default:i(()=>[u(C,null,{default:i(()=>[u(f)]),_:1}),y(" 添加用户")]),_:1})]),e("div",He,[Qe,u(J,{modelValue:l.value.user_ship,"onUpdate:modelValue":a[1]||(a[1]=o=>l.value.user_ship=o),onChange:a[2]||(a[2]=o=>F(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:i(()=>[(s(!0),$(T,null,te(G.value,o=>(s(),I(H,{key:o.id,label:o.title,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e("div",Xe,[u(K,{modelValue:l.value.mobile,"onUpdate:modelValue":a[4]||(a[4]=o=>l.value.mobile=o),placeholder:"搜索手机号/ID",onKeydown:a[5]||(a[5]=ge(o=>F(!0),["enter"])),onClear:a[6]||(a[6]=o=>F(!0)),clearable:""},{append:i(()=>[u(B,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=o=>F(!0))},{default:i(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),_e((s(),$("div",Ye,[(s(!0),$(T,null,te(S.value,(o,g)=>{var d;return s(),$("div",{class:W(["item",{"item-active":p.value==g}]),key:g,onClick:Y=>X(o,g)},[u(h,{class:"avatar",src:o.avatar},null,8,["src"]),e("div",et,[e("div",tt,[e("div",lt,[e("span",at,k(o.nickname),1),e("span",null,k(" (ID:"+o.id+")"),1)]),e("div",null,"手机号: "+k(o.mobile),1)]),e("div",st,[e("div",null,[y("余额: "),e("span",ot,k(o.now_money),1)]),e("div",null,[y("采购款: "),e("span",it,k(o.purchase_funds),1)]),e("div",null,[y("返还金: "),e("span",nt,k((d=o.return_money)==null?void 0:d.toFixed(2)),1)]),e("div",null,[y("礼品券: "),e("span",dt,k(o.integral),1)]),e("div",null,[o.user_ship!=1?(s(),I(E,{key:0,type:"primary"},{default:i(()=>[y(k(o.user_ship_name),1)]),_:2},1024)):(s(),I(E,{key:1,type:"success"},{default:i(()=>[y(k(o.user_ship_name),1)]),_:2},1024))])])])],10,Ze)}),128)),w.value?(s(),$("div",ut,"没有更多了")):M("",!0),m.value?(s(),$("div",rt,"加载中...")):M("",!0)])),[[c,m.value],[n,F]]),u(L,{modelValue:R.value,"onUpdate:modelValue":a[8]||(a[8]=o=>R.value=o),title:"添加用户",width:"600"},{footer:i(()=>[e("div",ct,[u(B,{onClick:a[7]||(a[7]=o=>R.value=!1)},{default:i(()=>[y("取消")]),_:1}),u(B,{type:"primary",onClick:N},{default:i(()=>[y(" 添加 ")]),_:1})])]),default:i(()=>[u(Ke,{ref_key:"addRef",ref:A,onClose:O},null,512)]),_:1},8,["modelValue"])])}}},_t=ue(vt,[["__scopeId","data-v-e2b0bc71"]]),le=V=>(pe("data-v-7b0b3630"),V=V(),fe(),V),pt=le(()=>e("h4",null,"选择支付方式",-1)),ft={class:"dra-body"},mt={class:"header"},yt={style:{display:"inline-block"}},ht=le(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),gt={style:{color:"#f5222d","padding-bottom":"2rem"}},bt={style:{"font-size":"1.6rem"}},kt={key:0,"element-loading-text":"支付中",class:"card1"},$t=le(()=>e("div",{class:"tips"},null,-1)),Vt={key:1,class:"card2"},wt={class:"drawer-body"},Ct={class:"counter"},St={class:"received"},xt={key:0},Ut={key:1,style:{"font-size":"1rem",color:"#999"}},At={key:0,class:"balance"},Lt={class:"money"},Dt=le(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),Rt={key:1,class:"balance"},zt=le(()=>e("div",null,"不够找零, 请支付更多金额",-1)),It=le(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),Ft=[zt,It],Pt={class:"keypad"},jt={class:"left"},Et={class:"right"},Nt={style:{width:"100%",display:"flex","justify-content":"center"}},Ot={__name:"payUser",emits:["paySuccess"],setup(V,{expose:l,emit:m}){const x=v(!1),p=v(1),w=v(""),S=v("");re();const F=()=>{h()},X=()=>{ne(()=>{setTimeout(()=>{var t;E.value=!1,w.value="",a.value=!0,(t=S.value)==null||t.focus(),R(p.value)},300)})},R=t=>{p.value=t,console.log(p.value),p.value==2?window.addEventListener("keydown",Z):(window.removeEventListener("keydown",Z),ne(()=>{var _;w.value="",(_=S.value)==null||_.focus()}))},A=v({price:0,uid:""}),N=v([]),O=v(!1),G=t=>{A.value=t.data,A.value.total=t.data.price,N.value=t.cart_id,O.value=t.isRePay||!1},z=t=>{A.value.total=t.price,H.value=t.order_id},r=m,a=v(!1),f=v(["1","2","3","4","5","6","7","8","9","0","00","."]),C=/^(10|11|12|13|14|15)\d{16}$/,B=/^(25|26|27|28|29|30)\d{14,22}$/,H=v(""),J=()=>{if(E.value=!0,S.value.blur(),O.value)K();else{let t;if(C.test(w.value))t="9";else if(B.test(w.value))t="13";else return E.value=!1,w.value="",S.value.focus(),j.error("请输入正确的支付码");he({uid:A.value.uid,price:A.value.price,pay_type:t,auth_code:w.value}).then(_=>{_.data.out_trade_no&&_.msg=="支付成功"?(x.value=!1,j({message:"支付成功",type:"success"}),h(_.data)):_.msg=="用户支付中"&&_.code==1&&(j.warning(_.msg),P.on("pay_success",U=>{j({message:"支付成功",type:"success"}),setTimeout(()=>{P.off("pay_success")},200),x.value=!1,h(U)}))}).catch(_=>{E.value=!1,ne(()=>{var U;(U=S.value)==null||U.focus()})})}},K=()=>{let t=17;if(p.value==1)if(C.test(w.value))t="9";else if(B.test(w.value))t="13";else return E.value=!1,w.value="",S.value.focus(),j.error("请输入正确的支付码");qe({order_id:A.value.order_id,pay_type:t,auth_code:w.value}).then(_=>{var U;(U=_.msg)!=null&&U.includes("成功")?(x.value=!1,j({message:"支付成功",type:"success"}),h()):_.msg=="用户支付中"&&_.code==1&&(j.warning(_.msg),P.on("pay_success",Q=>{j({message:"支付成功",type:"success"}),setTimeout(()=>{P.off("pay_success")},200),x.value=!1,h(Q)}))}).catch(_=>{w.value="",E.value=!1,ne(()=>{var U;(U=S.value)==null||U.focus()})})};v(0);const h=t=>{var _;window.removeEventListener("keydown",Z),a.value=!1,E.value=!1,w.value="",c.value="",L.value=[],(_=S.value)==null||_.blur(),r("paySuccess",t),x.value=!1},E=v(!1);l({drawer:x,setForm:G,setRePay:z,beforeClose:h});const L=v([]),c=v(""),n=Le(()=>+c.value>0?(c.value-A.value.total).toFixed(2):-1),o=v(!1),g=t=>{t===-1?L.value=[]:L.value.pop(),c.value=L.value.length?L.value.join(""):0},d=t=>{o.value===!1&&(c.value="",o.value=!0);let _=String(c.value).indexOf(".")+1,U=String(c.value).length-_;console.log(_,U),(_===0||U<2)&&(L.value.join("")<=9999999&&L.value.push(t),c.value=L.value.join("")>99999999?99999999:L.value.join(""))},Y=()=>{if(n.value===""||n.value===null||n.value===void 0||+c.value<+A.value.total)return j.error("收款金额应该大于等于应收金额");O.value?K():he({uid:A.value.uid,price:A.value.price,pay_type:17}).then(t=>{x.value=!1,j({message:t.msg,type:"success"}),R(1),h()}).catch(t=>{E.value=!1})},Z=t=>{let U=(t||window.event).keyCode;if(U==37)return R(2);if(U==120)return P.emit("F9");if(U==27)return h();switch(t.stopPropagation(),t.preventDefault(),U){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:g();break;case 13:Y();break}},ee=v(!1),oe=()=>{if(!(!x.value||ee.value&&w.value.length>0)&&p.value==2)return R(1)},ae=()=>{if(!(!x.value||ee.value&&w.value.length>0)&&p.value==1)return R(2)};return ce(()=>{P.on("left",oe),P.on("right",ae)}),ve(()=>{P.off("left",oe),P.off("right",ae)}),(t,_)=>{const U=b("el-input"),Q=b("el-button"),Se=b("Delete"),xe=b("el-icon"),Ue=b("el-drawer"),Ae=de("loading");return s(),I(Ue,{size:"60rem",modelValue:x.value,"onUpdate:modelValue":_[6]||(_[6]=ie=>x.value=ie),direction:"rtl",onOpen:X,"before-close":h},{header:i(()=>[pt]),default:i(()=>{var ie;return[e("div",ft,[e("div",mt,[e("div",{class:W(["left",{active:p.value==1}]),onClick:_[0]||(_[0]=q=>R(1))}," 微信/支付宝 ",2),e("div",{class:W(["right",{active:p.value==2}]),onClick:_[1]||(_[1]=q=>R(2))}," 现金收款 ",2)]),e("div",null,[e("div",yt,[ht,e("div",gt,[y(" ¥"),e("span",bt,k((ie=A.value)==null?void 0:ie.price),1)])])]),p.value==1?_e((s(),$("div",kt,[u(U,{ref_key:"codeRef",ref:S,modelValue:w.value,"onUpdate:modelValue":_[2]||(_[2]=q=>w.value=q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(J,["enter"]),onFocus:_[3]||(_[3]=q=>ee.value=!0),onBlur:_[4]||(_[4]=q=>ee.value=!1)},null,8,["modelValue"]),$t])),[[Ae,E.value]]):(s(),$("div",Vt,[e("div",wt,[e("div",Ct,[e("div",St,[c.value?(s(),$("span",xt,k(c.value),1)):(s(),$("span",Ut,"按下键盘输入客户支付金额"))]),n.value>=0?(s(),$("div",At,[e("div",null,[y(" 需找零(元):"),e("span",Lt,"¥"+k(n.value),1)]),Dt])):(s(),$("div",Rt,Ft)),e("div",Pt,[e("div",jt,[(s(!0),$(T,null,te(f.value,q=>(s(),I(Q,{key:q,onClick:Wl=>d(q)},{default:i(()=>[y(k(q),1)]),_:2},1032,["onClick"]))),128))]),e("div",Et,[u(Q,{onClick:g},{default:i(()=>[u(xe,null,{default:i(()=>[u(Se)]),_:1})]),_:1}),u(Q,{onClick:_[5]||(_[5]=q=>g(-1))},{default:i(()=>[y("C")]),_:1}),u(Q,{class:W(["enter",{"enter-disable":+c.value<+A.value.total}]),disabled:+c.value<+A.value.total,onClick:Y},{default:i(()=>[y(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:i(()=>[e("div",Nt,[u(Q,{class:"cancel-btn",onClick:F},{default:i(()=>[y("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},Bt=ue(Ot,[["__scopeId","data-v-7b0b3630"]]),D=V=>(pe("data-v-ff0075ff"),V=V(),fe(),V),qt={class:"my-order"},Tt={key:0,class:"detail"},Jt={class:"table"},Kt=D(()=>e("div",{class:"table-title"},"用户信息",-1)),Mt={class:"table-info"},Wt={class:"info-item"},Gt=D(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),Ht={class:"info-item-info red"},Qt={class:"info-item"},Xt=D(()=>e("div",{class:"info-item-title"},"采购款:",-1)),Yt={class:"info-item-info red"},Zt={class:"info-item"},el=D(()=>e("div",{class:"info-item-title"},"返还金:",-1)),tl={class:"info-item-info red"},ll={class:"info-item"},al=D(()=>e("div",{class:"info-item-title"},"头像:",-1)),sl={class:"info-item-info"},ol={class:"info-item"},il=D(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),nl={class:"info-item-info red"},dl={class:"info-item"},ul=D(()=>e("div",{class:"info-item-title"},"ID:",-1)),rl={class:"info-item-info"},cl={class:"info-item"},vl=D(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),_l={class:"info-item-info"},pl={class:"info-item"},fl=D(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),ml={class:"info-item-info"},yl={class:"info-item"},hl=D(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),gl={class:"info-item-info"},bl={class:"info-item"},kl=D(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),$l={class:"info-item-info"},Vl={class:"info-item"},wl=D(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Cl={class:"info-item-info"},Sl={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},xl=D(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Ul={class:"info-item-info"},Al={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ll=D(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),Dl={class:"info-item-info"},Rl={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},zl=D(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),Il=D(()=>e("div",{class:"table-title"},[y("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),Fl={class:"table-info"},Pl={class:"pay-btn"},jl=D(()=>e("div",null,"¥1000.00",-1)),El=[jl],Nl=D(()=>e("div",null,"¥2000.00",-1)),Ol=[Nl],Bl=D(()=>e("div",null,"¥5000.00",-1)),ql=[Bl],Tl={key:1},Jl={__name:"detail",setup(V){re(),De();const l=v({id:""}),m=v({price:"",type:1}),x=v(null),p=()=>{m.value.type==1?m.value.price="1000":m.value.type==2?m.value.price="2000":m.value.type==3&&(m.value.price="5000"),m.value.type==0&&(m.value.price=Number(m.value.price).toFixed(2)),console.log("支付",m.value),x.value.setForm({data:{uid:l.value.id,price:m.value.price}}),x.value.drawer=!0},w=()=>{console.log("支付成功"),P.emit("re-load-user-list")},S=v(!1),F=v([]);(()=>{me().then(c=>{F.value=c.data.lists})})();const R=()=>{je({id:l.value.id,user_ship:l.value.user_ship}).then(c=>{var n;j.success("修改成功"),l.value.user_ship_name=(n=F.value.find(o=>o.id==l.value.user_ship))==null?void 0:n.title,S.value=!1})},A=()=>{S.value=!1},N=v(!1),O=v([]);(()=>{Ee().then(c=>{O.value=c.data.lists})})();const z=()=>{Ne({id:l.value.id,label_id:l.value.label_id}).then(c=>{var n;j.success("修改成功"),l.value.label_name=(n=O.value.find(o=>o.label_id==l.value.label_id))==null?void 0:n.label_name,N.value=!1})},r=()=>{N.value=!1},a=v({id:"",province:"",city:"",area:"",street:"",brigade:""}),f=v([]),C=v([]),B=()=>{Oe({uid:l.value.id}).then(c=>{c.data.village&&(f.value=[c.data.city,c.data.area,c.data.street,c.data.village,+c.data.brigade],C.value=JSON.parse(JSON.stringify(f.value)),a.value=Object.assign(a.value,c.data))})},H=v([]),J=async(c,n)=>{const o=c.level;let g;if(o!==0&&!c.data.code)return n([]);o===0?(g=await be({province_code:51e4}),g=g.data.map(d=>({code:d.city_code,name:d.city_name}))):o===1?(g=await ke({city_code:c.data.code}),g=g.data.map(d=>({code:d.area_code,name:d.area_name}))):o===2?(g=await $e({area_code:c.data.code}),g=g.data.map(d=>({code:d.street_code,name:d.street_name}))):o===3?(g=await Ve({street_code:c.data.code}),g=g.data.map(d=>({code:d.village_code,name:d.village_name}))):o===4&&(g=await we({village_code:c.data.code}),g=g.data.map(d=>({code:d.id,name:d.brigade_name,leaf:!0}))),n(g)},K={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:J},h=async()=>{a.value.city=f.value[0],a.value.area=f.value[1],a.value.street=f.value[2],a.value.village=f.value[3],a.value.brigade=f.value[4],a.value.phone||(a.value.phone=l.value.account),a.value.real_name||(a.value.real_name=l.value.real_name||l.value.nickname),Be({...a.value,uid:l.value.id}).then(c=>{j.success("编辑成功"),L.value=!0})},E=()=>{f.value=JSON.parse(JSON.stringify(C.value)),L.value=!0},L=v(!0);return ce(()=>{P.on("set-user-detail",c=>{l.value=c,Pe({id:c.id}).then(({data:n})=>{l.value=Object.assign(c,n),console.log(l.value)}),B()})}),ve(()=>{P.off("set-user-detail")}),(c,n)=>{var ae;const o=b("el-avatar"),g=b("el-tag"),d=b("el-button"),Y=b("el-option"),Z=b("el-select"),ee=b("el-cascader"),oe=b("el-empty");return s(),$("div",qt,[l.value.id?(s(),$("div",Tt,[e("div",Jt,[Kt,e("div",Mt,[e("div",Wt,[Gt,e("div",Ht,"¥"+k(l.value.now_money),1)]),e("div",Qt,[Xt,e("div",Yt,"¥"+k(l.value.purchase_funds),1)]),e("div",Zt,[el,e("div",tl,"¥"+k((ae=l.value.number)==null?void 0:ae.toFixed(2)),1)]),e("div",ll,[al,e("div",sl,[u(o,{style:{width:"4rem",height:"4rem"},src:l.value.avatar},null,8,["src"])])]),e("div",ol,[il,e("div",nl,"¥"+k(l.value.integral),1)]),e("div",dl,[ul,e("div",rl,k(l.value.id),1)]),e("div",cl,[vl,e("div",_l,k(l.value.nickname),1)]),e("div",pl,[fl,e("div",ml,k(l.value.mobile),1)]),e("div",yl,[hl,e("div",gl,k(l.value.account),1)]),e("div",bl,[kl,e("div",$l,k(l.value.real_name),1)]),e("div",Vl,[wl,e("div",Cl,k(l.value.create_time),1)]),e("div",Sl,[xl,e("div",Ul,[S.value==!1?(s(),$(T,{key:0},[l.value.user_ship!=1?(s(),I(g,{key:0,type:"primary",size:"large"},{default:i(()=>[y(k(l.value.user_ship_name),1)]),_:1})):(s(),I(g,{key:1,type:"success",size:"large"},{default:i(()=>[y(k(l.value.user_ship_name),1)]),_:1})),l.value.user_ship!=1?(s(),I(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[0]||(n[0]=t=>S.value=!0)},{default:i(()=>[y("修改")]),_:1})):M("",!0)],64)):(s(),$(T,{key:1},[u(Z,{modelValue:l.value.user_ship,"onUpdate:modelValue":n[1]||(n[1]=t=>l.value.user_ship=t),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:i(()=>[(s(!0),$(T,null,te(F.value,t=>(s(),I(Y,{key:t.id,label:t.title,value:t.id,disabled:t.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),u(d,{type:"primary",style:{"margin-left":"1rem"},onClick:R},{default:i(()=>[y("确认")]),_:1}),u(d,{style:{"margin-left":"1rem"},onClick:A},{default:i(()=>[y("取消")]),_:1})],64))])]),l.value.user_ship==1?(s(),$("div",Al,[Ll,e("div",Dl,[N.value==!1?(s(),$(T,{key:0},[l.value.label_name?(s(),I(g,{key:0,type:"primary",size:"large"},{default:i(()=>[y(k(l.value.label_name),1)]),_:1})):M("",!0),l.value.label_name?(s(),I(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:n[2]||(n[2]=t=>N.value=!0)},{default:i(()=>[y("修改")]),_:1})):(s(),I(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[3]||(n[3]=t=>{l.value.label_id="",N.value=!0})},{default:i(()=>[y("添加")]),_:1}))],64)):(s(),$(T,{key:1},[u(Z,{modelValue:l.value.label_id,"onUpdate:modelValue":n[4]||(n[4]=t=>l.value.label_id=t),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:i(()=>[(s(!0),$(T,null,te(O.value,t=>(s(),I(Y,{key:t.label_id,label:t.label_name,value:t.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),u(d,{type:"primary",style:{"margin-left":"1rem"},onClick:z},{default:i(()=>[y("确认")]),_:1}),u(d,{style:{"margin-left":"1rem"},onClick:r},{default:i(()=>[y("取消")]),_:1})],64))])])):M("",!0),e("div",Rl,[zl,(s(),I(ee,{key:l.value.id,style:{flex:"1"},modelValue:f.value,"onUpdate:modelValue":n[5]||(n[5]=t=>f.value=t),options:H.value,props:K,load:J,class:"w-full",disabled:L.value},null,8,["modelValue","options","disabled"])),L.value?(s(),I(d,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:n[6]||(n[6]=t=>L.value=!1)},{default:i(()=>[y("修改")]),_:1})):M("",!0),L.value?M("",!0):(s(),I(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:h},{default:i(()=>[y("确认")]),_:1})),L.value?M("",!0):(s(),I(d,{key:2,style:{"margin-left":"1rem"},onClick:E},{default:i(()=>[y("取消")]),_:1}))])]),Il,e("div",Fl,[e("div",Pl,[e("div",{class:W(["pay-item",{"pay-item-active":m.value.type==1}]),onClick:n[7]||(n[7]=t=>m.value.type=1)},El,2),e("div",{class:W(["pay-item",{"pay-item-active":m.value.type==2}]),onClick:n[8]||(n[8]=t=>m.value.type=2)},Ol,2),e("div",{class:W(["pay-item",{"pay-item-active":m.value.type==3}]),onClick:n[9]||(n[9]=t=>m.value.type=3)},ql,2),e("div",{class:W(["pay-item",{"pay-item-active":m.value.type==0}]),onClick:n[11]||(n[11]=t=>m.value.type=0)},[_e(e("input",{type:"number",class:"input","onUpdate:modelValue":n[10]||(n[10]=t=>m.value.price=t),placeholder:"自定义金额"},null,512),[[Re,m.value.price]])],2)]),u(d,{type:"primary",size:"large",class:"pay",onClick:p},{default:i(()=>[y("立即支付")]),_:1})])])])):(s(),$("div",Tl,[u(oe)])),u(Bt,{ref_key:"payRef",ref:x,onPaySuccess:w},null,512)])}}},Kl=ue(Jl,[["__scopeId","data-v-ff0075ff"]]),Ml={class:"my-card"},ea={__name:"index",setup(V){return(l,m)=>(s(),$("div",Ml,[u(_t,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),u(Te),u(Kl,{ref:"detailRef"},null,512)]))}};export{ea as default}; diff --git a/dist/assets/index-CoEJs8iO.js b/dist/assets/index-7gzsvc_9.js similarity index 98% rename from dist/assets/index-CoEJs8iO.js rename to dist/assets/index-7gzsvc_9.js index 1db13e9..5863ad9 100644 --- a/dist/assets/index-CoEJs8iO.js +++ b/dist/assets/index-7gzsvc_9.js @@ -1 +1 @@ -import{_ as q,u as H,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as h,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,C as X,o as G,a as Y,q as Z,s as ee,n as K,H as L,I as te}from"./index-C8Aez8VK.js";import{d as se,i as oe,w as ie,h as ae}from"./store-DpldfEnh.js";/* empty css */import{p as le}from"./padding-2CqLry9i.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},Oe={key:5},Ve={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={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:y}){H(),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=d.data.lists,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,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,p(!0)},R=y,O=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(C,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),S=f("spna"),A=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(w.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:h(()=>[b("返回上一页")]),_:1})])]),e("div",re,[_(B,{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:h(()=>[_(V,{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:h(()=>[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(D,{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:h(()=>[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",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+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],[J,p]])])}}},Ee=q(Le,[["__scopeId","data-v-90e829d8"]]),v=w=>(Z("data-v-f5ee51ef"),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"},He=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Ge={class:"info-item"},Je=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"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={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){H(),X();const t=l({id:""});l([]),l(null);const y=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 B;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),O=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),V=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,[He,e("div",We,a(t.value.total_num||0),1)]),e("div",Ge,[Je,e("div",Qe,"¥"+a(t.value.total_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",Ot,[b(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),b(" 款商品 ")]),_(R,{data:t.value.product},{default:h(()=>[_(g,{label:"商品信息"},{default:h(({row:D})=>{var S,A;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem"},src:(S=D.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",Dt,a((A=D.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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),St])),[[d,m]]),e("div",At,[t.value.is_writeoff==0?(s(),F(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:h(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",Lt,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:h(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[V,y.value]]):(s(),o("div",Et,[_(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-f5ee51ef"]]),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),y=l(""),n=l(null),r=l(null),m=()=>{if(y.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{r.value.setCode(y.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=>y.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,y.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:h(()=>[_(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)},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 H,r as l,b as f,h as E,c as s,k as o,e,t as a,f as _,w as h,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,C as X,o as G,a as Y,q as Z,s as ee,n as K,H as L,I as te}from"./index-BVz4Ohfy.js";import{d as se,i as oe,w as ie,h as ae}from"./store-C3TkF7fN.js";/* empty css */import{p as le}from"./padding-DDV9klbG.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},Oe={key:5},Ve={key:1,style:{color:"#ff4a00"}},Be={key:0,class:"cashier"},De={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:y}){H(),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=d.data.lists,x.emit("set-sale-order-detail",c.value[0]),m.value=d.data.count,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,p(!0)},R=y,O=()=>{x.emit("set-sale-order-detail",{}),c.value=[],R("backOne")};return t({setCode:g}),(C,d)=>{const V=f("el-button"),B=f("el-input"),D=f("el-image"),S=f("spna"),A=E("loading"),J=E("infinite-scroll");return s(),o("div",ne,[e("div",ce,[e("div",de,a(w.type==2?"核销订单":"核销记录"),1),e("div",_e,[_(V,{type:"primary",size:"small",onClick:O},{default:h(()=>[b("返回上一页")]),_:1})])]),e("div",re,[_(B,{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:h(()=>[_(V,{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:h(()=>[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(D,{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:h(()=>[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",Oe,"(微信支付)")):u("",!0)])):(s(),o("div",Ve,a(i.paid_name),1))]),i.is_writeoff==0?(s(),o("div",Be,"核销码:"+a(i.verify_code),1)):(s(),o("div",De,"已核销:"+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],[J,p]])])}}},Ee=q(Le,[["__scopeId","data-v-90e829d8"]]),v=w=>(Z("data-v-f5ee51ef"),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"},He=v(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),We={class:"info-item-info"},Ge={class:"info-item"},Je=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"},Ot={style:{"font-size":"0.9rem"}},Vt={style:{color:"#ff4a00"}},Bt={style:{display:"flex","align-items":"center"}},Dt={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){H(),X();const t=l({id:""});l([]),l(null);const y=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 B;const z=f("el-image"),g=f("el-table-column"),R=f("el-table"),O=f("el-button"),C=f("el-empty"),d=E("infinite-scroll"),V=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,[He,e("div",We,a(t.value.total_num||0),1)]),e("div",Ge,[Je,e("div",Qe,"¥"+a(t.value.total_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",Ot,[b(" 共计 "),e("span",Vt,a(((B=t.value.product)==null?void 0:B.length)||" "),1),b(" 款商品 ")]),_(R,{data:t.value.product},{default:h(()=>[_(g,{label:"商品信息"},{default:h(({row:D})=>{var S,A;return[e("div",Bt,[_(z,{style:{height:"3rem",width:"3rem"},src:(S=D.cart_info)==null?void 0:S.image},null,8,["src"]),e("span",Dt,a((A=D.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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),St])),[[d,m]]),e("div",At,[t.value.is_writeoff==0?(s(),F(O,{key:0,type:"primary",size:"large",disabled:t.value.is_writeoff,onClick:k},{default:h(()=>[b("立即核销")]),_:1},8,["disabled"])):u("",!0),t.value.is_writeoff==1?(s(),o("div",Lt,"该订单已核销")):u("",!0),t.value.is_writeoff==1?(s(),F(O,{key:2,style:{"margin-left":"1rem"},type:"warning",size:"large",onClick:I},{default:h(()=>[b("打印小票")]),_:1})):u("",!0)])])),[[V,y.value]]):(s(),o("div",Et,[_(C,{description:"没找到核销订单信息"})]))])}}},Nt=q(Ft,[["__scopeId","data-v-f5ee51ef"]]),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),y=l(""),n=l(null),r=l(null),m=()=>{if(y.value=="")return U.error("请输入订单编号");t.value=2,K(()=>{r.value.setCode(y.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=>y.value=R),placeholder:"",class:"input",onKeyup:W(m,["enter"])},null,544),[[te,y.value]]),e("div",{class:"btn",onClick:m},"查询")]),e("div",{class:"to-list",onClick:k},[Tt,_(g,null,{default:h(()=>[_(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)},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/dist/assets/index-9TFzU5dK.js b/dist/assets/index-9TFzU5dK.js deleted file mode 100644 index 0aba6c5..0000000 --- a/dist/assets/index-9TFzU5dK.js +++ /dev/null @@ -1,27 +0,0 @@ -import{c as Fp,a as Wp,b as Gs,o as Bp}from"./store-DpldfEnh.js";import{_ as it,r as O,o as Pt,m as ne,a as $t,b as tn,c as X,d as Oe,w as fn,e as v,f as D,g as dn,t as un,n as uu,E as Tr,u as Pr,h as bt,i as Hs,j as ou,k as gn,F as Tt,l as Ot,p as rt,q as zs,s as Ks,v as Et,x as Up,y as Er,z as br,A as Mp,B as Dp}from"./index-C8Aez8VK.js";import{u as Np}from"./user-C93qGz5f.js";import"./moment-Cl4UOzQZ.js";import{p as Ns}from"./padding-2CqLry9i.js";import{m as iu,s as Gp}from"./shop-BWPO2XM6.js";import{p as Hp}from"./pay-B94oZZEx.js";/* empty css */const zp={class:"price"},Kp={class:"flex"},qp={style:{margin:"0.625rem","padding-bottom":"40px"}},kp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Zp={class:"dialog-footer"},Yp={__name:"price",emits:["changeAllPrice"],setup(vn,{expose:wn,emit:s}){const E=O(!1),F=O(null),Z=O(0),I=(q=!0,y=0)=>{U.value.nowPrice="",U.value.percentage="",E.value=q,Z.value=y,uu(()=>{setTimeout(()=>{var on;(on=F.value)==null||on.focus()},150)})},U=O({nowPrice:"",percentage:""}),rn=q=>{U.value.percentage=(q/Z.value*100).toFixed(2)},hn=q=>{U.value.nowPrice=(Z.value*q/100).toFixed(2)},J=s,j=()=>{if(U.value.percentage>100)return U.value.nowPrice="",U.value.percentage="",Tr.error("改价金额不能大于当前订单金额");if(U.value.nowPrice<=0)return U.value.nowPrice="",U.value.percentage="",Tr.error("金额不能小于0");J("changeAllPrice",U.value.nowPrice)};wn({show:I,dialogVisible:E});const En=()=>{E.value&&j()};return Pt(()=>{ne.on("enter",En)}),$t(()=>{ne.off("enter",En)}),(q,y)=>{const on=tn("el-input"),P=tn("el-button"),K=tn("el-dialog");return X(),Oe(K,{modelValue:E.value,"onUpdate:modelValue":y[2]||(y[2]=k=>E.value=k),title:"订单改价",width:"650"},{footer:fn(()=>[v("div",Zp,[D(P,{class:"ok-btn",type:"primary",onClick:j},{default:fn(()=>[dn(" 确定 (Enter) ")]),_:1})])]),default:fn(()=>[v("div",zp,[v("div",Kp,[D(on,{ref_key:"priceRef",ref:F,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=k=>U.value.nowPrice=k),type:"number",placeholder:"请输入改价后的价格",onInput:rn},{suffix:fn(()=>[dn("元")]),_:1},8,["modelValue"]),D(on,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:U.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=k=>U.value.percentage=k),type:"number",placeholder:"请输入比例",onInput:hn},{suffix:fn(()=>[dn("%")]),_:1},8,["modelValue"])]),v("div",qp,[dn(" 改价后金额: "),v("span",kp,"¥"+un(U.value.nowPrice||Z.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Vp=it(Yp,[["__scopeId","data-v-924edcc0"]]),Xp={class:"check-user-list"},Jp={class:"header-input"},Qp={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},jp=["onClick"],ng={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},eg={class:"top"},tg={class:"bold"},rg={class:"flex-between"},ig={class:"mr-2"},ug={class:"bottom flex",style:{"justify-content":"space-between"}},og={class:"red"},sg={class:"red"},lg={key:0,class:"load-end"},fg={key:1,class:"load-end"},ag={__name:"userList",emits:["setUser"],setup(vn,{expose:wn,emit:s}){Pr();const E=O(!1),F=O({page_no:1,page_size:20,mobile:""}),Z=s,I=O(!1),U=O(0),rn=O(!1),hn=O([]),J=(q=!1)=>{if(q)F.value.page_no=1;else if(rn.value||I.value)return;I.value=!0,Np(F.value).then(y=>{q?hn.value=y.data.lists:hn.value=[...hn.value,...y.data.lists],y.data.lists.length{rn.value=!0,I.value=!1})},j=(q,y)=>{Z("setUser",q),E.value=!1};return wn({open:()=>{E.value=!0,J(!0)}}),(q,y)=>{const on=tn("el-button"),P=tn("el-input"),K=tn("el-avatar"),k=tn("el-tag"),Y=tn("el-dialog"),nn=bt("loading"),S=bt("infinite-scroll");return X(),Oe(Y,{modelValue:E.value,"onUpdate:modelValue":y[4]||(y[4]=x=>E.value=x),title:"选择用户",width:"800"},{default:fn(()=>[v("div",Xp,[v("div",Jp,[D(P,{modelValue:F.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=x=>F.value.mobile=x),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=Hs(x=>J(!0),["enter"])),onClear:y[3]||(y[3]=x=>J(!0)),clearable:""},{append:fn(()=>[D(on,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=x=>J(!0))},{default:fn(()=>[dn("搜索")]),_:1})]),_:1},8,["modelValue"])]),ou((X(),gn("div",Qp,[(X(!0),gn(Tt,null,Ot(hn.value,(x,W)=>(X(),gn("div",{class:"item",key:W,onClick:an=>j(x,W)},[D(K,{class:"avatar",src:x.avatar},null,8,["src"]),v("div",ng,[v("div",eg,[v("div",null,[v("span",tg,un(x.nickname),1),v("span",null,un(" (ID:"+x.id+")"),1)]),v("div",rg,[v("div",ig,"手机号: "+un(x.mobile||x.account),1),x.user_ship!=1?(X(),Oe(k,{key:0,type:"primary"},{default:fn(()=>[dn(un(x.user_ship_name),1)]),_:2},1024)):(X(),Oe(k,{key:1,type:"success"},{default:fn(()=>[dn(un(x.user_ship_name),1)]),_:2},1024))])]),v("div",ug,[v("div",null,[dn("采购款: "),v("span",og,un(x.purchase_funds),1)]),v("div",null,[dn("礼品券: "),v("span",sg,un(x.integral),1)])])])],8,jp))),128)),rn.value?(X(),gn("div",lg,"没有更多了")):rt("",!0),I.value?(X(),gn("div",fg,"加载中...")):rt("",!0)])),[[nn,I.value],[S,J]])])]),_:1},8,["modelValue"])}}},cg=it(ag,[["__scopeId","data-v-33b4f26e"]]),hg=vn=>(zs("data-v-9779d340"),vn=vn(),Ks(),vn),_g={class:"my-order"},dg={class:"user-nav"},pg={class:"user-info"},gg={key:0,class:"info"},vg={class:"flex-bewteen"},mg={class:"flex-bewteen",style:{"align-items":"flex-end"}},wg={style:{display:"flex"}},xg={style:{"margin-right":"0.5rem"}},yg={style:{color:"#f70"}},Ag={style:{color:"#f70"}},Ig={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Cg={class:"flex-bewteen",style:{width:"100%"}},Lg=hg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Rg={class:"header-nav"},Sg={class:"nav-item"},Eg={class:"order-list"},bg={class:"order-item-info"},Tg={class:"order-item-title"},Og={class:"title"},Pg=["onClick"],$g={class:"order-item-sku"},Fg={class:"order-item-price"},Wg={class:"order-footer"},Bg={class:"order-total"},Ug={class:"price"},Mg={class:"total-item"},Dg={style:{"font-size":"1.4rem"}},Ng={class:"order-btn"},Gg={__name:"order",emits:["goPay","editAttr"],setup(vn,{expose:wn,emit:s}){const E=O([]),F=O(0),Z=O(0),I=O(0);Pr();const U=O(null),rn=()=>{let x=[];E.value.map(W=>{x.push(W.id)}),x.length!=0&&J(x)},hn=x=>{E.value=E.value.filter(W=>W.id!=x),J([x])},J=x=>{Fp({id:x}).then(W=>{console.log(W),j()})},j=()=>{F.value=0,Z.value=0,I.value=0,Wp().then(x=>{var W,an,H;((an=(W=x.data)==null?void 0:W.lists)==null?void 0:an.length)>0?(E.value=x.data.lists,F.value=(H=x.data)==null?void 0:H.lists.reduce((Mn,qn)=>Mn+Number(qn.total_price),0),Z.value=F.value):E.value=[]})};j();const En=s,q=()=>{En("goPay")},y=(x,W)=>{Gs({product_id:x.product_id,cart_num:x.cart_num}).then(an=>{F.value=0,E.value.forEach(H=>{F.value+=H.price*H.cart_num}),Z.value=F.value}).catch(an=>{var H;x.cart_num=((H=an==null?void 0:an.msg)==null?void 0:H.match(/\d+\.\d+/))||1})},on=x=>{I.value=Z.value-x,F.value=+x,uu(()=>{setTimeout(()=>{K(!1)},150)})};O(0);const P=O(null),K=(x=!0)=>{P.value.show(x,Z.value)},k=O({uid:""}),Y=x=>{k.value=x,k.value.uid=x.id};wn({getList:j,list:E,discounts:I,allPrice:F,userInfo:k});const nn=()=>{P.value.dialogVisible?P.value.dialogVisible=!1:K()},S=()=>{E.value.length>0&&rn()};return Pt(()=>{ne.on("insert",nn),ne.on("delete",S)}),$t(()=>{ne.off("insert",nn),ne.off("delete",S)}),(x,W)=>{const an=tn("el-avatar"),H=tn("ArrowRight"),Mn=tn("el-icon"),qn=tn("el-button"),$r=tn("RefreshLeft"),Fr=tn("Delete"),Ft=tn("el-empty"),Wr=tn("el-image"),Br=tn("el-input-number");return X(),gn("div",_g,[v("div",dg,[v("div",pg,[D(an,{class:"avatar",src:k.value.avatar},null,8,["src"]),k.value.uid?(X(),gn("div",gg,[v("div",vg,[v("div",null,"手机号: "+un(k.value.mobile||k.value.account),1),D(qn,{type:"primary",link:"",class:"change-user",onClick:W[0]||(W[0]=xn=>U.value.open())},{default:fn(()=>[dn("切换用户"),D(Mn,null,{default:fn(()=>[D(H)]),_:1})]),_:1})]),v("div",mg,[v("div",wg,[v("div",xg,[dn("采购款: "),v("span",yg,un(k.value.purchase_funds),1)]),v("div",null,[dn("礼品券: "),v("span",Ag,un(k.value.integral),1)])]),D(qn,{link:"",onClick:W[1]||(W[1]=xn=>k.value.uid="")},{default:fn(()=>[dn("重置"),D(Mn,null,{default:fn(()=>[D($r)]),_:1})]),_:1})])])):(X(),gn("div",Ig,[v("div",Cg,[Lg,D(qn,{type:"primary",link:"",class:"change-user",onClick:W[2]||(W[2]=xn=>U.value.open())},{default:fn(()=>[dn("切换用户"),D(Mn,null,{default:fn(()=>[D(H)]),_:1})]),_:1})])]))]),D(cg,{ref_key:"userListRef",ref:U,onSetUser:Y},null,512)]),v("div",Rg,[v("div",Sg,[dn(" 已选购 "),v("span",null,un(E.value.length),1),dn(" 款 ")]),v("div",{class:"nav-item-clear",onClick:rn},[D(Mn,null,{default:fn(()=>[D(Fr)]),_:1}),dn("清空 (Delete) ")])]),v("div",Eg,[E.value.length==0?(X(),Oe(Ft,{key:0,description:"请点击右侧添加商品"})):(X(!0),gn(Tt,{key:1},Ot(E.value,(xn,se)=>(X(),gn("div",{class:"order-item",key:se},[D(Wr,{loading:"lazy",class:"order-item-img",src:xn.image},null,8,["src"]),v("div",bg,[v("div",Tg,[v("div",Og,un(xn.store_name),1),v("div",{class:"delete",onClick:ut=>hn(xn.id)},"删除",8,Pg)]),v("div",$g,[v("span",null,un(xn.unit_name),1)]),v("div",Fg,[v("div",null,[dn(" ¥"),v("span",null,un(xn.price),1)]),v("div",null,[D(Br,{modelValue:xn.cart_num,"onUpdate:modelValue":ut=>xn.cart_num=ut,min:+xn.batch>0?+xn.batch:1,step:1,"step-strictly":"",onChange:ut=>y(xn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Wg,[v("div",Bg,[v("div",Ug,[v("div",Mg,[dn(" 合计: "),v("span",null,[dn("¥"),v("span",Dg,un(F.value.toFixed(2)),1)])])])]),v("div",Ng,[D(qn,{class:"btn",type:"primary",onClick:q,disabled:E.value.length==0},{default:fn(()=>[dn(un("立即结账 (F9)"))]),_:1},8,["disabled"])])]),D(Vp,{ref_key:"priceRef",ref:P,onChangeAllPrice:on},null,512)])}}},Hg=it(Gg,[["__scopeId","data-v-9779d340"]]);var Or={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 - */Or.exports;(function(vn,wn){(function(){var s,E="4.17.21",F=200,Z="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",I="Expected a function",U="Invalid `variable` option passed into `_.template`",rn="__lodash_hash_undefined__",hn=500,J="__lodash_placeholder__",j=1,En=2,q=4,y=1,on=2,P=1,K=2,k=4,Y=8,nn=16,S=32,x=64,W=128,an=256,H=512,Mn=30,qn="...",$r=800,Fr=16,Ft=1,Wr=2,Br=3,xn=1/0,se=9007199254740991,ut=17976931348623157e292,Wt=NaN,le=4294967295,qs=le-1,ks=le>>>1,Zs=[["ary",W],["bind",P],["bindKey",K],["curry",Y],["curryRight",nn],["flip",H],["partial",S],["partialRight",x],["rearg",an]],Ge="[object Arguments]",Bt="[object Array]",Ys="[object AsyncFunction]",ot="[object Boolean]",st="[object Date]",Vs="[object DOMException]",Ut="[object Error]",Mt="[object Function]",lu="[object GeneratorFunction]",ee="[object Map]",lt="[object Number]",Xs="[object Null]",he="[object Object]",fu="[object Promise]",Js="[object Proxy]",ft="[object RegExp]",te="[object Set]",at="[object String]",Dt="[object Symbol]",Qs="[object Undefined]",ct="[object WeakMap]",js="[object WeakSet]",ht="[object ArrayBuffer]",He="[object DataView]",Ur="[object Float32Array]",Mr="[object Float64Array]",Dr="[object Int8Array]",Nr="[object Int16Array]",Gr="[object Int32Array]",Hr="[object Uint8Array]",zr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",qr="[object Uint32Array]",nl=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,tl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,au=/&(?:amp|lt|gt|quot|#39);/g,cu=/[&<>"']/g,rl=RegExp(au.source),il=RegExp(cu.source),ul=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,hu=/<%=([\s\S]+?)%>/g,sl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ll=/^\w*$/,fl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,al=RegExp(kr.source),Zr=/^\s+/,cl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_l=/\{\n\/\* \[wrapped with (.+)\] \*/,dl=/,? & /,pl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gl=/[()=,{}\[\]\/\s]/,vl=/\\(\\)?/g,ml=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_u=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,yl=/^\[object .+?Constructor\]$/,Al=/^0o[0-7]+$/i,Il=/^(?:0|[1-9]\d*)$/,Cl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,Ll=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",du=Rl+Sl+El,pu="\\u2700-\\u27bf",gu="a-z\\xdf-\\xf6\\xf8-\\xff",bl="\\xac\\xb1\\xd7\\xf7",Tl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ol="\\u2000-\\u206f",Pl=" \\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",vu="A-Z\\xc0-\\xd6\\xd8-\\xde",mu="\\ufe0e\\ufe0f",wu=bl+Tl+Ol+Pl,Yr="['’]",$l="["+Gt+"]",xu="["+wu+"]",Ht="["+du+"]",yu="\\d+",Fl="["+pu+"]",Au="["+gu+"]",Iu="[^"+Gt+wu+yu+pu+gu+vu+"]",Vr="\\ud83c[\\udffb-\\udfff]",Wl="(?:"+Ht+"|"+Vr+")",Cu="[^"+Gt+"]",Xr="(?:\\ud83c[\\udde6-\\uddff]){2}",Jr="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+vu+"]",Lu="\\u200d",Ru="(?:"+Au+"|"+Iu+")",Bl="(?:"+ze+"|"+Iu+")",Su="(?:"+Yr+"(?:d|ll|m|re|s|t|ve))?",Eu="(?:"+Yr+"(?:D|LL|M|RE|S|T|VE))?",bu=Wl+"?",Tu="["+mu+"]?",Ul="(?:"+Lu+"(?:"+[Cu,Xr,Jr].join("|")+")"+Tu+bu+")*",Ml="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ou=Tu+bu+Ul,Nl="(?:"+[Fl,Xr,Jr].join("|")+")"+Ou,Gl="(?:"+[Cu+Ht+"?",Ht,Xr,Jr,$l].join("|")+")",Hl=RegExp(Yr,"g"),zl=RegExp(Ht,"g"),Qr=RegExp(Vr+"(?="+Vr+")|"+Gl+Ou,"g"),Kl=RegExp([ze+"?"+Au+"+"+Su+"(?="+[xu,ze,"$"].join("|")+")",Bl+"+"+Eu+"(?="+[xu,ze+Ru,"$"].join("|")+")",ze+"?"+Ru+"+"+Su,ze+"+"+Eu,Dl,Ml,yu,Nl].join("|"),"g"),ql=RegExp("["+Lu+Gt+du+mu+"]"),kl=/[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,cn={};cn[Ur]=cn[Mr]=cn[Dr]=cn[Nr]=cn[Gr]=cn[Hr]=cn[zr]=cn[Kr]=cn[qr]=!0,cn[Ge]=cn[Bt]=cn[ht]=cn[ot]=cn[He]=cn[st]=cn[Ut]=cn[Mt]=cn[ee]=cn[lt]=cn[he]=cn[ft]=cn[te]=cn[at]=cn[ct]=!1;var ln={};ln[Ge]=ln[Bt]=ln[ht]=ln[He]=ln[ot]=ln[st]=ln[Ur]=ln[Mr]=ln[Dr]=ln[Nr]=ln[Gr]=ln[ee]=ln[lt]=ln[he]=ln[ft]=ln[te]=ln[at]=ln[Dt]=ln[Hr]=ln[zr]=ln[Kr]=ln[qr]=!0,ln[Ut]=ln[Mt]=ln[ct]=!1;var Vl={À:"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"},Xl={"&":"&","<":"<",">":">",'"':""","'":"'"},Jl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ql={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jl=parseFloat,nf=parseInt,Pu=typeof Et=="object"&&Et&&Et.Object===Object&&Et,ef=typeof self=="object"&&self&&self.Object===Object&&self,Rn=Pu||ef||Function("return this")(),jr=wn&&!wn.nodeType&&wn,Pe=jr&&!0&&vn&&!vn.nodeType&&vn,$u=Pe&&Pe.exports===jr,ni=$u&&Pu.process,kn=function(){try{var a=Pe&&Pe.require&&Pe.require("util").types;return a||ni&&ni.binding&&ni.binding("util")}catch{}}(),Fu=kn&&kn.isArrayBuffer,Wu=kn&&kn.isDate,Bu=kn&&kn.isMap,Uu=kn&&kn.isRegExp,Mu=kn&&kn.isSet,Du=kn&&kn.isTypedArray;function Dn(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 tf(a,_,h,w){for(var b=-1,V=a==null?0:a.length;++b-1}function ei(a,_,h){for(var w=-1,b=a==null?0:a.length;++w-1;);return h}function Zu(a,_){for(var h=a.length;h--&&Ke(_,a[h],0)>-1;);return h}function hf(a,_){for(var h=a.length,w=0;h--;)a[h]===_&&++w;return w}var _f=ui(Vl),df=ui(Xl);function pf(a){return"\\"+Ql[a]}function gf(a,_){return a==null?s:a[_]}function qe(a){return ql.test(a)}function vf(a){return kl.test(a)}function mf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function fi(a){var _=-1,h=Array(a.size);return a.forEach(function(w,b){h[++_]=[b,w]}),h}function Yu(a,_){return function(h){return a(_(h))}}function Ce(a,_){for(var h=-1,w=a.length,b=0,V=[];++h-1}function ua(n,e){var t=this.__data__,r=or(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}_e.prototype.clear=ea,_e.prototype.delete=ta,_e.prototype.get=ra,_e.prototype.has=ia,_e.prototype.set=ua;function de(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Xn(n,e,t,r,i,o){var l,f=e&j,c=e&En,d=e&q;if(t&&(l=i?t(n,r,i,o):t(n)),l!==s)return l;if(!pn(n))return n;var p=T(n);if(p){if(l=fc(n),!f)return Fn(n,l)}else{var g=Tn(n),m=g==Mt||g==lu;if(Te(n))return Oo(n,f);if(g==he||g==Ge||m&&!i){if(l=c||m?{}:Xo(n),!f)return c?Qa(n,ya(l,n)):Ja(n,oo(l,n))}else{if(!ln[g])return i?n:{};l=ac(n,g,f)}}o||(o=new ie);var A=o.get(n);if(A)return A;o.set(n,l),Ls(n)?n.forEach(function(R){l.add(Xn(R,e,t,R,n,o))}):Is(n)&&n.forEach(function(R,N){l.set(N,Xn(R,e,t,N,n,o))});var L=d?c?Wi:Fi:c?Bn:Ln,B=p?s:L(n);return Zn(B||n,function(R,N){B&&(N=R,R=n[N]),wt(l,N,Xn(R,e,t,N,n,o))}),l}function Aa(n){var e=Ln(n);return function(t){return so(t,n,e)}}function so(n,e,t){var r=t.length;if(n==null)return!r;for(n=sn(n);r--;){var i=t[r],o=e[i],l=n[i];if(l===s&&!(i in n)||!o(l))return!1}return!0}function lo(n,e,t){if(typeof n!="function")throw new Yn(I);return Rt(function(){n.apply(s,t)},e)}function xt(n,e,t,r){var i=-1,o=zt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=_n(e,Nn(t))),r?(o=ei,l=!1):e.length>=F&&(o=_t,l=!1,e=new We(e));n:for(;++ii?0:i+t),r=r===s||r>i?i:$(r),r<0&&(r+=i),r=t>r?0:Ss(r);t0&&t(f)?e>1?Sn(f,e-1,t,r,i):Ie(i,f):r||(i[i.length]=f)}return i}var gi=Uo(),co=Uo(!0);function fe(n,e){return n&&gi(n,e,Ln)}function vi(n,e){return n&&co(n,e,Ln)}function lr(n,e){return Ae(e,function(t){return we(n[t])})}function Ue(n,e){e=Ee(e,n);for(var t=0,r=e.length;n!=null&&te}function La(n,e){return n!=null&&en.call(n,e)}function Ra(n,e){return n!=null&&e in sn(n)}function Sa(n,e,t){return n>=bn(e,t)&&n=120&&p.length>=120)?new We(l&&p):s}p=n[0];var g=-1,m=f[0];n:for(;++g-1;)f!==n&&jt.call(f,c,1),jt.call(n,c,1);return n}function Io(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==o){var o=i;me(i)?jt.call(n,i,1):Si(n,i)}}return n}function Ci(n,e){return n+tr(to()*(e-n+1))}function Na(n,e,t,r){for(var i=-1,o=Cn(er((e-n)/(t||1)),0),l=h(o);o--;)l[r?o:++i]=n,n+=t;return l}function Li(n,e){var t="";if(!n||e<1||e>se)return t;do e%2&&(t+=n),e=tr(e/2),e&&(n+=n);while(e);return t}function M(n,e){return Hi(jo(n,e,Un),n+"")}function Ga(n){return uo(tt(n))}function Ha(n,e){var t=tt(n);return wr(t,Be(e,0,t.length))}function It(n,e,t,r){if(!pn(n))return n;e=Ee(e,n);for(var i=-1,o=e.length,l=o-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 o=h(i);++r>>1,l=n[o];l!==null&&!Hn(l)&&(t?l<=e:l=F){var d=e?null:tc(n);if(d)return qt(d);l=!1,i=_t,c=new We}else c=e?[]:f;n:for(;++r=r?n:Jn(n,e,t)}var To=$f||function(n){return Rn.clearTimeout(n)};function Oo(n,e){if(e)return n.slice();var t=n.length,r=Ju?Ju(t):new n.constructor(t);return n.copy(r),r}function Oi(n){var e=new n.constructor(n.byteLength);return new Jt(e).set(new Jt(n)),e}function Za(n,e){var t=e?Oi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Ya(n){var e=new n.constructor(n.source,_u.exec(n));return e.lastIndex=n.lastIndex,e}function Va(n){return mt?sn(mt.call(n)):{}}function Po(n,e){var t=e?Oi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function $o(n,e){if(n!==e){var t=n!==s,r=n===null,i=n===n,o=Hn(n),l=e!==s,f=e===null,c=e===e,d=Hn(e);if(!f&&!d&&!o&&n>e||o&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!o&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Fo(n,e,t,r){for(var i=-1,o=n.length,l=t.length,f=-1,c=e.length,d=Cn(o-l,0),p=h(c+d),g=!r;++f1?t[i-1]:s,l=i>2?t[2]:s;for(o=n.length>3&&typeof o=="function"?(i--,o):s,l&&Pn(t[0],t[1],l)&&(o=i<3?s:o,i=1),e=sn(e);++r-1?i[o?e[l]:l]:s}}function No(n){return ve(function(e){var t=e.length,r=t,i=Vn.prototype.thru;for(n&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new Yn(I);if(i&&!l&&vr(o)=="wrapper")var l=new Vn([],!0)}for(r=l?r:t;++r1&&z.reverse(),p&&cf))return!1;var d=o.get(n),p=o.get(e);if(d&&p)return d==e&&p==n;var g=-1,m=!0,A=t&on?new We:s;for(o.set(n,e),o.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(hl,`{ -/* [wrapped with `+e+`] */ -`)}function hc(n){return T(n)||Ne(n)||!!(no&&n&&n[no])}function me(n,e){var t=typeof n;return e=e??se,!!e&&(t=="number"||t!="symbol"&&Il.test(n))&&n>-1&&n%1==0&&n0){if(++e>=$r)return arguments[0]}else e=0;return n.apply(s,arguments)}}function wr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===s?r:e;++t1?n[e-1]:s;return t=typeof t=="function"?(n.pop(),t):s,cs(n,t)});function hs(n){var e=u(n);return e.__chain__=!0,e}function Ih(n,e){return e(n),n}function xr(n,e){return e(n)}var Ch=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(o){return pi(o,n)};return e>1||this.__actions__.length||!(r instanceof G)||!me(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:xr,args:[i],thisArg:s}),new Vn(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(s),o}))});function Lh(){return hs(this)}function Rh(){return new Vn(this.value(),this.__chain__)}function Sh(){this.__values__===s&&(this.__values__=Rs(this.value()));var n=this.__index__>=this.__values__.length,e=n?s:this.__values__[this.__index__++];return{done:n,value:e}}function Eh(){return this}function bh(n){for(var e,t=this;t instanceof ur;){var r=us(t);r.__index__=0,r.__values__=s,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Th(){var n=this.__wrapped__;if(n instanceof G){var e=n;return this.__actions__.length&&(e=new G(this)),e=e.reverse(),e.__actions__.push({func:xr,args:[zi],thisArg:s}),new Vn(e,this.__chain__)}return this.thru(zi)}function Oh(){return Eo(this.__wrapped__,this.__actions__)}var Ph=hr(function(n,e,t){en.call(n,t)?++n[t]:pe(n,t,1)});function $h(n,e,t){var r=T(n)?Nu:Ia;return t&&Pn(n,e,t)&&(e=s),r(n,C(e,3))}function Fh(n,e){var t=T(n)?Ae:ao;return t(n,C(e,3))}var Wh=Do(os),Bh=Do(ss);function Uh(n,e){return Sn(yr(n,e),1)}function Mh(n,e){return Sn(yr(n,e),xn)}function Dh(n,e,t){return t=t===s?1:$(t),Sn(yr(n,e),t)}function _s(n,e){var t=T(n)?Zn:Re;return t(n,C(e,3))}function ds(n,e){var t=T(n)?rf:fo;return t(n,C(e,3))}var Nh=hr(function(n,e,t){en.call(n,t)?n[t].push(e):pe(n,t,[e])});function Gh(n,e,t,r){n=Wn(n)?n:tt(n),t=t&&!r?$(t):0;var i=n.length;return t<0&&(t=Cn(i+t,0)),Rr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Ke(n,e,t)>-1}var Hh=M(function(n,e,t){var r=-1,i=typeof e=="function",o=Wn(n)?h(n.length):[];return Re(n,function(l){o[++r]=i?Dn(e,l,t):yt(l,e,t)}),o}),zh=hr(function(n,e,t){pe(n,t,e)});function yr(n,e){var t=T(n)?_n:vo;return t(n,C(e,3))}function Kh(n,e,t,r){return n==null?[]:(T(e)||(e=e==null?[]:[e]),t=r?s:t,T(t)||(t=t==null?[]:[t]),yo(n,e,t))}var qh=hr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function kh(n,e,t){var r=T(n)?ti:Ku,i=arguments.length<3;return r(n,C(e,4),t,i,Re)}function Zh(n,e,t){var r=T(n)?uf:Ku,i=arguments.length<3;return r(n,C(e,4),t,i,fo)}function Yh(n,e){var t=T(n)?Ae:ao;return t(n,Cr(C(e,3)))}function Vh(n){var e=T(n)?uo:Ga;return e(n)}function Xh(n,e,t){(t?Pn(n,e,t):e===s)?e=1:e=$(e);var r=T(n)?ma:Ha;return r(n,e)}function Jh(n){var e=T(n)?wa:Ka;return e(n)}function Qh(n){if(n==null)return 0;if(Wn(n))return Rr(n)?ke(n):n.length;var e=Tn(n);return e==ee||e==te?n.size:yi(n).length}function jh(n,e,t){var r=T(n)?ri:qa;return t&&Pn(n,e,t)&&(e=s),r(n,C(e,3))}var n_=M(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Pn(n,e[0],e[1])?e=[]:t>2&&Pn(e[0],e[1],e[2])&&(e=[e[0]]),yo(n,Sn(e,1),[])}),Ar=Ff||function(){return Rn.Date.now()};function e_(n,e){if(typeof e!="function")throw new Yn(I);return n=$(n),function(){if(--n<1)return e.apply(this,arguments)}}function ps(n,e,t){return e=t?s:e,e=n&&e==null?n.length:e,ge(n,W,s,s,s,s,e)}function gs(n,e){var t;if(typeof e!="function")throw new Yn(I);return n=$(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=s),t}}var qi=M(function(n,e,t){var r=P;if(t.length){var i=Ce(t,nt(qi));r|=S}return ge(n,r,e,t,i)}),vs=M(function(n,e,t){var r=P|K;if(t.length){var i=Ce(t,nt(vs));r|=S}return ge(e,r,n,t,i)});function ms(n,e,t){e=t?s:e;var r=ge(n,Y,s,s,s,s,s,e);return r.placeholder=ms.placeholder,r}function ws(n,e,t){e=t?s:e;var r=ge(n,nn,s,s,s,s,s,e);return r.placeholder=ws.placeholder,r}function xs(n,e,t){var r,i,o,l,f,c,d=0,p=!1,g=!1,m=!0;if(typeof n!="function")throw new Yn(I);e=jn(e)||0,pn(t)&&(p=!!t.leading,g="maxWait"in t,o=g?Cn(jn(t.maxWait)||0,e):o,m="trailing"in t?!!t.trailing:m);function A(An){var oe=r,ye=i;return r=i=s,d=An,l=n.apply(ye,oe),l}function L(An){return d=An,f=Rt(N,e),p?A(An):l}function B(An){var oe=An-c,ye=An-d,Ds=e-oe;return g?bn(Ds,o-ye):Ds}function R(An){var oe=An-c,ye=An-d;return c===s||oe>=e||oe<0||g&&ye>=o}function N(){var An=Ar();if(R(An))return z(An);f=Rt(N,B(An))}function z(An){return f=s,m&&r?A(An):(r=i=s,l)}function zn(){f!==s&&To(f),d=0,r=c=i=f=s}function $n(){return f===s?l:z(Ar())}function Kn(){var An=Ar(),oe=R(An);if(r=arguments,i=this,c=An,oe){if(f===s)return L(c);if(g)return To(f),f=Rt(N,e),A(c)}return f===s&&(f=Rt(N,e)),l}return Kn.cancel=zn,Kn.flush=$n,Kn}var t_=M(function(n,e){return lo(n,1,e)}),r_=M(function(n,e,t){return lo(n,jn(e)||0,t)});function i_(n){return ge(n,H)}function Ir(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Yn(I);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=n.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(Ir.Cache||de),t}Ir.Cache=de;function Cr(n){if(typeof n!="function")throw new Yn(I);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 u_(n){return gs(2,n)}var o_=ka(function(n,e){e=e.length==1&&T(e[0])?_n(e[0],Nn(C())):_n(Sn(e,1),Nn(C()));var t=e.length;return M(function(r){for(var i=-1,o=bn(r.length,t);++i=e}),Ne=_o(function(){return arguments}())?_o:function(n){return mn(n)&&en.call(n,"callee")&&!ju.call(n,"callee")},T=h.isArray,y_=Fu?Nn(Fu):ba;function Wn(n){return n!=null&&Lr(n.length)&&!we(n)}function yn(n){return mn(n)&&Wn(n)}function A_(n){return n===!0||n===!1||mn(n)&&On(n)==ot}var Te=Bf||ru,I_=Wu?Nn(Wu):Ta;function C_(n){return mn(n)&&n.nodeType===1&&!St(n)}function L_(n){if(n==null)return!0;if(Wn(n)&&(T(n)||typeof n=="string"||typeof n.splice=="function"||Te(n)||et(n)||Ne(n)))return!n.length;var e=Tn(n);if(e==ee||e==te)return!n.size;if(Lt(n))return!yi(n).length;for(var t in n)if(en.call(n,t))return!1;return!0}function R_(n,e){return At(n,e)}function S_(n,e,t){t=typeof t=="function"?t:s;var r=t?t(n,e):s;return r===s?At(n,e,s,t):!!r}function Zi(n){if(!mn(n))return!1;var e=On(n);return e==Ut||e==Vs||typeof n.message=="string"&&typeof n.name=="string"&&!St(n)}function E_(n){return typeof n=="number"&&eo(n)}function we(n){if(!pn(n))return!1;var e=On(n);return e==Mt||e==lu||e==Ys||e==Js}function As(n){return typeof n=="number"&&n==$(n)}function Lr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=se}function pn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function mn(n){return n!=null&&typeof n=="object"}var Is=Bu?Nn(Bu):Pa;function b_(n,e){return n===e||xi(n,e,Ui(e))}function T_(n,e,t){return t=typeof t=="function"?t:s,xi(n,e,Ui(e),t)}function O_(n){return Cs(n)&&n!=+n}function P_(n){if(pc(n))throw new b(Z);return po(n)}function $_(n){return n===null}function F_(n){return n==null}function Cs(n){return typeof n=="number"||mn(n)&&On(n)==lt}function St(n){if(!mn(n)||On(n)!=he)return!1;var e=Qt(n);if(e===null)return!0;var t=en.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Yt.call(t)==Tf}var Yi=Uu?Nn(Uu):$a;function W_(n){return As(n)&&n>=-se&&n<=se}var Ls=Mu?Nn(Mu):Fa;function Rr(n){return typeof n=="string"||!T(n)&&mn(n)&&On(n)==at}function Hn(n){return typeof n=="symbol"||mn(n)&&On(n)==Dt}var et=Du?Nn(Du):Wa;function B_(n){return n===s}function U_(n){return mn(n)&&Tn(n)==ct}function M_(n){return mn(n)&&On(n)==js}var D_=gr(Ai),N_=gr(function(n,e){return n<=e});function Rs(n){if(!n)return[];if(Wn(n))return Rr(n)?re(n):Fn(n);if(dt&&n[dt])return mf(n[dt]());var e=Tn(n),t=e==ee?fi:e==te?qt:tt;return t(n)}function xe(n){if(!n)return n===0?n:0;if(n=jn(n),n===xn||n===-xn){var e=n<0?-1:1;return e*ut}return n===n?n:0}function $(n){var e=xe(n),t=e%1;return e===e?t?e-t:e:0}function Ss(n){return n?Be($(n),0,le):0}function jn(n){if(typeof n=="number")return n;if(Hn(n))return Wt;if(pn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=pn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=qu(n);var t=xl.test(n);return t||Al.test(n)?nf(n.slice(2),t?2:8):wl.test(n)?Wt:+n}function Es(n){return ae(n,Bn(n))}function G_(n){return n?Be($(n),-se,se):n===0?n:0}function Q(n){return n==null?"":Gn(n)}var H_=Qe(function(n,e){if(Lt(e)||Wn(e)){ae(e,Ln(e),n);return}for(var t in e)en.call(e,t)&&wt(n,t,e[t])}),bs=Qe(function(n,e){ae(e,Bn(e),n)}),Sr=Qe(function(n,e,t,r){ae(e,Bn(e),n,r)}),z_=Qe(function(n,e,t,r){ae(e,Ln(e),n,r)}),K_=ve(pi);function q_(n,e){var t=Je(n);return e==null?t:oo(t,e)}var k_=M(function(n,e){n=sn(n);var t=-1,r=e.length,i=r>2?e[2]:s;for(i&&Pn(e[0],e[1],i)&&(r=1);++t1),o}),ae(n,Wi(n),t),r&&(t=Xn(t,j|En|q,rc));for(var i=e.length;i--;)Si(t,e[i]);return t});function ad(n,e){return Os(n,Cr(C(e)))}var cd=ve(function(n,e){return n==null?{}:Ma(n,e)});function Os(n,e){if(n==null)return{};var t=_n(Wi(n),function(r){return[r]});return e=C(e),Ao(n,t,function(r,i){return e(r,i[0])})}function hd(n,e,t){e=Ee(e,n);var r=-1,i=e.length;for(i||(i=1,n=s);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=to();return bn(n+i*(e-n+jl("1e-"+((i+"").length-1))),e)}return Ci(n,e)}var Id=je(function(n,e,t){return e=e.toLowerCase(),n+(t?Fs(e):e)});function Fs(n){return Ji(Q(n).toLowerCase())}function Ws(n){return n=Q(n),n&&n.replace(Cl,_f).replace(zl,"")}function Cd(n,e,t){n=Q(n),e=Gn(e);var r=n.length;t=t===s?r:Be($(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Ld(n){return n=Q(n),n&&il.test(n)?n.replace(cu,df):n}function Rd(n){return n=Q(n),n&&al.test(n)?n.replace(kr,"\\$&"):n}var Sd=je(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Ed=je(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),bd=Mo("toLowerCase");function Td(n,e,t){n=Q(n),e=$(e);var r=e?ke(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return pr(tr(i),t)+n+pr(er(i),t)}function Od(n,e,t){n=Q(n),e=$(e);var r=e?ke(n):0;return e&&r>>0,t?(n=Q(n),n&&(typeof e=="string"||e!=null&&!Yi(e))&&(e=Gn(e),!e&&qe(n))?be(re(n),0,t):n.split(e,t)):[]}var Md=je(function(n,e,t){return n+(t?" ":"")+Ji(e)});function Dd(n,e,t){return n=Q(n),t=t==null?0:Be($(t),0,n.length),e=Gn(e),n.slice(t,t+e.length)==e}function Nd(n,e,t){var r=u.templateSettings;t&&Pn(n,e,t)&&(e=s),n=Q(n),e=Sr({},e,r,qo);var i=Sr({},e.imports,r.imports,qo),o=Ln(i),l=li(i,o),f,c,d=0,p=e.interpolate||Nt,g="__p += '",m=ai((e.escape||Nt).source+"|"+p.source+"|"+(p===hu?ml:Nt).source+"|"+(e.evaluate||Nt).source+"|$","g"),A="//# sourceURL="+(en.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yl+"]")+` -`;n.replace(m,function(R,N,z,zn,$n,Kn){return z||(z=zn),g+=n.slice(d,Kn).replace(Ll,pf),N&&(f=!0,g+=`' + -__e(`+N+`) + -'`),$n&&(c=!0,g+=`'; -`+$n+`; -__p += '`),z&&(g+=`' + -((__t = (`+z+`)) == null ? '' : __t) + -'`),d=Kn+R.length,R}),g+=`'; -`;var L=en.call(e,"variable")&&e.variable;if(!L)g=`with (obj) { -`+g+` -} -`;else if(gl.test(L))throw new b(U);g=(c?g.replace(nl,""):g).replace(el,"$1").replace(tl,"$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 B=Us(function(){return V(o,A+"return "+g).apply(s,l)});if(B.source=g,Zi(B))throw B;return B}function Gd(n){return Q(n).toLowerCase()}function Hd(n){return Q(n).toUpperCase()}function zd(n,e,t){if(n=Q(n),n&&(t||e===s))return qu(n);if(!n||!(e=Gn(e)))return n;var r=re(n),i=re(e),o=ku(r,i),l=Zu(r,i)+1;return be(r,o,l).join("")}function Kd(n,e,t){if(n=Q(n),n&&(t||e===s))return n.slice(0,Vu(n)+1);if(!n||!(e=Gn(e)))return n;var r=re(n),i=Zu(r,re(e))+1;return be(r,0,i).join("")}function qd(n,e,t){if(n=Q(n),n&&(t||e===s))return n.replace(Zr,"");if(!n||!(e=Gn(e)))return n;var r=re(n),i=ku(r,re(e));return be(r,i).join("")}function kd(n,e){var t=Mn,r=qn;if(pn(e)){var i="separator"in e?e.separator:i;t="length"in e?$(e.length):t,r="omission"in e?Gn(e.omission):r}n=Q(n);var o=n.length;if(qe(n)){var l=re(n);o=l.length}if(t>=o)return n;var f=t-ke(r);if(f<1)return r;var c=l?be(l,0,f).join(""):n.slice(0,f);if(i===s)return c+r;if(l&&(f+=c.length-f),Yi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=ai(i.source,Q(_u.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===s?f:g)}}else if(n.indexOf(Gn(i),f)!=f){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+r}function Zd(n){return n=Q(n),n&&rl.test(n)?n.replace(au,Af):n}var Yd=je(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Ji=Mo("toUpperCase");function Bs(n,e,t){return n=Q(n),e=t?s:e,e===s?vf(n)?Lf(n):lf(n):n.match(e)||[]}var Us=M(function(n,e){try{return Dn(n,s,e)}catch(t){return Zi(t)?t:new b(t)}}),Vd=ve(function(n,e){return Zn(e,function(t){t=ce(t),pe(n,t,qi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=C();return n=e?_n(n,function(r){if(typeof r[1]!="function")throw new Yn(I);return[t(r[0]),r[1]]}):[],M(function(r){for(var i=-1;++ise)return[];var t=le,r=bn(n,le);e=C(e),n-=le;for(var i=si(r,e);++t0||e<0)?new G(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==s&&(e=$(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(le)},fe(G.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],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof G,d=f[0],p=c||T(l),g=function(N){var z=i.apply(u,Ie([N],f));return r&&m?z[0]:z};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var m=this.__chain__,A=!!this.__actions__.length,L=o&&!m,B=c&&!A;if(!o&&p){l=B?l:new G(this);var R=n.apply(l,f);return R.__actions__.push({func:xr,args:[g],thisArg:s}),new Vn(R,m)}return L&&B?n.apply(this,f):(R=this.thru(g),L?r?R.value()[0]:R.value():R)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=kt[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 o=this.value();return e.apply(T(o)?o:[],i)}return this[t](function(l){return e.apply(T(l)?l:[],i)})}}),fe(G.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";en.call(Xe,r)||(Xe[r]=[]),Xe[r].push({name:e,func:t})}}),Xe[_r(s,K).name]=[{name:"wrapper",func:s}],G.prototype.clone=Zf,G.prototype.reverse=Yf,G.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Lh,u.prototype.commit=Rh,u.prototype.next=Sh,u.prototype.plant=bh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,dt&&(u.prototype[dt]=Eh),u},Ze=Rf();Pe?((Pe.exports=Ze)._=Ze,jr._=Ze):Rn._=Ze}).call(Et)})(Or,Or.exports);var zg=Or.exports;const Kg=Up(zg),su=vn=>(zs("data-v-2a80ef6f"),vn=vn(),Ks(),vn),qg={class:"my-order"},kg=su(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Zg={class:"nav-item-input"},Yg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},Vg=["onClick"],Xg={class:"shop-name"},Jg={class:"shop-price"},Qg={class:"unit-name"},jg={key:0,class:"no-stock"},nv=su(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),ev=[nv],tv={key:1,class:"no-stock"},rv=su(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),iv=[rv],uv={key:1,class:"no-data"},ov={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(vn,{expose:wn,emit:s}){const E=O(null),F=s,Z=O(""),I=()=>{F("loadMore",{store_name_code:Z.value})},U=y=>{if(y.is_used==0)return Tr.error("该商品已被平台关闭");if(y.stock==0)return Tr.warning("该商品无库存");F("changeItem",y)},rn=Kg.throttle(()=>{let y={store_name_code:Z.value};F("getStoreList",y,!0)},300);wn({name:Z,inputBlur:()=>{var y;(y=E.value)==null||y.blur()}});const J=O(!1),j=()=>{J.value=!0},En=()=>{J.value=!1},q=()=>{var y;(y=E.value)==null||y.focus()};return Pt(()=>{uu(()=>{var y;(y=E.value)==null||y.focus(),j()}),ne.on("shift",q)}),$t(()=>{ne.off("shift",q)}),(y,on)=>{const P=tn("el-input"),K=tn("Search"),k=tn("el-icon"),Y=tn("el-button"),nn=tn("el-image"),S=tn("el-space"),x=tn("el-empty"),W=bt("loading"),an=bt("infinite-scroll");return X(),gn("div",qg,[v("div",{class:br(["header-nav",{"input-focus":J.value}])},[kg,v("div",Zg,[D(P,{modelValue:Z.value,"onUpdate:modelValue":on[0]||(on[0]=H=>Z.value=H),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:E,onFocus:j,onBlur:En,onKeyup:Hs(Er(rn),["enter"]),onClear:Er(rn)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:on[1]||(on[1]=(...H)=>Er(rn)&&Er(rn)(...H))},[D(Y,{class:"btn",type:"primary"},{default:fn(()=>[D(k,null,{default:fn(()=>[D(K)]),_:1})]),_:1})])],2),ou((X(),gn("div",Yg,[vn.storeList.length?(X(),Oe(S,{key:0,wrap:"",size:14},{default:fn(()=>[(X(!0),gn(Tt,null,Ot(vn.storeList,(H,Mn)=>(X(),gn("div",{class:"shop-item",key:Mn,onClick:qn=>U(H)},[D(nn,{loading:"lazy",src:H.image},null,8,["src"]),v("div",Xg,un(H.store_name),1),v("div",Jg,[dn(" ¥"),v("span",null,un(H.price),1),v("span",Qg,"/"+un(H.unit_name),1)]),H.stock==0?(X(),gn("div",jg,ev)):rt("",!0),H.is_used==0?(X(),gn("div",tv,iv)):rt("",!0)],8,Vg))),128))]),_:1})):rt("",!0),vn.storeList.length?rt("",!0):(X(),gn("div",uv,[D(x,{"image-size":200,description:"没有找到对应商品"})]))])),[[W,vn.loading],[an,I]])])}}},sv=it(ov,[["__scopeId","data-v-2a80ef6f"]]),lv={class:"shop"},fv={class:"shop-info"},av={class:"shop-info-left"},cv={class:"shop-info-right"},hv={class:"shop-info-right-top"},_v={class:"shop-info-right-price"},dv={style:{"font-size":"1rem",color:"#777"}},pv={class:"shop-sku"},gv={class:"title"},vv={class:"sku"},mv={class:"dialog-footer"},wv={__name:"pupop",emits:["changeItem"],setup(vn,{expose:wn,emit:s}){const E=O(!1),F=O(null),Z=q=>{E.value=q},I=O({}),U=O(!1),rn=O("add"),hn=(q,y="add")=>{rn.value=y,I.value=JSON.parse(JSON.stringify(q))},J=s,j=()=>{I.value.cart_num||(I.value.cart_num=I.value.batch>0?I.value.batch:1),J("changeItem",I.value),E.value=!1};wn({show:Z,setForm:hn});const En=()=>{E.value&&j()};return Pt(()=>{ne.on("enter",En)}),$t(()=>{ne.off("enter",En)}),(q,y)=>{const on=tn("el-image"),P=tn("el-input-number"),K=tn("el-button"),k=tn("el-dialog"),Y=bt("loading");return X(),Oe(k,{modelValue:E.value,"onUpdate:modelValue":y[1]||(y[1]=nn=>E.value=nn),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=nn=>F.value.focus())},Mp({default:fn(()=>[ou((X(),gn("div",lv,[v("div",fv,[v("div",av,[D(on,{loading:"lazy",src:I.value.image},null,8,["src"])]),v("div",cv,[v("div",hv,un(I.value.store_name),1),v("div",_v,[dn(" ¥"),v("span",null,un(I.value.price),1),v("span",dv," / "+un(I.value.unit_name),1)])])]),v("div",pv,[v("div",gv,"购买数量 ( "+un(I.value.unit_name)+" )",1),v("div",vv,[D(P,{ref_key:"inputRef",ref:F,modelValue:I.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=nn=>I.value.cart_num=nn),placeholder:`请输入数量(默认为${+I.value.batch>0?I.value.batch:"1"})`,min:+I.value.batch>0?+I.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[Y,U.value]])]),_:2},[rn.value!="add"&&I.value.attr&&I.value.attr.length==1?void 0:{name:"footer",fn:fn(()=>[v("div",mv,[D(K,{class:"ok-btn",type:"primary",onClick:j},{default:fn(()=>[dn(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},xv=it(wv,[["__scopeId","data-v-05cb810b"]]),yv=["onClick","onMousemove"],Av=["onMousemove"],Iv={class:"title"},Cv={class:"list"},Lv=["onClick"],Rv={__name:"classify",emits:["getStoreList"],setup(vn,{emit:wn}){const s=wn,E=O([]),F=O([]),Z=O([]),I=O(-1),U=O(-1),rn=O(-1),hn=O(-1),J=O(!1),j=Pr();(()=>{iu({pid:0,page_no:1,page_size:30,level:1,store_id:j.userInfo.store_id}).then(P=>{E.value=P.data.lists,I.value=-1})})();const q=P=>{iu({pid:P,page_no:1,page_size:30,level:2,store_id:j.userInfo.store_id}).then(K=>{F.value=K.data.lists})},y=P=>{iu({pid:P,page_no:1,page_size:30,level:3,store_id:j.userInfo.store_id}).then(K=>{Z.value=K.data.lists})},on=(P=-1,K=1)=>{hn.value=P,J.value=!0;let k="",Y="";K==1?(I.value=P,U.value=-1,rn.value=-1,P!=-1&&(Y=E.value[P].id),q(Y)):K==2&&(U.value=P,rn.value=-1,P!=-1&&(Y=F.value[P].id),y(Y)),s("getStoreList",{cate_id:k,class_all:Y},!0)};return(P,K)=>{const k=tn("el-popover");return X(),gn("div",{class:"classify",onMouseout:K[2]||(K[2]=Y=>J.value?J.value=!1:J.value=!0)},[v("div",{class:br(["itemP",{"itemP-active":I.value==-1}]),onClick:K[0]||(K[0]=Y=>on(-1))},un("全部"),2),(X(!0),gn(Tt,null,Ot(E.value,(Y,nn)=>(X(),Oe(k,{placement:"left",width:"20rem",trigger:"click",key:nn,visible:nn==I.value&&hn.value==nn},{reference:fn(()=>[v("div",{class:br(["itemP",{"itemP-active":nn==I.value}]),onClick:S=>on(nn),onMousemove:S=>hn.value=nn},un(Y.name),43,yv)]),default:fn(()=>[v("div",{class:"active-card",onMouseout:K[1]||(K[1]=S=>hn.value=-1),onMousemove:S=>hn.value=nn},[v("div",Iv,un(Y.name),1),v("div",Cv,[(X(!0),gn(Tt,null,Ot(F.value,(S,x)=>(X(),gn("div",{class:br({"list-active":x==U.value}),link:"",type:"primary",key:S.id,onClick:W=>on(x,2)},un(S.name),11,Lv))),128))])],40,Av)]),_:2},1032,["visible"]))),128))],32)}}},Sv=it(Rv,[["__scopeId","data-v-00ca5f82"]]),Ev={class:"my-card"},Uv={__name:"index",setup(vn){const wn=O(null),s=O(null),E=O(null),F=O(null),Z=O([]);Pr();const I=Dp(),U=O({page_no:1,page_size:30}),rn=O(!1),hn=(S={},x=!1)=>{U.value={...U.value,...S},x&&(Z.value=[],U.value.page_no=1,J.value=!1),rn.value=!0,Gp(U.value).then(W=>{var an,H;rn.value=!1,((H=(an=W.data)==null?void 0:an.lists)==null?void 0:H.length){J.value||hn(S)};function En(S){return/^\d+$/.test(S)}const q=(S,x="")=>{console.log(S,x);let W={product_id:S.product_id,cart_num:S.cart_num};Gs(W).then(an=>{s.value.getList()})},y=(S,x)=>{wn.value.setForm(S,"add"),wn.value.show(!0)},on=S=>{wn.value.setForm(S,"edit"),wn.value.show(!0)},P=O({}),K=()=>{var W,an;let S=s.value.list.map(H=>H.id),x={cart_id:S,uid:((an=(W=s.value)==null?void 0:W.userInfo)==null?void 0:an.uid)||""};s.value.discounts>0&&(x.deduction_price=s.value.discounts.toFixed(2),x.pay_type="micropay"),Bp(x).then(H=>{var Mn,qn;P.value=H.data.order,F.value.setForm({data:H.data.order,cart_id:S,uid:((qn=(Mn=s.value)==null?void 0:Mn.userInfo)==null?void 0:qn.uid)||""})})},k=()=>{K(),F.value.drawer=!0},Y=(S=null)=>{setTimeout(()=>{s.value.getList()})},nn=()=>{I.name=="saleHome"&&(!F.value.drawer&&s.value.list.length>0?k():F.value.beforeClose())};return Pt(()=>{hn(),ne.on("F9",nn)}),$t(()=>{ne.off("F9",nn)}),(S,x)=>(X(),gn("div",Ev,[D(Hg,{ref_key:"orderRef",ref:s,onGoPay:k,onEditPupop:on},null,512),D(Ns),D(sv,{ref_key:"shopRef",ref:E,style:{flex:"1"},storeList:Z.value,loading:rn.value,onGetStoreList:hn,onChangeItem:y,onLoadMore:j},null,8,["storeList","loading"]),D(xv,{ref_key:"pupopRef",ref:wn,onChangeItem:q},null,512),D(Ns),D(Sv,{ref:"classifyRef",onGetStoreList:hn},null,512),D(Hp,{ref_key:"payRef",ref:F,onPaySuccess:Y},null,512)]))}};export{Uv as default}; diff --git a/dist/assets/index-BGqEsSVy.js b/dist/assets/index-B0B7l7sL.js similarity index 96% rename from dist/assets/index-BGqEsSVy.js rename to dist/assets/index-B0B7l7sL.js index 023258a..3ce40b2 100644 --- a/dist/assets/index-BGqEsSVy.js +++ b/dist/assets/index-B0B7l7sL.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-C8Aez8VK.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-BDDpKimp.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-2CqLry9i.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-BVz4Ohfy.js";import{a as H,b as K,c as P,d as Q,e as X}from"./merchant-CYIKGKiv.js";import{h as U}from"./moment-Cl4UOzQZ.js";import{p as Z}from"./padding-DDV9klbG.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/dist/assets/index-DXy69dkP.js b/dist/assets/index-BAL8Sp4F.js similarity index 98% rename from dist/assets/index-DXy69dkP.js rename to dist/assets/index-BAL8Sp4F.js index 7a48a69..f21e0f7 100644 --- a/dist/assets/index-DXy69dkP.js +++ b/dist/assets/index-BAL8Sp4F.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 $,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,C as se}from"./index-C8Aez8VK.js";import{s as oe,d as ae}from"./store-DpldfEnh.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ie}from"./pay-B94oZZEx.js";import{p as le}from"./padding-2CqLry9i.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"},$e={class:"money"},be={class:"count"},we={class:"bottom"},De={class:"pay"},Se={key:0},Ve={key:1},Ce={key:2},Ye={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,b.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),b=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if(b.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?b.value=!0:_.value.page_no++,D.value=0,console.log(_.value.page_no),M.value=i.data.count,h.value=!1}).catch(i=>{b.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 C=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),Y=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(C,{value:1},{default:y(()=>[$("全部")]),_:1}),d(C,{value:2},{default:y(()=>[$("未支付")]),_: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(Y,{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(()=>[$("搜索")]),_: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",$e,"¥"+l(a.pay_price),1),e("div",be,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[a.paid?(s(),o("div",Se,[$(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(z,{key:0},{default:y(()=>[$("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ve,"(微信收款)")):a.pay_type==17?(s(),o("span",Ce,"(现金支付)")):a.pay_type==13?(s(),o("span",Ye,"(支付宝收款)")):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)),b.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-e0380861"),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)),$t={class:"info-item-info"},bt={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)),Ct={class:"info-item-info"},Yt={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,b=(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 Y;const L=v("el-image"),r=v("el-table-column"),i=v("el-table"),C=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.total_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",$t,l(t.value.uid),1)]),e("div",bt,[wt,e("div",Dt,l(t.value.nickname),1)]),e("div",St,[Vt,e("div",Ct,l(t.value.mobile),1)])])):g("",!0),e("div",Yt,[$(" 共计 "),e("span",xt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),$(" 款商品 ")]),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"},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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),Rt])),[[N,h]]),t.value.paid?g("",!0):(s(),o("div",It,[d(C,{type:"primary",size:"large",onClick:I},{default:y(()=>[$("重新支付")]),_:1})]))])),[[T,m.value]]):(s(),o("div",Mt,[d(B)])),d(ie,{ref_key:"payRef",ref:f,onPaySuccess:b},null,512)])}}},Bt=G(Lt,[["__scopeId","data-v-e0380861"]]),Nt={class:"my-card"},Kt={__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{Kt 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 $,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,C as se}from"./index-BVz4Ohfy.js";import{s as oe,d as ae}from"./store-C3TkF7fN.js";import{h as q}from"./moment-Cl4UOzQZ.js";import{p as ie}from"./pay-E0FHnQQX.js";import{p as le}from"./padding-DDV9klbG.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"},$e={class:"money"},be={class:"count"},we={class:"bottom"},De={class:"pay"},Se={key:0},Ve={key:1},Ce={key:2},Ye={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,b.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),b=n(!1),c=n([]),k=(r=!1)=>{if(r)_.value.page_no=1;else if(b.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?b.value=!0:_.value.page_no++,D.value=0,console.log(_.value.page_no),M.value=i.data.count,h.value=!1}).catch(i=>{b.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 C=v("el-radio-button"),B=v("el-radio-group"),N=v("el-date-picker"),T=v("el-button"),Y=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(C,{value:1},{default:y(()=>[$("全部")]),_:1}),d(C,{value:2},{default:y(()=>[$("未支付")]),_: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(Y,{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(()=>[$("搜索")]),_: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",$e,"¥"+l(a.pay_price),1),e("div",be,"共"+l(a.total_num)+"款商品",1)])]),e("div",we,[e("div",De,[a.paid?(s(),o("div",Se,[$(l(a.paid_name)+" ",1),a.pay_type_name?(s(),j(z,{key:0},{default:y(()=>[$("("+l(a.pay_type_name)+")",1)]),_:2},1024)):a.pay_type==9?(s(),o("span",Ve,"(微信收款)")):a.pay_type==17?(s(),o("span",Ce,"(现金支付)")):a.pay_type==13?(s(),o("span",Ye,"(支付宝收款)")):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)),b.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-e0380861"),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)),$t={class:"info-item-info"},bt={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)),Ct={class:"info-item-info"},Yt={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,b=(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 Y;const L=v("el-image"),r=v("el-table-column"),i=v("el-table"),C=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.total_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",$t,l(t.value.uid),1)]),e("div",bt,[wt,e("div",Dt,l(t.value.nickname),1)]),e("div",St,[Vt,e("div",Ct,l(t.value.mobile),1)])])):g("",!0),e("div",Yt,[$(" 共计 "),e("span",xt,l(((Y=t.value.product)==null?void 0:Y.length)||" "),1),$(" 款商品 ")]),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"},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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),Rt])),[[N,h]]),t.value.paid?g("",!0):(s(),o("div",It,[d(C,{type:"primary",size:"large",onClick:I},{default:y(()=>[$("重新支付")]),_:1})]))])),[[T,m.value]]):(s(),o("div",Mt,[d(B)])),d(ie,{ref_key:"payRef",ref:f,onPaySuccess:b},null,512)])}}},Bt=G(Lt,[["__scopeId","data-v-e0380861"]]),Nt={class:"my-card"},Kt={__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{Kt as default}; diff --git a/dist/assets/index-C8Aez8VK.js b/dist/assets/index-BVz4Ohfy.js similarity index 99% rename from dist/assets/index-C8Aez8VK.js rename to dist/assets/index-BVz4Ohfy.js index 3a645d3..50541ea 100644 --- a/dist/assets/index-C8Aez8VK.js +++ b/dist/assets/index-BVz4Ohfy.js @@ -1,6 +1,6 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-9TFzU5dK.js","./store-DpldfEnh.js","./user-C93qGz5f.js","./moment-Cl4UOzQZ.js","./padding-2CqLry9i.js","./shop-BWPO2XM6.js","./pay-B94oZZEx.js","./pay-Co4mcZ_Q.css","./index-DtEKC3OW.css","./index-DXy69dkP.js","./index-8XT8_pna.css","./index-C7fs1zha.js","./index-CEH20lH_.css","./indexCount-t7dVborh.js","./merchant-BDDpKimp.js","./indexCount-quL7L4Zi.css","./index-BGqEsSVy.js","./index-ZYBKJJNc.css","./index-CoEJs8iO.js","./index-Bekx5DrI.css","./index-CeZhBP0R.js","./index-Bfak7bLR.css","./index-DpSgGS2v.js","./index-PY-m-LZm.css","./test-B81cMWEE.js","./test-CmC8-tN2.css","./index-B6mjWDdo.js","./index-BA6nwZsc.css"] + __vite__mapDeps.viteFileDeps = ["./index-DRWzvtdH.js","./store-C3TkF7fN.js","./user-CmzBi8Mn.js","./moment-Cl4UOzQZ.js","./padding-DDV9klbG.js","./axiosAPI-Cd-ap3gb.js","./shop-DqnXs3CE.js","./pay-E0FHnQQX.js","./pay-BB7NTysX.css","./index-DWiJduKq.css","./index-BAL8Sp4F.js","./index-8XT8_pna.css","./index-zOr5bmPl.js","./index-CEH20lH_.css","./indexCount-B8A9Xzkb.js","./merchant-CYIKGKiv.js","./indexCount-quL7L4Zi.css","./index-B0B7l7sL.js","./index-ZYBKJJNc.css","./index-7gzsvc_9.js","./index-Bekx5DrI.css","./index-NMWcwHZT.js","./index-Bfak7bLR.css","./index--1tYNtpI.js","./index-PY-m-LZm.css","./test-C7KWSI5l.js","./test-CmC8-tN2.css","./index-DrSCp2PL.js","./index-BA6nwZsc.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } @@ -76,7 +76,7 @@ function __vite__mapDeps(indexes) { `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[b4]=this[b4]={accessors:{}}).accessors,r=this.prototype;function a(l){const s=hs(l);o[s]||(Tce(r,l),o[s]=!0)}return Ve.isArray(t)?t.forEach(a):a(t),this}}Sd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(Sd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Ve.freezeMethods(Sd);const ur=Sd;function bf(e,t){const n=this||yv,o=t||n,r=ur.from(o.headers);let a=o.data;return Ve.forEach(e,function(s){a=s.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function Lb(e){return!!(e&&e.__CANCEL__)}function Pi(e,t,n){Rt.call(this,e??"canceled",Rt.ERR_CANCELED,t,n),this.name="CanceledError"}Ve.inherits(Pi,Rt,{__CANCEL__:!0});function $ce(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Oce=Bo.hasStandardBrowserEnv?{write(e,t,n,o,r,a){const l=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Ve.isString(o)&&l.push("path="+o),Ve.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ace(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vb(e,t){return e&&!Ace(t)?Nce(e,t):t}const Rce=Bo.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(a){let l=a;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(l){const s=Ve.isString(l)?r(l):l;return s.protocol===o.protocol&&s.host===o.host}}():function(){return function(){return!0}}();function Pce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ice(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,a=0,l;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=o[a];l||(l=c),n[r]=u,o[r]=c;let d=a,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),c-l{const a=r.loaded,l=r.lengthComputable?r.total:void 0,s=a-n,u=o(s),c=a<=l;n=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const Lce=typeof XMLHttpRequest<"u",Vce=Lce&&function(e){return new Promise(function(n,o){let r=e.data;const a=ur.from(e.headers).normalize();let{responseType:l,withXSRFToken:s}=e,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let f;if(Ve.isFormData(r)){if(Bo.hasStandardBrowserEnv||Bo.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[v,..._]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([v||"multipart/form-data",..._].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(v+":"+_))}const p=Vb(e.baseURL,e.url);d.open(e.method.toUpperCase(),Nb(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=ur.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};$ce(function(y){n(y),c()},function(y){o(y),c()},g),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(o(new Rt("Request aborted",Rt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new Rt("Network Error",Rt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||Rb;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),o(new Rt(_,g.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,e,d)),d=null},Bo.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(e)),s||s!==!1&&Rce(p))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&Oce.read(e.xsrfCookieName);v&&a.set(e.xsrfHeaderName,v)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&Ve.forEach(a.toJSON(),function(_,g){d.setRequestHeader(g,_)}),Ve.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",w4(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",w4(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=v=>{d&&(o(!v||v.type?new Pi(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const m=Pce(p);if(m&&Bo.protocols.indexOf(m)===-1){o(new Rt("Unsupported protocol "+m+":",Rt.ERR_BAD_REQUEST,e));return}d.send(r||null)})},ep={http:ice,xhr:Vce};Ve.forEach(ep,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const C4=e=>`- ${e}`,Bce=e=>Ve.isFunction(e)||e===null||e===!1,Bb={getAdapter:e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let a=0;a`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since : `+a.map(C4).join(` `):" "+C4(a[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:ep};function wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pi(null,e)}function S4(e){return wf(e),e.headers=ur.from(e.headers),e.data=bf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bb.getAdapter(e.adapter||yv.adapter)(e).then(function(o){return wf(e),o.data=bf.call(e,e.transformResponse,o),o.headers=ur.from(o.headers),o},function(o){return Lb(o)||(wf(e),o&&o.response&&(o.response.data=bf.call(e,e.transformResponse,o.response),o.response.headers=ur.from(o.response.headers))),Promise.reject(o)})}const k4=e=>e instanceof ur?{...e}:e;function Ul(e,t){t=t||{};const n={};function o(c,f,d){return Ve.isPlainObject(c)&&Ve.isPlainObject(f)?Ve.merge.call({caseless:d},c,f):Ve.isPlainObject(f)?Ve.merge({},f):Ve.isArray(f)?f.slice():f}function r(c,f,d){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c,d)}else return o(c,f,d)}function a(c,f){if(!Ve.isUndefined(f))return o(void 0,f)}function l(c,f){if(Ve.isUndefined(f)){if(!Ve.isUndefined(c))return o(void 0,c)}else return o(void 0,f)}function s(c,f,d){if(d in t)return o(c,f);if(d in e)return o(void 0,c)}const u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(c,f)=>r(k4(c),k4(f),!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=u[f]||r,p=d(e[f],t[f],f);Ve.isUndefined(p)&&d!==s||(n[f]=p)}),n}const zb="1.6.8",_v={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{_v[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const E4={};_v.transitional=function(t,n,o){function r(a,l){return"[Axios v"+zb+"] Transitional option '"+a+"'"+l+(o?". "+o:"")}return(a,l,s)=>{if(t===!1)throw new Rt(r(l," has been removed"+(n?" in "+n:"")),Rt.ERR_DEPRECATED);return n&&!E4[l]&&(E4[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,s):!0}};function zce(e,t,n){if(typeof e!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const a=o[r],l=t[a];if(l){const s=e[a],u=s===void 0||l(s,a,e);if(u!==!0)throw new Rt("option "+a+" must be "+u,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+a,Rt.ERR_BAD_OPTION)}}const tp={assertOptions:zce,validators:_v},Or=tp.validators;class kc{constructor(t){this.defaults=t,this.interceptors={request:new _4,response:new _4}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ul(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&tp.assertOptions(o,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:tp.assertOptions(r,{encode:Or.function,serialize:Or.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=ur.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[S4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Pi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bv(function(r){t=r}),cancel:t}}}const Hce=bv;function Dce(e){return function(n){return e.apply(null,n)}}function Fce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const np={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(np).forEach(([e,t])=>{np[t]=e});const Kce=np;function Hb(e){const t=new qu(e),n=bb(qu.prototype.request,t);return Ve.extend(n,qu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Hb(Ul(e,r))},n}const un=Hb(yv);un.Axios=qu;un.CanceledError=Pi;un.CancelToken=Hce;un.isCancel=Lb;un.VERSION=zb;un.toFormData=Cd;un.AxiosError=Rt;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=Dce;un.isAxiosError=Fce;un.mergeConfig=Ul;un.AxiosHeaders=ur;un.formToJSON=e=>Ib(Ve.isHTMLForm(e)?new FormData(e):e);un.getAdapter=Bb.getAdapter;un.HttpStatusCode=Kce;un.default=un;const Wce={url:"https://test-multi-store.lihaink.cn/store",upload:"https://test-multi-store.lihaink.cn/store/upload/image/field",api:"https://test-multi-store.lihaink.cn/api"},Db=un.create({baseURL:Wce.url,timeout:6e4});Db.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers.token=t),e},e=>(console.error(e),Promise.reject(e)));Db.interceptors.response.use(e=>{var t;if(e.data.code===-1&&(e.data.msg=="登录过期"||e.data.msg=="登录超时,请重新登录"))throw eo({message:e.data.msg,type:"error"}),setTimeout(()=>{const n=yd();n.setUserInfo({}),n.setToken(""),Ub.push("/login")},500),new Error(e.data.msg);if(e.data.code===400)throw eo({message:e.data.msg,type:"error"}),new Error(e.data.msg);if(e.data.code===500)throw e.data.msg=JSON.parse(e.data.msg),eo({message:((t=e.data.msg)==null?void 0:t.msg)||e.data.msg,type:"error"}),new Error(e.data.msg);return e.data.show&&eo({message:e.data.msg,type:e.data.code===0?"error":"success"}),e.data.code===0?Promise.reject(e.data):e.data},e=>{var t,n;return console.error(e),eo({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.msg)||e,type:"error"}),Promise.reject(e)});function jce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const Jt=jce(),qce=vv("print",()=>{const e=L(localStorage.getItem("is_connect")),t=L(localStorage.getItem("print_address"));return{is_connect:e,setConnect:r=>{e.value=r,localStorage.setItem("is_connect",r)},printAddress:t,setPrintAddress:r=>{t.value=r,localStorage.setItem("print_address",r)}}}),Fb=32;function la(e){if(typeof e=="string")return e;for(var t="",n=e,o=0;o2&&(u-=2,s+=2);let c=new Array(u).fill(o.charAt(0)).join(""),f=new Array(s).fill(o.charAt(0)).join("");return e+c+t+f+n}function sl(e="-",t=1){const n=Fb/t;return new Array(n).fill(e.charAt(0)).join("")}const Zce={id:119,store_id:5,staff_id:0,order_id:"PF1717833856******",pid:null,uid:0,real_name:"",user_phone:"",user_address:"",cart_id:"79",freight_price:"0.00",total_num:1,total_price:"0.00",total_postage:"0.00",pay_price:"0.00",cost:"0.00",profit:"0.00",earnings:"0.00",vip_price:"0.00",pay_postage:"0.00",deduction_price:"0.00",coupon_id:0,coupon_price:"0.00",paid:1,pay_time:1717833856,pay_type:"7",pay_type_name:"微信小程序",status:2,refund_status:0,refund_type:0,refund_express:"",refund_reason_wap_img:null,refund_reason_wap_explain:"",refund_reason_time:0,refund_cancle_time:null,refund_reason_wap:"",refund_reason:"",refund_num:0,refund_price:"0.00",delivery_name:"",delivery_code:"",delivery_type:"",delivery_id:"",fictitious_content:"",delivery_uid:0,mark:"",remark:"",mer_id:0,verify_code:"6-******",shipping_type:2,reservation:0,reservation_time:null,is_writeoff:1,is_remind:0,create_time:"2024-00-08 16:04:16",update_time:"2024-00-08 16:56:23",delete_time:null,system_store_name:"店铺名称",system_store_phone:"156****6666",staff_name:"新店阿萨",staff_phone:"156****6666",nickname:"",user_mobile:"",info:[{store_id:5,product_id:30,cart_num:1,price:null,total_price:null,unit_name:"只",store_name:"商品名称"}]},Sf=(e={},t=!1)=>{let n="";return(!e||!e.order_id)&&(e=Zce),n+=Gce(2)+x4()+M4()+e.system_store_name+Uce()+` +`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ul(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:a}=n;o!==void 0&&tp.assertOptions(o,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),r!=null&&(Ve.isFunction(r)?n.paramsSerializer={serialize:r}:tp.assertOptions(r,{encode:Or.function,serialize:Or.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&Ve.merge(a.common,a[n.method]);a&&Ve.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=ur.concat(l,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!u){const m=[S4.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),p=m.length,f=Promise.resolve(n);d{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](r);o._listeners=null}),this.promise.then=r=>{let a;const l=new Promise(s=>{o.subscribe(s),a=s}).then(r);return l.cancel=function(){o.unsubscribe(a)},l},t(function(a,l,s){o.reason||(o.reason=new Pi(a,l,s),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bv(function(r){t=r}),cancel:t}}}const Hce=bv;function Dce(e){return function(n){return e.apply(null,n)}}function Fce(e){return Ve.isObject(e)&&e.isAxiosError===!0}const np={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(np).forEach(([e,t])=>{np[t]=e});const Kce=np;function Hb(e){const t=new qu(e),n=bb(qu.prototype.request,t);return Ve.extend(n,qu.prototype,t,{allOwnKeys:!0}),Ve.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Hb(Ul(e,r))},n}const un=Hb(yv);un.Axios=qu;un.CanceledError=Pi;un.CancelToken=Hce;un.isCancel=Lb;un.VERSION=zb;un.toFormData=Cd;un.AxiosError=Rt;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=Dce;un.isAxiosError=Fce;un.mergeConfig=Ul;un.AxiosHeaders=ur;un.formToJSON=e=>Ib(Ve.isHTMLForm(e)?new FormData(e):e);un.getAdapter=Bb.getAdapter;un.HttpStatusCode=Kce;un.default=un;const Wce={url:"http://192.168.1.22:8545/store",upload:"http://192.168.1.22:8545/store/upload/image/field",api:"http://192.168.1.22:8545/api"},Db=un.create({baseURL:Wce.url,timeout:6e4});Db.interceptors.request.use(e=>{const t=localStorage.getItem("Token");return t&&(e.headers.token=t),e},e=>(console.error(e),Promise.reject(e)));Db.interceptors.response.use(e=>{var t;if(e.data.code===-1&&(e.data.msg=="登录过期"||e.data.msg=="登录超时,请重新登录"))throw eo({message:e.data.msg,type:"error"}),setTimeout(()=>{const n=yd();n.setUserInfo({}),n.setToken(""),Ub.push("/login")},500),new Error(e.data.msg);if(e.data.code===400)throw eo({message:e.data.msg,type:"error"}),new Error(e.data.msg);if(e.data.code===500)throw e.data.msg=JSON.parse(e.data.msg),eo({message:((t=e.data.msg)==null?void 0:t.msg)||e.data.msg,type:"error"}),new Error(e.data.msg);return e.data.show&&eo({message:e.data.msg,type:e.data.code===0?"error":"success"}),e.data.code===0?Promise.reject(e.data):e.data},e=>{var t,n;return console.error(e),eo({message:((n=(t=e.response)==null?void 0:t.data)==null?void 0:n.msg)||e,type:"error"}),Promise.reject(e)});function jce(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(r){r(n)}),(o=e.get("*"))&&o.slice().map(function(r){r(t,n)})}}}const Jt=jce(),qce=vv("print",()=>{const e=L(localStorage.getItem("is_connect")),t=L(localStorage.getItem("print_address"));return{is_connect:e,setConnect:r=>{e.value=r,localStorage.setItem("is_connect",r)},printAddress:t,setPrintAddress:r=>{t.value=r,localStorage.setItem("print_address",r)}}}),Fb=32;function la(e){if(typeof e=="string")return e;for(var t="",n=e,o=0;o2&&(u-=2,s+=2);let c=new Array(u).fill(o.charAt(0)).join(""),f=new Array(s).fill(o.charAt(0)).join("");return e+c+t+f+n}function sl(e="-",t=1){const n=Fb/t;return new Array(n).fill(e.charAt(0)).join("")}const Zce={id:119,store_id:5,staff_id:0,order_id:"PF1717833856******",pid:null,uid:0,real_name:"",user_phone:"",user_address:"",cart_id:"79",freight_price:"0.00",total_num:1,total_price:"0.00",total_postage:"0.00",pay_price:"0.00",cost:"0.00",profit:"0.00",earnings:"0.00",vip_price:"0.00",pay_postage:"0.00",deduction_price:"0.00",coupon_id:0,coupon_price:"0.00",paid:1,pay_time:1717833856,pay_type:"7",pay_type_name:"微信小程序",status:2,refund_status:0,refund_type:0,refund_express:"",refund_reason_wap_img:null,refund_reason_wap_explain:"",refund_reason_time:0,refund_cancle_time:null,refund_reason_wap:"",refund_reason:"",refund_num:0,refund_price:"0.00",delivery_name:"",delivery_code:"",delivery_type:"",delivery_id:"",fictitious_content:"",delivery_uid:0,mark:"",remark:"",mer_id:0,verify_code:"6-******",shipping_type:2,reservation:0,reservation_time:null,is_writeoff:1,is_remind:0,create_time:"2024-00-08 16:04:16",update_time:"2024-00-08 16:56:23",delete_time:null,system_store_name:"店铺名称",system_store_phone:"156****6666",staff_name:"新店阿萨",staff_phone:"156****6666",nickname:"",user_mobile:"",info:[{store_id:5,product_id:30,cart_num:1,price:null,total_price:null,unit_name:"只",store_name:"商品名称"}]},Sf=(e={},t=!1)=>{let n="";return(!e||!e.order_id)&&(e=Zce),n+=Gce(2)+x4()+M4()+e.system_store_name+Uce()+` `,n+=sl(" ")+T4()+` `,e.shipping_type&&(n+=_o()+"核销码: "+M4()+e.verify_code+T4()+` `),n+=_o()+"单号: "+e.order_id+` @@ -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("/src/assets/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-c2e7e17b"]]),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://test-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-9TFzU5dK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-DXy69dkP.js"),__vite__mapDeps([9,1,3,6,7,4,10]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-C7fs1zha.js"),__vite__mapDeps([11,1,3,4,12,7]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-t7dVborh.js"),__vite__mapDeps([13,14,15]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-BGqEsSVy.js"),__vite__mapDeps([16,14,3,4,17]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-CoEJs8iO.js"),__vite__mapDeps([18,1,4,19,7]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-CeZhBP0R.js"),__vite__mapDeps([20,5,21]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index-DpSgGS2v.js"),__vite__mapDeps([22,2,3,1,4,23]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-B81cMWEE.js"),__vite__mapDeps([24,25]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-B6mjWDdo.js"),__vite__mapDeps([26,2,27]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-Dc56CDYQ.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,bue as B,hb as C,S as D,eo as E,Fe as F,Db as G,bt as H,Tp as I,un as J,Wce as K,Ub as L,wt as M,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("/src/assets/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-c2e7e17b"]]),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:"ws://192.168.1.22:8787",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-DRWzvtdH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)},{path:"/saleOrder",name:"saleOrder",meta:{title:"收银订单"},component:()=>yo(()=>import("./index-BAL8Sp4F.js"),__vite__mapDeps([10,1,3,7,8,4,11]),import.meta.url)},{path:"/order",name:"order",meta:{title:"线上采购"},component:()=>yo(()=>import("./index-zOr5bmPl.js"),__vite__mapDeps([12,1,3,4,13,8]),import.meta.url)},{path:"/orderCount",name:"orderCount",meta:{title:"订单统计"},component:()=>yo(()=>import("./indexCount-B8A9Xzkb.js"),__vite__mapDeps([14,15,16]),import.meta.url)},{path:"/wallet",name:"wallet",meta:{title:"提现"},component:()=>yo(()=>import("./index-B0B7l7sL.js"),__vite__mapDeps([17,15,3,4,18]),import.meta.url)},{path:"/convert",name:"convert",meta:{title:"订单核销"},component:()=>yo(()=>import("./index-7gzsvc_9.js"),__vite__mapDeps([19,1,4,20,8]),import.meta.url)},{path:"/putStorage",name:"putStorage",meta:{title:"入库登记"},component:()=>yo(()=>import("./index-NMWcwHZT.js"),__vite__mapDeps([21,6,5,22]),import.meta.url)},{path:"/user",name:"user",meta:{title:"用户"},component:()=>yo(()=>import("./index--1tYNtpI.js"),__vite__mapDeps([23,2,3,5,1,4,24]),import.meta.url)},{path:"/test",name:"test",component:()=>yo(()=>import("./test-C7KWSI5l.js"),__vite__mapDeps([25,26]),import.meta.url)}]},{path:"/login",name:"login",component:()=>yo(()=>import("./index-DrSCp2PL.js"),__vite__mapDeps([27,2,28]),import.meta.url)},{path:"/:catchAll(.*)",name:"notFound",component:()=>yo(()=>import("./index-EhChKQnq.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,bue as B,hb as C,S as D,eo as E,Fe as F,Db as G,bt as H,Tp as I,wt as J,un as K,Wce as L,Ub as M,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/dist/assets/index-CeZhBP0R.js b/dist/assets/index-CeZhBP0R.js deleted file mode 100644 index 57f093f..0000000 --- a/dist/assets/index-CeZhBP0R.js +++ /dev/null @@ -1 +0,0 @@ -import{a as B,b as L}from"./shop-BWPO2XM6.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as t,j as N,g as r,d,p as y,E as A}from"./index-C8Aez8VK.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"}},T={__name:"index",setup(S){const u=f([]),a=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{a.value.loadend||(_.value=!0,B({page_no:a.value.page_no,page_size:a.value.page_size,type:a.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length{a.value.page_no=1,a.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:a.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>a.value.type=l),onChange:h},{default:t(()=>[e(g,{label:1,value:1},{default:t(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:t(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:t(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:t(({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:t(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:t(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:t(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:t(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:t(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:t(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{T as default}; diff --git a/dist/assets/index-DRWzvtdH.js b/dist/assets/index-DRWzvtdH.js new file mode 100644 index 0000000..5a3eb24 --- /dev/null +++ b/dist/assets/index-DRWzvtdH.js @@ -0,0 +1,27 @@ +import{c as Fp,a as Wp,b as Gs,o as Bp}from"./store-C3TkF7fN.js";import{_ as ut,r as T,o as $t,m as ne,a as Ft,b as en,c as Q,d as Oe,w as an,e as v,f as U,g as _n,t as un,n as uu,E as Or,u as $r,h as Tt,i as Hs,j as ou,k as gn,F as Ot,l as Pt,p as it,q as zs,s as Ks,v as Et,x as Up,y as Er,z as Tr,A as Mp,B as Dp}from"./index-BVz4Ohfy.js";import{u as Np}from"./user-CmzBi8Mn.js";import"./moment-Cl4UOzQZ.js";import{p as Ns}from"./padding-DDV9klbG.js";import"./axiosAPI-Cd-ap3gb.js";import{m as iu,s as Gp}from"./shop-DqnXs3CE.js";import{p as Hp}from"./pay-E0FHnQQX.js";/* empty css */const zp={class:"price"},Kp={class:"flex"},qp={style:{margin:"0.625rem","padding-bottom":"40px"}},kp={style:{color:"#f5222d","font-weight":"bold","margin-left":"1rem"}},Zp={class:"dialog-footer"},Yp={__name:"price",emits:["changeAllPrice"],setup(vn,{expose:wn,emit:s}){const S=T(!1),F=T(null),Z=T(0),I=(K=!0,y=0)=>{G.value.nowPrice="",G.value.percentage="",S.value=K,Z.value=y,uu(()=>{setTimeout(()=>{var tn;(tn=F.value)==null||tn.focus()},150)})},G=T({nowPrice:"",percentage:""}),Y=K=>{G.value.percentage=(K/Z.value*100).toFixed(2)},dn=K=>{G.value.nowPrice=(Z.value*K/100).toFixed(2)},V=s,X=()=>{if(G.value.percentage>100)return G.value.nowPrice="",G.value.percentage="",Or.error("改价金额不能大于当前订单金额");if(G.value.nowPrice<=0)return G.value.nowPrice="",G.value.percentage="",Or.error("金额不能小于0");V("changeAllPrice",G.value.nowPrice)};wn({show:I,dialogVisible:S});const En=()=>{S.value&&X()};return $t(()=>{ne.on("enter",En)}),Ft(()=>{ne.off("enter",En)}),(K,y)=>{const tn=en("el-input"),O=en("el-button"),H=en("el-dialog");return Q(),Oe(H,{modelValue:S.value,"onUpdate:modelValue":y[2]||(y[2]=q=>S.value=q),title:"订单改价",width:"650"},{footer:an(()=>[v("div",Zp,[U(O,{class:"ok-btn",type:"primary",onClick:X},{default:an(()=>[_n(" 确定 (Enter) ")]),_:1})])]),default:an(()=>[v("div",zp,[v("div",Kp,[U(tn,{ref_key:"priceRef",ref:F,style:{flex:"3",margin:"0.625rem",height:"2.5rem"},modelValue:G.value.nowPrice,"onUpdate:modelValue":y[0]||(y[0]=q=>G.value.nowPrice=q),type:"number",placeholder:"请输入改价后的价格",onInput:Y},{suffix:an(()=>[_n("元")]),_:1},8,["modelValue"]),U(tn,{style:{flex:"2",margin:"0.625rem",height:"2.5rem"},modelValue:G.value.percentage,"onUpdate:modelValue":y[1]||(y[1]=q=>G.value.percentage=q),type:"number",placeholder:"请输入比例",onInput:dn},{suffix:an(()=>[_n("%")]),_:1},8,["modelValue"])]),v("div",qp,[_n(" 改价后金额: "),v("span",kp,"¥"+un(G.value.nowPrice||Z.value||" - - "),1)])])]),_:1},8,["modelValue"])}}},Vp=ut(Yp,[["__scopeId","data-v-924edcc0"]]),Xp={class:"check-user-list"},Jp={class:"header-input"},Qp={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},jp=["onClick"],ng={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},eg={class:"top"},tg={class:"bold"},rg={class:"flex-between"},ig={class:"mr-2"},ug={class:"bottom flex",style:{"justify-content":"space-between"}},og={class:"red"},sg={class:"red"},lg={key:0,class:"load-end"},fg={key:1,class:"load-end"},ag={__name:"userList",emits:["setUser"],setup(vn,{expose:wn,emit:s}){$r();const S=T(!1),F=T({page_no:1,page_size:20,mobile:""}),Z=s,I=T(!1),G=T(0),Y=T(!1),dn=T([]),V=(K=!1)=>{if(K)F.value.page_no=1;else if(Y.value||I.value)return;I.value=!0,Np(F.value).then(y=>{K?dn.value=y.data.lists:dn.value=[...dn.value,...y.data.lists],y.data.lists.length{Y.value=!0,I.value=!1})},X=(K,y)=>{Z("setUser",K),S.value=!1};return wn({open:()=>{S.value=!0,V(!0)}}),(K,y)=>{const tn=en("el-button"),O=en("el-input"),H=en("el-avatar"),q=en("el-tag"),k=en("el-dialog"),rn=Tt("loading"),on=Tt("infinite-scroll");return Q(),Oe(k,{modelValue:S.value,"onUpdate:modelValue":y[4]||(y[4]=m=>S.value=m),title:"选择用户",width:"800"},{default:an(()=>[v("div",Xp,[v("div",Jp,[U(O,{modelValue:F.value.mobile,"onUpdate:modelValue":y[1]||(y[1]=m=>F.value.mobile=m),placeholder:"搜索手机号/ID",onKeydown:y[2]||(y[2]=Hs(m=>V(!0),["enter"])),onClear:y[3]||(y[3]=m=>V(!0)),clearable:""},{append:an(()=>[U(tn,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:y[0]||(y[0]=m=>V(!0))},{default:an(()=>[_n("搜索")]),_:1})]),_:1},8,["modelValue"])]),ou((Q(),gn("div",Qp,[(Q(!0),gn(Ot,null,Pt(dn.value,(m,P)=>(Q(),gn("div",{class:"item",key:P,onClick:ln=>X(m,P)},[U(H,{class:"avatar",src:m.avatar},null,8,["src"]),v("div",ng,[v("div",eg,[v("div",null,[v("span",tg,un(m.nickname),1),v("span",null,un(" (ID:"+m.id+")"),1)]),v("div",rg,[v("div",ig,"手机号: "+un(m.mobile||m.account),1),m.user_ship!=1?(Q(),Oe(q,{key:0,type:"primary"},{default:an(()=>[_n(un(m.user_ship_name),1)]),_:2},1024)):(Q(),Oe(q,{key:1,type:"success"},{default:an(()=>[_n(un(m.user_ship_name),1)]),_:2},1024))])]),v("div",ug,[v("div",null,[_n("采购款: "),v("span",og,un(m.purchase_funds),1)]),v("div",null,[_n("礼品券: "),v("span",sg,un(m.integral),1)])])])],8,jp))),128)),Y.value?(Q(),gn("div",lg,"没有更多了")):it("",!0),I.value?(Q(),gn("div",fg,"加载中...")):it("",!0)])),[[rn,I.value],[on,V]])])]),_:1},8,["modelValue"])}}},cg=ut(ag,[["__scopeId","data-v-33b4f26e"]]),hg=vn=>(zs("data-v-b729fa0d"),vn=vn(),Ks(),vn),_g={class:"my-order"},dg={class:"user-nav"},pg={class:"user-info"},gg={key:0,class:"info"},vg={class:"flex-bewteen"},mg={class:"flex-bewteen",style:{"align-items":"flex-end"}},wg={style:{display:"flex"}},xg={style:{"margin-right":"0.5rem"}},yg={style:{color:"#f70"}},Ag={style:{color:"#f70"}},Ig={key:1,class:"info",style:{"align-items":"center",display:"flex","justify-content":"space-between"}},Cg={class:"flex-bewteen",style:{width:"100%"}},Lg=hg(()=>v("div",{style:{"font-size":"1.2rem"}},"游客",-1)),Rg={class:"header-nav"},Sg={class:"nav-item"},bg={class:"order-list"},Eg={class:"order-item-info"},Tg={class:"order-item-title"},Og={class:"title"},Pg=["onClick"],$g={class:"order-item-sku"},Fg={class:"order-item-price"},Wg={class:"order-footer"},Bg={class:"order-total"},Ug={class:"price"},Mg={class:"total-item"},Dg={style:{"font-size":"1.4rem"}},Ng={class:"order-btn"},Gg={__name:"order",emits:["goPay","editAttr"],setup(vn,{expose:wn,emit:s}){const S=T([]),F=T(0),Z=T(0),I=T(0);$r();const G=T(null),Y=()=>{let m=[];S.value.map(P=>{m.push(P.id)}),m.length!=0&&V(m)},dn=m=>{S.value=S.value.filter(P=>P.id!=m),V([m])},V=m=>{Fp({id:m}).then(P=>{console.log(P),X()})},X=()=>{F.value=0,Z.value=0,I.value=0,Wp().then(m=>{var P,ln,z;((ln=(P=m.data)==null?void 0:P.lists)==null?void 0:ln.length)>0?(S.value=m.data.lists,F.value=(z=m.data)==null?void 0:z.lists.reduce((xn,Pn)=>xn+Number(Pn.total_price),0),Z.value=F.value):S.value=[]})};X();const En=s,K=()=>{En("goPay")},y=(m,P)=>{Gs({product_id:m.product_id,cart_num:m.cart_num}).then(ln=>{F.value=0,S.value.forEach(z=>{F.value+=z.price*z.cart_num}),Z.value=F.value}).catch(ln=>{var xn;let z=(xn=ln==null?void 0:ln.msg)==null?void 0:xn.match(/\b\d+(\.\d+)?\b/);z?m.cart_num=+z[0]:m.cart_num=1})},tn=m=>{I.value=Z.value-m,F.value=+m,uu(()=>{setTimeout(()=>{H(!1)},150)})};T(0);const O=T(null),H=(m=!0)=>{O.value.show(m,Z.value)},q=T({uid:""}),k=m=>{q.value=m,q.value.uid=m.id};wn({getList:X,list:S,discounts:I,allPrice:F,userInfo:q});const rn=()=>{O.value.dialogVisible?O.value.dialogVisible=!1:H()},on=()=>{S.value.length>0&&Y()};return $t(()=>{ne.on("insert",rn),ne.on("delete",on)}),Ft(()=>{ne.off("insert",rn),ne.off("delete",on)}),(m,P)=>{const ln=en("el-avatar"),z=en("ArrowRight"),xn=en("el-icon"),Pn=en("el-button"),Ge=en("RefreshLeft"),Fr=en("Delete"),Wt=en("el-empty"),Wr=en("el-image"),Br=en("el-input-number");return Q(),gn("div",_g,[v("div",dg,[v("div",pg,[U(ln,{class:"avatar",src:q.value.avatar},null,8,["src"]),q.value.uid?(Q(),gn("div",gg,[v("div",vg,[v("div",null,"手机号: "+un(q.value.mobile||q.value.account),1),U(Pn,{type:"primary",link:"",class:"change-user",onClick:P[0]||(P[0]=yn=>G.value.open())},{default:an(()=>[_n("切换用户"),U(xn,null,{default:an(()=>[U(z)]),_:1})]),_:1})]),v("div",mg,[v("div",wg,[v("div",xg,[_n("采购款: "),v("span",yg,un(q.value.purchase_funds),1)]),v("div",null,[_n("礼品券: "),v("span",Ag,un(q.value.integral),1)])]),U(Pn,{link:"",onClick:P[1]||(P[1]=yn=>q.value.uid="")},{default:an(()=>[_n("重置"),U(xn,null,{default:an(()=>[U(Ge)]),_:1})]),_:1})])])):(Q(),gn("div",Ig,[v("div",Cg,[Lg,U(Pn,{type:"primary",link:"",class:"change-user",onClick:P[2]||(P[2]=yn=>G.value.open())},{default:an(()=>[_n("切换用户"),U(xn,null,{default:an(()=>[U(z)]),_:1})]),_:1})])]))]),U(cg,{ref_key:"userListRef",ref:G,onSetUser:k},null,512)]),v("div",Rg,[v("div",Sg,[_n(" 已选购 "),v("span",null,un(S.value.length),1),_n(" 款 ")]),v("div",{class:"nav-item-clear",onClick:Y},[U(xn,null,{default:an(()=>[U(Fr)]),_:1}),_n("清空 (Delete) ")])]),v("div",bg,[S.value.length==0?(Q(),Oe(Wt,{key:0,description:"请点击右侧添加商品"})):(Q(!0),gn(Ot,{key:1},Pt(S.value,(yn,se)=>(Q(),gn("div",{class:"order-item",key:se},[U(Wr,{loading:"lazy",class:"order-item-img",src:yn.image},null,8,["src"]),v("div",Eg,[v("div",Tg,[v("div",Og,un(yn.store_name),1),v("div",{class:"delete",onClick:ot=>dn(yn.id)},"删除",8,Pg)]),v("div",$g,[v("span",null,un(yn.unit_name),1)]),v("div",Fg,[v("div",null,[_n(" ¥"),v("span",null,un(yn.price),1)]),v("div",null,[U(Br,{modelValue:yn.cart_num,"onUpdate:modelValue":ot=>yn.cart_num=ot,min:+yn.batch>0?+yn.batch:1,step:1,"step-strictly":"",onChange:ot=>y(yn)},null,8,["modelValue","onUpdate:modelValue","min","onChange"])])])])]))),128))]),v("div",Wg,[v("div",Bg,[v("div",Ug,[v("div",Mg,[_n(" 合计: "),v("span",null,[_n("¥"),v("span",Dg,un(F.value.toFixed(2)),1)])])])]),v("div",Ng,[U(Pn,{class:"btn",type:"primary",onClick:K,disabled:S.value.length==0},{default:an(()=>[_n(un("立即结账 (F9)"))]),_:1},8,["disabled"])])]),U(Vp,{ref_key:"priceRef",ref:O,onChangeAllPrice:tn},null,512)])}}},Hg=ut(Gg,[["__scopeId","data-v-b729fa0d"]]);var Pr={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 + */Pr.exports;(function(vn,wn){(function(){var s,S="4.17.21",F=200,Z="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",I="Expected a function",G="Invalid `variable` option passed into `_.template`",Y="__lodash_hash_undefined__",dn=500,V="__lodash_placeholder__",X=1,En=2,K=4,y=1,tn=2,O=1,H=2,q=4,k=8,rn=16,on=32,m=64,P=128,ln=256,z=512,xn=30,Pn="...",Ge=800,Fr=16,Wt=1,Wr=2,Br=3,yn=1/0,se=9007199254740991,ot=17976931348623157e292,Bt=NaN,le=4294967295,qs=le-1,ks=le>>>1,Zs=[["ary",P],["bind",O],["bindKey",H],["curry",k],["curryRight",rn],["flip",z],["partial",on],["partialRight",m],["rearg",ln]],He="[object Arguments]",Ut="[object Array]",Ys="[object AsyncFunction]",st="[object Boolean]",lt="[object Date]",Vs="[object DOMException]",Mt="[object Error]",Dt="[object Function]",lu="[object GeneratorFunction]",ee="[object Map]",ft="[object Number]",Xs="[object Null]",he="[object Object]",fu="[object Promise]",Js="[object Proxy]",at="[object RegExp]",te="[object Set]",ct="[object String]",Nt="[object Symbol]",Qs="[object Undefined]",ht="[object WeakMap]",js="[object WeakSet]",_t="[object ArrayBuffer]",ze="[object DataView]",Ur="[object Float32Array]",Mr="[object Float64Array]",Dr="[object Int8Array]",Nr="[object Int16Array]",Gr="[object Int32Array]",Hr="[object Uint8Array]",zr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",qr="[object Uint32Array]",nl=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,tl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,au=/&(?:amp|lt|gt|quot|#39);/g,cu=/[&<>"']/g,rl=RegExp(au.source),il=RegExp(cu.source),ul=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,hu=/<%=([\s\S]+?)%>/g,sl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ll=/^\w*$/,fl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,al=RegExp(kr.source),Zr=/^\s+/,cl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_l=/\{\n\/\* \[wrapped with (.+)\] \*/,dl=/,? & /,pl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gl=/[()=,{}\[\]\/\s]/,vl=/\\(\\)?/g,ml=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_u=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,yl=/^\[object .+?Constructor\]$/,Al=/^0o[0-7]+$/i,Il=/^(?:0|[1-9]\d*)$/,Cl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gt=/($^)/,Ll=/['\n\r\u2028\u2029\\]/g,Ht="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",bl="\\u20d0-\\u20ff",du=Rl+Sl+bl,pu="\\u2700-\\u27bf",gu="a-z\\xdf-\\xf6\\xf8-\\xff",El="\\xac\\xb1\\xd7\\xf7",Tl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ol="\\u2000-\\u206f",Pl=" \\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",vu="A-Z\\xc0-\\xd6\\xd8-\\xde",mu="\\ufe0e\\ufe0f",wu=El+Tl+Ol+Pl,Yr="['’]",$l="["+Ht+"]",xu="["+wu+"]",zt="["+du+"]",yu="\\d+",Fl="["+pu+"]",Au="["+gu+"]",Iu="[^"+Ht+wu+yu+pu+gu+vu+"]",Vr="\\ud83c[\\udffb-\\udfff]",Wl="(?:"+zt+"|"+Vr+")",Cu="[^"+Ht+"]",Xr="(?:\\ud83c[\\udde6-\\uddff]){2}",Jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ke="["+vu+"]",Lu="\\u200d",Ru="(?:"+Au+"|"+Iu+")",Bl="(?:"+Ke+"|"+Iu+")",Su="(?:"+Yr+"(?:d|ll|m|re|s|t|ve))?",bu="(?:"+Yr+"(?:D|LL|M|RE|S|T|VE))?",Eu=Wl+"?",Tu="["+mu+"]?",Ul="(?:"+Lu+"(?:"+[Cu,Xr,Jr].join("|")+")"+Tu+Eu+")*",Ml="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ou=Tu+Eu+Ul,Nl="(?:"+[Fl,Xr,Jr].join("|")+")"+Ou,Gl="(?:"+[Cu+zt+"?",zt,Xr,Jr,$l].join("|")+")",Hl=RegExp(Yr,"g"),zl=RegExp(zt,"g"),Qr=RegExp(Vr+"(?="+Vr+")|"+Gl+Ou,"g"),Kl=RegExp([Ke+"?"+Au+"+"+Su+"(?="+[xu,Ke,"$"].join("|")+")",Bl+"+"+bu+"(?="+[xu,Ke+Ru,"$"].join("|")+")",Ke+"?"+Ru+"+"+Su,Ke+"+"+bu,Dl,Ml,yu,Nl].join("|"),"g"),ql=RegExp("["+Lu+Ht+du+mu+"]"),kl=/[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,cn={};cn[Ur]=cn[Mr]=cn[Dr]=cn[Nr]=cn[Gr]=cn[Hr]=cn[zr]=cn[Kr]=cn[qr]=!0,cn[He]=cn[Ut]=cn[_t]=cn[st]=cn[ze]=cn[lt]=cn[Mt]=cn[Dt]=cn[ee]=cn[ft]=cn[he]=cn[at]=cn[te]=cn[ct]=cn[ht]=!1;var fn={};fn[He]=fn[Ut]=fn[_t]=fn[ze]=fn[st]=fn[lt]=fn[Ur]=fn[Mr]=fn[Dr]=fn[Nr]=fn[Gr]=fn[ee]=fn[ft]=fn[he]=fn[at]=fn[te]=fn[ct]=fn[Nt]=fn[Hr]=fn[zr]=fn[Kr]=fn[qr]=!0,fn[Mt]=fn[Dt]=fn[ht]=!1;var Vl={À:"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"},Xl={"&":"&","<":"<",">":">",'"':""","'":"'"},Jl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ql={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jl=parseFloat,nf=parseInt,Pu=typeof Et=="object"&&Et&&Et.Object===Object&&Et,ef=typeof self=="object"&&self&&self.Object===Object&&self,Sn=Pu||ef||Function("return this")(),jr=wn&&!wn.nodeType&&wn,Pe=jr&&!0&&vn&&!vn.nodeType&&vn,$u=Pe&&Pe.exports===jr,ni=$u&&Pu.process,kn=function(){try{var a=Pe&&Pe.require&&Pe.require("util").types;return a||ni&&ni.binding&&ni.binding("util")}catch{}}(),Fu=kn&&kn.isArrayBuffer,Wu=kn&&kn.isDate,Bu=kn&&kn.isMap,Uu=kn&&kn.isRegExp,Mu=kn&&kn.isSet,Du=kn&&kn.isTypedArray;function Nn(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 tf(a,_,h,x){for(var b=-1,J=a==null?0:a.length;++b-1}function ei(a,_,h){for(var x=-1,b=a==null?0:a.length;++x-1;);return h}function Zu(a,_){for(var h=a.length;h--&&qe(_,a[h],0)>-1;);return h}function hf(a,_){for(var h=a.length,x=0;h--;)a[h]===_&&++x;return x}var _f=ui(Vl),df=ui(Xl);function pf(a){return"\\"+Ql[a]}function gf(a,_){return a==null?s:a[_]}function ke(a){return ql.test(a)}function vf(a){return kl.test(a)}function mf(a){for(var _,h=[];!(_=a.next()).done;)h.push(_.value);return h}function fi(a){var _=-1,h=Array(a.size);return a.forEach(function(x,b){h[++_]=[b,x]}),h}function Yu(a,_){return function(h){return a(_(h))}}function Ce(a,_){for(var h=-1,x=a.length,b=0,J=[];++h-1}function ua(n,e){var t=this.__data__,r=sr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}_e.prototype.clear=ea,_e.prototype.delete=ta,_e.prototype.get=ra,_e.prototype.has=ia,_e.prototype.set=ua;function de(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Xn(n,e,t,r,i,o){var l,f=e&X,c=e&En,d=e&K;if(t&&(l=i?t(n,r,i,o):t(n)),l!==s)return l;if(!pn(n))return n;var p=E(n);if(p){if(l=fc(n),!f)return Bn(n,l)}else{var g=On(n),w=g==Dt||g==lu;if(Te(n))return Oo(n,f);if(g==he||g==He||w&&!i){if(l=c||w?{}:Xo(n),!f)return c?Qa(n,ya(l,n)):Ja(n,oo(l,n))}else{if(!fn[g])return i?n:{};l=ac(n,g,f)}}o||(o=new ie);var A=o.get(n);if(A)return A;o.set(n,l),Ls(n)?n.forEach(function(R){l.add(Xn(R,e,t,R,n,o))}):Is(n)&&n.forEach(function(R,M){l.set(M,Xn(R,e,t,M,n,o))});var L=d?c?Wi:Fi:c?Mn:Rn,W=p?s:L(n);return Zn(W||n,function(R,M){W&&(M=R,R=n[M]),xt(l,M,Xn(R,e,t,M,n,o))}),l}function Aa(n){var e=Rn(n);return function(t){return so(t,n,e)}}function so(n,e,t){var r=t.length;if(n==null)return!r;for(n=sn(n);r--;){var i=t[r],o=e[i],l=n[i];if(l===s&&!(i in n)||!o(l))return!1}return!0}function lo(n,e,t){if(typeof n!="function")throw new Yn(I);return St(function(){n.apply(s,t)},e)}function yt(n,e,t,r){var i=-1,o=Kt,l=!0,f=n.length,c=[],d=e.length;if(!f)return c;t&&(e=hn(e,Gn(t))),r?(o=ei,l=!1):e.length>=F&&(o=dt,l=!1,e=new We(e));n:for(;++ii?0:i+t),r=r===s||r>i?i:$(r),r<0&&(r+=i),r=t>r?0:Ss(r);t0&&t(f)?e>1?bn(f,e-1,t,r,i):Ie(i,f):r||(i[i.length]=f)}return i}var gi=Uo(),co=Uo(!0);function fe(n,e){return n&&gi(n,e,Rn)}function vi(n,e){return n&&co(n,e,Rn)}function fr(n,e){return Ae(e,function(t){return we(n[t])})}function Ue(n,e){e=be(e,n);for(var t=0,r=e.length;n!=null&&te}function La(n,e){return n!=null&&nn.call(n,e)}function Ra(n,e){return n!=null&&e in sn(n)}function Sa(n,e,t){return n>=Tn(e,t)&&n=120&&p.length>=120)?new We(l&&p):s}p=n[0];var g=-1,w=f[0];n:for(;++g-1;)f!==n&&nr.call(f,c,1),nr.call(n,c,1);return n}function Io(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==o){var o=i;me(i)?nr.call(n,i,1):Si(n,i)}}return n}function Ci(n,e){return n+rr(to()*(e-n+1))}function Na(n,e,t,r){for(var i=-1,o=Ln(tr((e-n)/(t||1)),0),l=h(o);o--;)l[r?o:++i]=n,n+=t;return l}function Li(n,e){var t="";if(!n||e<1||e>se)return t;do e%2&&(t+=n),e=rr(e/2),e&&(n+=n);while(e);return t}function B(n,e){return Hi(jo(n,e,Dn),n+"")}function Ga(n){return uo(rt(n))}function Ha(n,e){var t=rt(n);return xr(t,Be(e,0,t.length))}function Ct(n,e,t,r){if(!pn(n))return n;e=be(e,n);for(var i=-1,o=e.length,l=o-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 o=h(i);++r>>1,l=n[o];l!==null&&!zn(l)&&(t?l<=e:l=F){var d=e?null:tc(n);if(d)return kt(d);l=!1,i=dt,c=new We}else c=e?[]:f;n:for(;++r=r?n:Jn(n,e,t)}var To=$f||function(n){return Sn.clearTimeout(n)};function Oo(n,e){if(e)return n.slice();var t=n.length,r=Ju?Ju(t):new n.constructor(t);return n.copy(r),r}function Oi(n){var e=new n.constructor(n.byteLength);return new Qt(e).set(new Qt(n)),e}function Za(n,e){var t=e?Oi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Ya(n){var e=new n.constructor(n.source,_u.exec(n));return e.lastIndex=n.lastIndex,e}function Va(n){return wt?sn(wt.call(n)):{}}function Po(n,e){var t=e?Oi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function $o(n,e){if(n!==e){var t=n!==s,r=n===null,i=n===n,o=zn(n),l=e!==s,f=e===null,c=e===e,d=zn(e);if(!f&&!d&&!o&&n>e||o&&l&&c&&!f&&!d||r&&l&&c||!t&&c||!i)return 1;if(!r&&!o&&!d&&n=f)return c;var d=t[r];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Fo(n,e,t,r){for(var i=-1,o=n.length,l=t.length,f=-1,c=e.length,d=Ln(o-l,0),p=h(c+d),g=!r;++f1?t[i-1]:s,l=i>2?t[2]:s;for(o=n.length>3&&typeof o=="function"?(i--,o):s,l&&Fn(t[0],t[1],l)&&(o=i<3?s:o,i=1),e=sn(e);++r-1?i[o?e[l]:l]:s}}function No(n){return ve(function(e){var t=e.length,r=t,i=Vn.prototype.thru;for(n&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new Yn(I);if(i&&!l&&mr(o)=="wrapper")var l=new Vn([],!0)}for(r=l?r:t;++r1&&N.reverse(),p&&cf))return!1;var d=o.get(n),p=o.get(e);if(d&&p)return d==e&&p==n;var g=-1,w=!0,A=t&tn?new We:s;for(o.set(n,e),o.set(e,n);++g1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(hl,`{ +/* [wrapped with `+e+`] */ +`)}function hc(n){return E(n)||Ne(n)||!!(no&&n&&n[no])}function me(n,e){var t=typeof n;return e=e??se,!!e&&(t=="number"||t!="symbol"&&Il.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Ge)return arguments[0]}else e=0;return n.apply(s,arguments)}}function xr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===s?r:e;++t1?n[e-1]:s;return t=typeof t=="function"?(n.pop(),t):s,cs(n,t)});function hs(n){var e=u(n);return e.__chain__=!0,e}function Ih(n,e){return e(n),n}function yr(n,e){return e(n)}var Ch=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(o){return pi(o,n)};return e>1||this.__actions__.length||!(r instanceof D)||!me(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:yr,args:[i],thisArg:s}),new Vn(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(s),o}))});function Lh(){return hs(this)}function Rh(){return new Vn(this.value(),this.__chain__)}function Sh(){this.__values__===s&&(this.__values__=Rs(this.value()));var n=this.__index__>=this.__values__.length,e=n?s:this.__values__[this.__index__++];return{done:n,value:e}}function bh(){return this}function Eh(n){for(var e,t=this;t instanceof or;){var r=us(t);r.__index__=0,r.__values__=s,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Th(){var n=this.__wrapped__;if(n instanceof D){var e=n;return this.__actions__.length&&(e=new D(this)),e=e.reverse(),e.__actions__.push({func:yr,args:[zi],thisArg:s}),new Vn(e,this.__chain__)}return this.thru(zi)}function Oh(){return bo(this.__wrapped__,this.__actions__)}var Ph=_r(function(n,e,t){nn.call(n,t)?++n[t]:pe(n,t,1)});function $h(n,e,t){var r=E(n)?Nu:Ia;return t&&Fn(n,e,t)&&(e=s),r(n,C(e,3))}function Fh(n,e){var t=E(n)?Ae:ao;return t(n,C(e,3))}var Wh=Do(os),Bh=Do(ss);function Uh(n,e){return bn(Ar(n,e),1)}function Mh(n,e){return bn(Ar(n,e),yn)}function Dh(n,e,t){return t=t===s?1:$(t),bn(Ar(n,e),t)}function _s(n,e){var t=E(n)?Zn:Re;return t(n,C(e,3))}function ds(n,e){var t=E(n)?rf:fo;return t(n,C(e,3))}var Nh=_r(function(n,e,t){nn.call(n,t)?n[t].push(e):pe(n,t,[e])});function Gh(n,e,t,r){n=Un(n)?n:rt(n),t=t&&!r?$(t):0;var i=n.length;return t<0&&(t=Ln(i+t,0)),Sr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&qe(n,e,t)>-1}var Hh=B(function(n,e,t){var r=-1,i=typeof e=="function",o=Un(n)?h(n.length):[];return Re(n,function(l){o[++r]=i?Nn(e,l,t):At(l,e,t)}),o}),zh=_r(function(n,e,t){pe(n,t,e)});function Ar(n,e){var t=E(n)?hn:vo;return t(n,C(e,3))}function Kh(n,e,t,r){return n==null?[]:(E(e)||(e=e==null?[]:[e]),t=r?s:t,E(t)||(t=t==null?[]:[t]),yo(n,e,t))}var qh=_r(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function kh(n,e,t){var r=E(n)?ti:Ku,i=arguments.length<3;return r(n,C(e,4),t,i,Re)}function Zh(n,e,t){var r=E(n)?uf:Ku,i=arguments.length<3;return r(n,C(e,4),t,i,fo)}function Yh(n,e){var t=E(n)?Ae:ao;return t(n,Lr(C(e,3)))}function Vh(n){var e=E(n)?uo:Ga;return e(n)}function Xh(n,e,t){(t?Fn(n,e,t):e===s)?e=1:e=$(e);var r=E(n)?ma:Ha;return r(n,e)}function Jh(n){var e=E(n)?wa:Ka;return e(n)}function Qh(n){if(n==null)return 0;if(Un(n))return Sr(n)?Ze(n):n.length;var e=On(n);return e==ee||e==te?n.size:yi(n).length}function jh(n,e,t){var r=E(n)?ri:qa;return t&&Fn(n,e,t)&&(e=s),r(n,C(e,3))}var n_=B(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Fn(n,e[0],e[1])?e=[]:t>2&&Fn(e[0],e[1],e[2])&&(e=[e[0]]),yo(n,bn(e,1),[])}),Ir=Ff||function(){return Sn.Date.now()};function e_(n,e){if(typeof e!="function")throw new Yn(I);return n=$(n),function(){if(--n<1)return e.apply(this,arguments)}}function ps(n,e,t){return e=t?s:e,e=n&&e==null?n.length:e,ge(n,P,s,s,s,s,e)}function gs(n,e){var t;if(typeof e!="function")throw new Yn(I);return n=$(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=s),t}}var qi=B(function(n,e,t){var r=O;if(t.length){var i=Ce(t,et(qi));r|=on}return ge(n,r,e,t,i)}),vs=B(function(n,e,t){var r=O|H;if(t.length){var i=Ce(t,et(vs));r|=on}return ge(e,r,n,t,i)});function ms(n,e,t){e=t?s:e;var r=ge(n,k,s,s,s,s,s,e);return r.placeholder=ms.placeholder,r}function ws(n,e,t){e=t?s:e;var r=ge(n,rn,s,s,s,s,s,e);return r.placeholder=ws.placeholder,r}function xs(n,e,t){var r,i,o,l,f,c,d=0,p=!1,g=!1,w=!0;if(typeof n!="function")throw new Yn(I);e=jn(e)||0,pn(t)&&(p=!!t.leading,g="maxWait"in t,o=g?Ln(jn(t.maxWait)||0,e):o,w="trailing"in t?!!t.trailing:w);function A(In){var oe=r,ye=i;return r=i=s,d=In,l=n.apply(ye,oe),l}function L(In){return d=In,f=St(M,e),p?A(In):l}function W(In){var oe=In-c,ye=In-d,Ds=e-oe;return g?Tn(Ds,o-ye):Ds}function R(In){var oe=In-c,ye=In-d;return c===s||oe>=e||oe<0||g&&ye>=o}function M(){var In=Ir();if(R(In))return N(In);f=St(M,W(In))}function N(In){return f=s,w&&r?A(In):(r=i=s,l)}function Kn(){f!==s&&To(f),d=0,r=c=i=f=s}function Wn(){return f===s?l:N(Ir())}function qn(){var In=Ir(),oe=R(In);if(r=arguments,i=this,c=In,oe){if(f===s)return L(c);if(g)return To(f),f=St(M,e),A(c)}return f===s&&(f=St(M,e)),l}return qn.cancel=Kn,qn.flush=Wn,qn}var t_=B(function(n,e){return lo(n,1,e)}),r_=B(function(n,e,t){return lo(n,jn(e)||0,t)});function i_(n){return ge(n,z)}function Cr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Yn(I);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=n.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(Cr.Cache||de),t}Cr.Cache=de;function Lr(n){if(typeof n!="function")throw new Yn(I);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 u_(n){return gs(2,n)}var o_=ka(function(n,e){e=e.length==1&&E(e[0])?hn(e[0],Gn(C())):hn(bn(e,1),Gn(C()));var t=e.length;return B(function(r){for(var i=-1,o=Tn(r.length,t);++i=e}),Ne=_o(function(){return arguments}())?_o:function(n){return mn(n)&&nn.call(n,"callee")&&!ju.call(n,"callee")},E=h.isArray,y_=Fu?Gn(Fu):Ea;function Un(n){return n!=null&&Rr(n.length)&&!we(n)}function An(n){return mn(n)&&Un(n)}function A_(n){return n===!0||n===!1||mn(n)&&$n(n)==st}var Te=Bf||ru,I_=Wu?Gn(Wu):Ta;function C_(n){return mn(n)&&n.nodeType===1&&!bt(n)}function L_(n){if(n==null)return!0;if(Un(n)&&(E(n)||typeof n=="string"||typeof n.splice=="function"||Te(n)||tt(n)||Ne(n)))return!n.length;var e=On(n);if(e==ee||e==te)return!n.size;if(Rt(n))return!yi(n).length;for(var t in n)if(nn.call(n,t))return!1;return!0}function R_(n,e){return It(n,e)}function S_(n,e,t){t=typeof t=="function"?t:s;var r=t?t(n,e):s;return r===s?It(n,e,s,t):!!r}function Zi(n){if(!mn(n))return!1;var e=$n(n);return e==Mt||e==Vs||typeof n.message=="string"&&typeof n.name=="string"&&!bt(n)}function b_(n){return typeof n=="number"&&eo(n)}function we(n){if(!pn(n))return!1;var e=$n(n);return e==Dt||e==lu||e==Ys||e==Js}function As(n){return typeof n=="number"&&n==$(n)}function Rr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=se}function pn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function mn(n){return n!=null&&typeof n=="object"}var Is=Bu?Gn(Bu):Pa;function E_(n,e){return n===e||xi(n,e,Ui(e))}function T_(n,e,t){return t=typeof t=="function"?t:s,xi(n,e,Ui(e),t)}function O_(n){return Cs(n)&&n!=+n}function P_(n){if(pc(n))throw new b(Z);return po(n)}function $_(n){return n===null}function F_(n){return n==null}function Cs(n){return typeof n=="number"||mn(n)&&$n(n)==ft}function bt(n){if(!mn(n)||$n(n)!=he)return!1;var e=jt(n);if(e===null)return!0;var t=nn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Vt.call(t)==Tf}var Yi=Uu?Gn(Uu):$a;function W_(n){return As(n)&&n>=-se&&n<=se}var Ls=Mu?Gn(Mu):Fa;function Sr(n){return typeof n=="string"||!E(n)&&mn(n)&&$n(n)==ct}function zn(n){return typeof n=="symbol"||mn(n)&&$n(n)==Nt}var tt=Du?Gn(Du):Wa;function B_(n){return n===s}function U_(n){return mn(n)&&On(n)==ht}function M_(n){return mn(n)&&$n(n)==js}var D_=vr(Ai),N_=vr(function(n,e){return n<=e});function Rs(n){if(!n)return[];if(Un(n))return Sr(n)?re(n):Bn(n);if(pt&&n[pt])return mf(n[pt]());var e=On(n),t=e==ee?fi:e==te?kt:rt;return t(n)}function xe(n){if(!n)return n===0?n:0;if(n=jn(n),n===yn||n===-yn){var e=n<0?-1:1;return e*ot}return n===n?n:0}function $(n){var e=xe(n),t=e%1;return e===e?t?e-t:e:0}function Ss(n){return n?Be($(n),0,le):0}function jn(n){if(typeof n=="number")return n;if(zn(n))return Bt;if(pn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=pn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=qu(n);var t=xl.test(n);return t||Al.test(n)?nf(n.slice(2),t?2:8):wl.test(n)?Bt:+n}function bs(n){return ae(n,Mn(n))}function G_(n){return n?Be($(n),-se,se):n===0?n:0}function j(n){return n==null?"":Hn(n)}var H_=je(function(n,e){if(Rt(e)||Un(e)){ae(e,Rn(e),n);return}for(var t in e)nn.call(e,t)&&xt(n,t,e[t])}),Es=je(function(n,e){ae(e,Mn(e),n)}),br=je(function(n,e,t,r){ae(e,Mn(e),n,r)}),z_=je(function(n,e,t,r){ae(e,Rn(e),n,r)}),K_=ve(pi);function q_(n,e){var t=Qe(n);return e==null?t:oo(t,e)}var k_=B(function(n,e){n=sn(n);var t=-1,r=e.length,i=r>2?e[2]:s;for(i&&Fn(e[0],e[1],i)&&(r=1);++t1),o}),ae(n,Wi(n),t),r&&(t=Xn(t,X|En|K,rc));for(var i=e.length;i--;)Si(t,e[i]);return t});function ad(n,e){return Os(n,Lr(C(e)))}var cd=ve(function(n,e){return n==null?{}:Ma(n,e)});function Os(n,e){if(n==null)return{};var t=hn(Wi(n),function(r){return[r]});return e=C(e),Ao(n,t,function(r,i){return e(r,i[0])})}function hd(n,e,t){e=be(e,n);var r=-1,i=e.length;for(i||(i=1,n=s);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=to();return Tn(n+i*(e-n+jl("1e-"+((i+"").length-1))),e)}return Ci(n,e)}var Id=nt(function(n,e,t){return e=e.toLowerCase(),n+(t?Fs(e):e)});function Fs(n){return Ji(j(n).toLowerCase())}function Ws(n){return n=j(n),n&&n.replace(Cl,_f).replace(zl,"")}function Cd(n,e,t){n=j(n),e=Hn(e);var r=n.length;t=t===s?r:Be($(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function Ld(n){return n=j(n),n&&il.test(n)?n.replace(cu,df):n}function Rd(n){return n=j(n),n&&al.test(n)?n.replace(kr,"\\$&"):n}var Sd=nt(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),bd=nt(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Ed=Mo("toLowerCase");function Td(n,e,t){n=j(n),e=$(e);var r=e?Ze(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return gr(rr(i),t)+n+gr(tr(i),t)}function Od(n,e,t){n=j(n),e=$(e);var r=e?Ze(n):0;return e&&r>>0,t?(n=j(n),n&&(typeof e=="string"||e!=null&&!Yi(e))&&(e=Hn(e),!e&&ke(n))?Ee(re(n),0,t):n.split(e,t)):[]}var Md=nt(function(n,e,t){return n+(t?" ":"")+Ji(e)});function Dd(n,e,t){return n=j(n),t=t==null?0:Be($(t),0,n.length),e=Hn(e),n.slice(t,t+e.length)==e}function Nd(n,e,t){var r=u.templateSettings;t&&Fn(n,e,t)&&(e=s),n=j(n),e=br({},e,r,qo);var i=br({},e.imports,r.imports,qo),o=Rn(i),l=li(i,o),f,c,d=0,p=e.interpolate||Gt,g="__p += '",w=ai((e.escape||Gt).source+"|"+p.source+"|"+(p===hu?ml:Gt).source+"|"+(e.evaluate||Gt).source+"|$","g"),A="//# sourceURL="+(nn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Yl+"]")+` +`;n.replace(w,function(R,M,N,Kn,Wn,qn){return N||(N=Kn),g+=n.slice(d,qn).replace(Ll,pf),M&&(f=!0,g+=`' + +__e(`+M+`) + +'`),Wn&&(c=!0,g+=`'; +`+Wn+`; +__p += '`),N&&(g+=`' + +((__t = (`+N+`)) == null ? '' : __t) + +'`),d=qn+R.length,R}),g+=`'; +`;var L=nn.call(e,"variable")&&e.variable;if(!L)g=`with (obj) { +`+g+` +} +`;else if(gl.test(L))throw new b(G);g=(c?g.replace(nl,""):g).replace(el,"$1").replace(tl,"$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 W=Us(function(){return J(o,A+"return "+g).apply(s,l)});if(W.source=g,Zi(W))throw W;return W}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===s))return qu(n);if(!n||!(e=Hn(e)))return n;var r=re(n),i=re(e),o=ku(r,i),l=Zu(r,i)+1;return Ee(r,o,l).join("")}function Kd(n,e,t){if(n=j(n),n&&(t||e===s))return n.slice(0,Vu(n)+1);if(!n||!(e=Hn(e)))return n;var r=re(n),i=Zu(r,re(e))+1;return Ee(r,0,i).join("")}function qd(n,e,t){if(n=j(n),n&&(t||e===s))return n.replace(Zr,"");if(!n||!(e=Hn(e)))return n;var r=re(n),i=ku(r,re(e));return Ee(r,i).join("")}function kd(n,e){var t=xn,r=Pn;if(pn(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=j(n);var o=n.length;if(ke(n)){var l=re(n);o=l.length}if(t>=o)return n;var f=t-Ze(r);if(f<1)return r;var c=l?Ee(l,0,f).join(""):n.slice(0,f);if(i===s)return c+r;if(l&&(f+=c.length-f),Yi(i)){if(n.slice(f).search(i)){var d,p=c;for(i.global||(i=ai(i.source,j(_u.exec(i))+"g")),i.lastIndex=0;d=i.exec(p);)var g=d.index;c=c.slice(0,g===s?f:g)}}else if(n.indexOf(Hn(i),f)!=f){var w=c.lastIndexOf(i);w>-1&&(c=c.slice(0,w))}return c+r}function Zd(n){return n=j(n),n&&rl.test(n)?n.replace(au,Af):n}var Yd=nt(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Ji=Mo("toUpperCase");function Bs(n,e,t){return n=j(n),e=t?s:e,e===s?vf(n)?Lf(n):lf(n):n.match(e)||[]}var Us=B(function(n,e){try{return Nn(n,s,e)}catch(t){return Zi(t)?t:new b(t)}}),Vd=ve(function(n,e){return Zn(e,function(t){t=ce(t),pe(n,t,qi(n[t],n))}),n});function Xd(n){var e=n==null?0:n.length,t=C();return n=e?hn(n,function(r){if(typeof r[1]!="function")throw new Yn(I);return[t(r[0]),r[1]]}):[],B(function(r){for(var i=-1;++ise)return[];var t=le,r=Tn(n,le);e=C(e),n-=le;for(var i=si(r,e);++t0||e<0)?new D(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==s&&(e=$(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},D.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},D.prototype.toArray=function(){return this.take(le)},fe(D.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],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,c=l instanceof D,d=f[0],p=c||E(l),g=function(M){var N=i.apply(u,Ie([M],f));return r&&w?N[0]:N};p&&t&&typeof d=="function"&&d.length!=1&&(c=p=!1);var w=this.__chain__,A=!!this.__actions__.length,L=o&&!w,W=c&&!A;if(!o&&p){l=W?l:new D(this);var R=n.apply(l,f);return R.__actions__.push({func:yr,args:[g],thisArg:s}),new Vn(R,w)}return L&&W?n.apply(this,f):(R=this.thru(g),L?r?R.value()[0]:R.value():R)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Zt[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 o=this.value();return e.apply(E(o)?o:[],i)}return this[t](function(l){return e.apply(E(l)?l:[],i)})}}),fe(D.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";nn.call(Je,r)||(Je[r]=[]),Je[r].push({name:e,func:t})}}),Je[dr(s,H).name]=[{name:"wrapper",func:s}],D.prototype.clone=Zf,D.prototype.reverse=Yf,D.prototype.value=Vf,u.prototype.at=Ch,u.prototype.chain=Lh,u.prototype.commit=Rh,u.prototype.next=Sh,u.prototype.plant=Eh,u.prototype.reverse=Th,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Oh,u.prototype.first=u.prototype.head,pt&&(u.prototype[pt]=bh),u},Ye=Rf();Pe?((Pe.exports=Ye)._=Ye,jr._=Ye):Sn._=Ye}).call(Et)})(Pr,Pr.exports);var zg=Pr.exports;const Kg=Up(zg),su=vn=>(zs("data-v-2a80ef6f"),vn=vn(),Ks(),vn),qg={class:"my-order"},kg=su(()=>v("div",{class:"nav-item-label"},"搜索 (Shift)",-1)),Zg={class:"nav-item-input"},Yg={class:"shop-list","infinite-scroll-distance":1e3,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},Vg=["onClick"],Xg={class:"shop-name"},Jg={class:"shop-price"},Qg={class:"unit-name"},jg={key:0,class:"no-stock"},nv=su(()=>v("div",null,[v("span",null,"暂无"),v("span",null,"库存")],-1)),ev=[nv],tv={key:1,class:"no-stock"},rv=su(()=>v("div",null,[v("span",null,"平台"),v("span",null,"关闭")],-1)),iv=[rv],uv={key:1,class:"no-data"},ov={__name:"shop",props:{storeList:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1}},emits:["getStoreList","changeItem","loadMore"],setup(vn,{expose:wn,emit:s}){const S=T(null),F=s,Z=T(""),I=()=>{F("loadMore",{store_name_code:Z.value})},G=y=>{if(y.is_used==0)return Or.error("该商品已被平台关闭");if(y.stock==0)return Or.warning("该商品无库存");F("changeItem",y)},Y=Kg.throttle(()=>{let y={store_name_code:Z.value};F("getStoreList",y,!0)},300);wn({name:Z,inputBlur:()=>{var y;(y=S.value)==null||y.blur()}});const V=T(!1),X=()=>{V.value=!0},En=()=>{V.value=!1},K=()=>{var y;(y=S.value)==null||y.focus()};return $t(()=>{uu(()=>{var y;(y=S.value)==null||y.focus(),X()}),ne.on("shift",K)}),Ft(()=>{ne.off("shift",K)}),(y,tn)=>{const O=en("el-input"),H=en("Search"),q=en("el-icon"),k=en("el-button"),rn=en("el-image"),on=en("el-space"),m=en("el-empty"),P=Tt("loading"),ln=Tt("infinite-scroll");return Q(),gn("div",qg,[v("div",{class:Tr(["header-nav",{"input-focus":V.value}])},[kg,v("div",Zg,[U(O,{modelValue:Z.value,"onUpdate:modelValue":tn[0]||(tn[0]=z=>Z.value=z),placeholder:" 搜索商品名称/条形码或点击聚焦扫码, 按回车(Enter)搜索",clearable:"",ref_key:"codeRef",ref:S,onFocus:X,onBlur:En,onKeyup:Hs(Er(Y),["enter"]),onClear:Er(Y)},null,8,["modelValue","onKeyup","onClear"])]),v("div",{class:"nav-item-btn",onClick:tn[1]||(tn[1]=(...z)=>Er(Y)&&Er(Y)(...z))},[U(k,{class:"btn",type:"primary"},{default:an(()=>[U(q,null,{default:an(()=>[U(H)]),_:1})]),_:1})])],2),ou((Q(),gn("div",Yg,[vn.storeList.length?(Q(),Oe(on,{key:0,wrap:"",size:14},{default:an(()=>[(Q(!0),gn(Ot,null,Pt(vn.storeList,(z,xn)=>(Q(),gn("div",{class:"shop-item",key:xn,onClick:Pn=>G(z)},[U(rn,{loading:"lazy",src:z.image},null,8,["src"]),v("div",Xg,un(z.store_name),1),v("div",Jg,[_n(" ¥"),v("span",null,un(z.price),1),v("span",Qg,"/"+un(z.unit_name),1)]),z.stock==0?(Q(),gn("div",jg,ev)):it("",!0),z.is_used==0?(Q(),gn("div",tv,iv)):it("",!0)],8,Vg))),128))]),_:1})):it("",!0),vn.storeList.length?it("",!0):(Q(),gn("div",uv,[U(m,{"image-size":200,description:"没有找到对应商品"})]))])),[[P,vn.loading],[ln,I]])])}}},sv=ut(ov,[["__scopeId","data-v-2a80ef6f"]]),lv={class:"shop"},fv={class:"shop-info"},av={class:"shop-info-left"},cv={class:"shop-info-right"},hv={class:"shop-info-right-top"},_v={class:"shop-info-right-price"},dv={style:{"font-size":"1rem",color:"#777"}},pv={class:"shop-sku"},gv={class:"title"},vv={class:"sku"},mv={class:"dialog-footer"},wv={__name:"pupop",emits:["changeItem"],setup(vn,{expose:wn,emit:s}){const S=T(!1),F=T(null),Z=K=>{S.value=K},I=T({}),G=T(!1),Y=T("add"),dn=(K,y="add")=>{Y.value=y,I.value=JSON.parse(JSON.stringify(K))},V=s,X=()=>{I.value.cart_num||(I.value.cart_num=I.value.batch>0?I.value.batch:1),V("changeItem",I.value),S.value=!1};wn({show:Z,setForm:dn});const En=()=>{S.value&&X()};return $t(()=>{ne.on("enter",En)}),Ft(()=>{ne.off("enter",En)}),(K,y)=>{const tn=en("el-image"),O=en("el-input-number"),H=en("el-button"),q=en("el-dialog"),k=Tt("loading");return Q(),Oe(q,{modelValue:S.value,"onUpdate:modelValue":y[1]||(y[1]=rn=>S.value=rn),title:"购买数量",width:"650",onOpened:y[2]||(y[2]=rn=>F.value.focus())},Mp({default:an(()=>[ou((Q(),gn("div",lv,[v("div",fv,[v("div",av,[U(tn,{loading:"lazy",src:I.value.image},null,8,["src"])]),v("div",cv,[v("div",hv,un(I.value.store_name),1),v("div",_v,[_n(" ¥"),v("span",null,un(I.value.price),1),v("span",dv," / "+un(I.value.unit_name),1)])])]),v("div",pv,[v("div",gv,"购买数量 ( "+un(I.value.unit_name)+" )",1),v("div",vv,[U(O,{ref_key:"inputRef",ref:F,modelValue:I.value.cart_num,"onUpdate:modelValue":y[0]||(y[0]=rn=>I.value.cart_num=rn),placeholder:`请输入数量(默认为${+I.value.batch>0?I.value.batch:"1"})`,min:+I.value.batch>0?+I.value.batch:1,"step-strictly":"",step:1,style:{width:"20rem"},size:"large"},null,8,["modelValue","placeholder","min"])])])])),[[k,G.value]])]),_:2},[Y.value!="add"&&I.value.attr&&I.value.attr.length==1?void 0:{name:"footer",fn:an(()=>[v("div",mv,[U(H,{class:"ok-btn",type:"primary",onClick:X},{default:an(()=>[_n(" 确定 (Enter) ")]),_:1})])]),key:"0"}]),1032,["modelValue"])}}},xv=ut(wv,[["__scopeId","data-v-05cb810b"]]),yv=["onClick","onMousemove"],Av=["onMousemove"],Iv={class:"title"},Cv={class:"list"},Lv=["onClick"],Rv={__name:"classify",emits:["getStoreList"],setup(vn,{emit:wn}){const s=wn,S=T([]),F=T([]),Z=T([]),I=T(-1),G=T(-1),Y=T(-1),dn=T(-1),V=T(!1),X=$r();(()=>{iu({pid:0,page_no:1,page_size:30,level:1,store_id:X.userInfo.store_id}).then(O=>{S.value=O.data.lists,I.value=-1})})();const K=O=>{iu({pid:O,page_no:1,page_size:30,level:2,store_id:X.userInfo.store_id}).then(H=>{F.value=H.data.lists})},y=O=>{iu({pid:O,page_no:1,page_size:30,level:3,store_id:X.userInfo.store_id}).then(H=>{Z.value=H.data.lists})},tn=(O=-1,H=1)=>{dn.value=O,V.value=!0;let q="",k="";H==1?(I.value=O,G.value=-1,Y.value=-1,O!=-1&&(k=S.value[O].id),K(k)):H==2&&(G.value=O,Y.value=-1,O!=-1&&(k=F.value[O].id),y(k)),s("getStoreList",{cate_id:q,class_all:k},!0)};return(O,H)=>{const q=en("el-popover");return Q(),gn("div",{class:"classify",onMouseout:H[2]||(H[2]=k=>V.value?V.value=!1:V.value=!0)},[v("div",{class:Tr(["itemP",{"itemP-active":I.value==-1}]),onClick:H[0]||(H[0]=k=>tn(-1))},un("全部"),2),(Q(!0),gn(Ot,null,Pt(S.value,(k,rn)=>(Q(),Oe(q,{placement:"left",width:"20rem",trigger:"click",key:rn,visible:rn==I.value&&dn.value==rn},{reference:an(()=>[v("div",{class:Tr(["itemP",{"itemP-active":rn==I.value}]),onClick:on=>tn(rn),onMousemove:on=>dn.value=rn},un(k.name),43,yv)]),default:an(()=>[v("div",{class:"active-card",onMouseout:H[1]||(H[1]=on=>dn.value=-1),onMousemove:on=>dn.value=rn},[v("div",Iv,un(k.name),1),v("div",Cv,[(Q(!0),gn(Ot,null,Pt(F.value,(on,m)=>(Q(),gn("div",{class:Tr({"list-active":m==G.value}),link:"",type:"primary",key:on.id,onClick:P=>tn(m,2)},un(on.name),11,Lv))),128))])],40,Av)]),_:2},1032,["visible"]))),128))],32)}}},Sv=ut(Rv,[["__scopeId","data-v-00ca5f82"]]),bv={class:"my-card"},Mv={__name:"index",setup(vn){const wn=T(null),s=T(null),S=T(null),F=T(null),Z=T([]),I=$r(),G=Dp(),Y=T({page_no:1,page_size:30}),dn=T(!1),V=(m={},P=!1)=>{var ln;Y.value={...Y.value,...m},P&&(Z.value=[],Y.value.page_no=1,X.value=!1),dn.value=!0,Gp({...Y.value,store_id:(ln=I.userInfo)==null?void 0:ln.store_id}).then(z=>{var xn,Pn;dn.value=!1,((Pn=(xn=z.data)==null?void 0:xn.lists)==null?void 0:Pn.length){X.value||V(m)};function K(m){return/^\d+$/.test(m)}const y=(m,P="")=>{console.log(m,P);let ln={product_id:m.product_id,cart_num:m.cart_num};Gs(ln).then(z=>{s.value.getList()})},tn=(m,P)=>{wn.value.setForm(m,"add"),wn.value.show(!0)},O=m=>{wn.value.setForm(m,"edit"),wn.value.show(!0)},H=T({}),q=()=>{var ln,z;let m=s.value.list.map(xn=>xn.id),P={cart_id:m,uid:((z=(ln=s.value)==null?void 0:ln.userInfo)==null?void 0:z.uid)||""};s.value.discounts>0&&(P.deduction_price=s.value.discounts.toFixed(2),P.pay_type="micropay"),Bp(P).then(xn=>{var Pn,Ge;H.value=xn.data.order,F.value.setForm({data:xn.data.order,cart_id:m,uid:((Ge=(Pn=s.value)==null?void 0:Pn.userInfo)==null?void 0:Ge.uid)||""})})},k=()=>{q(),F.value.drawer=!0},rn=(m=null)=>{setTimeout(()=>{s.value.getList()})},on=()=>{G.name=="saleHome"&&(!F.value.drawer&&s.value.list.length>0?k():F.value.beforeClose())};return $t(()=>{V(),ne.on("F9",on)}),Ft(()=>{ne.off("F9",on)}),(m,P)=>(Q(),gn("div",bv,[U(Hg,{ref_key:"orderRef",ref:s,onGoPay:k,onEditPupop:O},null,512),U(Ns),U(sv,{ref_key:"shopRef",ref:S,style:{flex:"1"},storeList:Z.value,loading:dn.value,onGetStoreList:V,onChangeItem:tn,onLoadMore:En},null,8,["storeList","loading"]),U(xv,{ref_key:"pupopRef",ref:wn,onChangeItem:y},null,512),U(Ns),U(Sv,{ref:"classifyRef",onGetStoreList:V},null,512),U(Hp,{ref_key:"payRef",ref:F,onPaySuccess:rn},null,512)]))}};export{Mv as default}; diff --git a/dist/assets/index-DtEKC3OW.css b/dist/assets/index-DWiJduKq.css similarity index 81% rename from dist/assets/index-DtEKC3OW.css rename to dist/assets/index-DWiJduKq.css index 1068c76..eda6646 100644 --- a/dist/assets/index-DtEKC3OW.css +++ b/dist/assets/index-DWiJduKq.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-33b4f26e]{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-33b4f26e]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-33b4f26e]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-33b4f26e]{font-weight:700}.check-user-list .header-input[data-v-33b4f26e]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-33b4f26e]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap}.check-user-list .order-lists .item[data-v-33b4f26e]{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-33b4f26e]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-33b4f26e]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-33b4f26e]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-33b4f26e]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-33b4f26e]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-33b4f26e]{flex:1}.check-user-list .order-lists .item .red[data-v-33b4f26e]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-33b4f26e]{background-color:#efefef}.check-user-list .load-end[data-v-33b4f26e]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-9779d340]{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-9779d340]{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-9779d340]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-9779d340]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-9779d340]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-9779d340]{font-size:1rem}.my-order .header-nav[data-v-9779d340]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-9779d340]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-9779d340]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-9779d340]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-9779d340]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-9779d340]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-9779d340]{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-9779d340]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-9779d340]{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-9779d340]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-9779d340]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-9779d340]{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-9779d340]{height:2.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-9779d340]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-9779d340]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-9779d340]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-9779d340]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-9779d340]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-9779d340]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-2a80ef6f]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-2a80ef6f]{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-2a80ef6f]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-2a80ef6f]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-2a80ef6f]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-2a80ef6f] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-2a80ef6f]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-2a80ef6f]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-2a80ef6f]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-2a80ef6f]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]{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-2a80ef6f]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-2a80ef6f]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-2a80ef6f]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-2a80ef6f]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-2a80ef6f]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-2a80ef6f],.my-order .shop-list .shop-item:hover .unit-name[data-v-2a80ef6f]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-2a80ef6f]{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-2a80ef6f]{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-05cb810b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-05cb810b]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-05cb810b]{display:flex}.shop .shop-info .shop-info-left[data-v-05cb810b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-05cb810b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-05cb810b]{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-05cb810b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-05cb810b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-05cb810b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-05cb810b]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-00ca5f82]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-00ca5f82]{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-00ca5f82]{background-color:#1890ff;color:#fff}.active-card .title[data-v-00ca5f82]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-00ca5f82]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-00ca5f82]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-00ca5f82]{color:#1890ff}[data-v-00ca5f82]::-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-33b4f26e]{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-33b4f26e]{display:flex;justify-content:space-between;padding:1rem}.check-user-list .header-nav span[data-v-33b4f26e]{color:#ff4a00}.check-user-list .header-nav .nav-item[data-v-33b4f26e]{font-weight:700}.check-user-list .header-input[data-v-33b4f26e]{padding:1rem;padding-top:0;border-bottom:.0625rem solid #eee}.check-user-list .order-lists[data-v-33b4f26e]{flex:1;overflow-y:auto;display:flex;flex-wrap:wrap}.check-user-list .order-lists .item[data-v-33b4f26e]{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-33b4f26e]{height:4rem;width:4rem;border-radius:50%;margin-right:1rem;flex-shrink:0}.check-user-list .order-lists .item .flex-between[data-v-33b4f26e]{display:flex;justify-content:space-between;align-items:center}.check-user-list .order-lists .item .flex[data-v-33b4f26e]{display:flex;flex-wrap:wrap}.check-user-list .order-lists .item .bold[data-v-33b4f26e]{font-weight:700}.check-user-list .order-lists .item .r-1[data-v-33b4f26e]{margin-right:1rem}.check-user-list .order-lists .item .bottom>div[data-v-33b4f26e]{flex:1}.check-user-list .order-lists .item .red[data-v-33b4f26e]{color:#ff4a00}.check-user-list .order-lists .item-active[data-v-33b4f26e]{background-color:#efefef}.check-user-list .load-end[data-v-33b4f26e]{text-align:center;padding:1rem;color:#333;font-size:.8rem}.my-order[data-v-b729fa0d]{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-b729fa0d]{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-b729fa0d]{width:3rem;height:3rem;flex-shrink:0}.my-order .user-nav .user-info .info[data-v-b729fa0d]{flex:1;margin-left:1rem;color:#666}.my-order .user-nav .user-info .info .flex-bewteen[data-v-b729fa0d]{display:flex;justify-content:space-between}.my-order .user-nav .user-info .info .change-user[data-v-b729fa0d]{font-size:1rem}.my-order .header-nav[data-v-b729fa0d]{display:flex;justify-content:space-between;padding:1rem;height:1.5rem;border-bottom:.0625rem solid #eee}.my-order .header-nav span[data-v-b729fa0d]{color:#ff4a00}.my-order .header-nav .nav-item-clear[data-v-b729fa0d]{display:flex;align-items:center;font-size:.8rem;cursor:pointer}.my-order .order-list[data-v-b729fa0d]{flex:1;overflow-y:auto;padding-bottom:10rem}.my-order .order-list .order-item[data-v-b729fa0d]{display:flex;padding:1rem;border-bottom:.0625rem solid #eee}.my-order .order-list .order-item .order-item-img[data-v-b729fa0d]{width:5rem;height:5rem;border-radius:.5rem}.my-order .order-list .order-item .order-item-info[data-v-b729fa0d]{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-b729fa0d]{display:flex;align-items:center;justify-content:space-between}.my-order .order-list .order-item .order-item-info .order-item-title .title[data-v-b729fa0d]{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-b729fa0d]{color:#1890ff;cursor:pointer}.my-order .order-list .order-item .order-item-info .order-item-sku[data-v-b729fa0d]{cursor:pointer;font-size:.8rem;color:#999}.my-order .order-footer[data-v-b729fa0d]{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-b729fa0d]{height:2.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-b729fa0d]{display:flex;align-items:center}.my-order .order-footer .order-total .price .total-item[data-v-b729fa0d]{padding-right:1.5rem}.my-order .order-footer .order-total .price .total-item span[data-v-b729fa0d]{color:#f5222d}.my-order .order-footer .order-total .update-price .btn[data-v-b729fa0d]{border-radius:3rem}.my-order .order-footer .order-btn[data-v-b729fa0d]{height:3.2rem;padding:1rem 1.5rem}.my-order .order-footer .order-btn .btn[data-v-b729fa0d]{width:100%;height:100%;font-size:1.2rem;border-radius:3rem}.my-order[data-v-2a80ef6f]{height:100%;box-sizing:border-box;position:relative;overflow:hidden;display:flex;flex-direction:column}.my-order .header-nav[data-v-2a80ef6f]{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-2a80ef6f]{width:7rem;height:3rem;box-sizing:border-box;text-align:center;line-height:3rem}.my-order .header-nav .nav-item-input[data-v-2a80ef6f]{flex:1}.my-order .header-nav .nav-item-input .el-input[data-v-2a80ef6f]{width:100%;height:100%}.my-order .header-nav .nav-item-input[data-v-2a80ef6f] .el-input__wrapper{border:none!important;box-shadow:none!important;text-align:center}.my-order .header-nav .nav-item-btn[data-v-2a80ef6f]{width:5rem}.my-order .header-nav .nav-item-btn .btn[data-v-2a80ef6f]{width:100%;height:100%;border-radius:0;font-size:1.6rem}.my-order .input-focus[data-v-2a80ef6f]{border:.0625rem solid #1890ff}.my-order .shop-list[data-v-2a80ef6f]{flex:1;width:auto;overflow-y:auto;box-sizing:border-box;padding-top:1.25rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]{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-2a80ef6f]{border-radius:.5rem;width:11.5rem;height:11.5rem}.my-order .shop-list .shop-item .shop-name[data-v-2a80ef6f]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2}.my-order .shop-list .shop-item .shop-price[data-v-2a80ef6f]{font-size:.8rem;color:#f5222d}.my-order .shop-list .shop-item .shop-price span[data-v-2a80ef6f]{font-size:1.2rem;margin-left:.187rem}.my-order .shop-list .shop-item .shop-price .unit-name[data-v-2a80ef6f]{color:#777;font-size:.9rem}.my-order .shop-list .shop-item[data-v-2a80ef6f]:hover{background-color:#1890ff;color:#fff}.my-order .shop-list .shop-item:hover .shop-price[data-v-2a80ef6f],.my-order .shop-list .shop-item:hover .unit-name[data-v-2a80ef6f]{color:#fff}.my-order .shop-list .shop-item .no-stock[data-v-2a80ef6f]{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-2a80ef6f]{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-05cb810b]{width:100%;height:2.5rem;border-radius:2.5rem}.shop[data-v-05cb810b]{border-top:.0625rem solid #eee;padding-top:1rem}.shop .shop-info[data-v-05cb810b]{display:flex}.shop .shop-info .shop-info-left[data-v-05cb810b]{flex-shrink:0;margin-right:.8rem;height:8rem;width:8rem;overflow:hidden;border-radius:.5rem}.shop .shop-info .shop-info-right[data-v-05cb810b]{display:flex;flex-direction:column;justify-content:space-between}.shop .shop-info .shop-info-right .shop-info-right-top[data-v-05cb810b]{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-05cb810b]{font-size:.8rem}.shop .shop-info .shop-info-right .shop-info-right-price[data-v-05cb810b]{color:#ff4a00;font-size:1.2rem;font-weight:700}.shop .shop-info .shop-info-right .shop-info-right-price span[data-v-05cb810b]{font-size:1.4rem;margin-left:.2rem}.shop .shop-sku[data-v-05cb810b]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0}.classify[data-v-00ca5f82]{height:100%;width:8rem;background-color:#fff;border-radius:1.2rem;font-size:1rem;color:#333;overflow-y:scroll}.classify .itemP[data-v-00ca5f82]{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-00ca5f82]{background-color:#1890ff;color:#fff}.active-card .title[data-v-00ca5f82]{font-size:1.1rem;font-weight:700;color:#333}.active-card .list[data-v-00ca5f82]{display:flex;flex-wrap:wrap}.active-card .list div[data-v-00ca5f82]{margin-right:1rem;margin-top:.5rem;cursor:pointer;color:#333}.active-card .list .list-active[data-v-00ca5f82]{color:#1890ff}[data-v-00ca5f82]::-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/dist/assets/index-DpSgGS2v.js b/dist/assets/index-DpSgGS2v.js deleted file mode 100644 index 9de0daa..0000000 --- a/dist/assets/index-DpSgGS2v.js +++ /dev/null @@ -1 +0,0 @@ -import{J as Ae,K as De,E as z,u as de,L as Ie,r as c,M as ye,b as $,c as o,k,f as v,w as r,F as J,l as ae,d as R,_ as re,o as ce,m as j,a as ve,h as ue,e,g as y,i as ge,j as _e,z as W,t as b,p as M,q as pe,s as fe,D as Re,n as ne,C as ze,I as Pe}from"./index-C8Aez8VK.js";import{a as me,b as Ee,u as je,c as he,d as Fe,e as Ne,f as Oe,g as Te,h as Be,i as qe}from"./user-C93qGz5f.js";import"./moment-Cl4UOzQZ.js";import{f as Je}from"./store-DpldfEnh.js";import{p as Ke}from"./padding-2CqLry9i.js";const Q=Ae.create({baseURL:De.api,timeout:6e4});Q.interceptors.request.use(s=>{const t=localStorage.getItem("Token");return t&&(s.headers.token=t),s},s=>(console.error(s),Promise.reject(s)));Q.interceptors.response.use(s=>{var t;if(s.data.code===-1&&(s.data.msg=="登录过期"||s.data.msg=="登录超时,请重新登录"))throw z({message:s.data.msg,type:"error"}),setTimeout(()=>{const _=de();_.setUserInfo({}),_.setToken(""),Ie.push("/login")},500),new Error(s.data.msg);if(s.data.code===400)throw z({message:s.data.msg,type:"error"}),new Error(s.data.msg);if(s.data.show&&z({message:s.data.msg,type:"error"}),s.data.code===500)throw s.data.msg=JSON.parse(s.data.msg),z({message:((t=s.data.msg)==null?void 0:t.msg)||s.data.msg,type:"error"}),new Error(s.data.msg);return s.data.code===0?Promise.reject(s.data):s.data},s=>{var t,_;return console.error(s),z({message:((_=(t=s.response)==null?void 0:t.data)==null?void 0:_.msg)||s,type:"error"}),Promise.reject(s)});function be(s){return Q.get("/city",{params:s})}function ke(s){return Q.get("/area",{params:s})}function $e(s){return Q.get("/street",{params:s})}function we(s){return Q.get("/village",{params:s})}function Ve(s){return Q.get("/brigade",{params:s})}const Me={class:"add-user"},We={__name:"add",emits:["close"],setup(s,{expose:t,emit:_}){const S=c(null),f=ye({mobile:"",real_name:"",user_ship:"",selectedValues:[]}),w=ye({mobile:[{required:!0,message:"请输入手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"}],real_name:[{required:!0,message:"请输入用户姓名",trigger:"blur"}],user_ship:[{required:!0,message:"请选择用户类型",trigger:"change"}],selectedValues:[{required:!0,message:"请选择用户地址",trigger:"change"}]}),C=c([]),E=async(P,g)=>{const V=P.level;let a;if(V!==0&&!P.data.code)return g([]);V===0?(a=await be({province_code:51e4}),a=a.data.map(m=>({code:m.city_code,name:m.city_name}))):V===1?(a=await ke({city_code:P.data.code}),a=a.data.map(m=>({code:m.area_code,name:m.area_name}))):V===2?(a=await $e({area_code:P.data.code}),a=a.data.map(m=>({code:m.street_code,name:m.street_name}))):V===3?(a=await we({street_code:P.data.code}),a=a.data.map(m=>({code:m.village_code,name:m.village_name}))):V===4&&(a=await Ve({village_code:P.data.code}),a=a.data.map(m=>({code:m.id,name:m.brigade_name,leaf:!0}))),g(a)},X={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:E},I=c([]);(()=>{me().then(P=>{I.value=P.data.lists})})();const O=_;return t({addUser:()=>{S.value.validate(async P=>{if(P){let g={};g.mobile=f.mobile,g.user_ship=f.user_ship,g.real_name=f.real_name,g.province="510000",g.city=f.selectedValues[0],g.area=f.selectedValues[1],g.street=f.selectedValues[2],g.village=f.selectedValues[3],g.brigade=f.selectedValues[4],Ee(g).then(V=>{O("close")})}})}}),(P,g)=>{const V=$("el-input"),a=$("el-form-item"),m=$("el-option"),K=$("el-select"),T=$("el-cascader"),G=$("el-form");return o(),k("div",Me,[v(G,{model:f,rules:w,ref_key:"formDataRef",ref:S,"label-width":"80px"},{default:r(()=>[v(a,{label:"用户电话",prop:"mobile"},{default:r(()=>[v(V,{modelValue:f.mobile,"onUpdate:modelValue":g[0]||(g[0]=L=>f.mobile=L),placeholder:"请输入用户电话"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户姓名",prop:"real_name"},{default:r(()=>[v(V,{modelValue:f.real_name,"onUpdate:modelValue":g[1]||(g[1]=L=>f.real_name=L),placeholder:"请输入用户姓名"},null,8,["modelValue"])]),_:1}),v(a,{label:"用户类型",prop:"user_ship"},{default:r(()=>[v(K,{modelValue:f.user_ship,"onUpdate:modelValue":g[2]||(g[2]=L=>f.user_ship=L),placeholder:"请选择用户类型",style:{width:"100%"}},{default:r(()=>[(o(!0),k(J,null,ae(I.value,L=>(o(),R(m,{key:L.id,label:L.title,value:L.id,disabled:L.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1}),v(a,{label:"用户地址",prop:"selectedValues"},{default:r(()=>[v(T,{style:{width:"100%"},modelValue:f.selectedValues,"onUpdate:modelValue":g[3]||(g[3]=L=>f.selectedValues=L),options:C.value,props:X,load:E,class:"w-full"},null,8,["modelValue","options"])]),_:1})]),_:1},8,["model","rules"])])}}},Ce=s=>(pe("data-v-e2b0bc71"),s=s(),fe(),s),Ge={class:"my-order"},He={class:"header-nav"},Qe=Ce(()=>e("div",{class:"nav-item"},b("用户列表"),-1)),Xe={class:"header-row"},Ye=Ce(()=>e("div",{class:"label"},"用户类型",-1)),Ze={class:"header-input"},et={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},tt=["onClick"],at={style:{display:"flex","flex-direction":"column","justify-content":"space-around",flex:"1"}},lt={class:"top flex"},st={class:"r-1"},ot={class:"bold"},it={class:"bottom flex",style:{"justify-content":"space-between"}},nt={class:"red"},dt={class:"red"},ut={class:"red"},rt={class:"red"},ct={key:0,class:"load-end"},vt={key:1,class:"load-end"},_t={class:"dialog-footer"},pt={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:1}},setup(s){de(),c([]);const t=c({page_no:1,page_size:20,mobile:"",user_ship:""}),_=c(!1),S=c(0),f=c(0),w=c(!1),C=c([]),E=(V=!1)=>{if(V)t.value.page_no=1;else if(w.value||_.value)return;_.value=!0,je(t.value).then(a=>{V?C.value=a.data.lists:C.value=[...C.value,...a.data.lists],t.value.page_no==1&&C.value.length>0&&j.emit("set-user-detail",C.value[0]),a.data.lists.length{w.value=!0,_.value=!1})},X=(V,a)=>{f.value=a,j.emit("set-user-detail",V)},I=c(!1),U=c(null),O=()=>{var V;(V=U.value)==null||V.addUser()},B=()=>{I.value=!1,E(!0)},P=c([]);return(()=>{me().then(V=>{P.value=V.data.lists})})(),ce(()=>{j.on("re-load-user-list",()=>{E(!0)})}),ve(()=>{j.off("re-load-user-list")}),(V,a)=>{const m=$("Plus"),K=$("el-icon"),T=$("el-button"),G=$("el-option"),L=$("el-select"),Y=$("el-input"),N=$("el-avatar"),F=$("el-tag"),A=$("el-dialog"),u=ue("loading"),n=ue("infinite-scroll");return o(),k("div",Ge,[e("div",He,[Qe,v(T,{type:"primary",onClick:a[0]||(a[0]=i=>I.value=!0)},{default:r(()=>[v(K,null,{default:r(()=>[v(m)]),_:1}),y(" 添加用户")]),_:1})]),e("div",Xe,[Ye,v(L,{modelValue:t.value.user_ship,"onUpdate:modelValue":a[1]||(a[1]=i=>t.value.user_ship=i),onChange:a[2]||(a[2]=i=>E(!0)),placeholder:"请选择用户类型",style:{flex:"1"}},{default:r(()=>[(o(!0),k(J,null,ae(P.value,i=>(o(),R(G,{key:i.id,label:i.title,value:i.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e("div",Ze,[v(Y,{modelValue:t.value.mobile,"onUpdate:modelValue":a[4]||(a[4]=i=>t.value.mobile=i),placeholder:"搜索手机号/ID",onKeydown:a[5]||(a[5]=ge(i=>E(!0),["enter"])),onClear:a[6]||(a[6]=i=>E(!0)),clearable:""},{append:r(()=>[v(T,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:a[3]||(a[3]=i=>E(!0))},{default:r(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),_e((o(),k("div",et,[(o(!0),k(J,null,ae(C.value,(i,h)=>{var d;return o(),k("div",{class:W(["item",{"item-active":f.value==h}]),key:h,onClick:Z=>X(i,h)},[v(N,{class:"avatar",src:i.avatar},null,8,["src"]),e("div",at,[e("div",lt,[e("div",st,[e("span",ot,b(i.nickname),1),e("span",null,b(" (ID:"+i.id+")"),1)]),e("div",null,"手机号: "+b(i.mobile),1)]),e("div",it,[e("div",null,[y("余额: "),e("span",nt,b(i.now_money),1)]),e("div",null,[y("采购款: "),e("span",dt,b(i.purchase_funds),1)]),e("div",null,[y("返还金: "),e("span",ut,b((d=i.return_money)==null?void 0:d.toFixed(2)),1)]),e("div",null,[y("礼品券: "),e("span",rt,b(i.integral),1)]),e("div",null,[i.user_ship!=1?(o(),R(F,{key:0,type:"primary"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024)):(o(),R(F,{key:1,type:"success"},{default:r(()=>[y(b(i.user_ship_name),1)]),_:2},1024))])])])],10,tt)}),128)),w.value?(o(),k("div",ct,"没有更多了")):M("",!0),_.value?(o(),k("div",vt,"加载中...")):M("",!0)])),[[u,_.value],[n,E]]),v(A,{modelValue:I.value,"onUpdate:modelValue":a[8]||(a[8]=i=>I.value=i),title:"添加用户",width:"600"},{footer:r(()=>[e("div",_t,[v(T,{onClick:a[7]||(a[7]=i=>I.value=!1)},{default:r(()=>[y("取消")]),_:1}),v(T,{type:"primary",onClick:O},{default:r(()=>[y(" 添加 ")]),_:1})])]),default:r(()=>[v(We,{ref_key:"addRef",ref:U,onClose:B},null,512)]),_:1},8,["modelValue"])])}}},ft=re(pt,[["__scopeId","data-v-e2b0bc71"]]),le=s=>(pe("data-v-7b0b3630"),s=s(),fe(),s),mt=le(()=>e("h4",null,"选择支付方式",-1)),yt={class:"dra-body"},ht={class:"header"},gt={style:{display:"inline-block"}},bt=le(()=>e("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),kt={style:{color:"#f5222d","padding-bottom":"2rem"}},$t={style:{"font-size":"1.6rem"}},wt={key:0,"element-loading-text":"支付中",class:"card1"},Vt=le(()=>e("div",{class:"tips"},null,-1)),Ct={key:1,class:"card2"},St={class:"drawer-body"},xt={class:"counter"},Ut={class:"received"},Lt={key:0},At={key:1,style:{"font-size":"1rem",color:"#999"}},Dt={key:0,class:"balance"},It={class:"money"},Rt=le(()=>e("div",{class:"tips"},"按回车(Enter)确认支付",-1)),zt={key:1,class:"balance"},Pt=le(()=>e("div",null,"不够找零, 请支付更多金额",-1)),Et=le(()=>e("div",{class:"tips"},"按下小键盘输入金额",-1)),jt=[Pt,Et],Ft={class:"keypad"},Nt={class:"left"},Ot={class:"right"},Tt={style:{width:"100%",display:"flex","justify-content":"center"}},Bt={__name:"payUser",emits:["paySuccess"],setup(s,{expose:t,emit:_}){const S=c(!1),f=c(1),w=c(""),C=c("");de();const E=()=>{N()},X=()=>{ne(()=>{setTimeout(()=>{var l;F.value=!1,w.value="",a.value=!0,(l=C.value)==null||l.focus(),I(f.value)},300)})},I=l=>{f.value=l,console.log(f.value),f.value==2?window.addEventListener("keydown",ee):(window.removeEventListener("keydown",ee),ne(()=>{var p;w.value="",(p=C.value)==null||p.focus()}))},U=c({price:0,uid:""}),O=c([]),B=c(!1),P=l=>{U.value=l.data,U.value.total=l.data.price,O.value=l.cart_id,B.value=l.isRePay||!1},g=l=>{U.value.total=l.price,G.value=l.order_id},V=_,a=c(!1),m=c(["1","2","3","4","5","6","7","8","9","0","00","."]),K=/^(10|11|12|13|14|15)\d{16}$/,T=/^(25|26|27|28|29|30)\d{14,22}$/,G=c(""),L=()=>{if(F.value=!0,C.value.blur(),B.value)Y();else{let l;if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),z.error("请输入正确的支付码");he({uid:U.value.uid,price:U.value.price,pay_type:l,auth_code:w.value}).then(p=>{p.data.out_trade_no&&p.msg=="支付成功"?(S.value=!1,z({message:"支付成功",type:"success"}),N(p.data)):p.msg=="用户支付中"&&p.code==1&&(z.warning(p.msg),j.on("pay_success",x=>{z({message:"支付成功",type:"success"}),setTimeout(()=>{j.off("pay_success")},200),S.value=!1,N(x)}))}).catch(p=>{F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})}},Y=()=>{let l=17;if(f.value==1)if(K.test(w.value))l="9";else if(T.test(w.value))l="13";else return F.value=!1,w.value="",C.value.focus(),z.error("请输入正确的支付码");Je({order_id:U.value.order_id,pay_type:l,auth_code:w.value}).then(p=>{var x;(x=p.msg)!=null&&x.includes("成功")?(S.value=!1,z({message:"支付成功",type:"success"}),N()):p.msg=="用户支付中"&&p.code==1&&(z.warning(p.msg),j.on("pay_success",H=>{z({message:"支付成功",type:"success"}),setTimeout(()=>{j.off("pay_success")},200),S.value=!1,N(H)}))}).catch(p=>{w.value="",F.value=!1,ne(()=>{var x;(x=C.value)==null||x.focus()})})};c(0);const N=l=>{var p;window.removeEventListener("keydown",ee),a.value=!1,F.value=!1,w.value="",u.value="",A.value=[],(p=C.value)==null||p.blur(),V("paySuccess",l),S.value=!1},F=c(!1);t({drawer:S,setForm:P,setRePay:g,beforeClose:N});const A=c([]),u=c(""),n=Re(()=>+u.value>0?(u.value-U.value.total).toFixed(2):-1),i=c(!1),h=l=>{l===-1?A.value=[]:A.value.pop(),u.value=A.value.length?A.value.join(""):0},d=l=>{i.value===!1&&(u.value="",i.value=!0);let p=String(u.value).indexOf(".")+1,x=String(u.value).length-p;console.log(p,x),(p===0||x<2)&&(A.value.join("")<=9999999&&A.value.push(l),u.value=A.value.join("")>99999999?99999999:A.value.join(""))},Z=()=>{if(n.value===""||n.value===null||n.value===void 0||+u.value<+U.value.total)return z.error("收款金额应该大于等于应收金额");B.value?Y():he({uid:U.value.uid,price:U.value.price,pay_type:17}).then(l=>{S.value=!1,z({message:l.msg,type:"success"}),I(1),N()}).catch(l=>{F.value=!1})},ee=l=>{let x=(l||window.event).keyCode;if(x==37)return I(2);if(x==120)return j.emit("F9");if(x==27)return N();switch(l.stopPropagation(),l.preventDefault(),x){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:h();break;case 13:Z();break}},te=c(!1),oe=()=>{if(!(!S.value||te.value&&w.value.length>0)&&f.value==2)return I(1)},se=()=>{if(!(!S.value||te.value&&w.value.length>0)&&f.value==1)return I(2)};return ce(()=>{j.on("left",oe),j.on("right",se)}),ve(()=>{j.off("left",oe),j.off("right",se)}),(l,p)=>{const x=$("el-input"),H=$("el-button"),Se=$("Delete"),xe=$("el-icon"),Ue=$("el-drawer"),Le=ue("loading");return o(),R(Ue,{size:"60rem",modelValue:S.value,"onUpdate:modelValue":p[6]||(p[6]=ie=>S.value=ie),direction:"rtl",onOpen:X,"before-close":N},{header:r(()=>[mt]),default:r(()=>{var ie;return[e("div",yt,[e("div",ht,[e("div",{class:W(["left",{active:f.value==1}]),onClick:p[0]||(p[0]=q=>I(1))}," 微信/支付宝 ",2),e("div",{class:W(["right",{active:f.value==2}]),onClick:p[1]||(p[1]=q=>I(2))}," 现金收款 ",2)]),e("div",null,[e("div",gt,[bt,e("div",kt,[y(" ¥"),e("span",$t,b((ie=U.value)==null?void 0:ie.price),1)])])]),f.value==1?_e((o(),k("div",wt,[v(x,{ref_key:"codeRef",ref:C,modelValue:w.value,"onUpdate:modelValue":p[2]||(p[2]=q=>w.value=q),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:ge(L,["enter"]),onFocus:p[3]||(p[3]=q=>te.value=!0),onBlur:p[4]||(p[4]=q=>te.value=!1)},null,8,["modelValue"]),Vt])),[[Le,F.value]]):(o(),k("div",Ct,[e("div",St,[e("div",xt,[e("div",Ut,[u.value?(o(),k("span",Lt,b(u.value),1)):(o(),k("span",At,"按下键盘输入客户支付金额"))]),n.value>=0?(o(),k("div",Dt,[e("div",null,[y(" 需找零(元):"),e("span",It,"¥"+b(n.value),1)]),Rt])):(o(),k("div",zt,jt)),e("div",Ft,[e("div",Nt,[(o(!0),k(J,null,ae(m.value,q=>(o(),R(H,{key:q,onClick:Ha=>d(q)},{default:r(()=>[y(b(q),1)]),_:2},1032,["onClick"]))),128))]),e("div",Ot,[v(H,{onClick:h},{default:r(()=>[v(xe,null,{default:r(()=>[v(Se)]),_:1})]),_:1}),v(H,{onClick:p[5]||(p[5]=q=>h(-1))},{default:r(()=>[y("C")]),_:1}),v(H,{class:W(["enter",{"enter-disable":+u.value<+U.value.total}]),disabled:+u.value<+U.value.total,onClick:Z},{default:r(()=>[y(" 确认 ")]),_:1},8,["class","disabled"])])])])])]))])]}),footer:r(()=>[e("div",Tt,[v(H,{class:"cancel-btn",onClick:E},{default:r(()=>[y("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},qt=re(Bt,[["__scopeId","data-v-7b0b3630"]]),D=s=>(pe("data-v-ff0075ff"),s=s(),fe(),s),Jt={class:"my-order"},Kt={key:0,class:"detail"},Mt={class:"table"},Wt=D(()=>e("div",{class:"table-title"},"用户信息",-1)),Gt={class:"table-info"},Ht={class:"info-item"},Qt=D(()=>e("div",{class:"info-item-title"},"用户余额:",-1)),Xt={class:"info-item-info red"},Yt={class:"info-item"},Zt=D(()=>e("div",{class:"info-item-title"},"采购款:",-1)),ea={class:"info-item-info red"},ta={class:"info-item"},aa=D(()=>e("div",{class:"info-item-title"},"返还金:",-1)),la={class:"info-item-info red"},sa={class:"info-item"},oa=D(()=>e("div",{class:"info-item-title"},"头像:",-1)),ia={class:"info-item-info"},na={class:"info-item"},da=D(()=>e("div",{class:"info-item-title"},"礼品券:",-1)),ua={class:"info-item-info red"},ra={class:"info-item"},ca=D(()=>e("div",{class:"info-item-title"},"ID:",-1)),va={class:"info-item-info"},_a={class:"info-item"},pa=D(()=>e("div",{class:"info-item-title"},"用户昵称:",-1)),fa={class:"info-item-info"},ma={class:"info-item"},ya=D(()=>e("div",{class:"info-item-title"},"用户电话:",-1)),ha={class:"info-item-info"},ga={class:"info-item"},ba=D(()=>e("div",{class:"info-item-title"},"用户账号:",-1)),ka={class:"info-item-info"},$a={class:"info-item"},wa=D(()=>e("div",{class:"info-item-title"},"真实姓名:",-1)),Va={class:"info-item-info"},Ca={class:"info-item"},Sa=D(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),xa={class:"info-item-info"},Ua={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},La=D(()=>e("div",{class:"info-item-title"},"用户类型:",-1)),Aa={class:"info-item-info"},Da={key:0,class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Ia=D(()=>e("div",{class:"info-item-title"},"用户标签:",-1)),Ra={class:"info-item-info"},za={class:"info-item",style:{width:"100%","flex-shrink":"0","align-items":"center"}},Pa=D(()=>e("div",{class:"info-item-title"},"用户地址:",-1)),Ea=D(()=>e("div",{class:"table-title"},[y("供销经营礼包"),e("span",{class:"tips"},"首次购买1000元以上成为行业会员")],-1)),ja={class:"table-info"},Fa={class:"pay-btn"},Na=D(()=>e("div",null,"¥1000.00",-1)),Oa=[Na],Ta=D(()=>e("div",null,"¥2000.00",-1)),Ba=[Ta],qa=D(()=>e("div",null,"¥5000.00",-1)),Ja=[qa],Ka={key:1},Ma={__name:"detail",setup(s){de(),ze();const t=c({id:""}),_=c({price:"",type:1}),S=c(null),f=()=>{_.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),S.value.setForm({data:{uid:t.value.id,price:_.value.price}}),S.value.drawer=!0},w=()=>{console.log("支付成功"),j.emit("re-load-user-list")},C=c(!1),E=c([]);(()=>{me().then(u=>{E.value=u.data.lists})})();const I=()=>{Ne({id:t.value.id,user_ship:t.value.user_ship}).then(u=>{var n;z.success("修改成功"),t.value.user_ship_name=(n=E.value.find(i=>i.id==t.value.user_ship))==null?void 0:n.title,C.value=!1})},U=()=>{C.value=!1},O=c(!1),B=c([]);(()=>{Oe().then(u=>{B.value=u.data.lists})})();const g=()=>{Te({id:t.value.id,label_id:t.value.label_id}).then(u=>{var n;z.success("修改成功"),t.value.label_name=(n=B.value.find(i=>i.label_id==t.value.label_id))==null?void 0:n.label_name,O.value=!1})},V=()=>{O.value=!1},a=c({id:"",province:"",city:"",area:"",street:"",brigade:""}),m=c([]),K=c([]),T=()=>{Be({uid:t.value.id}).then(u=>{u.data.village&&(m.value=[u.data.city,u.data.area,u.data.street,u.data.village,+u.data.brigade],K.value=JSON.parse(JSON.stringify(m.value)),a.value=Object.assign(a.value,u.data))})},G=c([]),L=async(u,n)=>{const i=u.level;let h;if(i!==0&&!u.data.code)return n([]);i===0?(h=await be({province_code:51e4}),h=h.data.map(d=>({code:d.city_code,name:d.city_name}))):i===1?(h=await ke({city_code:u.data.code}),h=h.data.map(d=>({code:d.area_code,name:d.area_name}))):i===2?(h=await $e({area_code:u.data.code}),h=h.data.map(d=>({code:d.street_code,name:d.street_name}))):i===3?(h=await we({street_code:u.data.code}),h=h.data.map(d=>({code:d.village_code,name:d.village_name}))):i===4&&(h=await Ve({village_code:u.data.code}),h=h.data.map(d=>({code:d.id,name:d.brigade_name,leaf:!0}))),n(h)},Y={value:"code",label:"name",children:"children",multiple:!1,lazy:!0,lazyLoad:L},N=async()=>{a.value.city=m.value[0],a.value.area=m.value[1],a.value.street=m.value[2],a.value.village=m.value[3],a.value.brigade=m.value[4],a.value.phone||(a.value.phone=t.value.account),a.value.real_name||(a.value.real_name=t.value.real_name||t.value.nickname),qe({...a.value,uid:t.value.id}).then(u=>{z.success("编辑成功"),A.value=!0})},F=()=>{m.value=JSON.parse(JSON.stringify(K.value)),A.value=!0},A=c(!0);return ce(()=>{j.on("set-user-detail",u=>{t.value=u,Fe({id:u.id}).then(({data:n})=>{t.value=Object.assign(u,n),console.log(t.value)}),T()})}),ve(()=>{j.off("set-user-detail")}),(u,n)=>{var se;const i=$("el-avatar"),h=$("el-tag"),d=$("el-button"),Z=$("el-option"),ee=$("el-select"),te=$("el-cascader"),oe=$("el-empty");return o(),k("div",Jt,[t.value.id?(o(),k("div",Kt,[e("div",Mt,[Wt,e("div",Gt,[e("div",Ht,[Qt,e("div",Xt,"¥"+b(t.value.now_money),1)]),e("div",Yt,[Zt,e("div",ea,"¥"+b(t.value.purchase_funds),1)]),e("div",ta,[aa,e("div",la,"¥"+b((se=t.value.number)==null?void 0:se.toFixed(2)),1)]),e("div",sa,[oa,e("div",ia,[v(i,{style:{width:"4rem",height:"4rem"},src:t.value.avatar},null,8,["src"])])]),e("div",na,[da,e("div",ua,"¥"+b(t.value.integral),1)]),e("div",ra,[ca,e("div",va,b(t.value.id),1)]),e("div",_a,[pa,e("div",fa,b(t.value.nickname),1)]),e("div",ma,[ya,e("div",ha,b(t.value.mobile),1)]),e("div",ga,[ba,e("div",ka,b(t.value.account),1)]),e("div",$a,[wa,e("div",Va,b(t.value.real_name),1)]),e("div",Ca,[Sa,e("div",xa,b(t.value.create_time),1)]),e("div",Ua,[La,e("div",Aa,[C.value==!1?(o(),k(J,{key:0},[t.value.user_ship!=1?(o(),R(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})):(o(),R(h,{key:1,type:"success",size:"large"},{default:r(()=>[y(b(t.value.user_ship_name),1)]),_:1})),t.value.user_ship!=1?(o(),R(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[0]||(n[0]=l=>C.value=!0)},{default:r(()=>[y("修改")]),_:1})):M("",!0)],64)):(o(),k(J,{key:1},[v(ee,{modelValue:t.value.user_ship,"onUpdate:modelValue":n[1]||(n[1]=l=>t.value.user_ship=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,ae(E.value,l=>(o(),R(Z,{key:l.id,label:l.title,value:l.id,disabled:l.id==1},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:I},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:U},{default:r(()=>[y("取消")]),_:1})],64))])]),t.value.user_ship==1?(o(),k("div",Da,[Ia,e("div",Ra,[O.value==!1?(o(),k(J,{key:0},[t.value.label_name?(o(),R(h,{key:0,type:"primary",size:"large"},{default:r(()=>[y(b(t.value.label_name),1)]),_:1})):M("",!0),t.value.label_name?(o(),R(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:n[2]||(n[2]=l=>O.value=!0)},{default:r(()=>[y("修改")]),_:1})):(o(),R(d,{key:2,type:"primary",style:{"margin-left":"1rem"},onClick:n[3]||(n[3]=l=>{t.value.label_id="",O.value=!0})},{default:r(()=>[y("添加")]),_:1}))],64)):(o(),k(J,{key:1},[v(ee,{modelValue:t.value.label_id,"onUpdate:modelValue":n[4]||(n[4]=l=>t.value.label_id=l),placeholder:"请选择用户类型",style:{width:"10rem"}},{default:r(()=>[(o(!0),k(J,null,ae(B.value,l=>(o(),R(Z,{key:l.label_id,label:l.label_name,value:l.label_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),v(d,{type:"primary",style:{"margin-left":"1rem"},onClick:g},{default:r(()=>[y("确认")]),_:1}),v(d,{style:{"margin-left":"1rem"},onClick:V},{default:r(()=>[y("取消")]),_:1})],64))])])):M("",!0),e("div",za,[Pa,(o(),R(te,{key:t.value.id,style:{flex:"1"},modelValue:m.value,"onUpdate:modelValue":n[5]||(n[5]=l=>m.value=l),options:G.value,props:Y,load:L,class:"w-full",disabled:A.value},null,8,["modelValue","options","disabled"])),A.value?(o(),R(d,{key:0,type:"primary",style:{"margin-left":"1rem"},onClick:n[6]||(n[6]=l=>A.value=!1)},{default:r(()=>[y("修改")]),_:1})):M("",!0),A.value?M("",!0):(o(),R(d,{key:1,type:"primary",style:{"margin-left":"1rem"},onClick:N},{default:r(()=>[y("确认")]),_:1})),A.value?M("",!0):(o(),R(d,{key:2,style:{"margin-left":"1rem"},onClick:F},{default:r(()=>[y("取消")]),_:1}))])]),Ea,e("div",ja,[e("div",Fa,[e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==1}]),onClick:n[7]||(n[7]=l=>_.value.type=1)},Oa,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==2}]),onClick:n[8]||(n[8]=l=>_.value.type=2)},Ba,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==3}]),onClick:n[9]||(n[9]=l=>_.value.type=3)},Ja,2),e("div",{class:W(["pay-item",{"pay-item-active":_.value.type==0}]),onClick:n[11]||(n[11]=l=>_.value.type=0)},[_e(e("input",{type:"number",class:"input","onUpdate:modelValue":n[10]||(n[10]=l=>_.value.price=l),placeholder:"自定义金额"},null,512),[[Pe,_.value.price]])],2)]),v(d,{type:"primary",size:"large",class:"pay",onClick:f},{default:r(()=>[y("立即支付")]),_:1})])])])):(o(),k("div",Ka,[v(oe)])),v(qt,{ref_key:"payRef",ref:S,onPaySuccess:w},null,512)])}}},Wa=re(Ma,[["__scopeId","data-v-ff0075ff"]]),Ga={class:"my-card"},tl={__name:"index",setup(s){return(t,_)=>(o(),k("div",Ga,[v(ft,{style:{"flex-shrink":"0"},ref:"orderRef"},null,512),v(Ke),v(Wa,{ref:"detailRef"},null,512)]))}};export{tl as default}; diff --git a/dist/assets/index-B6mjWDdo.js b/dist/assets/index-DrSCp2PL.js similarity index 96% rename from dist/assets/index-B6mjWDdo.js rename to dist/assets/index-DrSCp2PL.js index 7ba4716..6c031d2 100644 --- a/dist/assets/index-B6mjWDdo.js +++ b/dist/assets/index-DrSCp2PL.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 C,q as L,s as B,C as E,E as w}from"./index-C8Aez8VK.js";import{l as K}from"./user-C93qGz5f.js";const N=l=>(L("data-v-f9ff2ce9"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__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(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U($,[["__scopeId","data-v-f9ff2ce9"]]);export{A 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 C,q as L,s as B,C as E,E as w}from"./index-BVz4Ohfy.js";import{l as K}from"./user-CmzBi8Mn.js";const N=l=>(L("data-v-f9ff2ce9"),l=l(),B(),l),M={class:"body"},T={class:"login"},q=N(()=>v("div",{class:"title"},"里海收银系统 - 登录",-1)),$={__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(()=>[C("登录")]),_:1})]),_:1})]),_:1})])])}}},A=U($,[["__scopeId","data-v-f9ff2ce9"]]);export{A as default}; diff --git a/dist/assets/index-Dc56CDYQ.js b/dist/assets/index-EhChKQnq.js similarity index 84% rename from dist/assets/index-Dc56CDYQ.js rename to dist/assets/index-EhChKQnq.js index 74de576..f0d1b4d 100644 --- a/dist/assets/index-Dc56CDYQ.js +++ b/dist/assets/index-EhChKQnq.js @@ -1 +1 @@ -import{b as t,c,k as a,e,f as o,w as d,g as l}from"./index-C8Aez8VK.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-BVz4Ohfy.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/dist/assets/index-NMWcwHZT.js b/dist/assets/index-NMWcwHZT.js new file mode 100644 index 0000000..14e3e04 --- /dev/null +++ b/dist/assets/index-NMWcwHZT.js @@ -0,0 +1 @@ +import{a as B,b as L}from"./shop-DqnXs3CE.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-BVz4Ohfy.js";import"./axiosAPI-Cd-ap3gb.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/dist/assets/index-C7fs1zha.js b/dist/assets/index-zOr5bmPl.js similarity index 98% rename from dist/assets/index-C7fs1zha.js rename to dist/assets/index-zOr5bmPl.js index 064587e..58b93c4 100644 --- a/dist/assets/index-C7fs1zha.js +++ b/dist/assets/index-zOr5bmPl.js @@ -1 +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,C as ae}from"./index-C8Aez8VK.js";import{s as ie,d as le}from"./store-DpldfEnh.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ne}from"./padding-2CqLry9i.js";const H=f=>(q("data-v-42ec4cb4"),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"},Ve={class:"pay"},De={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),V=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),D=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++,D.value=0,L.value=a.data.count,c.value=!1}).catch(a=>{m.value=!0,c.value=!1})},I=(u,a)=>{D.value=a,b.emit("set-sale-order-detail",u)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",u=>{console.log("==="),h.value[D.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:V,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:"14rem","margin-left":"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":D.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",Ve,[t.paid?(o(),i("div",De,[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-42ec4cb4"]]),r=f=>(q("data-v-18a74f9a"),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"},Vt={class:"info-item"},Dt=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 V=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("触底"),_=()=>{V.value=!0,le({id:s.value.id}).then(c=>{s.value=c.data,setTimeout(()=>{V.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 D=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.total_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",Vt,[Dt,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(D,{style:{height:"3rem",width:"3rem"},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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),Bt])),[[I,S]])])),[[$,V.value]]):(o(),i("div",Lt,[d(y)]))])}}},Tt=E(Nt,[["__scopeId","data-v-18a74f9a"]]),Ft={class:"my-card"},Pt={__name:"index",setup(f){return(s,V)=>(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}; +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,C as ae}from"./index-BVz4Ohfy.js";import{s as ie,d as le}from"./store-C3TkF7fN.js";import{h as A}from"./moment-Cl4UOzQZ.js";/* empty css */import{p as ne}from"./padding-DDV9klbG.js";const H=f=>(q("data-v-42ec4cb4"),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"},Ve={class:"pay"},De={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),V=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),D=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++,D.value=0,L.value=a.data.count,c.value=!1}).catch(a=>{m.value=!0,c.value=!1})},I=(u,a)=>{D.value=a,b.emit("set-sale-order-detail",u)},$=n(!1);return P(()=>{b.on("update-sale-order-detail",u=>{console.log("==="),h.value[D.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:V,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:"14rem","margin-left":"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":D.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",Ve,[t.paid?(o(),i("div",De,[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-42ec4cb4"]]),r=f=>(q("data-v-18a74f9a"),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"},Vt={class:"info-item"},Dt=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 V=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("触底"),_=()=>{V.value=!0,le({id:s.value.id}).then(c=>{s.value=c.data,setTimeout(()=>{V.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 D=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.total_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",Vt,[Dt,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(D,{style:{height:"3rem",width:"3rem"},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.total_price",label:"总价",width:"150"})]),_:1},8,["data"]),Bt])),[[I,S]])])),[[$,V.value]]):(o(),i("div",Lt,[d(y)]))])}}},Tt=E(Nt,[["__scopeId","data-v-18a74f9a"]]),Ft={class:"my-card"},Pt={__name:"index",setup(f){return(s,V)=>(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/dist/assets/indexCount-t7dVborh.js b/dist/assets/indexCount-B8A9Xzkb.js similarity index 86% rename from dist/assets/indexCount-t7dVborh.js rename to dist/assets/indexCount-B8A9Xzkb.js index dd3e9ff..d2821c9 100644 --- a/dist/assets/indexCount-t7dVborh.js +++ b/dist/assets/indexCount-B8A9Xzkb.js @@ -1 +1 @@ -import{f as i}from"./merchant-BDDpKimp.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-C8Aez8VK.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-CYIKGKiv.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-BVz4Ohfy.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/dist/assets/merchant-BDDpKimp.js b/dist/assets/merchant-CYIKGKiv.js similarity index 87% rename from dist/assets/merchant-BDDpKimp.js rename to dist/assets/merchant-CYIKGKiv.js index 75339a8..59b2135 100644 --- a/dist/assets/merchant-BDDpKimp.js +++ b/dist/assets/merchant-CYIKGKiv.js @@ -1 +1 @@ -import{G as a}from"./index-C8Aez8VK.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{G as a}from"./index-BVz4Ohfy.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/dist/assets/padding-2CqLry9i.js b/dist/assets/padding-DDV9klbG.js similarity index 65% rename from dist/assets/padding-2CqLry9i.js rename to dist/assets/padding-DDV9klbG.js index bcd8924..b84bd66 100644 --- a/dist/assets/padding-2CqLry9i.js +++ b/dist/assets/padding-DDV9klbG.js @@ -1 +1 @@ -import{_ as e,c as t,k as c}from"./index-C8Aez8VK.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-BVz4Ohfy.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/dist/assets/pay-B94oZZEx.js b/dist/assets/pay-B94oZZEx.js deleted file mode 100644 index f370433..0000000 --- a/dist/assets/pay-B94oZZEx.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as fe,r as i,u as ye,D as me,o as he,m as h,a as ge,b as D,h as ke,c as v,d as X,w as _,e as s,z as j,k as f,g,t as V,p as Y,j as be,f as k,i as Z,F as we,l as Ce,n as L,E as u,q as xe,s as $e}from"./index-C8Aez8VK.js";import{e as I,f as Ve,g as Pe,h as Se}from"./store-DpldfEnh.js";/* empty css */const S=A=>(xe("data-v-e36c3a59"),A=A(),$e(),A),Ee=S(()=>s("h4",null,"选择支付方式",-1)),Fe={class:"dra-body"},ze={class:"header"},Be={key:0,style:{display:"inline-block","margin-right":"20px"}},De={style:{display:"inline-block","margin-right":"20px"}},je=S(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),Ae={style:{color:"#f5222d","padding-bottom":"2rem"}},Le={style:{"font-size":"1.6rem"}},Re={style:{display:"inline-block"}},Te={style:{color:"#999",padding:"2rem 0 0.3rem 0"}},Ne={style:{color:"#f5222d","padding-bottom":"2rem"}},Ue={style:{"font-size":"1.6rem"}},Ie={style:{display:"inline-block"}},Me=S(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Oe={style:{color:"#f5222d","padding-bottom":"2rem"}},Ke={key:0,style:{"font-size":"1.6rem"}},qe={key:1,style:{"font-size":"1.6rem"}},We={key:0,"element-loading-text":"支付中",class:"card1"},Ge=S(()=>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(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),ta={key:1,class:"balance"},la=S(()=>s("div",null,"不够找零, 请支付更多金额",-1)),oa=S(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),ia=[la,oa],na={class:"keypad"},ua={class:"left"},ca={class:"right"},ra={key:2,class:"card3"},da={class:"codes"},va={style:{width:"100%",display:"flex","justify-content":"center"}},pa={__name:"pay",emits:["paySuccess"],setup(A,{expose:ee,emit:ae}){const p=i(!1),t=i(1),c=i(""),b=i("");ye();const P=i(500),E=a=>{Se({id:a}).then(e=>{h.emit("letPrintReceipt",e.data)})},se=()=>{m()},te=()=>{L(()=>{setTimeout(()=>{var a;C.value=!1,c.value="",M.value=!0,(a=b.value)==null||a.focus(),y(t.value)},300)})},y=a=>{t.value=a,t.value==2?window.addEventListener("keydown",N):(window.removeEventListener("keydown",N),L(()=>{var e;c.value="",(e=b.value)==null||e.focus()}))},l=i({}),z=i([]),w=i(""),R=i(!1),le=a=>{l.value=a.data,z.value=a.cart_id,w.value=a.uid,console.log("选择了用户==",w.value||"游客"),R.value=a.isRePay||!1},oe=a=>{l.value.pay_price=a.price,ue.value=a.order_id},ie=ae,M=i(!1),ne=i(["1","2","3","4","5","6","7","8","9","0","00","."]),O=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,ue=i(""),ce=()=>{if(l.value.pay_price{e.data.out_trade_no&&e.msg=="支付成功"?(p.value=!1,u({message:"支付成功",type:"success"}),m(e.data),E(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),h.on("pay_success",o=>{u({message:"支付成功",type:"success"}),E(e.data.id),setTimeout(()=>{h.off("pay_success")},200),p.value=!1,m(o)}))}).catch(e=>{C.value=!1,L(()=>{var o;(o=b.value)==null||o.focus()})})}},q=()=>{let a=17;if(t.value==1)if(O.test(c.value))a="9";else if(K.test(c.value))a="13";else return C.value=!1,c.value="",b.value.focus(),u.error("请输入正确的支付码");Ve({order_id:l.value.order_id,pay_type:a,auth_code:c.value,uid:w.value}).then(e=>{var o;(o=e.msg)!=null&&o.includes("成功")?(p.value=!1,u({message:"支付成功",type:"success"}),E(e.data.id),m()):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),h.on("pay_success",$=>{u({message:"支付成功",type:"success"}),E(e.data.id),setTimeout(()=>{h.off("pay_success")},200),p.value=!1,m($)}))}).catch(e=>{c.value="",C.value=!1,L(()=>{var o;(o=b.value)==null||o.focus()})})};i(0);const m=a=>{var e;try{window.removeEventListener("keydown",N),M.value=!1,C.value=!1,c.value="",r.value="",x.value=[],(e=b.value)==null||e.blur(),ie("paySuccess",a),p.value=!1}catch{}},C=i(!1);ee({drawer:p,setForm:le,setRePay:oe,beforeClose:m});const x=i([]),r=i(""),B=me(()=>+r.value>0?(+r.value-l.value.pay_price).toFixed(2):-1),W=i(!1),T=a=>{a===-1?x.value=[]:x.value.pop(),r.value=x.value.length?x.value.join(""):0},d=a=>{W.value===!1&&(r.value="",W.value=!0);let e=String(r.value).indexOf(".")+1,o=String(r.value).length-e;console.log(e,o),(e===0||o<2)&&(x.value.join("")<=9999999&&x.value.push(a),r.value=x.value.join("")>99999999?99999999:x.value.join(""))},G=()=>{if(l.value.pay_price{p.value=!1,u({message:a.msg,type:"success"}),E(a.data.id),y(1),m()}).catch(a=>{C.value=!1})},N=a=>{let o=(a||window.event).keyCode;if(o==37)return y(2);if(o==120)return h.emit("F9");if(o==27)return m();switch(a.stopPropagation(),a.preventDefault(),o){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:G();break}},re=()=>{if(l.value.pay_price{u({message:"发送成功",type:"success"})})},U=i(""),H=()=>{if(l.value.pay_price{p.value=!1,u({message:e.msg,type:"success"}),E(e.data.id),y(1),m()})},F=i(!1),J=()=>{if(!(!p.value||F.value&&c.value.length>0)&&t.value!=1)return y(t.value-1)},Q=()=>{if(!(!p.value||F.value&&c.value.length>0)&&t.value!=4)return y(t.value+1)};return he(()=>{h.on("left",J),h.on("right",Q)}),ge(()=>{h.off("left",J),h.off("right",Q)}),(a,e)=>{const o=D("el-input"),$=D("el-button"),de=D("Delete"),ve=D("el-icon"),pe=D("el-drawer"),_e=ke("loading");return v(),X(pe,{size:"60rem",modelValue:p.value,"onUpdate:modelValue":e[11]||(e[11]=n=>p.value=n),direction:"rtl",onOpen:te,"before-close":m},{header:_(()=>[Ee]),default:_(()=>[s("div",Fe,[s("div",ze,[s("div",{class:j(["left",{active:t.value==1}]),onClick:e[0]||(e[0]=n=>y(1))}," 微信/支付宝 ",2),s("div",{class:j(["center",{active:t.value==2}]),onClick:e[1]||(e[1]=n=>y(2))}," 现金收款 ",2),s("div",{class:j(["center",{active:t.value==3}]),onClick:e[2]||(e[2]=n=>y(3))}," 采购款 ",2),s("div",{class:j(["right",{active:t.value==4}]),onClick:e[3]||(e[3]=n=>y(4))}," 礼品券兑换 ",2)]),s("div",null,[l.value.activities==1&&t.value!=4?(v(),f("div",Be,[s("div",De,[je,s("div",Ae,[g(" ¥"),s("span",Le,V(l.value.original_price),1)])]),s("div",Re,[s("div",Te,V(l.value.activity||t.value==2?"活动折扣:":"消费返利:"),1),s("div",Ne,[g(V(l.value.activity)+"¥",1),s("span",Ue,V(l.value.activity_price),1)])])])):Y("",!0),s("div",Ie,[Me,s("div",Oe,[g(" ¥"),t.value==2&&l.value.activities==1?(v(),f("span",Ke,V(Math.ceil(l.value.original_price-l.value.activity_price).toFixed(2)),1)):(v(),f("span",qe,V(t.value==4?l.value.original_price:l.value.pay_price),1))])])]),t.value==1?be((v(),f("div",We,[k(o,{ref_key:"codeRef",ref:b,modelValue:c.value,"onUpdate:modelValue":e[4]||(e[4]=n=>c.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Z(ce,["enter"]),onFocus:e[5]||(e[5]=n=>F.value=!0),onBlur:e[6]||(e[6]=n=>F.value=!1)},null,8,["modelValue"]),Ge])),[[_e,C.value]]):t.value==2?(v(),f("div",He,[s("div",Je,[s("div",Qe,[s("div",Xe,[r.value?(v(),f("span",Ye,V(r.value),1)):(v(),f("span",Ze,"按下键盘输入客户支付金额"))]),B.value>=0?(v(),f("div",ea,[s("div",null,[g(" 需找零(元):"),s("span",aa,"¥"+V(B.value),1)]),sa])):(v(),f("div",ta,ia)),s("div",na,[s("div",ua,[(v(!0),f(we,null,Ce(ne.value,n=>(v(),X($,{key:n,onClick:_a=>d(n)},{default:_(()=>[g(V(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ca,[k($,{onClick:T},{default:_(()=>[k(ve,null,{default:_(()=>[k(de)]),_:1})]),_:1}),k($,{onClick:e[7]||(e[7]=n=>T(-1))},{default:_(()=>[g("C")]),_:1}),k($,{class:j(["enter",{"enter-disable":+r.value<+l.value.pay_price}]),disabled:+r.value<+l.value.pay_price,onClick:G},{default:_(()=>[g(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):t.value==3||t.value==4?(v(),f("div",ra,[s("div",da,[k(o,{modelValue:U.value,"onUpdate:modelValue":e[8]||(e[8]=n=>U.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:Z(H,["enter"]),onFocus:e[9]||(e[9]=n=>F.value=!0),onBlur:e[10]||(e[10]=n=>F.value=!1)},null,8,["modelValue"]),k($,{type:"primary",onClick:re,class:"get-code-btn"},{default:_(()=>[g("获取验证码")]),_:1})]),k($,{type:"primary",onClick:H,class:"code-pay"},{default:_(()=>[g("确认支付")]),_:1})])):Y("",!0)])]),footer:_(()=>[s("div",va,[k($,{class:"cancel-btn",onClick:se},{default:_(()=>[g("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ha=fe(pa,[["__scopeId","data-v-e36c3a59"]]);export{ha as p}; diff --git a/dist/assets/pay-BB7NTysX.css b/dist/assets/pay-BB7NTysX.css new file mode 100644 index 0000000..0ceb672 --- /dev/null +++ b/dist/assets/pay-BB7NTysX.css @@ -0,0 +1 @@ +.dra-body[data-v-3ea085c1]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-3ea085c1]{width:30rem;display:flex}.dra-body .header>div[data-v-3ea085c1]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-3ea085c1]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-3ea085c1]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-3ea085c1]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-3ea085c1]{width:100%;height:3rem;font-size:1.2rem}.dra-body .card1 .tips[data-v-3ea085c1]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.dra-body .card3 .codes[data-v-3ea085c1]{width:38rem;display:flex;align-items:center}.dra-body .card3 .codes .code-input[data-v-3ea085c1]{flex:1;height:3rem;font-size:1.2rem}.dra-body .card3 .codes .get-code-btn[data-v-3ea085c1]{height:3rem;margin-left:1rem}.dra-body .card3 .code-pay[data-v-3ea085c1]{margin-top:4rem;width:100%;height:3rem;border-radius:3rem}.cancel-btn[data-v-3ea085c1]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-3ea085c1]{width:100%;overflow-x:hidden}.counter[data-v-3ea085c1]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-3ea085c1]{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-3ea085c1]{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-3ea085c1]{color:#ff4a00}.counter .balance .tips[data-v-3ea085c1]{font-size:.8rem;color:#999}.counter .keypad[data-v-3ea085c1]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-3ea085c1]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-3ea085c1]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-3ea085c1]{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-3ea085c1]:focus{box-shadow:none}.counter .keypad .enter[data-v-3ea085c1]{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-3ea085c1]{background-color:#ccc} diff --git a/dist/assets/pay-Co4mcZ_Q.css b/dist/assets/pay-Co4mcZ_Q.css deleted file mode 100644 index 65ca2eb..0000000 --- a/dist/assets/pay-Co4mcZ_Q.css +++ /dev/null @@ -1 +0,0 @@ -.dra-body[data-v-e36c3a59]{width:100%;display:flex;flex-direction:column;align-items:center;text-align:center}.dra-body .header[data-v-e36c3a59]{width:30rem;display:flex}.dra-body .header>div[data-v-e36c3a59]{flex:1;border:.0625rem solid #ccc;text-align:center;padding:.6rem 0;cursor:pointer}.dra-body .header .left[data-v-e36c3a59]{border-right:none;border-radius:5rem 0 0 5rem}.dra-body .header .right[data-v-e36c3a59]{border-left:none;border-radius:0 5rem 5rem 0}.dra-body .header .active[data-v-e36c3a59]{background-color:#1890ff;color:#fff;transition:.3s;border-color:#1890ff}.dra-body .card1 .code-input[data-v-e36c3a59]{width:100%;height:3rem;font-size:1.2rem}.dra-body .card1 .tips[data-v-e36c3a59]{width:38rem;height:16rem;background:url(./pay-De0xbdxm.png);background-size:100% 100%;background-repeat:no-repeat}.dra-body .card3 .codes[data-v-e36c3a59]{width:38rem;display:flex;align-items:center}.dra-body .card3 .codes .code-input[data-v-e36c3a59]{flex:1;height:3rem;font-size:1.2rem}.dra-body .card3 .codes .get-code-btn[data-v-e36c3a59]{height:3rem;margin-left:1rem}.dra-body .card3 .code-pay[data-v-e36c3a59]{margin-top:4rem;width:100%;height:3rem;border-radius:3rem}.cancel-btn[data-v-e36c3a59]{width:60%;border-color:#1890ff;color:#1890ff;border-radius:5rem;height:3rem;font-size:1.2rem}.drawer-body[data-v-e36c3a59]{width:100%;overflow-x:hidden}.counter[data-v-e36c3a59]{padding:1.25rem;border-radius:1.25rem;background-color:#f3f9ff}.counter .received[data-v-e36c3a59]{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-e36c3a59]{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-e36c3a59]{color:#ff4a00}.counter .balance .tips[data-v-e36c3a59]{font-size:.8rem;color:#999}.counter .keypad[data-v-e36c3a59]{display:grid;grid-template-columns:auto auto auto auto;grid-gap:.625rem}.counter .keypad .left[data-v-e36c3a59]{grid-column-end:span 3;display:grid;grid-template-columns:auto auto auto;grid-gap:.625rem}.counter .keypad .right[data-v-e36c3a59]{display:grid;grid-template-columns:auto;grid-gap:.625rem}.counter .keypad .el-button[data-v-e36c3a59]{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-e36c3a59]:focus{box-shadow:none}.counter .keypad .enter[data-v-e36c3a59]{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-e36c3a59]{background-color:#ccc} diff --git a/dist/assets/pay-E0FHnQQX.js b/dist/assets/pay-E0FHnQQX.js new file mode 100644 index 0000000..6a5b041 --- /dev/null +++ b/dist/assets/pay-E0FHnQQX.js @@ -0,0 +1 @@ +import{_ as _e,r as o,u as fe,D as ye,o as me,m as h,a as he,b as B,h as ge,c as v,d as Q,w as _,e as s,z as D,k as f,g,t as $,p as X,j as ke,f as k,i as Y,F as be,l as we,n as A,E as u,q as Ce,s as xe}from"./index-BVz4Ohfy.js";import{e as U,f as Ve,g as $e,h as Pe}from"./store-C3TkF7fN.js";/* empty css */const P=j=>(Ce("data-v-3ea085c1"),j=j(),xe(),j),Se=P(()=>s("h4",null,"选择支付方式",-1)),Ee={class:"dra-body"},Fe={class:"header"},ze={key:0,style:{display:"inline-block","margin-right":"20px"}},Be={style:{display:"inline-block","margin-right":"20px"}},De=P(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"原价:",-1)),je={style:{color:"#f5222d","padding-bottom":"2rem"}},Ae={style:{"font-size":"1.6rem"}},Le={style:{display:"inline-block"}},Re=P(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"活动折扣: ",-1)),Te={style:{color:"#f5222d","padding-bottom":"2rem"}},Ne={style:{"font-size":"1.6rem"}},Ue={style:{display:"inline-block"}},Ie=P(()=>s("div",{style:{color:"#999",padding:"2rem 0 0.3rem 0"}},"应收金额(元):",-1)),Oe={style:{color:"#f5222d","padding-bottom":"2rem"}},Ke={key:0,style:{"font-size":"1.6rem"}},Me={key:1,style:{"font-size":"1.6rem"}},qe={key:0,"element-loading-text":"支付中",class:"card1"},We=P(()=>s("div",{class:"tips"},null,-1)),Ge={key:1,class:"card2"},He={class:"drawer-body"},Je={class:"counter"},Qe={class:"received"},Xe={key:0},Ye={key:1,style:{"font-size":"1rem",color:"#999"}},Ze={key:0,class:"balance"},ea={class:"money"},aa=P(()=>s("div",{class:"tips"},"按回车(Enter)确认支付",-1)),sa={key:1,class:"balance"},ta=P(()=>s("div",null,"不够找零, 请支付更多金额",-1)),la=P(()=>s("div",{class:"tips"},"按下小键盘输入金额",-1)),oa=[ta,la],na={class:"keypad"},ia={class:"left"},ca={class:"right"},ua={key:2,class:"card3"},da={class:"codes"},ra={style:{width:"100%",display:"flex","justify-content":"center"}},va={__name:"pay",emits:["paySuccess"],setup(j,{expose:Z,emit:ee}){const p=o(!1),l=o(1),c=o(""),b=o("");fe(),o(0);const S=a=>{Pe({id:a}).then(e=>{h.emit("letPrintReceipt",e.data)})},ae=()=>{m()},se=()=>{A(()=>{setTimeout(()=>{var a;C.value=!1,c.value="",I.value=!0,(a=b.value)==null||a.focus(),y(l.value)},300)})},y=a=>{l.value=a,l.value==2?window.addEventListener("keydown",T):(window.removeEventListener("keydown",T),A(()=>{var e;c.value="",(e=b.value)==null||e.focus()}))},i=o({}),F=o([]),w=o(""),L=o(!1),te=a=>{i.value=a.data,F.value=a.cart_id,w.value=a.uid,console.log("选择了用户==",w.value||"游客"),L.value=a.isRePay||!1},le=a=>{i.value.pay_price=a.price,ie.value=a.order_id},oe=ee,I=o(!1),ne=o(["1","2","3","4","5","6","7","8","9","0","00","."]),O=/^(10|11|12|13|14|15)\d{16}$/,K=/^(25|26|27|28|29|30)\d{14,22}$/,ie=o(""),ce=()=>{if(C.value=!0,b.value.blur(),L.value)M();else{let a;if(O.test(c.value))a="9";else if(K.test(c.value))a="13";else return C.value=!1,c.value="",b.value.focus(),console.log("=====",22),u.error("请输入正确的支付码");U({key:i.value.key,cart_id:F.value,pay_type:a,auth_code:c.value,uid:w.value}).then(e=>{e.data.out_trade_no&&e.msg=="支付成功"?(p.value=!1,u({message:"支付成功",type:"success"}),m(e.data),S(e.data.id)):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),h.on("pay_success",t=>{u({message:"支付成功",type:"success"}),S(e.data.id),setTimeout(()=>{h.off("pay_success")},200),p.value=!1,m(t)}))}).catch(e=>{C.value=!1,A(()=>{var t;(t=b.value)==null||t.focus()})})}},M=()=>{let a=17;if(l.value==1)if(O.test(c.value))a="9";else if(K.test(c.value))a="13";else return C.value=!1,c.value="",b.value.focus(),u.error("请输入正确的支付码");Ve({order_id:i.value.order_id,pay_type:a,auth_code:c.value,uid:w.value}).then(e=>{var t;(t=e.msg)!=null&&t.includes("成功")?(p.value=!1,u({message:"支付成功",type:"success"}),S(e.data.id),m()):e.msg=="用户支付中"&&e.code==1&&(u.warning(e.msg),h.on("pay_success",V=>{u({message:"支付成功",type:"success"}),S(e.data.id),setTimeout(()=>{h.off("pay_success")},200),p.value=!1,m(V)}))}).catch(e=>{c.value="",C.value=!1,A(()=>{var t;(t=b.value)==null||t.focus()})})};o(0);const m=a=>{var e;try{window.removeEventListener("keydown",T),I.value=!1,C.value=!1,c.value="",d.value="",x.value=[],(e=b.value)==null||e.blur(),oe("paySuccess",a),p.value=!1}catch{}},C=o(!1);Z({drawer:p,setForm:te,setRePay:le,beforeClose:m});const x=o([]),d=o(""),z=ye(()=>+d.value>0?(+d.value-i.value.pay_price).toFixed(2):-1),q=o(!1),R=a=>{a===-1?x.value=[]:x.value.pop(),d.value=x.value.length?x.value.join(""):0},r=a=>{q.value===!1&&(d.value="",q.value=!0);let e=String(d.value).indexOf(".")+1,t=String(d.value).length-e;console.log(e,t),(e===0||t<2)&&(x.value.join("")<=9999999&&x.value.push(a),d.value=x.value.join("")>99999999?99999999:x.value.join(""))},W=()=>{if(z.value===""||z.value===null||z.value===void 0||+d.value<+i.value.pay_price)return u.error("收款金额应该大于等于应收金额");L.value?M():U({cart_id:F.value,pay_type:"17",uid:w.value}).then(a=>{p.value=!1,u({message:a.msg,type:"success"}),S(a.data.id),y(1),m()}).catch(a=>{C.value=!1})},T=a=>{let t=(a||window.event).keyCode;if(t==37)return y(2);if(t==120)return h.emit("F9");if(t==27)return m();switch(a.stopPropagation(),a.preventDefault(),t){case 96:case 48:r(0);break;case 97:case 49:r(1);break;case 98:case 50:r(2);break;case 99:case 51:r(3);break;case 100:case 52:r(4);break;case 101:case 53:r(5);break;case 102:case 54:r(6);break;case 103:case 55:r(7);break;case 104:case 56:r(8);break;case 105:case 57:r(9);break;case 110:r(".");break;case 190:r(".");break;case 8:R();break;case 13:W();break}},ue=()=>{if(!w.value)return u.error("请先选择用户");let a=1;l.value==4&&(a=2),$e({cart_id:F.value,uid:w.value,type:a}).then(e=>{u({message:"发送成功",type:"success"})})},N=o(""),G=()=>{if(!w.value)return u.error("请先选择用户");let a=18;l.value==4&&(a=19),U({pay_type:a,sms_code:N.value,cart_id:F.value,uid:w.value}).then(e=>{p.value=!1,u({message:e.msg,type:"success"}),S(e.data.id),y(1),m()})},E=o(!1),H=()=>{if(!(!p.value||E.value&&c.value.length>0)&&l.value!=1)return y(l.value-1)},J=()=>{if(!(!p.value||E.value&&c.value.length>0)&&l.value!=4)return y(l.value+1)};return me(()=>{h.on("left",H),h.on("right",J)}),he(()=>{h.off("left",H),h.off("right",J)}),(a,e)=>{const t=B("el-input"),V=B("el-button"),de=B("Delete"),re=B("el-icon"),ve=B("el-drawer"),pe=ge("loading");return v(),Q(ve,{size:"60rem",modelValue:p.value,"onUpdate:modelValue":e[11]||(e[11]=n=>p.value=n),direction:"rtl",onOpen:se,"before-close":m},{header:_(()=>[Se]),default:_(()=>[s("div",Ee,[s("div",Fe,[s("div",{class:D(["left",{active:l.value==1}]),onClick:e[0]||(e[0]=n=>y(1))}," 微信/支付宝 ",2),s("div",{class:D(["center",{active:l.value==2}]),onClick:e[1]||(e[1]=n=>y(2))}," 现金收款 ",2),s("div",{class:D(["center",{active:l.value==3}]),style:{"border-left":"none"},onClick:e[2]||(e[2]=n=>y(3))}," 采购款 ",2),s("div",{class:D(["right",{active:l.value==4}]),onClick:e[3]||(e[3]=n=>y(4))}," 礼品券兑换 ",2)]),s("div",null,[i.value.activities==1&&l.value!=4?(v(),f("div",ze,[s("div",Be,[De,s("div",je,[g(" ¥"),s("span",Ae,$(i.value.original_price),1)])]),s("div",Le,[Re,s("div",Te,[g($(i.value.activity)+"¥",1),s("span",Ne,$(i.value.activity_price),1)])])])):X("",!0),s("div",Ue,[Ie,s("div",Oe,[g(" ¥"),l.value==2&&i.value.activities==1?(v(),f("span",Ke,$(Math.ceil(i.value.original_price-i.value.activity_price).toFixed(2)),1)):(v(),f("span",Me,$(l.value==4?i.value.original_price:i.value.pay_price),1))])])]),l.value==1?ke((v(),f("div",qe,[k(t,{ref_key:"codeRef",ref:b,modelValue:c.value,"onUpdate:modelValue":e[4]||(e[4]=n=>c.value=n),autofocus:"",class:"code-input",placeholder:"请点击输入框聚焦扫码或输入编码号",onKeyup:Y(ce,["enter"]),onFocus:e[5]||(e[5]=n=>E.value=!0),onBlur:e[6]||(e[6]=n=>E.value=!1)},null,8,["modelValue"]),We])),[[pe,C.value]]):l.value==2?(v(),f("div",Ge,[s("div",He,[s("div",Je,[s("div",Qe,[d.value?(v(),f("span",Xe,$(d.value),1)):(v(),f("span",Ye,"按下键盘输入客户支付金额"))]),z.value>=0?(v(),f("div",Ze,[s("div",null,[g(" 需找零(元):"),s("span",ea,"¥"+$(z.value),1)]),aa])):(v(),f("div",sa,oa)),s("div",na,[s("div",ia,[(v(!0),f(be,null,we(ne.value,n=>(v(),Q(V,{key:n,onClick:pa=>r(n)},{default:_(()=>[g($(n),1)]),_:2},1032,["onClick"]))),128))]),s("div",ca,[k(V,{onClick:R},{default:_(()=>[k(re,null,{default:_(()=>[k(de)]),_:1})]),_:1}),k(V,{onClick:e[7]||(e[7]=n=>R(-1))},{default:_(()=>[g("C")]),_:1}),k(V,{class:D(["enter",{"enter-disable":+d.value<+i.value.pay_price}]),disabled:+d.value<+i.value.pay_price,onClick:W},{default:_(()=>[g(" 确认 ")]),_:1},8,["class","disabled"])])])])])])):l.value==3||l.value==4?(v(),f("div",ua,[s("div",da,[k(t,{modelValue:N.value,"onUpdate:modelValue":e[8]||(e[8]=n=>N.value=n),autofocus:"",class:"code-input",placeholder:"请输入验证码",onKeyup:Y(G,["enter"]),onFocus:e[9]||(e[9]=n=>E.value=!0),onBlur:e[10]||(e[10]=n=>E.value=!1)},null,8,["modelValue"]),k(V,{type:"primary",onClick:ue,class:"get-code-btn"},{default:_(()=>[g("获取验证码")]),_:1})]),k(V,{type:"primary",onClick:G,class:"code-pay"},{default:_(()=>[g("确认支付")]),_:1})])):X("",!0)])]),footer:_(()=>[s("div",ra,[k(V,{class:"cancel-btn",onClick:ae},{default:_(()=>[g("取消收款")]),_:1})])]),_:1},8,["modelValue"])}}},ma=_e(va,[["__scopeId","data-v-3ea085c1"]]);export{ma as p}; diff --git a/dist/assets/shop-BWPO2XM6.js b/dist/assets/shop-BWPO2XM6.js deleted file mode 100644 index 19c4dbe..0000000 --- a/dist/assets/shop-BWPO2XM6.js +++ /dev/null @@ -1 +0,0 @@ -import{G as s}from"./index-C8Aez8VK.js";function r(t){return s.get("/store_product/storeProduct/lists",{params:t})}function o(t){return s.get("/cate/cate/lists",{params:t})}function a(t){return s.get("/system_store_storage/systemstorestorage/lists",{params:t})}function i(t){return s.post("/system_store_storage/systemstorestorage/edit",t)}export{a,i as b,o as m,r as s}; diff --git a/dist/assets/shop-DqnXs3CE.js b/dist/assets/shop-DqnXs3CE.js new file mode 100644 index 0000000..0bb663b --- /dev/null +++ b/dist/assets/shop-DqnXs3CE.js @@ -0,0 +1 @@ +import{G as s}from"./index-BVz4Ohfy.js";import{r}from"./axiosAPI-Cd-ap3gb.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/dist/assets/store-DpldfEnh.js b/dist/assets/store-C3TkF7fN.js similarity index 93% rename from dist/assets/store-DpldfEnh.js rename to dist/assets/store-C3TkF7fN.js index 252ddd4..1b34a6f 100644 --- a/dist/assets/store-DpldfEnh.js +++ b/dist/assets/store-C3TkF7fN.js @@ -1 +1 @@ -import{G as e}from"./index-C8Aez8VK.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 c(r){return e.post("/store_order/StoreOrder/pay",r)}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function u(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 A(r){return e.get("/store_order/StoreOrder/print",{params:r})}export{s as a,o as b,i as c,p as d,n as e,c as f,O as g,A as h,u as i,a as o,d as s,f as w}; +import{G as e}from"./index-BVz4Ohfy.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 c(r){return e.post("/store_order/StoreOrder/pay",r)}function d(r){return e.get("/store_order/StoreOrder/lists",{params:r})}function p(r){return e.get("/store_order/storeOrder/detail",{params:r})}function u(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 A(r){return e.get("/store_order/StoreOrder/print",{params:r})}export{s as a,o as b,i as c,p as d,n as e,c as f,O as g,A as h,u as i,a as o,d as s,f as w}; diff --git a/dist/assets/test-B81cMWEE.js b/dist/assets/test-C7KWSI5l.js similarity index 99% rename from dist/assets/test-B81cMWEE.js rename to dist/assets/test-C7KWSI5l.js index 8223d14..6fdbd18 100644 --- a/dist/assets/test-B81cMWEE.js +++ b/dist/assets/test-C7KWSI5l.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-C8Aez8VK.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-BVz4Ohfy.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/dist/assets/user-C93qGz5f.js b/dist/assets/user-C93qGz5f.js deleted file mode 100644 index 2013d83..0000000 --- a/dist/assets/user-C93qGz5f.js +++ /dev/null @@ -1 +0,0 @@ -import{G as s}from"./index-C8Aez8VK.js";function t(e){return s.post("/login/account",e)}function u(e){return s.get("/user/UserShip/lists",{params:e})}function i(e){return s.post("/user/user/add",e)}function n(e){return s.get("/user/user/lists",{params:e})}function a(e){return s.get("/user/user/detail",{params:e})}function p(e){return s.get("/user/Address/detail",{params:e})}function o(e){return s.post("/user/Address/edit",e)}function d(e){return s.post("/store_order/StoreOrder/rechange_amount",e)}function c(e){return s.post("/user/user/user_ship",e)}function A(e){return s.get("/user/UserLabel/lists",{params:e})}function l(e){return s.post("/user/user/user_label",e)}export{u as a,i as b,d as c,a as d,c as e,A as f,l as g,p as h,o as i,t as l,n as u}; diff --git a/dist/assets/user-CmzBi8Mn.js b/dist/assets/user-CmzBi8Mn.js new file mode 100644 index 0000000..5eb7b7b --- /dev/null +++ b/dist/assets/user-CmzBi8Mn.js @@ -0,0 +1 @@ +import{G as e}from"./index-BVz4Ohfy.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/dist/index.html b/dist/index.html index 601ac46..3c043e3 100644 --- a/dist/index.html +++ b/dist/index.html @@ -56,7 +56,7 @@ } } - + diff --git a/src/components/pay.vue b/src/components/pay.vue index ab513f7..4c15fec 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -16,7 +16,7 @@ const codeRef = ref(""); const userStore = useUserStore(); -const minMoney = ref(500) //最小起购金额 +const minMoney = ref(0) //最小起购金额 const onPrint = (id) => { storeOrderPrintApi({