sf_web_dist/js/supplier-info.JcVhwLXc.js
2025-07-31 19:33:17 +08:00

2 lines
8.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{b2 as e,bs as a,ag as o,b4 as l,c as t,e as r,N as i,w as s,O as n,l as p,d8 as d,an as u,bb as m,t as c,g,c8 as h,aX as _,a_ as w,aO as y}from"./index.DS3FXwxf.js";import{_ as f}from"./index.Blii6jYu.js";/* empty css */import{E as D}from"./el-text.D39OlimW.js";import b from"./merge-list.BLko4Vbz.js";import v from"./bind-aircraft.Qjdz8l_d.js";import j from"./add-reduce-prepayment.C7qZ4pyQ.js";import P from"./prepayment-log.utg17mbr.js";import C from"./deposit-channels-set.6j9oh-V3.js";import{g as k,c as R,e as F,a as S}from"./add-channel.rNlg-fqp.js";/* empty css */import"./el-col.BuAk1vtD.js";import"./settlement-log.DK12UurQ.js";import"./channel-code.Bgsp2nyw.js";import"./product.BJtZjYVo.js";import"./single_fee.Ddiu4mHJ.js";import"./test_channel.CijjjfFm.js";import"./el-link.DY78mlCt.js";import"./payee-channel.BnAcYxh9.js";import"./fee-risk.DpoDJrjz.js";import"./el-time-select.deSbo9b0.js";import"./el-card.vUK-VUTJ.js";import"./copy-channel.DfTDDAwU.js";import"./sub-channel.B4Dwsqv7.js";import"./sub-channel-add.BwgFolya.js";import"./sub-channel-fee.CYJWWzZs.js";import"./sub-channel-risk.ByPNpWhm.js";import"./channel-fee.BeHn9nte.js";import"./channel-risk.BlvvkgFM.js";import"./staticData.Bf5zg7ho.js";const U={style:{"margin-bottom":"4px"}},A=e({__name:"supplier-info",setup(e){a({legacy:!0});let A=[];const L=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",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:A,value:[]},{label:"合并到",type:"select",prop:"status",options:A,value:[]}],rules:{status:[{required:!0,message:"请选择设置",trigger:"blur"}]},values:{status:""}},showMergeListDialog:!1,showBindAircraftDialog:!1,currentRow:{},showPrePaymentDialog:!1,showPrePaymentLogDialog:!1,dialogShowChannelVisible:!1}),x=()=>{L.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),V()};l(()=>{V()});const V=()=>{L.loading=!0;let e={limit:L.per_page,page:L.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(L.searchFields);k(Object.assign(e,a)).then(e=>{L.tableData=e.data,L.total=e.total,L.loading=!1}).catch(()=>{L.loading=!1})},B=()=>{L.showAddSupplierDialog=!0,L.addForm.values.id=""},M=()=>{L.dialogShowChannelVisible=!0},z=()=>{let e=L.addForm.values;e.id?F(e).then(e=>{L.showAddSupplierDialog=!1,y.success("编辑成功!"),V()}):S(e).then(e=>{L.showAddSupplierDialog=!1,V(),y.success("添加成功!")})};return(e,a)=>{const o=u,l=D,k=m,F=d,S=f,A=h,O=_;return r(),t("div",null,[i(S,{type:"export",columns:g(L).columns,searchFields:g(L).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>g(L).searchFields=e),data:g(L).tableData,per_page:g(L).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>g(L).per_page=e),page:g(L).page,"onUpdate:page":a[2]||(a[2]=e=>g(L).page=e),total:g(L).total,onGetTableData:V,onResetForm:x,loading:g(L).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:s(()=>[i(o,{type:"primary",onClick:B},{default:s(()=>a[14]||(a[14]=[n("添加供应商")])),_:1,__:[14]}),i(o,{type:"warning",onClick:B},{default:s(()=>a[15]||(a[15]=[n("日切清账")])),_:1,__:[15]}),i(o,{type:"danger",onClick:B},{default:s(()=>a[16]||(a[16]=[n("重置预付")])),_:1,__:[16]})]),count:s(()=>[i(l,null,{default:s(()=>a[17]||(a[17]=[n("总跑量0.0000 总预付0.0000 总应下发0.0000 总剩余0.0000")])),_:1,__:[17]})]),prepay_money_slot:s(({row:e})=>[p("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(()=>{R({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:l})=>[p("div",U,[i(F,null,{default:s(()=>[i(o,{type:"primary",onClick:a=>e.handleFeeWeight(l),size:"small"},{default:s(()=>a[18]||(a[18]=[n("清账")])),_:2,__:[18]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.showBindAircraftDialog=!0,L.currentRow=e})(l),size:"small"},{default:s(()=>a[19]||(a[19]=[n("飞机")])),_:2,__:[19]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.showPrePaymentDialog=!0,L.currentRow=e})(l),size:"small"},{default:s(()=>a[20]||(a[20]=[n("加/减预付")])),_:2,__:[20]},1032,["onClick"])]),_:2},1024)]),p("div",null,[i(F,null,{default:s(()=>[i(o,{type:"primary",onClick:e=>((e={})=>{L.showPrePaymentLogDialog=!0,L.currentRow=e})(l),size:"small"},{default:s(()=>a[21]||(a[21]=[n("预付日志")])),_:2,__:[21]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.dialogShowChannelVisible=!0,L.currentRow=e})(l),size:"small"},{default:s(()=>a[22]||(a[22]=[n("通道")])),_:2,__:[22]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>(e=>{L.showAddSupplierDialog=!0,L.addForm.values.supplier_name=e.supplier_name,L.addForm.values.warn_money=e.warn_money,L.addForm.values.credit_money=e.credit_money,L.addForm.values.id=e.id})(l),size:"small"},{default:s(()=>a[23]||(a[23]=[n("编辑")])),_:2,__:[23]},1032,["onClick"]),i(o,{type:"primary",onClick:a=>e.handleFeeRisk(l),size:"small"},{default:s(()=>a[24]||(a[24]=[n("删除")])),_:2,__:[24]},1032,["onClick"])]),_:2},1024)])]),default:s(()=>[a[25]||(a[25]=n('" '))]),_:1,__:[25]},8,["columns","searchFields","data","per_page","page","total","loading"]),i(A,{showDialog:g(L).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>g(L).showAddSupplierDialog=e),formData:g(L).addForm,"onUpdate:formData":a[4]||(a[4]=e=>g(L).addForm=e),ref:"productRef"},{submit:s(()=>[i(o,{type:"primary",onClick:z},{default:s(()=>a[26]||(a[26]=[n("确定")])),_:1,__:[26]})]),_:1},8,["showDialog","formData"]),i(A,{showDialog:g(L).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>g(L).showMergeSupplierDialog=e),formData:g(L).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>g(L).mergeForm=e),ref:"productRef"},{submit:s(()=>[i(o,{type:"primary",onClick:e.confirmBatchSetting},{default:s(()=>a[27]||(a[27]=[n("确定")])),_:1,__:[27]},8,["onClick"])]),_:1},8,["showDialog","formData"]),i(b,{showMergeListDialog:g(L).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>g(L).showMergeListDialog=e)},null,8,["showMergeListDialog"]),i(v,{showBindAircraftDialog:g(L).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>g(L).showBindAircraftDialog=e),currentRow:g(L).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>g(L).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),i(j,{showPrePaymentDialog:g(L).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>g(L).showPrePaymentDialog=e),currentRow:g(L).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>g(L).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),i(P,{showPrePaymentLogDialog:g(L).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>g(L).showPrePaymentLogDialog=e)},null,8,["showPrePaymentLogDialog"]),i(O,{modelValue:g(L).dialogShowChannelVisible,"onUpdate:modelValue":a[13]||(a[13]=e=>g(L).dialogShowChannelVisible=e),title:"通道管理",width:"70vw","before-close":M},{default:s(()=>[i(C,{currentRow:g(L).currentRow},null,8,["currentRow"])]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-62387cbb"]]);export{A as default};