cashier-mer/dist/assets/detail-ttCarTU-.js

2 lines
11 KiB
JavaScript
Raw Normal View History

2024-04-18 17:58:06 +08:00
import{_ as q,u as H,r,o as Q,m as D,b as h,j as F,c as t,h as s,e,t as d,f as c,w as u,g as f,k as W,q as G,F as j,i as K,p as U,d as O,s as n,A as X,E as x,v as Z,x as ee}from"./index-BK45VPeO.js";import{e as te,f as se,g as oe}from"./pay.vue_vue_type_style_index_0_scoped_43f405bf_lang-UtIhw1Q5.js";import{p as ae}from"./pay-jKmmbq3P.js";const ie={class:"my-order"},le={class:"header-nav"},ne={class:"nav-item"},de={class:"nav-item-btn"},ce={class:"header-input"},re={class:"order-list","infinite-scroll-distance":"300","infinite-scroll-delay":"500",style:{overflow:"auto"}},_e=["onClick"],ue={class:"top"},ve={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},me={key:0,class:"shop-name"},he={class:"right"},ye={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},Ce={key:0},Ve={key:1},Se={key:2},we={key:3},Pe={key:4},Le={key:5},Ie={key:6},Ae={key:1,style:{color:"#ff4a00"}},De={key:0,class:"cashier"},Be={key:1,class:"cashier"},Ue={key:0,class:"load-end"},ze={key:1,class:"load-end"},Ee={__name:"order",props:{isSystem:{type:Boolean,default:!1}},setup(C){const B=H(),z=C;r([]);const o=r(1),I=i=>{v.value.page=1,S.value=!1,y.value=!1,k.value=[],$(!0)};r(null);const A=r(""),g=()=>{v.value.date=A.value.join("-"),$(!0)},v=r({page:1,limit:20,search_info:"",date:"",staff_id:0}),y=r(!1),V=r(0),L=r(0),S=r(!1),k=r([]),$=(i=!1)=>{if(i)v.value.page=1;else if(S.value||y.value)return;z.isSystem||(v.value.staff_id=B.userInfo.service.service_id),y.value=!0,o.value==1&&(v.value.paid=null),o.value==2&&(v.value.paid=0),te(B.userInfo.service.mer_id,v.value).then(l=>{i?k.value=l.data.list:k.value=[...k.value,...l.data.list],l.data.list.length<v.value.limit?S.value=!0:v.value.page++,L.value=0,D.emit("set-order-detail",k.value[0]),V.value=l.data.count,y.value=!1}).catch(l=>{S.value=!0,y.value=!1})},_=(i,l)=>{L.value=l,D.emit("set-order-detail",i)};return Q(()=>{D.on("update-order-detail",i=>{console.log("==="),k.value[L.value].paid=1})}),(i,l)=>{const w=h("el-radio-button"),E=h("el-radio-group"),b=h("el-date-picker"),M=h("el-button"),N=h("el-input"),p=h("el-image"),P=F("loading"),T=F("infinite-scroll");return t(),s("div",ie,[e("div",le,[e("div",ne,d(C.isSystem?"平台订单":"收银订单"),1),e("div",de,[c(E,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),onChange:I,size:"small"},{default:u(()=>[c(w,{value:1},{default:u(()=>[f("全部")]),_:1}),c(w,{value:2},{default:u(()=>[f("未支付")]),_:1})]),_:1},8,["modelValue"]),c(b,{modelValue:A.value,"onUpdate:modelValue":l[1]||(l[1]=a=>A.value=a),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY/MM/DD",onChange:g,style:{width:"14rem","margin-left":"1rem"}},null,8,["modelValue"])])]),e("div",ce,[c(N,{modelValue:v.value.search_info,"onUpdate:modelValue":l[3]||(l[3]=a=>v.value.search_info=a),placeholder:"请输入订单编号",onKeydown:l[4]||(l[4]=W(a=>$(!0),["enter"])),onClear:l[5]||(l[5]=a=>$(!0)),clearable:""},{append:u(()=>[c(M,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:l[2]||(l[2]=a=>$(!0))},{default:u(()=>[f("搜索")]),_:1})]),_:1},8,["modelValue"])]),G((t(),s("div",re,[(t(!0),s(j,null,K(k.value,(a,R)=>(t(),s("div",{class:U(["item",{"item-active":L.value==R}]),key:R,onClick:Y=>_(a,R)},[e("div",ue,[e("div",{class:U(["sn",a.pay_type===11||a.pay_type===12||a.pay_type===13?"cahier":"cahier2"])}," 单号: "+d(a.order_sn),3),e("div",ve,d(a.create_time),1)]),e("div",pe,[a.orderProduct?(t(),s("div",fe,[(t(!0),s(j,null,K(a.orderProduct.slice(0,5),(Y,J)=>(t(),O(p,{key:J,src:Y.cart_info.productAttr.image||Y.cart_info.product.image,class:"shop-img"},null,8,["src"]))),128)),a.orderProduct.length==1?(t(),s("div",me,d(a.orderProduct[0].cart_info.product.store_name),1)):n("",!0)])):n("",!0),e("div",he,[e("div",ye,"¥"+d(a.pay_price),1),e("div",ge,"共"+d(a.total_num)+"件商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(t(),s("div",be,[f(" 已支付 "),a.pay_type==13?(t(),s("span",Ce,"(支付宝收款)")):n("",!0),a.pay_t