TmallWeb-dist/js/order-taobao-list.CoY7r6Dd.js

2 lines
5.8 KiB
JavaScript
Raw Normal View History

2025-08-05 00:02:33 +08:00
import{_ as e}from"./index.DiwcnuvH.js";import{bI as t,ag as a,bW as o,b6 as l,bX as r,be as s,c as n,e as p,N as i,w as d,l as c,n as _,t as u,al as m,O as g,E as h,an as b,g as f,bu as y,b0 as v}from"./index.DjGThAdz.js";import w from"./taobao-order-operate-template.BnZGxewE.js";import j from"./order-taobao-top-info.CMdsioA6.js";import{B as C,C as k}from"./service.BCmiTIe4.js";import{i as F,h as x}from"./commonOptions.CpODg7Hg.js";import"./el-col.BuQveV1c.js";import"./el-card.CGVzT4Bx.js";import"./el-tab-pane.DPdojEJq.js";import"./account.CuTixaZ8.js";import"./dropdown.C4Keut3V.js";import"./deposit.DUFaTeNT.js";import"./merchant.BuDP7swB.js";const T={key:0},D={key:1},S={__name:"order-taobao-list",props:{channel_id:{type:[Number,String],default:""}},setup(S){const{copy:A}=t({legacy:!0}),E=S;let z=[],B=[];const N=a({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:o()},{prop:"completed_at",label:"完成时间",type:"date",dateType:"datetimerange",value:[]},{label:"订单状态",type:"select",prop:"status",value:"",options:z},{label:"通知状态",type:"select",prop:"notify_status",value:"",options:B},{label:"充值账号",prop:"recharge_account",type:"input",value:""}],total:0,page:1,per_page:10,loading:!1,btnLoading:!1,showAddDialog:!1}),O=e=>{N.seletedCloums=e},R=()=>{v.confirm("是否确认批量补发通知?","系统提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{N.loading=!0;const e=N.seletedCloums.map(e=>e.id).filter(e=>void 0!==e);k({id:e}).then(()=>{y.success("批量补发通知成功"),I(),N.loading=!1}).catch(()=>{N.loading=!1})})},U=e=>{A(e).then(()=>{y.success("复制成功")})},G=(e,t)=>{let a="";return(1==t?z:B).some(t=>{if(t.value==e)return a=t.label,!0}),a},K=()=>{N.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value="completed_at"===e.prop?[]:o():e.value=""}),I()};l(()=>{N.searchFields.forEach(e=>{"status"===e.prop&&(e.options=z=F()),"notify_status"===e.prop&&(e.options=B=x())}),I()});const I=()=>{var e,t;N.loading=!0;let a={per_page:N.per_page,page:N.page,channel_id:E.channel_id},o=function(e){const t={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(t[e.prop]=e.value)}),t}(N.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.completed_at_end=o.completed_at[1]?r(o.completed_at[1]):""),delete o.created_at,delete o.completed_at,C(Object.assign(a,o)).then(e=>{Array.isArray(e.data)||(e.data=[]);const t=e.data.some(e=>3==e.status),a=e.data.some