|
@@ -22,29 +22,28 @@
|
|
{{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }}
|
|
{{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="产品单位">
|
|
<el-descriptions-item label="产品单位">
|
|
- <dict-tag :type="DICT_TYPE.PRODUCT_UNIT" :value="product.unit"/>
|
|
|
|
|
|
+ <dict-tag :type="DICT_TYPE.CRM_PRODUCT_UNIT" :value="product.unit" />
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="产品价格">{{ fenToYuan(product.price) }}元</el-descriptions-item>
|
|
<el-descriptions-item label="产品价格">{{ fenToYuan(product.price) }}元</el-descriptions-item>
|
|
<el-descriptions-item label="产品编码">{{ product.no }}</el-descriptions-item>
|
|
<el-descriptions-item label="产品编码">{{ product.no }}</el-descriptions-item>
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
- <ProductForm ref="formRef" @success="emit('refresh')"/>
|
|
|
|
|
|
+ <ProductForm ref="formRef" @success="emit('refresh')" />
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import ProductForm from '@/views/crm/product/ProductForm.vue'
|
|
import ProductForm from '@/views/crm/product/ProductForm.vue'
|
|
-import {DICT_TYPE} from "@/utils/dict";
|
|
|
|
-import {fenToYuan} from "@/utils";
|
|
|
|
-import * as ProductApi from "@/api/crm/product";
|
|
|
|
|
|
+import { DICT_TYPE } from '@/utils/dict'
|
|
|
|
+import { fenToYuan } from '@/utils'
|
|
|
|
+import * as ProductApi from '@/api/crm/product'
|
|
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
|
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
|
|
|
|
|
-
|
|
|
|
-//操作修改
|
|
|
|
|
|
+// 操作修改
|
|
const formRef = ref()
|
|
const formRef = ref()
|
|
const openForm = (type: string, id?: number) => {
|
|
const openForm = (type: string, id?: number) => {
|
|
formRef.value.open(type, id)
|
|
formRef.value.open(type, id)
|
|
}
|
|
}
|
|
-const {product} = defineProps<{ product: ProductApi.ProductVO }>()
|
|
|
|
|
|
+const { product } = defineProps<{ product: ProductApi.ProductVO }>()
|
|
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
|
|
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
|
|
|
|
|
|
/** 初始化 */
|
|
/** 初始化 */
|