2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{U as ge,a4 as we,P as Ee,$ as Be,C as Ce,D as be,G as ke,H as he,w as Ve,F as xe,M as Se,I as $e,b as Me,J as Ae,K as Ue}from"./element-plus.b2546c95.js";import{_ as Re}from"./index.vue_vue_type_script_setup_true_lang.00c0a49e.js";import{_ as Te}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{_ as Le}from"./index.vue_vue_type_script_setup_true_lang.163b7b72.js";import{d as Z,s as I,r as m,Z as Ye,i as Ie,af as Pe,ap as ze,o as n,c as _,U as o,L as u,u as a,aa as Ke,T as x,a9 as S,K as i,R as r,M as P,j as H,a as z,S as E,Q as B,n as K}from"./@vue.76ce7aa3.js";import{u as Ne}from"./usePaging.f8c888e4.js";import{u as Oe}from"./useDictOptions.25e27f78.js";import{a as J}from"./store_order.29c6d417.js";import{h as je}from"./index.fae88678.js";import"./lodash.4e6d2a38.js";import{a as Ge}from"./system_store.0a3393d1.js";import{h as Q}from"./moment.40bc58bf.js";import{_ as qe}from"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.6670fc11.js";import{_ as He}from"./addBeforehand.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.606466ee.js";import{_ as Je}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.f33db6ac.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.880c84ac.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.d7ac7577.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.0012fe14.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.867c5500.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.65c57808.js";import"./store_product.2ceba00c.js";import"./store_branch_product.6893144f.js";import"./warehouse_product_storege.0a740f1d.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.30d74b0b.js";import"./refundOrderProduct.vue_vue_type_script_setup_true_name_refundOrderProduct_lang.b9554cfe.js";import"./warehouse.b32be65c.js";const Qe={class:"mt-4"},Ze={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=Z({name:"storeOrderLists"}),ro=Z({...ot,setup(lt){const $=I(),M=I(),A=I(),U=m(!1),R=m(!1),T=m(!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]}}];m([]);const l=Ye({order_id:"",uid:"",pay_type:"",store_id:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null,source:"",timeScope:[]}),L=m("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),f()},ee=()=>{l.timeScope[0]&&l.timeScope[1]?(l.start_time=Q(l.timeScope[0]).format("YYYY-MM-DD")+" 00:00:00",l.end_time=Q(l.timeScope[1]).format("YYYY-MM-DD")+" 23:59:59"):(l.start_time="",l.end_time=""),f()},C=m(!1),N=m([]),te=(s="")=>{C.value=!0,Ge({name:s,page_size:50}).then(e=>{N.value=e.lists,setTimeout(()=>{C.value=!1},300)}).catch(e=>{setTimeout(()=>{C.value=!1},300)})},oe=m([]),le=s=>{oe.value=s.map(({id:e})=>e)},{dictData:b}=Oe("pay_type"),{pager:v,getLists:f,resetParams:ae,resetPage:y}=Ne({fetchFun:J,params:l}),ue=async s=>{var e,p;R.value=!0,await K(),(e=M.value)==null||e.open(),(p=M.value)==null||p.getDetail(s)},se=async s=>{var e,p;T.value=!0,await K(),(e=A.value)==null||e.open(),(p=A.value)==null||p.getDetail(s)},ne=async s=>{var e,p;U.value=!0,await K(),(e=$.value)==null||e.open("edit"),(p=$.value)==null||p.setFormData(s)},k=m(!1),O=m([]),re=(s="")=>{k.value=!0,je({nickname:s,page_size:50}).then(e=>{O.value=e.lists,setTimeout(()=>{k.value=!1},300)}).catch(e=>{setTimeout(()=>{k.value=!1},300)})};return Ie(()=>{f()}),(s,e)=>{const p=Ce,c=be,h=ke,V=he,ie=ge,D=Ve,de=Le,pe=xe,j=Se,me=Pe("router-link"),F=we,_e=Ee,d=$e,fe=Me,g=Be,ce=Te,ve=Ae,ye=Re,G=ze("perms"),De=Ue;return n(),_("div",null,[o(j,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[o(pe,{class:"mb-[-16px]",model:a(l),inline:""},{default:u(()=>[o(c,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:u(()=>[o(p,{class:"w-[280px]",modelValue:a(l).order_id,"onUpdate:modelValue":e[0]||(e[0]=t=>a(l).order_id=t),onKeydown:Ke(a(y),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),o(c,{label:"\u95E8\u5E97",prop:"store_id"},{default:u(()=>[o(V,{modelValue:a(l).store_id,"onUpdate:modelValue":e[1]||(e[1]=t=>a(l).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":te,loading:a(C),style:{width:"240px"},onChange:a(y)},{default:u(()=>[(n(!0),_(x,null,S(a(N),t=>(n(),i(h,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(c,{label:"\u7528\u6237",prop:"uid"},{default:u(()=>[o(V,{modelValue:a(l).uid,"onUpdate:modelValue":e[2]||(e[2]=t=>a(l).uid=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":re,loading:a(k),style:{width:"240px"},onChange:a(y)},{default:u(()=>[(n(!0),_(x,null,S(a(O),t=>(n(),i(h,{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(c,{label:"\u65E5\u671F",prop:"order_id"},{default:u(()=>[o(ie,{modelValue:a(l).timeScope,"onUpdate:modelValue":e[3]||(e[3]=t=>a(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(c,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:u(()=>[o(V,{class:"w-[280px]",modelValue:a(l).pay_type,"onUpdate:modelValue":e[4]||(e[4]=t=>a(l).pay_type=t),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:a(y)},{default:u(()=>[(n(!0),_(x,null,S(a(b).pay_type,t=>(n(),i(h,{label:t.name,value:t.value,key:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),o(c,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"source"},{default:u(()=>[o(V,{class:"w-[280px]",modelValue:a(l).source,"onUpdate:modelValue":e[5]||(e[5]=t=>a(l).source=t),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",onChange:a(y)},{default:u(()=>[o(h,{label:"\u6279\u53D1\u8BA2\u5355",value:"4"})]),_:1},8,["modelValue","onChange"])]),_:1}),o(c,null,{default:u(()=>[o(D,{type:"primary",onClick:a(y)},{default:u(()=>e[12]||(e[12]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(D,{onClick:e[6]||(e[6]=t=>a(ae)())},{default:u(()=>e[13]||(e[13]=[r("\u91CD\u7F6E")])),_:1}),o(de,{class:"ml-2.5","fetch-fun":a(J),params:a(l),"page-size":a(v).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),P((n(),i(j,{class:"!border-none",shadow:"never"},{default:u(()=>[o(_e,{modelValue:a(L),"onUpdate:modelValue":e[7]||(e[7]=t=>H(L)?L.value=t:null),onChange:X},{default:u(()=>[P((n(),i(me,{to:{path:"store_order/add"},class:"ml-4 mr-4"},{default:u(()=>[o(D,{type:"primary"},{default:u(()=>e[14]||(e[14]=[r(" \u6DFB\u52A0\u8BA2\u5355 ")])),_:1})]),_:1})),[[G,["order/store_order/add"]]]),o(F,{label:"0"},{default:u(()=>e[15]||(e[15]=[r("\u5168\u90E8")])),_:1}),o(F,{label:"1"},{default:u(()=>e[16]||(e[16]=[r("\u5F85\u652F\u4ED8")])),_:1}),o(F,{label:"2"},{default:u(()=>e[17]||(e[17]=[r("\u5F85\u6838\u9500")])),_:1}),o(F,{label:"60"},{default:u(()=>e[18]||(e[18]=[r("\u5DF2\u8BBE\u7F6E\u914D\u9001\u4EBA\u5458")])),_:1}),o(F,{label:"3"},{default:u(()=>e[19]||(e[19]=[r("\u5DF2\u5B8C\u6210")])),_:1}),o(F,{label:"4"},{default:u(()=>e[20]||(e[20]=[r("\u5DF2\u9000\u6B3E")])),_:1})]),_:1},8,["modelValue"]),z("div",Qe,[o(ve,{data:a(v).lists,onSelectionChange:le},{default:u(()=>[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:u(({row:t})=>{var w,q;return[(n(!0),_(x,null,S((w=t.product)==null?void 0:w.slice(0,3),(Y,Fe)=>(n(),_("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"]),z("p",Ze,E(Y.store_name),1)]))),128)),((q=t.product)==null?void 0:q.length)>3?(n(),_("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:u(({row:t})=>[t.refund_status==2?(n(),_("div",Xe,[o(g,{type:"danger"},{default:u(()=>e[21]||(e[21]=[r("\u5DF2\u9000\u6B3E")])),_:1})])):(n(),_("div",et,[t.status_name=="\u5F85\u6536\u8D27"?(n(),i(g,{key:0,type:"success"},{default:u(()=>[r(E(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:u(()=>[r(E(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:u(()=>[r(E(t.status_name),1)]),_:2},1024)):(n(),i(g,{key:3,type:"danger"},{default:u(()=>[r(E(t.status_name),1)]),_:2},1024))]))]),_:1}),o(d,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":"",width:"100"},{default:u(({row:t})=>[o(ce,{options:a(b).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:u(({row:t})=>[o(D,{type:"primary",link:"",onClick:w=>ue(t)},{default:u(()=>e[22]||(e[22]=[r("\u8BE6\u60C5")])),_:2},1032,["onClick"]),o(D,{type:"primary",link:"",onClick:w=>se(t)},{default:u(()=>e[23]||(e[23]=[r("\u8F6C\u9884\u5B9A\u5355")])),_:2},1032,["onClick"]),t.status!=2?P((n(),i(D,{key:0,type:"primary",link:"",onClick:w=>ne(t)},{default:u(()=>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"])]),z("div",tt,[o(ye,{modelValue:a(v),"onUpdate:modelValue":e[8]||(e[8]=t=>H(v)?v.value=t:null),onChange:a(f)},null,8,["modelValue","onChange"])])]),_:1})),[[De,a(v).loading]]),a(U)?(n(),i(qe,{key:0,ref_key:"editRef",ref:$,"dict-data":a(b),onSuccess:a(f),onClose:e[9]||(e[9]=t=>U.value=!1)},null,8,["dict-data","onSuccess"])):B("",!0),a(R)?(n(),i(Je,{key:1,ref_key:"detailsRef",ref:M,onSuccess:a(f),onClose:e[10]||(e[10]=t=>R.value=!1),dictData:a(b)},null,8,["onSuccess","dictData"])):B("",!0),a(T)?(n(),i(He,{key:2,ref_key:"addBeforehandRef",ref:A,onSuccess:a(f),onClose:e[11]||(e[11]=t=>T.value=!1)},null,8,["onSuccess"])):B("",!0)])}}});export{ro as default};
|