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