sf_web_dist/js/supplier-info.BJ1IllkH.js
2025-08-14 16:52:04 +08:00

2 lines
9.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{b2 as e,bs as a,r as t,ag as l,b4 as o,c as r,e as s,N as i,w as n,O as p,l as u,d8 as c,an as d,t as m,bb as g,g as h,c8 as _,aX as w,aO as y,a_ as f,ai as D}from"./index.BwAC69Ng.js";import{_ as b}from"./index.Wy9qWlM1.js";/* empty css */import{E as v}from"./el-text.VXce_A1y.js";import j from"./merge-list.BmS1yjzD.js";import C from"./bind-aircraft.Dw5wbC9U.js";import P from"./add-reduce-prepayment.CFi_fr2N.js";import k from"./prepayment-log.DZReYtjF.js";import R from"./deposit-channels-set.BbvnbqFk.js";import{g as F,c as S,e as U,a as x}from"./payee-suppiler.CHbksLZE.js";import{i as B}from"./payee-user.CU3MmAV4.js";/* empty css */import"./el-col.C5zs1k7m.js";import"./payee-order.DJI946QK.js";import"./el-card.kHDD8wqT.js";import"./settlement-log.D6v7OThP.js";import"./add-channel.B3vjSIDp.js";import"./payee-channel.D41yhsm3.js";import"./channel-code.QzHYRo4Y.js";import"./single_fee.DGLu_qmo.js";import"./test_channel.PDkYf14N.js";import"./el-link.N13kbqVa.js";import"./fee-risk.Bpmo_WSm.js";import"./el-time-select.CCsKPV3N.js";import"./copy-channel.PdYLve3a.js";import"./sub-channel.CPN7rluA.js";import"./sub-channel-add.Bsr5Uns5.js";import"./sub-channel-fee.B-7KHEJT.js";import"./sub-channel-risk.DcTt28Pd.js";import"./channel-fee.DwxUsBkw.js";import"./channel-risk.D5ggv0lv.js";import"./staticData.8wZxkmL4.js";const A={style:{"margin-bottom":"4px"}},L=e({__name:"supplier-info",setup(e){a({legacy:!0});let L=[];const V=t("日切清账,关闭通道"),M=t("warning"),z=t("0"),T=l({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:"number",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}),I=()=>{T.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),O()};o(()=>{O()});const O=()=>{let e={limit:T.per_page,page:T.page},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(T.searchFields);F(Object.assign(e,a)).then(e=>{T.tableData=e.data,T.total=e.total,clearInterval(Y.value),z.value=e.system_clear_status,1==e.system_clear_status&&(M.value="danger",V.value="日切清账中,所有支付通道已关闭",initLoad||(J(),initLoad=!0)),2==e.system_clear_status&&(M.value="success",V.value="日切清账完成,请手动点击开启所有通道")}).catch(()=>{T.loading=!1})},q=()=>{T.showAddSupplierDialog=!0,T.addForm.values.id=""},E=t(null),X=()=>{T.dialogShowChannelVisible=!1},G=()=>{let e=T.addForm.values;e.id?U(e).then(e=>{T.showAddSupplierDialog=!1,y.success("编辑成功!"),O()}):x(e).then(e=>{T.showAddSupplierDialog=!1,O(),y.success("添加成功!")})},N=()=>{H(4,[])},W=()=>{f.confirm("确定要重置供应的预付吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{}).catch(()=>{})};let Y=t(null);const H=(e,a)=>{B({type:e,clear_ids:a}).then(e=>{O(),clearInterval(Y.value),J()})},J=()=>{Y.value=setInterval(()=>{O()},1e4)},K=()=>{O()};return(e,a)=>{const t=d,l=v,o=g,F=c,U=b,x=_,B=w;return s(),r("div",null,[i(U,{type:"export",columns:h(T).columns,searchFields:h(T).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>h(T).searchFields=e),data:h(T).tableData,per_page:h(T).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>h(T).per_page=e),page:h(T).page,"onUpdate:page":a[2]||(a[2]=e=>h(T).page=e),total:h(T).total,onGetTableData:O,onResetForm:I,loading:h(T).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:n(()=>[i(t,{type:"primary",onClick:q},{default:n(()=>a[15]||(a[15]=[p("添加供应商")])),_:1,__:[15]}),i(t,{type:h(M),onClick:N},{default:n(()=>[p(m(h(V)),1)]),_:1},8,["type"]),i(t,{type:"danger",onClick:W},{default:n(()=>a[16]||(a[16]=[p("重置预付")])),_:1,__:[16]})]),count:n(()=>[i(l,null,{default:n(()=>a[17]||(a[17]=[p("总跑量0.0000 总预付0.0000 总应下发0.0000 总剩余0.0000")])),_:1,__:[17]})]),prepay_money_slot:n(({row:e})=>[u("div",null,m(e.account.prepay_money),1)]),status_slot:n(({row:e})=>[i(o,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-value":1,"inactive-value":2,onChange:a=>(e=>{f.alert("是否确定对当前用户进行状态切换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{S({id:e.id,status:e.status}).then(e=>{y.success("修改成功!")})}).catch(()=>{e.status=1==e.status?2:1})})(e),"active-text":"正常","inactive-text":"停用"},null,8,["modelValue","onUpdate:modelValue","onChange"])]),operate_slot:n(({row:l})=>[u("div",A,[i(F,null,{default:n(()=>[i(t,{type:1==l.clear_status?"danger":"warning",size:"small",onClick:e=>(e=>{if("1"==e.clear_status)return y.warning("清账中,请勿重复点击");f.alert("是否确定对当前用户进行日切清账?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{y.success("清账中"),H(4,[e.shop_id])}).catch(()=>{})})(l)},{default:n(()=>[p(m(1==l.clear_status?"清账中":"清账"),1)]),_:2},1032,["type","onClick"]),i(t,{type:"primary",onClick:e=>((e={})=>{T.showBindAircraftDialog=!0,T.currentRow=e})(l),size:"small"},{default:n(()=>a[18]||(a[18]=[p("飞机")])),_:2,__:[18]},1032,["onClick"]),i(t,{type:"primary",onClick:e=>((e={})=>{T.showPrePaymentDialog=!0,T.currentRow=e})(l),size:"small"},{default:n(()=>a[19]||(a[19]=[p("加/减预付")])),_:2,__:[19]},1032,["onClick"])]),_:2},1024)]),u("div",null,[i(F,null,{default:n(()=>[i(t,{type:"primary",onClick:e=>((e={})=>{T.showPrePaymentLogDialog=!0,T.currentRow=e})(l),size:"small"},{default:n(()=>a[20]||(a[20]=[p("预付日志")])),_:2,__:[20]},1032,["onClick"]),i(t,{type:"primary",onClick:e=>((e={})=>{T.dialogShowChannelVisible=!0,D(()=>{E.value&&E.value.filterChannel(e)})})(l),size:"small"},{default:n(()=>a[21]||(a[21]=[p("渠道")])),_:2,__:[21]},1032,["onClick"]),i(t,{type:"primary",onClick:e=>(e=>{T.showAddSupplierDialog=!0,T.addForm.values.supplier_name=e.supplier_name,T.addForm.values.warn_money=e.warn_money,T.addForm.values.credit_money=e.credit_money,T.addForm.values.id=e.id})(l),size:"small"},{default:n(()=>a[22]||(a[22]=[p("编辑")])),_:2,__:[22]},1032,["onClick"]),i(t,{type:"primary",onClick:a=>e.handleFeeRisk(l),size:"small"},{default:n(()=>a[23]||(a[23]=[p("删除")])),_:2,__:[23]},1032,["onClick"])]),_:2},1024)])]),default:n(()=>[a[24]||(a[24]=p('" '))]),_:1,__:[24]},8,["columns","searchFields","data","per_page","page","total","loading"]),i(x,{showDialog:h(T).showAddSupplierDialog,"onUpdate:showDialog":a[3]||(a[3]=e=>h(T).showAddSupplierDialog=e),formData:h(T).addForm,"onUpdate:formData":a[4]||(a[4]=e=>h(T).addForm=e),ref:"addSupplierRef"},{submit:n(()=>[i(t,{type:"primary",onClick:G},{default:n(()=>a[25]||(a[25]=[p("确定")])),_:1,__:[25]})]),_:1},8,["showDialog","formData"]),i(x,{showDialog:h(T).showMergeSupplierDialog,"onUpdate:showDialog":a[5]||(a[5]=e=>h(T).showMergeSupplierDialog=e),formData:h(T).mergeForm,"onUpdate:formData":a[6]||(a[6]=e=>h(T).mergeForm=e),ref:"productRef"},{submit:n(()=>[i(t,{type:"primary",onClick:e.confirmBatchSetting},{default:n(()=>a[26]||(a[26]=[p("确定")])),_:1,__:[26]},8,["onClick"])]),_:1},8,["showDialog","formData"]),i(j,{showMergeListDialog:h(T).showMergeListDialog,"onUpdate:showMergeListDialog":a[7]||(a[7]=e=>h(T).showMergeListDialog=e)},null,8,["showMergeListDialog"]),i(C,{showBindAircraftDialog:h(T).showBindAircraftDialog,"onUpdate:showBindAircraftDialog":a[8]||(a[8]=e=>h(T).showBindAircraftDialog=e),currentRow:h(T).currentRow,"onUpdate:currentRow":a[9]||(a[9]=e=>h(T).currentRow=e)},null,8,["showBindAircraftDialog","currentRow"]),i(P,{showPrePaymentDialog:h(T).showPrePaymentDialog,"onUpdate:showPrePaymentDialog":a[10]||(a[10]=e=>h(T).showPrePaymentDialog=e),onConfrimPrePay:K,currentRow:h(T).currentRow,"onUpdate:currentRow":a[11]||(a[11]=e=>h(T).currentRow=e)},null,8,["showPrePaymentDialog","currentRow"]),i(k,{showPrePaymentLogDialog:h(T).showPrePaymentLogDialog,"onUpdate:showPrePaymentLogDialog":a[12]||(a[12]=e=>h(T).showPrePaymentLogDialog=e),currentRow:h(T).currentRow,"onUpdate:currentRow":a[13]||(a[13]=e=>h(T).currentRow=e)},null,8,["showPrePaymentLogDialog","currentRow"]),i(B,{modelValue:h(T).dialogShowChannelVisible,"onUpdate:modelValue":a[14]||(a[14]=e=>h(T).dialogShowChannelVisible=e),title:"渠道管理",width:"70vw","before-close":X},{default:n(()=>[i(R,{ref_key:"depositChannelRef",ref:E},null,512)]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-912533eb"]]);export{L as default};