feat(订单): 添加订单模式字段支持多种业务场景
在订单请求数据类型和结账组件中添加mode字段,用于支持支付、审批、借还等不同业务模式
This commit is contained in:
parent
e83f9750ea
commit
4599e5c6ad
|
@ -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;
|
||||||
}>
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 的性质来判断。
|
||||||
// 如果后端接收的是 price,可能还需要加上:price: item.cabinetCell.cellPrice,
|
// 如果后端接收的是 price,可能还需要加上:price: 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue