Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 21d8fd43

Von Hans Peter Schlaepfer vor mehr als 4 Jahren hinzugefügt

  • ID 21d8fd4317f954ccbc3cd43ebe111d9e40fff2cb
  • Vorgänger 96f21f5c
  • Nachfolger 275285ac

Neues kivitendo Design Aenderungen in templates/webpages/wh/..

Unterschiede anzeigen:

templates/webpages/wh/transfer_parts_selection.html
1
[%- USE T8 %]
2
[%- USE HTML %][%- USE JavaScript %]
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE JavaScript %]
4

  
3 5
<h1>[% title %]</h1>
4 6

  
5
 <script type="text/javascript">
6
  <!--
7
      warehouses = new Array();
8
      [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
9
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
10
      [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
11
      [% END %]
12
      [% END %]
7
<script type="text/javascript"><!--
8
  warehouses = new Array();
9
  [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %]
10
  [% FOREACH wh = WAREHOUSES_it %]
11
    warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
    [% USE BINS_it = Iterator(wh.BINS) %]
13
    [% FOREACH bin = BINS_it %]
14
      warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
15
    [% END %]
16
  [% END %]
13 17

  
14
      function warehouse_selected(row, index) {
15
        var cname = "dst_bin_id_" + row;
16
        var control = document.getElementById(cname);
18
  function warehouse_selected(row, index) {
19
    var cname = "dst_bin_id_" + row;
20
    var control = document.getElementById(cname);
17 21

  
18
        for (var i = control.options.length - 1; i >= 0; i--) {
19
          control.options[i] = null;
20
        }
22
    for (var i = control.options.length - 1; i >= 0; i--) {
23
      control.options[i] = null;
24
    }
21 25

  
22
        for (i = 0; i < warehouses[index].length; i++) {
23
          control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
24
        }
26
    for (i = 0; i < warehouses[index].length; i++) {
27
      control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
28
    }
25 29

  
26
        control.options[0].selected = true;
27
      }
30
    control.options[0].selected = true;
31
  }
28 32

  
29
      $(function() {
30
        [% FOREACH row = CONTENTS %]
31
        warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
32
        [% END %]
33
      });
34
    -->
35
 </script>
33
  $(function() {
34
    [% FOREACH row = CONTENTS %]
35
    warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
36
    [% END %]
37
  });
38
--></script>
36 39

  
37
 <form method="post" action="wh.pl" id="form">
40
<form method="post" action="wh.pl" id="form">
38 41

  
39
  <input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
42
<input type="hidden" name="warehouse_id" value="[% HTML.escape(warehouse_id) %]">
40 43

  
41
  <p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
44
<p>[% 'Transfer from warehouse' | $T8 %]: [% warehouse_description %]</p>
42 45

  
43
  <p>
44
   <table>
46
<table class="tbl-horizontal">
47
  <tbody>
45 48
    <tr>
46
     <td>[% 'Select type of transfer' | $T8 %]:</td>
47
     <td>
48
      <select name="transfer_type_id">
49
       [%- FOREACH type = TRANSFER_TYPES %]<option value="[% HTML.escape(type.id) %]">[% type.description %]</option>[% END %]
50
      </select>
51
     </td>
49
      <th>[% 'Select type of transfer' | $T8 %]:</th>
50
      <td>
51
        <select name="transfer_type_id">
52
          [% FOREACH type = TRANSFER_TYPES %]
53
           <option value="[% HTML.escape(type.id) %]">[% type.description %]</option>
54
          [% END %]
55
        </select>
56
      </td>
52 57
    </tr>
53

  
54 58
    <tr>
55
     <td>[% 'Optional comment' | $T8 %]:</td>
56
     <td><input name="comment" size="20"></td>
59
      <th>[% 'Optional comment' | $T8 %]:</th>
60
      <td><input type="text" name="comment" size="20"></td>
57 61
    </tr>
58 62
    <tr>
59
     <td>[% 'Change default bin for this parts' | $T8 %]:</td>
60
    <td><input type="checkbox" name="change_default_bin"<td>
63
      <td>[% 'Change default bin for this parts' | $T8 %]:</th>
64
      <td><input type="checkbox" name="change_default_bin"><td>
61 65
    </tr>
62
   </table>
63
  </p>
66
  </tbody>
67
</table>
64 68

  
65
  <p>
66
   <table>
69
<table class="tbl-list">
70
  <thead>
67 71
    <tr>
68
     <th class="listheading">[% 'Source bin' | $T8 %]</th>
69
     <th class="listheading">[% 'Part Number' | $T8 %]</th>
70
     <th class="listheading">[% 'Part Description' | $T8 %]</th>
71
     <th class="listheading">[% 'Charge Number' | $T8 %]</th>
72
     [% IF INSTANCE_CONF.get_show_bestbefore %]
73
     <th class="listheading">[% 'Best Before' | $T8 %]</th>
74
     [% END %]
75
     <th class="listheading">[% 'EAN' | $T8 %]</th>
76
     <th class="listheading">[% 'Available qty' | $T8 %]</th>
77
     <th class="listheading" colspan="2">[% 'Transfer qty' | $T8 %]</th>
78
     <th class="listheading" colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
72
      <th>[% 'Source bin' | $T8 %]</th>
73
      <th>[% 'Part Number' | $T8 %]</th>
74
      <th>[% 'Part Description' | $T8 %]</th>
75
      <th>[% 'Charge Number' | $T8 %]</th>
76
      [% IF INSTANCE_CONF.get_show_bestbefore %]
77
      <th>[% 'Best Before' | $T8 %]</th>
78
      [% END %]
79
      <th>[% 'EAN' | $T8 %]</th>
80
      <th>[% 'Available qty' | $T8 %]</th>
81
      <th colspan="2">[% 'Transfer qty' | $T8 %]</th>
82
      <th colspan="2">[% 'Destination warehouse and bin' | $T8 %]</th>
79 83
    </tr>
80

  
84
  </thead>
85
  <tbody>
81 86
    [% FOREACH row = CONTENTS %]
82
    <tr class="listrow[% loop.count % 2 %]">
83
     <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
84
     <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
85
     <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
86
     <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
87
     <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
88
     [% IF INSTANCE_CONF.get_show_bestbefore %]
89
     <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
90
     [% END %]
91
     <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
92
     <td>[% HTML.escape(row.bindescription) %]</td>
93
     <td>[% HTML.escape(row.partnumber) %]</td>
94
     <td>[% HTML.escape(row.partdescription) %]</td>
95
     <td>[% HTML.escape(row.chargenumber) %]</td>
96
     [% IF INSTANCE_CONF.get_show_bestbefore %]
97
     <td>[% HTML.escape(row.bestbefore) %]</td>
98
     [% END %]
99
     <td>[% HTML.escape(row.ean) %]</td>
100
     <td>[% HTML.escape(row.qty) %]</td>
101
     <td><input name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
102
     <td>
103
      <select name="unit_[% loop.count %]">
104
       [% FOREACH unit = row.UNITS %]<option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>[% END %]
105
      </select>
106
     </td>
107

  
108
     <td>
109
      <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
110
       [% FOREACH wh = WAREHOUSES %]<option value="[% HTML.escape(wh.id) %]"[% IF wh.selected %] selected[% END %]>[% HTML.escape(wh.description) %]</option>[% END %]
111
      </select>
112
     </td>
113
     <td><select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select></td>
114
    </tr>
115

  
87
      <tr>
88
        <td>
89
          <input type="hidden" name="src_bin_id_[% loop.count %]" value="[% HTML.escape(row.binid) %]">
90
          <input type="hidden" name="parts_id_[% loop.count %]" value="[% HTML.escape(row.parts_id) %]">
91
          <input type="hidden" name="partnumber_[% loop.count %]" value="[% HTML.escape(row.partnumber) %]">
92
          <input type="hidden" name="partdescription_[% loop.count %]" value="[% HTML.escape(row.partdescription) %]">
93
          <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
94
          [% IF INSTANCE_CONF.get_show_bestbefore %]
95
            <input type="hidden" name="bestbefore_[% loop.count %]" value="[% HTML.escape(row.bestbefore) %]">
96
          [% END %]
97
          <input type="hidden" name="ean_[% loop.count %]" value="[% HTML.escape(row.ean) %]">
98
          [% HTML.escape(row.bindescription) %]
99
        </td>
100
        <td>[% HTML.escape(row.partnumber) %]</td>
101
        <td>[% HTML.escape(row.partdescription) %]</td>
102
        <td>[% HTML.escape(row.chargenumber) %]</td>
103
        [% IF INSTANCE_CONF.get_show_bestbefore %]
104
          <td>[% HTML.escape(row.bestbefore) %]</td>
105
        [% END %]
106
        <td>[% HTML.escape(row.ean) %]</td>
107
        <td>[% HTML.escape(row.qty) %]</td>
108
        <td><input type="text" name="qty_[% loop.count %]" size="8" style="text-align: right"></td>
109
        <td>
110
          <select name="unit_[% loop.count %]">
111
            [% FOREACH unit = row.UNITS %]
112
              <option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
113
            [% END %]
114
          </select>
115
        </td>
116
        <td>
117
          <select name="dst_warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
118
            [% FOREACH wh = WAREHOUSES %]
119
              <option value="[% HTML.escape(wh.id) %]" [% if wh.selected %] selected[% end %]>[% HTML.escape(wh.description) %]</option>
120
            [% END %]
121
          </select>
122
        </td>
123
        <td>
124
          <select id="dst_bin_id_[% loop.count %]" name="dst_bin_id_[% loop.count %]"></select>
125
        </td>
126
      </tr>
116 127
    [% END %]
128
  </tbody>
129
</table>
117 130

  
118
    <input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
131
<input type="hidden" name="rowcount" value="[% CONTENTS.size %]">
119 132

  
120
   </table>
121
  </p>
122
 </form>
133
</form>

Auch abrufbar als: Unified diff