修正表单远程关联字段显示
修正发货单物流信息无法填写 修正发货单直营物流信息无法填写 去掉没有使用的字段类型
This commit is contained in:
@@ -192,7 +192,7 @@ class AllocationController extends WorkflowController
|
||||
DB::table('stock_allocation')->where('id', $id)->update($gets);
|
||||
return $this->json('物流信息提交成功。', true);
|
||||
}
|
||||
$file = base_path().'/addons/'.ucfirst(Request::module()).'/views/'.Request::controller().'/'.Request::action().'.html';
|
||||
$file = base_path().'/app/Gdoo/'.ucfirst(Request::module()).'/views/'.Request::controller().'/'.Request::action().'.html';
|
||||
$id = Request::get('id');
|
||||
$row = Allocation::find($id);
|
||||
$freight_quantity = floatval($row['freight_quantity']);
|
||||
@@ -205,7 +205,7 @@ class AllocationController extends WorkflowController
|
||||
$row['freight_quantity'] = $quantity;
|
||||
$row['freight_weight'] = $weight;
|
||||
}
|
||||
$form = Form::make1(['table' => 'stock_allocation', 'file' => $file, 'row' => $row]);
|
||||
$form = Form::make2(['table' => 'stock_allocation', 'file' => $file, 'row' => $row]);
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ class DeliveryController extends WorkflowController
|
||||
DB::table('stock_delivery')->where('id', $id)->update($gets);
|
||||
return $this->json('物流信息提交成功。', true);
|
||||
}
|
||||
$file = base_path().'/addons/'.ucfirst(Request::module()).'/views/'.Request::controller().'/'.Request::action().'.xml';
|
||||
$file = base_path().'/app/Gdoo/'.ucfirst(Request::module()).'/views/'.Request::controller().'/'.Request::action().'.xml';
|
||||
$id = Request::get('id');
|
||||
$row = Delivery::find($id);
|
||||
$freight_quantity = floatval($row['freight_quantity']);
|
||||
@@ -404,7 +404,7 @@ class DeliveryController extends WorkflowController
|
||||
$row['freight_quantity'] = $quantity;
|
||||
$row['freight_weight'] = $weight;
|
||||
}
|
||||
$form = Form::make1(['table' => 'stock_delivery', 'file' => $file, 'row' => $row]);
|
||||
$form = Form::make2(['table' => 'stock_delivery', 'file' => $file, 'row' => $row]);
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,105 +1,109 @@
|
||||
<style>
|
||||
#allocation_logistics {
|
||||
padding: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
#allocation_logistics .form-group:first-child > div {
|
||||
border: 0;
|
||||
<gdoo>
|
||||
<view id="logistics">
|
||||
<style>
|
||||
#allocation_logistics {
|
||||
padding: 0;
|
||||
}
|
||||
#allocation_logistics .control-label {
|
||||
padding: 5px;
|
||||
padding-top: 11px;
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
}
|
||||
#allocation_logistics .control-text {
|
||||
padding: 5px;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<form class="form-horizontal form-controller" method="post" id="allocation_logistics" name="allocation_logistics">
|
||||
|
||||
<group>
|
||||
<field name="freight_quantity" options="{'col_name':4}" 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_short_start label=1 col_name=4 col_label=2 col_type=xs />
|
||||
<field name=freight_short_end 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_customer_money label=1 col_name=4 col_label=2 col_type=xs />
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name=freight_self_money read=1 label=1 col_name=4 col_label=2 col_type=xs />
|
||||
<field name=freight_pay_type label=1 col_name=4 col_label=2 col_type=xs />
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name=freight_arrival_date label=1 col_name=4 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_allocation_freight_weight,#stock_allocation_freight_part_weight,#stock_allocation_freight_price').on('change', function(e) {
|
||||
var a = toNumber($('#stock_allocation_freight_weight').val());
|
||||
var b = toNumber($('#stock_allocation_freight_part_weight').val());
|
||||
var c = toNumber($('#stock_allocation_freight_price').val());
|
||||
var d = (a + b) * c;
|
||||
$('#stock_allocation_freight_short_money').val(d);
|
||||
});
|
||||
$('#stock_allocation_freight_money,#stock_allocation_freight_customer_money').on('change', function(e) {
|
||||
var a = toNumber($('#stock_allocation_freight_money').val());
|
||||
var b = toNumber($('#stock_allocation_freight_customer_money').val());
|
||||
var c = a - b;
|
||||
if (b > a) {
|
||||
c = 0;
|
||||
@media (max-width: 767px) {
|
||||
#allocation_logistics .form-group:first-child > div {
|
||||
border: 0;
|
||||
}
|
||||
$('#stock_allocation_freight_self_money').val(c);
|
||||
#allocation_logistics .control-label {
|
||||
padding: 5px;
|
||||
padding-top: 11px;
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
}
|
||||
#allocation_logistics .control-text {
|
||||
padding: 5px;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<form class="form-horizontal form-controller" method="post" id="allocation_logistics" name="allocation_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_short_start" label="1" col_name="4" col_label="2" col_type="xs" />
|
||||
<field name="freight_short_end" 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_customer_money" label="1" col_name="4" col_label="2" col_type="xs" />
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="freight_self_money" read="1" label="1" col_name="4" col_label="2" col_type="xs" />
|
||||
<field name="freight_pay_type" label="1" col_name="4" col_label="2" col_type="xs" />
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="freight_arrival_date" label="1" col_name="4" 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_allocation_freight_weight,#stock_allocation_freight_part_weight,#stock_allocation_freight_price').on('change', function(e) {
|
||||
var a = toNumber($('#stock_allocation_freight_weight').val());
|
||||
var b = toNumber($('#stock_allocation_freight_part_weight').val());
|
||||
var c = toNumber($('#stock_allocation_freight_price').val());
|
||||
var d = (a + b) * c;
|
||||
$('#stock_allocation_freight_short_money').val(d);
|
||||
});
|
||||
$('#stock_allocation_freight_money,#stock_allocation_freight_customer_money').on('change', function(e) {
|
||||
var a = toNumber($('#stock_allocation_freight_money').val());
|
||||
var b = toNumber($('#stock_allocation_freight_customer_money').val());
|
||||
var c = a - b;
|
||||
if (b > a) {
|
||||
c = 0;
|
||||
}
|
||||
$('#stock_allocation_freight_self_money').val(c);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</view>
|
||||
</gdoo>
|
||||
Reference in New Issue
Block a user