This commit is contained in:
ljx 2024-03-20 17:21:18 +08:00
parent 1204d024a6
commit a5db38b3c8
4 changed files with 58 additions and 48 deletions

View File

@ -103,19 +103,21 @@ export default {
// //
searchFormData: { searchFormData: {
title: '', type:'',
desc: '', status:''
}, },
// //
searchRules: [ searchRules: [
{key: "title", mode: "like"}, {key: "code", mode: "like"},
{key: "desc", mode: "like"} {key: "name", mode: "like"}
], ],
// //
searchFormItems: [ // searchFormItems: [ //
{field: 'title', title: '标题', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入标题'}}}, {field: 'code', title: '编码', span: 4, itemRender: {name: '$input', props: {placeholder: '请输入编码'}}},
{field: 'desc', title: '描述', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入描述'}}}, {field: 'name', title: '名称', span: 4, itemRender: {name: '$input', props: {placeholder: '请输入名称'}}},
{span: 8, slots: {default: 'date'}}, // {field: 'type', title: '类型', span: 3, itemRender: { name: '$select', props: {options:[{value:'',label:"====全部===="},{value:"0",label:"客户"},{value:"1",label:"供应商"}] } }},
{field: 'status', title: '状态', span: 3, itemRender: { name: '$select', props: {options:[{value:'',label:"====全部===="},{value:"0",label:"禁用"},{value:"1",label:"启用"}] } }},
{span: 6, slots: {default: 'date'}}, //
{ {
align: 'right', span: 4, itemRender: { // align: 'right', span: 4, itemRender: { //
name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, // name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, //
@ -172,15 +174,25 @@ export default {
// =============================== Start =============================== // =============================== Start ===============================
{field: 'code', sortable: true, title: '编码', width: 250}, // {field: 'code', sortable: true, title: '编码', width: 150}, //
{field: 'name', sortable: true, title: '名称', width: 250}, // {field: 'name', title: '名称', width: 150}, //
{field: 'type', sortable: true, title: '客户类型', width: 150}, // {field: 'type', sortable: true, title: '类型',formatter: this.formatType, width: 150}, //
{field: 'industry', sortable: true, title: '客户行业', width: 150}, // {field: 'industry', sortable: true, title: '行业', width: 150}, //
{field: 'contact', sortable: true, title: '客户联系人', width: 250}, // {field: 'contact', title: '联系人', width: 150}, //
{field: 'contact_phone', sortable: true, title: '客户联系人电话', width: 250}, // {field: 'contact_phone', sortable: true, title: '联系人电话', width: 150}, //
{field: 'total_ton', sortable: true, title: '总计交易吨数', width: 250}, // {field: 'total_ton', sortable: true, title: '总计交易吨数', width: 150}, //
{field: 'total_count', sortable: true, title: '总计交易次数', width: 250}, // {field: 'total_count', sortable: true, title: '总计交易次数', width: 150}, //
{field: 'last_time', sortable: true, title: '最后交易时间', width: 250}, // {field: 'last_time', sortable: true, title: '最后交易时间', width: 250}, //
{
field: 'create_time',
formatter: 'formatDate',
width: 250,
sortable: true,
title: '创建时间',
showHeaderOverflow: true
}, //
{field: 'total_balance', sortable: true, title: '总结余', width: 150}, //
{field: 'total_amount', sortable: true, title: '总交易金额', width: 150}, //
{field: 'remark', sortable: true, title: '备注', width: 250}, // {field: 'remark', sortable: true, title: '备注', width: 250}, //
{ {
field: 'status', field: 'status',
@ -191,17 +203,6 @@ export default {
showHeaderOverflow: true showHeaderOverflow: true
}, // }, //
{
field: 'create_time',
formatter: 'formatDate',
width: 100,
sortable: true,
title: '创建时间',
showHeaderOverflow: true
}, //
{field: 'total_balance', sortable: true, title: '总结余', width: 250}, //
{field: 'total_amount', sortable: true, title: '总交易金额', width: 250}, //
// =============================== Start =============================== // =============================== Start ===============================
@ -360,7 +361,14 @@ export default {
} }
}); });
}, },
formatType({ cellValue }) { //
if (cellValue && (cellValue.toLowerCase() == '0')) {
return '客户';
}
if (cellValue && (cellValue.toLowerCase() == '1')) {
return '经销商';
}
},
// //
onSearch() { onSearch() {
this.$refs.xGrid.commitProxy('query') // this.$refs.xGrid.commitProxy('query') //

View File

@ -44,7 +44,10 @@
</a> </a>
</div> </div>
</template> </template>
<template #image="{ row }">
<img v-if="row.image" :src="row.image" style="width:60px;height: 60px;"
@click.stop="$hevueImgPreview(row.image)">
</template>
</vxe-grid> </vxe-grid>
</div> </div>
@ -175,21 +178,19 @@ export default {
// =============================== Start =============================== // =============================== Start ===============================
{field: 'code', sortable: true, title: '编码', width: 250}, // {field: 'code', sortable: true, title: '编码', width: 150}, //
{field: 'name', sortable: true, title: '品名', width: 250}, // {field: 'name', sortable: true, title: '品名', width: 150}, //
{field: 'description', sortable: true, title: '描述', width: 250}, // {field: 'description', title: '描述', width: 250}, //
{field: 'image', sortable: true, title: '图片', width: 250}, // { title: '图片', slots: { default: 'image' }, width: 120 },
{field: 'remark', sortable: true, title: '备注', width: 250}, //
{ {
field: 'create_time', field: 'create_time',
formatter: 'formatDate', formatter: 'formatDate',
width: 100, width: 250,
sortable: true, sortable: true,
title: '创建时间', title: '创建时间',
showHeaderOverflow: true showHeaderOverflow: true
}, // }, //
{field: 'remark', title: '备注', minWidth: 200}, //
// =============================== Start =============================== // =============================== Start ===============================

View File

@ -103,8 +103,8 @@ export default {
], ],
// //
searchFormItems: [ // searchFormItems: [ //
{field: 'title', title: '标题', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入标题'}}}, {field: 'code', title: '车次单号', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入车次单号'}}},
{field: 'desc', title: '描述', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入描述'}}}, // {field: 'desc', title: '', span: 5, itemRender: {name: '$input', props: {placeholder: ''}}},
{span: 8, slots: {default: 'date'}}, // {span: 8, slots: {default: 'date'}}, //
{ {
align: 'right', span: 4, itemRender: { // align: 'right', span: 4, itemRender: { //
@ -156,30 +156,31 @@ export default {
// //
columns: [ columns: [
{type: 'checkbox', width: 50}, // {type: 'checkbox', width: 50}, //
{type: 'seq', width: 30}, // {type: 'seq', width: 40}, //
// =============================== Start =============================== // =============================== Start ===============================
{field: 'code', sortable: true, title: '车次单号', width: 250}, // {field: 'code', sortable: true, title: '车次单号', width: 250}, //
{field: 'custom_id', sortable: true, title: '客户id', width: 250}, // id // {field: 'custom_id', sortable: true, title: 'id', width: 250}, // id
{field: 'custom_name', sortable: true, title: '客户名称', width: 250}, // {field: 'custom_name', sortable: true, title: '客户名称', width: 250}, //
{field: 'supplier_id', sortable: true, title: '供应商id', width: 250}, // id // {field: 'supplier_id', sortable: true, title: 'id', width: 250}, // id
{field: 'supplier_name', sortable: true, title: '客户名称', width: 250}, // {field: 'supplier_name', sortable: true, title: '供应商名称', width: 250}, //
{field: 'soil_quality_material_id', sortable: true, title: '物料品名id', width: 250}, // id // {field: 'soil_quality_material_id', sortable: true, title: 'id', width: 250}, // id
{field: 'outbound_soil_quality_material_id', sortable: true, title: '出库物料土质id', width: 250}, // id // {field: 'outbound_soil_quality_material_id', sortable: true, title: 'id', width: 250}, // id
{field: 'warehousing_soil_quality_material_id', sortable: true, title: '入库物料土质id', width: 250}, // id // {field: 'warehousing_soil_quality_material_id', sortable: true, title: 'id', width: 250}, // id
{field: 'outbound_remark', sortable: true, title: '出车备注', width: 250}, //
{field: 'is_outsourcing', sortable: true, title: '是否委外', width: 250}, // {field: 'is_outsourcing', sortable: true, title: '是否委外', width: 250}, //
{field: 'outsourcing_truck_number', sortable: true, title: '委外车牌号', width: 250}, // {field: 'outsourcing_truck_number', sortable: true, title: '委外车牌号', width: 250}, //
{field: 'outsourcing_driver_name', sortable: true, title: '委外司机姓名', width: 250}, // {field: 'outsourcing_driver_name', sortable: true, title: '委外司机姓名', width: 250}, //
{field: 'outsourcing_driver_phone', sortable: true, title: '委外司机手机号', width: 250}, // {field: 'outsourcing_driver_phone', sortable: true, title: '委外司机手机号', width: 250}, //
{field: 'is_need_outbound', sortable: true, title: '是否需要出车', width: 250}, // {field: 'is_need_outbound', sortable: true, title: '是否需要出车', width: 250}, //
{field: 'truck_id', sortable: true, title: '车辆id', width: 250}, // id {field: 'truck_id', sortable: true, title: '车辆', width: 250}, // id
{field: 'driver_id', sortable: true, title: '司机id', width: 250}, // id {field: 'driver_id', sortable: true, title: '司机id', width: 250}, // id
{field: 'outbound_date', sortable: true, title: '出车日期', width: 250}, // {field: 'outbound_date', sortable: true, title: '出车日期', width: 250}, //
{field: 'return_date', sortable: true, title: '回车日期', width: 250}, // {field: 'return_date', sortable: true, title: '回车日期', width: 250}, //
{field: 'outbound_remark', sortable: true, title: '出车备注', width: 250}, //
{field: 'end_mileage', sortable: true, title: '结束公里数', width: 250}, // {field: 'end_mileage', sortable: true, title: '结束公里数', width: 250}, //
{field: 'driver_subsidy_remark', sortable: true, title: '司机补贴备注', width: 250}, // {field: 'driver_subsidy_remark', sortable: true, title: '司机补贴备注', width: 250}, //
{field: 'is_change_tire', sortable: true, title: '是否更换轮胎', width: 250}, // {field: 'is_change_tire', sortable: true, title: '是否更换轮胎', width: 250}, //

View File

@ -92,7 +92,7 @@ export default {
{field: 'change_tyre_count', sortable: true, title: '更换轮胎次数', width: 130}, // {field: 'change_tyre_count', sortable: true, title: '更换轮胎次数', width: 130}, //
{field: 'add_oil_count', sortable: true, title: '加油次数', width: 100}, // {field: 'add_oil_count', sortable: true, title: '加油次数', width: 100}, //
{field: 'add_oil_litre', sortable: true, title: '加油总升数', width: 120}, // {field: 'add_oil_litre', sortable: true, title: '加油总升数', width: 120}, //
{field: 'remark', sortable: true, title: '车辆备注', width: 250}, // {field: 'remark', sortable: true, title: '车辆备注', minWidth: 250}, //
// =============================== Start =============================== // =============================== Start ===============================
{title: '操作', fixed: 'right', slots: {default: 'op'}, width: 140} {title: '操作', fixed: 'right', slots: {default: 'op'}, width: 140}
], ],