2025-08-12 13:15:23 +08:00
|
|
|
import{_ as e}from"./index.DoJehMc1.js";import{bI as t,r as a,ag as o,bW as l,b6 as s,bX as r,cB as n,be as p,c as i,e as d,N as c,w as u,l as _,n as m,t as g,al as h,O as b,E as f,an as y,g as v,bu as w,b0 as j}from"./index.6CBafaUJ.js";import{T as k,E as x}from"./taobao-order-operate-template.BED6jvWh.js";import C from"./order-taobao-top-info.BHl-ZkF8.js";import{B as F,C as S}from"./service.CFh9MDTf.js";import{i as T,h as D}from"./commonOptions.DBWK2JrU.js";import"./el-col.D6-mP02b.js";import"./el-card.D8Jbu39S.js";import"./el-tab-pane.DClwWWZk.js";import"./account.DYFHT1i6.js";import"./dropdown.CJcv31R7.js";import"./deposit.Bs9ENqdA.js";import"./merchant.Ctv4LQAR.js";const E={key:0},A={style:{display:"flex","align-items":"center","justify-content":"center"}},R={key:0},B={key:1},z={__name:"order-taobao-list",props:{channel_id:{type:[Number,String],default:""}},setup(z){const{copy:N}=t({legacy:!0}),O=a(null),U=z;let G=[],I=[];const K=o({seletedCloums:[],columns:[{prop:"recharge_account_remark",label:"收款账号备注",width:120,align:"center"},{prop:"id",label:"唯一标识",width:90,align:"center"},{prop:"shop",label:"店铺名称",width:90,align:"center",slot:"shop_name_slot"},{prop:"taobao_id",label:"淘宝id",width:260,align:"center"},{prop:"recharge_account",label:"充值账号",align:"center"},{prop:"product_name",label:"商品名称",width:90,align:"center"},{prop:"sku_id",label:"商品编码",width:110,align:"center"},{prop:"order_amount",label:"订单金额",width:90,align:"center"},{prop:"order_no",label:"系统单号/商户单号",width:300,align:"center",slot:"order_no_slot"},{prop:"created_at",label:"下单时间",align:"center"},{prop:"completed_at",label:"完成时间",align:"center"},{prop:"expire_time",label:"付款倒计时",align:"center"},{prop:"status",label:"订单状态",width:90,align:"center",slot:"status_slot"},{prop:"notify_status",label:"通知状态",width:90,align:"center",slot:"notify_status_slot"},{prop:"notify_time",label:"通知时间",align:"center"},{prop:"operate",label:"操作",width:440,align:"center",slot:"operate",fixed:"right"}],tableData:[],searchFields:[{label:"系统单号",prop:"order_no",type:"input",value:""},{label:"商户单号",prop:"merchant_order_no",type:"input",value:""},{label:"淘宝单号",prop:"taobao_id",type:"input",value:""},{prop:"created_at",label:"下单时间",type:"date",dateType:"datetimerange",value:l()},{prop:"completed_at",label:"完成时间",type:"date",dateType:"datetimerange",value:[]},{label:"订单状态",type:"select",prop:"status",value:"",options:G},{label:"通知状态",type:"select",prop:"notify_status",value:"",options:I},{label:"充值账号",prop:"recharge_account",type:"input",value:""}],total:0,page:1,per_page:10,loading:!1,btnLoading:!1,showAddDialog:!1}),W=()=>{O.value&&"function"==typeof O.value.fetchStatistics&&O.value.fetchStatistics()},q=e=>{K.seletedCloums=e},L=()=>{j.confirm("是否确认批量补发通知?","系统提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{K.loading=!0;const e=K.seletedCloums.map(e=>e.id).filter(e=>void 0!==e);S({id:e}).then(()=>{w.success("批量补发通知成功"),M(),K.loading=!1}).catch(()=>{K.loading=!1})})},X=e=>{N(e).then(()=>{w.success("复制成功")})},H=(e,t)=>{let a="";return(1==t?G:I).some(t=>{if(t.value==e)return a=t.label,!0}),a},J=()=>{K.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value="completed_at"===e.prop?[]:l():e.value=""}),M()};s(()=>{K.searchFields.forEach(e=>{"status"===e.prop&&(e.options=G=T()),"notify_status"===e.prop&&(e.options=I=D())}),M()});const M=()=>{var e,t;K.loading=!0;let a={per_page:K.per_page,page:K.page,channel_id:U.channel_id},o=function(e){const t={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(t[e.prop]=e.value)}),t}(K.searchFields);(null==(e=o.created_at)?void 0:e.length)>0&&(o.created_at_start=o.created_at[0]?r(o.created_at[0]):"",o.created_at_end=o.created_at[1]?r(o.created_at[1]):""),(null==(t=o.completed_at)?void 0:t.length)>0&&(o.completed_at_start=o.completed_at[0]?r(o.completed_at[0]):"",o.comple
|