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

2 lines
10 KiB
JavaScript
Raw Normal View History

2024-04-09 17:19:32 +08:00
import{_ as O,x as j,r as a,b as C,j as K,c as t,h as s,e,f as d,w as f,g as y,k as q,p as x,F as N,i as U,l as A,t as l,d as F,q as n,E as M,m as I,s as H,u as G,z as Q,o as W,n as T,B as L,C as X}from"./index-u0hj8LVS.js";import{v as Y,p as Z,f as ee}from"./pay-D-50vyYW.js";import{p as te}from"./padding-BLY6EjEZ.js";const se=h=>(H("data-v-aaca35b5"),h=h(),G(),h),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"核销订单",-1)),ne={class:"nav-item-clear"},le={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500","infinite-scroll-immediate":"false",style:{overflow:"auto"}},de=["onClick"],_e={class:"top"},re={class:"create-time"},ue={class:"shop"},ve={key:0,class:"left"},pe={key:0,class:"shop-name"},fe={class:"right"},he={class:"money"},me={class:"count"},ye={class:"bottom"},ke={class:"pay"},ge={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},xe={key:4},Se={key:5},Ve={key:1,style:{color:"#ff4a00"}},Pe={key:0,class:"cashier"},Re={key:1,class:"cashier"},Le={key:0,class:"load-end"},Ie={key:1,class:"load-end"},Ae={__name:"order",setup(h,{expose:k}){const i=j();a([]);const g=a(1);a(null);const r=a({page:1,limit:20,search_info:""}),c=a(!1);a(0);const S=a(0),b=a(!1),p=a([]),V=(u=!1)=>{if(!r.value.search_info)return M.error("请输入订单编号");if(u)r.value.page=1;else if(b.value||c.value)return;c.value=!0,g.value==1&&(r.value.paid=null),g.value==2&&(r.value.paid=0),p.value=[],I.emit("set-order-detail",{}),Y(i.userInfo.service.mer_id,r.value.search_info).then(_=>{p.value=[_.data],I.emit("set-order-detail",p.value[0]),c.value=!1}).catch(_=>{b.value=!0,c.value=!1})},B=(u,_)=>{S.value=_,I.emit("set-order-detail",u)};return k({setCode:u=>{r.value.search_info=u,V(!0)}}),(u,_)=>{const w=C("el-button"),E=C("el-input"),P=C("el-image"),z=K("loading"),D=K("infinite-scroll");return t(),s("div",oe,[e("div",ie,[ae,e("div",ne,[d(w,{type:"primary",size:"small"},{default:f(()=>[y("返回上一页")]),_:1})])]),e("div",le,[d(E,{modelValue:r.value.search_info,"onUpdate:modelValue":_[1]||(_[1]=o=>r.value.search_info=o),placeholder:"请输入订单编号",onKeydown:_[2]||(_[2]=q(o=>V(!0),["enter"])),clearable:""},{append:f(()=>[d(w,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:_[0]||(_[0]=o=>V(!0))},{default:f(()=>[y("搜索")]),_:1})]),_:1},8,["modelValue"])]),x((t(),s("div",ce,[(t(!0),s(N,null,U(p.value,(o,$)=>(t(),s("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:R=>B(o,$)},[e("div",_e,[e("div",{class:A(["sn",o.pay_type===11||o.pay_type===12?"cahier":"cahier2"])},"单号: "+l(o.order_sn),3),e("div",re,l(o.create_time),1)]),e("div",ue,[o.orderProduct?(t(),s("div",ve,[(t(!0),s(N,null,U(o.orderProduct.slice(0,5),(R,J)=>(t(),F(P,{key:J,src:R.cart_info.productAttr.image||R.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(t(),s("div",pe,l(o.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",fe,[e("div",he,"¥"+l(o.pay_price),1),e("div",me,"共"+l(o.total_num)+"件商品",1)])]),e("div",ye,[e("div",ke,[o.paid?(t(),s("div",ge,[y(" 已支付 "),o.pay_type==12?(t(),s("span",$e,"(现金支付)")):n("",!0),o.pay_type==11?(t(),s("span",be,"(微信支付)")):n("",!0),o.pay_type==0?(t(),s("span",Ce,"(余额支付)")):n("",!0),o.pay_type==1?(t(),s("span",we,"(微信支付)")):n("",!0),o.pay_type==9?(t(),s("span",xe,"(商户余额支付)")):n("",!0),o.pay_type==10?(t(),s("span",Se,"(对公转账)")):n("",!0)])):(t(),s("div",Ve,"未支付"))]),o.service_info?(t(),s("div",Pe,"收银员: "+l(o.service_info.nickname),1)):(t(),s("div",Re,"平台订单"))])],10,de))),128)),b.value?(t(),s("div",Le,"没有更多了")):n("",!0),c.value?(t(),s("div",Ie,"加载中...")):n("",!0)])),[[z,c.value],[D,V]])])}}},Be=O(Ae,[["__scopeId","data-v-aaca35b5"]]),v=h=>(H("data-v-e39dfe99"),h=h(),G(),h),Ee={class:"my-order"},ze={class:"header-nav"},De=["onClick"],Ke={class:"detail"},Ne={key:0,class:"table"},Ue={style:{"font-size":"0.9rem"}},Fe={st