2025-08-11 16:53:49 +08:00
|
|
|
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 u,an as d,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.BbWNJA3u.js";import{_ as b}from"./index.BGlQrNQO.js";/* empty css */import{E as v}from"./el-text.BqQoSb1f.js";import j from"./merge-list.BVtzuwkv.js";import C from"./bind-aircraft.DUQnrf1_.js";import k from"./add-reduce-prepayment.BbZVXp1U.js";import P from"./prepayment-log.BqB_P9aU.js";import R from"./deposit-channels-set.CnfqhZK5.js";import{g as B,c as F,e as S,a as U}from"./payee-suppiler.BkM07qHt.js";/* empty css */import"./el-col.DFkN-DyX.js";import"./payee-order.BlN4NJFA.js";import"./el-card.CX1x8dSX.js";import"./settlement-log.CPe4ODCW.js";import"./add-channel.B5a7LnBZ.js";import"./payee-channel.DejSFHmk.js";import"./channel-code.ChqYzNzb.js";import"./single_fee.KQw4Bo03.js";import"./test_channel.BRdmtySm.js";import"./el-link.D74svpjD.js";import"./fee-risk.voGetltB.js";import"./el-time-select.BLMMptNC.js";import"./copy-channel.q3LTfRNr.js";import"./sub-channel.OW1FnVPe.js";import"./sub-channel-add.CjkstU31.js";import"./sub-channel-fee.yE-Uj3C8.js";import"./sub-channel-risk.D7fU1Zby.js";import"./channel-fee.DUy74m87.js";import"./channel-risk.sJRVEfyC.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"},{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"},{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"}
|