Commit 02e7ce04 by qinjianhui

feat: 对账单导出

parent 4ca55170
...@@ -330,7 +330,13 @@ export function updateReconciliation(data: AccountStatementNote) { ...@@ -330,7 +330,13 @@ export function updateReconciliation(data: AccountStatementNote) {
data, data,
) )
} }
export function exportExcelApi(ids: string) {
return axios.get<never, BaseRespData<never>>('reconciliation/exportExcel', {
params: {
ids,
},
})
}
export function getShipmentDetailsById(data: DetailForm) { export function getShipmentDetailsById(data: DetailForm) {
return axios.post<never, BasePaginationData<BillOrderDetailData>>( return axios.post<never, BasePaginationData<BillOrderDetailData>>(
'reconciliation/getItemList', 'reconciliation/getItemList',
...@@ -338,12 +344,9 @@ export function getShipmentDetailsById(data: DetailForm) { ...@@ -338,12 +344,9 @@ export function getShipmentDetailsById(data: DetailForm) {
) )
} }
export function getLogListApi(id?: number) { export function getLogListApi(id?: number) {
return axios.get<never, BaseRespData<LogList[]>>( return axios.get<never, BaseRespData<LogList[]>>('reconciliation/getLog', {
'reconciliation/getLog', params: { id },
{ })
params: { id },
},
)
} }
export function auditOrderApi(url: string, data: string) { export function auditOrderApi(url: string, data: string) {
return axios.get(url, { return axios.get(url, {
......
...@@ -76,6 +76,27 @@ ...@@ -76,6 +76,27 @@
</span> </span>
</div> </div>
<div class="order-list-expand_item_info_title"> <div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label">商品SKU:</span>
<span class="order-list-expand_item_value">{{
item.variant_sku || '--'
}}</span>
</div>
<div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label">baseSku:</span>
<span class="order-list-expand_item_value">{{
item.base_sku || '--'
}}</span>
</div>
<div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label">店铺单号:</span>
<span class="order-list-expand_item_value">{{
item.shop_number || '--'
}}</span>
</div>
</div>
<div class="order-list-expand_item_info">
<div class="order-list-expand_item_info_title">
<span class="order-list-expand_item_label">已发数:</span> <span class="order-list-expand_item_label">已发数:</span>
<span class="order-list-expand_item_value">{{ <span class="order-list-expand_item_value">{{
item.shipment_num || 0 item.shipment_num || 0
...@@ -132,10 +153,9 @@ const copy = (text: string) => { ...@@ -132,10 +153,9 @@ const copy = (text: string) => {
margin-top: 10px; margin-top: 10px;
} }
.order-list-expand_item { .order-list-expand_item {
display: grid; display: flex;
font-size: 14px; font-size: 14px;
gap: 10px; justify-content: space-between;
grid-template-columns: repeat(2, 1fr);
} }
.order-list-expand_item:not(:last-child) { .order-list-expand_item:not(:last-child) {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
> >
驳回 驳回
</el-button> </el-button>
<el-button type="success" @click="exportExcel"> 导出 </el-button>
<el-button <el-button
v-if="nodeId === 30" v-if="nodeId === 30"
type="danger" type="danger"
...@@ -531,6 +532,7 @@ import { ...@@ -531,6 +532,7 @@ import {
confirmOrderApi, confirmOrderApi,
rejectOrderApi, rejectOrderApi,
getLogListApi, getLogListApi,
exportExcelApi,
} from '@/api/order' } from '@/api/order'
import { ref, onMounted, watch, nextTick } from 'vue' import { ref, onMounted, watch, nextTick } from 'vue'
...@@ -546,6 +548,7 @@ import { DetailForm, ShipmentOrderDetailData } from '@/types/api/deliveryNote' ...@@ -546,6 +548,7 @@ import { DetailForm, ShipmentOrderDetailData } from '@/types/api/deliveryNote'
import shipmentOrderDetailInfo from '@/components/ShipmentOrderDetail.vue' import shipmentOrderDetailInfo from '@/components/ShipmentOrderDetail.vue'
import ImageView from '@/components/ImageView.vue' import ImageView from '@/components/ImageView.vue'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { filePath } from '@/api/axios'
// import { getUserMarkList } from '@/api/auth.ts' // import { getUserMarkList } from '@/api/auth.ts'
interface Tree { interface Tree {
...@@ -851,6 +854,18 @@ const getLogList = async () => { ...@@ -851,6 +854,18 @@ const getLogList = async () => {
console.error(e) console.error(e)
} }
} }
const exportExcel = async () => {
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
}
const ids = selections.value.map((el) => el.id).join(',')
try {
const res = await exportExcelApi(ids)
window.open(filePath + res.data)
} catch (e) {
console.error(e)
}
}
onMounted(() => { onMounted(() => {
getTreeNum() getTreeNum()
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment