crm 报价 商机 合同 三块整改
parent
9bd370647f
commit
804ab71841
|
|
@ -1,41 +1,46 @@
|
||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 票据模版 VO
|
// 票据模版 VO
|
||||||
export interface BillTemplateVO {
|
export interface BillTemplateVO {
|
||||||
id: number // 主键
|
id: number // 主键
|
||||||
name: string // 名称
|
name: string // 名称
|
||||||
status: number // 状态
|
status: number // 状态
|
||||||
}
|
}
|
||||||
|
|
||||||
// 票据模版 API
|
// 票据模版 API
|
||||||
export const BillTemplateApi = {
|
export const BillTemplateApi = {
|
||||||
// 查询票据模版分页
|
// 查询票据模版分页
|
||||||
getBillTemplatePage: async (params: any) => {
|
getBillTemplatePage: async (params: any) => {
|
||||||
return await request.get({ url: `/crm/bill-template/page`, params })
|
return await request.get({ url: `/crm/bill-template/page`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询票据模版详情
|
// 查询票据模版详情
|
||||||
getBillTemplate: async (id: number) => {
|
getBillTemplate: async (id: number) => {
|
||||||
return await request.get({ url: `/crm/bill-template/get?id=` + id })
|
return await request.get({ url: `/crm/bill-template/get?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增票据模版
|
// 新增票据模版
|
||||||
createBillTemplate: async (data: BillTemplateVO) => {
|
createBillTemplate: async (data: BillTemplateVO) => {
|
||||||
return await request.post({ url: `/crm/bill-template/create`, data })
|
return await request.post({ url: `/crm/bill-template/create`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改票据模版
|
// 修改票据模版
|
||||||
updateBillTemplate: async (data: BillTemplateVO) => {
|
updateBillTemplate: async (data: BillTemplateVO) => {
|
||||||
return await request.put({ url: `/crm/bill-template/update`, data })
|
return await request.put({ url: `/crm/bill-template/update`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除票据模版
|
// 删除票据模版
|
||||||
deleteBillTemplate: async (id: number) => {
|
deleteBillTemplate: async (id: number) => {
|
||||||
return await request.delete({ url: `/crm/bill-template/delete?id=` + id })
|
return await request.delete({ url: `/crm/bill-template/delete?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出票据模版 Excel
|
// 获得 票据模版列表(精简)
|
||||||
exportBillTemplate: async (params) => {
|
getSimpleList : async () => {
|
||||||
return await request.download({ url: `/crm/bill-template/export-excel`, params })
|
return await request.get({ url: `/crm/bill-template/simple-list` })
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
// 导出票据模版 Excel
|
||||||
|
exportBillTemplate: async (params) => {
|
||||||
|
return await request.download({ url: `/crm/bill-template/export-excel`, params })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,6 @@ const getList = (val: []) => {
|
||||||
// id: undefined,
|
// id: undefined,
|
||||||
// productId: undefined,
|
// productId: undefined,
|
||||||
// productName: undefined,
|
// productName: undefined,
|
||||||
// productCategoryId: undefined, //产品分类编号
|
|
||||||
// productUnit: undefined, // 产品单位
|
// productUnit: undefined, // 产品单位
|
||||||
// productNo: undefined, // 产品条码
|
// productNo: undefined, // 产品条码
|
||||||
// productPrice: undefined, // 产品价格
|
// productPrice: undefined, // 产品价格
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,7 @@ const formLoading = ref(false); // 表单的加载中
|
||||||
const formData = ref([]); // 表单数据
|
const formData = ref([]); // 表单数据
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
||||||
businessPrice: [{ required: true, message: '合同价格不能为空', trigger: 'blur' }],
|
businessPrice: [{ required: true, message: '合同价格不能为空', trigger: 'blur' }]
|
||||||
count: [{ required: true, message: '产品数量不能为空', trigger: 'blur' }]
|
|
||||||
});
|
});
|
||||||
const formRef = ref(null); // 表单 Ref
|
const formRef = ref(null); // 表单 Ref
|
||||||
const productList = ref<ProductApi.ProductVO[]>([]); // 产品列表
|
const productList = ref<ProductApi.ProductVO[]>([]); // 产品列表
|
||||||
|
|
@ -128,7 +127,6 @@ watch(
|
||||||
// id: undefined,
|
// id: undefined,
|
||||||
// productId: undefined,
|
// productId: undefined,
|
||||||
// productName: undefined,
|
// productName: undefined,
|
||||||
// productCategoryId: undefined, // 产品分类编号
|
|
||||||
// productUnit: undefined, // 产品单位
|
// productUnit: undefined, // 产品单位
|
||||||
// productNo: undefined, // 产品条码
|
// productNo: undefined, // 产品条码
|
||||||
// productPrice: undefined, // 产品价格
|
// productPrice: undefined, // 产品价格
|
||||||
|
|
@ -155,8 +153,7 @@ const getList = (val: []) => {
|
||||||
"detailType": item.detailType,
|
"detailType": item.detailType,
|
||||||
"productUnit": item.unit,
|
"productUnit": item.unit,
|
||||||
"onlinePrice": '',
|
"onlinePrice": '',
|
||||||
"offlinePrice": '',
|
"offlinePrice": ''
|
||||||
"count": ''
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
>
|
>
|
||||||
<el-table :data="formData" class="-mt-10px">
|
<el-table :data="formData" class="-mt-10px">
|
||||||
<el-table-column label="序号" type="index" width="100" />
|
<el-table-column label="序号" type="index" width="100" />
|
||||||
<el-table-column label="用户ID" min-width="150">
|
<el-table-column label="用户" min-width="150">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.userId`" :rules="formRules.userId" class="mb-0px!">
|
<el-form-item :prop="`${$index}.userId`" :rules="formRules.userId" class="mb-0px!">
|
||||||
<el-input v-model="row.userId" placeholder="请输入用户ID" />
|
<el-input v-model="row.userId" placeholder="请输入用户" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,17 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品分类编号" min-width="150">
|
<el-table-column label="产品类别" min-width="150">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.productCategoryId`" :rules="formRules.productCategoryId" class="mb-0px!">
|
<el-form-item :prop="`${$index}.category`" :rules="formRules.category" class="mb-0px!">
|
||||||
<el-input v-model="row.productCategoryId" placeholder="请输入产品分类编号" disabled />
|
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_CATEGORY" :value="row.category" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品明细" min-width="150">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-form-item :prop="`${$index}.detailType`" :rules="formRules.detailType" class="mb-0px!">
|
||||||
|
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_DETAIL_TYPE" :value="row.detailType" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -131,8 +138,7 @@ const handleAdd = () => {
|
||||||
productUnit: undefined, // 产品单位
|
productUnit: undefined, // 产品单位
|
||||||
productNo: undefined, // 产品条码
|
productNo: undefined, // 产品条码
|
||||||
productPrice: undefined, // 产品价格
|
productPrice: undefined, // 产品价格
|
||||||
contractPrice: undefined,
|
contractPrice: undefined
|
||||||
count: 1
|
|
||||||
}
|
}
|
||||||
formData.value.push(row)
|
formData.value.push(row)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,9 +182,9 @@
|
||||||
<el-form-item label="票据模板" prop="invoiceTemplateId">
|
<el-form-item label="票据模板" prop="invoiceTemplateId">
|
||||||
<el-select v-model="formData.invoiceTemplateId" placeholder="请选择票据模板">
|
<el-select v-model="formData.invoiceTemplateId" placeholder="请选择票据模板">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userOptions"
|
v-for="dict in invoiceTemplateList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
:label="dict.nickname"
|
:label="dict.name"
|
||||||
:value="dict.id"
|
:value="dict.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -361,6 +361,7 @@ import * as CustomerApi from '@/api/crm/customer'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import * as BusinessApi from '@/api/crm/business'
|
import * as BusinessApi from '@/api/crm/business'
|
||||||
|
import {BillTemplateApi } from '@/api/crm/billtemplate'
|
||||||
import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'
|
import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'
|
||||||
|
|
||||||
/** CRM 方案报价 表单 */
|
/** CRM 方案报价 表单 */
|
||||||
|
|
@ -530,6 +531,8 @@ const open = async (type: string, id?: number) => {
|
||||||
// 获得部门树
|
// 获得部门树
|
||||||
deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
deptTree.value = handleTree(await DeptApi.getSimpleDeptList())
|
||||||
deptList.value = await DeptApi.getSimpleDeptList()
|
deptList.value = await DeptApi.getSimpleDeptList()
|
||||||
|
// 获得用户列表
|
||||||
|
invoiceTemplateList.value = await BillTemplateApi.getSimpleList()
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,17 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品分类编号" min-width="150">
|
<el-table-column label="产品类别" min-width="150">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.productCategoryId`" :rules="formRules.productCategoryId" class="mb-0px!">
|
<el-form-item :prop="`${$index}.category`" :rules="formRules.category" class="mb-0px!">
|
||||||
<el-input v-model="row.productCategoryId" placeholder="请输入产品分类编号" disabled />
|
<el-input v-model="row.category" placeholder="请输入产品类别" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品明细" min-width="150">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-form-item :prop="`${$index}.detailType`" :rules="formRules.detailType" class="mb-0px!">
|
||||||
|
<el-input v-model="row.detailType" placeholder="产品明细" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -111,7 +118,8 @@ const formRules = reactive({
|
||||||
quotationId: [{ required: true, message: '报价编号不能为空', trigger: 'blur' }],
|
quotationId: [{ required: true, message: '报价编号不能为空', trigger: 'blur' }],
|
||||||
productId: [{ required: true, message: '产品编号不能为空', trigger: 'blur' }],
|
productId: [{ required: true, message: '产品编号不能为空', trigger: 'blur' }],
|
||||||
productName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }],
|
productName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }],
|
||||||
productCategoryId: [{ required: true, message: '产品分类编号不能为空', trigger: 'blur' }],
|
category: [{ required: true, message: '产品分类编号不能为空', trigger: 'blur' }],
|
||||||
|
detailType: [{ required: true, message: '产品分类编号不能为空', trigger: 'blur' }],
|
||||||
productUnit: [{ required: true, message: '产品单位不能为空', trigger: 'blur' }],
|
productUnit: [{ required: true, message: '产品单位不能为空', trigger: 'blur' }],
|
||||||
onlinePrice: [{ required: true, message: '线上价格不能为空', trigger: 'blur' }],
|
onlinePrice: [{ required: true, message: '线上价格不能为空', trigger: 'blur' }],
|
||||||
offlinePrice: [{ required: true, message: '线下价格不能为空', trigger: 'blur' }],
|
offlinePrice: [{ required: true, message: '线下价格不能为空', trigger: 'blur' }],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue