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