2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
import{b2 as e,bs as a,ag as o,b4 as l,r as t,c as r,e as i,N as n,w as s,O as p,l as d,d8 as u,an as m,bb as c,t as g,g as h,c8 as _,aX as w,ai as y,a_ as f,aO as D}from"./index.ClIZfKIN.js";import{_ as b}from"./index.CZG6Vgal.js";/* empty css */import{E as v}from"./el-text.Zqqrap7n.js";import j from"./merge-list.9BDGWx9v.js";import C from"./bind-aircraft.B210_uGN.js";import P from"./add-reduce-prepayment.BPcNCZYh.js";import k from"./prepayment-log.B-THsv_J.js";import R from"./deposit-channels-set.DFgRMf3W.js";import{g as F,c as S,e as U,a as A}from"./payee-suppiler.CFmif9Iz.js";/* empty css */import"./el-col.DJ4WLS4Z.js";import"./payee-order.DW2MR4F9.js";import"./el-card.Bsh3AFWH.js";import"./settlement-log.VuecLsoZ.js";import"./add-channel.BVKR8C2O.js";import"./payee-channel.B_bq7B85.js";import"./channel-code.4R6LzzZ5.js";import"./single_fee.BGgnP8qM.js";import"./test_channel.NQ_FJXdp.js";import"./el-link.BIwHLLGx.js";import"./fee-risk.DPHuhDlD.js";import"./el-time-select.kpNCr81W.js";import"./copy-channel.RyutHBku.js";import"./sub-channel.CLX10-Ee.js";import"./sub-channel-add.CSXqfc9o.js";import"./sub-channel-fee.DIhUMlsY.js";import"./sub-channel-risk.Ck9Yx8WC.js";import"./channel-fee.CtSCIGbq.js";import"./channel-risk.COBeie-Y.js";import"./staticData.b8Nd3Dnh.js";const x={style:{"margin-bottom":"4px"}},L=e({__name:"supplier-info",setup(e){a({legacy:!0});let L=[];const B=o({columns:[{prop:"id",label:"ID",align:"center",width:"80"},{prop:"shop_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",width:"240px"}],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:L,value:[]},{label:"合并到",type:"select",prop:"status",options:L,value:[]}],rules:{status:[{required:!0,message:"请选择设置",trigger:"blur"}]},values:{status:""}},showMergeListDialog:!1,showBindAircraftDialog:!1,currentRow:{},showPrePaymentDialog:!1,showPrePaymentLogDialog:!1,dialogShowChannelVisible:!1}),V=()=>{B.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),M()};l(()=>{M()});const M=()=>{B.loading=!0;let e={limit:B.per_page,page:B.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(B.searchFields);F(Object.assign(e,a)).then(e=>{B.tableData=e.data,B.total=e.total,B.loading=!1}).catch(()=>{B.loading=!1})},z=()=>{B.showAddSupplierDialog=!0,B.addForm.values.id=""},T=t(null),q=()=>{B.dialogShowChannelVisible=!1},E=()=>{let e=B.addForm.values;e.id?U(e).then(e=>{B.showAddSupplierDialog=!1,D.success("编辑成功!"),M()}):A(e).then(e=>{B.showAddSupplierDialog=!1,M(),D.success("添加成功!")})};return(e,a)=>{const o=m,l=v,t=c,F=u,U=b,A=_,L=w;return i(),r("div",null,[n(U,{type:"export",columns:h(B).columns,searchFields:h(B).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>h(B).searchFields=e),data:h(B).tableData,per_page:h(B).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>h(B).per_page=e),page:h(B).page,"onUpdate:page":a[2]||(a[2]=e=>h(B).page=e),total:h(B).total,onGetTableData:M,onResetForm:V,loading:h(B).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:s(()=>[n(o,{type:"primary",onClick:z},{default:s(()=>a[15]||(a[15]=[p("添加供应商")])),_:1,__:[15]}),n(o,{type:"warning",onClick:z},{default:s(()=>a[16]||(a[16]=[p("日切清账")])),_:1,__:[16]}),n(o,{type:"danger",onClick:z},{default:s(()=>a[17]||(a[17]=[p("重置预付")])),_:1,__:[17]})]),count:s(()=>[n(l,null,{default:s(()=>a[18]||(a[18]=[p("总跑量:0.0000 总预付:0.0000 总应下发:0.0000 总剩余:0.0000")])),_:1,__:[18]})]),prepay_money_slot:s(({row:e})=>[d("div",null,g(e.account.prepay_money),1)]),status_slot:s(({row:e})=>[n(t,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-value":1,"inactive-value":2,onChange:a=>(e=>{f.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{S({id:e.id,status:e.status}).then(e=>{D.success("修改成功!")})}).catch(()=>{e.status=1==e.status?2:1})})(e),"active-text":"正常","inactive-text":"停用"},null,8,["modelValue","onUpdate:modelValue","onChange"])]),operate_slot:s(({row:l})=>[d("div",x,[n(F,null,{default:s(()=>[n(o,{type:"primary",onClick:a=>e.handleFeeWeight(l),size:"small"},{default:s(()=>a[19]||(a[19]=[p("清账")])),_:2,__:[19]},1032,["onClick"]),n(o,{type:"primary",onClick:e=>((e={})=>{B.showBindAircraftDialog=!0,B.currentRow=e})(l),size:"small"},{default:s(()=>a[20]||(a[20]=[p("飞机")])),_:2,__:[20]},1032,["onClick"]),n(o,{type:"primary",onClick:e=>((e={})=>{B.showPrePaymentDialog=!0,B.currentRow=e})(l),size:"small"},{default:s(()=>a[21]||(a[21]=[p("加/减预付")])),_:2,__:[21]},1032,["onClick"])]),_:2},1024)]),d("div",null,[n(F,null,{default:s(()=>[n(o,{type:"primary",onClick:e=>((e={})=>{B.showPrePaymentLogDialog=!0,B.currentRow=e})(l),size:"small"},{default:s(()=>a[22]||(a[22]=[p("预付日志")])),_:2,__:[22]},1032,["onClick"]),n(o,{type:"primary",onClick:e=>((e={})=>{B.dialogShowChannelVisible=!0,y(()=>{T.value&&T.value.filterChannel(e)})})(l),size:"small"},{default:s(()=>a[23]||(a[23]=[p("渠道")])),_:2,__:[23]},1032,["onClick"]),n(o,{type:"primary",onClick:e=>(e=>{B.showAddSupplierDialog=!0,B.addForm.values.supplier_name=e.supplier_name,B.addForm.values.warn_money=e.warn_money,B.addForm.values.credit_money=e.credit_money,B.addForm.values.id=e.id})(l),size:"small"},{default:s(()=>a[24]||(a[24]=[p("编辑")])),_:2,__:[24]},1032,["onClick"]),n(o,{type:"primary",onClick:a=>e.handleFeeRisk(l),size:"small"},{default:s(()=>a[25]||(a[25]=[p("删除")])),_:2,__:[25]},1032,["onClick"])]),_:2},1024)])]),default:s(()=>[a[26]||(a[26]=p('" '))]),_:1,__:[26]},8,["columns","searchFields","data","per_page","page","total","loading"]),n(A,{showDialog:h(B).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>h(B).showAddSupplierDialog=e),formData:h(B).addForm,"onUpdate:formData":a[4]||(a[4]=e=>h(B).addForm=e),ref:"productRef"},{submit:s(()=>[n(o,{type:"primary",onClick:E},{default:s(()=>a[27]||(a[27]=[p("确定")])),_:1,__:[27]})]),_:1},8,["showDialog","formData"]),n(A,{showDialog:h(B).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>h(B).showMergeSupplierDialog=e),formData:h(B).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>h(B).mergeForm=e),ref:"productRef"},{submit:s(()=>[n(o,{type:"primary",onClick:e.confirmBatchSetting},{default:s(()=>a[28]||(a[28]=[p("确定")])),_:1,__:[28]},8,["onClick"])]),_:1},8,["showDialog","formData"]),n(j,{showMergeListDialog:h(B).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>h(B).showMergeListDialog=e)},null,8,["showMergeListDialog"]),n(C,{showBindAircraftDialog:h(B).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>h(B).showBindAircraftDialog=e),currentRow:h(B).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>h(B).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),n(P,{showPrePaymentDialog:h(B).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>h(B).showPrePaymentDialog=e),currentRow:h(B).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>h(B).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),n(k,{showPrePaymentLogDialog:h(B).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>h(B).showPrePaymentLogDialog=e),currentRow:h(B).currentRow,"onUpdate:currentRow":a[13]||(a[13]=e=>h(B).currentRow=e)},null,8,["showPrePaymentLogDialog","currentRow"]),n(L,{modelValue:h(B).dialogShowChannelVisible,"onUpdate:modelValue":a[14]||(a[14]=e=>h(B).dialogShowChannelVisible=e),title:"渠道管理",width:"70vw","before-close":q},{default:s(()=>[n(R,{ref_key:"depositChannelRef",ref:T},null,512)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-bbff2307"]]);export{L as default};
|