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

2 lines
8.7 KiB
JavaScript
Raw Normal View History

2024-06-11 18:02:28 +08:00
import{_ as H,u as j,r as l,b as m,l as L,c as s,h as o,e,f as _,w as x,g as C,p as q,v as g,F as U,i as A,x as u,m as O,E as K,s as M,t as n,d as G,y as J,z as P,D as X,o as Q,a as Y,n as T,H as D,I as Z}from"./index-DHeiRjQX.js";import{e as ee,d as te,w as se}from"./store-BKcq1Vfo.js";/* empty css */import{p as oe}from"./padding-CGeVIEC_.js";const ie=r=>(J("data-v-c1565278"),r=r(),P(),r),ae={class:"my-order"},le={class:"header-nav"},ne=ie(()=>e("div",{class:"nav-item"},"核销订单",-1)),ce={class:"nav-item-clear"},de={class:"header-input"},_e={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},re=["onClick"],ve={class:"top"},ue={class:"create-time"},pe={class:"shop"},fe={key:0,class:"left"},he={key:0,class:"shop-name"},ye={class:"right"},me={class:"money"},ge={class:"count"},ke={class:"bottom"},$e={class:"pay"},be={key:0},we={key:0},xe={key:1},Ce={key:2},ze={key:3},Ie={key:4},Se={key:1,style:{color:"#ff4a00"}},Ve={key:0,class:"cashier"},De={key:1,class:"cashier",style:{color:"#ff4a00"}},Oe={key:0,class:"load-end"},Re={key:1,class:"load-end"},Be={__name:"order",emits:["backOne"],setup(r,{expose:t,emit:h}){j(),l([]),l(null);const i=l({verify_code:""}),p=l(!1),k=l(0),$=l(0),c=l(!1),v=l([]),y=(b=!1)=>{i.value.verify_code=i.value.verify_code.replace("—","-"),i.value.verify_code=i.value.verify_code.replace(/\uFF0D/,"-"),i.value.verify_code=i.value.verify_code.replace(" ",""),ee(i.value).then(d=>{v.value=[d.data],$.value=0,O.emit("set-sale-order-detail",v.value[0]),k.value=d.data.count,v.value[0].is_writeoff&&K.warning("订单已核销过")}).catch(d=>{})},w=(b,d)=>{$.value=d,O.emit("set-order-detail",b)},R=b=>{i.value.verify_code=b,y(!0)},B=h,E=()=>{B("backOne")};return t({setCode:R}),(b,d)=>{const z=m("el-button"),I=m("el-input"),S=m("el-image"),V=L("loading");return s(),o("div",ae,[e("div",le,[ne,e("div",ce,[_(z,{type:"primary",size:"small",onClick:E},{default:x(()=>[C("返回上一页")]),_:1})])]),e("div",de,[_(I,{modelValue:i.value.verify_code,"onUpdate:modelValue":d[1]||(d[1]=a=>i.value.verify_code=a),placeholder:"请输入核销码",onKeydown:d[2]||(d[2]=q(a=>y(!0),["enter"])),clearable:""},{append:x(()=>[_(z,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:d[0]||(d[0]=a=>y(!0))},{default:x(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),g((s(),o("div",_e,[(s(!0),o(U,null,A(v.value,(a,F)=>(s(),o("div",{class:M(["item",{"item-active":$.value==F}]),key:F,onClick:N=>w(a,F)},[e("div",ve,[e("div",{class:M(["sn","cahier"])},"单号: "+n(a.order_id),1),e("div",ue,n(a.pay_time),1)]),e("div",pe,[a.product?(s(),o("div",fe,[(s(!0),o(U,null,A(a.product.slice(0,5),(N,W)=>(s(),G(S,{key:W,src:N.cart_info.image,class:"shop-img"},null,8,["src"]))),128)),a.product.length==1?(s(),o("div",he,n(a.product[0].store_name),1)):u("",!0)])):u("",!0),e("div",ye,[e("div",me,"¥"+n(a.pay_price),1),e("div",ge,"共"+n(a.total_num)+"款商品",1)])]),e("div",ke,[e("div",$e,[a.paid?(s(),o("div",be,[C(n(a.paid_name)+" ",1),a.pay_type==9?(s(),o("span",we,"(微信收款)")):u("",!0),a.pay_type==17?(s(),o("span",xe,"(现金支付)")):u("",!0),a.pay_type==13?(s(),o("span",Ce,"(支付宝收款)")):u("",!0),a.pay_type==3?(s(),o("span",ze,"(余额支付)")):u("",!0),a.pay_type==1?(s(),o("span",Ie,"(微信支付)")):u("",!0)])):(s(),o("div",Se,n(a.paid_name),1))]),a.is_writeoff==0?(s(),o("div",Ve,"核销码:"+n(a.verify_code),1)):(s(),o("div",De,"已核销:"+n(a.verify_code),1))])],10,re))),128)),c.value?(s(),o("div",Oe,"没有更多了")):u("",!0),p.value?(s(),o("div",Re,"加载中...")):u("",!0)])),[[V,p.value]])])}}},Ee=H(Be,[["__scopeId","data-v-c1565278"]]),f=r=>(J("data-v-76c1152d"),r=r(),P(),r),Fe={class:"my-order"},Le={key:0,class:"detail"},Ke={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ne=f(()=>e("div",{class:"table-title"},"订单信息",-1)),Ue={class:"table-info"},Ae={class:"in