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

2 lines
12 KiB
JavaScript
Raw Normal View History

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