@ -1,3 +1,4 @@
|
||||
<!-- 合同详情:产品列表 -->
|
||||
<template>
|
||||
<el-table :data="list" :show-overflow-tooltip="true" :stripe="true">
|
||||
<el-table-column align="center" label="产品名称" prop="name" width="160" />
|
||||
@ -35,7 +36,8 @@ defineOptions({ name: 'ContractProductList' })
|
||||
const props = withDefaults(defineProps<{ modelValue: ProductApi.ProductExpandVO[] }>(), {
|
||||
modelValue: () => []
|
||||
})
|
||||
const list = ref<ProductApi.ProductExpandVO[]>([]) // 列表数量
|
||||
const list = ref<ProductApi.ProductExpandVO[]>([]) // 产品列表
|
||||
|
||||
/** 计算 totalPrice */
|
||||
const getTotalPrice = computed(() => (row: ProductApi.ProductExpandVO) => {
|
||||
const totalPrice =
|
||||
@ -43,8 +45,9 @@ const getTotalPrice = computed(() => (row: ProductApi.ProductExpandVO) => {
|
||||
row.totalPrice = isNaN(totalPrice) ? 0 : yuanToFen(totalPrice)
|
||||
return isNaN(totalPrice) ? 0 : totalPrice.toFixed(2)
|
||||
})
|
||||
const isSetListValue = ref(false) // 判断是否已经给 list 赋值过,用于编辑表单商品回显
|
||||
// 编辑时合同商品回显
|
||||
|
||||
/** 编辑时合同产品回显 */
|
||||
const isSetListValue = ref(false) // 判断是否已经给 list 赋值过,用于编辑表单产品回显
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
|
||||
@ -87,6 +87,7 @@ const getOperateLog = async (contractId: number) => {
|
||||
}
|
||||
|
||||
/** 转移 */
|
||||
// TODO @puhui999:这个组件,要不传递业务类型,然后组件里判断 title 和 api 能调用哪个;整体治理掉;
|
||||
const transferFormRef = ref<InstanceType<typeof CrmTransferForm>>() // 合同转移表单 ref
|
||||
const transferContract = () => {
|
||||
transferFormRef.value?.open('合同转移', contract.value.id, ContractApi.transferContract)
|
||||
|
||||
Reference in New Issue
Block a user