备货单 打印预览 添加 内勤查看数据
This commit is contained in:
@@ -166,6 +166,13 @@
|
|||||||
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px"
|
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inter-view">
|
||||||
|
<InternalStaffViews
|
||||||
|
v-model:visible="pdf.visible"
|
||||||
|
:vehicle-data="nqData"
|
||||||
|
:default-currency="nqCurrency"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="timelineDialogVisible"
|
v-model="timelineDialogVisible"
|
||||||
@@ -193,6 +200,9 @@
|
|||||||
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
||||||
import { manageService } from '@/api/adminApi'
|
import { manageService } from '@/api/adminApi'
|
||||||
import FilePreview from '@/components/custom/FilePreview.vue'
|
import FilePreview from '@/components/custom/FilePreview.vue'
|
||||||
|
import InternalStaffViews from '@/components/custom/InternalStaffViews.vue'
|
||||||
|
const nqCurrency = ref('')
|
||||||
|
const nqData = ref<any[]>([])
|
||||||
const timelineDialogVisible = ref(false)
|
const timelineDialogVisible = ref(false)
|
||||||
const isFinites = ref(false)
|
const isFinites = ref(false)
|
||||||
const approvalRecords = ref<any[]>([])
|
const approvalRecords = ref<any[]>([])
|
||||||
@@ -293,6 +303,36 @@
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleViewnq = async (row: any) => {
|
||||||
|
const res = await manageService.checkStock({ id: row.id })
|
||||||
|
// 默认币种来自 currency_symbol
|
||||||
|
if (res?.currency_symbol) {
|
||||||
|
nqCurrency.value = res.currency_symbol
|
||||||
|
} else {
|
||||||
|
nqCurrency.value = 'USD'
|
||||||
|
}
|
||||||
|
const list = Array.isArray(res?.veh_list) ? res.veh_list : []
|
||||||
|
nqData.value = list.map((it: any) => ({
|
||||||
|
model_snapshot: it.model_snapshot,
|
||||||
|
qty: 1,
|
||||||
|
clearance_price: it.clearance_price,
|
||||||
|
clearance_price_currency: it.clearance_price?.currency || it.clearance_price_currency,
|
||||||
|
fob_transport_fee: it.fob_transport_fee,
|
||||||
|
fob_fee_currency: it.fob_transport_fee?.currency || it.fob_fee_currency,
|
||||||
|
car_price: it.car_price,
|
||||||
|
car_price_currency: it.car_price?.currency || it.car_price_currency,
|
||||||
|
ocean_freight: it.ocean_freight,
|
||||||
|
ocean_freight_currency: it.ocean_freight?.currency || it.ocean_freight_currency,
|
||||||
|
commission: it.commission,
|
||||||
|
commission_currency: it.commission?.currency || it.commission_currency,
|
||||||
|
retention_price: it.retention_price,
|
||||||
|
retention_price_currency: it.retention_price?.currency || it.retention_price_currency,
|
||||||
|
port_misc_fee: it.port_misc_fee,
|
||||||
|
port_fee_currency: it.port_misc_fee?.currency || it.port_fee_currency,
|
||||||
|
model: it.model_snapshot
|
||||||
|
}))
|
||||||
|
// nqDialogVisible.value = true
|
||||||
|
}
|
||||||
// PDF 预览/打印(公共)
|
// PDF 预览/打印(公共)
|
||||||
const { pdf, frameRef, openWithResponse, download, preparePreview, prepareImages } =
|
const { pdf, frameRef, openWithResponse, download, preparePreview, prepareImages } =
|
||||||
usePdfPreview()
|
usePdfPreview()
|
||||||
@@ -303,6 +343,7 @@
|
|||||||
} else {
|
} else {
|
||||||
isFinites.value = false
|
isFinites.value = false
|
||||||
}
|
}
|
||||||
|
handleViewnq(row)
|
||||||
CrmService.printStock({ id: row.id })
|
CrmService.printStock({ id: row.id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
openWithResponse(res)
|
openWithResponse(res)
|
||||||
@@ -503,4 +544,10 @@
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
.inter-view {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -207,6 +207,13 @@
|
|||||||
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px"
|
style="flex: 1; width: 100%; border: 1px solid #eee; border-radius: 6px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inter-view">
|
||||||
|
<InternalStaffViews
|
||||||
|
v-model:visible="pdf.visible"
|
||||||
|
:vehicle-data="nqData"
|
||||||
|
:default-currency="nqCurrency"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 订单详情弹窗(使用公共内容组件) -->
|
<!-- 订单详情弹窗(使用公共内容组件) -->
|
||||||
@@ -261,9 +268,12 @@
|
|||||||
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
|
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
|
||||||
import type { OrderData } from '@/composables/useOrderDetailDialog'
|
import type { OrderData } from '@/composables/useOrderDetailDialog'
|
||||||
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
|
||||||
|
import InternalStaffViews from '@/components/custom/InternalStaffViews.vue'
|
||||||
import FilePreview from '@/components/custom/FilePreview.vue'
|
import FilePreview from '@/components/custom/FilePreview.vue'
|
||||||
import { usePdfPreview } from '@/composables/usePdfPreview'
|
import { usePdfPreview } from '@/composables/usePdfPreview'
|
||||||
import { manageService } from '@/api/adminApi'
|
import { manageService } from '@/api/adminApi'
|
||||||
|
const nqCurrency = ref('')
|
||||||
|
const nqData = ref<any[]>([])
|
||||||
const timelineDialogVisible = ref(false)
|
const timelineDialogVisible = ref(false)
|
||||||
const approvalRecords = ref<any[]>([])
|
const approvalRecords = ref<any[]>([])
|
||||||
const isFinites = ref(false)
|
const isFinites = ref(false)
|
||||||
@@ -462,6 +472,37 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
const handleViewnq = async (row: any) => {
|
||||||
|
const res = await manageService.checkStock({ id: row.id })
|
||||||
|
// 设置默认币种为数据中的 currency_symbol
|
||||||
|
if (res?.currency_symbol) {
|
||||||
|
nqCurrency.value = res.currency_symbol
|
||||||
|
} else {
|
||||||
|
nqCurrency.value = 'USD' // 兜底默认值
|
||||||
|
}
|
||||||
|
// 取车辆明细列表作为行
|
||||||
|
const list = Array.isArray(res?.veh_list) ? res.veh_list : []
|
||||||
|
nqData.value = list.map((it: any) => ({
|
||||||
|
model_snapshot: it.model_snapshot,
|
||||||
|
qty: 1,
|
||||||
|
clearance_price: it.clearance_price,
|
||||||
|
clearance_price_currency: it.clearance_price?.currency || it.clearance_price_currency,
|
||||||
|
fob_transport_fee: it.fob_transport_fee,
|
||||||
|
fob_fee_currency: it.fob_transport_fee?.currency || it.fob_fee_currency,
|
||||||
|
car_price: it.car_price,
|
||||||
|
car_price_currency: it.car_price?.currency || it.car_price_currency,
|
||||||
|
ocean_freight: it.ocean_freight,
|
||||||
|
ocean_freight_currency: it.ocean_freight?.currency || it.ocean_freight_currency,
|
||||||
|
commission: it.commission,
|
||||||
|
commission_currency: it.commission?.currency || it.commission_currency,
|
||||||
|
retention_price: it.retention_price,
|
||||||
|
retention_price_currency: it.retention_price?.currency || it.retention_price_currency,
|
||||||
|
port_misc_fee: it.port_misc_fee,
|
||||||
|
port_fee_currency: it.port_misc_fee?.currency || it.port_fee_currency,
|
||||||
|
model: it.model_snapshot
|
||||||
|
}))
|
||||||
|
// nqDialogVisible.value = true
|
||||||
}
|
}
|
||||||
// PDF 预览/打印(公共)
|
// PDF 预览/打印(公共)
|
||||||
const { pdf, frameRef, openWithResponse, download, preparePreview, prepareImages } =
|
const { pdf, frameRef, openWithResponse, download, preparePreview, prepareImages } =
|
||||||
@@ -473,6 +514,7 @@
|
|||||||
} else {
|
} else {
|
||||||
isFinites.value = false
|
isFinites.value = false
|
||||||
}
|
}
|
||||||
|
handleViewnq(row)
|
||||||
CrmService.printStock({ id: row.id })
|
CrmService.printStock({ id: row.id })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
openWithResponse(res)
|
openWithResponse(res)
|
||||||
@@ -608,4 +650,10 @@
|
|||||||
color: #ff0000;
|
color: #ff0000;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.inter-view {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user