6.16 新需求
This commit is contained in:
parent
709403998f
commit
ff11a35a0d
|
|
@ -333,7 +333,7 @@ export const aProvider = function (ops) {
|
|||
};
|
||||
|
||||
|
||||
// type: 1供货商 2经销商
|
||||
// type: 1供货商 2供应商
|
||||
export default [{
|
||||
name: 'A设计',
|
||||
value: 'aProviderModule',
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
{{ data.name }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="类型">
|
||||
{{ data.type }}
|
||||
{{ data.type== 0 ? '客户' : '供应商' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="行业">
|
||||
{{ data.industry }}
|
||||
|
|
@ -38,6 +38,15 @@
|
|||
<a-descriptions-item label="总交易金额">
|
||||
{{ data.total_amount }} 元
|
||||
</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="状态">
|
||||
{{ data.status | formatStatus }}
|
||||
</a-descriptions-item>
|
||||
|
|
@ -211,12 +220,10 @@ export default {
|
|||
zkSelectDataFieldName: "BalanceLog",
|
||||
// 表格列配置
|
||||
columns: [
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
// {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}, // 结余类型:1增加,2减少
|
||||
|
||||
{
|
||||
|
|
@ -292,69 +299,8 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 表格列配置
|
||||
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',
|
||||
}, // 利润
|
||||
]
|
||||
columns: []
|
||||
},
|
||||
soilQualityMaterialAliasList: [],
|
||||
}
|
||||
|
|
@ -393,10 +339,92 @@ export default {
|
|||
methods: {
|
||||
initDetailData() {
|
||||
let that = this;
|
||||
console.log("this.pageOptions.FieldName:", this.pageOptions.FieldName)
|
||||
console.log("this.pageOptions.ApiUrl:", this.pageOptions.ApiUrl);
|
||||
console.log("this.pageOptions.ApiData:", this.pageOptions.ApiData);
|
||||
|
||||
let customColunms = [
|
||||
{ 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: 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是对象,则需要转换为数字
|
||||
|
||||
|
|
@ -413,9 +441,12 @@ export default {
|
|||
}
|
||||
}
|
||||
}).then(a => {
|
||||
console.log("a", a)
|
||||
console.log("this.pageOptions.ApiUrl", this.pageOptions.ApiUrl)
|
||||
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) => {
|
||||
this.$mk.error(a.msg, "aaa");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ export default {
|
|||
return '客户';
|
||||
}
|
||||
if (cellValue && (cellValue.toLowerCase() == '1')) {
|
||||
return '经销商';
|
||||
return '供应商';
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
|
|
|
|||
|
|
@ -138,6 +138,8 @@ export default {
|
|||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 120 }, // 编码
|
||||
// { 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 }, // 结余类型:1增加,2减少
|
||||
{ field: 'balance_amount', sortable: true, title: '修改金额', width: 120 }, // 修改金额
|
||||
{ field: 'total_balance', sortable: true, title: '总结余金额', width: 120 }, // 总结余金额
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ export default {
|
|||
// {field: 'unit_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' }
|
||||
}, // 是否委外
|
||||
// {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,
|
||||
// slots: {default: 'is_repair'}
|
||||
// }, // 是否维修
|
||||
{
|
||||
field: 'wage_fee', 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: 'create_time',
|
||||
// formatter: 'formatDate',
|
||||
|
|
@ -332,20 +340,21 @@ 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: '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',
|
||||
}, // 利润
|
||||
// { 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',
|
||||
// }, // 利润
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@
|
|||
<a-descriptions-item label="加油总升数">
|
||||
{{ data.add_oil_litre }}
|
||||
</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="车辆备注">
|
||||
{{ data.remark }}
|
||||
</a-descriptions-item>
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ export const bProvider = function (ops) {
|
|||
};
|
||||
};
|
||||
|
||||
// type: 1供货商 2经销商
|
||||
// type: 1供货商 2供应商
|
||||
export default [{
|
||||
name: 'A设计',
|
||||
value: 'aProviderModule',
|
||||
|
|
|
|||
Loading…
Reference in New Issue