|
@@ -13,11 +13,18 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="订单金额" prop="paymentPrice" />
|
|
|
<el-table-column label="三梵成本" prop="costAmount" />
|
|
|
- <el-table-column label="预计利润" prop="expectedProfit" />
|
|
|
+ <el-table-column label="预计总利润" prop="expectedProfit" />
|
|
|
</el-table>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="请款" :label-position="'top'">
|
|
|
<el-table :data="formData.data.payment" style="width: 100%">
|
|
|
+ <el-table-column label="请款类型">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <div>
|
|
|
+ {{ dictKeyValue(scope.row.type, expenseType) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="请款金额" prop="amount" />
|
|
|
<el-table-column label="请款时间" prop="requestsTime" />
|
|
|
<el-table-column label="打款时间" prop="remitTime" />
|
|
@@ -173,6 +180,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { getFundReceived, getPayment, getOrderList } from '@/api/business/contract/info'
|
|
|
+import { getListByCodeApi } from '@/api/system/dictData'
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
const props = defineProps({
|
|
@@ -190,6 +198,7 @@ const orderDetail = ref({
|
|
|
orderItemList: [],
|
|
|
packagingList: []
|
|
|
})
|
|
|
+const expenseType = ref([])
|
|
|
const calculateTotalProfit = () => {
|
|
|
let profit = 0
|
|
|
if (formData.data.fundReceived && formData.data.fundReceived.length > 0) {
|
|
@@ -249,7 +258,21 @@ const orderTotal = () => {
|
|
|
let money = Number(Math.round((goodsTotal() + packagingTotal()) * 100) / 100)
|
|
|
return money
|
|
|
}
|
|
|
+const dictKeyValue = (value, arr) => {
|
|
|
+ if ((value || value === 0) && arr) {
|
|
|
+ value = value + ''
|
|
|
+ const current = arr.find((x) => x.value == value)
|
|
|
+ if (current != undefined && current.label) {
|
|
|
+ return current.label
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
+ getListByCodeApi({ code: 'expense_type' }).then((res) => {
|
|
|
+ expenseType.value = res
|
|
|
+ })
|
|
|
getFundReceived({ contractId: props.rowData.id }).then((res) => {
|
|
|
formData.data.fundReceived = res
|
|
|
})
|