Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
takeout_sbk
Commits
2e62a6be
Commit
2e62a6be
authored
Feb 02, 2021
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Feature:
1、SVC卡-B账户优惠入机 2、详情界面显示 优惠列表; Version: 2.2021.2.22
parent
576ec1d1
Pipeline
#30199
failed with stage
in 0 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
138 deletions
+84
-138
fmTakeout/Control/flowControl.cpp
+21
-85
fmTakeout/Model/orderObject.h
+1
-1
fmTakeout/detailForm.cpp
+55
-47
fmTakeout/detailForm.h
+1
-0
fmTakeout/fmTakeout.rc
+4
-4
fmTakeout/preDefine.h
+2
-1
No files found.
fmTakeout/Control/flowControl.cpp
View file @
2e62a6be
...
...
@@ -2619,12 +2619,10 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
/**********************************************************************************/
for
(
int
i
=
0
;
i
<
orderObject
->
proList
.
count
();
i
++
)
{
dishesObject
*
dish
=
orderObject
->
proList
.
at
(
i
);
// promotion万能优惠计数器变量;
int
promotionTempNo
=
0
;
// starPromotion 星星优惠计数器变量;
int
starPromotionTempNo
=
0
;
// tenderBPromotion B账户优惠计数器变量;
int
tenderBPromotionTempNo
=
0
;
//初步设定20个促销优惠折扣类型(其value值对应 为 折扣已添加数量): 万能优惠 + 星星优惠 + 券-B账户优惠 + SVC-B账户优惠
int
promotTypeTotal
=
20
;
int
promotTypeArray
[
20
]
=
{
0
};
// 安全检查:Sku,Qty ...:不合法直接跳过录单【①主商品属性:code中含有Default字符串(不区分大小写)+ ②code中以非数字开头 + ③商品数量是0】 直接跳过录单;
QString
tempCodeLeftHead
=
dish
->
code
.
left
(
1
);
if
(
dish
->
code
.
contains
(
"Default"
,
Qt
::
CaseInsensitive
)
||
(
tempCodeLeftHead
<
QString
(
'0'
)
||
tempCodeLeftHead
>
QString
(
'9'
))
...
...
@@ -2642,11 +2640,10 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
// 存储订单入机前异常信息并汇报OMS;
QString
requestType
=
orderObject
->
orderStatus
==
6
?
QString
::
fromLocal8Bit
(
"6"
)
:
QString
::
fromLocal8Bit
(
"3"
);
_AddOrUpdateReportOmsList
(
orderObject
->
id
,
orderObject
->
channel
,
requestType
,
QString
(
"2"
),
error
);
return
true
;
}
/**********************************************************************************/
//针对同一商品,多份数量需要将其,拆分成单份;[如果不拆分,将导致多份商品中配料价格出现 漏钱:POS中的账将会出现少金额]
//
针对同一商品,多份数量需要将其,拆分成单份;[如果不拆分,将导致多份商品中配料价格出现 漏钱:POS中的账将会出现少金额]
// 新增 一种case: 餐具费项目需要合并, 进行不拆分 处理: qtyNoSplit
/**********************************************************************************/
if
(
dish
->
qtyNoSplit
)
{
// ------> 不拆分主商品数量 --Begin ---->>>
...
...
@@ -2655,7 +2652,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
QJsonArray
noSplitSubProductArry
;
QJsonObject
noSplitSubObj
;
noSplitMainProObj
.
insert
(
"consume_num"
,
dish
->
qty
);
//noSplitMainProObj.insert("pid", dish->code);
noSplitMainProObj
.
insert
(
"pid"
,
dish
->
chgPrcFlgCode
);
// 传递含改价标识重新组装的sku;
noSplitMainProObj
.
insert
(
"original_price"
,
dish
->
price
);
/**********************************************************************************/
...
...
@@ -2703,7 +2699,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
}
/**********************************************************************************/
// 不拆分商品合并:优惠折扣数量默认为 1 但是整单体现是 * 主商品数量;
/**********************************************************************************/
// 商品促销优惠数组存在: dish->itemsDiscount 则不会再取接口返回的 星星优惠 与 万能优惠;
if
(
!
dish
->
itemsDiscount
.
isEmpty
()
)
{
for
(
int
m
=
0
;
m
<
dish
->
itemsDiscount
.
count
();
m
++
)
{
...
...
@@ -2715,20 +2710,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
noSplitSubProductArry
.
push_back
(
noSplitSubObj
);
}
}
}
else
{
// 商品促销优惠数组不存在
if
(
dish
->
promotionQty
&&
dish
->
promotionPrice
&&
dish
->
promotionSku
.
length
()
)
{
noSplitSubObj
.
insert
(
"consume_num"
,
1
);
noSplitSubObj
.
insert
(
"pid"
,
dish
->
promotionSku
);
noSplitSubObj
.
insert
(
"original_price"
,
dish
->
promotionQty
*
dish
->
promotionPrice
);
noSplitSubProductArry
.
push_back
(
noSplitSubObj
);
}
// 新增支持星星优惠; 同上万能折扣;
if
(
dish
->
starPromotionQty
&&
dish
->
starPromotionPrice
&&
dish
->
starPromotionSku
.
length
()
){
noSplitSubObj
.
insert
(
"consume_num"
,
1
);
noSplitSubObj
.
insert
(
"pid"
,
dish
->
starPromotionSku
);
noSplitSubObj
.
insert
(
"original_price"
,
dish
->
starPromotionQty
*
dish
->
starPromotionPrice
);
noSplitSubProductArry
.
push_back
(
noSplitSubObj
);
}
}
/**********************************************************************************/
// 汇总插入子商品[sub_products];
...
...
@@ -2746,12 +2727,10 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
QJsonArray
subProduct
;
QJsonObject
sObj
;
tObj
.
insert
(
"consume_num"
,
1
);
//tObj.insert("pid", dish->code);
tObj
.
insert
(
"pid"
,
dish
->
chgPrcFlgCode
);
// 传递含改价标识重新组装的sku;
tObj
.
insert
(
"original_price"
,
dish
->
price
);
/**********************************************************************************/
// 处理原始的配料信息;
/**********************************************************************************/
if
(
!
dish
->
sub_products
.
isEmpty
())
{
for
(
int
j
=
0
;
j
<
dish
->
sub_products
.
count
();
j
++
)
{
dishesObject
*
subDish
=
dish
->
sub_products
.
at
(
j
);
...
...
@@ -2786,7 +2765,6 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
}
/**********************************************************************************/
// 处理商品的属性(热 -> 特别热)的额外配料信息;
/**********************************************************************************/
if
(
dish
->
options
.
length
()){
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
dish
->
options
);
...
...
@@ -2794,61 +2772,26 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
subProduct
.
push_back
(
sObj
);
}
/**********************************************************************************/
// 处理商品的优惠金额信息;针对单个商品多数量情况:需要将这部分优惠折扣金额放在前面 拆分数量的商品上[多少个折扣券,放在前几个商品上,一个上面下对应一个折扣项];
// 单项商品的折扣数量最多不超过55个(60个会导致POS死机);当个优惠价格不超2000元;
/**********************************************************************************/
// 处理商品的优惠金额信息;针对单个商品多数量情况:需要将这部分优惠折扣金额放在前面 拆分数量的商品上
// [多少个折扣券,放在前几个商品上,一个上面下对应一个折扣项];
// 商品促销优惠数组存在: dish->itemsDiscount 则不会再取接口返回的 星星优惠 与 万能优惠;
if
(
!
dish
->
itemsDiscount
.
isEmpty
()
)
{
tenderBPromotionTempNo
,
starPromotionTempNo
,
promotionTempNo
;
for
(
int
m
=
0
;
m
<
dish
->
itemsDiscount
.
count
();
m
++
)
{
PromotionItemObject
*
promotionObj
=
dish
->
itemsDiscount
.
at
(
m
);
if
(
promotionObj
->
promotionQty
&&
promotionObj
->
discountFee
&&
promotionObj
->
promotionSku
.
length
()
)
{
// 拆分万能优惠数量;
if
(
1
==
promotionObj
->
type
&&
promotionTempNo
<
promotionObj
->
promotionQty
)
{
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
promotionObj
->
promotionSku
);
sObj
.
insert
(
"original_price"
,
promotionObj
->
discountFee
);
subProduct
.
push_back
(
sObj
);
promotionTempNo
++
;
}
// 拆分星星优惠数量;
if
(
2
==
promotionObj
->
type
&&
starPromotionTempNo
<
promotionObj
->
promotionQty
)
{
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
promotionObj
->
promotionSku
);
sObj
.
insert
(
"original_price"
,
promotionObj
->
discountFee
);
subProduct
.
push_back
(
sObj
);
starPromotionTempNo
++
;
}
// 拆分B账户优惠数量;
if
(
3
==
promotionObj
->
type
&&
tenderBPromotionTempNo
<
promotionObj
->
promotionQty
)
{
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
promotionObj
->
promotionSku
);
sObj
.
insert
(
"original_price"
,
promotionObj
->
discountFee
);
subProduct
.
push_back
(
sObj
);
tenderBPromotionTempNo
++
;
// 合理平铺折扣数量: 万能优惠 + 星星优惠 + 券B账户优惠 + SVC卡-B账户优惠;
for
(
int
p
=
1
;
p
<
promotTypeTotal
;
p
++
)
{
if
(
p
==
promotionObj
->
type
&&
promotTypeArray
[
p
]
<
promotionObj
->
promotionQty
)
{
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
promotionObj
->
promotionSku
);
sObj
.
insert
(
"original_price"
,
promotionObj
->
discountFee
);
subProduct
.
push_back
(
sObj
);
promotTypeArray
[
p
]
++
;
break
;
}
}
}
}
}
else
{
// 商品促销优惠数组不存在
if
(
promotionTempNo
<
dish
->
promotionQty
){
if
(
dish
->
promotionQty
&&
dish
->
promotionPrice
&&
dish
->
promotionSku
.
length
()){
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
dish
->
promotionSku
);
sObj
.
insert
(
"original_price"
,
dish
->
promotionPrice
);
subProduct
.
push_back
(
sObj
);
promotionTempNo
++
;
}
}
// 新增支持星星优惠;
if
(
starPromotionTempNo
<
dish
->
starPromotionQty
){
if
(
dish
->
starPromotionQty
&&
dish
->
starPromotionPrice
&&
dish
->
starPromotionSku
.
length
()){
sObj
.
insert
(
"consume_num"
,
1
);
sObj
.
insert
(
"pid"
,
dish
->
starPromotionSku
);
sObj
.
insert
(
"original_price"
,
dish
->
starPromotionPrice
);
subProduct
.
push_back
(
sObj
);
starPromotionTempNo
++
;
}
}
}
/**********************************************************************************/
// 汇总插入子商品[sub_products];
...
...
@@ -2872,7 +2815,7 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
/**********************************************************/
// 先整合非门店售券的所有三方券列表数据;
/**********************************************************/
//为了
方便后续追踪需要
录入一个MOD(84)0元支付方式;
//为了
后续追踪,
录入一个MOD(84)0元支付方式;
if
(
0
==
i
){
QJsonObject
tStarbusAppFmIdObj
;;
tStarbusAppFmIdObj
.
insert
(
"couponSeq"
,
QString
::
number
(
0
)
)
;
//券的序号
...
...
@@ -2914,17 +2857,14 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
// 存储订单入机前异常信息并汇报OMS;
QString
requestType
=
orderObject
->
orderStatus
==
6
?
QString
::
fromLocal8Bit
(
"6"
)
:
QString
::
fromLocal8Bit
(
"3"
);
_AddOrUpdateReportOmsList
(
orderObject
->
id
,
orderObject
->
channel
,
requestType
,
QString
(
"2"
),
error
);
return
true
;
}
//声明临时栈对象: 单个券关联商品;
QJsonObject
tCoupProductObj
;
tCoupProductObj
.
insert
(
"couponSeq"
,
QString
::
number
(
i
+
1
)
);
int
tempQty
=
coupon
->
skus
[
tempSkuSeq
]
->
qty
;
tCoupProductObj
.
insert
(
"consume_num"
,
tempQty
);
tCoupProductObj
.
insert
(
"consume_num"
,
coupon
->
skus
[
tempSkuSeq
]
->
qty
);
tCoupProductObj
.
insert
(
"pid"
,
coupon
->
skus
[
tempSkuSeq
]
->
code
);
//如果单品是券menuItem: 手动将商品单价赋值为 1元 (100分);
//需要考虑 门店券 蛋糕的Combo头开始会限定后续蛋糕子项的价格后面的价格是否会都是0;
if
(
coupon
->
skus
[
tempSkuSeq
]
->
isCoupon
)
{
tCoupProductObj
.
insert
(
"original_price"
,
coupon
->
skus
[
tempSkuSeq
]
->
price
);
...
...
@@ -2945,14 +2885,9 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
products
.
push_back
(
tCoupProductDiscObj
);
}
}
}
else
if
(
coupon
->
discount
.
length
()
&&
coupon
->
consumeDiscountAmount
)
{
QJsonObject
tCoupProductDiscObj
;
tCoupProductDiscObj
.
insert
(
"consume_num"
,
1
);
tCoupProductDiscObj
.
insert
(
"pid"
,
coupon
->
discount
);
tCoupProductDiscObj
.
insert
(
"original_price"
,
coupon
->
consumeDiscountAmount
);
products
.
push_back
(
tCoupProductDiscObj
);
}
}
}
}
...
...
@@ -3054,6 +2989,7 @@ bool FlowControl::_ResponseSimReqFristOrderData(const QJsonObject &content, QJso
}
}
}
}
//整合WSG券 + 整合银联支付 已经新增一条【MOD:84 0元支付方式】
//**********************************整合 订单组合券 信息-end*****************************************//
...
...
fmTakeout/Model/orderObject.h
View file @
2e62a6be
...
...
@@ -117,7 +117,7 @@ public:
void
FetchDataFromJson
(
const
QJsonObject
&
json
);
QList
<
dishesObject
*>
proList
;
//扩展 星巴克
预约实物的
券信息 List;
//扩展 星巴克
WSG
券信息 List;
QList
<
CouponsObject
*>
coupList
;
//扩展 星巴克 多条支付方式入机 List;
...
...
fmTakeout/detailForm.cpp
View file @
2e62a6be
...
...
@@ -115,33 +115,27 @@ void DetailForm::InitData(OrderObject *orderObject)
}
}
/******************* 遍历 配料列表:配料信息展示 end *************************/
// 新增展示优惠活动的优惠项
if
(
tempDishObj
->
promotionSku
.
length
()){
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
tempDishObj
->
promotionName
+
QString
(
":"
)
+
tempDishObj
->
promotionSku
));
// 商品名
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
QString
(
"-"
)
+
Penny2Dollar
(
tempDishObj
->
promotionPrice
)));
// 价格
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
tempDishObj
->
promotionQty
)
+
QString
(
" )"
)
));
// 数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
// 新增展示 星星优惠活动 的优惠项
if
(
tempDishObj
->
starPromotionSku
.
length
()){
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
tempDishObj
->
starPromotionName
+
QString
(
":"
)
+
tempDishObj
->
starPromotionSku
));
// 商品名
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
QString
(
"-"
)
+
Penny2Dollar
(
tempDishObj
->
starPromotionPrice
)));
// 价格
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
tempDishObj
->
starPromotionQty
)
+
QString
(
" )"
)
));
// 数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
// 新增整合后的优惠折扣列表: 万能优惠 + 星星优惠 + 券B账户优惠 + SVC卡-B账户优惠;
if
(
!
tempDishObj
->
itemsDiscount
.
isEmpty
()
)
{
for
(
int
d
=
0
;
d
<
tempDishObj
->
itemsDiscount
.
count
();
d
++
)
{
PromotionItemObject
*
promotionObj
=
tempDishObj
->
itemsDiscount
.
at
(
d
);
if
(
promotionObj
->
promotionQty
&&
promotionObj
->
discountFee
&&
promotionObj
->
promotionSku
.
length
()
)
{
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
promotionObj
->
promotionName
+
QString
(
":"
)
+
promotionObj
->
promotionSku
));
// 商品名
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
QString
(
"-"
)
+
Penny2Dollar
(
promotionObj
->
discountFee
)));
// 价格
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
promotionObj
->
promotionQty
)
+
QString
(
" )"
)
));
// 数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
}
}
}
/*********************************** 遍历 商品列表:商品信息展示 end ***************************************************************/
/*********************************** 遍历
预约实物
券列表:券信息展示 begin *********************************************************/
/*********************************** 遍历
WSG
券列表:券信息展示 begin *********************************************************/
for
(;
coupNum
<
orderObject
->
coupList
.
count
();
coupNum
++
,
pNum
++
)
{
CouponsObject
*
tempCouponObj
=
orderObject
->
coupList
[
coupNum
];
...
...
@@ -157,17 +151,6 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
1
)));
// 券数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
// 新增展示券优惠项;
if
(
tempCouponObj
->
consumeDiscountAmount
>
0
){
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
::
fromLocal8Bit
(
"券折扣:"
)
));
// 券号折扣
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
Penny2Dollar
(
tempCouponObj
->
consumeDiscountAmount
)
));
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
(
"1"
)
));
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
// 新增展示券商品项;
if
(
tempCouponObj
->
skus
.
size
()
){
pNum
++
;
...
...
@@ -183,8 +166,26 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
tempCouponObj
->
skus
[
0
]
->
qty
)
));
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
// 新增整合后的优惠折扣列表: 万能优惠 + 星星优惠 + 券B账户优惠 + SVC卡-B账户优惠;
if
(
!
tempCouponObj
->
itemsDiscount
.
isEmpty
()
)
{
for
(
int
c
=
0
;
c
<
tempCouponObj
->
itemsDiscount
.
count
();
c
++
)
{
PromotionItemObject
*
promotionObj
=
tempCouponObj
->
itemsDiscount
.
at
(
c
);
if
(
promotionObj
->
promotionQty
&&
promotionObj
->
discountFee
&&
promotionObj
->
promotionSku
.
length
()
)
{
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
promotionObj
->
promotionName
+
QString
(
":"
)
+
promotionObj
->
promotionSku
));
// 商品名
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
QString
(
"-"
)
+
Penny2Dollar
(
promotionObj
->
discountFee
)));
// 价格
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
promotionObj
->
promotionQty
)
+
QString
(
" )"
)
));
// 数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
}
}
}
/*********************************** 遍历
预约实物
券列表:券信息展示 end *********************************************************/
/*********************************** 遍历
WSG
券列表:券信息展示 end *********************************************************/
// 新增配送费 + 打包费
ui
->
detailTable0
->
insertRow
(
pNum
);
...
...
@@ -196,7 +197,7 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
pNum
=
pNum
+
1
;
// 新增展示配送费折扣项显示;
if
(
orderObject
->
deliveryDiscount
>
0
&&
orderObject
->
deliveryDiscount
<
10000
){
if
(
orderObject
->
deliveryDiscount
>
0
){
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
QString
::
fromLocal8Bit
(
"配送费折扣"
)));
// 配送费折扣
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
...
...
@@ -216,7 +217,7 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
pNum
=
pNum
+
1
;
// 新增展示打包费折扣项显示;
if
(
orderObject
->
packDiscount
>
0
&&
orderObject
->
packDiscount
<
1000
0
){
if
(
orderObject
->
packDiscount
>
0
){
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
QString
::
fromLocal8Bit
(
"包装费折扣"
)));
// 包装费折扣
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
...
...
@@ -274,19 +275,26 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
(
"-"
)
));
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
// 新增展示券优惠项;
if
(
tempOrderCouponObj
->
discount
.
length
()){
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
::
fromLocal8Bit
(
"组合券折扣:"
)
));
// 券号折扣
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
Penny2Dollar
(
tempOrderCouponObj
->
consumeDiscountAmount
)
));
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
(
"1"
)
));
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
// 新增整合后的优惠折扣列表: 万能优惠 + 星星优惠 + 券B账户优惠 + SVC卡-B账户优惠;
if
(
!
tempOrderCouponObj
->
itemsDiscount
.
isEmpty
()
)
{
for
(
int
u
=
0
;
u
<
tempOrderCouponObj
->
itemsDiscount
.
count
();
u
++
)
{
PromotionItemObject
*
promotionObj
=
tempOrderCouponObj
->
itemsDiscount
.
at
(
u
);
if
(
promotionObj
->
promotionQty
&&
promotionObj
->
discountFee
&&
promotionObj
->
promotionSku
.
length
()
)
{
pNum
++
;
ui
->
detailTable0
->
insertRow
(
pNum
);
ui
->
detailTable0
->
setItem
(
pNum
,
0
,
new
QTableWidgetItem
(
QString
(
"( "
)
+
promotionObj
->
promotionName
+
QString
(
":"
)
+
promotionObj
->
promotionSku
));
// 商品名
ui
->
detailTable0
->
item
(
pNum
,
0
)
->
setTextAlignment
(
Qt
::
AlignRight
);
ui
->
detailTable0
->
setItem
(
pNum
,
1
,
new
QTableWidgetItem
(
QString
(
"-"
)
+
Penny2Dollar
(
promotionObj
->
discountFee
)));
// 价格
ui
->
detailTable0
->
item
(
pNum
,
1
)
->
setTextAlignment
(
Qt
::
AlignCenter
);
ui
->
detailTable0
->
setItem
(
pNum
,
2
,
new
QTableWidgetItem
(
QString
::
number
(
promotionObj
->
promotionQty
)
+
QString
(
" )"
)
));
// 数量
ui
->
detailTable0
->
item
(
pNum
,
2
)
->
setTextAlignment
(
Qt
::
AlignLeft
);
}
}
}
}
/*********************************** 遍历
预约实物
券列表:券信息展示 end *********************************************************/
/*********************************** 遍历
组合支付
券列表:券信息展示 end *********************************************************/
//设置行高根据文字进行自适应;用来重复显示主商品的配料信息;
...
...
fmTakeout/detailForm.h
View file @
2e62a6be
...
...
@@ -5,6 +5,7 @@
#include <QTableWidget>
#include "Model/orderObject.h"
#include "Model/deliverObject.h"
#include "Model/PromotionItemObject.h"
#include "RejectForm.h"
#include "refuseForm.h"
...
...
fmTakeout/fmTakeout.rc
View file @
2e62a6be
...
...
@@ -7,8 +7,8 @@ IDI_ICON ICON DISCARDABLE "logo.ico"
#endif
VS_VERSION_INFO VERSIONINFO
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
FILEVERSION 2,2021,
1,11
PRODUCTVERSION 2,2021,
1,11
FILEVERSION 2,2021,
2,22
PRODUCTVERSION 2,2021,
2,22
//*************************************************************************//
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
...
...
@@ -31,8 +31,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "Delivery Order Plugin"
//***每次修改后编译发版必须变更版本号(preDefine.h中APP_VERSION 需要一致)***//
VALUE "ProductVersion", "2.2021.
1.11
"
VALUE "FileVersion", "2.2021.
1.11
"
VALUE "ProductVersion", "2.2021.
2.22
"
VALUE "FileVersion", "2.2021.
2.22
"
//*************************************************************************//
END
END
...
...
fmTakeout/preDefine.h
View file @
2e62a6be
...
...
@@ -32,7 +32,8 @@
//#define APP_VERSION "2.2020.9.29"
//#define APP_VERSION "2.2020.10.27"
//#define APP_VERSION "2.2020.12.18"
#define APP_VERSION "2.2021.1.11"
//#define APP_VERSION "2.2021.1.11"
#define APP_VERSION "2.2021.2.22"
//修正版本号时,切记修正 FmTakeout.rc 中的版本号
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment