Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a9e4ef9b
authored
Feb 24, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
CRM:完善 CRM 相关实现(产品)
parent
56db6bf3
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
26 additions
and
46 deletions
+26
-46
src/api/crm/product/category/index.ts
+0
-0
src/api/crm/product/index.ts
+1
-7
src/views/crm/business/components/BusinessList.vue
+7
-2
src/views/crm/business/components/BusinessListModal.vue
+2
-2
src/views/crm/contract/components/ContractList.vue
+2
-2
src/views/crm/contract/detail/index.vue
+1
-2
src/views/crm/contract/index.vue
+0
-1
src/views/crm/product/ProductForm.vue
+1
-1
src/views/crm/product/category/ProductCategoryForm.vue
+1
-1
src/views/crm/product/category/index.vue
+1
-1
src/views/crm/product/detail/ProductDetailsHeader.vue
+5
-14
src/views/crm/product/detail/ProductDetailsInfo.vue
+5
-12
src/views/crm/product/index.vue
+0
-1
No files found.
src/api/crm/product/
productC
ategory/index.ts
→
src/api/crm/product/
c
ategory/index.ts
View file @
a9e4ef9b
File moved
src/api/crm/product/index.ts
View file @
a9e4ef9b
...
@@ -8,17 +8,11 @@ export interface ProductVO {
...
@@ -8,17 +8,11 @@ export interface ProductVO {
price
:
number
price
:
number
status
:
number
status
:
number
categoryId
:
number
categoryId
:
number
categoryName
?:
string
description
:
string
description
:
string
ownerUserId
:
number
ownerUserId
:
number
}
}
// TODO 芋艿:待删除
export
interface
ProductExpandVO
extends
ProductVO
{
count
:
number
discountPercent
:
number
totalPrice
:
number
}
// 查询产品列表
// 查询产品列表
export
const
getProductPage
=
async
(
params
)
=>
{
export
const
getProductPage
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
`/crm/product/page`
,
params
})
return
await
request
.
get
({
url
:
`/crm/product/page`
,
params
})
...
...
src/views/crm/business/components/BusinessList.vue
View file @
a9e4ef9b
...
@@ -38,7 +38,12 @@
...
@@ -38,7 +38,12 @@
</el-link>
</el-link>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"商机金额"
align=
"center"
prop=
"price"
:formatter=
"fenToYuanFormat"
/>
<el-table-column
label=
"商机金额"
align=
"center"
prop=
"price"
:formatter=
"erpPriceTableColumnFormatter"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"customerName"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"customerName"
/>
<el-table-column
label=
"商机组"
align=
"center"
prop=
"statusTypeName"
/>
<el-table-column
label=
"商机组"
align=
"center"
prop=
"statusTypeName"
/>
<el-table-column
label=
"商机阶段"
align=
"center"
prop=
"statusName"
/>
<el-table-column
label=
"商机阶段"
align=
"center"
prop=
"statusName"
/>
...
@@ -66,8 +71,8 @@ import * as BusinessApi from '@/api/crm/business'
...
@@ -66,8 +71,8 @@ import * as BusinessApi from '@/api/crm/business'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
BusinessForm
from
'./../BusinessForm.vue'
import
BusinessForm
from
'./../BusinessForm.vue'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
{
fenToYuanFormat
}
from
'@/utils/formatter'
import
BusinessListModal
from
'./BusinessListModal.vue'
import
BusinessListModal
from
'./BusinessListModal.vue'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
const
message
=
useMessage
()
// 消息
const
message
=
useMessage
()
// 消息
...
...
src/views/crm/business/components/BusinessListModal.vue
View file @
a9e4ef9b
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
label=
"商机金额"
label=
"商机金额"
align=
"center"
align=
"center"
prop=
"price"
prop=
"price"
:formatter=
"
fenToYuanFormat
"
:formatter=
"
erpPriceInputFormatter
"
/>
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"customerName"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"customerName"
/>
<el-table-column
label=
"商机组"
align=
"center"
prop=
"statusTypeName"
/>
<el-table-column
label=
"商机组"
align=
"center"
prop=
"statusTypeName"
/>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
*
as
BusinessApi
from
'@/api/crm/business'
import
*
as
BusinessApi
from
'@/api/crm/business'
import
BusinessForm
from
'../BusinessForm.vue'
import
BusinessForm
from
'../BusinessForm.vue'
import
{
fenToYuanFormat
}
from
'@/utils/formatter
'
import
{
erpPriceInputFormatter
}
from
'@/utils
'
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
...
src/views/crm/contract/components/ContractList.vue
View file @
a9e4ef9b
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
label=
"合同金额(元)"
label=
"合同金额(元)"
align=
"center"
align=
"center"
prop=
"price"
prop=
"price"
:formatter=
"
fenToYuanFormat
"
:formatter=
"
erpPriceInputFormatter
"
/>
/>
<el-table-column
<el-table-column
label=
"开始时间"
label=
"开始时间"
...
@@ -61,9 +61,9 @@
...
@@ -61,9 +61,9 @@
import
*
as
ContractApi
from
'@/api/crm/contract'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
ContractForm
from
'./../ContractForm.vue'
import
ContractForm
from
'./../ContractForm.vue'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
{
BizTypeEnum
}
from
'@/api/crm/permission'
import
{
fenToYuanFormat
}
from
'@/utils/formatter'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
erpPriceInputFormatter
}
from
'@/utils'
defineOptions
({
name
:
'CrmContractList'
})
defineOptions
({
name
:
'CrmContractList'
})
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
...
src/views/crm/contract/detail/index.vue
View file @
a9e4ef9b
...
@@ -19,9 +19,8 @@
...
@@ -19,9 +19,8 @@
<el-tab-pane
label=
"产品"
>
<el-tab-pane
label=
"产品"
>
<ContractProductList
:contract=
"contract"
/>
<ContractProductList
:contract=
"contract"
/>
</el-tab-pane>
</el-tab-pane>
<!-- TODO 合同 -->
<el-tab-pane
label=
"回款"
>
123
</el-tab-pane>
<!-- TODO @puhui999:回款信息 -->
<!-- TODO @puhui999:回款信息 -->
<el-tab-pane
label=
"回款"
>
123
</el-tab-pane>
<el-tab-pane
label=
"团队成员"
>
<el-tab-pane
label=
"团队成员"
>
<PermissionList
<PermissionList
ref=
"permissionListRef"
ref=
"permissionListRef"
...
...
src/views/crm/contract/index.vue
View file @
a9e4ef9b
...
@@ -245,7 +245,6 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
...
@@ -245,7 +245,6 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
*
as
ContractApi
from
'@/api/crm/contract'
import
ContractForm
from
'./ContractForm.vue'
import
ContractForm
from
'./ContractForm.vue'
import
{
fenToYuanFormat
}
from
'@/utils/formatter'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
import
*
as
CustomerApi
from
'@/api/crm/customer'
import
*
as
CustomerApi
from
'@/api/crm/customer'
...
...
src/views/crm/product/ProductForm.vue
View file @
a9e4ef9b
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
productC
ategory'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
c
ategory'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
{
getSimpleUserList
,
UserVO
}
from
'@/api/system/user'
import
{
getSimpleUserList
,
UserVO
}
from
'@/api/system/user'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useUserStore
}
from
'@/store/modules/user'
...
...
src/views/crm/product/category/ProductCategoryForm.vue
View file @
a9e4ef9b
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</Dialog>
</Dialog>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
productC
ategory'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
c
ategory'
defineOptions
({
name
:
'CrmProductCategoryForm'
})
defineOptions
({
name
:
'CrmProductCategoryForm'
})
...
...
src/views/crm/product/category/index.vue
View file @
a9e4ef9b
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
productC
ategory'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/
c
ategory'
import
ProductCategoryForm
from
'./ProductCategoryForm.vue'
import
ProductCategoryForm
from
'./ProductCategoryForm.vue'
import
{
handleTree
}
from
'@/utils/tree'
import
{
handleTree
}
from
'@/utils/tree'
...
...
src/views/crm/product/detail/ProductDetailsHeader.vue
View file @
a9e4ef9b
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
</div>
</div>
<ContentWrap
class=
"mt-10px"
>
<ContentWrap
class=
"mt-10px"
>
<el-descriptions
:column=
"5"
direction=
"vertical"
>
<el-descriptions
:column=
"5"
direction=
"vertical"
>
<el-descriptions-item
label=
"产品类别"
>
<el-descriptions-item
label=
"产品类别"
>
{{
product
.
categoryName
}}
</el-descriptions-item>
{{
productCategoryList
?.
find
((
c
)
=>
c
.
id
===
product
.
categoryId
)?.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"产品单位"
>
<el-descriptions-item
label=
"产品单位"
>
<dict-tag
:type=
"DICT_TYPE.CRM_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=
"产品价格"
>
{{
erpPriceInputFormatter
(
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>
...
@@ -34,9 +34,8 @@
...
@@ -34,9 +34,8 @@
<
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
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
fenToYuan
}
from
'@/utils'
import
{
erpPriceInputFormatter
}
from
'@/utils'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/productCategory'
// 操作修改
// 操作修改
const
formRef
=
ref
()
const
formRef
=
ref
()
...
@@ -44,12 +43,4 @@ const openForm = (type: string, id?: number) => {
...
@@ -44,12 +43,4 @@ 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
productCategoryList
=
ref
([])
// 产品分类树
onMounted
(
async
()
=>
{
productCategoryList
.
value
=
await
ProductCategoryApi
.
getProductCategoryList
({})
})
</
script
>
</
script
>
src/views/crm/product/detail/ProductDetailsInfo.vue
View file @
a9e4ef9b
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
<el-descriptions
:column=
"4"
>
<el-descriptions
:column=
"4"
>
<el-descriptions-item
label=
"产品名称"
>
{{ product.name }}
</el-descriptions-item>
<el-descriptions-item
label=
"产品名称"
>
{{ product.name }}
</el-descriptions-item>
<el-descriptions-item
label=
"产品编码"
>
{{ product.no }}
</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=
"价格"
>
<el-descriptions-item
label=
"产品描述"
>
{{ product.description }}
</el-descriptions-item>
{{ erpPriceInputFormatter(product.price) }} 元
<el-descriptions-item
label=
"产品类型"
>
{{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }}
</el-descriptions-item>
</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=
"是否上下架"
>
<el-descriptions-item
label=
"是否上下架"
>
<dict-tag
:type=
"DICT_TYPE.CRM_PRODUCT_STATUS"
:value=
"product.status"
/>
<dict-tag
:type=
"DICT_TYPE.CRM_PRODUCT_STATUS"
:value=
"product.status"
/>
</el-descriptions-item>
</el-descriptions-item>
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductApi
from
'@/api/crm/product'
import
{
fenToYuan
}
from
'@/utils'
import
{
erpPriceInputFormatter
}
from
'@/utils'
import
*
as
ProductCategoryApi
from
'@/api/crm/product/productCategory'
const
{
product
}
=
defineProps
<
{
const
{
product
}
=
defineProps
<
{
product
:
ProductApi
.
ProductVO
product
:
ProductApi
.
ProductVO
...
@@ -36,10 +35,4 @@ const { product } = defineProps<{
...
@@ -36,10 +35,4 @@ const { product } = defineProps<{
// 展示的折叠面板
// 展示的折叠面板
const
activeNames
=
ref
([
'basicInfo'
])
const
activeNames
=
ref
([
'basicInfo'
])
/** 初始化 */
const
productCategoryList
=
ref
([])
// 产品分类树
onMounted
(
async
()
=>
{
productCategoryList
.
value
=
await
ProductCategoryApi
.
getProductCategoryList
({})
})
</
script
>
</
script
>
src/views/crm/product/index.vue
View file @
a9e4ef9b
...
@@ -133,7 +133,6 @@ import { dateFormatter } from '@/utils/formatTime'
...
@@ -133,7 +133,6 @@ import { dateFormatter } from '@/utils/formatTime'
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
import
*
as
ProductApi
from
'@/api/crm/product'
import
*
as
ProductApi
from
'@/api/crm/product'
import
ProductForm
from
'./ProductForm.vue'
import
ProductForm
from
'./ProductForm.vue'
import
{
fenToYuanFormat
}
from
'@/utils/formatter'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
import
{
erpPriceTableColumnFormatter
}
from
'@/utils'
defineOptions
({
name
:
'CrmProduct'
})
defineOptions
({
name
:
'CrmProduct'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment