Merge branch 'master' of https://gitee.com/guochang-hongyun/warm-kingdom-vue3-oa
# Conflicts: # src/api/crm/billtemplate/index.ts # src/views/crm/quotation/QuotationForm.vue # src/views/crm/quotation/components/QuotationProductForm.vuepull/781/head
commit
25cc74d9c3
|
|
@ -1,46 +1,51 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// 票据模版 VO
|
||||
export interface BillTemplateVO {
|
||||
id: number // 主键
|
||||
name: string // 名称
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 票据模版 API
|
||||
export const BillTemplateApi = {
|
||||
// 查询票据模版分页
|
||||
getBillTemplatePage: async (params: any) => {
|
||||
return await request.get({ url: `/crm/bill-template/page`, params })
|
||||
},
|
||||
|
||||
// 查询票据模版详情
|
||||
getBillTemplate: async (id: number) => {
|
||||
return await request.get({ url: `/crm/bill-template/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增票据模版
|
||||
createBillTemplate: async (data: BillTemplateVO) => {
|
||||
return await request.post({ url: `/crm/bill-template/create`, data })
|
||||
},
|
||||
|
||||
// 修改票据模版
|
||||
updateBillTemplate: async (data: BillTemplateVO) => {
|
||||
return await request.put({ url: `/crm/bill-template/update`, data })
|
||||
},
|
||||
|
||||
// 获取模版产品信息
|
||||
getTemplateProduct: async (params: any) => {
|
||||
return await request.get({ url: `crm/bill-template/getBusBillProductItems`, params })
|
||||
},
|
||||
|
||||
// 删除票据模版
|
||||
deleteBillTemplate: async (id: number) => {
|
||||
return await request.delete({ url: `/crm/bill-template/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出票据模版 Excel
|
||||
exportBillTemplate: async (params) => {
|
||||
return await request.download({ url: `/crm/bill-template/export-excel`, params })
|
||||
},
|
||||
}
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 票据模版 VO
|
||||
export interface BillTemplateVO {
|
||||
id: number // 主键
|
||||
name: string // 名称
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 票据模版 API
|
||||
export const BillTemplateApi = {
|
||||
// 查询票据模版分页
|
||||
getBillTemplatePage: async (params: any) => {
|
||||
return await request.get({ url: `/crm/bill-template/page`, params })
|
||||
},
|
||||
|
||||
// 查询票据模版详情
|
||||
getBillTemplate: async (id: number) => {
|
||||
return await request.get({ url: `/crm/bill-template/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增票据模版
|
||||
createBillTemplate: async (data: BillTemplateVO) => {
|
||||
return await request.post({ url: `/crm/bill-template/create`, data })
|
||||
},
|
||||
|
||||
// 修改票据模版
|
||||
updateBillTemplate: async (data: BillTemplateVO) => {
|
||||
return await request.put({ url: `/crm/bill-template/update`, data })
|
||||
},
|
||||
|
||||
// 获取模版产品信息
|
||||
getTemplateProduct: async (params: any) => {
|
||||
return await request.get({ url: `crm/bill-template/getBusBillProductItems`, params })
|
||||
},
|
||||
|
||||
// 删除票据模版
|
||||
deleteBillTemplate: async (id: number) => {
|
||||
return await request.delete({ url: `/crm/bill-template/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获得 票据模版列表(精简)
|
||||
getSimpleList : async () => {
|
||||
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 })
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,6 @@ const getList = (val: []) => {
|
|||
// id: undefined,
|
||||
// productId: undefined,
|
||||
// productName: undefined,
|
||||
// productCategoryId: undefined, //产品分类编号
|
||||
// productUnit: undefined, // 产品单位
|
||||
// productNo: undefined, // 产品条码
|
||||
// productPrice: undefined, // 产品价格
|
||||
|
|
|
|||
|
|
@ -85,8 +85,7 @@ const formLoading = ref(false); // 表单的加载中
|
|||
const formData = ref([]); // 表单数据
|
||||
const formRules = reactive({
|
||||
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
||||
businessPrice: [{ required: true, message: '合同价格不能为空', trigger: 'blur' }],
|
||||
count: [{ required: true, message: '产品数量不能为空', trigger: 'blur' }]
|
||||
businessPrice: [{ required: true, message: '合同价格不能为空', trigger: 'blur' }]
|
||||
});
|
||||
const formRef = ref(null); // 表单 Ref
|
||||
const productList = ref<ProductApi.ProductVO[]>([]); // 产品列表
|
||||
|
|
@ -128,7 +127,6 @@ watch(
|
|||
// id: undefined,
|
||||
// productId: undefined,
|
||||
// productName: undefined,
|
||||
// productCategoryId: undefined, // 产品分类编号
|
||||
// productUnit: undefined, // 产品单位
|
||||
// productNo: undefined, // 产品条码
|
||||
// productPrice: undefined, // 产品价格
|
||||
|
|
@ -155,8 +153,7 @@ const getList = (val: []) => {
|
|||
"detailType": item.detailType,
|
||||
"productUnit": item.unit,
|
||||
"onlinePrice": '',
|
||||
"offlinePrice": '',
|
||||
"count": ''
|
||||
"offlinePrice": ''
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
>
|
||||
<el-table :data="formData" class="-mt-10px">
|
||||
<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 }">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -24,10 +24,17 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品分类编号" min-width="150">
|
||||
<el-table-column label="产品类别" min-width="150">
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.productCategoryId`" :rules="formRules.productCategoryId" class="mb-0px!">
|
||||
<el-input v-model="row.productCategoryId" placeholder="请输入产品分类编号" disabled />
|
||||
<el-form-item :prop="`${$index}.category`" :rules="formRules.category" class="mb-0px!">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -131,8 +138,7 @@ const handleAdd = () => {
|
|||
productUnit: undefined, // 产品单位
|
||||
productNo: undefined, // 产品条码
|
||||
productPrice: undefined, // 产品价格
|
||||
contractPrice: undefined,
|
||||
count: 1
|
||||
contractPrice: undefined
|
||||
}
|
||||
formData.value.push(row)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,6 +363,7 @@ import * as CustomerApi from '@/api/crm/customer'
|
|||
import * as UserApi from '@/api/system/user'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import * as BusinessApi from '@/api/crm/business'
|
||||
import {BillTemplateApi } from '@/api/crm/billtemplate'
|
||||
import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'
|
||||
|
||||
/** CRM 方案报价 表单 */
|
||||
|
|
@ -524,6 +525,8 @@ const open = async (type: string) => {
|
|||
}
|
||||
|
||||
deptList.value = await DeptApi.getSimpleDeptList()
|
||||
// 获得用户列表
|
||||
invoiceTemplateList.value = await BillTemplateApi.getSimpleList()
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,8 @@ const formRules = reactive({
|
|||
quotationId: [{ required: true, message: '报价编号不能为空', trigger: 'blur' }],
|
||||
productId: [{ required: true, message: '产品编号不能为空', trigger: 'blur' }],
|
||||
productName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }],
|
||||
detailType: [{ required: true, message: '产品分类编号不能为空', trigger: 'blur' }],
|
||||
category: [{ required: true, message: '产品类型不能为空', trigger: 'blur' }],
|
||||
detailType: [{ required: true, message: '产品明细类型不能为空', trigger: 'blur' }],
|
||||
productUnit: [{ required: true, message: '产品单位不能为空', trigger: 'blur' }],
|
||||
onlinePrice: [{ required: true, message: '线上价格不能为空', trigger: 'blur' }],
|
||||
offlinePrice: [{ required: true, message: '线下价格不能为空', trigger: 'blur' }],
|
||||
|
|
|
|||
Loading…
Reference in New Issue