sf_web_dist/js/supplier-settlement.1757572449837HE16z4YD.js
2025-09-11 14:35:18 +08:00

2 lines
4.2 KiB
JavaScript

import{_ as e}from"./index.1757572449837DqyYy1dn.js";import{b2 as a,bt as l,r as t,ag as o,db as r,b4 as n,c as s,e as p,N as m,w as u,bN as d,bL as i,l as c,t as _,g,an as b,O as y}from"./index.1757572449837Cu_lKLCH.js";import{E as v}from"./el-card.1757572449837ut6uYbKT.js";import{g as f}from"./payee-count.1757572449837BQfAlo73.js";import{p as h}from"./common.1757572449837CCwWzMi9.js";/* empty css */import"./el-col.1757572449837Dq9OPBTw.js";const w=a({__name:"supplier-settlement",setup(a){l({legacy:!0});const w=t("create_time"),D=t("DESC"),x=o({columns:[{prop:"supplier_id",label:"供应商编号",align:"center"},{prop:"supplier_name",label:"供应商名称",align:"center"},{prop:"flow_money",label:"流水金额",align:"center",sortable:"custom",formatter:h},{prop:"sum_money",label:"跑量金额",align:"center",sortable:"custom",formatter:h},{prop:"sum_three_money",label:"实际入金额",align:"center",sortable:"custom",formatter:h},{prop:"sum_three_fee",label:"成本",align:"center",sortable:"custom",formatter:h},{prop:"count_money",label:"应下发金额",align:"center",sortable:"custom",slot:"count_money_slot"},{prop:"sum_money",label:"总预付金额",align:"center",sortable:"custom",slot:"sum_money_slot"},{prop:"prepay_money",label:"剩余预付",align:"center",sortable:"custom",slot:"prepay_money_slot"},{prop:"succ_num",label:"成功订单笔数",align:"center",sortable:"custom"}],tableData:[],searchFields:[{prop:"supplier_query",label:"供应商编号/名称",type:"input",value:""},{prop:"create_time",label:"时间范围",type:"date",dateType:"datetimerange",value:[r().startOf("day").format("YYYY-MM-DD HH:mm:ss"),r().endOf("day").format("YYYY-MM-DD HH:mm:ss")]}],total:0,page:1,per_page:50,loading:!1}),F=t([]),j=()=>{x.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),Y()};n(()=>{Y()});const Y=()=>{x.loading=!0;let e={limit:x.per_page,page:x.page,orderBy:w.value,orderType:D.value,type:"1"},a=function(e){const a={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(a[e.prop]=e.value)}),a}(x.searchFields);f(Object.assign(e,a)).then(e=>{x.tableData=e.data,x.total=e.total,x.loading=!1}).catch(()=>{x.loading=!1})},E=e=>{w.value=e.prop,D.value="descending"==e.order?"DESC":"ASC",Y()},S=async e=>{F.value=[];let a={supplier_id:e.supplier_id,limit:"1000",page:1,type:"3",create_time:x.searchFields[1].value},l=await f(a);e.tableData=l.data};return(a,l)=>{const t=b,o=i,r=d,n=v,f=e;return p(),s("div",null,[m(f,{type:"export",columns:g(x).columns,searchFields:g(x).searchFields,"onUpdate:searchFields":l[0]||(l[0]=e=>g(x).searchFields=e),data:g(x).tableData,per_page:g(x).per_page,"onUpdate:per_page":l[1]||(l[1]=e=>g(x).per_page=e),page:g(x).page,"onUpdate:page":l[2]||(l[2]=e=>g(x).page=e),total:g(x).total,onGetTableData:Y,onResetForm:j,loading:g(x).loading,showSelection:!1,showRightRefreshSlot:!1,showExpand:!0,expandWidth:120,expandLabel:"供应商渠道跑量",onSortChange:E,onExpandChange:S},{"search-btns":u(()=>[m(t,{type:"danger"},{default:u(()=>l[3]||(l[3]=[y("导出数据")])),_:1,__:[3]})]),prepay_money_slot:u(({row:e})=>{var a;return[c("div",null,_(g(h)(null==(a=null==e?void 0:e.account)?void 0:a.prepay_money)),1)]}),count_money_slot:u(({row:e})=>{var a;return[c("div",null,_(g(h)(null==(a=null==e?void 0:e.account)?void 0:a.money)),1)]}),sum_money_slot:u(({row:e})=>{var a;return[c("div",null,_(g(h)(null==(a=null==e?void 0:e.account)?void 0:a.sum_money)),1)]}),expand:u(({row:e})=>[m(n,{style:{margin:"20px"}},{header:u(()=>l[4]||(l[4]=[c("div",{class:"card-title"},"供应商渠道跑量",-1)])),default:u(()=>[m(r,{data:e.tableData,border:""},{default:u(()=>[m(o,{prop:"api_name",label:"渠道"}),m(o,{prop:"flow_money",label:"流水"},{default:u(({row:e})=>[c("div",null,_(g(h)(e.flow_money)),1)]),_:2},1024),m(o,{prop:"sum_money",label:"跑量"},{default:u(({row:e})=>[c("div",null,_(g(h)(e.sum_money)),1)]),_:2},1024),m(o,{prop:"sum_three_money",label:"入账"},{default:u(({row:e})=>[c("div",null,_(g(h)(e.sum_three_money)),1)]),_:2},1024),m(o,{prop:"succ_num",label:"成功笔数"})]),_:2},1032,["data"])]),_:2},1024)]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"])])}}},[["__scopeId","data-v-b0882721"]]);export{w as default};