feat(订单): 添加订单模式字段支持多种业务场景

在订单请求数据类型和结账组件中添加mode字段,用于支持支付、审批、借还等不同业务模式
This commit is contained in:
dzq 2025-06-28 14:51:09 +08:00
parent e83f9750ea
commit 4599e5c6ad
2 changed files with 8 additions and 2 deletions

View File

@ -69,11 +69,15 @@ export interface SubmitOrderRequestData {
/** 是否内部订单 0否 1汇邦云用户 2企业微信用户 */ /** 是否内部订单 0否 1汇邦云用户 2企业微信用户 */
isInternal: number; isInternal: number;
applyRemark: string; applyRemark: string;
/** 运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式) */
mode: number;
/** 订单商品明细列表 */ /** 订单商品明细列表 */
goodsList: Array<{ goodsList: Array<{
goodsId: number goodsId?: number
quantity: number quantity: number
cellId: number cellId: number
/** 运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式) */
mode: number;
}> }>
} }

View File

@ -151,9 +151,9 @@ async function handleSubmit() {
let goodsListToSend; let goodsListToSend;
if (isRentingMode.value) { if (isRentingMode.value) {
goodsListToSend = rentingCartItems.value.map(item => ({ goodsListToSend = rentingCartItems.value.map(item => ({
goodsId: item.cabinetCell.cellId, // goodsId cellId
quantity: item.quantity, quantity: item.quantity,
cellId: item.cabinetCell.cellId, // cellId cellId: item.cabinetCell.cellId, // cellId
mode: productStore.selectedShop?.mode || 0, // 0
// //
// goodsId/cellId // goodsId/cellId
// priceprice: item.cabinetCell.cellPrice, // priceprice: item.cabinetCell.cellPrice,
@ -164,6 +164,7 @@ async function handleSubmit() {
goodsId: item.product.id, goodsId: item.product.id,
quantity: item.quantity, quantity: item.quantity,
cellId: item.product.cellId, cellId: item.product.cellId,
mode: productStore.selectedShop?.mode || 0, // 0
})); }));
} }
@ -178,6 +179,7 @@ async function handleSubmit() {
name: isInternal === 2 ? qyName.value : name.value, name: isInternal === 2 ? qyName.value : name.value,
applyRemark: applyRemark.value, applyRemark: applyRemark.value,
qyUserid: wxStore.userid, qyUserid: wxStore.userid,
mode: productStore.selectedShop?.mode || 0, // 0
isInternal: isInternal isInternal: isInternal
} }