1import{h as b}from"./helper-9b5232e9.js";import{_ as et}from"./AppDateTimePicker-6fa7f400.js";import{_ as ot}from"./AppSelect-35e40930.js";import{_ as at}from"./AppTextField-4e2a4da9.js";import{S as lt,a as st}from"./common-c7559dd5.js";import{p as it}from"./paginationMeta-cec5d9a4.js";import{X as C}from"./xlsx-2317bdb2.js";import{e as B}from"./errorApi-31e188f2.js";import{h as U,b as M,S as nt}from"./index-965cf6ae.js";import{$ as D}from"./api-bbbbbd14.js";import{v as ct,w as S,x as y,f as T,k as L,E as dt,X as _t,a as $,Q as k,I as rt}from"./vuetify-a1472a75.js";import{r as h,w as ut,a as ht,e as mt,a9 as pt,V as s,W as n,y as a,a0 as l,u as i,O as r,Z as o,F,ac as j,a8 as yt,R as m,$ as E,a1 as _,m as G,A as H}from"./vue-core-b1dd8cf9.js";import"./MUADEE-6dd69b8a.js";import"./vpbank-f55d8015.js";const kt=o("h4",{class:"text-h4 font-weight-medium mb-4"},[o("span",{style:{color:"#A5A2AD","font-weight":"600"}},"DANH SÃCH TICKET")],-1),vt={class:"table-container mt-0"},ft=o("colgroup",null,[o("col",{style:{width:"150px"}}),o("col",{style:{width:"50px"}}),o("col",{style:{width:"200px"}})],-1),gt={style:{border:"1px solid black","border-collapse":"collapse"}},xt=o("tr",null,[o("th",{colspan:"1",rowspan:"3",style:{"text-align":"center","font-weight":"600"}},"Thao tác"),o("th",{colspan:"1",rowspan:"3",style:{"text-align":"center","font-weight":"600"}},"STT"),o("th",{colspan:"4",style:{"background-color":"rgba(239, 177, 201, 0.15)","text-align":"center","font-weight":"600"}},"Mã"),o("th",{colspan:"5",style:{"background-color":"rgba(239, 177, 130, 0.15)","text-align":"center","font-weight":"600"}},"Thông tin ticket"),o("th",{colspan:"5",style:{"background-color":"rgba(0, 207, 232, 0.15)","text-align":"center","font-weight":"600"}},"Thông tin ÄÆ¡n hà ng")],-1),bt={key:0,class:"sticky-col first-col",style:{display:"flex"}},Tt={key:1,style:{"text-align":"center"}},Vt={style:{border:"1px solid black"}},wt={class:"fixed5 sticky-col three-col text-center"},Ct={class:"sticky-col three-col text-center"},At={class:"sticky-col three-col text-center"},Mt={class:"fixed5"},St={class:"fixed6"},Et={class:"fixedlast fixed-end"},Pt={class:"sticky-col three-col text-center"},Rt={key:0},Dt={key:1},Kt={class:"fixedlast fixed-end"},Nt={class:"fixedlast fixed-end"},Bt={class:"sticky-col three-col text-center"},Ut={key:0},Lt={key:1},$t={key:2},Ft={key:3},jt={key:4},Gt={key:5},Ht={key:6},Xt={class:"sticky-col three-col text-center"},zt={class:"sticky-col three-col text-center"},It={class:"fixedlast fixed-end"},Yt={class:"sticky-col three-col text-center"},Qt={key:0},Wt=o("span",{style:{color:"#17a2b8"}},"Khá»i tạo",-1),qt=[Wt],Ot={key:1},Zt=o("span",{style:{color:"#28a745"}},"Thà nh công",-1),Jt=[Zt],te={key:2},ee=o("span",{style:{color:"#dc3545"}},"Từ chá»i",-1),oe=[ee],ae={key:3},le=o("span",{style:{color:"#ffc107"}},"Chá» duyá»t",-1),se=[le],ie={key:4},ne=o("span",{style:{color:"#ffc107"}},"Chá» chuyá»n Äá»i TG",-1),ce=[ne],de={key:5},_e=o("span",{style:{color:"#ffc107"}},"Äang xá» lý",-1),re=[_e],ue={key:6},he=o("span",{style:{color:"#dc3545"}},"Chá» thanh toán trả trưá»c",-1),me=[he],pe={key:7},ye=o("span",{style:{color:"#dc3545"}},"Hết hạn",-1),ke=[ye],ve={key:8},fe=o("span",{style:{color:"#ffc107"}},"Äang hoà n",-1),ge=[fe],xe={key:9},be=o("span",{style:{color:"#6c757d"}},"Äã hoà n",-1),Te=[be],Ve={class:"sticky-col three-col text-center"},we={key:0},Ce=o("span",null,"VA",-1),Ae=[Ce],Me={key:1},Se=o("span",null,"BNPL",-1),Ee=[Se],Pe={key:2},Re=o("span",null,"Thẻ tÃn dụng",-1),De=[Re],Ke={key:3},Ne=o("span",null,"Trả góp",-1),Be=[Ne],Ue={key:4},Le=o("span",null,"ATM",-1),$e=[Le],Fe={key:5},je=o("span",null,"VNPAY QR",-1),Ge=[je],He={key:6},Xe=o("span",null,"VÃ",-1),ze=[Xe],Ie={key:7},Ye=o("span",null,"Chi há»",-1),Qe=[Ye],We={class:"d-flex align-center justify-sm-space-between justify-center flex-wrap gap-3 pa-5 pt-3"},qe={class:"text-sm text-disabled mb-0"},ho={__name:"index",setup(Oe){const P=new nt,p=h(10);h(10);const K=h(10),v=h(1);U("merchantData"),h(1),h(!1),h("");const e=h({ticket_id:null,status:null,order_code:null,mrc_order_id:null,type_order:null,service_type:null,time_range:null,payment_method:null,time_from:null,time_to:null,export_data:0,time_type:1});
1U("userData"),h(),h(""),h();const X=[{title:"Chưa tạo trên CS",value:"0"},{title:"Khá»i tạo",value:"1"},{title:"Äã tiếp nháºn",value:"2"},{title:"Äã hoà n thà nh",value:"3"},{title:"Äã xóa trên CS",value:"6"}],z=[{title:"VA",value:1},{title:"BNPL",value:2},{title:"Thẻ tÃn dụng",value:3},{title:"Trả góp thẻ",value:4},{title:"ATM",value:5},{title:"VNPAYQR",value:6},{title:"Chi há»",value:8}],I=[{title:"Khiếu nại",value:1},{title:"Tra soát",value:2}],Y=[{title:"Thá»i gian tạo",value:1},{title:"Thá»i gian cáºp nháºt",value:2}],Q=[{title:"Mã ticket",key:"ticket_inits_id"},{title:"ÄÆ¡n hà ng BK",key:"order_id"},{title:"ÄÆ¡n hà ng MRC",key:"mrc_order_id"},{title:"Mã Merchant",key:"merchant_id"},{title:"Loại yêu cầu",key:"service"},{title:"Thá»i gian tạo",key:"created_at"},{title:"Thá»i gian cáºp nháºt",key:"updated_at"},{title:"Trạng thái",key:"status"},{title:"Kết quả xá» lý",key:"status"},{title:"Giá trá» ÄÆ¡n hà ng",key:"amount"},{title:"Thá»i gian cáºp nháºt",key:"order_updated_at"},{title:"Trạng thái ÄÆ¡n hà ng",key:"order_status"},{title:"Phương thức",key:"payment_method"}],R=h([]),V=h(0),N=async()=>{try{const c=await D.get("/complain/list",{params:{per_page:p.value,page:v.value,status:e.value.status,ticket_id:e.value.ticket_id,service_type:e.value.service_type,order_code:e.value.order_code,mrc_order_id:e.value.mrc_order_id,time:e.value.time_range,payment_method:e.value.payment_method,time_type:e.value.time_type,time_to:e.value.time_to,time_from:e.value.time_from}});if(c.data.code==1)R.value=c.data.data.data,V.value=c.data.data.total,K.value=c.data.data.total;else{const d=B.handleApiError(c.data.code);P.showError(d)}}catch(c){console.error("Error fetching data:",c)}},W=async()=>{await D.get("/complain/list",{params:{per_page:p.value,page:v.value,status:e.value.status,ticket_id:e.value.ticket_id,service_type:e.value.service_type,order_code:e.value.order_code,mrc_order_id:e.value.mrc_order_id,time:e.value.time_range,payment_method:e.value.payment_method,time_type:e.value.time_type,time_to:e.value.time_to,time_from:e.value.time_from,export_data:1}}).then(c=>{c.data.code!=1,J(c.data.data,"Danh sách ticket.xlsx")}).catch(c=>{P.showError(c)})},q=async()=>{window.location.reload(!0)},O=async()=>{try{const c=await D.get("/complain/list",{params:{per_page:p.value,page:1,status:e.value.status,ticket_id:e.value.ticket_id,service_type:e.value.service_type,order_code:e.value.order_code,mrc_order_id:e.value.mrc_order_id,time:e.value.time_range,payment_method:e.value.payment_method,time_type:e.value.time_type,time_to:e.value.time_to,time_from:e.value.time_from}});if(c.data.code==1)R.value=c.data.data.data,V.value=c.data.data.total,K.value=c.data.data.total;else{const d=B.handleApiError(c.data.code);P.showError(d)}}catch(c){console.error("Error fetching data:",c)}},Z=async()=>{try{console.log(e.value.ticket_id),e.value.ticket_id=null,e.value.status=null,e.value.order_code=null,e.value.mrc_order_id=null,e.value.type_order=null,e.value.service_type=null,e.value.time_range=null,e.value.payment_method=null,e.value.time_from=null,e.value.time_to=null,e.value.export_data=0,e.value.time_type=1,console.log("remove",e.value.ticket_id)}catch(c){console.error("Error fetching data:",c)}},J=(c,d="export.xlsx")=>{function w(u){if(u===1)return"Khiếu nại";if(u===2)return"Tra soát"}const f=c.map((u,tt)=>({stt:tt+1,status:b.convetStatusTicket(u.ticket_inits_status),result_status:null,ticket_id:u.ticket_init_id,order_id:u.order_code,merchant_order_id:u.mrc_order_id,merchant_code:u.merchant_code,service:w(u.ticket_inits_service),created_at:u.ticket_inits_created_at,updated_at:u.ticket_inits_updated_at,amount:b.formatMoney(u.amount),order_status:b.convetOrderStatus(u.order_status),order_updated_at:b.formatDate(u.order_updated_at),payment_method:b.convetPaymentMethod(u.payment_method)})),A=[{wch:10},{wch:10},{wch:20},{wch:25},{wch:20},{wch:15},{wch:20},{wch:50},{wch:20},{wch:20},{wch:20},{wch:40},{wch:50},{wch:50}],x=["STT","Mã ticket","ÄÆ¡n hà ng BK","ÄÆ¡n hà ng MRC","Mã Merchant","Loại yêu cầu","Thá»i gian tạo","Thá»i gian cáºp nháºt","Trạng thái","Kết quả xá» lý","Giá trá» ÄÆ¡n","Thá»i gian cáºp nháºt ÄÆ¡n","Trạng thái ÄÆ¡n","Phương thức thanh toán"],t=C.utils.json_to_sheet(f,{header:["stt","ticket_id","order_id","merchant_order_id","merchant_code","service","created_at","updated_at","status","result_status","amount","order_updated_at","order_status","payment_method"]});t["!cols"]=A,t[""],C.utils.sheet_add_aoa(t,[x],{origin:"A1"},{horizontal:"top"});const g=C.utils.book_new();C.utils.book_append_sheet(g,t,"Danh_sách_ticket"),C.writeFile(g)};return ut([p,v],()=>{N()}),ht(()=>{N()}),mt({per_page:lt[st],page:10,sort_by:null,order_by:null}),(c,d)=>{const w=at,f=ot,A=et,x=pt("RouterLink");return s(),n("div",null,[kt,a(L,null,{default:l(()=>[a(ct,null,{default:l(()=>[a(S,null,{default:l(()=>[a(y,{cols:"3"},{default:l(()=>[a(w,{label:"Mã ticket",modelValue:i(e).ticket_id,"onUpdate:modelValue":d[
10]||(d[0]=t=>i(e).ticket_id=t),placeholder:"Nháºp mã ticket",density:"compact"},null,8,["modelValue"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(w,{label:"Mã ÄÆ¡n hà ng BK",modelValue:i(e).order_code,"onUpdate:modelValue":d[1]||(d[1]=t=>i(e).order_code=t),placeholder:"Nháºp mã ÄÆ¡n hà ng BK",density:"compact"},null,8,["modelValue"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(w,{label:"Mã ÄÆ¡n hà ng MRC",modelValue:i(e).mrc_order_id,"onUpdate:modelValue":d[2]||(d[2]=t=>i(e).mrc_order_id=t),placeholder:"Nháºp mã ÄÆ¡n hà ng MRC",density:"compact"},null,8,["modelValue"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(f,{label:"Phương thức",modelValue:i(e).payment_method,"onUpdate:modelValue":d[3]||(d[3]=t=>i(e).payment_method=t),placeholder:"Phương thức ÄÆ¡n hà ng",density:"compact",clearable:"",items:z,"persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1}),a(S,null,{default:l(()=>[a(y,{cols:"3"},{default:l(()=>[a(f,{label:"Trạng thái ticket",modelValue:i(e).status,"onUpdate:modelValue":d[4]||(d[4]=t=>i(e).status=t),placeholder:"Trạng thái ticket",density:"compact",clearable:"",items:X},null,8,["modelValue"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(f,{label:"Thá»i gian lá»c",items:Y,modelValue:i(e).time_type,"onUpdate:modelValue":d[5]||(d[5]=t=>i(e).time_type=t),placeholder:"Thá»i gian lá»c",density:"compact",value:i(e).time_type},null,8,["modelValue","value"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(A,{modelValue:i(e).time_from,"onUpdate:modelValue":d[6]||(d[6]=t=>i(e).time_from=t),label:"Từ ngà y",placeholder:"Từ ngà y",config:{enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",time_24hr:!0,step:1}},null,8,["modelValue"])]),_:1}),a(y,{cols:"3"},{default:l(()=>[a(A,{modelValue:i(e).time_to,"onUpdate:modelValue":d[7]||(d[7]=t=>i(e).time_to=t),label:"Äến ngà y",placeholder:"Äến ngà y",config:{enableTime:!0,enableSeconds:!0,dateFormat:"Y-m-d H:i:S",time_24hr:!0,step:1}},null,8,["modelValue"])]),_:1})]),_:1}),a(S,null,{default:l(()=>[a(y,{cols:"3"},{default:l(()=>[a(f,{label:"Phân loại",modelValue:i(e).service_type,"onUpdate:modelValue":d[8]||(d[8]=t=>i(e).service_type=t),placeholder:"Chá»n phân loại",density:"compact",clearable:"",items:I},null,8,["modelValue"])]),_:1})]),_:1}),a(S,{class:"justify-end"},{default:l(()=>[a(y,{cols:"3",sm:"3",class:"d-flex justify-end"},{default:l(()=>[a(T,{class:"mt-3 mr-3 text-button","prepend-icon":"tabler-search",style:{"background-color":"rgba(50, 172, 74, 1)"},variant:"tonal",onClick:O},{default:l(()=>[r(" Tìm kiếm ")]),_:1}),a(T,{class:"mt-3","prepend-icon":"tabler-x",variant:"tonal",color:"secondary",onClick:Z},{default:l(()=>[r(" Bá» lá»c ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),a(L,{class:"mt-5"},{default:l(()=>[o("div",null,[a(y,{cols:"6",sm:"6"},{default:l(()=>[a(T,{style:{"margin-top":"30px","margin-left":"16px","margin-bottom":"20px"},"prepend-icon":"tabler-screen-share",variant:"tonal",color:"success",onClick:W},{default:l(()=>[r(" Export ")]),_:1}),a(T,{style:{"margin-top":"30px","margin-left":"20px",color:"white","margin-bottom":"20px","background-color":"rgba(50, 172, 74, 1)"},"prepend-icon":"tabler-refresh",variant:"tonal",class:"text-button",onClick:q},{default:l(()=>[r(" Refresh ")]),_:1})]),_:1})]),o("div",vt,[a(dt,{class:"data-table table-bordered mb-2 text-no-wrap","fixed-header":""},{default:l(()=>[ft,o("thead",gt,[xt,o("tr",null,[(s(),n(F,null,j(Q,t=>o("th",{key:t.key,class:yt(t.class),style:{textAlign:"center",fontWeight:"600"}},[t.key=="check"?(s(),n("span",bt,[a(_t,{modelValue:c.selectAll,"onUpdate:modelValue":d[9]||(d[9]=g=>c.selectAll=g),onClick:c.toggleSelectAll},null,8,["modelValue","onClick"]),r(" â ")])):(s(),n("span",Tt,m(t.title),1))],2)),64))])]),o("tbody",Vt,[(s(!0),n(F,null,j(i(R),(t,g)=>(s(),n("tr",{key:g},[o("td",wt,[t.ticket_inits_service==1&&i(M)("portal.complain.detail_ticket","Chi tiết khiếu nại")?(s(),E(x,{key:0,to:{name:"complaint-detail-id",params:{id:t.ticket_init_id}}},{default:l(()=>[a($,{icon:"tabler-eye"})]),_:2},1032,["to"])):t.ticket_inits_service==2&&i(M)("portal.complain.detail_ticket","Chi tiết khiếu nại")?(s(),E(x,{key:1,to:{name:"complaint-detail-tracing-id",params:{id:t.ticket_commons_id}}},{default:l(()=>[a($,{icon:"tabler-eye",style:{color:"#10d2e9"}})]),_:2},1032,["to"])):_("",!0)]),o("td",Ct,m(i(p)*(i(v)-1)+g+1),1),o("td",At,[t.ticket_inits_service==1&&i(M)("portal.complain.detail_ticket","Chi tiết khiếu nại")?(s(),E(x,{key:0,to:{name:"complaint-detail-id",params:{id:t.ticket_init_id}}},{default:l(()=>[r(m(t.ticket_init_id),1)]),_:2},1032,["to"])):t.ticket_inits_service==2&&i(M)("portal.complain.detail_ticket","Chi tiết khiếu nại")?(s(),E(x,{key:1,to:{name:"complaint-detail-tracing-id",params:{id:t.ticket_commons_id}},style:{color:"#10d2e9"}},{default:l(()=>[r(m(t.ticket_init_id),1)]),_:2},1032,["to"])):_("",!0)]),o("td",Mt,m(t.order_code),1),o("td",St,m(t.mrc_order_id),1),o("td",Et,m(t.merchant_code),1),o("td",Pt,[t.ticket_inits_service==1?(s(),n("div",Rt,[a(k,{color:"success"},{default:l(()=>[r(" Khiếu nại ")]),_:1})])):_("",!0),t.ticket_inits_service==2?(s(),n("div",Dt,[a(k,{color:"info"},{default:l(()=>[r(" Tra soát ")]),_:1})])):_("",!0)]),o("td",Kt,m(t.ticket_inits_created_at),1),o("td",Nt,m(t.ticket_inits_updated_at),1),o("td",Bt,[t.ticket_inits_status==0?(s(),n("div",Ut,[a(k,{color:"info"},{default:l(()=>[r(" Khá»i tạo ")]),_:1})])):_("",!0),t.ticket_inits_status==1?(s(),n("div",Lt,[a(k,{color:"info"},{default:l(()=>[r(" Khá»i tạo ")]),_:1})])):_("",!0),t.ticket_inits_status==2?(s(),n("div",$t,[a(k,{class:"ma-2",color:"warning"},{default:l(()=>[r(" Äã tiếp nháºn ")]),_:1})])):_("",!0),t.ticket_inits_status==3?(s(),n("div",Ft,[a(k,{color:"success"},{default:l(()=>[r(" Äã hoà n thà nh ")]),_:1})])):_("",!0),t.ticket_inits_status==4?(s(),n("div",jt,[a(k,{color:"success"},{default:l(()=>[r(" Äã hoà n thà nh ")]),_:1})])):_("",!0),t.ticket_inits_status==5?(s(),n("div",Gt,[a(k,{color:"warning"},{default:l(()=>[r(" Äã tiếp nháºn ")]),_:1})])):_("",!0),t.ticket_inits_status==6?(s(),n("div",Ht,[a(k,{color:"error"},{default:l(()=>[r(" Äã xóa trên CS ")]),_:1})])):_("",!0)]),o("td",Xt,m(t.result_status_ticket),1),o("td",zt,m(("helper"in c?c.helper:i(b)).formatMoney(t.amount)),1),o("td",It,m(t.order_updated_at),1),o("td",Yt,[t.order_status==0?(s(),n("div",Qt,qt)):_("",!0),t.order_status==1?(s(),n("div",Ot,Jt)):_("",!0),t.order_status==2?(s(),n("div",te,oe)):_("",!0),t.order_status==3?(s(),n("div",ae,se)):_("",!0),t.order_status==4?(s(),n("div",ie,ce)):_("",!0),t.order_status==5?(s(),n("div",de,re)):_("",!0),t.order_status==6?(s(),n("div",ue,me)):_("",!0),t.order_status==7?(s(),n("div",pe,ke)):_("",!0),t.order_status==8?(s(),n("div",ve,ge)):_("",!0),t.order_status==9?(s(),n("div",xe,Te)):_("",!0)]),o("td",Ve,[t.payment_method==1?(s(),n("div",we,Ae)):_("",!0),t.payment_method==2?(s(),n("div",Me,Ee)):_("",!0),t.payment_method==3?(s(),n("div",Pe,De)):_("",!0),t.payment_method==4?(s(),n("div",Ke,Be)):_("",!0),t.payment_method==5?(s(),n("div",Ue,$e)):_("",!0),t.payment_method==6?(s(),n("div",Fe,Ge)):_("",!0),t.payment_method==7?(s(),n("div",He,ze)):_("",!0),t.payment_method==8?(s(),n("div",Ie,Qe)):_("",!0)])]))),128))])]),_:1}),o("div",We,[o("p",qe,m(i(it)({page:i(v),itemsPerPage:i(p)},i(V))),1),a(f,{modelValue:i(p),"onUpdate:modelValue":d[10]||(d[10]=t=>G(p)?p.value=t:null),no:"",style:{"max-inline-size":"6.25rem","min-inline-size":"6.25rem"},items:[5,10,20,50,100]},null,8,["modelValue"]),a(rt,{modelValue:i(v),"onUpdate:modelValue":d[11]||(d[11]=t=>G(v)?v.value=t:null),length:Math.ceil(i(V)/i(p)),"total-visible":c.$vuetify.display.xs?1:Math.min(Math.ceil(i(V)/i(p)),5)},{prev:l(t=>[a(T,H({variant:"tonal",color:"default"},t,{icon:!1}),{default:l(()=>[r(" Trưá»c ")]),_:2},1040)]),next:l(t=>[a(T,H({variant:"tonal",color:"default"},t,{icon:!1}),{default:l(()=>[r(" Sau ")]),_:2},1040)]),_:1},8,["modelValue","length","total-visible"])])])]),_:1})])}}};export{ho as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.