index.1c9a6d88.js 11 KB

1
  1. import{d as de,r as w,b as M,p as _e,c as s,e as f,f as B,g,h as t,i as n,F as $,j as z,u as i,a1 as ce,C,A as S,k as j,m as p,N as me,E as P,_ as Fe}from"./index.76214426.js";import{p as we,u as fe,x as ge,w as ye}from"./pawning.a5189edc.js";import{a as he}from"./index.f040aaf5.js";import ve from"./drawer-box.ce767b9c.js";import be from"./redeem-box.3f897383.js";import ke from"./keep-box.29ce17e7.js";import De from"./overdue-box.3a901305.js";import"./pawnRequest.fd3901ff.js";import"./index.ff89a61e.js";import"./goodsForm.4625a176.js";import"./index.b661d9c5.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.45576b33.js";import"./vuedraggable.umd.e261f12f.js";import"./index.ac274cf8.js";import"./index.6fdd4b98.js";import"./sort_out.f3d53300.js";import"./index.vue_vue_type_script_setup_true_lang.8ead96e7.js";import"./drawer-payment.3a776132.js";import"./authForm.3e1a8885.js";import"./copy-dialog.704232d5.js";import"./product-detail.0f6629cb.js";import"./record-table.d09799b0.js";import"./pawnInfoForm.63d9a734.js";import"./userForm.8cca9eaa.js";import"./system.b7758e0c.js";import"./redeemGoodsForm.5a5aed39.js";import"./redeemInfoForm.dafeb3f3.js";import"./redeemUserForm.fe2126d4.js";import"./keepGoodsForm.68d5b0cf.js";import"./keepInfoForm.9745f7cd.js";import"./keepUserForm.f7482618.js";import"./overdueGoodsForm.7f374af8.js";import"./overdueInfoForm.470a4521.js";import"./overdueUserForm.9ab4addf.js";const Ee={class:"filter-form"},xe={class:"dl-flex",style:{gap:"10px"}},Be={style:{display:"flex",gap:"10px"}},Ie=p("\u4E0D\u9650"),Ce=p("\u4ECA\u65E5"),Se=p("\u6628\u65E5"),Le=p("\u8FD17\u5929"),Ve=p("\u8FD130\u5929"),Ae=p("\u7B5B\u9009"),Te={class:"data"},Me={class:"operation-btn"},$e=p("\u5BFC\u51FA\u5F53\u524D\u9875"),Pe=p("\u5BFC\u51FA\u5168\u90E8\u9875"),Re={class:"table"},Ne=["src"],Ke={key:0},Oe=p("\u5165\u5E93"),Ue=p("\u8D4E\u5F53"),Ye=p("\u7EED\u5F53"),ze={class:"pagination"},je=de({setup(qe){const L=w(),y=w(),h=w(),V=w(),v=w(""),q=[{value:"Value",label:"Label"}],u=M({status:0,days:0,keyword:"",page:1,limit:10,type:""}),I=M({list:[],count:2}),R=M({customerInfo:"",ticketInfo:"",goodsInfo:[],youLike:{}}),d=w("\u65B0\u589E\u5B58\u5F53"),_=w("\u65B0\u589E\u5B58\u5F53"),H=e=>{d.value="\u65B0\u589E\u8D4E\u5F53",_.value=["goods","auth","record"],y.value.visible=!0,y.value.currentRowTicketNo=e},G=e=>{d.value="\u65B0\u589E\u7EED\u5F53",_.value=["goods","auth","record"],h.value.visible=!0,h.value.currentRowId=e},J=e=>{(e.pawn_status=="save"||e.pawn_status=="save_expire")&&Q(e),(e.pawn_status=="renew"||e.pawn_status=="renew_expire")&&W(e),e.pawn_status=="redeem"&&X(e),e.pawn_status=="void"&&Z(e)},Q=e=>{e.youLike=e.payInfo,L.value.eventData=e,d.value="\u5B58\u5F53\u8BB0\u5F55",_.value=["goods","auth"],L.value.visible=!0},W=e=>{h.value.eventData=e,d.value="\u7EED\u5F53\u8BB0\u5F55",_.value=["goods","auth","record"],h.value.visible=!0},X=e=>{y.value.eventData=e,d.value="\u8D4E\u5F53\u8BB0\u5F55",_.value=["goods","auth","record"],y.value.visible=!0},Z=e=>{V.value.eventData=e,d.value="\u7EDD\u5F53\u8BB0\u5F55",_.value=["goods","auth","record"],V.value.visible=!0},m=()=>{we(u).then(e=>{I.list=e.list,I.count=e.count})},ee=w(),E=()=>{he().then(e=>{ee.value=e})};E(),m();const N=(e,a,c)=>{if(!c)return"-";const r=new Date(c*1e3),b=r.getFullYear(),k=String(r.getMonth()+1).padStart(2,"0"),F=String(r.getDate()).padStart(2,"0");return`${b}-${k}-${F}`},K={save:"\u5B58\u5F53",save_expire:"\u5B58\u5F53\u5230\u671F",renew:"\u7EED\u5F53",renew_expire:"\u7EED\u5F53\u5230\u671F",redeem:"\u8D4E\u5F53",void:"\u7EDD\u5F53",in_stock:"\u5165\u5E93",receive_goods:"\u6536\u8D27",pawning:"\u5178\u5F53\u4E2D",pawned:"\u7ED3\u675F\u5178\u5F53"},te=(e,a,c)=>K[c]||"\u672A\u77E5\u72B6\u6001",ae=e=>{me.alert("\u786E\u8BA4\u628A\u8BE5\u5F53\u7968\u7684\u6240\u6709\u5546\u54C1\u6539\u4E3A\u5165\u5E93\u72B6\u6001","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{fe({id:e,change_pawn_status:"in_stock"}).then(a=>{P({message:"\u5165\u5E93\u6210\u529F",type:"success"}),m(),E()})}).catch(()=>{})},O=e=>{const a=new Date(e*1e3),c=a.getFullYear(),r=String(a.getMonth()+1).padStart(2,"0"),b=String(a.getDate()).padStart(2,"0"),k=String(a.getHours()).padStart(2,"0"),F=String(a.getMinutes()).padStart(2,"0"),T=String(a.getSeconds()).padStart(2,"0");return`${c}-${r}-${b} ${k}:${F}:${T}`},U=e=>{const a=new Date(e.pawnInfoForm.start_time);e.pawnInfoForm.start_time=Math.floor(a.getTime()/1e3);const c=new Date(e.pawnInfoForm.end_time);e.pawnInfoForm.end_time=Math.floor(c.getTime()/1e3)},Y=e=>{e.pawnInfoForm.start_time=O(e.pawnInfoForm.start_time),e.pawnInfoForm.end_time=O(e.pawnInfoForm.end_time)},oe=e=>{U(e),ge({ticket_id:e.pawnInfoForm.ticket_id,other_fee:e.pawnInfoForm.other_fee,pickup_type:e.pawnInfoForm.pickup_type,business_path:e.pawnInfoForm.business_path,partner:e.pawnInfoForm.partner,handler:e.pawnInfoForm.handler,payee:e.pawnInfoForm.payee,remark:e.remark,pay_type:e.youLike.pay_type,actual_pay:Number(R.youLike.actual_pay),pay_info_remark:e.youLike.pay_info_remark,pay_info_image:e.youLike.pay_info_image}).then(a=>{y.value.visible=!1,m(),E(),P({message:"\u8D4E\u5F53\u6210\u529F",type:"success"})}).catch(()=>{Y(e)})},ne=e=>{U(e),ye({id:e.pawnInfoForm.ticket_id,period_value:e.pawnInfoForm.period_value,start_time:e.pawnInfoForm.start_time,end_time:e.pawnInfoForm.end_time,partner:e.pawnInfoForm.partner,handler:e.pawnInfoForm.handler,payee:e.pawnInfoForm.payee,partner_id:e.pawnInfoForm.partner_id,handler_id:e.pawnInfoForm.handler_id,payee_id:e.pawnInfoForm.payee_id,commission:e.pawnInfoForm.commission,other_fee:e.pawnInfoForm.other_fee,late_fee:e.pawnInfoForm.late_fee,otherFees:e.pawnInfoForm.otherFees,remark:e.remark,pay_info_remark:e.youLike.pay_info_remark,pay_info_image:e.youLike.pay_info_image,pay_info_text:e.youLike.pay_info_text,actual_pay:Number(R.youLike.actual_pay),pay_type:e.youLike.pay_type}).then(a=>{h.value.visible=!1,m(),E(),P({message:"\u7EED\u5F53\u6210\u529F",type:"success"})}).catch(()=>{Y(e)})},A=()=>{v.value&&v.value.length===2?(u.start_date=v.value[0],u.end_date=v.value[1]):(u.start_date=void 0,u.end_date=void 0),m(),E()},ue=()=>{console.log("\u4FDD\u5B58")},le=()=>{console.log("\u7EDD\u5F53")};return _e(()=>[u.page,u.limit],()=>{A()}),(e,a)=>{const c=s("el-date-picker"),r=s("el-form-item"),b=s("el-option"),k=s("el-select"),F=s("el-radio-button"),T=s("el-radio-group"),re=s("el-input"),D=s("el-button"),ie=s("el-form"),l=s("el-table-column"),se=s("el-table"),pe=s("el-pagination");return f(),B($,null,[g("div",Ee,[t(ie,{model:i(u),"label-width":"0",onSubmit:a[4]||(a[4]=C(()=>{},["prevent"]))},{default:n(()=>[g("div",xe,[t(r,{class:"tn-el-form-item",style:{width:"300px"}},{default:n(()=>[t(c,{class:"tn-el-form-item--item",type:"daterange",modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=o=>v.value=o),clearable:"","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),t(r,null,{default:n(()=>[t(k,{placeholder:"\u5230\u671F\u5929\u6570",style:{width:"240px"},clearable:""},{default:n(()=>[(f(),B($,null,z(q,o=>t(b,{key:o.value,label:o.label,value:o.value},null,8,["label","value"])),64))]),_:1})]),_:1}),t(r,null,{default:n(()=>[t(k,{placeholder:"\u5F53\u7968\u72B6\u6001",style:{width:"240px"},modelValue:i(u).type,"onUpdate:modelValue":a[1]||(a[1]=o=>i(u).type=o),clearable:""},{default:n(()=>[(f(),B($,null,z(K,(o,x)=>t(b,{key:x,label:o,value:x},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),g("div",Be,[t(r,null,{default:n(()=>[t(T,{modelValue:i(u).day,"onUpdate:modelValue":a[2]||(a[2]=o=>i(u).day=o)},{default:n(()=>[t(F,{label:"all"},{default:n(()=>[Ie]),_:1}),t(F,{label:"0"},{default:n(()=>[Ce]),_:1}),t(F,{label:"1"},{default:n(()=>[Se]),_:1}),t(F,{label:"7"},{default:n(()=>[Le]),_:1}),t(F,{label:"30"},{default:n(()=>[Ve]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(r,null,{default:n(()=>[t(re,{modelValue:i(u).keywords,"onUpdate:modelValue":a[3]||(a[3]=o=>i(u).keywords=o),placeholder:"\u5F53\u7968\u7F16\u53F7/\u5BA2\u6237\u59D3\u540D",onKeydown:ce(A,["enter"])},null,8,["modelValue","onKeydown"])]),_:1}),t(r,null,{default:n(()=>[t(D,{type:"primary",onClick:A},{default:n(()=>[Ae]),_:1})]),_:1})])]),_:1},8,["model"])]),g("div",Te,[g("div",Me,[t(D,{class:"btn tn-button tn-button--blue--light",onClick:a[5]||(a[5]=()=>{})},{default:n(()=>[$e]),_:1}),t(D,{class:"btn tn-button tn-button--blue--light",onClick:a[6]||(a[6]=()=>{})},{default:n(()=>[Pe]),_:1})]),g("div",Re,[t(se,{data:i(I).list,stripe:"",border:!0,onRowClick:J},{default:n(()=>[t(l,{align:"center",width:"180px",label:"\u5F53\u7968\u7F16\u53F7",prop:"ticket_no"}),t(l,{align:"center",width:"100px",label:"\u5F53\u888B\u53F7",prop:"pocket_no"}),t(l,{align:"center",width:"100px",label:"\u95E8\u5E97",prop:"store_name"}),t(l,{align:"center",width:"80px",label:"\u5BA2\u6237\u59D3\u540D",prop:"customerInfo.name"}),t(l,{align:"center",width:"120px",label:"\u5F00\u59CB\u65F6\u95F4",prop:"start_time",formatter:N}),t(l,{align:"center",width:"120px",label:"\u7ED3\u675F\u65F6\u95F4",prop:"end_time",formatter:N}),t(l,{align:"center",width:"100px",label:"\u5178\u5F53\u91D1\u989D",prop:"pawn_fee"}),t(l,{align:"center",width:"100px",label:"\u7EFC\u5408\u8D39\u7528",prop:"commission"}),t(l,{align:"center",width:"100px",label:"\u5B9E\u4ED8\u91D1\u989D",prop:"final_fee"}),t(l,{align:"center",width:"100",label:"\u5F53\u7968\u72B6\u6001",prop:"pawn_status",formatter:te}),t(l,{align:"center",width:"100px",label:"\u7ECF\u624B\u4EBA",prop:"handler"}),t(l,{align:"center",width:"120px",label:"\u4ED8\u6B3E\u4FE1\u606F"},{default:n(o=>[o.row.payInfo&&o.row.payInfo.pay_info_image?(f(),B("img",{key:0,src:o.row.payInfo.pay_info_image,alt:"",style:{height:"80px",width:"80px","border-radius":"8px","object-fit":"contain"}},null,8,Ne)):S("",!0)]),_:1}),t(l,{align:"center",width:"100px",label:"\u5408\u4F19\u4EBA",prop:"partner"}),t(l,{align:"center",width:"100px",label:"\u64CD\u4F5C\u5458",prop:"nickname"}),t(l,{align:"center",width:"120px",label:"\u5907\u6CE8",prop:"remark"}),t(l,{align:"center",width:"250px",label:"\u64CD\u4F5C"},{default:n(o=>[o.row.pawn_status!=="redeem"||o.row.pawn_status!=="in_stock"?(f(),B("div",Ke,[t(D,{type:"primary",plain:"",onClick:C(x=>ae(o.row.id),["stop"])},{default:n(()=>[Oe]),_:2},1032,["onClick"]),o.row.pawn_status!=="void"?(f(),j(D,{key:0,type:"primary",onClick:C(x=>H(o.row.ticket_no),["stop"])},{default:n(()=>[Ue]),_:2},1032,["onClick"])):S("",!0),o.row.pawn_status!=="void"?(f(),j(D,{key:1,type:"primary",onClick:C(x=>G(o.row.payInfo.record_id),["stop"])},{default:n(()=>[Ye]),_:2},1032,["onClick"])):S("",!0)])):S("",!0)]),_:1})]),_:1},8,["data"])])]),g("div",ze,[t(pe,{currentPage:i(u).page,"onUpdate:currentPage":a[7]||(a[7]=o=>i(u).page=o),"page-size":i(u).limit,"onUpdate:page-size":a[8]||(a[8]=o=>i(u).limit=o),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:i(I).count},null,8,["currentPage","page-size","total"])]),t(ve,{onConfirm:ue,ref_key:"pawnForm",ref:L,mode:_.value,title:d.value,onPawningList:m},null,8,["mode","title"]),t(be,{onConfirm:oe,ref_key:"redeemForm",ref:y,mode:_.value,title:d.value,onPawningList:m},null,8,["mode","title"]),t(ke,{onConfirm:ne,ref_key:"keepForm",ref:h,mode:_.value,title:d.value,onPawningList:m},null,8,["mode","title"]),t(De,{onConfirm:le,ref_key:"overdueForm",ref:V,mode:_.value,title:d.value,onPawningList:m},null,8,["mode","title"])],64)}}});const Bt=Fe(je,[["__scopeId","data-v-d98584fe"]]);export{Bt as default};