|
@@ -3699,6 +3699,7 @@ class Database
|
|
|
|
|
|
private function update_key(&$key, &$value)
|
|
|
{
|
|
|
+ $value['key'] = $key;
|
|
|
if (strstr($key, '/')) {
|
|
|
if (strstr($key, '-')) {
|
|
|
$temp = explode('-', $key);
|
|
@@ -3916,12 +3917,13 @@ class Database
|
|
|
$table_body .= '</tr>';
|
|
|
}
|
|
|
|
|
|
+ $total = array();
|
|
|
if (isset($param['value']) && $param['value']) {
|
|
|
if (!is_array($param['value'])) {
|
|
|
$param['value'] = Dever::json_decode($param['value']);
|
|
|
}
|
|
|
foreach ($param['value'] as $bk => $bv) {
|
|
|
- $table_body .= '<tr>';
|
|
|
+ $table_body .= '<tr id="'.$param['name'] . '_c_'.$bk.'">';
|
|
|
foreach ($param['update'] as $hk => $hv) {
|
|
|
if (isset($hv['col'])) {
|
|
|
$hk = $hv['col'];
|
|
@@ -3937,7 +3939,15 @@ class Database
|
|
|
if ($hv['update'] == 'linkage') {
|
|
|
$hv['update_width'] = '30%';
|
|
|
}
|
|
|
- $this->update_html($hv, $hk, $hk, $bv, $s);
|
|
|
+ $hv = $this->update_html($hv, $hk, $hk, $bv, $s);
|
|
|
+ if (isset($param['update_show']) && $param['update_show'] && is_array($param['update_show'])) {
|
|
|
+ if (isset($param['update_show'][$hv['key']])) {
|
|
|
+ if (!isset($total[$hv['key']])) {
|
|
|
+ $total[$hv['key']] = array($hv['desc'], $param['update_show'][$hv['key']], 0);
|
|
|
+ }
|
|
|
+ $total[$hv['key']][2] += $hv['value'];
|
|
|
+ }
|
|
|
+ }
|
|
|
if ($hv['update'] == 'hidden') {
|
|
|
$table_body .= '<td style="display:none;">'.$s.'</td>';
|
|
|
} else {
|
|
@@ -3957,8 +3967,14 @@ class Database
|
|
|
$table .= '</table>';
|
|
|
$result .= $table;
|
|
|
|
|
|
- if (isset($param['update_show']) && $param['update_show']) {
|
|
|
- //$result .= '<section class="order-sumary border-b">合计数量:111</section>';
|
|
|
+ if ($total) {
|
|
|
+ $result .= '<section class="border-b" style="padding: 10px;display: inline-block;"><script>function test(e, data, type){console.info(e.val())}</script>';
|
|
|
+
|
|
|
+ foreach ($total as $k => $v) {
|
|
|
+ $result .= '<span>'.$v[0].':<span id="'.$v[1].'">'.$v[2].'</span></span> ';
|
|
|
+ }
|
|
|
+
|
|
|
+ $result .= '</section>';
|
|
|
}
|
|
|
} elseif (isset($param['update_type']) && $param['update_type'] == 3) {
|
|
|
$table = '<style>.layui-table .layui-input, .layui-table .xm-select-parent{width:100%}</style>';
|
|
@@ -4187,6 +4203,7 @@ class Database
|
|
|
$result .= Html::desc($param['desc']);
|
|
|
}
|
|
|
}
|
|
|
+ return $param;
|
|
|
}
|
|
|
|
|
|
/**
|