|
|
|
@ -78,7 +78,7 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
size: 18, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 14), |
|
|
|
|
SizedBox(width: 14.w), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
@ -87,14 +87,15 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
margin: EdgeInsets.only(bottom: 11.h), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Container( |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
height: (widget.stores != null |
|
|
|
|
? (widget.stores.length > 4 ? 4 : widget.stores.length) |
|
|
|
|
: 0) * |
|
|
|
|
60.h, |
|
|
|
|
child: (widget.stores == null || widget.stores.length == 0) |
|
|
|
|
? Padding(padding:EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
? Padding( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
child: Text( |
|
|
|
|
"该优惠券未设置适用门店,适用情况请查看使用详情", |
|
|
|
|
textAlign: TextAlign.center, |
|
|
|
@ -103,7 +104,8 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
),) |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
: ListView.builder( |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
@ -121,15 +123,19 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
if (widget.stores[selectIndex].posType.code == |
|
|
|
|
"NORMALSTORE") { |
|
|
|
|
Scan.toScan( |
|
|
|
|
context, |
|
|
|
|
widget.stores[selectIndex].id, |
|
|
|
|
widget.stores[selectIndex].tenantCode, |
|
|
|
|
widget.stores[selectIndex].storeName, |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
if (widget.stores == null || widget.stores.length == 0) { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
} |
|
|
|
|
// if (widget.stores[selectIndex].posType.code == |
|
|
|
|
// "NORMALSTORE") { |
|
|
|
|
// Scan.toScan( |
|
|
|
|
// context, |
|
|
|
|
// widget.stores[selectIndex].id, |
|
|
|
|
// widget.stores[selectIndex].tenantCode, |
|
|
|
|
// widget.stores[selectIndex].storeName, |
|
|
|
|
// ); |
|
|
|
|
// } |
|
|
|
|
else { |
|
|
|
|
Navigator.of(context).pushReplacementNamed( |
|
|
|
|
'/router/store_order', |
|
|
|
|
arguments: { |
|
|
|
@ -148,7 +154,8 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(top: 14.h,bottom: 30.h,left: 16.w,right: 16.w), |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 14.h, bottom: 30.h, left: 16.w, right: 16.w), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).queding, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -227,8 +234,8 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
|
|
|
|
|
Widget storeItem(Store store, position) { |
|
|
|
|
return Container( |
|
|
|
|
height:52 , |
|
|
|
|
margin: EdgeInsets.only(bottom: 12,left: 14,right: 14), |
|
|
|
|
height: 52.h, |
|
|
|
|
margin: EdgeInsets.only(bottom: 12.h, left: 14.w, right: 14.w), |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.bottomRight, |
|
|
|
|
children: [ |
|
|
|
@ -238,19 +245,27 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: new BorderRadius.circular(6), |
|
|
|
|
border: Border.all( |
|
|
|
|
color: position == selectIndex ? Color(0xFF32A060):Color(0xFFF7F7F7), |
|
|
|
|
color: position == selectIndex |
|
|
|
|
? Color(0xFF32A060) |
|
|
|
|
: Color(0xFFF7F7F7), |
|
|
|
|
width: position == selectIndex ? 1 : 0, |
|
|
|
|
), |
|
|
|
|
color: position == selectIndex ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7), |
|
|
|
|
color: position == selectIndex |
|
|
|
|
? Color(0xFFF0FAF4) |
|
|
|
|
: Color(0xFFF7F7F7), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.centerLeft, |
|
|
|
|
padding: EdgeInsets.only(left: 12,), |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
left: 12, |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
store.storeName, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 15.sp, |
|
|
|
|
color: position == selectIndex ?Color(0xFF32A060) : Color(0xFF0D0D0D), |
|
|
|
|
color: position == selectIndex |
|
|
|
|
? Color(0xFF32A060) |
|
|
|
|
: Color(0xFF0D0D0D), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|