sf_web_dist/js/supplier-info.JcVhwLXc.js

2 lines
8.6 KiB
JavaScript
Raw Normal View History

2025-07-31 19:33:17 +08:00
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"