sf_web_dist/js/supplier-info.B22ljwzN.js

2 lines
9.4 KiB
JavaScript
Raw Normal View History

2025-08-12 17:35:56 +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 d,an as u,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.CgRhte5Z.js";import{_ as b}from"./index.BIdAWoPq.js";/* empty css */import{E as v}from"./el-text.CoVJHjsP.js";import j from"./merge-list.B2Z0HDko.js";import C from"./bind-aircraft.Dhxc8p9I.js";import P from"./add-reduce-prepayment.lrUvj4_H.js";import k from"./prepayment-log.B8_KaxN3.js";import R from"./deposit-channels-set.U2pfsXxM.js";import{g as B,c as F,e as S,a as U}from"./payee-suppiler.DaQsxTyG.js";/* empty css */import"./el-col.BAwB3vyn.js";import"./payee-order.0OA-J8om.js";import"./el-card.C6_bqWsx.js";import"./settlement-log.Sr9POJ7a.js";import"./add-channel.BqzylwGi.js";import"./payee-channel.DnoeBrkm.js";import"./channel-code.BjOVZB2O.js";import"./single_fee.biW6cps3.js";import"./test_channel.Bbsk3-Dd.js";import"./el-link.bDoAiCu3.js";import"./fee-risk.Bc2cpWiM.js";import"./el-time-select.CuwDiUcs.js";import"./copy-channel.Bil7WKW7.js";import"./sub-channel.eriJhupZ.js";import"./sub-channel-add.T1uIjQUN.js";import"./sub-channel-fee.BfiwurLh.js";import"./sub-channel-risk.vAtlKh3F.js";import"./channel-fee.BBM56_Y6.js";import"./channel-risk.DYeKKVzq.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",width:"100"},{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",width:"80"},{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:"