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

2 lines
10 KiB
JavaScript
Raw Normal View History

2024-04-06 18:18:08 +08:00
import{_ as M,u as T,r as _,a as k,h as U,o as s,f as i,b as e,d as l,w as f,e as h,i as J,j,F as z,g as F,n as A,t as r,c as O,k as n,p as q,l as H,q as Q,E as N}from"./index-DsIcmlxr.js";import{e as W,p as X,f as Y,g as Z}from"./pay-Dtaw6USS.js";import{p as ee}from"./padding-C6l3UcjB.js";function te(c){return{all:c=c||new Map,on:function(m,t){var u=c.get(m);u?u.push(t):c.set(m,[t])},off:function(m,t){var u=c.get(m);u&&(t?u.splice(u.indexOf(t)>>>0,1):c.set(m,[]))},emit:function(m,t){var u=c.get(m);u&&u.slice().map(function(v){v(t)}),(u=c.get("*"))&&u.slice().map(function(v){v(m,t)})}}}const K=te(),se=c=>(q("data-v-e6c59a6f"),c=c(),H(),c),oe={class:"my-order"},ie={class:"header-nav"},ae=se(()=>e("div",{class:"nav-item"},"订单列表",-1)),le={class:"nav-item-clear"},ne={class:"header-input"},ce={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},de=["onClick"],re={class:"top"},_e={class:"create-time"},ue={class:"shop"},ve={key:0,class:"left"},pe={key:0,class:"shop-name"},fe={class:"right"},me={class:"money"},he={class:"count"},ye={class:"bottom"},ge={class:"pay"},ke={key:0},$e={key:0},be={key:1},Ce={key:2},we={key:3},Ve={key:4},Se={key:5},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(c){const m=T();_([]);const t=_(1),u=C=>{v.value.page=1,g.value=!1,p.value=!1,b.value=[],V(!0)};_(null);const v=_({page:1,limit:20,search_info:""}),p=_(!1),L=_(0),S=_(0),g=_(!1),b=_([]),V=(C=!1)=>{if(C)v.value.page=1;else if(g.value||p.value)return;p.value=!0,t.value==1&&(v.value.paid=null),t.value==2&&(v.value.paid=0),W(m.userInfo.service.mer_id,v.value).then(a=>{C?b.value=a.data.list:b.value=[...b.value,...a.data.list],a.data.list.length<v.value.limit?g.value=!0:v.value.page++,S.value=0,K.emit("set-order-detail",b.value[0]),L.value=a.data.count,p.value=!1}).catch(a=>{g.value=!0,p.value=!1})},R=(C,a)=>{S.value=a,K.emit("set-order-detail",C)};return(C,a)=>{const d=k("el-radio-button"),x=k("el-radio-group"),P=k("el-button"),B=k("el-input"),w=k("el-image"),D=U("loading"),E=U("infinite-scroll");return s(),i("div",oe,[e("div",ie,[ae,e("div",le,[l(x,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),onChange:u,size:"small"},{default:f(()=>[l(d,{value:1},{default:f(()=>[h("全部")]),_:1}),l(d,{value:2},{default:f(()=>[h("未支付")]),_:1})]),_:1},8,["modelValue"])])]),e("div",ne,[l(B,{modelValue:v.value.search_info,"onUpdate:modelValue":a[2]||(a[2]=o=>v.value.search_info=o),placeholder:"请输入订单编号",onKeydown:a[3]||(a[3]=J(o=>V(!0),["enter"])),onClear:a[4]||(a[4]=o=>V(!0)),clearable:""},{append:f(()=>[l(P,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 5px 5px 0"},onClick:a[1]||(a[1]=o=>V(!0))},{default:f(()=>[h("搜索")]),_:1})]),_:1},8,["modelValue"])]),j((s(),i("div",ce,[(s(!0),i(z,null,F(b.value,(o,$)=>(s(),i("div",{class:A(["item",{"item-active":S.value==$}]),key:$,onClick:I=>R(o,$)},[e("div",re,[e("div",{class:A(["sn",{cahier:o.pay_type==11||o.pay_type==12}])},"单号: "+r(o.order_sn),3),e("div",_e,r(o.create_time),1)]),e("div",ue,[o.orderProduct?(s(),i("div",ve,[(s(!0),i(z,null,F(o.orderProduct.slice(0,5),(I,G)=>(s(),O(w,{key:G,src:I.cart_info.productAttr.image||I.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),o.orderProduct.length==1?(s(),i("div",pe,r(o.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",fe,[e("div",me,"¥"+r(o.pay_price),1),e("div",he,"共"+r(o.total_num)+"件商品",1)])]),e("div",ye,[e("div",ge,[o.paid?(s(),i("div",ke,[h(" 已支付 "),o.pay_type==12?(s(),i("span",$e,"(现金支付)")):n("",!0),o.pay_type==11?(s(),i("span",be,"(微信支付)")):n("",!0),o.pay_type==0?(s(),i("span",Ce,"(余额支付)")):n("",!0),o.pay_type==1?(s(),i("span",we,"(微信支付)")):n("",!0),o.pay_type==9?(s(),i("span",Ve,"(商户余额支付)")):n("",!0),o.pay_type==10?(s(),i("span",Se,"(对公转账)")):n("",!0)])):(s(),i("div",Pe,"未支付"))]),o.serv