2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
import{V as Ee,a3 as ge,Q as we,a0 as be,C as Be,D as Ce,N as ke,O as he,w as Ve,F as xe,K as Se,G as Ae,b as $e,H as Me,I as Re}from"./element-plus.8e273e86.js";import{_ as Te}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{_ as Ue}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{_ as Le}from"./index.vue_vue_type_script_setup_true_lang.a5bf03b7.js";import{d as J,s as I,r as _,Z as Ye,i as Ie,af as ze,ap as Ke,o as n,c as f,U as o,L as a,u,aa as Ne,T as x,a9 as S,K as i,R as r,M as z,j as q,a as K,S as b,Q as B,n as N}from"./@vue.76ce7aa3.js";import{u as Oe}from"./usePaging.f8c888e4.js";import{u as Pe}from"./useDictOptions.f2f66ee7.js";import{a as H}from"./store_order.80d42190.js";import{h as je}from"./index.9f3afc43.js";import"./lodash.41b9567d.js";import{a as Ge}from"./system_store.fd45fb52.js";import{h as Z}from"./moment.40bc58bf.js";import{_ as Qe}from"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.29706bf6.js";import{_ as qe}from"./addBeforehand.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.8f992383.js";import{_ as He}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.eee14b47.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.2f78c10c.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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.28badc00.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.087fdbb4.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.4d44a7a6.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.2bd78458.js";import"./store_product.cbb903af.js";import"./store_branch_product.8408fee4.js";import"./warehouse_product_storege.6560985e.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.655ac60f.js";import"./refundOrderProduct.vue_vue_type_script_setup_true_name_refundOrderProduct_lang.eb793f20.js";import"./warehouse.0be527c8.js";const Ze={class:"mt-4"},Je={class:"truncate text-[12px]"},We={key:0,style:{"text-align":"left"}},Xe={key:0},et={key:1},tt={class:"flex mt-4 justify-end"},ot=J({name:"storeOrderLists"}),ro=J({...ot,setup(lt){const A=I(),$=I(),M=I(),R=_(!1),T=_(!1),U=_(!1),W=[{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]}}];_([]);const l=Ye({order_id:"",uid:"",pay_type:"",store_id:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null,source:"",timeScope:[]}),L=_("0"),X=s=>{s==0?(l.paid=null,l.status=null,l.is_writeoff=null):s==1?(l.paid=0,l.status=null,l.is_writeoff=null):s==2?(l.paid=1,l.status=1,l.is_writeoff=0):s==3?(l.paid=1,l.status=2,l.is_writeoff=null):s==4?(l.paid=null,l.status=4,l.is_writeoff=null):s==60&&(l.is_delivery=1,l.status=null,l.paid=null,l.is_writeoff=null),c()},ee=()=>{l.timeScope[0]&&l.timeScope[1]?(l.start_time=Z(l.timeScope[0]).format("YYYY-MM-DD")+" 00:00:00",l.end_time=Z(l.timeScope[1]).format("YYYY-MM-DD")+" 23:59:59"):(l.start_time="",l.end_time=""),c()},C=_(!1),O=_([]),te=(s="")=>{C.value=!0,Ge({name:s,page_size:50}).then(e=>{O.value=e.lists,setTimeout(()=>{C.value=!1},300)}).catch(e=>{setTimeout(()=>{C.value=!1},300)})},oe=_([]),le=s=>{oe.value=s.map(({id:e})=>e)},{dictData:k}=Pe("pay_type"),{pager:y,getLists:c,resetParams:ue,resetPage:D}=Oe({fetchFun:H,params:l}),ae=async s=>{var e,p;T.value=!0,await N(),(e=$.value)==null||e.open(),(p=$.value)==null||p.getDetail(s)},se=async s=>{var e,p;U.value=!0,await N(),(e=M.value)==null||e.open(),(p=M.value)==null||p.getDetail(s)},ne=async s=>{var e,p;R.value=!0,await N(),(e=A.value)==null||e.open("edit"),(p=A.value)==null||p.setFormData(s)},h=_(!1),P=_([]),re=(s="")=>{h.value=!0,je({nickname:s,page_size:50}).then(e=>{P.value=e.lists,setTimeout(()=>{h.value=!1},300)}).catch(e=>{setTimeout(()=>{h.value=!1},300)})};return Ie(()=>{c()}),(s,e)=>{const p=Be,v=Ce,m=ke,V=he,ie=Ee,F=Ve,de=Le,pe=xe,j=Se,me=ze("router-link"),E=ge,_e=we,d=Ae,fe=$e,g=be,ce=Ue,ve=Me,ye=Te,G=Ke("perms"),De=Re;return n(),f("div",null,[o(j,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(pe,{class:"mb-[-16px]",model:u(l),inline:""},{default:a(()=>[o(v,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:a(()=>[o(p,{class:"w-[280px]",modelValue:u(l).order_id,"onUpdate:modelValue":e[0]||(e[0]=t=>u(l).order_id=t),onKeydown:Ne(u(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(V,{modelValue:u(l).store_id,"onUpdate:modelValue":e[1]||(e[1]=t=>u(l).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":te,loading:u(C),style:{width:"240px"},onChange:u(D)},{default:a(()=>[(n(!0),f(x,null,S(u(O),t=>(n(),i(m,{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(V,{modelValue:u(l).uid,"onUpdate:modelValue":e[2]||(e[2]=t=>u(l).uid=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":re,loading:u(h),style:{width:"240px"},onChange:u(D)},{default:a(()=>[(n(!0),f(x,null,S(u(P),t=>(n(),i(m,{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(ie,{modelValue:u(l).timeScope,"onUpdate:modelValue":e[3]||(e[3]=t=>u(l).timeScope=t),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:W,onChange:ee},null,8,["modelValue"])]),_:1}),o(v,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:a(()=>[o(V,{class:"w-[280px]",modelValue:u(l).pay_type,"onUpdate:modelValue":e[4]||(e[4]=t=>u(l).pay_type=t),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:u(D)},{default:a(()=>[(n(!0),f(x,null,S(u(k).pay_type,t=>(n(),i(m,{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(V,{class:"w-[280px]",modelValue:u(l).source,"onUpdate:modelValue":e[5]||(e[5]=t=>u(l).source=t),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",onChange:u(D)},{default:a(()=>[o(m,{label:"\u666E\u901A\u8BA2\u5355",value:"1"}),o(m,{label:"\u6279\u53D1\u8BA2\u5355",value:"4"}),o(m,{label:"\u94FA\u8D27\u8BA2\u5355",value:"11"}),o(m,{label:"\u644A\u8D29\u8BA2\u5355",value:"12"}),o(m,{label:"\u4E00\u6761\u9F99\u8BA2\u5355",value:"13"}),o(m,{label:"\u4ED3\u5E93\u8865\u8D27",value:"15"}),o(m,{label:"\u5176\u4ED6\u8BA2\u5355",value:"17"})]),_:1},8,["modelValue","onChange"])]),_:1}),o(v,null,{default:a(()=>[o(F,{type:"primary",onClick:u(D)},{default:a(()=>e[12]||(e[12]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(F,{onClick:e[6]||(e[6]=t=>u(ue)())},{default:a(()=>e[13]||(e[13]=[r("\u91CD\u7F6E")])),_:1}),o(de,{class:"ml-2.5","fetch-fun":u(H),params:u(l),"page-size":u(y).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),z((n(),i(j,{class:"!border-none",shadow:"never"},{default:a(()=>[o(_e,{modelValue:u(L),"onUpdate:modelValue":e[7]||(e[7]=t=>q(L)?L.value=t:null),onChange:X},{default:a(()=>[z((n(),i(me,{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})),[[G,["order/store_order/add"]]]),o(E,{label:"0"},{default:a(()=>e[15]||(e[15]=[r("\u5168\u90E8")])),_:1}),o(E,{label:"1"},{default:a(()=>e[16]||(e[16]=[r("\u5F85\u652F\u4ED8")])),_:1}),o(E,{label:"2"},{default:a(()=>e[17]||(e[17]=[r("\u5F85\u6838\u9500")])),_:1}),o(E,{label:"60"},{default:a(()=>e[18]||(e[18]=[r("\u5DF2\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458")])),_:1}),o(E,{label:"3"},{default:a(()=>e[19]||(e[19]=[r("\u5DF2\u5B8C\u6210")])),_:1}),o(E,{label:"4"},{default:a(()=>e[20]||(e[20]=[r("\u5DF2\u9000\u6B3E")])),_:1})]),_:1},8,["modelValue"]),K("div",Ze,[o(ve,{data:u(y).lists,onSelectionChange:le},{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 w,Q;return[(n(!0),f(x,null,S((w=t.product)==null?void 0:w.slice(0,3),(Y,Fe)=>(n(),f("div",{class:"flex items-center mb-2",key:Fe},[o(fe,{class:"w-[30px] h-[30px] mr-2 flex-shrink-0",src:Y.image,fit:"cover","preview-src-list":[Y.image],"preview-teleported":!0},null,8,["src","preview-src-list"]),K("p",Je,b(Y.store_name),1)]))),128)),((Q=t.product)==null?void 0:Q.length)>3?(n(),f("div",We,"...")):B("",!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(),f("div",Xe,[o(g,{type:"danger"},{default:a(()=>e[21]||(e[21]=[r("\u5DF2\u9000\u6B3E")])),_:1})])):(n(),f("div",et,[t.status_name=="\u5F85\u6536\u8D27"?(n(),i(g,{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(g,{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(g,{key:2,type:"warning"},{default:a(()=>[r(b(t.status_name),1)]),_:2},1024)):(n(),i(g,{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(ce,{options:u(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:w=>ae(t)},{default:a(()=>e[22]||(e[22]=[r("\u8BE6\u60C5")])),_:2},1032,["onClick"]),o(F,{type:"primary",link:"",onClick:w=>se(t)},{default:a(()=>e[23]||(e[23]=[r("\u8F6C\u9884\u5B9A\u5355")])),_:2},1032,["onClick"]),t.status!=2?z((n(),i(F,{key:0,type:"primary",link:"",onClick:w=>ne(t)},{default:a(()=>e[24]||(e[24]=[r("\u8BBE\u7F6E\u95E8\u5E97")])),_:2},1032,["onClick"])),[[G,["store_order.store_order/system_store"]]]):B("",!0)]),_:1})]),_:1},8,["data"])]),K("div",tt,[o(ye,{modelValue:u(y),"onUpdate:modelValue":e[8]||(e[8]=t=>q(y)?y.value=t:null),onChange:u(c)},null,8,["modelValue","onChange"])])]),_:1})),[[De,u(y).loading]]),u(R)?(n(),i(Qe,{key:0,ref_key:"editRef",ref:A,"dict-data":u(k),onSuccess:u(c),onClose:e[9]||(e[9]=t=>R.value=!1)},null,8,["dict-data","onSuccess"])):B("",!0),u(T)?(n(),i(He,{key:1,ref_key:"detailsRef",ref:$,onSuccess:u(c),onClose:e[10]||(e[10]=t=>T.value=!1),dictData:u(k)},null,8,["onSuccess","dictData"])):B("",!0),u(U)?(n(),i(qe,{key:2,ref_key:"addBeforehandRef",ref:M,onSuccess:u(c),onClose:e[11]||(e[11]=t=>U.value=!1)},null,8,["onSuccess"])):B("",!0)])}}});export{ro as default};
|