|
|
|
@ -5,86 +5,55 @@ |
|
|
|
<template> |
|
|
|
<div class="search"> |
|
|
|
<Card> |
|
|
|
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> |
|
|
|
<Form ref="searchForm" :model="searchForm" inline :label-width="100"> |
|
|
|
<FormItem label="状态" prop="orderId"> |
|
|
|
<Select ref="dep" @on-change="checkStatus" clearable="true"> |
|
|
|
<Option v-for="(item, i) in dictData" :key="i" :value="item.value">{{ |
|
|
|
item.title |
|
|
|
}}</Option> |
|
|
|
</Select> |
|
|
|
<Row> |
|
|
|
<Form inline :label-width="90"> |
|
|
|
<FormItem label="开始日期"> |
|
|
|
<DatePicker @on-change="v => searchForm.startDate = v" type="date" placeholder="开始日期" style="width: 160px" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem label="店铺名称" prop="shopName"> |
|
|
|
<Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入公司名称" |
|
|
|
style="width: 200px" /> |
|
|
|
<FormItem label="结束日期"> |
|
|
|
<DatePicker @on-change="v => searchForm.endDate = v" type="date" placeholder="结束日期" style="width: 160px" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem style="margin-left: -35px" class="br"> |
|
|
|
<FormItem> |
|
|
|
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> |
|
|
|
<Button @click="handleReset">重置</Button> |
|
|
|
<a class="drop-down" @click="dropDown"> |
|
|
|
{{ dropDownContent }} |
|
|
|
<Icon :type="dropDownIcon"></Icon> |
|
|
|
</a> |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</Row> |
|
|
|
<Table :loading="loading" border :columns="columns" :data="data"></Table> |
|
|
|
<Row type="flex" justify="end" class="page"> |
|
|
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" |
|
|
|
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" |
|
|
|
size="small" show-total show-elevator show-sizer></Page> |
|
|
|
</Row> |
|
|
|
</Card> |
|
|
|
|
|
|
|
<Modal title="待结算商家汇总" v-model="shopVisible" :mask-closable="false" :width="1100"> |
|
|
|
<Row align="middle" justify="space-between" class="operation"> |
|
|
|
<div> |
|
|
|
<Button @click="add" type="primary" icon="md-briefcase">一键结算</Button> |
|
|
|
<Button @click="delAll" icon="ios-checkbox-outline">确认</Button> |
|
|
|
<Button @click="delAll" icon="md-folder-open">结算</Button> |
|
|
|
</div> |
|
|
|
<div class="icons"> |
|
|
|
<Tooltip content="刷新" placement="top" transfer> |
|
|
|
<Icon type="md-refresh" size="18" class="item" @click="getDataList" /> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip :content="openSearch ? '关闭搜索' : '开启搜索'" placement="top" transfer> |
|
|
|
<Icon type="ios-search" size="18" class="item tip" @click="openSearch = !openSearch" /> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip :content="openTip ? '关闭提示' : '开启提示'" placement="top" transfer> |
|
|
|
<Icon type="md-bulb" size="18" class="item tip" @click="openTip = !openTip" /> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip content="表格密度" placement="top" transfer> |
|
|
|
<Dropdown @on-click="changeTableSize" trigger="click"> |
|
|
|
<Icon type="md-list" size="18" class="item" /> |
|
|
|
<DropdownMenu slot="list"> |
|
|
|
<DropdownItem :selected="tableSize == 'default'" name="default">默认</DropdownItem> |
|
|
|
<DropdownItem :selected="tableSize == 'large'" name="large">宽松</DropdownItem> |
|
|
|
<DropdownItem :selected="tableSize == 'small'" name="small">紧密</DropdownItem> |
|
|
|
</DropdownMenu> |
|
|
|
</Dropdown> |
|
|
|
</Tooltip> |
|
|
|
<Button @click="settleSelected" type="primary" icon="md-folder-open" :loading="settlementLoading" :disabled="settlementLoading">结算选中商家</Button> |
|
|
|
</div> |
|
|
|
<div>账单日期:{{ currentDate }}</div> |
|
|
|
</Row> |
|
|
|
<Alert show-icon v-show="openTip"> |
|
|
|
已选择 |
|
|
|
<span class="select-count">{{ selectList.length }}</span> 项 |
|
|
|
<a class="select-clear" @click="clearSelectAll">清空</a> |
|
|
|
</Alert> |
|
|
|
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" |
|
|
|
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> |
|
|
|
<Table :loading="shopLoading" border :columns="shopColumns" :data="shopData" @on-selection-change="rows => selectList = rows" ref="shopTable"></Table> |
|
|
|
<Row type="flex" justify="end" class="page"> |
|
|
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" |
|
|
|
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" |
|
|
|
<Page :current="shopSearchForm.pageNumber" :total="shopTotal" :page-size="shopSearchForm.pageSize" |
|
|
|
@on-change="changeShopPage" @on-page-size-change="changeShopPageSize" :page-size-opts="[10, 20, 50]" |
|
|
|
size="small" show-total show-elevator show-sizer></Page> |
|
|
|
</Row> |
|
|
|
</Card> |
|
|
|
<Modal :title="线路维护" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000"> |
|
|
|
<logistics-address v-if="Visiable" ref="dialog"></logistics-address> |
|
|
|
<div slot="footer" v-show=Visiable> |
|
|
|
<Button type="text" @click="Visiable = false">关闭</Button> |
|
|
|
<div slot="footer"> |
|
|
|
<Button type="text" @click="shopVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
<Modal :title="线路绑定" v-model="bindingVisiable" :mask-closable="false" :scrollabele="true" :width="1000"> |
|
|
|
<line-binding v-if="bindingVisiable" ref="bindinglog"></line-binding> |
|
|
|
<div slot="footer" v-show=bindingVisiable> |
|
|
|
<Button type="text" @click="bindingVisiable = false">关闭</Button> |
|
|
|
|
|
|
|
<Modal title="结算记录明细" v-model="detailVisible" :mask-closable="false" :width="1500"> |
|
|
|
<Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table> |
|
|
|
<div slot="footer"> |
|
|
|
<Button type="text" @click="detailVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
<Modal :title="充值记录明细" v-model="rechargeVisiable" :mask-closable="false" :scrollabele="true" :width="1000"> |
|
|
|
<recharge-one v-if="rechargeVisiable" ref="rechargelog"></recharge-one> |
|
|
|
<div slot="footer" v-show=rechargeVisiable> |
|
|
|
<Button type="text" @click="rechargeVisiable = false">关闭</Button> |
|
|
|
<Modal title="订单详情" v-model="orderDetailVisible" :mask-closable="false" :scrollabele="true" :width="1000"> |
|
|
|
<logistics-address v-if="orderDetailVisible" @closePage="closeOrderDetail" ref="orderDetailDialog"></logistics-address> |
|
|
|
<div slot="footer" v-show="orderDetailVisible"> |
|
|
|
<Button type="text" @click="orderDetailVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
</div> |
|
|
|
@ -92,269 +61,227 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getAllLogiticsCompanyData, |
|
|
|
deleteLogiticsCompany, |
|
|
|
onLineCompany, |
|
|
|
offLineCompany |
|
|
|
getBillDateSummaryList, |
|
|
|
getBillList, |
|
|
|
getBillDetailList, |
|
|
|
settlementConfirm |
|
|
|
} from "@/api/app"; |
|
|
|
import { |
|
|
|
shortcuts |
|
|
|
} from "@/libs/shortcuts"; |
|
|
|
import excel from "@/libs/excel"; |
|
|
|
import { |
|
|
|
offLineWorker, |
|
|
|
onLineWorker |
|
|
|
} from "@/api"; |
|
|
|
import logisticsAddress from "@/views/sys/order-manage/logisticsAddress"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "logiticsCompany", |
|
|
|
components: {}, |
|
|
|
name: "billHistorical", |
|
|
|
components: { |
|
|
|
logisticsAddress, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dictData: [{ |
|
|
|
title: "全部", |
|
|
|
value: "" |
|
|
|
}, { |
|
|
|
title: "待确认", |
|
|
|
value: 0 |
|
|
|
}, { |
|
|
|
title: "待结算", |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
title: "已打款", |
|
|
|
value: 2 |
|
|
|
}], |
|
|
|
tableSize: "default", |
|
|
|
message: "", |
|
|
|
selectIndex: "", |
|
|
|
currentRow: {}, |
|
|
|
height: 510, |
|
|
|
showCompany: false, |
|
|
|
bindingVisiable: false, |
|
|
|
showType: "0", |
|
|
|
openSearch: true, |
|
|
|
openTip: true, |
|
|
|
loading: true, |
|
|
|
reading: false, |
|
|
|
loadingExport: true, |
|
|
|
exportModalVisible: false, |
|
|
|
importModalVisible: false, |
|
|
|
deployModalVisible: false, |
|
|
|
uploadfile: { |
|
|
|
name: "", |
|
|
|
}, |
|
|
|
drop: false, |
|
|
|
loading: false, |
|
|
|
shopLoading: false, |
|
|
|
detailLoading: false, |
|
|
|
settlementLoading: false, |
|
|
|
shopVisible: false, |
|
|
|
detailVisible: false, |
|
|
|
orderDetailVisible: false, |
|
|
|
currentDate: "", |
|
|
|
selectList: [], |
|
|
|
searchForm: { |
|
|
|
id: "", |
|
|
|
shopName: "", |
|
|
|
contacts: "", |
|
|
|
mobile: "", |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10, |
|
|
|
sort: "createTime", |
|
|
|
order: "desc", |
|
|
|
regionId: JSON.parse(this.getStore("user")).departmentId, |
|
|
|
status: 0, |
|
|
|
startDate: "", |
|
|
|
endDate: "", |
|
|
|
signCompany: "0", |
|
|
|
}, |
|
|
|
selectDate: null, |
|
|
|
options: { |
|
|
|
shortcuts: shortcuts, |
|
|
|
}, |
|
|
|
form: {}, |
|
|
|
columns: [{ |
|
|
|
type: "selection", |
|
|
|
width: 60, |
|
|
|
align: "center", |
|
|
|
fixed: "left", |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
shopSearchForm: { |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
columns: [ |
|
|
|
{ type: "index", width: 60, align: "center" }, |
|
|
|
{ title: "账单日期", key: "billTime", width: 130 }, |
|
|
|
{ title: "商家数", key: "shopCount", width: 90 }, |
|
|
|
{ title: "记录数", key: "recordCount", width: 90 }, |
|
|
|
{ title: "结算基数", key: "totalBaseAmount", width: 120 }, |
|
|
|
{ title: "正向结算", key: "positiveSettlementAmount", width: 120 }, |
|
|
|
{ title: "退款/售后扣款", key: "negativeSettlementAmount", width: 140 }, |
|
|
|
{ title: "平台抽佣", key: "totalCommissionAmount", width: 120 }, |
|
|
|
{ title: "待结算金额", key: "totalSettlementAmount", width: 130 }, |
|
|
|
{ |
|
|
|
type: "index", |
|
|
|
width: 60, |
|
|
|
title: "操作", |
|
|
|
key: "action", |
|
|
|
width: 120, |
|
|
|
align: "center", |
|
|
|
fixed: "left", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "账单周期", |
|
|
|
key: "shopName", |
|
|
|
minWidth: 100, |
|
|
|
sortable: true, |
|
|
|
fixed: "left", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "店铺名称", |
|
|
|
key: "shopName", |
|
|
|
minWidth: 100, |
|
|
|
sortable: true, |
|
|
|
fixed: "left", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "订单数量", |
|
|
|
key: "companyTel", |
|
|
|
minWidth: 150, |
|
|
|
sortable: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "配送费", |
|
|
|
key: "companyEmail", |
|
|
|
minWidth: 250, |
|
|
|
}, |
|
|
|
render: (h, params) => h("a", { on: { click: () => this.openShopSummary(params.row) } }, "查看") |
|
|
|
} |
|
|
|
], |
|
|
|
shopColumns: [ |
|
|
|
{ type: "selection", width: 60, align: "center" }, |
|
|
|
{ title: "店铺名称", key: "shopName", minWidth: 160 }, |
|
|
|
{ title: "记录数", key: "recordCount", width: 90 }, |
|
|
|
{ title: "正向记录", key: "positiveCount", width: 90 }, |
|
|
|
{ title: "扣款记录", key: "negativeCount", width: 90 }, |
|
|
|
{ title: "结算基数", key: "totalBaseAmount", width: 110 }, |
|
|
|
{ title: "正向结算", key: "positiveSettlementAmount", width: 110 }, |
|
|
|
{ title: "退款/售后扣款", key: "negativeSettlementAmount", width: 130 }, |
|
|
|
{ title: "平台抽佣", key: "totalCommissionAmount", width: 110 }, |
|
|
|
{ title: "应结算金额", key: "totalSettlementAmount", width: 120 }, |
|
|
|
{ |
|
|
|
title: "商品原价", |
|
|
|
key: "contacts", |
|
|
|
title: "操作", |
|
|
|
key: "action", |
|
|
|
width: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "餐盒费", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "账户余额支付金额", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "商家实收总金额", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "活动金额", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "抵用券金额", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "平台补贴", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "商品平台抽成", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "商家补贴", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "商品商家抽成", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "商家营收", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "平台营收", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "本期期初", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "实际打款金额", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "账单状态", |
|
|
|
key: "mobile", |
|
|
|
width: 150, |
|
|
|
}, |
|
|
|
align: "center", |
|
|
|
render: (h, params) => h("a", { on: { click: () => this.openDetail(params.row) } }, "明细") |
|
|
|
} |
|
|
|
], |
|
|
|
detailColumns: [ |
|
|
|
{ title: "订单号", key: "orderNumber", minWidth: 140 }, |
|
|
|
{ title: "订单ID", key: "orderId", minWidth: 170 }, |
|
|
|
{ title: "类型", key: "type", width: 100, render: (h, params) => h("span", params.row.type == 2 ? "退款/售后扣款" : "正常结算") }, |
|
|
|
{ title: "结算基数", key: "baseAmount", width: 110 }, |
|
|
|
{ title: "抽佣比例%", key: "commissionRate", width: 110 }, |
|
|
|
{ title: "平台抽佣", key: "commissionAmount", width: 110 }, |
|
|
|
{ title: "商家结算", key: "settlementAmount", width: 110 }, |
|
|
|
{ title: "退款/售后ID", key: "refundId", minWidth: 170 }, |
|
|
|
{ title: "生成时间", key: "createTime", minWidth: 170, render: (h, params) => h("span", this.formatDateTime(params.row.createTime)) }, |
|
|
|
{ title: "支付时间", key: "payTime", minWidth: 170, render: (h, params) => h("span", this.formatDateTime(params.row.payTime)) }, |
|
|
|
{ |
|
|
|
title: "操作", |
|
|
|
key: "action", |
|
|
|
width: 200, |
|
|
|
width: 100, |
|
|
|
align: "center", |
|
|
|
fixed: "right", |
|
|
|
render: (h, params) => { |
|
|
|
return h("div", [h( |
|
|
|
"a", { |
|
|
|
on: { |
|
|
|
click: () => { |
|
|
|
this.findAllRecord(params.row); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
"确认" |
|
|
|
), |
|
|
|
h("Divider", { |
|
|
|
props: { |
|
|
|
type: "vertical", |
|
|
|
}, |
|
|
|
}), |
|
|
|
h( |
|
|
|
"a", { |
|
|
|
on: { |
|
|
|
click: () => { |
|
|
|
this.stationBinding(params.row); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
"详情" |
|
|
|
), |
|
|
|
h("Divider", { |
|
|
|
props: { |
|
|
|
type: "vertical", |
|
|
|
}, |
|
|
|
}), |
|
|
|
h( |
|
|
|
"a", { |
|
|
|
on: { |
|
|
|
click: () => { |
|
|
|
this.edit(params.row); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
"修改" |
|
|
|
), |
|
|
|
]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: (h, params) => h("a", { on: { click: () => this.showOrderDetail(params.row) } }, "查看详情") |
|
|
|
} |
|
|
|
], |
|
|
|
chooseColumns: [], |
|
|
|
filename: "公司数据", |
|
|
|
exportTitle: "确认导出", |
|
|
|
exportType: "", |
|
|
|
data: [], |
|
|
|
exportData: [], |
|
|
|
shopData: [], |
|
|
|
detailData: [], |
|
|
|
total: 0, |
|
|
|
Visiable: false, |
|
|
|
rechargeVisiable: false, |
|
|
|
shopTotal: 0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
// this.getDataList(); |
|
|
|
this.getDataList(); |
|
|
|
}, |
|
|
|
handleSearch() { |
|
|
|
this.searchForm.pageNumber = 1; |
|
|
|
this.getDataList(); |
|
|
|
}, |
|
|
|
formatDateTime(isoString) { |
|
|
|
if (!isoString) return '' |
|
|
|
const date = new Date(isoString) |
|
|
|
const year = date.getFullYear() |
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0') |
|
|
|
const day = String(date.getDate()).padStart(2, '0') |
|
|
|
const hours = String(date.getHours()).padStart(2, '0') |
|
|
|
const minutes = String(date.getMinutes()).padStart(2, '0') |
|
|
|
const seconds = String(date.getSeconds()).padStart(2, '0') |
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
|
|
|
}, |
|
|
|
getDataList() { |
|
|
|
// 多条件搜索用户列表 |
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
getBillDateSummaryList(this.searchForm).then(res => { |
|
|
|
this.loading = false; |
|
|
|
if (res.success) { |
|
|
|
this.data = (res.result && res.result.records) || res.result || []; |
|
|
|
this.total = (res.result && res.result.total) || this.data.length; |
|
|
|
} |
|
|
|
}).catch(() => this.loading = false); |
|
|
|
}, |
|
|
|
handleSearch() { |
|
|
|
changePage(v) { |
|
|
|
this.searchForm.pageNumber = v; |
|
|
|
this.getDataList(); |
|
|
|
}, |
|
|
|
changePageSize(v) { |
|
|
|
this.searchForm.pageNumber = 1; |
|
|
|
this.searchForm.pageSize = 10; |
|
|
|
this.searchForm.pageSize = v; |
|
|
|
this.getDataList(); |
|
|
|
}, |
|
|
|
openShopSummary(row) { |
|
|
|
this.currentDate = row.billTime; |
|
|
|
this.shopVisible = true; |
|
|
|
this.selectList = []; |
|
|
|
this.shopSearchForm.pageNumber = 1; |
|
|
|
this.getShopSummary(); |
|
|
|
}, |
|
|
|
getShopSummary() { |
|
|
|
this.shopLoading = true; |
|
|
|
getBillList({ |
|
|
|
regionId: this.searchForm.regionId, |
|
|
|
settlementDate: this.currentDate, |
|
|
|
status: 0, |
|
|
|
pageNumber: this.shopSearchForm.pageNumber, |
|
|
|
pageSize: this.shopSearchForm.pageSize |
|
|
|
}).then(res => { |
|
|
|
this.shopLoading = false; |
|
|
|
if (res.success) { |
|
|
|
this.shopData = (res.result && res.result.records) || res.result || []; |
|
|
|
this.shopTotal = (res.result && res.result.total) || this.shopData.length; |
|
|
|
} |
|
|
|
}).catch(() => this.shopLoading = false); |
|
|
|
}, |
|
|
|
changeShopPage(v) { |
|
|
|
this.shopSearchForm.pageNumber = v; |
|
|
|
this.getShopSummary(); |
|
|
|
}, |
|
|
|
changeShopPageSize(v) { |
|
|
|
this.shopSearchForm.pageNumber = 1; |
|
|
|
this.shopSearchForm.pageSize = v; |
|
|
|
this.getShopSummary(); |
|
|
|
}, |
|
|
|
openDetail(row) { |
|
|
|
this.detailVisible = true; |
|
|
|
this.detailLoading = true; |
|
|
|
getBillDetailList({ |
|
|
|
regionId: this.searchForm.regionId, |
|
|
|
settlementDate: this.currentDate, |
|
|
|
shopId: row.shopId, |
|
|
|
status: 0 |
|
|
|
}).then(res => { |
|
|
|
this.detailLoading = false; |
|
|
|
if (res.success) this.detailData = res.result || []; |
|
|
|
}).catch(() => this.detailLoading = false); |
|
|
|
}, |
|
|
|
settleSelected() { |
|
|
|
if (this.settlementLoading) return; |
|
|
|
if (this.selectList.length === 0) { |
|
|
|
this.$Message.warning("请选择要结算的商家"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.settlementLoading = true; |
|
|
|
settlementConfirm({ |
|
|
|
shopIds: this.selectList.map(item => item.shopId), |
|
|
|
settlementDate: this.currentDate, |
|
|
|
regionId: this.searchForm.regionId |
|
|
|
}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$Message.success("结算任务已提交"); |
|
|
|
this.selectList = []; |
|
|
|
this.shopVisible = false; |
|
|
|
this.getDataList(); |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.settlementLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
closeOrderDetail(){ |
|
|
|
this.orderDetailVisible = false; |
|
|
|
}, |
|
|
|
showOrderDetail(row) { |
|
|
|
let data = { |
|
|
|
id: row.orderId, |
|
|
|
shopId: row.shopId || "", |
|
|
|
status: "", |
|
|
|
}; |
|
|
|
this.orderDetailVisible = true; |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.orderDetailDialog.initRecharge(data); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 计算高度 |
|
|
|
this.height = Number(document.documentElement.clientHeight - 230); |
|
|
|
this.init(); |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |