This commit is contained in:
parent
fe9cf24905
commit
3595deb36a
|
@ -7,7 +7,7 @@ UPDATE `vn`.`item` i
|
|||
AND `size` IS NOT NULL
|
||||
GROUP BY typeFk
|
||||
) sub ON sub.typeFk = i.typeFk
|
||||
SET i.`size` = CAST(sub.`size` AS SIGNED)
|
||||
SET i.`size` = sub.`size`
|
||||
WHERE i.`size` IS NULL;
|
||||
|
||||
ALTER TABLE `vn`.`item` MODIFY COLUMN `size` int(10) NOT NULL;
|
||||
|
@ -22,7 +22,7 @@ UPDATE `vn`.`item` i
|
|||
AND `size` IS NOT NULL
|
||||
GROUP BY typeFk
|
||||
) sub ON sub.typeFk = i.typeFk
|
||||
SET i.weightByPiece = CAST(sub.grams * `size` AS SIGNED)
|
||||
SET i.weightByPiece = sub.grams * `size`
|
||||
WHERE weightByPiece IS NULL
|
||||
OR weightByPiece = 0;
|
||||
|
||||
|
|
|
@ -37,18 +37,6 @@
|
|||
value-field="priority"
|
||||
vn-name="priority">
|
||||
</vn-autocomplete>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
label="Weight/Piece"
|
||||
ng-model="$ctrl.item.weightByPiece"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
label="Size"
|
||||
ng-model="$ctrl.item.size"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
|
@ -84,6 +72,20 @@
|
|||
</tpl-item>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
label="Weight/Piece"
|
||||
ng-model="$ctrl.item.weightByPiece"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
type="number"
|
||||
label="Size"
|
||||
ng-model="$ctrl.item.size"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
data="originsData"
|
||||
|
|
Loading…
Reference in New Issue