Commit 879a676a authored by XieZhiXiong's avatar XieZhiXiong

feat: 完善类型声明

parent 52e0b739
......@@ -5,10 +5,84 @@
* @LastEditTime: 2021-08-10 18:24:06
* @Description:
*/
import { normalizeFiledata } from '@/utils';
import { normalizeFiledata, FileData } from '@/utils';
import { EvaluationFormValue } from './components/EvaluationForm';
export type EvaluateItem = {
/**
* 订单商品明细id
*/
orderProductId: number
/**
* 商品Id(来自商品服务)
*/
productId: number
/**
* 商品skuId(来自商品服务)
*/
skuId: number
/**
* 商品(物料)编号
*/
productNo: string
/**
* 商品名称
*/
name: string
/**
* 商品品类
*/
category: string
/**
* 商品品牌
*/
brand: string
/**
* 报价商品规格
*/
spec: string
/**
* 计价单位
*/
unit: string
/**
* 商品Logo
*/
logo: string
/**
* 价格
*/
price: number
/**
* 采购数量
*/
quantity: number
/**
* 金额
*/
amount: number
/**
* 评价星级(1-5)
*/
star: number
/**
* 评价内容
*/
comment: string
/**
* 评价图片 ,String
*/
pics: string[]
/**
* 是否已评价0-否1-是
*/
commentStatus: number
}
export type NormalizedEvaluateItem = EvaluationFormValue['comments'][0] & {};
// 初始化待评价列表
export const normalizeUnevaluatedList = (arr: {[key: string]: any}[]) => {
export const normalizeUnevaluatedList = (arr: EvaluateItem[]): NormalizedEvaluateItem[] => {
const ret = [];
if (!Array.isArray(arr)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment