cashier-ERP/dist/assets/index-DPgzG1u8.js

2 lines
9.7 KiB
JavaScript
Raw Normal View History

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