sf_web_dist/js/supplier-info.3n2YY-rC.js

2 lines
8.9 KiB
JavaScript
Raw Normal View History

2025-08-07 19:51:00 +08:00
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.Bp-0d7Tq.js";import{_ as b}from"./index.BzJek9hJ.js";/* empty css */import{E as v}from"./el-text.Crn4Q_bn.js";import j from"./merge-list.z0j4YMkx.js";import C from"./bind-aircraft.0YaytG2K.js";import P from"./add-reduce-prepayment.D0sJOcL1.js";import k from"./prepayment-log.w-i6qhEt.js";import R from"./deposit-channels-set.AxEXz8bn.js";import{g as F,c as S,e as U,a as A}from"./payee-suppiler.C3kMvbvb.js";/* empty css */import"./el-col.9tkHfz2E.js";import"./payee-order.DrHuK1bJ.js";import"./el-card.DThsJDc0.js";import"./settlement-log.D1xe_1Os.js";import"./add-channel.Dv2sIAAV.js";import"./payee-channel.-6nYpn9B.js";import"./channel-code.B2hdRSxF.js";import"./single_fee.BN3YsszM.js";import"./test_channel.BZZpLY2S.js";import"./el-link.BFs1aUI7.js";import"./fee-risk.lTf4diyH.js";import"./el-time-select.MbhQaxzg.js";import"./copy-channel.Cc8SlKu1.js";import"./sub-channel.BP1NJzop.js";import"./sub-channel-add.BEzKdlnp.js";import"./sub-channel-fee.B3qtM_ya.js";import"./sub-channel-risk.CHt6eCqK.js";import"./channel-fee.C8Nz37wk.js";import"./channel-risk.CujmOQZx.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).sea