6.16 新需求

This commit is contained in:
ljx 2024-06-16 20:31:35 +08:00
parent 709403998f
commit ff11a35a0d
7 changed files with 139 additions and 91 deletions

View File

@ -333,7 +333,7 @@ export const aProvider = function (ops) {
}; };
// type: 1供货商 2经销 // type: 1供货商 2供应
export default [{ export default [{
name: 'A设计', name: 'A设计',
value: 'aProviderModule', value: 'aProviderModule',

View File

@ -12,7 +12,7 @@
{{ data.name }} {{ data.name }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="类型"> <a-descriptions-item label="类型">
{{ data.type }} {{ data.type== 0 ? '客户' : '供应商' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="行业"> <a-descriptions-item label="行业">
{{ data.industry }} {{ data.industry }}
@ -38,6 +38,15 @@
<a-descriptions-item label="总交易金额"> <a-descriptions-item label="总交易金额">
{{ data.total_amount }} {{ data.total_amount }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="本月交易吨数">
{{ data.month_total_ton }}
</a-descriptions-item>
<a-descriptions-item label="本月交易次数">
{{ data.month_total_count }}
</a-descriptions-item>
<a-descriptions-item label="本月交易金额">
{{ data.month_total_amount }}
</a-descriptions-item>
<a-descriptions-item label="状态"> <a-descriptions-item label="状态">
{{ data.status | formatStatus }} {{ data.status | formatStatus }}
</a-descriptions-item> </a-descriptions-item>
@ -211,12 +220,10 @@ export default {
zkSelectDataFieldName: "BalanceLog", zkSelectDataFieldName: "BalanceLog",
// //
columns: [ columns: [
// =============================== Start =============================== // =============================== Start ===============================
// {field: 'custom_id', sortable: true, title: 'id', width: 150}, // id // {field: 'custom_id', sortable: true, title: 'id', width: 150}, // id
{ field: 'truck_name', sortable: true, title: '车辆名称', width: 120 }, //
{ field: 'truck_number', sortable: true, title: '车牌号', width: 120 }, //
{field: 'balance_type', sortable: true, title: '结余类型', width: 120}, // :12 {field: 'balance_type', sortable: true, title: '结余类型', width: 120}, // :12
{ {
@ -292,69 +299,8 @@ export default {
} }
} }
}, },
// //
columns: [ columns: []
{ type: 'checkbox', width: 50 }, //
{ type: 'seq', width: 40 }, //
// =============================== Start ===============================
{ field: 'code', align: 'center', sortable: true, title: '车次单号', width: 120 }, //
{
field: 'truck_id', align: 'center', sortable: true, title: '车辆', width: 150,
slots: { default: 'truck_id' }
}, // id
{
field: 'driver_id', align: 'center', sortable: true, title: '司机', width: 150,
slots: { default: 'driver_id' }
}, // id
// {field: 'custom_id', sortable: true, title: 'id', width: 250}, // id
{ field: 'custom_name', align: 'center', sortable: true, title: '客户名称', width: 200 }, //
// {field: 'supplier_id', sortable: true, title: 'id', width: 250}, // id
{ field: 'supplier_name', align: 'center', sortable: true, title: '供应商名称', width: 200 }, //
{ 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: 'create_time',
// formatter: 'formatDate',
// width: 100,
// sortable: true,
// title: '',
// showHeaderOverflow: true
// }, //
{ field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, //
{ 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 }, //
{ field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, //
{ 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: 'income', sortable: true, title: '收入', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right',
align: 'center',
}, //
]
}, },
soilQualityMaterialAliasList: [], soilQualityMaterialAliasList: [],
} }
@ -393,10 +339,92 @@ export default {
methods: { methods: {
initDetailData() { initDetailData() {
let that = this; let that = this;
console.log("this.pageOptions.FieldName:", this.pageOptions.FieldName) let customColunms = [
console.log("this.pageOptions.ApiUrl:", this.pageOptions.ApiUrl); { type: 'checkbox', width: 50 }, //
console.log("this.pageOptions.ApiData:", this.pageOptions.ApiData); { type: 'seq', width: 40 }, //
// =============================== Start ===============================
{ field: 'code', align: 'center', sortable: true, title: '车次单号', width: 120 }, //
{
field: 'truck_id', align: 'center', sortable: true, title: '车辆', width: 150,
slots: { default: 'truck_id' }
}, // id
{ field: 'custom_name', align: 'center', sortable: true, title: '客户名称', width: 100 }, //
// { field: 'supplier_name', align: 'center', sortable: true, title: '', width: 100 }, //
{ field: 'customer_warehousing_tonnage', align: 'center', sortable: true, title: '吨位', width: 100 }, //
{ field: 'unit_price', align: 'center', sortable: true, title: '单价', width: 100 }, //
{ field: 'total_price', align: 'center', sortable: true, title: '总价', width: 100 }, //
{ 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: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, //
{ 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 }, //
{ field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, //
{ 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: 'income', sortable: true, title: '收入', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right',
align: 'center',
}, //
];
let supplierColunms = [
{ type: 'checkbox', width: 50 }, //
{ type: 'seq', width: 40 }, //
// =============================== Start ===============================
{ field: 'code', align: 'center', sortable: true, title: '车次单号', width: 120 }, //
{
field: 'truck_id', align: 'center', sortable: true, title: '车辆', width: 150,
slots: { default: 'truck_id' }
}, // id
// { field: 'custom_name', align: 'center', sortable: true, title: '', width: 100 }, //
{ field: 'supplier_name', align: 'center', sortable: true, title: '供应商名称', width: 120 }, //
{ field: 'supplier_outbound_tonnage', align: 'center', sortable: true, title: '吨位', width: 100 }, //
{ field: 'buy_unit_price', align: 'center', sortable: true, title: '单价', width: 100 }, //
{ field: 'buy_total_price', align: 'center', sortable: true, title: '总价', width: 100 }, //
{ 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: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, //
{ 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 }, //
{ field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, //
{ 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: 'income', sortable: true, title: '收入', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right',
align: 'center',
}, //
{
field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right',
align: 'center',
}, //
];
// this.dataId bigint // this.dataId bigint
// this.dataId // this.dataId
@ -413,9 +441,12 @@ export default {
} }
} }
}).then(a => { }).then(a => {
console.log("a", a)
console.log("this.pageOptions.ApiUrl", this.pageOptions.ApiUrl)
this.data = a.data[this.pageOptions.FieldName]; this.data = a.data[this.pageOptions.FieldName];
if(this.data.type == 0){
this.gridOptions.columns = customColunms;
}else if(this.data.type == 1){
this.gridOptions.columns = supplierColunms;
}
}).catch((a) => { }).catch((a) => {
this.$mk.error(a.msg, "aaa"); this.$mk.error(a.msg, "aaa");
}); });

View File

@ -374,7 +374,7 @@ export default {
return '客户'; return '客户';
} }
if (cellValue && (cellValue.toLowerCase() == '1')) { if (cellValue && (cellValue.toLowerCase() == '1')) {
return '经销商'; return '供应商';
} }
}, },
// //

View File

@ -138,6 +138,8 @@ export default {
{ field: 'code', sortable: true, title: '编码', width: 120 }, // { field: 'code', sortable: true, title: '编码', width: 120 }, //
// { field: 'staff_uid', sortable: true, title: 'uid', width: 250 }, // uid // { field: 'staff_uid', sortable: true, title: 'uid', width: 250 }, // uid
{ field: 'truck_name', sortable: true, title: '车辆名称', width: 120 }, //
{ field: 'truck_number', sortable: true, title: '车牌号', width: 120 }, //
{ field: 'balance_type', sortable: true, title: '结余类型', width: 100 }, // :12 { field: 'balance_type', sortable: true, title: '结余类型', width: 100 }, // :12
{ field: 'balance_amount', sortable: true, title: '修改金额', width: 120 }, // { field: 'balance_amount', sortable: true, title: '修改金额', width: 120 }, //
{ field: 'total_balance', sortable: true, title: '总结余金额', width: 120 }, // { field: 'total_balance', sortable: true, title: '总结余金额', width: 120 }, //

View File

@ -296,7 +296,7 @@ export default {
// {field: 'unit_price', sortable: true, title: '', width: 120}, // // {field: 'unit_price', sortable: true, title: '', width: 120}, //
// {field: 'total_price', sortable: true, title: '', width: 120}, // // {field: 'total_price', sortable: true, title: '', width: 120}, //
{ {
field: 'is_outsourcing', align: 'center', sortable: true, title: '是否委外', width: 80, field: 'is_outsourcing', align: 'center', sortable: true, title: '是否委外', width: 100,
slots: { default: 'is_outsourcing' } slots: { default: 'is_outsourcing' }
}, // }, //
// {field: 'is_need_outbound', sortable: true, title: '', width: 70}, // // {field: 'is_need_outbound', sortable: true, title: '', width: 70}, //
@ -309,11 +309,19 @@ export default {
// {field: 'is_repair', align: 'center',sortable: true, title: '', width: 70, // {field: 'is_repair', align: 'center',sortable: true, title: '', width: 70,
// slots: {default: 'is_repair'} // slots: {default: 'is_repair'}
// }, // // }, //
{
field: 'wage_fee', align: 'center', sortable: true, title: '工资费用', width: 100,
},
{ {
field: 'is_oil', align: 'center', sortable: true, title: '加油', width: 70, field: 'is_oil', align: 'center', sortable: true, title: '加油', width: 70,
slots: { default: 'is_oil' } 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: 'create_time', // field: 'create_time',
// formatter: 'formatDate', // formatter: 'formatDate',
@ -332,20 +340,21 @@ export default {
{ field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, // { field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, //
{ field: 'other_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: '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', // {
}, // // field: 'income', sortable: true, title: '', width: 80, fixed: 'right',
{ // align: 'center',
field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right', // }, //
align: 'center', // {
}, // // field: 'cost', sortable: true, title: '', width: 80, fixed: 'right',
{ // align: 'center',
field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right', // }, //
align: 'center', // {
}, // // field: 'profit', sortable: true, title: '', width: 80, fixed: 'right',
// align: 'center',
// }, //
// =============================== Start =============================== // =============================== Start ===============================

View File

@ -44,6 +44,12 @@
<a-descriptions-item label="加油总升数"> <a-descriptions-item label="加油总升数">
{{ data.add_oil_litre }} {{ data.add_oil_litre }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="总维修金额">
{{ data.maintenance_amount }}
</a-descriptions-item>
<a-descriptions-item label="总轮胎更换金额">
{{ data.tire_amount }}
</a-descriptions-item>
<a-descriptions-item label="车辆备注"> <a-descriptions-item label="车辆备注">
{{ data.remark }} {{ data.remark }}
</a-descriptions-item> </a-descriptions-item>

View File

@ -418,7 +418,7 @@ export const bProvider = function (ops) {
}; };
}; };
// type: 1供货商 2经销 // type: 1供货商 2供应
export default [{ export default [{
name: 'A设计', name: 'A设计',
value: 'aProviderModule', value: 'aProviderModule',