|
|
|
@ -53,6 +53,7 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
bool isKeyBoardShow = false; |
|
|
|
|
FocusNode _focusNode = FocusNode(); |
|
|
|
|
List<dynamic> mealDetails = []; |
|
|
|
|
List<dynamic> goodsSpecsDetails = []; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
@ -82,14 +83,12 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onRefresh() async { |
|
|
|
|
EasyLoading.show( |
|
|
|
|
status: S.current.zhengzaijiazai, |
|
|
|
|
maskType: EasyLoadingMaskType.black); |
|
|
|
|
EasyLoading.show( |
|
|
|
|
status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); |
|
|
|
|
await queryProductGroupList(); |
|
|
|
|
await queryCategorize(); |
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
|
if (mounted) |
|
|
|
|
setState(() {}); |
|
|
|
|
if (mounted) setState(() {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///分组列表 |
|
|
|
@ -128,7 +127,8 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
tenant: BusinessInstance.instance.businessTenant, |
|
|
|
|
storeId: widget.arguments["storeId"]); |
|
|
|
|
} |
|
|
|
|
BaseData<List<GoodsCategoryList>> baseData = await businessService.findCategoryListByDepth().catchError((error) {}); |
|
|
|
|
BaseData<List<GoodsCategoryList>> baseData = |
|
|
|
|
await businessService.findCategoryListByDepth().catchError((error) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
goodsCategoryList = baseData.data; |
|
|
|
|
} |
|
|
|
@ -146,41 +146,53 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
} |
|
|
|
|
BaseData baseData = await businessService.productSave({ |
|
|
|
|
"storeId": widget.arguments["storeId"], |
|
|
|
|
"attrStyle": isAttrStyle == true ? 0:1,//款式类型:1-多款式 0-单款式 |
|
|
|
|
"categoryId": "1343391656220557312",//分类id |
|
|
|
|
"oversold": isOversold == true ? 1:0,//允许超卖:1-允许 0-不允许 |
|
|
|
|
"setMeal": isSetMeal == true ? 0:1,//套餐专属商品 0是 1不是 |
|
|
|
|
"groupId": "1693436138259218432",//分组id |
|
|
|
|
"attrStyle": isAttrStyle == true ? 0 : 1, //款式类型:1-多款式 0-单款式 |
|
|
|
|
"categoryId": "1343391656220557312", //分类id |
|
|
|
|
"oversold": isOversold == true ? 1 : 0, //允许超卖:1-允许 0-不允许 |
|
|
|
|
"setMeal": isSetMeal == true ? 0 : 1, //套餐专属商品 0是 1不是 |
|
|
|
|
"groupId": "1693436138259218432", //分组id |
|
|
|
|
"imgs": [ |
|
|
|
|
{ |
|
|
|
|
"imgPath": "https://pos.upload.lotus-wallet.com/1195/2023/10/1ba87000-d940-49e5-a6ca-f15623d5f841.jpg" |
|
|
|
|
"imgPath": |
|
|
|
|
"https://pos.upload.lotus-wallet.com/1195/2023/10/1ba87000-d940-49e5-a6ca-f15623d5f841.jpg" |
|
|
|
|
} |
|
|
|
|
],//商品图片 |
|
|
|
|
"needLogistics": isLogistics == true ? 1:0,//需要物流:1-需要 0-不需要 |
|
|
|
|
"productName": "新建商品",//商品名字 |
|
|
|
|
"productType": 0,//商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 |
|
|
|
|
"shortName": "商品简介",//商品简介 |
|
|
|
|
], //商品图片 |
|
|
|
|
"needLogistics": isLogistics == true ? 1 : 0, //需要物流:1-需要 0-不需要 |
|
|
|
|
"productName": "新建商品", //商品名字 |
|
|
|
|
"productType": 0, //商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 |
|
|
|
|
"shortName": "商品简介", //商品简介 |
|
|
|
|
"skuAttrList": [ |
|
|
|
|
{ |
|
|
|
|
"attrCode": "",//规格的数据编码,app新增商品用不到,但必须传"" |
|
|
|
|
"attrName": "",//属性名称,app新增商品用不到,但必须传"" |
|
|
|
|
"needImg": 0,//是否需要图片,app新增商品用不到,但必须传0 |
|
|
|
|
"attrCode": "", //规格的数据编码,app新增商品用不到,但必须传"" |
|
|
|
|
"attrName": "", //属性名称,app新增商品用不到,但必须传"" |
|
|
|
|
"needImg": 0, //是否需要图片,app新增商品用不到,但必须传0 |
|
|
|
|
"attrValueList": [ |
|
|
|
|
{"attrValue": "商品规格",//商品规格 |
|
|
|
|
{ |
|
|
|
|
"attrValue": "商品规格", //商品规格 |
|
|
|
|
"attrValueCode": "", //规格值的数据编码,app新增商品用不到,但必须传"" |
|
|
|
|
}]//规格对应的规格值 |
|
|
|
|
} |
|
|
|
|
] //规格对应的规格值 |
|
|
|
|
} |
|
|
|
|
],//规格列表 |
|
|
|
|
], //规格列表 |
|
|
|
|
"skuList": [ |
|
|
|
|
{ |
|
|
|
|
"applyPrice": "234",//商品原价 |
|
|
|
|
"skuAttrCodeDTOList": [{"attrCode": "", "attrValueCode": ""}],//sku对应的规格编码,app新增商品用不到,但必须传该段 |
|
|
|
|
"skuPrice": "123",//商品售价 |
|
|
|
|
"packagingFee": "789",//打包费 |
|
|
|
|
"skuStock": "666",//库存 |
|
|
|
|
"weight": "222"//重量 |
|
|
|
|
}],//商品sku列表 |
|
|
|
|
"status":isGround == true ? 1:0 //状态:1-上架 0-下架 |
|
|
|
|
"applyPrice": "234", |
|
|
|
|
//商品原价 |
|
|
|
|
"skuAttrCodeDTOList": [ |
|
|
|
|
{"attrCode": "", "attrValueCode": ""} |
|
|
|
|
], |
|
|
|
|
//sku对应的规格编码,app新增商品用不到,但必须传该段 |
|
|
|
|
"skuPrice": "123", |
|
|
|
|
//商品售价 |
|
|
|
|
"packagingFee": "789", |
|
|
|
|
//打包费 |
|
|
|
|
"skuStock": "666", |
|
|
|
|
//库存 |
|
|
|
|
"weight": "222" |
|
|
|
|
//重量 |
|
|
|
|
} |
|
|
|
|
], //商品sku列表 |
|
|
|
|
"status": isGround == true ? 1 : 0 //状态:1-上架 0-下架 |
|
|
|
|
}).catchError((error) { |
|
|
|
|
networkError = AppUtils.dioErrorTypeToString(error.type); |
|
|
|
|
networkStatus = -1; |
|
|
|
@ -190,19 +202,19 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
SmartDialog.show( |
|
|
|
|
widget: SettlementTips( |
|
|
|
|
() {}, |
|
|
|
|
text: "新建商品成功", |
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
)); |
|
|
|
|
() {}, |
|
|
|
|
text: "新建商品成功", |
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
)); |
|
|
|
|
networkStatus = 1; |
|
|
|
|
setState(() {}); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.show( |
|
|
|
|
widget: SettlementTips( |
|
|
|
|
() {}, |
|
|
|
|
text: baseData.msg, |
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
)); |
|
|
|
|
() {}, |
|
|
|
|
text: baseData.msg, |
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} finally {} |
|
|
|
|
} |
|
|
|
@ -249,17 +261,19 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
officialCategory(); |
|
|
|
|
}, |
|
|
|
|
child:textSelectItem("官方分类",categoryName == "" ? "请选择":categoryName), |
|
|
|
|
}, |
|
|
|
|
child: textSelectItem( |
|
|
|
|
"官方分类", categoryName == "" ? "请选择" : categoryName), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
goodsGroup(); |
|
|
|
|
}, |
|
|
|
|
child:textSelectItem("商品分组",groupName == "" ? "请选择":groupName)), |
|
|
|
|
child: textSelectItem( |
|
|
|
|
"商品分组", groupName == "" ? "请选择" : groupName)), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -269,7 +283,9 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
margin: EdgeInsets.only(top: 12.h), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
Padding(padding: EdgeInsets.only(top: 18.h,left: 16.w,right: 16.w), |
|
|
|
|
Padding( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.only(top: 18.h, left: 16.w, right: 16.w), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Padding( |
|
|
|
@ -284,13 +300,15 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
setState((){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isAttrStyle = !isAttrStyle; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
isAttrStyle == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", |
|
|
|
|
isAttrStyle == true |
|
|
|
|
? "assets/image/reservation_switch.webp" |
|
|
|
|
: "assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
@ -301,133 +319,152 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 1.w, |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
margin: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w), |
|
|
|
|
margin: |
|
|
|
|
EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w), |
|
|
|
|
), |
|
|
|
|
isAttrStyle == true ? GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/set_goods_specs'); |
|
|
|
|
}, |
|
|
|
|
child:Container( |
|
|
|
|
padding: EdgeInsets.only(left: 16.w,right: 16.w,top: 16.h), |
|
|
|
|
child:Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child:Text( |
|
|
|
|
"商品规格", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
isAttrStyle == true |
|
|
|
|
? GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/set_goods_specs', |
|
|
|
|
arguments: { |
|
|
|
|
"goodsSpecsDetails": goodsSpecsDetails |
|
|
|
|
}).then((value) { |
|
|
|
|
if (value != null) { |
|
|
|
|
goodsSpecsDetails.clear(); |
|
|
|
|
goodsSpecsDetails.addAll(value); |
|
|
|
|
setState(() {}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
left: 16.w, right: 16.w, top: 16.h), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"商品规格", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
Text( |
|
|
|
|
"请设置商品规格", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/bs_right.webp", |
|
|
|
|
width: 16.h, |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
Text( |
|
|
|
|
"请设置商品规格", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/bs_right.webp", |
|
|
|
|
width: 16.h, |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
): textItem("商品规格", skuController, "请输入商品规格"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
textItem("商品重量", heftController, "请输入商品重量"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
textItem("商品售价", priceController, "请输入商品售卖价格"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
textItem("商品原价", originalPriceController, "请输入商品划线价格"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
textItem("打包费", packingChargeController, "请输入商品打包费用"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
textItem("商品库存", stockController, "请输入商品库存"), |
|
|
|
|
if(isAttrStyle == false) |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/set_meal',arguments:{"storeId":widget.arguments["storeId"],"mealDetails":mealDetails}).then((value){ |
|
|
|
|
if (value != null){ |
|
|
|
|
mealDetails.clear(); |
|
|
|
|
mealDetails.addAll(value); |
|
|
|
|
setState((){}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Padding(padding: EdgeInsets.symmetric(horizontal: 16.w,vertical:16.h), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child:Text( |
|
|
|
|
"设置套餐", |
|
|
|
|
) |
|
|
|
|
: textItem("商品规格", skuController, "请输入商品规格"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
textItem("商品重量", heftController, "请输入商品重量"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
textItem("商品售价", priceController, "请输入商品售卖价格"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
textItem("商品原价", originalPriceController, "请输入商品划线价格"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
textItem("打包费", packingChargeController, "请输入商品打包费用"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
textItem("商品库存", stockController, "请输入商品库存"), |
|
|
|
|
if (isAttrStyle == false) |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pushNamed('/router/set_meal', |
|
|
|
|
arguments: { |
|
|
|
|
"mealDetails": mealDetails |
|
|
|
|
}).then((value) { |
|
|
|
|
if (value != null) { |
|
|
|
|
mealDetails.clear(); |
|
|
|
|
mealDetails.addAll(value); |
|
|
|
|
setState(() {}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Padding( |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
horizontal: 16.w, vertical: 16.h), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"设置套餐", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xD9000000), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"套餐选择", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xD9000000), |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"套餐选择", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/bs_right.webp", |
|
|
|
|
width: 16.h, |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/bs_right.webp", |
|
|
|
|
width: 16.h, |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin:EdgeInsets.only(top: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
margin: EdgeInsets.only(top: 111.h, bottom: 34.h,left:16.w,right:16.w), |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 111.h, bottom: 34.h, left: 16.w, right: 16.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF30415B), |
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Text( |
|
|
|
|
S |
|
|
|
|
.of(context) |
|
|
|
|
.baocun, |
|
|
|
|
S.of(context).baocun, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Colors.white, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -541,36 +578,36 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
margin: EdgeInsets.only(left: 22.w, bottom: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFFFCFCFC), |
|
|
|
|
border: Border.all( |
|
|
|
|
color: Color(0xFFEBEBEB), |
|
|
|
|
width: 1, |
|
|
|
|
), |
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.topLeft, |
|
|
|
|
child: TextField( |
|
|
|
|
maxLines: 5, |
|
|
|
|
controller: profileController, |
|
|
|
|
onChanged: (value) { |
|
|
|
|
setState(() { |
|
|
|
|
// textLength = value.length; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
hintText: "请输入商品商品简介", |
|
|
|
|
hintStyle: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
margin: EdgeInsets.only(left: 22.w, bottom: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFFFCFCFC), |
|
|
|
|
border: Border.all( |
|
|
|
|
color: Color(0xFFEBEBEB), |
|
|
|
|
width: 1, |
|
|
|
|
), |
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.topLeft, |
|
|
|
|
child: TextField( |
|
|
|
|
maxLines: 5, |
|
|
|
|
controller: profileController, |
|
|
|
|
onChanged: (value) { |
|
|
|
|
setState(() { |
|
|
|
|
// textLength = value.length; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
hintText: "请输入商品商品简介", |
|
|
|
|
hintStyle: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
), |
|
|
|
|
)) |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
@ -588,7 +625,7 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child:Row( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(right: 20.h), |
|
|
|
@ -602,13 +639,15 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
setState((){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isLogistics = !isLogistics; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
isLogistics == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", |
|
|
|
|
isLogistics == true |
|
|
|
|
? "assets/image/reservation_switch.webp" |
|
|
|
|
: "assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
@ -617,7 +656,7 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child:Row( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(right: 20.h), |
|
|
|
@ -631,13 +670,15 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
setState((){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isGround = !isGround; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
isGround == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", |
|
|
|
|
isGround == true |
|
|
|
|
? "assets/image/reservation_switch.webp" |
|
|
|
|
: "assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
@ -656,7 +697,7 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child:Row( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(right: 20.h), |
|
|
|
@ -670,20 +711,23 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
setState((){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isOversold = !isOversold; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
isOversold == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", |
|
|
|
|
isOversold == true |
|
|
|
|
? "assets/image/reservation_switch.webp" |
|
|
|
|
: "assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), Expanded( |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Padding( |
|
|
|
@ -698,13 +742,15 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
setState((){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
isSetMeal = !isSetMeal; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
isSetMeal == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", |
|
|
|
|
isSetMeal == true |
|
|
|
|
? "assets/image/reservation_switch.webp" |
|
|
|
|
: "assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
@ -725,7 +771,7 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget textSelectItem(left,selectName) { |
|
|
|
|
Widget textSelectItem(left, selectName) { |
|
|
|
|
return Container( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
child: Column( |
|
|
|
@ -787,72 +833,72 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
Widget mustTextItem(left, rightController, right) { |
|
|
|
|
return Container( |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text.rich( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text.rich( |
|
|
|
|
TextSpan( |
|
|
|
|
children: [ |
|
|
|
|
TextSpan( |
|
|
|
|
children: [ |
|
|
|
|
TextSpan( |
|
|
|
|
text: "*", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFFE02020), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text: left, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xD9000000), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
text: "*", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFFE02020), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: TextField( |
|
|
|
|
controller: rightController, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
hintText: right ?? "", |
|
|
|
|
hintTextDirection: TextDirection.rtl, |
|
|
|
|
hintStyle: TextStyle( |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
TextSpan( |
|
|
|
|
text: left, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xD9000000), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
), |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
), |
|
|
|
|
textAlign: TextAlign.right, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF000000), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold), |
|
|
|
|
), |
|
|
|
|
flex: 2, |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(bottom: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
Expanded( |
|
|
|
|
child: TextField( |
|
|
|
|
controller: rightController, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
hintText: right ?? "", |
|
|
|
|
hintTextDirection: TextDirection.rtl, |
|
|
|
|
hintStyle: TextStyle( |
|
|
|
|
color: Color(0xFF7A797F), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
), |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
), |
|
|
|
|
textAlign: TextAlign.right, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF000000), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.bold), |
|
|
|
|
), |
|
|
|
|
flex: 2, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)); |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(bottom: 16.h), |
|
|
|
|
color: Color(0x14000000), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget textItem(left, rightController, right) { |
|
|
|
|
return Container( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -909,9 +955,9 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
builder: (context) { |
|
|
|
|
return StatefulBuilder(builder: ( |
|
|
|
|
context, |
|
|
|
|
state, |
|
|
|
|
) { |
|
|
|
|
context, |
|
|
|
|
state, |
|
|
|
|
) { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 365.h, |
|
|
|
@ -932,18 +978,18 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 12.h, bottom: 12.h, left: 41.w), |
|
|
|
|
child: Text( |
|
|
|
|
"选择官方分类", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 12.h, bottom: 12.h, left: 41.w), |
|
|
|
|
child: Text( |
|
|
|
|
"选择官方分类", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
state(() { |
|
|
|
@ -961,9 +1007,10 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Expanded(child:ListView.builder( |
|
|
|
|
Expanded( |
|
|
|
|
child: ListView.builder( |
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
itemCount: goodsCategoryList?.length ??0, |
|
|
|
|
itemCount: goodsCategoryList?.length ?? 0, |
|
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
|
shrinkWrap: true, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
@ -974,21 +1021,24 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
categoryIndex = position; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: categoryItem(goodsCategoryList[position],position), |
|
|
|
|
child: |
|
|
|
|
categoryItem(goodsCategoryList[position], position), |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
categoryName = goodsCategoryList[categoryIndex].categoryName; |
|
|
|
|
categoryName = |
|
|
|
|
goodsCategoryList[categoryIndex].categoryName; |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.symmetric(vertical:25.h,horizontal:16.w), |
|
|
|
|
margin: EdgeInsets.symmetric( |
|
|
|
|
vertical: 25.h, horizontal: 16.w), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
@ -1010,10 +1060,10 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget categoryItem(GoodsCategoryList goodsCategoryList,index){ |
|
|
|
|
return Container( |
|
|
|
|
Widget categoryItem(GoodsCategoryList goodsCategoryList, index) { |
|
|
|
|
return Container( |
|
|
|
|
height: 52.h, |
|
|
|
|
margin: EdgeInsets.only(bottom: 12,left:16.w,right: 16.w), |
|
|
|
|
margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.bottomRight, |
|
|
|
|
children: [ |
|
|
|
@ -1026,17 +1076,13 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
: Color(0xFFF7F7F7), |
|
|
|
|
borderRadius: BorderRadius.circular(4.w), |
|
|
|
|
border: Border.all( |
|
|
|
|
color: categoryIndex == index |
|
|
|
|
? Color(0xFF30415B) |
|
|
|
|
: Colors.white, |
|
|
|
|
color: |
|
|
|
|
categoryIndex == index ? Color(0xFF30415B) : Colors.white, |
|
|
|
|
width: categoryIndex == index ? 1.w : 0, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
top: 16.h, |
|
|
|
|
bottom: 16.h, |
|
|
|
|
left: 16.w, |
|
|
|
|
right: 17.w), |
|
|
|
|
top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), |
|
|
|
|
child: Text( |
|
|
|
|
goodsCategoryList?.categoryName ?? "", |
|
|
|
|
style: TextStyle( |
|
|
|
@ -1066,9 +1112,9 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
|
builder: (context) { |
|
|
|
|
return StatefulBuilder(builder: ( |
|
|
|
|
context, |
|
|
|
|
state, |
|
|
|
|
) { |
|
|
|
|
context, |
|
|
|
|
state, |
|
|
|
|
) { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 365.h, |
|
|
|
@ -1089,18 +1135,18 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 12.h, bottom: 12.h, left: 41.w), |
|
|
|
|
child: Text( |
|
|
|
|
"选择官方分类", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
top: 12.h, bottom: 12.h, left: 41.w), |
|
|
|
|
child: Text( |
|
|
|
|
"选择官方分类", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF1A1A1A), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
state(() { |
|
|
|
@ -1118,7 +1164,8 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Expanded(child:ListView.builder( |
|
|
|
|
Expanded( |
|
|
|
|
child: ListView.builder( |
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
itemCount: productGroupList?.records?.length ?? 0, |
|
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
@ -1131,21 +1178,25 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
groupIndex = position; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: groupItem(productGroupList.records[position],position), |
|
|
|
|
child: groupItem( |
|
|
|
|
productGroupList.records[position], position), |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
groupName = productGroupList?.records[groupIndex]?.groupName ?? ""; |
|
|
|
|
groupName = |
|
|
|
|
productGroupList?.records[groupIndex]?.groupName ?? |
|
|
|
|
""; |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.symmetric(vertical:25.h,horizontal:16.w), |
|
|
|
|
margin: EdgeInsets.symmetric( |
|
|
|
|
vertical: 25.h, horizontal: 16.w), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
@ -1167,10 +1218,10 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget groupItem(Records records,index){ |
|
|
|
|
return Container( |
|
|
|
|
Widget groupItem(Records records, index) { |
|
|
|
|
return Container( |
|
|
|
|
height: 52.h, |
|
|
|
|
margin: EdgeInsets.only(bottom: 12,left:16.w,right: 16.w), |
|
|
|
|
margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.bottomRight, |
|
|
|
|
children: [ |
|
|
|
@ -1178,24 +1229,18 @@ class _AddGoodsPage extends State<AddGoodsPage> {
|
|
|
|
|
height: 52.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: groupIndex == index |
|
|
|
|
? Color(0xFFEFF5FF) |
|
|
|
|
: Color(0xFFF7F7F7), |
|
|
|
|
color: |
|
|
|
|
groupIndex == index ? Color(0xFFEFF5FF) : Color(0xFFF7F7F7), |
|
|
|
|
borderRadius: BorderRadius.circular(4.w), |
|
|
|
|
border: Border.all( |
|
|
|
|
color: groupIndex == index |
|
|
|
|
? Color(0xFF30415B) |
|
|
|
|
: Colors.white, |
|
|
|
|
color: groupIndex == index ? Color(0xFF30415B) : Colors.white, |
|
|
|
|
width: groupIndex == index ? 1.w : 0, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
top: 16.h, |
|
|
|
|
bottom: 16.h, |
|
|
|
|
left: 16.w, |
|
|
|
|
right: 17.w), |
|
|
|
|
top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), |
|
|
|
|
child: Text( |
|
|
|
|
records?.groupName ?? "", |
|
|
|
|
records?.groupName ?? "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|