|
@@ -951,13 +951,22 @@ class Buy
|
|
|
|
|
|
private function getSelect($source, $source_id, $goods_id)
|
|
|
{
|
|
|
- $select = '<select class="audit">';
|
|
|
+ if ($goods_id) {
|
|
|
+ $name = 'audit';
|
|
|
+ } else {
|
|
|
+ $name = 'audit_set';
|
|
|
+ }
|
|
|
+ $select = '<select class="'.$name.'">';
|
|
|
foreach ($source as $k => $v) {
|
|
|
$yes = '';
|
|
|
if ($source_id && $v['id'] == $source_id) {
|
|
|
$yes = 'selected';
|
|
|
}
|
|
|
- $select .= '<option value="'.$v['type'] . '_' . $v['id'] . '_' . $goods_id.'" '.$yes.'>'.$v['name'].'</option>';
|
|
|
+ $value = ''.$v['type'] . '_' . $v['id'];
|
|
|
+ if ($goods_id) {
|
|
|
+ $value .= '_' . $goods_id;
|
|
|
+ }
|
|
|
+ $select .= '<option value="'.$value.'" '.$yes.'>'.$v['name'].'</option>';
|
|
|
}
|
|
|
$select .= '</select>';
|
|
|
|
|
@@ -1030,6 +1039,7 @@ class Buy
|
|
|
$result['商品拆单'] = array
|
|
|
(
|
|
|
'type' => 'table',
|
|
|
+ 'head' => array('name' => $this->getSelect($source, false, false), 'btn' => array()),
|
|
|
'content' => array
|
|
|
(
|
|
|
'head' => $head,
|