diff --git a/src/common/apis/shop/type.ts b/src/common/apis/shop/type.ts index cee90f2..df1b7c3 100644 --- a/src/common/apis/shop/type.ts +++ b/src/common/apis/shop/type.ts @@ -69,11 +69,15 @@ export interface SubmitOrderRequestData { /** 是否内部订单 0否 1汇邦云用户 2企业微信用户 */ isInternal: number; applyRemark: string; + /** 运行模式(0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式) */ + mode: number; /** 订单商品明细列表 */ goodsList: Array<{ - goodsId: number + goodsId?: number quantity: number cellId: number + /** 运行模式(0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式) */ + mode: number; }> } diff --git a/src/pages/product/components/checkout.vue b/src/pages/product/components/checkout.vue index da9f295..e622412 100644 --- a/src/pages/product/components/checkout.vue +++ b/src/pages/product/components/checkout.vue @@ -151,9 +151,9 @@ async function handleSubmit() { let goodsListToSend; if (isRentingMode.value) { goodsListToSend = rentingCartItems.value.map(item => ({ - goodsId: item.cabinetCell.cellId, // 租用模式下,goodsId 可以是 cellId quantity: item.quantity, cellId: item.cabinetCell.cellId, // 租用模式下,cellId + mode: productStore.selectedShop?.mode || 0, // 默认为 0 // 注意:后端可能需要额外的字段来区分是商品订单还是租用订单, // 或者根据 goodsId/cellId 的性质来判断。 // 如果后端接收的是 price,可能还需要加上:price: item.cabinetCell.cellPrice, @@ -164,6 +164,7 @@ async function handleSubmit() { goodsId: item.product.id, quantity: item.quantity, cellId: item.product.cellId, + mode: productStore.selectedShop?.mode || 0, // 默认为 0 })); } @@ -178,6 +179,7 @@ async function handleSubmit() { name: isInternal === 2 ? qyName.value : name.value, applyRemark: applyRemark.value, qyUserid: wxStore.userid, + mode: productStore.selectedShop?.mode || 0, // 默认为 0 isInternal: isInternal }