Commit b0c02057080b001e13eb515f0e97c142d8c79fa2
1 parent
5542f5da
桌位管理,存在关系的桌位删除桌位按钮置灰&&批量删除桌位时提示不可选择
Showing
1 changed file
with
15 additions
and
0 deletions
| @@ -1506,12 +1506,27 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { | @@ -1506,12 +1506,27 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { | ||
| 1506 | return; | 1506 | return; |
| 1507 | } | 1507 | } |
| 1508 | String tids = ''; | 1508 | String tids = ''; |
| 1509 | + String tableNameShow = ''; | ||
| 1509 | for (t.Table item in tableManagerModel | 1510 | for (t.Table item in tableManagerModel |
| 1510 | .tableOuterList[ | 1511 | .tableOuterList[ |
| 1511 | tableManagerModel.selectNumber] | 1512 | tableManagerModel.selectNumber] |
| 1512 | .selectTables) { | 1513 | .selectTables) { |
| 1514 | + // 统计有合并关系的按钮 | ||
| 1515 | + if(item.isMerge == '1' || item.isLock == '1'){ | ||
| 1516 | + //存在合并或者被合并 | ||
| 1517 | + tableNameShow += '${item.name},'; | ||
| 1518 | + } | ||
| 1513 | tids += '${item.id},'; | 1519 | tids += '${item.id},'; |
| 1514 | } | 1520 | } |
| 1521 | + | ||
| 1522 | + if(tableNameShow.endsWith(',')){ | ||
| 1523 | + tableNameShow = tableNameShow.substring(0,tableNameShow.length-1); | ||
| 1524 | + } | ||
| 1525 | + if(tableNameShow.length > 0){ | ||
| 1526 | + //提示 | ||
| 1527 | + Utils.showToast('${tableNameShow}不可选择,请解除关系后再删除。'); | ||
| 1528 | + return; | ||
| 1529 | + } | ||
| 1515 | if (tids.endsWith(',')) { | 1530 | if (tids.endsWith(',')) { |
| 1516 | tids = tids.substring(0, tids.length - 1); | 1531 | tids = tids.substring(0, tids.length - 1); |
| 1517 | } | 1532 | } |
-
Please register or login to post a comment