2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{U as we,a4 as Ee,H as Be,$ as Ce,C as be,D as ke,J as he,K as Ve,w as xe,F as Se,L as $e,M as Me,b as Ae,N as Te,O as Ue}from"./element-plus.91c68cc0.js";import{_ as Le}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{_ as Re}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{_ as Ye}from"./index.vue_vue_type_script_setup_true_lang.96f62f54.js";import{d as W,s as I,r as m,Z as ze,i as Ie,af as Ke,ap as Ne,o as n,c as _,U as o,L as a,u as l,aa as Oe,T as S,a9 as $,K as i,j as K,R as r,M as N,a as O,S as B,Q as C,n as P}from"./@vue.76ce7aa3.js";import{u as Pe}from"./usePaging.f8c888e4.js";import{u as je}from"./useDictOptions.1cd81cc1.js";import{a as Q}from"./store_order.29a4dd3c.js";import{h as qe}from"./index.0e5577f4.js";import"./lodash.4e6d2a38.js";import{a as Ge}from"./system_store.2fa4ef1a.js";import{h as Z}from"./moment.40bc58bf.js";import{_ as He}from"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.52d30a0f.js";import{_ as Je}from"./addBeforehand.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.13d7db5f.js";import{_ as Qe}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.038b36f4.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.395bb96e.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./beforehand_order.921a0c7e.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.d43e61d8.js";import"./orderInfo.vue_vue_type_script_setup_true_name_orderInfo_lang.b69d9111.js";import"./storeTable.vue_vue_type_script_setup_true_name_storeTable_lang.6a985fc5.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.8dee722c.js";import"./store_product.95e574d3.js";import"./store_branch_product.6d5b4431.js";import"./warehouse_product_storege.1636c94e.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.a6f1e238.js";import"./refundOrderProduct.vue_vue_type_script_setup_true_name_refundOrderProduct_lang.0672e390.js";import"./warehouse.501c66b8.js";const Ze={class:"mt-4"},We={class:"truncate text-[12px]"},Xe={key:0,style:{"text-align":"left"}},et={key:0},tt={key:1},ot={class:"flex mt-4 justify-end"},lt=W({name:"storeOrderLists"}),io=W({...lt,setup(at){const M=I(),A=I(),T=I(),U=m(!1),L=m(!1),R=m(!1),X=[{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]}}],f=m([]),u=ze({order_id:"",uid:"",pay_type:"",store_id:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null,source:""}),Y=m("0"),ee=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):s==60&&(u.is_delivery=1,u.status=null,u.paid=null,u.is_writeoff=null),c()},te=()=>{f.value[0]&&f.value[1]?(u.start_time=Z(f.value[0]).format("YYYY-MM-DD")+" 00:00:00",u.end_time=Z(f.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(u.start_time="",u.end_time=""),c()},b=m(!1),j=m([]),oe=(s="")=>{b.value=!0,Ge({name:s,page_size:50}).then(e=>{j.value=e.lists,setTimeout(()=>{b.value=!1},300)}).catch(e=>{setTimeout(()=>{b.value=!1},300)})},le=m([]),ae=s=>{le.value=s.map(({id:e})=>e)},{dictData:k}=je("pay_type"),{pager:y,getLists:c,resetParams:ue,resetPage:D}=Pe({fetchFun:Q,params:u}),se=async s=>{var e,p;L.value=!0,await P(),(e=A.value)==null||e.open(),(p=A.value)==null||p.getDetail(s)},ne=async s=>{var e,p;R.value=!0,await P(),(e=T.value)==null||e.open(),(p=T.value)==null||p.getDetail(s)},re=async s=>{var e,p;U.value=!0,await P(),(e=M.value)==null||e.open("edit"),(p=M.value)==null||p.setFormData(s)},h=m(!1),q=m([]),ie=(s="")=>{h.value=!0,qe({nickname:s,page_size:50}).then(e=>{q.value=e.lists,setTimeout(()=>{h.value=!1},300)}).catch(e=>{setTimeout(()=>{h.value=!1},300)})};return Ie(()=>{c()}),(s,e)=>{const p=be,v=ke,V=he,x=Ve,de=we,F=xe,pe=Ye,me=Se,G=$e,_e=Ke("router-link"),g=Ee,fe=Be,d=Me,ce=Ae,w=Ce,ve=Re,ye=Te,De=Le,H=Ne("perms"),Fe=Ue;return n(),_("div",null,[o(G,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(me,{class:"mb-[-16px]",model:l(u),inline:""},{default:a(()=>[o(v,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:a(()=>[o(p,{class:"w-[280px]",modelValue:l(u).order_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(u).order_id=t),onKeydown:Oe(l(D),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),o(v,{label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[o(x,{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":oe,loading:l(b),style:{width:"240px"},onChange:l(D)},{default:a(()=>[(n(!0),_(S,null,$(l(j),t=>(n(),i(V,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(v,{label:"\u7528\u6237",prop:"uid"},{default:a(()=>[o(x,{modelValue:l(u).uid,"onUpdate:modelValue":e[2]||(e[2]=t=>l(u).uid=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":ie,loading:l(h),style:{width:"240px"},onChange:l(D)},{default:a(()=>[(n(!0),_(S,null,$(l(q),t=>(n(),i(V,{key:t.id,label:`${t.real_name}|${t.mobile} (ID:${t.id})`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(v,{label:"\u65E5\u671F",prop:"order_id"},{default:a(()=>[o(de,{modelValue:l(f),"onUpdate:modelValue":e[3]||(e[3]=t=>K(f)?f.value=t:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:X,onChange:te},null,8,["modelValue"])]),_:1}),o(v,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:a(()=>[o(x,{class:"w-[280px]",modelValue:l(u).pay_type,"onUpdate:modelValue":e[4]||(e[4]=t=>l(u).pay_type=t),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:l(D)},{default:a(()=>[(n(!0),_(S,null,$(l(k).pay_type,t=>(n(),i(V,{label:t.name,value:t.value,key:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),o(v,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"source"},{default:a(()=>[o(x,{class:"w-[280px]",modelValue:l(u).source,"onUpdate:modelValue":e[5]||(e[5]=t=>l(u).source=t),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",onChange:l(D)},{default:a(()=>[o(V,{label:"\u6279\u53D1\u8BA2\u5355",value:"4"})]),_:1},8,["modelValue","onChange"])]),_:1}),o(v,null,{default:a(()=>[o(F,{type:"primary",onClick:l(D)},{default:a(()=>e[12]||(e[12]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(F,{onClick:e[6]||(e[6]=t=>l(ue)())},{default:a(()=>e[13]||(e[13]=[r("\u91CD\u7F6E")])),_:1}),o(pe,{class:"ml-2.5","fetch-fun":l(Q),params:l(u),"page-size":l(y).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),N((n(),i(G,{class:"!border-none",shadow:"never"},{default:a(()=>[o(fe,{modelValue:l(Y),"onUpdate:modelValue":e[7]||(e[7]=t=>K(Y)?Y.value=t:null),onChange:ee},{default:a(()=>[N((n(),i(_e,{to:{path:"store_order/add"},class:"ml-4 mr-4"},{default:a(()=>[o(F,{type:"primary"},{default:a(()=>e[14]||(e[14]=[r(" \u6DFB\u52A0\u8BA2\u5355 ")])),_:1})]),_:1})),[[H,["order/store_order/add"]]]),o(g,{label:"0"},{default:a(()=>e[15]||(e[15]=[r("\u5168\u90E8")])),_:1}),o(g,{label:"1"},{default:a(()=>e[16]||(e[16]=[r("\u5F85\u652F\u4ED8")])),_:1}),o(g,{label:"2"},{default:a(()=>e[17]||(e[17]=[r("\u5F85\u6838\u9500")])),_:1}),o(g,{label:"60"},{default:a(()=>e[18]||(e[18]=[r("\u5DF2\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458")])),_:1}),o(g,{label:"3"},{default:a(()=>e[19]||(e[19]=[r("\u5DF2\u5B8C\u6210")])),_:1}),o(g,{label:"4"},{default:a(()=>e[20]||(e[20]=[r("\u5DF2\u9000\u6B3E")])),_:1})]),_:1},8,["modelValue"]),O("div",Ze,[o(ye,{data:l(y).lists,onSelectionChange:ae},{default:a(()=>[o(d,{label:"ID",prop:"id","show-overflow-tooltip":"",width:"100"}),o(d,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":"",width:"200"}),o(d,{label:"\u5546\u54C1\u4FE1\u606F",prop:"order_id",width:"150","show-overflow-tooltip":""},{default:a(({row:t})=>{var E,J;return[(n(!0),_(S,null,$((E=t.product)==null?void 0:E.slice(0,3),(z,ge)=>(n(),_("div",{class:"flex items-center mb-2",key:ge},[o(ce,{class:"w-[30px] h-[30px] mr-2 flex-shrink-0",src:z.image,fit:"cover","preview-src-list":[z.image],"preview-teleported":!0},null,8,["src","preview-src-list"]),O("p",We,B(z.store_name),1)]))),128)),((J=t.product)==null?void 0:J.length)>3?(n(),_("div",Xe,"...")):C("",!0)]}),_:1}),o(d,{label:"\u95E8\u5E97",prop:"store_name","show-overflow-tooltip":"",width:"150"}),o(d,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":"",width:"150"}),o(d,{label:"\u5B9E\u9645\u652F\u4ED8\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":"",width:"150"}),o(d,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status_name",width:"100"},{default:a(({row:t})=>[t.refund_status==2?(n(),_("div",et,[o(w,{type:"danger"},{default:a(()=>e[21]||(e[21]=[r("\u5DF2\u9000\u6B3E")])),_:1})])):(n(),_("div",tt,[t.status_name=="\u5F85\u6536\u8D27"?(n(),i(w,{key:0,type:"success"},{default:a(()=>[r(B(t.status_name),1)]),_:2},1024)):t.status_name=="\u5DF2\u6536\u8D27"||t.status_name=="\u5DF2\u5B8C\u6210"?(n(),i(w,{key:1,type:"info"},{default:a(()=>[r(B(t.status_name),1)]),_:2},1024)):t.status_name=="\u5F85\u53D1\u8D27"||t.status_name=="\u5F85\u6838\u9500"?(n(),i(w,{key:2,type:"warning"},{default:a(()=>[r(B(t.status_name),1)]),_:2},1024)):(n(),i(w,{key:3,type:"danger"},{default:a(()=>[r(B(t.status_name),1)]),_:2},1024))]))]),_:1}),o(d,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":"",width:"100"},{default:a(({row:t})=>[o(ve,{options:l(k).pay_type,value:t.pay_type},null,8,["options","value"])]),_:1}),o(d,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"source_name","show-overflow-tooltip":"",width:"100"}),o(d,{label:"\u652F\u4ED8\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":"",width:"200"}),o(d,{label:"\u64CD\u4F5C",fixed:"right"},{default:a(({row:t})=>[o(F,{type:"primary",link:"",onClick:E=>se(t)},{default:a(()=>e[22]||(e[22]=[r("\u8BE6\u60C5")])),_:2},1032,["onClick"]),o(F,{type:"primary",link:"",onClick:E=>ne(t)},{default:a(()=>e[23]||(e[23]=[r("\u8F6C\u9884\u5B9A\u5355")])),_:2},1032,["onClick"]),t.status!=2?N((n(),i(F,{key:0,type:"primary",link:"",onClick:E=>re(t)},{default:a(()=>e[24]||(e[24]=[r("\u8BBE\u7F6E\u95E8\u5E97")])),_:2},1032,["onClick"])),[[H,["store_order.store_order/system_store"]]]):C("",!0)]),_:1})]),_:1},8,["data"])]),O("div",ot,[o(De,{modelValue:l(y),"onUpdate:modelValue":e[8]||(e[8]=t=>K(y)?y.value=t:null),onChange:l(c)},null,8,["modelValue","onChange"])])]),_:1})),[[Fe,l(y).loading]]),l(U)?(n(),i(He,{key:0,ref_key:"editRef",ref:M,"dict-data":l(k),onSuccess:l(c),onClose:e[9]||(e[9]=t=>U.value=!1)},null,8,["dict-data","onSuccess"])):C("",!0),l(L)?(n(),i(Qe,{key:1,ref_key:"detailsRef",ref:A,onSuccess:l(c),onClose:e[10]||(e[10]=t=>L.value=!1),dictData:l(k)},null,8,["onSuccess","dictData"])):C("",!0),l(R)?(n(),i(Je,{key:2,ref_key:"addBeforehandRef",ref:T,onSuccess:l(c),onClose:e[11]||(e[11]=t=>R.value=!1)},null,8,["onSuccess"])):C("",!0)])}}});export{io as default};
|