2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{U as ce,a2 as ve,H as he,$ as ye,C as De,D as Fe,J as ge,K as we,w as Ee,F as be,L as Ce,M as Be,b as ke,N as Ve,O as xe}from"./element-plus.4a7d92a3.js";import{_ as Se}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as Ae}from"./index.vue_vue_type_script_setup_true_lang.ab7008c1.js";import{_ as Te}from"./index.vue_vue_type_script_setup_true_lang.ffcfe49c.js";import{d as q,s as K,r as p,Z as $e,i as Me,af as Ue,o as n,c as m,U as t,L as l,u as a,aa as Le,T as x,a9 as S,K as d,j as U,R as r,M as Re,a as L,S as g,Q as R,n as Oe}from"./@vue.18505fe0.js";import{u as Ye}from"./usePaging.6a6670f9.js";import{u as Pe}from"./useDictOptions.0a8ef1e8.js";import{a as N}from"./store_order.74acd2e4.js";import{j as ze}from"./beforehand_order.39173c45.js";import"./lodash.9dc701ad.js";import{a as Ie}from"./system_store.941ceebc.js";import{h as Ke}from"./index.bc979bce.js";import{h as j}from"./moment.40bc58bf.js";import{_ as Ne}from"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.f14c9c66.js";import{_ as je}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.c2c6521f.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.4ea08cc4.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./delivery_service.b6364849.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.b53d403d.js";import"./orderInfo.vue_vue_type_script_setup_true_name_orderInfo_lang.143e1eec.js";import"./storeTable.vue_vue_type_script_setup_true_name_storeTable_lang.7e067524.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.63fdc5ad.js";import"./store_product.f8be581a.js";import"./store_branch_product.389a05bf.js";import"./warehouse_product_storege.1478a2ce.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.84d1c8ef.js";import"./refundOrderProduct.vue_vue_type_script_setup_true_name_refundOrderProduct_lang.15389d61.js";import"./warehouse.353572c7.js";const qe={class:"mt-4"},Ge={class:"truncate text-[12px]"},He={key:0,style:{"text-align":"left"}},Je={key:0},Qe={key:1},Ze={class:"flex mt-4 justify-end"},We=q({name:"storeOrderLists"}),to=q({...We,setup(Xe){const G=K(),A=K(),O=p(!1),T=p(!1),H=[{text:"\u8FD1\u4E00\u5468",value:()=>{const s=new Date,o=new Date;return o.setDate(o.getDate()-7),[o,s]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const s=new Date,o=new Date;return o.setMonth(o.getMonth()-1),[o,s]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const s=new Date,o=new Date;return o.setMonth(o.getMonth()-3),[o,s]}}],_=p([]),u=$e({order_id:"",uid:"",pay_type:"",store_id:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null,source:""}),$=p("0"),J=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),v()},Q=()=>{_.value[0]&&_.value[1]?(u.start_time=j(_.value[0]).format("YYYY-MM-DD")+" 00:00:00",u.end_time=j(_.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(u.start_time="",u.end_time=""),v()},w=p(!1),Y=p([]),Z=(s="")=>{w.value=!0,Ie({name:s,page_size:50}).then(o=>{Y.value=o.lists,setTimeout(()=>{w.value=!1},300)}).catch(o=>{setTimeout(()=>{w.value=!1},300)})},W=p([]),X=s=>{W.value=s.map(({id:o})=>o)},{dictData:E}=Pe("pay_type"),{pager:c,getLists:v,resetParams:ee,resetPage:h}=Ye({fetchFun:N,params:u}),te=async s=>{var o,C;T.value=!0,await Oe(),(o=A.value)==null||o.open(),(C=A.value)==null||C.getDetail(s)},b=p(!1),P=p([]),oe=(s="")=>{b.value=!0,Ke({nickname:s,page_size:50}).then(o=>{P.value=o.lists,setTimeout(()=>{b.value=!1},300)}).catch(o=>{setTimeout(()=>{b.value=!1},300)})},ae=s=>{ze(s)};return Me(()=>{v()}),(s,o)=>{const C=De,f=Fe,B=ge,k=we,le=ce,D=Ee,ue=Te,se=be,z=Ce,ne=Ue("router-link"),y=ve,re=he,i=Be,ie=ke,F=ye,de=Ae,pe=Ve,me=Se,_e=xe;return n(),m("div",null,[t(z,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(se,{class:"mb-[-16px]",model:a(u),inline:""},{default:l(()=>[t(f,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:l(()=>[t(C,{class:"w-[280px]",modelValue:a(u).order_id,"onUpdate:modelValue":o[0]||(o[0]=e=>a(u).order_id=e),onKeydown:Le(a(h),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),t(f,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[t(k,{modelValue:a(u).store_id,"onUpdate:modelValue":o[1]||(o[1]=e=>a(u).store_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":Z,loading:a(w),style:{width:"240px"},onChange:a(h)},{default:l(()=>[(n(!0),m(x,null,S(a(Y),e=>(n(),d(B,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),t(f,{label:"\u7528\u6237",prop:"uid"},{default:l(()=>[t(k,{modelValue:a(u).uid,"onUpdate:modelValue":o[2]||(o[2]=e=>a(u).uid=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":oe,loading:a(b),style:{width:"240px"},onChange:a(h)},{default:l(()=>[(n(!0),m(x,null,S(a(P),e=>(n(),d(B,{key:e.id,label:`${e.real_name}|${e.mobile} (ID:${e.id})`,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),t(f,{label:"\u65E5\u671F",prop:"order_id"},{default:l(()=>[t(le,{modelValue:a(_),"onUpdate:modelValue":o[3]||(o[3]=e=>U(_)?_.value=e:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:H,onChange:Q},null,8,["modelValue"])]),_:1}),t(f,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:l(()=>[t(k,{class:"w-[280px]",modelValue:a(u).pay_type,"onUpdate:modelValue":o[4]||(o[4]=e=>a(u).pay_type=e),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:a(h)},{default:l(()=>[(n(!0),m(x,null,S(a(E).pay_type,e=>(n(),d(B,{label:e.name,value:e.value,key:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),t(f,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"source"},{default:l(()=>[t(k,{class:"w-[280px]",modelValue:a(u).source,"onUpdate:modelValue":o[5]||(o[5]=e=>a(u).source=e),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",onChange:a(h)},{default:l(()=>[t(B,{label:"\u6279\u53D1\u8BA2\u5355",value:"4"})]),_:1},8,["modelValue","onChange"])]),_:1}),t(f,null,{default:l(()=>[t(D,{type:"primary",onClick:a(h)},{default:l(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(D,{onClick:o[6]||(o[6]=e=>a(ee)())},{default:l(()=>[r("\u91CD\u7F6E")]),_:1}),t(ue,{class:"ml-2.5","fetch-fun":a(N),params:a(u),"page-size":a(c).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),Re((n(),d(z,{class:"!border-none",shadow:"never"},{default:l(()=>[t(re,{modelValue:a($),"onUpdate:modelValue":o[7]||(o[7]=e=>U($)?$.value=e:null),onChange:J},{default:l(()=>[t(ne,{to:{path:"store_order/add"},class:"ml-4 mr-4"},{default:l(()=>[t(D,{type:"primary"},{default:l(()=>[r(" \u6DFB\u52A0\u8BA2\u5355 ")]),_:1})]),_:1}),t(y,{label:"0"},{default:l(()=>[r("\u5168\u90E8")]),_:1}),t(y,{label:"1"},{default:l(()=>[r("\u5F85\u652F\u4ED8")]),_:1}),t(y,{label:"2"},{default:l(()=>[r("\u5F85\u6838\u9500")]),_:1}),t(y,{label:"60"},{default:l(()=>[r("\u5DF2\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458")]),_:1}),t(y,{label:"3"},{default:l(()=>[r("\u5DF2\u5B8C\u6210")]),_:1}),t(y,{label:"4"},{default:l(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})]),_:1},8,["modelValue"]),L("div",qe,[t(pe,{data:a(c).lists,onSelectionChange:X},{default:l(()=>[t(i,{label:"ID",prop:"id","show-overflow-tooltip":"",width:"100"}),t(i,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":"",width:"200"}),t(i,{label:"\u5546\u54C1\u4FE1\u606F",prop:"order_id",width:"150","show-overflow-tooltip":""},{default:l(({row:e})=>{var V,I;return[(n(!0),m(x,null,S((V=e.product)==null?void 0:V.slice(0,3),(M,fe)=>(n(),m("div",{class:"flex items-center mb-2",key:fe},[t(ie,{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"]),L("p",Ge,g(M.store_name),1)]))),128)),((I=e.product)==null?void 0:I.length)>3?(n(),m("div",He,"...")):R("",!0)]}),_:1}),t(i,{label:"\u95E8\u5E97",prop:"store_name","show-overflow-tooltip":"",width:"150"}),t(i,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":"",width:"150"}),t(i,{label:"\u5B9E\u9645\u652F\u4ED8\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":"",width:"150"}),t(i,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status_name",width:"100"},{default:l(({row:e})=>[e.refund_status==2?(n(),m("div",Je,[t(F,{type:"danger"},{default:l(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})])):(n(),m("div",Qe,[e.status_name=="\u5F85\u6536\u8D27"?(n(),d(F,{key:0,type:"success"},{default:l(()=>[r(g(e.status_name),1)]),_:2},1024)):e.status_name=="\u5DF2\u6536\u8D27"||e.status_name=="\u5DF2\u5B8C\u6210"?(n(),d(F,{key:1,type:"info"},{default:l(()=>[r(g(e.status_name),1)]),_:2},1024)):e.status_name=="\u5F85\u53D1\u8D27"||e.status_name=="\u5F85\u6838\u9500"?(n(),d(F,{key:2,type:"warning"},{default:l(()=>[r(g(e.status_name),1)]),_:2},1024)):(n(),d(F,{key:3,type:"danger"},{default:l(()=>[r(g(e.status_name),1)]),_:2},1024))]))]),_:1}),t(i,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":"",width:"100"},{default:l(({row:e})=>[t(de,{options:a(E).pay_type,value:e.pay_type},null,8,["options","value"])]),_:1}),t(i,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"source_name","show-overflow-tooltip":"",width:"100"}),t(i,{label:"\u652F\u4ED8\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":"",width:"200"}),t(i,{label:"\u64CD\u4F5C",fixed:"right"},{default:l(({row:e})=>[t(D,{type:"primary",link:"",onClick:V=>te(e)},{default:l(()=>[r("\u8BE6\u60C5")]),_:2},1032,["onClick"]),t(D,{type:"primary",link:"",onClick:V=>ae(e)},{default:l(()=>[r("\u8F6C\u9884\u5B9A\u5355")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),L("div",Ze,[t(me,{modelValue:a(c),"onUpdate:modelValue":o[8]||(o[8]=e=>U(c)?c.value=e:null),onChange:a(v)},null,8,["modelValue","onChange"])])]),_:1})),[[_e,a(c).loading]]),a(O)?(n(),d(Ne,{key:0,ref_key:"editRef",ref:G,"dict-data":a(E),onSuccess:a(v),onClose:o[9]||(o[9]=e=>O.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0),a(T)?(n(),d(je,{key:1,ref_key:"detailsRef",ref:A,onSuccess:a(v),onClose:o[10]||(o[10]=e=>T.value=!1),dictData:a(E)},null,8,["onSuccess","dictData"])):R("",!0)])}}});export{to as default};
|