2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
import{U as pe,a2 as de,H as me,$ as _e,C as ce,D as fe,J as ve,K as ye,w as De,F as Fe,L as Ee,M as ge,b as he,N as we,O as be}from"./element-plus.ebe4edc1.js";import{_ as ke}from"./index.vue_vue_type_script_setup_true_lang.311652af.js";import{_ as Ce}from"./index.vue_vue_type_script_setup_true_lang.ab7008c1.js";import{d as q,s as P,r as c,Z as Be,o as n,c as d,U as a,L as o,u as l,aa as xe,T,a9 as $,K as p,j as L,R as r,M as Ve,a as R,S as E,Q as U,n as I}from"./@vue.18505fe0.js";import{u as Se}from"./usePaging.6a6670f9.js";import{u as Me}from"./useDictOptions.a1e55eb5.js";import{a as Te}from"./store_order.5250aeb1.js";import"./lodash.9da25972.js";import{a as $e}from"./system_store.be21441e.js";import"./index.27b9164f.js";import{h as j}from"./moment.40bc58bf.js";import{_ as Le}from"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.edfb09d3.js";import{_ as Re}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.016f1538.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.2abc406c.js";import"./axios.9e25675c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.ae040c61.js";import"./color.130f7952.js";import"./clone.4a149bdb.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.e75c9f38.js";import"./vue-clipboard3.cacf014a.js";import"./clipboard.1f8f6543.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.1725fd28.js";import"./index.vue_vue_type_style_index_0_scoped_b8e715d9_lang.220569d0.js";import"./delivery_service.027abf30.js";import"./orderInfo.vue_vue_type_script_setup_true_name_orderInfo_lang.df3ffdb3.js";import"./storeTable.vue_vue_type_script_setup_true_name_storeTable_lang.f13d4dd8.js";import"./orderTable.vue_vue_type_script_setup_true_name_orderTable_lang.e4e89f33.js";import"./deliverTable.vue_vue_type_script_setup_true_name_deliverTable_lang.379349fe.js";const Ue={class:"mt-4"},Ye={class:"truncate text-[12px]"},Ae={key:0,style:{"text-align":"left"}},Ke={key:0},Ne={key:1},Oe={class:"flex mt-4 justify-end"},Pe=q({name:"storeOrderLists"}),Yt=q({...Pe,setup(Ie){const C=P(),B=P(),x=c(!1),V=c(!1),z=[{text:"\u8FD1\u4E00\u5468",value:()=>{const s=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,s]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const s=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,s]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const s=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,s]}}],m=c([]),u=Be({order_id:"",pay_type:"",store_id:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null}),S=c("0"),G=s=>{s==0?(u.paid=null,u.status=null,u.is_writeoff=null):s==1?(u.paid=0,u.status=null,u.is_writeoff=null):s==2?(u.paid=1,u.status=1,u.is_writeoff=0):s==3?(u.paid=1,u.status=2,u.is_writeoff=null):s==4&&(u.paid=null,u.status=4,u.is_writeoff=null),f()},H=()=>{m.value[0]&&m.value[1]?(u.start_time=j(m.value[0]).format("YYYY-MM-DD")+" 00:00:00",u.end_time=j(m.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(u.start_time="",u.end_time=""),f()},g=c(!1),Y=c([]),J=(s="")=>{g.value=!0,$e({name:s,page_size:50}).then(e=>{Y.value=e.lists,setTimeout(()=>{g.value=!1},300)}).catch(e=>{setTimeout(()=>{g.value=!1},300)})},Q=c([]),Z=s=>{Q.value=s.map(({id:e})=>e)},{dictData:h}=Me("pay_type"),{pager:v,getLists:f,resetParams:W,resetPage:w}=Se({fetchFun:Te,params:u}),X=async s=>{var e,_;V.value=!0,await I(),(e=B.value)==null||e.open(),(_=B.value)==null||_.getDetail(s)},ee=async s=>{var e,_;x.value=!0,await I(),(e=C.value)==null||e.open("edit"),(_=C.value)==null||_.setFormData(s)};return f(),(s,e)=>{const _=ce,y=fe,A=ve,K=ye,te=pe,b=De,ae=Fe,N=Ee,D=de,oe=me,i=ge,le=he,F=_e,ue=Ce,se=we,ne=ke,re=be;return n(),d("div",null,[a(N,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[a(ae,{class:"mb-[-16px]",model:l(u),inline:""},{default:o(()=>[a(y,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:o(()=>[a(_,{class:"w-[280px]",modelValue:l(u).order_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(u).order_id=t),onKeydown:xe(l(w),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),a(y,{label:"\u95E8\u5E97",prop:"store_id"},{default:o(()=>[a(K,{modelValue:l(u).store_id,"onUpdate:modelValue":e[1]||(e[1]=t=>l(u).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":J,loading:l(g),style:{width:"240px"},onChange:l(w)},{default:o(()=>[(n(!0),d(T,null,$(l(Y),t=>(n(),p(A,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),a(y,{label:"\u65E5\u671F",prop:"order_id"},{default:o(()=>[a(te,{modelValue:l(m),"onUpdate:modelValue":e[2]||(e[2]=t=>L(m)?m.value=t:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:z,onChange:H},null,8,["modelValue"])]),_:1}),a(y,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:o(()=>[a(K,{class:"w-[280px]",modelValue:l(u).pay_type,"onUpdate:modelValue":e[3]||(e[3]=t=>l(u).pay_type=t),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:l(w)},{default:o(()=>[(n(!0),d(T,null,$(l(h).pay_type,t=>(n(),p(A,{label:t.name,value:t.value,key:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a(y,null,{default:o(()=>[a(b,{type:"primary",onClick:l(w)},{default:o(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),a(b,{onClick:e[4]||(e[4]=t=>l(W)())},{default:o(()=>[r("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),Ve((n(),p(N,{class:"!border-none",shadow:"never"},{default:o(()=>[a(oe,{modelValue:l(S),"onUpdate:modelValue":e[5]||(e[5]=t=>L(S)?S.value=t:null),onChange:G},{default:o(()=>[a(D,{label:"0"},{default:o(()=>[r("\u5168\u90E8")]),_:1}),a(D,{label:"1"},{default:o(()=>[r("\u5F85\u652F\u4ED8")]),_:1}),a(D,{label:"2"},{default:o(()=>[r("\u5F85\u6838\u9500")]),_:1}),a(D,{label:"3"},{default:o(()=>[r("\u5DF2\u5B8C\u6210")]),_:1}),a(D,{label:"4"},{default:o(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})]),_:1},8,["modelValue"]),R("div",Ue,[a(se,{data:l(v).lists,onSelectionChange:Z},{default:o(()=>[a(i,{type:"selection",width:"55"}),a(i,{label:"\u8BA2\u5355ID",prop:"id","show-overflow-tooltip":""}),a(i,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":""}),a(i,{label:"\u5546\u54C1\u4FE1\u606F",prop:"order_id","min-width":"150","show-overflow-tooltip":""},{default:o(({row:t})=>{var k,O;return[(n(!0),d(T,null,$((k=t.product)==null?void 0:k.slice(0,3),(M,ie)=>(n(),d("div",{class:"flex items-center mb-2",key:ie},[a(le,{class:"w-[30px] h-[30px] mr-2 flex-shrink-0",src:M.image,fit:"cover","preview-src-list":[M.image],"preview-teleported":!0},null,8,["src","preview-src-list"]),R("p",Ye,E(M.store_name),1)]))),128)),((O=t.product)==null?void 0:O.length)>3?(n(),d("div",Ae,"...")):U("",!0)]}),_:1}),a(i,{label:"\u95E8\u5E97",prop:"store_name","show-overflow-tooltip":""}),a(i,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":""}),a(i,{label:"\u5B9E\u9645\u652F\u4ED8\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":""}),a(i,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status_name"},{default:o(({row:t})=>[t.refund_status==2?(n(),d("div",Ke,[a(F,{type:"danger"},{default:o(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})])):(n(),d("div",Ne,[t.status_name=="\u5F85\u6536\u8D27"?(n(),p(F,{key:0,type:"success"},{default:o(()=>[r(E(t.status_name),1)]),_:2},1024)):t.status_name=="\u5DF2\u6536\u8D27"||t.status_name=="\u5DF2\u5B8C\u6210"?(n(),p(F,{key:1,type:"info"},{default:o(()=>[r(E(t.status_name),1)]),_:2},1024)):t.status_name=="\u5F85\u53D1\u8D27"||t.status_name=="\u5F85\u6838\u9500"?(n(),p(F,{key:2,type:"warning"},{default:o(()=>[r(E(t.status_name),1)]),_:2},1024)):(n(),p(F,{key:3,type:"danger"},{default:o(()=>[r(E(t.status_name),1)]),_:2},1024))]))]),_:1}),a(i,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":""},{default:o(({row:t})=>[a(ue,{options:l(h).pay_type,value:t.pay_type},null,8,["options","value"])]),_:1}),a(i,{label:"\u652F\u4ED8\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":""}),a(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[a(b,{type:"primary",link:"",onClick:k=>X(t)},{default:o(()=>[r("\u8BE6\u60C5")]),_:2},1032,["onClick"]),a(b,{type:"primary",link:"",onClick:k=>ee(t)},{default:o(()=>[r("\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),R("div",Oe,[a(ne,{modelValue:l(v),"onUpdate:modelValue":e[6]||(e[6]=t=>L(v)?v.value=t:null),onChange:l(f)},null,8,["modelValue","onChange"])])]),_:1})),[[re,l(v).loading]]),l(x)?(n(),p(Le,{key:0,ref_key:"editRef",ref:C,"dict-data":l(h),onSuccess:l(f),onClose:e[7]||(e[7]=t=>x.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),l(V)?(n(),p(Re,{key:1,ref_key:"detailsRef",ref:B,onSuccess:l(f),onClose:e[8]||(e[8]=t=>V.value=!1),dictData:l(h)},null,8,["onSuccess","dictData"])):U("",!0)])}}});export{Yt as default};
|