mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-13 01:21:53 +08:00
✨ CRM:完善 CRM 相关实现(产品)
This commit is contained in:
@@ -100,7 +100,7 @@
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import * as ProductApi from '@/api/crm/product'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/category'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import { getSimpleUserList, UserVO } from '@/api/system/user'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
|
@@ -29,7 +29,7 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/category'
|
||||
|
||||
defineOptions({ name: 'CrmProductCategoryForm' })
|
||||
|
||||
|
@@ -73,7 +73,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/category'
|
||||
import ProductCategoryForm from './ProductCategoryForm.vue'
|
||||
import { handleTree } from '@/utils/tree'
|
||||
|
||||
|
@@ -18,13 +18,13 @@
|
||||
</div>
|
||||
<ContentWrap class="mt-10px">
|
||||
<el-descriptions :column="5" direction="vertical">
|
||||
<el-descriptions-item label="产品类别">
|
||||
{{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品类别">{{ product.categoryName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品单位">
|
||||
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_UNIT" :value="product.unit" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品价格">{{ fenToYuan(product.price) }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="产品价格">
|
||||
{{ erpPriceInputFormatter(product.price) }} 元
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品编码">{{ product.no }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</ContentWrap>
|
||||
@@ -34,9 +34,8 @@
|
||||
<script setup lang="ts">
|
||||
import ProductForm from '@/views/crm/product/ProductForm.vue'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { fenToYuan } from '@/utils'
|
||||
import { erpPriceInputFormatter } from '@/utils'
|
||||
import * as ProductApi from '@/api/crm/product'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
||||
|
||||
// 操作修改
|
||||
const formRef = ref()
|
||||
@@ -44,12 +43,4 @@ const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
const { product } = defineProps<{ product: ProductApi.ProductVO }>()
|
||||
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
|
||||
|
||||
/** 初始化 */
|
||||
const productCategoryList = ref([]) // 产品分类树
|
||||
|
||||
onMounted(async () => {
|
||||
productCategoryList.value = await ProductCategoryApi.getProductCategoryList({})
|
||||
})
|
||||
</script>
|
||||
|
@@ -8,11 +8,11 @@
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="产品名称">{{ product.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品编码">{{ product.no }}</el-descriptions-item>
|
||||
<el-descriptions-item label="价格">{{ fenToYuan(product.price) }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="产品描述">{{ product.description }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品类型">
|
||||
{{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }}
|
||||
<el-descriptions-item label="价格">
|
||||
{{ erpPriceInputFormatter(product.price) }} 元
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品描述">{{ product.description }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品类型">{{ product.categoryName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="是否上下架">
|
||||
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_STATUS" :value="product.status" />
|
||||
</el-descriptions-item>
|
||||
@@ -27,8 +27,7 @@
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import * as ProductApi from '@/api/crm/product'
|
||||
import { fenToYuan } from '@/utils'
|
||||
import * as ProductCategoryApi from '@/api/crm/product/productCategory'
|
||||
import { erpPriceInputFormatter } from '@/utils'
|
||||
|
||||
const { product } = defineProps<{
|
||||
product: ProductApi.ProductVO
|
||||
@@ -36,10 +35,4 @@ const { product } = defineProps<{
|
||||
|
||||
// 展示的折叠面板
|
||||
const activeNames = ref(['basicInfo'])
|
||||
|
||||
/** 初始化 */
|
||||
const productCategoryList = ref([]) // 产品分类树
|
||||
onMounted(async () => {
|
||||
productCategoryList.value = await ProductCategoryApi.getProductCategoryList({})
|
||||
})
|
||||
</script>
|
||||
|
@@ -133,7 +133,6 @@ import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as ProductApi from '@/api/crm/product'
|
||||
import ProductForm from './ProductForm.vue'
|
||||
import { fenToYuanFormat } from '@/utils/formatter'
|
||||
import { erpPriceTableColumnFormatter } from '@/utils'
|
||||
|
||||
defineOptions({ name: 'CrmProduct' })
|
||||
|
Reference in New Issue
Block a user