Bläddra i källkod

6.21 1.1.04
公开店铺收款二维码
订单模板分货帮
注册设置密码可见
不能给自己发收款订单
添加扫码支付订单
添加公开店铺标准
添加收款码方式提示

huxiaoqiang 4 år sedan
förälder
incheckning
21489d5728

BIN
images/微信.png


BIN
images/支付宝.png


+ 45 - 1
lib/my_tools/my_views.dart

@@ -1879,7 +1879,51 @@ class MyViews {
           ],
         ),
       );
-    } else if (data.type == orderTypeOfflineTransfer ||
+    }else if (data.type == orderTypeScancodeAilyPay) {
+      //扫码收款
+      return Container(
+        margin: EdgeInsets.only(left: 10, right: 10),
+        child: Row(
+          children: [
+            Container(
+              child: Icon(Icons.qr_code_outlined,color: Colors.white,),
+              margin: EdgeInsets.only(right: 8),
+              height: 60,
+              width: 60,
+              decoration: BoxDecoration(
+                color: MyColors.cFF4233,
+                  border: Border.all(color: MyColors.cEBEBEB, width: 1)),
+              alignment: Alignment.center,
+            ),
+            Expanded(
+              child: Container(
+                padding: EdgeInsets.only(left: 8),
+                height: 60,
+                child: Column(
+                  children: [
+                    Text(
+                      '收款码收款',
+                      style: TextStyle(color: MyColors.c333333, fontSize: 13),
+                      maxLines: 2,
+                      overflow: TextOverflow.ellipsis,
+                      softWrap: true,
+                    ),
+                    Text(
+                      '¥${double.parse('${data.amount}').toStringAsFixed(2)}',
+                      style:
+                      TextStyle(color: MyColors.cFF4233, fontSize: 12),
+                    ),
+                  ],
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                ),
+              ),
+            )
+          ],
+        ),
+      );
+    }
+    else if (data.type == orderTypeOfflineTransfer ||
         data.type == orderTypeOfflinePay) {
       //线下付款
       return Container(

+ 2 - 0
lib/my_tools/order_processing/order_processing.dart

@@ -113,6 +113,8 @@ class OrderProcessing {
           return;
         }
         shops = entity.data.data;
+        shops.removeWhere((element) => !element.privateShop);
+        shops.removeWhere((element) => !element.innerTrade);
         x:
         for (int i = 0; i < shops.length; i++) {
           shop = shops[i];

+ 12 - 3
lib/paegs/gang_page/gang_in_page/qr_pay_page/qr_pay_page.dart

@@ -123,7 +123,15 @@ class _QRPayPageState extends State<QRPayPage> {
                   Container(
                     height: 0.5,
                     color: MyColors.cE7E7E7,
-                    margin: EdgeInsets.only(bottom: 53),
+                    margin: EdgeInsets.only(bottom: 20),
+                  ),
+                  Container(
+                    margin: EdgeInsets.only(bottom: 10),
+                    child: Row(children: [
+                      Image.asset('images/支付宝.png',height: 24,width: 24,),
+                      Container(width: 5,),
+                      Text('请使用支付宝扫码支付',style: TextStyle(color: MyColors.c333333,fontSize: 16),)
+                    ],mainAxisAlignment: MainAxisAlignment.center,),
                   ),
                   qrCodeUrl.isEmpty
                       ? Container(
@@ -134,6 +142,7 @@ class _QRPayPageState extends State<QRPayPage> {
                         )
                       : QrImage(
                           data: qrCodeUrl,
+                          gapless: false,
                           version: QrVersions.auto,
                           size: 200.0,
                         ),
@@ -144,7 +153,7 @@ class _QRPayPageState extends State<QRPayPage> {
                     ),
                     margin: EdgeInsets.only(bottom: 40),
                   )
-                ],
+                ],crossAxisAlignment: CrossAxisAlignment.center,
               ),
             ),
           ],
@@ -217,7 +226,7 @@ class _QRPayPageState extends State<QRPayPage> {
             .fromJson(json.decode(response.data.toString()));
         if (entity.data.data[0].state == orderStatePaid) {
           showToast('收款成功');
-          if(continueToQuery){
+          if (continueToQuery) {
             Navigator.pop(context, '收款成功');
           }
         } else {

+ 27 - 12
lib/paegs/gang_page/gang_page.dart

@@ -165,8 +165,8 @@ class _GangPageState extends State<GangPage>
             Row(
               children: [
                 GestureDetector(
-                  onTap: (){
-                    MyTools().toPage(context, QueryGangPage(), (then){});
+                  onTap: () {
+                    MyTools().toPage(context, QueryGangPage(), (then) {});
                   },
                   behavior: HitTestBehavior.translucent,
                   child: Container(
@@ -374,6 +374,25 @@ class _GangPageState extends State<GangPage>
                             ),
                             Row(
                               children: [
+                                Visibility(
+                                  visible: !data.privateShop,
+                                  child: Container(
+                                    decoration: BoxDecoration(
+                                      border: Border.all(
+                                          color: MyColors.cFF4233, width: 1),
+                                      borderRadius: BorderRadius.circular(8),
+                                    ),
+                                    height: 16,
+                                    width: 28,
+                                    child: Text(
+                                      '公开',
+                                      style: TextStyle(
+                                          color: MyColors.cFF4233, fontSize: 10),
+                                    ),
+                                    alignment: Alignment.center,
+                                    margin: EdgeInsets.only(right: 5),
+                                  ),
+                                ),
                                 Expanded(
                                   child: Text(
                                     'ID:${data.shopUid}',
@@ -438,7 +457,7 @@ class _GangPageState extends State<GangPage>
       "role==$shopUserOwner",
       "user_uid==${MyCookie().getUID()}"
     ];
-    if(sIndex == 0){
+    if (sIndex == 0) {
       conditions1.add('private_shop==true');
       dJson = {
         "key": "shop_user",
@@ -453,20 +472,17 @@ class _GangPageState extends State<GangPage>
         "paging": [page, 1000],
         "order_by": ["shop_name,DESC"]
       };
-    }else{
+    } else {
       conditions1.add('private_shop==false');
       dJson = {
         "key": "shop_user",
-        "filters": {
-          "conditions": conditions1
-        },
+        "filters": {"conditions": conditions1},
         "dims": shopUserDims,
         "paging": [page, 1000],
         "order_by": ["shop_name,DESC"]
       };
     }
 
-
     // if (sIndex == 1) {
     //   conditions1.add('collected == true');
     //   conditions2.add('collected == true');
@@ -494,17 +510,16 @@ class _GangPageState extends State<GangPage>
   }
 
   void _handleList(List<MyShopBeanDataData> list) {
-
     List<MyShopBeanDataData> selfBuilt = [];
     list.forEach((element) {
-      if(element.ownerUid==MyCookie().getUID()){
+      if (element.ownerUid == MyCookie().getUID()) {
         selfBuilt.add(element);
       }
     });
     selfBuilt.forEach((element) {
-      list.removeWhere((data) => data.id==element.id);
+      list.removeWhere((data) => data.id == element.id);
     });
-    if (list.isEmpty&&selfBuilt.isEmpty) return;
+    if (list.isEmpty && selfBuilt.isEmpty) return;
     for (int i = 0, length = list.length; i < length; i++) {
       String pinyin = PinyinHelper.getPinyinE(list[i].shopName);
       String tag = pinyin.substring(0, 1).toUpperCase();