cashier-mer/dist/assets/index-DPXYkzvo.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2024-06-09 20:41:30 +08:00
import{_ as R,u as Y,r as t,o as q,m as D,a as M,b as g,l as L,c as u,h as m,e,f as o,w as f,g as C,p as P,v as I,F as j,i as G,s as H,t as d,x as U,y as B,z as N,d as J,D as Q}from"./index-CWN5yz9-.js";import{h as X,d as Z,i as ee,m as te}from"./store-cGjVPjwr.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-DCYByQzK.js";const W=p=>(B("data-v-6dfecf0d"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=W(()=>e("div",{class:"nav-item"},d("采购订单"),-1)),ie={class:"nav-item-btn"},ne={class:"header-input"},de={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,style:{overflow:"auto"}},_e=["onClick"],ce={class:"top"},re={class:"sn"},ue={class:"create-time"},ve={class:"shop"},me={class:"left"},fe={class:"right"},pe={class:"money"},he=W(()=>e("div",{class:"bottom"},null,-1)),ge={key:0,class:"load-end"},be={key:1,class:"load-end"},ye={__name:"order",props:{isSystem:{type:Boolean,default:!1},source:{type:Number,default:0}},emits:["addAddress"],setup(p,{expose:A,emit:r}){Y(),t([]);const l=t(1);t(null);const s=t(""),c=()=>{i.value.start_time=s.value[0]+" 00:00:00",i.value.end_time=s.value[1]+" 23:59:59",$(!0)},k=z=>z.getTime()>Date.now(),i=t({page_no:1,page_size:20,number:"",start_time:"",end_time:""}),a=t(!1),n=t(0),b=t(0),h=t(!1),v=t([]),$=(z=!1)=>{if(z)i.value.page_no=1;else if(h.value||a.value)return;a.value=!0,l.value==1&&(i.value.paid=null),l.value==2&&(i.value.paid=0),X(i.value).then(_=>{z?v.value=_.data.lists:v.value=[...v.value,..._.data.lists],_.data.lists.length<i.value.page_size?h.value=!0:i.value.page_no++,b.value=0,D.emit("set-c-order-detail",v.value[0]),n.value=_.data.count,a.value=!1}).catch(_=>{h.value=!0,a.value=!1})},y=(z,_)=>{b.value=_,D.emit("set-c-order-detail",z)};return A({getOrderList:$}),q(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),M(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),T=L("infinite-scroll");return u(),m("div",se,[e("div",le,[ae,e("div",ie,[o(F,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=V=>s.value=V),type:"daterange","start-placeholder":"开始时间","end-placeholder":"结束时间",size:"small","value-format":"YYYY-MM-DD","disabled-date":k,onChange:c,clearable:!1},null,8,["modelValue"])])]),e("div",ne,[o(E,{modelValue:i.value.number,"onUpdate:modelValue":_[2]||(_[2]=V=>i.value.number=V),placeholder:"请输入订单编号",onKeydown:_[3]||(_[3]=P(V=>$(!0),["enter"])),onClear:_[4]||(_[4]=V=>$(!0)),clearable:""},{append:f(()=>[o(x,{type:"primary",style:{"background-color":"#1890ff",color:"#fff","border-radius":"0 0.315rem 0.315rem 0"},onClick:_[1]||(_[1]=V=>$(!0))},{default:f(()=>[C("搜索")]),_:1})]),_:1},8,["modelValue"])]),I((u(),m("div",de,[(u(!0),m(j,null,G(v.value,(V,O)=>(u(),m("div",{class:H(["item",{"item-active":b.value==O}]),key:O,onClick:Wt=>y(V,O)},[e("div",ce,[e("div",re,"单号: "+d(V.number),1),e("div",ue,d(V.create_time),1)]),e("div",ve,[e("div",me,[e("div",null,"订单数量 x "+d(V.order_count),1)]),e("div",fe,[e("div",pe,"¥"+d(V.total),1)])]),he],10,_e))),128)),h.value?(u(),m("div",ge,"没有更多了")):U("",!0),a.value?(u(),m("div",be,"加载中...")):U("",!0)])),[[K,a.value],[T,$]])])}}},$e=R(ye,[["__scopeId","data-v-6dfecf0d"]]),w=p=>(B("data-v-928e3cd0"),p=p(),N(),p),we=w(()=>e("h4",{style:{padding:"0",margin:"0",color:"#000"}},"订单详情",-1)),Ve={class:"dra-body"},ke={class:"detail"},ze={class:"table","infinite-scroll-distance":300,"infinite-scroll-delay":300,style:{overflow:"auto"},"infinite-scroll-immediate":!1},Ce={class:"table-info"},Ae={class:"info-item"},xe=w(()=>e("div",{class:"info-item-title"},"订单编号:",-1)),De={class:"info-item-info"},Le={class:"info-item"},Se=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Ue={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Oe={class:"info-item-info"},Re={class:"info-item"},Be=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},Ye={class