feat: update standard interface name

This commit is contained in:
lyx 2024-03-11 19:25:05 +08:00
parent cca6c649c1
commit d2ad2920d1
15 changed files with 44 additions and 44 deletions

View File

@ -1,9 +1,9 @@
import { RecordCategory } from '../../utils/constants';
import { recordItems, record_fee_item } from './records';
import { RecordItems, Record_fee_item } from './records';
export interface Record {
weight_items: any;
record_items: recordItems[];
record_items: RecordItems[];
systemTitle: any;
record_lease_rules: any;
weight: number;
@ -20,6 +20,6 @@ export interface Record {
original_number: any;
movement: number;
category: RecordCategory;
record_fee_items: record_fee_item[];
record_fee_items: Record_fee_item[];
pdfExplain: string;
}

View File

@ -1,9 +1,9 @@
export interface recordItems {
export interface RecordItems {
id: number;
sort: number;
count: number;
comment: string;
product: product;
product: Product;
createdAt: string;
record_id: number;
t_item_id: any;
@ -12,10 +12,10 @@ export interface recordItems {
unit_price: any;
createdById: number;
updatedById: number;
record_item_fee_items: record_fee_item[];
record_item_fee_items: Record_fee_item[];
}
export interface product {
export interface Product {
id: number;
name: string;
sort: number;
@ -30,10 +30,10 @@ export interface product {
createdById: number;
custom_name: string;
updatedById: number;
product_category: product_category;
product_category: Product_category;
}
export interface product_category {
export interface Product_category {
id: number;
attr: string[];
name: string;
@ -49,8 +49,8 @@ export interface product_category {
conversion_unit: string;
}
export interface record_fee_item {
product: product;
export interface Record_fee_item {
product: Product;
id: number;
sort: number;
count: number;

View File

@ -1,9 +1,9 @@
import { product } from './records';
import { Product } from './records';
import { ConversionLogics, countCource } from '../../utils/constants';
export interface FeeRule extends LeaseRule {
id: number;
product: product;
product: Product;
fee_product_id: number;
count_source: countCource;
unit: string;
@ -19,7 +19,7 @@ export interface LeaseRule {
unit_price: number;
product_id?: number;
conversion_logic_id: ConversionLogics;
ucl: weightRule;
ucl: WeightRule;
product_fee: any;
products: any;
}
@ -36,6 +36,6 @@ export interface RuleItem {
rule: Rule;
}
export interface weightRule {
export interface WeightRule {
weight_items: any[];
}

View File

@ -1,4 +1,4 @@
export interface recordPdfOptions {
export interface RecordPdfOptions {
isDouble: number;
printSetup: String;
}

View File

@ -1,10 +1,10 @@
import { RecordCategory } from '../../utils/constants';
import { recordItems, record_fee_item } from './records';
import { RecordCategory } from '../utils/constants';
import { RecordItems, Record_fee_item } from './records';
export interface Record {
weight_items: any;
record_items: recordItems[];
items: recordItems[];
record_items: RecordItems[];
items: RecordItems[];
systemTitle: any;
record_lease_rules: any;
weight: number;
@ -21,7 +21,7 @@ export interface Record {
original_number: any;
movement: string;
category: RecordCategory;
record_fee_items: record_fee_item[];
record_fee_items: Record_fee_item[];
pdfExplain: string;
direct_record_id: number;
id: number;

View File

@ -1,10 +1,10 @@
export interface recordItems {
export interface RecordItems {
label: string;
id: number;
sort: number;
count: number;
comment: string;
product: product;
product: Product;
createdAt: string;
record_id: number;
t_item_id: any;
@ -13,10 +13,10 @@ export interface recordItems {
unit_price: any;
createdById: number;
updatedById: number;
record_item_fee_items: record_fee_item[];
record_item_fee_items: Record_fee_item[];
}
export interface product {
export interface Product {
id: number;
name: string;
sort: number;
@ -28,14 +28,14 @@ export interface product {
createdAt: Date;
updatedAt: Date;
category_id: number;
category: product_category;
category: Product_category;
createdById: number;
custom_name: string;
updatedById: number;
product_category: product_category;
product_category: Product_category;
}
export interface product_category {
export interface Product_category {
id: number;
attr: string[];
name: string;
@ -51,8 +51,8 @@ export interface product_category {
conversion_unit: string;
}
export interface record_fee_item {
product: product;
export interface Record_fee_item {
product: Product;
id: number;
sort: number;
count: number;

View File

@ -1,9 +1,9 @@
import { product } from './records';
import { ConversionLogics, countCource } from '../../utils/constants';
import { Product } from './records';
import { ConversionLogics, countCource } from '../utils/constants';
export interface FeeRule extends LeaseRule {
id: number;
product: product;
product: Product;
fee_product_id: number;
count_source: countCource;
unit: string;
@ -19,7 +19,7 @@ export interface LeaseRule {
unit_price: number;
product_id?: number;
conversion_logic_id: ConversionLogics;
ucl: weightRule;
ucl: WeightRule;
product_fee: any;
products: any;
}
@ -36,6 +36,6 @@ export interface RuleItem {
rule: Rule;
}
export interface weightRule {
export interface WeightRule {
weight_items: any[];
}

View File

@ -3,7 +3,7 @@ import { renderWaybill } from '../pdf-documents/waybills-document';
import { SqlLoader } from '@hera/plugin-core';
import { Action, Controller, Inject } from '@nocobase/utils';
import { QueryTypes } from 'sequelize';
import { Waybill } from '../interfaces/waybill';
import { Waybill } from '../../interfaces/waybill';
@Controller('waybills')
export class WaybillsController {

View File

@ -1,6 +1,6 @@
import React from 'react';
import { Document, Page, Text, View, StyleSheet, Image, renderToStream, Font } from '@hera/plugin-core';
import { Record } from '../interfaces/record';
import { Record } from '../../interfaces/record';
import * as QRCode from 'qrcode';
import { ConversionLogics, RecordCategory } from '../../utils/constants';
import { formatCurrency, formatQuantity } from '../../utils/currencyUtils';

View File

@ -1,12 +1,12 @@
import { ConversionLogics, RecordCategory, RulesNumber, SourcesType, countCource } from '../../utils/constants';
import { renderItV2 } from '../pdf-documents/records-documentV2';
import { Service } from '@nocobase/utils';
import { recordPdfOptions } from '../interfaces/options';
import { RecordPdfOptions } from '../../interfaces/options';
import { PrintSetup } from '../../utils/system';
@Service()
export class RecordPdfService {
async transformPdfV2(recordData: any, lease_data: any, fee_data: any, options: recordPdfOptions) {
async transformPdfV2(recordData: any, lease_data: any, fee_data: any, options: RecordPdfOptions) {
const { isDouble, printSetup } = options;
// 直发单不需要打印预览

View File

@ -11,10 +11,10 @@ import {
} from '../../utils/constants';
import { converDate } from '../../utils/daysUtils';
import { converUnitCount } from '../../utils/unitUtils';
import { Settlement } from '../interfaces/settlement';
import { FeeRule, LeaseRule } from '../interfaces/rule';
import { Record } from '../interfaces/record';
import { recordItems } from '../interfaces/records';
import { Settlement } from '../../interfaces/settlement';
import { FeeRule, LeaseRule } from '../../interfaces/rule';
import { Record } from '../../interfaces/record';
import { RecordItems } from '../../interfaces/records';
import { formatQuantity } from '../../utils/currencyUtils';
@Service()
@ -852,7 +852,7 @@ const recordWeight = (rule, item, settlementsId, productRule, rulefee?) => {
* @param itemCount
* @returns count,unit
*/
const ruleCount = (rules: FeeRule | LeaseRule, item: Record, recordItem: recordItems, valueCount?, rulefee?) => {
const ruleCount = (rules: FeeRule | LeaseRule, item: Record, recordItem: RecordItems, valueCount?, rulefee?) => {
let count, unit;
const itemCount = valueCount ? valueCount : recordItem.count;
const conversion_logic_id = rulefee ? rulefee.conversion_logic_id : rules.conversion_logic_id;