sf_web_dist/js/supplier-info.DV8R_QPV.js
2025-08-11 17:46:05 +08:00

2 lines
9.4 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,bt as a,ag as o,b4 as t,r as l,c as r,e as n,N as i,w as s,O as p,l as c,d8 as d,an as u,t as m,bb as g,g as h,c8 as _,aX as w,a_ as y,aO as f,ai as D}from"./index.BgnNQvP_.js";import{_ as b}from"./index.CVnxqUMV.js";/* empty css */import{E as v}from"./el-text.CE868r_2.js";import j from"./merge-list.88wEocgd.js";import C from"./bind-aircraft.CHu11i-2.js";import P from"./add-reduce-prepayment.CpecDapz.js";import k from"./prepayment-log.C88hLtNb.js";import R from"./deposit-channels-set.D2t8YSDo.js";import{g as B,c as F,e as S,a as U}from"./payee-suppiler.BOJ0gJvt.js";/* empty css */import"./el-col.DBcFv4d7.js";import"./payee-order.DPnKtpYH.js";import"./el-card.BKRZa51K.js";import"./settlement-log.D5kCNiPy.js";import"./add-channel.wulwY6Ue.js";import"./payee-channel.twN1ovz7.js";import"./channel-code.CxEZLb5-.js";import"./single_fee.BfvKDhkT.js";import"./test_channel.CEg3CXgt.js";import"./el-link.vd8b7c0i.js";import"./fee-risk.Cfp9-Nn1.js";import"./el-time-select.CRBuhPWV.js";import"./copy-channel.DU0SNTvs.js";import"./sub-channel.DzCs7QdH.js";import"./sub-channel-add.D3gYH5rS.js";import"./sub-channel-fee.BaCc5ZsS.js";import"./sub-channel-risk.D5rZSK56.js";import"./channel-fee.7poBluw9.js";import"./channel-risk.BAQPUaKN.js";import"./staticData.8wZxkmL4.js";const x={style:{"margin-bottom":"4px"}},A=e({__name:"supplier-info",setup(e){a({legacy:!0});let A=[];const L=o({columns:[{prop:"id",label:"ID",align:"center",width:"80"},{prop:"shop_id",label:"供应商编号",align:"center",width:"100"},{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",sortable:!0},{prop:"pay_money",label:"跑量",align:"center",sortable:!0},{prop:"prepay_money",label:"剩余预付",align:"center",slot:"prepay_money_slot",sortable:!0},{prop:"notify_time",label:"应下发",align:"center",sortable:!0},{prop:"status",label:"状态",align:"center",slot:"status_slot",width:"80"},{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}),V=()=>{L.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),M()};t(()=>{M()});const M=()=>{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);B(Object.assign(e,a)).then(e=>{L.tableData=e.data,L.total=e.total,L.loading=!1}).catch(()=>{L.loading=!1})},z=()=>{L.showAddSupplierDialog=!0,L.addForm.values.id=""},T=l(null),O=()=>{L.dialogShowChannelVisible=!1},q=()=>{let e=L.addForm.values;e.id?S(e).then(e=>{L.showAddSupplierDialog=!1,f.success("编辑成功!"),M()}):U(e).then(e=>{L.showAddSupplierDialog=!1,M(),f.success("添加成功!")})},E=()=>{},I=()=>{y.confirm("确定要重置供应的预付吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{}).catch(()=>{})},X=()=>{M()};return(e,a)=>{const o=u,t=v,l=g,B=d,S=b,U=_,A=w;return n(),r("div",null,[i(S,{type:"export",columns:h(L).columns,searchFields:h(L).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>h(L).searchFields=e),data:h(L).tableData,per_page:h(L).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>h(L).per_page=e),page:h(L).page,"onUpdate:page":a[2]||(a[2]=e=>h(L).page=e),total:h(L).total,onGetTableData:M,onResetForm:V,loading:h(L).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:s(()=>[i(o,{type:"primary",onClick:z},{default:s(()=>a[15]||(a[15]=[p("添加供应商")])),_:1,__:[15]}),i(o,{type:"warning",onClick:E},{default:s(()=>a[16]||(a[16]=[p(" 日切清账,关闭通道")])),_:1,__:[16]}),i(o,{type:"danger",onClick:I},{default:s(()=>a[17]||(a[17]=[p("重置预付")])),_:1,__:[17]})]),count:s(()=>[i(t,null,{default:s(()=>a[18]||(a[18]=[p("总跑量0.0000 总预付0.0000 总应下发0.0000 总剩余0.0000")])),_:1,__:[18]})]),prepay_money_slot:s(({row:e})=>[c("div",null,m(e.account.prepay_money),1)]),status_slot:s(({row:e})=>[i(l,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-value":1,"inactive-value":2,onChange:a=>(e=>{y.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{F({id:e.id,status:e.status}).then(e=>{f.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})=>[c("div",x,[i(B,null,{default:s(()=>[i(o,{type:"清账中"==t.clearBtn?"danger":"warning",size:"small",onClick:e=>(e=>{"清账中"!=e.clearBtn&&y.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{f.success("清账中"),e.clearBtn="清账中"}).catch(()=>{})})(t)},{default:s(()=>[p(m(t.clearBtn?t.clearBtn:"清账"),1)]),_:2},1032,["type","onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.showBindAircraftDialog=!0,L.currentRow=e})(t),size:"small"},{default:s(()=>a[19]||(a[19]=[p("飞机")])),_:2,__:[19]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.showPrePaymentDialog=!0,L.currentRow=e})(t),size:"small"},{default:s(()=>a[20]||(a[20]=[p("加/减预付")])),_:2,__:[20]},1032,["onClick"])]),_:2},1024)]),c("div",null,[i(B,null,{default:s(()=>[i(o,{type:"primary",onClick:e=>((e={})=>{L.showPrePaymentLogDialog=!0,L.currentRow=e})(t),size:"small"},{default:s(()=>a[21]||(a[21]=[p("预付日志")])),_:2,__:[21]},1032,["onClick"]),i(o,{type:"primary",onClick:e=>((e={})=>{L.dialogShowChannelVisible=!0,D(()=>{T.value&&T.value.filterChannel(e)})})(t),size:"small"},{default:s(()=>a[22]||(a[22]=[p("渠道")])),_: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})(t),size:"small"},{default:s(()=>a[23]||(a[23]=[p("编辑")])),_:2,__:[23]},1032,["onClick"]),i(o,{type:"primary",onClick:a=>e.handleFeeRisk(t),size:"small"},{default:s(()=>a[24]||(a[24]=[p("删除")])),_:2,__:[24]},1032,["onClick"])]),_:2},1024)])]),default:s(()=>[a[25]||(a[25]=p('" '))]),_:1,__:[25]},8,["columns","searchFields","data","per_page","page","total","loading"]),i(U,{showDialog:h(L).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>h(L).showAddSupplierDialog=e),formData:h(L).addForm,"onUpdate:formData":a[4]||(a[4]=e=>h(L).addForm=e),ref:"addSupplierRef"},{submit:s(()=>[i(o,{type:"primary",onClick:q},{default:s(()=>a[26]||(a[26]=[p("确定")])),_:1,__:[26]})]),_:1},8,["showDialog","formData"]),i(U,{showDialog:h(L).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>h(L).showMergeSupplierDialog=e),formData:h(L).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>h(L).mergeForm=e),ref:"productRef"},{submit:s(()=>[i(o,{type:"primary",onClick:e.confirmBatchSetting},{default:s(()=>a[27]||(a[27]=[p("确定")])),_:1,__:[27]},8,["onClick"])]),_:1},8,["showDialog","formData"]),i(j,{showMergeListDialog:h(L).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>h(L).showMergeListDialog=e)},null,8,["showMergeListDialog"]),i(C,{showBindAircraftDialog:h(L).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>h(L).showBindAircraftDialog=e),currentRow:h(L).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>h(L).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),i(P,{showPrePaymentDialog:h(L).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>h(L).showPrePaymentDialog=e),onConfrimPrePay:X,currentRow:h(L).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>h(L).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),i(k,{showPrePaymentLogDialog:h(L).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>h(L).showPrePaymentLogDialog=e),currentRow:h(L).currentRow,"onUpdate:currentRow":a[13]||(a[13]=e=>h(L).currentRow=e)},null,8,["showPrePaymentLogDialog","currentRow"]),i(A,{modelValue:h(L).dialogShowChannelVisible,"onUpdate:modelValue":a[14]||(a[14]=e=>h(L).dialogShowChannelVisible=e),title:"渠道管理",width:"70vw","before-close":O},{default:s(()=>[i(R,{ref_key:"depositChannelRef",ref:T},null,512)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-d0324ae6"]]);export{A as default};