diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index dd58cf117148130fe04ef8c28e7a1fba97aee031..c517c76a5e5d223f149aa5c540858c00b6381fae 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -177,6 +177,16 @@ class Ajax extends Backend continue; } $weighids[$n] = $weighdata[$offset]; + if ($weighdata[$offset] == $weighdata[$sour_id] && $offset != $sour_id) { + $weighdata[$offset]++; + $step = 1; + foreach ($weighdata as $key => $wd) { + if ($key < $sour_id && $key != $offset) { + $weighdata[$key] = $weighdata[$offset] + $step++; + Db::name($table)->where($prikey, $key)->update([$field => $weighdata[$key]]); + } + } + } Db::name($table)->where($prikey, $n)->update([$field => $weighdata[$offset]]); } $this->success(); diff --git a/public/assets/js/backend/dashboard.js b/public/assets/js/backend/dashboard.js index 078d1def3cb9f2b87fb29230c89e1de172c9398f..8f5c12beedcf2525d87415f6697fc6efbbbd943a 100755 --- a/public/assets/js/backend/dashboard.js +++ b/public/assets/js/backend/dashboard.js @@ -31,9 +31,9 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart }, yAxis: {}, grid: [{ - left: 'left', - top: 'top', - right: '10', + left: 35, + top: 10, + right: 40, bottom: 30 }], series: [{