This commit is contained in:
qsh
2024-06-26 18:24:45 +08:00
parent f63104591b
commit 848830a21b
9 changed files with 169 additions and 145 deletions

View File

@@ -1,5 +1,5 @@
<template>
<Dialog title="成交登记" v-model="show" width="820px">
<Dialog title="成交登记" v-model="show" width="900px">
<Descriptions
:title="`线索信息-${info.name}`"
:data="info"
@@ -124,7 +124,9 @@
</el-col>
<!-- 进销存模式 -->
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
<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-button
class="mb-5px"
type="primary"
@@ -161,6 +163,11 @@
placeholder="选择规格"
filterable
:disabled="!row.productId"
@change="
row.price = specsOptions(row.productId).find(
(it) => it.specsId == row.specsId
).price
"
>
<el-option
v-for="item in specsOptions(row.productId)"
@@ -171,6 +178,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="销售单价" width="100px" />
<el-table-column prop="signNum" label="成交数量" width="100px">
<template #default="{ row }">
<el-input-number
@@ -199,7 +207,9 @@
</el-table>
</el-col>
<el-col :span="24" :offset="0" class="mb-18px">
<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-button
class="mb-5px"
type="primary"
@@ -247,6 +257,13 @@
</template>
</el-table-column>
</el-table>
<el-divider
v-if="prodTotalPrice + extraTotalPrice"
direction="horizontal"
content-position="left"
>
合计应收{{ prodTotalPrice + extraTotalPrice }}
</el-divider>
</el-col>
<el-col :span="24" :offset="0">
<el-form-item label="备注">
@@ -302,6 +319,17 @@ const props = defineProps({
}
})
const prodTotalPrice = computed(() => {
return form.value.signProducts.reduce(
(pre, cur) => pre + (cur?.price || 0) * (cur?.signNum || 0),
0
)
})
const extraTotalPrice = computed(() => {
return form.value.extraPay.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
})
const showSchema = computed(() => {
const arr = [
{