2 lines
8.8 KiB
JavaScript
2 lines
8.8 KiB
JavaScript
import{b2 as e,bs as a,ah as o,b4 as t,c as l,e as r,O as i,w as s,P as n,d8 as p,ao as d,bb as u,l as m,t as c,g,c8 as _,a_ as h,b0 as w,aO as y}from"./index.IG9Kr4U_.js";import{_ as f}from"./index.BPCdXHb1.js";/* empty css */import{E as D}from"./el-text.DGRzEcIQ.js";import b from"./merge-list.DeMJCrZd.js";import j from"./bind-aircraft.dpV5P4j1.js";import v from"./add-reduce-prepayment.Rlda90YX.js";import C from"./prepayment-log.C-l5ReDR.js";import P from"./deposit-channels-set.CDx1prPX.js";import{g as k,c as F,e as R,a as S}from"./add-channel.B0_N3hHi.js";/* empty css */import"./el-col.DRUiGYEu.js";import"./settlement-log.D8w7JqhL.js";import"./channel-code.Bs8Nj3r2.js";import"./product.C4O5vdf_.js";import"./single_fee.B9GsZcvJ.js";import"./test_channel.DSCYI1Yx.js";import"./fee-risk.DV46KzHZ.js";import"./el-time-select.C4P5jGsK.js";import"./el-card.POOwNuEg.js";import"./copy-channel.BdLU8Eot.js";import"./sub-channel.CugXeAIz.js";import"./sub-channel-add.pAt1H5gO.js";import"./sub-channel-fee.CJXJ1iKd.js";import"./sub-channel-risk.CkMQB-tn.js";import"./channel-fee.DvwCU_m_.js";import"./channel-risk.CJ8pGXXu.js";import"./payee-channel.DS64VtLM.js";import"./staticData.Bf5zg7ho.js";const U=e({__name:"supplier-info",setup(e){a({legacy:!0});let U=[];const A=o({columns:[{prop:"id",label:"商户号",align:"center"},{prop:"supplier_name",label:"供应商名称",align:"center"},{prop:"telegram_group",label:"飞机群ID",align:"center"},{prop:"warn_money",label:"预警金额",align:"center"},{prop:"credit_money",label:"授信额度",align:"center"},{prop:"prepay",label:"预付",align:"center"},{prop:"pay_money",label:"跑量",align:"center"},{prop:"prepay_money",label:"剩余预付",align:"center",slot:"prepay_money_slot"},{prop:"notify_time",label:"应下发",align:"center"},{prop:"status",label:"状态",align:"center",slot:"status_slot"},{prop:"create_time",label:"注册时间",align:"center"},{prop:"ca",label:"操作",align:"center",slot:"operate_slot"}],tableData:[],searchFields:[{prop:"supplier_name",label:"供应商名称",type:"input",value:""}],total:0,page:1,per_page:10,loading:!1,showAddSupplierDialog:!1,addForm:{title:"添加供应商",fields:[{label:"供应商名称",type:"input",prop:"supplier_name",value:""},{label:"预警金额",type:"input_num",prop:"warn_money",value:""},{label:"授信额度",type:"input_num",prop:"credit_money",value:""}],rules:{status:[{required:!0,message:"请选择设置",trigger:"blur"}]},values:{supplier_name:"",warn_money:"",credit_money:"",id:""}},showMergeSupplierDialog:!1,mergeForm:{title:"合并供应商",fields:[{label:"供应商从",type:"select",prop:"status",options:U,value:[]},{label:"合并到",type:"select",prop:"status",options:U,value:[]}],rules:{status:[{required:!0,message:"请选择设置",trigger:"blur"}]},values:{status:""}},showMergeListDialog:!1,showBindAircraftDialog:!1,currentRow:{},showPrePaymentDialog:!1,showPrePaymentLogDialog:!1,dialogShowChannelVisible:!1}),L=()=>{A.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),x()};t(()=>{x()});const x=()=>{A.loading=!0;let e={limit:A.per_page,page:A.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(A.searchFields);k(Object.assign(e,a)).then(e=>{A.tableData=e.data,A.total=e.total,A.loading=!1}).catch(()=>{A.loading=!1})},V=()=>{A.showAddSupplierDialog=!0,A.addForm.values.id=""},B=()=>{A.showMergeSupplierDialog=!0},M=()=>{A.showMergeListDialog=!0},z=()=>{A.dialogShowChannelVisible=!0},E=()=>{let e=A.addForm.values;e.id?R(e).then(e=>{A.showAddSupplierDialog=!1,y.success("编辑成功!"),x()}):S(e).then(e=>{A.showAddSupplierDialog=!1,x(),y.success("添加成功!")})};return(e,a)=>{const o=d,t=D,k=u,R=p,S=f,U=_,T=h;return r(),l("div",null,[i(S,{type:"export",columns:g(A).columns,searchFields:g(A).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>g(A).searchFields=e),data:g(A).tableData,per_page:g(A).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>g(A).per_page=e),page:g(A).page,"onUpdate:page":a[2]||(a[2]=e=>g(A).page=e),total:g(A).total,onGetTableData:x,onResetForm:L,loading:g(A).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:s(()=>[i(o,{type:"primary",onClick:V},{default:s(()=>a[14]||(a[14]=[n("添加供应商")])),_:1,__:[14]}),i(o,{type:"warning",onClick:V},{default:s(()=>a[15]||(a[15]=[n("日切清账")])),_:1,__:[15]}),i(o,{type:"danger",onClick:V},{default:s(()=>a[16]||(a[16]=[n("重置预付")])),_:1,__:[16]}),i(o,{type:"info",onClick:B},{default:s(()=>a[17]||(a[17]=[n("合并供应商")])),_:1,__:[17]}),i(o,{type:"info",onClick:M},{default:s(()=>a[18]||(a[18]=[n("合并记录")])),_:1,__:[18]})]),count:s(()=>[i(t,null,{default:s(()=>a[19]||(a[19]=[n("总跑量:0.0000 总预付:0.0000 总应下发:0.0000 总剩余:0.0000")])),_:1,__:[19]})]),prepay_money_slot:s(({row:e})=>[m("div",null,c(e.account.prepay_money),1)]),status_slot:s(({row:e})=>[i(k,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-value":1,"inactive-value":2,onChange:a=>(e=>{w.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{F({id:e.id,status:e.status}).then(e=>{y.success("修改成功!")})}).catch(()=>{e.status=1==e.status?2:1})})(e),"active-text":"正常","inactive-text":"停用"},null,8,["modelValue","onUpdate:modelValue","onChange"])]),operate_slot:s(({row:t})=>[i(R,{style:{"margin-bottom":"4px"}},{default:s(()=>[i(o,{type:"primary",onClick:a=>e.handleFeeWeight(t),size:"small"},{default:s(()=>a[20]||(a[20]=[n("清账")])),_:2,__:[20]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{A.showBindAircraftDialog=!0,A.currentRow=e})(t),size:"small"},{default:s(()=>a[21]||(a[21]=[n("飞机")])),_:2,__:[21]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{A.showPrePaymentDialog=!0,A.currentRow=e})(t),size:"small"},{default:s(()=>a[22]||(a[22]=[n("加/减预付")])),_:2,__:[22]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{A.showPrePaymentLogDialog=!0,A.currentRow=e})(t),size:"small"},{default:s(()=>a[23]||(a[23]=[n("预付日志")])),_:2,__:[23]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{A.dialogShowChannelVisible=!0,A.currentRow=e})(t),size:"small"},{default:s(()=>a[24]||(a[24]=[n("通道")])),_:2,__:[24]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>(e=>{A.showAddSupplierDialog=!0,A.addForm.values.supplier_name=e.supplier_name,A.addForm.values.warn_money=e.warn_money,A.addForm.values.credit_money=e.credit_money,A.addForm.values.id=e.id})(t),size:"small"},{default:s(()=>a[25]||(a[25]=[n("编辑")])),_:2,__:[25]},1032,["onClick"]),i(o,{type:"primary",onClick:a=>e.handleFeeRisk(t),size:"small"},{default:s(()=>a[26]||(a[26]=[n("删除")])),_:2,__:[26]},1032,["onClick"])]),_:2},1024)]),default:s(()=>[a[27]||(a[27]=n('" '))]),_:1,__:[27]},8,["columns","searchFields","data","per_page","page","total","loading"]),i(U,{showDialog:g(A).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>g(A).showAddSupplierDialog=e),formData:g(A).addForm,"onUpdate:formData":a[4]||(a[4]=e=>g(A).addForm=e),ref:"productRef"},{submit:s(()=>[i(o,{type:"primary",onClick:E},{default:s(()=>a[28]||(a[28]=[n("确定")])),_:1,__:[28]})]),_:1},8,["showDialog","formData"]),i(U,{showDialog:g(A).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>g(A).showMergeSupplierDialog=e),formData:g(A).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>g(A).mergeForm=e),ref:"productRef"},{submit:s(()=>[i(o,{type:"primary",onClick:e.confirmBatchSetting},{default:s(()=>a[29]||(a[29]=[n("确定")])),_:1,__:[29]},8,["onClick"])]),_:1},8,["showDialog","formData"]),i(b,{showMergeListDialog:g(A).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>g(A).showMergeListDialog=e)},null,8,["showMergeListDialog"]),i(j,{showBindAircraftDialog:g(A).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>g(A).showBindAircraftDialog=e),currentRow:g(A).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>g(A).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),i(v,{showPrePaymentDialog:g(A).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>g(A).showPrePaymentDialog=e),currentRow:g(A).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>g(A).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),i(C,{showPrePaymentLogDialog:g(A).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>g(A).showPrePaymentLogDialog=e)},null,8,["showPrePaymentLogDialog"]),i(T,{modelValue:g(A).dialogShowChannelVisible,"onUpdate:modelValue":a[13]||(a[13]=e=>g(A).dialogShowChannelVisible=e),title:"通道管理",width:"70vw","before-close":z},{default:s(()=>[i(P,{currentRow:g(A).currentRow},null,8,["currentRow"])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-6240071f"]]);export{U as default};
|