sf_web_dist/js/supplier-info.CSpbAT-V.js
2025-08-06 16:22:36 +08:00

2 lines
8.7 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,r as t,c as r,e as i,N as s,w as n,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.Be-Qtotw.js";import{_ as b}from"./index.B3-YJL0V.js";/* empty css */import{E as v}from"./el-text.DlwZqGR_.js";import j from"./merge-list.DCY2cxpr.js";import C from"./bind-aircraft.DsVSvCmj.js";import P from"./add-reduce-prepayment.HBp3xaVP.js";import k from"./prepayment-log.a-5uFgsK.js";import F from"./deposit-channels-set.DPBHcEvF.js";import{g as R,c as S,e as U,a as A}from"./payee-suppiler.CGhV85H_.js";/* empty css */import"./el-col.B-UN6jba.js";import"./settlement-log.7lrabynS.js";import"./add-channel.yXPjBmHv.js";import"./payee-channel.DkfltLH8.js";import"./channel-code.BqC_nQns.js";import"./single_fee.fgvuIYHn.js";import"./test_channel.bWTNoE6j.js";import"./el-link.XF_YI2YG.js";import"./fee-risk.1ZlY1u2X.js";import"./el-time-select.DQinUfx-.js";import"./el-card.CMu7qkDx.js";import"./copy-channel.BW1rmNBb.js";import"./sub-channel.CrnRWxgJ.js";import"./sub-channel-add.5rqpjxBv.js";import"./sub-channel-fee.DXqRIhCm.js";import"./sub-channel-risk.D04jImrD.js";import"./channel-fee.B39zGr87.js";import"./channel-risk.Bs8bu5Dc.js";import"./staticData.b8Nd3Dnh.js";const x={style:{"margin-bottom":"4px"}},L=e({__name:"supplier-info",setup(e){a({legacy:!0});let L=[];const V=o({columns:[{prop:"id",label:"ID",align:"center"},{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}),B=()=>{V.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),M()};l(()=>{M()});const M=()=>{V.loading=!0;let e={limit:V.per_page,page:V.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(V.searchFields);R(Object.assign(e,a)).then(e=>{V.tableData=e.data,V.total=e.total,V.loading=!1}).catch(()=>{V.loading=!1})},z=()=>{V.showAddSupplierDialog=!0,V.addForm.values.id=""},O=t(null),T=()=>{V.dialogShowChannelVisible=!1},E=()=>{let e=V.addForm.values;e.id?U(e).then(e=>{V.showAddSupplierDialog=!1,D.success("编辑成功!"),M()}):A(e).then(e=>{V.showAddSupplierDialog=!1,M(),D.success("添加成功!")})};return(e,a)=>{const o=m,l=v,t=c,R=u,U=b,A=_,L=w;return i(),r("div",null,[s(U,{type:"export",columns:h(V).columns,searchFields:h(V).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>h(V).searchFields=e),data:h(V).tableData,per_page:h(V).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>h(V).per_page=e),page:h(V).page,"onUpdate:page":a[2]||(a[2]=e=>h(V).page=e),total:h(V).total,onGetTableData:M,onResetForm:B,loading:h(V).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:n(()=>[s(o,{type:"primary",onClick:z},{default:n(()=>a[14]||(a[14]=[p("添加供应商")])),_:1,__:[14]}),s(o,{type:"warning",onClick:z},{default:n(()=>a[15]||(a[15]=[p("日切清账")])),_:1,__:[15]}),s(o,{type:"danger",onClick:z},{default:n(()=>a[16]||(a[16]=[p("重置预付")])),_:1,__:[16]})]),count:n(()=>[s(l,null,{default:n(()=>a[17]||(a[17]=[p("总跑量0.0000 总预付0.0000 总应下发0.0000 总剩余0.0000")])),_:1,__:[17]})]),prepay_money_slot:n(({row:e})=>[d("div",null,g(e.account.prepay_money),1)]),status_slot:n(({row:e})=>[s(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:n(({row:l})=>[d("div",x,[s(R,null,{default:n(()=>[s(o,{type:"primary",onClick:a=>e.handleFeeWeight(l),size:"small"},{default:n(()=>a[18]||(a[18]=[p("清账")])),_:2,__:[18]},1032,["onClick"]),s(o,{type:"primary",onClick:e=>((e={})=>{V.showBindAircraftDialog=!0,V.currentRow=e})(l),size:"small"},{default:n(()=>a[19]||(a[19]=[p("飞机")])),_:2,__:[19]},1032,["onClick"]),s(o,{type:"primary",onClick:e=>((e={})=>{V.showPrePaymentDialog=!0,V.currentRow=e})(l),size:"small"},{default:n(()=>a[20]||(a[20]=[p("加/减预付")])),_:2,__:[20]},1032,["onClick"])]),_:2},1024)]),d("div",null,[s(R,null,{default:n(()=>[s(o,{type:"primary",onClick:e=>((e={})=>{V.showPrePaymentLogDialog=!0,V.currentRow=e})(l),size:"small"},{default:n(()=>a[21]||(a[21]=[p("预付日志")])),_:2,__:[21]},1032,["onClick"]),s(o,{type:"primary",onClick:e=>((e={})=>{V.dialogShowChannelVisible=!0,y(()=>{O.value&&O.value.filterChannel(e)})})(l),size:"small"},{default:n(()=>a[22]||(a[22]=[p("渠道")])),_:2,__:[22]},1032,["onClick"]),s(o,{type:"primary",onClick:e=>(e=>{V.showAddSupplierDialog=!0,V.addForm.values.supplier_name=e.supplier_name,V.addForm.values.warn_money=e.warn_money,V.addForm.values.credit_money=e.credit_money,V.addForm.values.id=e.id})(l),size:"small"},{default:n(()=>a[23]||(a[23]=[p("编辑")])),_:2,__:[23]},1032,["onClick"]),s(o,{type:"primary",onClick:a=>e.handleFeeRisk(l),size:"small"},{default:n(()=>a[24]||(a[24]=[p("删除")])),_:2,__:[24]},1032,["onClick"])]),_:2},1024)])]),default:n(()=>[a[25]||(a[25]=p('" '))]),_:1,__:[25]},8,["columns","searchFields","data","per_page","page","total","loading"]),s(A,{showDialog:h(V).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>h(V).showAddSupplierDialog=e),formData:h(V).addForm,"onUpdate:formData":a[4]||(a[4]=e=>h(V).addForm=e),ref:"productRef"},{submit:n(()=>[s(o,{type:"primary",onClick:E},{default:n(()=>a[26]||(a[26]=[p("确定")])),_:1,__:[26]})]),_:1},8,["showDialog","formData"]),s(A,{showDialog:h(V).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>h(V).showMergeSupplierDialog=e),formData:h(V).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>h(V).mergeForm=e),ref:"productRef"},{submit:n(()=>[s(o,{type:"primary",onClick:e.confirmBatchSetting},{default:n(()=>a[27]||(a[27]=[p("确定")])),_:1,__:[27]},8,["onClick"])]),_:1},8,["showDialog","formData"]),s(j,{showMergeListDialog:h(V).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>h(V).showMergeListDialog=e)},null,8,["showMergeListDialog"]),s(C,{showBindAircraftDialog:h(V).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>h(V).showBindAircraftDialog=e),currentRow:h(V).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>h(V).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),s(P,{showPrePaymentDialog:h(V).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>h(V).showPrePaymentDialog=e),currentRow:h(V).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>h(V).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),s(k,{showPrePaymentLogDialog:h(V).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>h(V).showPrePaymentLogDialog=e)},null,8,["showPrePaymentLogDialog"]),s(L,{modelValue:h(V).dialogShowChannelVisible,"onUpdate:modelValue":a[13]||(a[13]=e=>h(V).dialogShowChannelVisible=e),title:"渠道管理",width:"70vw","before-close":T},{default:n(()=>[s(F,{ref_key:"depositChannelRef",ref:O},null,512)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-54744760"]]);export{L as default};