1.创建车次增加运费单价,并根据入库吨位计算总价.

2.车辆详情中,增加显示员工工资,员工补贴,油耗量,油耗升数,车利润。
This commit is contained in:
ljx 2024-06-25 12:06:12 +08:00
parent 4d1a1d0467
commit 0e0a756dea
4 changed files with 46 additions and 6 deletions

View File

@ -562,7 +562,8 @@ export default {
// {field: 'is_customer_settlement', title: '', span: 24, itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
// {field: 'is_supplier_settlement', title: '', span: 24, itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
// {field: 'is_driver_settlement', title: '', span: 24, itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
{field: 'freight', title: '运费', span: 8, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
{field: 'unit_freight', title: '运费单价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleFreight }}},
{field: 'freight', title: '运费总价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
// {field: 'is_oil', title: '', span: 24,itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
// {field: 'is_repair', title: '', span: 6,itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
// {field: 'is_change_tire', title: '', span: 6,itemRender: { name: '$switch', props: { openLabel: '', openValue: 1, closeValue: 0, closeLabel: '' } }},
@ -692,7 +693,8 @@ export default {
{field: 'customer_warehousing_tonnage',title: '客户入库吨位',span: 6,itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleTotalPrice1}}},
{field: 'unit_price', title: '单价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleTotalPrice1 } }},
{field: 'total_price', title: '总价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
{field: 'freight', title: '运费', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
{field: 'unit_freight', title: '运费单价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleFreight1 }}},
{field: 'freight', title: '运费总价', span: 6, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}},
]},
//
driver_subsidyOptions: {
@ -1034,6 +1036,12 @@ export default {
handleTotalPrice(){
this.formOptions.data['total_price'] = this.formOptions.data['customer_warehousing_tonnage']*this.formOptions.data['unit_price'];
},
handleFreight(){
this.formOptions.data['freight'] = this.formOptions.data['unit_freight']*this.formOptions.data['customer_warehousing_tonnage']
},
handleFreight1(){
this.formOptions.data.train_number[this.nowIndex]['freight'] = this.formOptions.data.train_number[this.nowIndex]['unit_freight']*this.formOptions.data.train_number[this.nowIndex]['customer_warehousing_tonnage']
},
handleTotalPrice1(){
this.formOptions.data.train_number[this.nowIndex]['total_price'] = this.formOptions.data.train_number[this.nowIndex]['customer_warehousing_tonnage']*this.formOptions.data.train_number[this.nowIndex]['unit_price']
},

View File

@ -83,7 +83,7 @@
<template #is_oil="{ row }">
<a-tag color="green" v-if="row.is_oil === 0">
</a-tag>
<a-tag color="red" v-else>

View File

@ -138,16 +138,32 @@ export default {
slots: { default: 'is_outsourcing' }
},
//
{field: 'is_need_outbound', sortable: true, title: '出车', width: 70}, //
// {field: 'is_need_outbound', sortable: true, title: '', width: 70}, //
{ field: 'outbound_date', align: 'center', sortable: true, formatter: 'formatDate', title: '出车日期', width: 100 }, //
{ field: 'return_date', align: 'center', sortable: true, formatter: 'formatDate', title: '回车日期', width: 100 }, //
// {
// field: 'is_oil', align: 'center', sortable: true, title: '', width: 70,
// slots: { default: 'is_oil' }
// }, //
{
field: 'wage_fee', align: 'center', sortable: true, title: '工资费用', width: 100,
},
{
field: 'driver_subsidy', align: 'center', sortable: true, title: '补贴费用', width: 100,
},
{
field: 'is_oil', align: 'center', sortable: true, title: '加油', width: 70,
slots: { default: 'is_oil' }
}, //
{
field: 'oil_liter', align: 'center', sortable: true, title: '油耗升数', width: 100,
},
{
field: 'oil_fee', align: 'center', sortable: true, title: '油耗费用', width: 100,
},
{ field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, //
{ field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 250 }, //
// { field: 'outbound_remark', align: 'center', sortable: true, title: '', width: 250 }, //
{ field: 'accessories_fee', align: 'center', sortable: true, title: '配件费', width: 120 }, //
{ field: 'repair_fee', align: 'center', sortable: true, title: '维修费', width: 120 }, //
{ field: 'electric_fee', align: 'center', sortable: true, title: '电器费', width: 120 }, //
@ -155,7 +171,7 @@ export default {
{ field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, //
{ field: 'other_fee', align: 'center', sortable: true, title: '其他费用', width: 120 }, //
{ field: 'truck_profit', align: 'center', sortable: true, title: '车利润', width: 120 }, //
{ field: 'material_profit', align: 'center', sortable: true, title: '土利润', width: 120 }, //
// { field: 'material_profit', align: 'center', sortable: true, title: '', width: 120 }, //
{
field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right',
align: 'center',

View File

@ -48,6 +48,22 @@
<template #empty>
<a-empty/>
</template>
<template #is_oil="{ row }">
<a-tag color="green" v-if="row.is_oil === 0">
</a-tag>
<a-tag color="red" v-else>
</a-tag>
</template>
<!-- <template #is_outsourcing="{ row }">
<a-tag color="green" v-if="row.is_outsourcing === 1">
委外出车
</a-tag>
<a-tag color="blue" v-if="row.is_need_outbound === 1">
正常出车
</a-tag>
</template> -->
</vxe-grid>
</template>
<script>