diff --git a/src/api/oa/base/templateVariable/index.ts b/src/api/oa/base/templateVariable/index.ts index 8e8d1a5..1a20aae 100644 --- a/src/api/oa/base/templateVariable/index.ts +++ b/src/api/oa/base/templateVariable/index.ts @@ -74,3 +74,11 @@ export function getBaseTemplateVariableList (query) { params: query }); }; + +export function templateAssign(query) { + return request({ + url: '/oa/base/templateVariable/assign', + method: 'post', + data: query + }); +}; diff --git a/src/api/oa/crm/crmSupplierInfo/index.ts b/src/api/oa/crm/crmSupplierInfo/index.ts new file mode 100644 index 0000000..e74285d --- /dev/null +++ b/src/api/oa/crm/crmSupplierInfo/index.ts @@ -0,0 +1,76 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CrmSupplierInfoVO, CrmSupplierInfoForm, CrmSupplierInfoQuery } from '@/api/oa/crm/crmSupplierInfo/types'; + +/** + * 查询供应商信息列表 + * @param query + * @returns {*} + */ + +export const listCrmSupplierInfo = (query?: CrmSupplierInfoQuery): AxiosPromise => { + return request({ + url: '/oa/crm/crmSupplierInfo/list', + method: 'get', + params: query + }); +}; + +/** + * 查询供应商信息详细 + * @param supplierId + */ +export const getCrmSupplierInfo = (supplierId: string | number): AxiosPromise => { + return request({ + url: '/oa/crm/crmSupplierInfo/' + supplierId, + method: 'get' + }); +}; + +/** + * 新增供应商信息 + * @param data + */ +export const addCrmSupplierInfo = (data: CrmSupplierInfoForm) => { + return request({ + url: '/oa/crm/crmSupplierInfo', + method: 'post', + data: data + }); +}; + +/** + * 修改供应商信息 + * @param data + */ +export const updateCrmSupplierInfo = (data: CrmSupplierInfoForm) => { + return request({ + url: '/oa/crm/crmSupplierInfo', + method: 'put', + data: data + }); +}; + +/** + * 删除供应商信息 + * @param supplierId + */ +export const delCrmSupplierInfo = (supplierId: string | number | Array) => { + return request({ + url: '/oa/crm/crmSupplierInfo/' + supplierId, + method: 'delete' + }); +}; + +/** + * 下拉框查询供应商信息列表 + * @param query + * @returns {*} + */ +export function getCrmSupplierInfoList (query) { + return request({ + url: '/oa/crm/crmSupplierInfo/getCrmSupplierInfoList', + method: 'get', + params: query + }); +}; diff --git a/src/api/oa/crm/crmSupplierInfo/types.ts b/src/api/oa/crm/crmSupplierInfo/types.ts new file mode 100644 index 0000000..1d0f481 --- /dev/null +++ b/src/api/oa/crm/crmSupplierInfo/types.ts @@ -0,0 +1,401 @@ +export interface CrmSupplierInfoVO { + /** + * 供应商ID + */ + supplierId: string | number; + + /** + * 供应商名称 + */ + supplierName: string; + + /** + * 助记名称 + */ + mnemonicName: string; + + /** + * 供应商类型(1企业 2个体户 3其他) + */ + supplierType: string; + + /** + * 注册资本(万元) + */ + registeredCapital: number; + + /** + * 成立日期 + */ + establishmentDate: string; + + /** + * 经营范围 + */ + businessScope: string; + + /** + * 主营行业 + */ + mainIndustry: string; + + /** + * 法定代表人 + */ + legalRepresentative: string; + + /** + * 营业执照号码 + */ + businessLicenseNumber: string; + + /** + * 税号 + */ + taxNumber: string; + + /** + * 开户银行 + */ + bankAccountOpening: string; + + /** + * 银行账号 + */ + bankNumber: string; + + /** + * 注册地址 + */ + registeredAddress: string; + + /** + * 经营地址 + */ + businessAddress: string; + + /** + * 联系人 + */ + contactPerson: string; + + /** + * 联系电话 + */ + contactPhone: string; + + /** + * 联系手机 + */ + contactMobile: string; + + /** + * 联系邮箱 + */ + contactEmail: string; + + /** + * 传真 + */ + contactFax: string; + + /** + * 网址 + */ + website: string; + + /** + * 归属人员ID + */ + ownerId: string | number; + + /** + * 详细地址 + */ + detailedAddress: string; + + /** + * 附件ID + */ + ossId: string | number; + + /** + * 备注 + */ + remark: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag: string; + + /** + * 归属人员名称 + */ + ownerName?: string; + +} + +export interface CrmSupplierInfoForm extends BaseEntity { + /** + * 供应商ID + */ + supplierId?: string | number; + + /** + * 供应商名称 + */ + supplierName?: string; + + /** + * 助记名称 + */ + mnemonicName?: string; + + /** + * 供应商类型(1企业 2个体户 3其他) + */ + supplierType?: string; + + /** + * 注册资本(万元) + */ + registeredCapital?: number; + + /** + * 成立日期 + */ + establishmentDate?: string; + + /** + * 经营范围 + */ + businessScope?: string; + + /** + * 主营行业 + */ + mainIndustry?: string; + + /** + * 法定代表人 + */ + legalRepresentative?: string; + + /** + * 营业执照号码 + */ + businessLicenseNumber?: string; + + /** + * 税号 + */ + taxNumber?: string; + + /** + * 开户银行 + */ + bankAccountOpening?: string; + + /** + * 银行账号 + */ + bankNumber?: string; + + /** + * 注册地址 + */ + registeredAddress?: string; + + /** + * 经营地址 + */ + businessAddress?: string; + + /** + * 联系人 + */ + contactPerson?: string; + + /** + * 联系电话 + */ + contactPhone?: string; + + /** + * 联系手机 + */ + contactMobile?: string; + + /** + * 联系邮箱 + */ + contactEmail?: string; + + /** + * 传真 + */ + contactFax?: string; + + /** + * 网址 + */ + website?: string; + + /** + * 归属人员ID + */ + ownerId?: string | number; + + /** + * 详细地址 + */ + detailedAddress?: string; + + /** + * 附件ID + */ + ossId?: string | number; + + /** + * 备注 + */ + remark?: string; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + +} + +export interface CrmSupplierInfoQuery extends PageQuery { + + /** + * 供应商名称 + */ + supplierName?: string; + + /** + * 助记名称 + */ + mnemonicName?: string; + + /** + * 供应商类型(1企业 2个体户 3其他) + */ + supplierType?: string; + + /** + * 注册资本(万元) + */ + registeredCapital?: number; + + /** + * 成立日期 + */ + establishmentDate?: string; + + /** + * 经营范围 + */ + businessScope?: string; + + /** + * 主营行业 + */ + mainIndustry?: string; + + /** + * 法定代表人 + */ + legalRepresentative?: string; + + /** + * 营业执照号码 + */ + businessLicenseNumber?: string; + + /** + * 税号 + */ + taxNumber?: string; + + /** + * 开户银行 + */ + bankAccountOpening?: string; + + /** + * 银行账号 + */ + bankNumber?: string; + + /** + * 注册地址 + */ + registeredAddress?: string; + + /** + * 经营地址 + */ + businessAddress?: string; + + /** + * 联系人 + */ + contactPerson?: string; + + /** + * 联系电话 + */ + contactPhone?: string; + + /** + * 联系手机 + */ + contactMobile?: string; + + /** + * 联系邮箱 + */ + contactEmail?: string; + + /** + * 传真 + */ + contactFax?: string; + + /** + * 网址 + */ + website?: string; + + /** + * 归属人员ID + */ + ownerId?: string | number; + + /** + * 详细地址 + */ + detailedAddress?: string; + + /** + * 附件ID + */ + ossId?: string | number; + + /** + * 激活标识(1是 0否) + */ + activeFlag?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/views/oa/base/printTemplate/template.vue b/src/views/oa/base/printTemplate/template.vue index c2a75db..2b73f9f 100644 --- a/src/views/oa/base/printTemplate/template.vue +++ b/src/views/oa/base/printTemplate/template.vue @@ -29,16 +29,7 @@ const template = ref({}); const editorRef = ref(); -const fieldList = ref([ - { - name: '字段1', - value: '${ziduan1}' - }, - { - name: '字段2', - value: '${ziduan2}' - } -]); +const fieldList = ref([]); const templateData = { data0: '合计-1', @@ -102,7 +93,7 @@ const options = ref({ }, autoSave: { enabled: true, - interval: 300000 + interval: 1000 * 60 * 5 } }, page: { @@ -119,7 +110,7 @@ const options = ref({ } }); const renderTemplate = (str, data) => { - return str.replace(/&\{(.*?)\}/g, (_, path) => { + return str.replace(/#\{(.*?)\}/g, (_, path) => { // console.log(path.split('.').reduce((o, k) => o?.[k], data) ?? ''); return path.split('.').reduce((o, k) => o?.[k], data) ?? ''; }); @@ -207,10 +198,15 @@ const fillData = (e) => { const insertText = (e) => { const editor = editorRef.value; - editor.insertContent({ - type: 'text', - text: e.varName - }); + editor.insertContent( + { + type: 'text', + text: e.varName + }, + { + updateSelection: false + } + ); }; onMounted(async () => { getPrintTemplate(route.query.templateId).then((e) => { diff --git a/src/views/oa/crm/crmSupplierInfo/index.vue b/src/views/oa/crm/crmSupplierInfo/index.vue new file mode 100644 index 0000000..ca24e6e --- /dev/null +++ b/src/views/oa/crm/crmSupplierInfo/index.vue @@ -0,0 +1,611 @@ + + + diff --git a/src/views/oa/erp/contractInfo/contract.vue b/src/views/oa/erp/contractInfo/contract.vue new file mode 100644 index 0000000..698fa5f --- /dev/null +++ b/src/views/oa/erp/contractInfo/contract.vue @@ -0,0 +1,228 @@ + + + + + + diff --git a/src/views/oa/erp/contractInfo/index.vue b/src/views/oa/erp/contractInfo/index.vue index 3a8124b..1bf69e2 100644 --- a/src/views/oa/erp/contractInfo/index.vue +++ b/src/views/oa/erp/contractInfo/index.vue @@ -163,9 +163,12 @@