sf_web_dist/js/supplier-info.BXzsIC0a.js

2 lines
8.7 KiB
JavaScript
Raw Normal View History

2025-08-05 17:08:50 +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 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.DkruV4sG.js";import{_ as b}from"./index.CNG9Avme.js";/* empty css */import{E as v}from"./el-text.C3qy4KBf.js";import j from"./merge-list.Vcbz5wN-.js";import C from"./bind-aircraft.muMyC3e9.js";import P from"./add-reduce-prepayment.Dtsap-lH.js";import k from"./prepayment-log.CRFReI4g.js";import F from"./deposit-channels-set.C6-d9VB2.js";import{g as R,c as S,e as U,a as A}from"./payee-suppiler.BCPDg0mc.js";/* empty css */import"./el-col.CmN0pZGy.js";import"./settlement-log.BxIMrxoy.js";import"./add-channel.CDE2Ywru.js";import"./payee-channel.C2oMO2np.js";import"./channel-code.BxTR7S7l.js";import"./single_fee.CAf5nB_D.js";import"./test_channel.D2NhQmmN.js";import"./el-link.DOFyb3Y9.js";import"./fee-risk.Devimplf.js";import"./el-time-select.BSSMhm66.js";import"./el-card.D6uYYZjY.js";import"./copy-channel.Cm0sghJa.js";import"./sub-channel.DPHTPvY8.js";import"./sub-channel-add.CMD5ZfMd.js";import"./sub-channel-fee.DXq5peI_.js";import"./sub-channel-risk.CHkyd70x.js";import"./channel-fee.BI3eYPbB.js";import"./channel-risk.CXCvFIuO.js";import"./staticData.pxPvJypV.js";const L={style:{"margin-bottom":"4px"}},x=e({__name:"supplier-info",setup(e){a({legacy:!0});let x=[];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:x,value:[]},{label:"合并到",type:"select",prop:"status",options:x,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=_,x=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_p