Commit 83ee4e5421e86c76ae6fe9b386e2e1c7970073b6

Authored by wdn127929
1 parent aeb70bd4

APP调整,客户经理的占座,其他同级和以下级别的用户,不能填写预订人姓名和电话备注等

@@ -12,14 +12,14 @@ if (flutterRoot == null) { @@ -12,14 +12,14 @@ if (flutterRoot == null) {
12 } 12 }
13 13
14 14
15 -def flutterVersionCode = "403" 15 +def flutterVersionCode = "404"
16 if (flutterVersionCode == null) { 16 if (flutterVersionCode == null) {
17 - flutterVersionCode = '403' 17 + flutterVersionCode = '404'
18 } 18 }
19 19
20 -def flutterVersionName = "4.0.3" 20 +def flutterVersionName = "4.0.4"
21 if (flutterVersionName == null) { 21 if (flutterVersionName == null) {
22 - flutterVersionName = '4.0.3' 22 + flutterVersionName = '4.0.4'
23 } 23 }
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
25 apply plugin: 'kotlin-android' 25 apply plugin: 'kotlin-android'
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 50; 6 + objectVersion = 46;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -504,7 +504,7 @@ @@ -504,7 +504,7 @@
504 "$(inherited)", 504 "$(inherited)",
505 "$(PROJECT_DIR)/Flutter", 505 "$(PROJECT_DIR)/Flutter",
506 ); 506 );
507 - MARKETING_VERSION = 4.0.3; 507 + MARKETING_VERSION = 4.0.4;
508 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 508 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
509 PRODUCT_NAME = Runner; 509 PRODUCT_NAME = Runner;
510 PROVISIONING_PROFILE_SPECIFIER = ""; 510 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -638,7 +638,7 @@ @@ -638,7 +638,7 @@
638 CURRENT_PROJECT_VERSION = 400; 638 CURRENT_PROJECT_VERSION = 400;
639 DEVELOPMENT_TEAM = 8J59HM8B82; 639 DEVELOPMENT_TEAM = 8J59HM8B82;
640 ENABLE_BITCODE = NO; 640 ENABLE_BITCODE = NO;
641 - FLUTTER_BUILD_MODE = debug; 641 + FLUTTER_BUILD_MODE = release;
642 FRAMEWORK_SEARCH_PATHS = ( 642 FRAMEWORK_SEARCH_PATHS = (
643 "$(inherited)", 643 "$(inherited)",
644 "$(PROJECT_DIR)/Flutter", 644 "$(PROJECT_DIR)/Flutter",
@@ -650,7 +650,7 @@ @@ -650,7 +650,7 @@
650 "$(inherited)", 650 "$(inherited)",
651 "$(PROJECT_DIR)/Flutter", 651 "$(PROJECT_DIR)/Flutter",
652 ); 652 );
653 - MARKETING_VERSION = 4.0.3; 653 + MARKETING_VERSION = 4.0.4;
654 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 654 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
655 PRODUCT_NAME = Runner; 655 PRODUCT_NAME = Runner;
656 PROVISIONING_PROFILE_SPECIFIER = ""; 656 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -686,7 +686,7 @@ @@ -686,7 +686,7 @@
686 "$(inherited)", 686 "$(inherited)",
687 "$(PROJECT_DIR)/Flutter", 687 "$(PROJECT_DIR)/Flutter",
688 ); 688 );
689 - MARKETING_VERSION = 4.0.3; 689 + MARKETING_VERSION = 4.0.4;
690 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 690 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
691 PRODUCT_NAME = Runner; 691 PRODUCT_NAME = Runner;
692 PROVISIONING_PROFILE_SPECIFIER = ""; 692 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1516,13 +1516,29 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1516,13 +1516,29 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1516 MyColours.color_333333) 1516 MyColours.color_333333)
1517 : TitleAndBtn( 1517 : TitleAndBtn(
1518 title: "备注", 1518 title: "备注",
  1519 + uid: widget.uid,
1519 content: 1520 content:
1520 detailEntity.cusdem ?? 1521 detailEntity.cusdem ??
1521 "", 1522 "",
1522 callback: () { 1523 callback: () {
1523 - //备注弹窗  
1524 - _showCusdemDialog(  
1525 - context, widget.rid); 1524 + if (userModel.user
  1525 + .role_name !=
  1526 + '管理员' &&
  1527 + userModel.user
  1528 + .role_name !=
  1529 + '店长' &&
  1530 + widget.uid !=
  1531 + "null" &&
  1532 + widget.uid !=
  1533 + userModel.user
  1534 + .openid) {
  1535 + return;
  1536 + } else {
  1537 + //备注弹窗
  1538 + _showCusdemDialog(
  1539 + context,
  1540 + widget.rid);
  1541 + }
1526 }, 1542 },
1527 ), 1543 ),
1528 1544
@@ -2076,25 +2092,99 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -2076,25 +2092,99 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
2076 text: '填写预订人信息', 2092 text: '填写预订人信息',
2077 fontSize: 28, 2093 fontSize: 28,
2078 isBold: false, 2094 isBold: false,
  2095 + textColor: userModel.user.role_name != '管理员' &&
  2096 + userModel
  2097 + .user
  2098 + .role_name !=
  2099 + '店长' &&
  2100 + widget.uid !=
  2101 + "null" &&
  2102 + widget.uid !=
  2103 + userModel
  2104 + .user
  2105 + .openid
  2106 + ? MyColours
  2107 + .color_999999
  2108 + : Colors.white,
2079 height: ScreenUtil() 2109 height: ScreenUtil()
2080 .setWidth(70), 2110 .setWidth(70),
2081 width: ScreenUtil() 2111 width: ScreenUtil()
2082 .setWidth(240), 2112 .setWidth(240),
2083 radius: ScreenUtil() 2113 radius: ScreenUtil()
2084 .setWidth(10), 2114 .setWidth(10),
  2115 + borderColor: userModel.user.role_name != '管理员' &&
  2116 + userModel
  2117 + .user
  2118 + .role_name !=
  2119 + '店长' &&
  2120 + widget.uid !=
  2121 + "null" &&
  2122 + widget.uid !=
  2123 + userModel
  2124 + .user
  2125 + .openid
  2126 + ? MyColours
  2127 + .color_999999
  2128 + : MyColours
  2129 + .color_199095,
  2130 + gradientStart: userModel.user.role_name != '管理员' &&
  2131 + userModel
  2132 + .user
  2133 + .role_name !=
  2134 + '店长' &&
  2135 + widget.uid !=
  2136 + "null" &&
  2137 + widget.uid !=
  2138 + userModel
  2139 + .user
  2140 + .openid
  2141 + ? MyColours
  2142 + .color_ffffff
  2143 + : MyColours
  2144 + .color_199095,
  2145 + gradientEnd: userModel.user.role_name != '管理员' &&
  2146 + userModel
  2147 + .user
  2148 + .role_name !=
  2149 + '店长' &&
  2150 + widget.uid !=
  2151 + "null" &&
  2152 + widget.uid !=
  2153 + userModel
  2154 + .user
  2155 + .openid
  2156 + ? MyColours
  2157 + .color_ffffff
  2158 + : MyColours
  2159 + .color_199095,
2085 onPressed: () { 2160 onPressed: () {
2086 // setState(() { 2161 // setState(() {
2087 // setTop = true; 2162 // setTop = true;
2088 // }); 2163 // });
2089 - NavigatorUtil  
2090 - .goEditReserverPage(  
2091 - context,  
2092 - widget  
2093 - .rid,  
2094 - '',  
2095 - '',  
2096 - needBtn:  
2097 - false); 2164 + if (userModel.user
  2165 + .role_name !=
  2166 + '管理员' &&
  2167 + userModel.user
  2168 + .role_name !=
  2169 + '店长' &&
  2170 + widget.uid !=
  2171 + "null" &&
  2172 + widget.uid !=
  2173 + userModel
  2174 + .user
  2175 + .openid) {
  2176 + return;
  2177 + } else {
  2178 + NavigatorUtil
  2179 + .goEditReserverPage(
  2180 + context,
  2181 + widget
  2182 + .rid,
  2183 + '',
  2184 + '',
  2185 + needBtn:
  2186 + false);
  2187 + }
2098 }, 2188 },
2099 )) 2189 ))
2100 ], 2190 ],
@@ -3066,17 +3156,30 @@ class TitleAndBtn extends StatelessWidget { @@ -3066,17 +3156,30 @@ class TitleAndBtn extends StatelessWidget {
3066 final List<String> list; 3156 final List<String> list;
3067 final NotebookDetailModel detailModel; 3157 final NotebookDetailModel detailModel;
3068 final GestureTapCallback callback; 3158 final GestureTapCallback callback;
  3159 + final String uid;
3069 const TitleAndBtn( 3160 const TitleAndBtn(
3070 {Key key, 3161 {Key key,
3071 this.title, 3162 this.title,
3072 this.content, 3163 this.content,
3073 this.list, 3164 this.list,
3074 this.detailModel, 3165 this.detailModel,
3075 - this.callback}) 3166 + this.callback,
  3167 + this.uid})
3076 : super(key: key); 3168 : super(key: key);
3077 3169
3078 @override 3170 @override
3079 Widget build(BuildContext context) { 3171 Widget build(BuildContext context) {
  3172 + bool hasAuthority = true; //
  3173 + if (title == "备注") {
  3174 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  3175 + if (userModel.user.role_name != '管理员' &&
  3176 + userModel.user.role_name != '店长' &&
  3177 + uid != "null" &&
  3178 + uid != userModel.user.openid) {
  3179 + hasAuthority = false;
  3180 + }
  3181 + }
  3182 +
3080 return Container( 3183 return Container(
3081 color: MyColours.color_ffffff, 3184 color: MyColours.color_ffffff,
3082 width: double.infinity, 3185 width: double.infinity,
@@ -3111,10 +3214,14 @@ class TitleAndBtn extends StatelessWidget { @@ -3111,10 +3214,14 @@ class TitleAndBtn extends StatelessWidget {
3111 border: Border( 3214 border: Border(
3112 bottom: BorderSide( 3215 bottom: BorderSide(
3113 width: ScreenUtil().setWidth(2), 3216 width: ScreenUtil().setWidth(2),
3114 - color: MyColours.color_199095))), 3217 + color: hasAuthority
  3218 + ? MyColours.color_199095
  3219 + : MyColours.color_999999))),
3115 child: Text(content == null || content == '' ? "修改" : content, 3220 child: Text(content == null || content == '' ? "修改" : content,
3116 style: TextStyle( 3221 style: TextStyle(
3117 - color: MyColours.color_199095, 3222 + color: hasAuthority
  3223 + ? MyColours.color_199095
  3224 + : MyColours.color_999999,
3118 fontSize: ScreenUtil().setSp(32))), 3225 fontSize: ScreenUtil().setSp(32))),
3119 ), 3226 ),
3120 ), 3227 ),