cashier-mer/build/assets/index-EdQAP_1d.js

2 lines
9.6 KiB
JavaScript
Raw Normal View History

2024-04-06 16:27:27 +08:00
import{e as K,p as Q,f as W,g as X}from"./pay-6EAQtcAa.js";import{_ as T,u as j,r,a as g,h as U,o as i,f as a,b as e,d as l,w as f,e as h,j as q,F as z,g as F,n as A,t as d,c as O,k,p as H,l as G,q as Y,E as N}from"./index-XP2RAAdj.js";import{p as Z}from"./padding-PEDJpdPM.js";function ee(n){return{all:n=n||new Map,on:function(p,t){var _=n.get(p);_?_.push(t):n.set(p,[t])},off:function(p,t){var _=n.get(p);_&&(t?_.splice(_.indexOf(t)>>>0,1):n.set(p,[]))},emit:function(p,t){var _=n.get(p);_&&_.slice().map(function(u){u(t)}),(_=n.get("*"))&&_.slice().map(function(u){u(p,t)})}}}const M=ee(),te=n=>(H("data-v-7ca37f24"),n=n(),G(),n),se={class:"my-order"},oe={class:"header-nav"},ie=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ae={class:"nav-item-clear"},le={class:"header-input"},ne={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},ce=["onClick"],de={class:"top"},re={class:"create-time"},_e={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},fe={class:"right"},pe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:1,style:{color:"#ff4a00"}},$e={key:0,class:"cashier"},be={key:0,class:"load-end"},Ce={key:1,class:"load-end"},Ve={__name:"order",setup(n){const p=j();r([]);const t=r(1),_=C=>{u.value.page=1,y.value=!1,v.value=!1,b.value=[],P(!0)};r(null);const u=r({page:1,limit:20,search_info:""}),v=r(!1),L=r(0),S=r(0),y=r(!1),b=r([]),P=(C=!1)=>{y.value||v.value||(C&&(u.value.page=1),v.value=!0,t.value==1&&(u.value.paid=null),t.value==2&&(u.value.paid=0),K(p.userInfo.service.mer_id,u.value).then(o=>{C?b.value=o.data.list:b.value=[...b.value,...o.data.list],o.data.list.length<u.value.limit?y.value=!0:u.value.page++,S.value=0,M.emit("set-order-detail",b.value[0]),L.value=o.data.count,v.value=!1}).catch(o=>{v.value=!1}))},R=(C,o)=>{S.value=o,M.emit("set-order-detail",C)};return(C,o)=>{const c=g("el-radio-button"),x=g("el-radio-group"),w=g("el-button"),B=g("el-input"),V=g("el-image"),D=U("loading"),E=U("infinite-scroll");return i(),a("div",se,[e("div",oe,[ie,e("div",ae,[l(x,{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=s=>t.value=s),onChange:_,size:"small"},{default:f(()=>[l(c,{value:1},{default:f(()=>[h("全部")]),_:1}),l(c,{value:2},{default:f(()=>[h("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[l(B,{modelValue:u.value.search_info,"onUpdate:modelValue":o[2]||(o[2]=s=>u.value.search_info=s),placeholder:"请输入订单编号",clearable:""},{append:f(()=>[l(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:o[1]||(o[1]=s=>P(!0))},{default:f(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((i(),a("div",ne,[(i(!0),a(z,null,F(b.value,(s,$)=>(i(),a("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:I=>R(s,$)},[e("div",de,[e("div",{class:A(["sn",{cahier:s.pay_type==11||s.pay_type==12}])},"单号: "+d(s.order_sn),3),e("div",re,d(s.create_time),1)]),e("div",_e,[s.orderProduct?(i(),a("div",ue,[(i(!0),a(z,null,F(s.orderProduct.slice(0,5),(I,J)=>(i(),O(V,{key:J,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(i(),a("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):k("",!0)])):k("",!0),e("div",fe,[e("div",pe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(i(),a("span",ge,"已支付")):(i(),a("span",ke,"未支付"))]),s.service_info?(i(),a("div",$e,"收银员: "+d(s.service_info.nickname),1)):k("",!0)])],10,ce))),128)),y.value?(i(),a("div",be,"没有更多了")):k("",!0),v.value?(i(),a("div",Ce,"加载中...")):k("",!0)])),[[D,v.value],[E,P]])])}}},Se=T(Ve,[["__scopeId","data-v-7ca37f24"]]),m=n=>(H("data-v-e393670f"),n=n(),G(),n),we={class:"my-order"},Pe={class:"header-nav"},Le=["onClick"],xe={class:"detail"},Ie={key:0,class:"table"},Ae={style:{"font-size":"0.9rem"}},Re={style:{color:"#ff4a00"}},Be={style:{display:"flex","align-items":"center"}},De={style:{"margin-left":"0.5rem"}},Ee={