cashier-mer/dist/assets/index-D7wY4kwL.js

2 lines
10 KiB
JavaScript
Raw Normal View History

2024-04-10 10:28:50 +08:00
import{_ as T,u as j,r as _,b as y,j as N,c as t,h as o,e,f as n,w as u,g as v,k as J,p as q,F as U,i as F,l as A,t as d,d as K,q as l,m as O,s as H,v as M,z as Q,E}from"./index-CDJP75me.js";import{e as W,p as X,f as Y,g as Z}from"./pay-BajYk3t1.js";import{p as ee}from"./padding-BXN6xH5X.js";const te=h=>(H("data-v-477f396c"),h=h(),M(),h),se={class:"my-order"},oe={class:"header-nav"},ae=te(()=>e("div",{class:"nav-item"},"订单列表",-1)),ie={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"},_e={class:"create-time"},re={class:"shop"},ue={key:0,class:"left"},ve={key:0,class:"shop-name"},pe={class:"right"},fe={class:"money"},me={class:"count"},he={class:"bottom"},ye={class:"pay"},ge={key:0},ke={key:0},$e={key:1},be={key:2},Ce={key:3},Ve={key:4},we={key:5},Se={key:6},Pe={key:1,style:{color:"#ff4a00"}},Le={key:0,class:"cashier"},xe={key:1,class:"cashier"},Ie={key:0,class:"load-end"},Ae={key:1,class:"load-end"},Re={__name:"order",setup(h){const P=j();_([]);const a=_(1),S=$=>{f.value.page=1,m.value=!1,r.value=!1,k.value=[],C(!0)};_(null);const f=_({page:1,limit:20,search_info:""}),r=_(!1),L=_(0),V=_(0),m=_(!1),k=_([]),C=($=!1)=>{if($)f.value.page=1;else if(m.value||r.value)return;r.value=!0,a.value==1&&(f.value.paid=null),a.value==2&&(f.value.paid=0),W(P.userInfo.service.mer_id,f.value).then(i=>{$?k.value=i.data.list:k.value=[...k.value,...i.data.list],i.data.list.length<f.value.limit?m.value=!0:f.value.page++,V.value=0,O.emit("set-order-detail",k.value[0]),L.value=i.data.count,r.value=!1}).catch(i=>{m.value=!0,r.value=!1})},R=($,i)=>{V.value=i,O.emit("set-order-detail",$)};return($,i)=>{const c=y("el-radio-button"),x=y("el-radio-group"),w=y("el-button"),z=y("el-input"),b=y("el-image"),B=N("loading"),D=N("infinite-scroll");return t(),o("div",se,[e("div",oe,[ae,e("div",ie,[n(x,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=s=>a.value=s),onChange:S,size:"small"},{default:u(()=>[n(c,{value:1},{default:u(()=>[v("全部")]),_:1}),n(c,{value:2},{default:u(()=>[v("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",le,[n(z,{modelValue:f.value.search_info,"onUpdate:modelValue":i[2]||(i[2]=s=>f.value.search_info=s),placeholder:"请输入订单编号",onKeydown:i[3]||(i[3]=J(s=>C(!0),["enter"])),onClear:i[4]||(i[4]=s=>C(!0)),clearable:""},{append:u(()=>[n(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:i[1]||(i[1]=s=>C(!0))},{default:u(()=>[v("搜索")]),_:1})]),_:1},8,["modelValue"])]),q((t(),o("div",ne,[(t(!0),o(U,null,F(k.value,(s,g)=>(t(),o("div",{class:A(["item",{"item-active":V.value==g}]),key:g,onClick:I=>R(s,g)},[e("div",de,[e("div",{class:A(["sn",s.pay_type===11||s.pay_type===12||s.pay_type===13?"cahier":"cahier2"])},"单号: "+d(s.order_sn),3),e("div",_e,d(s.create_time),1)]),e("div",re,[s.orderProduct?(t(),o("div",ue,[(t(!0),o(U,null,F(s.orderProduct.slice(0,5),(I,G)=>(t(),K(b,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),s.orderProduct.length==1?(t(),o("div",ve,d(s.orderProduct[0].cart_info.product.store_name),1)):l("",!0)])):l("",!0),e("div",pe,[e("div",fe,"¥"+d(s.pay_price),1),e("div",me,"共"+d(s.total_num)+"件商品",1)])]),e("div",he,[e("div",ye,[s.paid?(t(),o("div",ge,[v(" 已支付 "),s.pay_type==13?(t(),o("span",ke,"(支付宝收款)")):l("",!0),s.pay_type==12?(t(),o("span",$e,"(现金支付)")):l("",!0),s.pay_type==11?(t(),o("span",be,"(微信收款)")):l("",!0),s.pay_type==0?(t(),o("span",Ce,"(余额支付)")):l("",!0),s.pay_type==1?(t(),o("span",Ve,"(微信支付)")):l("",!0),s.pay_type==9?(t(),o("span",we,"(商户余额支付)")):l("",!0),s.pay_type==10?(t(),o("span",Se,"(对公转账)")):l("",!0)])):(t(),o("div",Pe,"未支付"))]),s.service_info?(t(),o("div",Le,"收银员: "+d(s.service_info.nickname),1)):(t(),o("div",xe,"平台订单"))])],10,ce))),128)),m.value?(t(),o("div",Ie,"没有更多了")):l("",!0),r.value?(t(),o("div",Ae,"<EFBFBD><EFBFBD>