This commit is contained in:
qsh
2024-06-27 15:09:53 +08:00
parent 848830a21b
commit 6f4067d50c
5 changed files with 214 additions and 30 deletions

View File

@@ -7,13 +7,20 @@
<el-tab-pane label="成交信息" name="orderInfo">
<Descriptions :data="orderInfo" :schema="orderSchema" :columns="2" labelWidth="130px" />
<template v-if="orderInfo.signProducts && orderInfo.signProducts.length">
<el-divider direction="horizontal" content-position="left">成交产品</el-divider>
<el-divider direction="horizontal" content-position="left">
成交产品<span v-if="prodTotalPrice">应收{{ prodTotalPrice }}</span>
</el-divider>
<el-table :data="orderInfo.signProducts" border stripe>
<el-table-column type="index" width="50" />
<el-table-column prop="productName" label="成交产品" />
<el-table-column prop="specsName" label="产品规格" />
<el-table-column prop="signNum" label="成交数量" />
<el-table-column prop="warehouseName" label="发货仓库" />
<el-table-column prop="signNum" label="成交数量" width="100px" />
<el-table-column prop="warehouseName" label="发货仓库" width="150px" />
<el-table-column label="发货状态" width="100px">
<template #default="scope">
{{ scope.row.warehouseName ? '已发货' : '待发货' }}
</template>
</el-table-column>
<el-table-column label="发货备注">
<template #default="scope">
<el-popover
@@ -31,15 +38,26 @@
</el-table-column>
</el-table>
</template>
<el-divider direction="horizontal" content-position="left">其他费用</el-divider>
<el-divider direction="horizontal" content-position="left">
其他费用<span v-if="extraTotalPrice">应收{{ extraTotalPrice }}</span>
</el-divider>
<el-table :data="orderInfo.extraPay" border stripe>
<el-table-column type="index" width="50" />
<el-table-column prop="extraPayType" label="费用项" />
<el-table-column prop="extraPayMoney" label="金额" />
<el-table-column prop="remark" label="备注" />
</el-table>
<el-divider
v-if="prodTotalPrice + extraTotalPrice"
direction="horizontal"
content-position="left"
>
合计应收{{ prodTotalPrice + extraTotalPrice }}
</el-divider>
<div v-if="checkPermi(['clue:order:add-fee'])">
<el-divider direction="horizontal" content-position="left">额外支出</el-divider>
<el-divider direction="horizontal" content-position="left">
额外支出<span v-if="extraPayTotalFee">合计{{ extraPayTotalFee }}</span>
</el-divider>
<el-table :data="extraPayList" border stripe>
<el-table-column type="index" width="50" />
<el-table-column prop="extraPayType" label="支出项" />
@@ -86,11 +104,31 @@ import { formatDate } from '@/utils/formatTime'
const tabName = ref('clueInfo')
const show = ref(false)
const clueInfo = ref({})
const orderInfo = ref({})
const orderInfo = ref({
signProducts: [],
extraPay: []
})
const returnRecordList = ref([])
const aftersaleList = ref([])
const extraPayList = ref([])
const prodTotalPrice = computed(() => {
return orderInfo.value.signProducts.reduce(
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
0
)
})
// 其他费用
const extraTotalPrice = computed(() => {
return orderInfo.value.extraPay.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
})
// 额外支出
const extraPayTotalFee = computed(() => {
return extraPayList.value.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
})
function open(clueId, orderId) {
try {
show.value = true
@@ -122,6 +160,9 @@ const orderSchema = ref([])
function getFields() {
getClueFieldList().then((data) => {
const arr = useCrudSchemas(data).allSchemas.detailSchema
if (arr.length % 2 != 0) {
arr.push({})
}
clueSchema.value = [
...arr,
{
@@ -140,6 +181,9 @@ function getFields() {
getOrderFieldList().then((data) => {
const arr = useCrudSchemas(data).allSchemas.detailSchema
if (arr.length % 2 != 0) {
arr.push({})
}
orderSchema.value = [
...arr,
{