莳松crm管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ss-crm-manage-web/src/views/Clue/Order/Comp/DialogOrder.vue

107 lines
3.2 KiB

<template>
<Dialog title="成交详情" v-model="show" width="800px">
<el-tabs v-model="tabName">
<el-tab-pane label="线索信息" name="clueInfo">
<Descriptions :data="clueInfo" :schema="clueSchema" :columns="2" labelWidth="130px" />
</el-tab-pane>
<el-tab-pane label="成交信息" name="orderInfo">
<Descriptions :data="orderInfo" :schema="orderSchema" :columns="2" labelWidth="130px" />
<el-divider direction="horizontal" content-position="left">额外支出</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-tab-pane>
<el-tab-pane label="回款记录" name="returnRecord">
<el-table :data="returnRecord" border stripe>
<el-table-column type="index" width="50" />
<el-table-column prop="money" label="回款金额" />
<el-table-column prop="" label="回款日期" />
<el-table-column prop="" label="是否结清" />
<el-table-column prop="remark" label="备注" />
<el-table-column prop="" label="审核状态" />
</el-table>
</el-tab-pane>
</el-tabs>
<div class="mb-15px"></div>
</Dialog>
</template>
<script setup name="DialogOrder">
import * as ClueApi from '@/api/clue'
import * as OrderApi from '@/api/clue/sign'
import { getSimpleFieldList as getClueFieldList } from '@/api/clue/clueField'
import { getSimpleFieldList as getOrderFieldList } from '@/api/clue/orderField'
import { getPaymentList } from '@/api/clue/payment'
import { formatDate } from '@/utils/formatTime'
const tabName = ref('clueInfo')
const show = ref(false)
const clueInfo = ref({})
const orderInfo = ref({})
const returnRecord = ref([])
function open(clueId, orderId) {
try {
show.value = true
tabName.value = 'clueInfo'
getFields()
ClueApi.getClue(clueId).then((data) => {
clueInfo.value = { ...data, ...data.diyParams }
})
OrderApi.getSign(orderId).then((data) => {
orderInfo.value = { ...data, ...data.diyParams }
orderInfo.value.dealDate = formatDate(orderInfo.value.dealDate, 'YYYY-MM-DD HH:mm')
})
getPaymentList({ signId: orderId }).then((data) => {
returnRecord.value = data
})
} catch (error) {
console.log(error)
}
}
const clueSchema = ref([])
const orderSchema = ref([])
function getFields() {
getClueFieldList().then((data) => {
const arr = useCrudSchemas(data).allSchemas.detailSchema
clueSchema.value = [
...arr,
{
field: 'requirement',
label: '诉求',
span: 2
},
{
field: 'remark',
label: '备注',
span: 2,
isEditor: true
}
]
})
getOrderFieldList().then((data) => {
const arr = useCrudSchemas(data).allSchemas.detailSchema
orderSchema.value = [
...arr,
{
field: 'remark',
label: '备注',
span: 2,
isEditor: true
}
]
})
}
defineExpose({
open
})
</script>
<style lang="scss" scoped></style>