2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import{_ as O,u as W,r as t,o as Y,m as D,a as q,b as g,s as L,c as u,h as m,e,f as o,w as f,g as C,v as T,z as I,F as Q,i as j,y as G,t as d,A as S,V as H,B as R,C as N,d as J,Q as X,P as Z,W as ee,U as te}from"./index-BhwfcSvx.js";import"./moment-Cl4UOzQZ.js";import{p as oe}from"./padding-dm0HkGpn.js";const M=p=>(R("data-v-fa3e0699"),p=p(),N(),p),se={class:"my-order"},le={class:"header-nav"},ae=M(()=>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=M(()=>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}){W(),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),H(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:$}),Y(()=>{D.on("update-c-order-detail",z=>{v.value[b.value].paid=1})}),q(()=>{D.off("update-c-order-detail")}),(z,_)=>{const F=g("el-date-picker"),x=g("el-button"),E=g("el-input"),K=L("loading"),P=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},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]=T(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(Q,null,j(v.value,(V,B)=>(u(),m("div",{class:G(["item",{"item-active":b.value==B}]),key:B,onClick:Mt=>y(V,B)},[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,"没有更多了")):S("",!0),a.value?(u(),m("div",be,"加载中...")):S("",!0)])),[[K,a.value],[P,$]])])}}},$e=O(ye,[["__scopeId","data-v-fa3e0699"]]),w=p=>(R("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"},Ue=w(()=>e("div",{class:"info-item-title"},"商品款数:",-1)),Se={class:"info-item-info"},Ie={class:"info-item"},Fe=w(()=>e("div",{class:"info-item-title"},"商品总价:",-1)),Be={class:"info-item-info"},Oe={class:"info-item"},Re=w(()=>e("div",{class:"info-item-title"},"创建时间:",-1)),Ne={class:"info-item-info"},We={class:"info-item"},Ye=w(()=>e("div",{class:"info-it
|