87 lines
3.8 KiB
XML
87 lines
3.8 KiB
XML
<gdoo>
|
|
<view id="logistics">
|
|
<style>
|
|
#delivery_logistics {
|
|
padding: 0;
|
|
}
|
|
@media (max-width: 767px) {
|
|
#delivery_logistics .form-group:first-child > div {
|
|
border: 0;
|
|
}
|
|
#delivery_logistics .control-label {
|
|
padding: 5px;
|
|
padding-top: 11px;
|
|
display: block;
|
|
font-weight: 400;
|
|
}
|
|
#delivery_logistics .control-text {
|
|
padding: 5px;
|
|
border-top: 1px solid #ddd;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<form class="form-horizontal form-controller" method="post" id="delivery_logistics" name="delivery_logistics">
|
|
<group>
|
|
<field name="freight_quantity" options="" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_weight" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_part_quantity" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_part_weight" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_short_logistics_id" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_short_car" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_price" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_short_money" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_logistics_id" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_logistics_phone" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_type" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_sn" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_money" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_pay_text" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_arrival_date" label="1" col_name="10" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_remark" label="1" col_name="10" col_label="2" col_type="xs" />
|
|
</group>
|
|
<group>
|
|
<field name="freight_created_by" read="1" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
<field name="freight_created_dt" read="1" label="1" col_name="4" col_label="2" col_type="xs" />
|
|
</group>
|
|
<field name="id" hidden="1" />
|
|
</form>
|
|
|
|
<script>
|
|
$(function($) {
|
|
$('#stock_delivery_freight_weight,#stock_delivery_freight_part_weight,#stock_delivery_freight_price').on('change', function(e) {
|
|
var a = toNumber($('#stock_delivery_freight_weight').val());
|
|
var b = toNumber($('#stock_delivery_freight_part_weight').val());
|
|
var c = toNumber($('#stock_delivery_freight_price').val());
|
|
var d = (a + b) * c;
|
|
$('#stock_delivery_freight_short_money').val(d);
|
|
});
|
|
$('#stock_delivery_freight_money,#stock_delivery_freight_customer_money').on('change', function(e) {
|
|
var a = toNumber($('#stock_delivery_freight_money').val());
|
|
var b = toNumber($('#stock_delivery_freight_customer_money').val());
|
|
var c = a - b;
|
|
if (b > a) {
|
|
c = 0;
|
|
}
|
|
$('#stock_delivery_freight_self_money').val(c);
|
|
});
|
|
});
|
|
</script>
|
|
</view>
|
|
</gdoo> |