2025-08-17 11:17:03 +08:00
|
|
|
import{_ as e}from"./index.Dsu7cbNl.js";import{bL as t,ag as a,b6 as o,bo as l,be as r,c as n,e as p,N as s,w as i,l as d,t as c,al as _,O as u,E as g,g as m,bn as h}from"./index.CgUrhMi-.js";import b from"./order-taobao-top-info.B8o9RXHX.js";import{w as v}from"./service.D4jtoLKX.js";import{d as f,c as y}from"./commonOptions.Ag0Metzh.js";import"./el-col.Kqx4qMN2.js";import"./deposit.Bsh_76DW.js";import"./merchant.CyZlgVZS.js";const w={key:0},F={key:1},j={__name:"order-taobao-list",props:{channel_id:{type:[Number,String],default:""}},setup(j){const{copy:k}=t({legacy:!0}),D=j;let x=[],C=[];const E=a({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:120,align:"center"},{prop:"recharge_account",label:"充值账号",width:90,align:"center"},{prop:"product_name",label:"商品名称",width:90,align:"center"},{prop:"sku_id",label:"商品id",width:90,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"}],tableData:[],searchFields:[{label:"系统单号",prop:"order_no",type:"input",value:""},{label:"商户单号",prop:"merchant_order_no",type:"input",value:""},{prop:"created_at",label:"下单时间",type:"date",dateType:"datetimerange",value:[]},{prop:"completed_at",label:"完成时间",type:"date",dateType:"datetimerange",value:[]},{label:"订单状态",type:"select",prop:"status",value:"",options:x},{label:"通知状态",type:"select",prop:"notify_status",value:"",options:C}],total:0,page:1,per_page:10,loading:!1,btnLoading:!1,showAddDialog:!1}),T=e=>{k(e).then(()=>{h.success("复制成功")})},O=(e,t)=>{let a="";return(1===t?x:C).some(t=>{if(t.value==e)return a=t.label,!0}),a},R=()=>{E.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),S()};o(()=>{E.searchFields.forEach(e=>{"status"===e.prop&&(e.options=x=f()),"notify_status"===e.prop&&(e.options=C=y())}),S()});const S=()=>{var e,t;E.loading=!0;let a={per_page:E.per_page,page:E.page,channel_id:D.channel_id},o=function(e){const t={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(t[e.prop]=e.value)}),t}(E.searchFields);(null==(e=o.created_at)?void 0:e.length)>0&&(o.created_at_start=o.created_at[0]?l(o.created_at[0]):"",o.created_at_end=o.created_at[1]?l(o.created_at[1]):""),(null==(t=o.completed_at)?void 0:t.length)>0&&(o.completed_at_start=o.completed_at[0]?l(o.completed_at[0]):"",o.completed_at_end=o.completed_at[1]?l(o.completed_at[1]):""),v(Object.assign(a,o)).then(e=>{E.tableData=e.data,E.total=e.total,E.loading=!1}).catch(()=>{E.loading=!1})};return(t,a)=>{const o=r("DocumentCopy"),l=g,h=e;return p(),n("div",null,[s(b),s(h,{type:"export",columns:m(E).columns,searchFields:m(E).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>m(E).searchFields=e),data:m(E).tableData,per_page:m(E).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>m(E).per_page=e),page:m(E).page,"onUpdate:page":a[2]||(a[2]=e=>m(E).page=e),total:m(E).total,onGetTableData:S,onResetForm:R,loading:m(E).loading,showSelection:!1,showRightRefreshSlot:!1},{shop_name_slot:i(({row:e})=>{var t;return[d("div",null,c(null==(t=null==e?void 0:e.shop)?void 0:t.name),1)]}),status_slot:i(({row:e})=>[u(c(O(e.status,1)),1)]),order_no_slot:i(({row:e})=>[e.order_no?(p(),n("div",w,[s(l,{onClick:t=>T(e.order_no),size:16,color:"#5f80c7"},{default:i(()=>[s(o)]),_:2},1032,["onClick"]),u(" "+c(null==e?void 0:e.order_no),1)])):_("",!0),e.merchant_order_no?(p(),n("div",F,[s(
|