cashier-ERP/dist/assets/detail-CUjzL566.js

2 lines
11 KiB
JavaScript
Raw Normal View History

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