/** * * @providesModule objectTypes */ enum ViewType { GOODS = 0, MEMBER, NOCODE, NUMBER_CONFIRM, } /** * 分类item数据 */ interface ICategoryItem { name: string; id: string; parentId: string; subCates: [ { name: string; id: string; parentId: string; } ]; } /** * 商品详情 */ interface IGoodsItem { skuId?: string; spuId?: string; productName?: string; skuBn?: string; stock?: { status: boolean; name: string; stock: number; }; salePrice: string; images: [string]; isMaster?: string; groupId?: string; specs?: [ { specialPropName: string; specialValName: string; } ]; d2cSort?: string; d2COnSale?: boolean; unit: string; } /** * 购物车cartItem */ interface ICartItem { skuId: string; spuId: string; skuBn: string; productName: string; //名称 originalPrice: number; //基础价格 levelPrice: number; //会员销售价格 activityPrice: number; //活动价格 isNoCodeGoods: boolean; //是否是无码商品 isDiscount?: boolean; //是否有折扣价 isWeightGoods: boolean; //是否称重商品 img: string; quantity: number; //数量 或者 重量 barCode: string; //goodItem?: IGoodsItem, //商品详情 暂时用不到 去掉 unit: string; //商品单位 itemType: number; //s商品类型 specs?: [ //规格 { specialPropName: string; specialValName: string; } ]; specList?; stock; minOrderQuantity?: number; //车销-最小起订量 screened?: boolean; //车销-商品屏蔽 title?: string; price?: string; skuList?: string; } interface ISpuGoodsItem { spuId: string; productName: string; title: string; //名称 activityPrice: number; //活动价格 price: number; img: string; quantity: number; //数量 或者 重量 barCode: string; //goodItem?: IGoodsItem, //商品详情 暂时用不到 去掉 unit: string; //商品单位 specs: [string]; specList: [ //规格 { specialPropId: string; specialPropName: string; specialValName: string; specialValues: [ { specialValId; specialValImg; specialValName; } ]; } ]; stock; skuList; } /** * 购物车 */ interface ICart { member: string; // memberInfo?: IMemberInfo; memberType?: number; //0:散客 1.会员 cartItems: [ICartItem]; totalFee: number; //总价 totalCount: number; //总数 } /** * 会员信息 */ interface IMemberInfo { integral?: number; // 积分 levelId?: number; //会员等级id levelName?: string; //会员等级名称 mobile?: string; //会员手机 totalPayCash?: number; //会员总消费 userId?: string; //会员id nickName: string; } /** * 商品cartItem */ interface ICashCartItem { skuId?: string; spuId?: string; productName?: string; //名称 originalPrice?: number; //基础价格 levelPrice?: number; //会员销售价格 isNoCodeGoods?: boolean; //是否是无码商品 itemType?: number; // 1, "标准的自营商品" 3,"称重商品: 如按斤、毫升、米等度量单位卖出的商品" 4, "无条码商品" quantity?: number; //数量 或者 重量 } /** * 车销赠品 */ interface ICarGifts { spuId?: string; skuId: string; specification?: string; type?: number; num?: number; } /** * 提交订单 */ interface ICashCart { userId: string; // mobile: string; levelId: string; //0:散客 1.会员 nickName?: string; items: [ICashCartItem]; tid?: string; totalTradeCash?: number; totalCount?: number; buyerStoreId?: string; //卖家编号,车销下单用 gifts?: [ICarGifts]; invoiceFlag?: number; //车销是否需要发票 invoiceType?: number; //车销发票类型 invoiceTitle?: string; //车销发票抬头 saleManId?: string; //客户经理id saleManName?: string; //客户经理姓名 } /** * 商品营销活动 */ interface IGoodsActivity { openCut: number; openDiscount: number; cuts: [{ type: string; value: number }]; discounts: [{ type: string; value: number }]; cutType: { cutFen: number; cutJiao: number; cutRound: number; }; } /** * 打印订单的数据 */ interface IOrderInfo { buyerInfo: { //会员信息 mobile; nickName; type; }; payTypeName; ctime; //订单创建时间 cutValue; //抹零金额 isApplyReturn; //是否可以退货 itemInfos: [ { //订单商品信息 initItemPrice; itemName; itemNumber; itemType; oid; pervalue; picUrl; preAmount; productSpecification; returnedItemNum; } ]; mobile; operatorName; payBankCode; payTime; payTypeId; //支付类型 score; //本次积分 serialNo; //小票序号 tid; //订单号 totalCashChangePrice; //顾客现金总额 totalCashPaidPrice; //找零总额 totalCount; //商品总数 totalItemPrice; //商品优惠前总额 totalMemberPrePrice; //给会员优惠的金额 totalTradeCash; //交易总额 totalTradePrePrice; //优惠的金额 totalDiscountPrePrice; //店铺优惠 discountFee; // 优惠 invoiceFee; //发票费用 pointsDeduction; //积分抵扣 payStatus; //支付状态 scorePay; //积分抵扣的金额 totalFee; //实付 } /** * 打印订单的数据 */ interface IPrinterData { storeName?: string; // 店铺名称 tid?: string; // 订单号 cashierName?: string; //收银员名称 printNumber?: string; //打印序号 returnId?: string; //退款单号 relId?: string; //关联订单号 payTime?: string; // 支付时间 printTime?: string; //打印时间 returnTime?: string; //退货时间 refundTime?: string; //退款时间 returnOperator?: string; //操作人 items?: [ { // 商品列表 itemName?: string; itemPrice?: string; itemNum?: string; itemTotal?: string; itemType?: number; } ]; totalCount?: string; // 商品数量 sumMoney?: string; // 合计 discountFee?: string; // 优惠金额 cutFee?: string; //抹零 totalFee?: string; // 实收 oddChange?: string; // 找零 payType?: string; // "余额" ?: "银行卡", // 支付类型 returnMount?: string; // 退货数量 returnMoney?: string; // 退货金额 returnType?: string; // 退款方式 memberMobile?: string; // 手机号码 memberName?: string; //会员名称 curIntegral?: string; //本次积分 allIntegral?: string; //积分余额 reduceTally?: string; balance?: string; //账户余额 address?: string; //收获地址 cardNumber?: string; //会员卡号 shopMobile?: string; //店铺电话 shopAddress?: string; //店铺地址 shopWeixin?: string; //店铺微信 weixinText?: string; //微信扫一扫描述 shopAd?: string; //店铺广告语 invoiceFee?: string; //发票费用 pointsDeduction?: string; //积分抵扣 payStatus?: string; //支付状态 integral?: string; //当此积分 scorePay?: string; //积分抵扣的金额 totalStatus?: string; //TODO: } interface IPrintWare { isOnline; device: { brand: string; model: string; innerPrinterModal?: string; }; } interface ITidExist { tid: number; totalFee: number; memberInfo: any; payType?: string; } interface ITidNoExist { newCartData: any; // 订单数据 memberInfo: any; // 用户信息 payType: string; // 现金XJ 微信WX 支付宝ZF 银行卡BC verifycode: string; // 优惠码 totalFee: number; // 应收金额 originalPrice: number; // 原价 cutValue: number; // 减价分 } export { ViewType, ICategoryItem, IGoodsItem, ICartItem, ICart, IMemberInfo, ICashCart, ICashCartItem, IGoodsActivity, IOrderInfo, ISpuGoodsItem, IPrinterData, ITidExist, ITidNoExist, IPrintWare, };