Compare commits
2 Commits
dcdd1ff532
...
cbefad6d00
| Author | SHA1 | Date |
|---|---|---|
|
|
cbefad6d00 | |
|
|
d591fd650c |
|
|
@ -30,13 +30,13 @@
|
|||
{{ data.total_count }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="最后交易时间">
|
||||
{{ data.last_time }}
|
||||
{{ data.last_time | formatDate }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="总结余">
|
||||
{{ data.total_balance }}
|
||||
{{ data.total_balance }} 元
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="总交易金额">
|
||||
{{ data.total_amount }}
|
||||
{{ data.total_amount }} 元
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">
|
||||
{{ data.status | formatStatus }}
|
||||
|
|
@ -88,6 +88,7 @@
|
|||
ref="ZkTableList"
|
||||
:ListUrl="this.BalanceLogSearch" :ListUrlData="this.zkSelectData"
|
||||
:Columns="this.columns"
|
||||
:dataId="dataId"
|
||||
:ListFieldName="this.zkSelectDataFieldName">
|
||||
</ZkTableList>
|
||||
|
||||
|
|
@ -97,6 +98,8 @@
|
|||
</template>
|
||||
<script>
|
||||
import BASE_URL from '@/services/Middle/transport/Custom/api.js';
|
||||
|
||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||
import ZkTableList from './zkTableList.vue'
|
||||
// import ZkTable from "@/components/zk/zkTable.vue";
|
||||
|
||||
|
|
@ -145,7 +148,7 @@ export default {
|
|||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
{field: 'custom_id', sortable: true, title: '客户id', width: 150}, // 客户id
|
||||
// {field: 'custom_id', sortable: true, title: '客户id', width: 150}, // 客户id
|
||||
{field: 'balance_type', sortable: true, title: '结余类型', width: 120}, // 结余类型:1增加,2减少
|
||||
|
||||
{
|
||||
|
|
@ -176,12 +179,13 @@ export default {
|
|||
},
|
||||
filters: {
|
||||
formatDate: function (value) {
|
||||
if (value) {
|
||||
// 时间戳转日期格式格式化日期时间
|
||||
return new Date(value).toLocaleString().replace(/:\d{1,2}$/, ' ');
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
if (!value) {
|
||||
return '';
|
||||
}
|
||||
if (typeof (value) == "number") {
|
||||
value = new Date(value * 1000);
|
||||
}
|
||||
return XEUtils.toDateString(value, 'yyyy-MM-dd')
|
||||
},
|
||||
// 格式化状态
|
||||
formatStatus: function (value) {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export default {
|
|||
contact_position: "",
|
||||
total_ton: 0,
|
||||
total_count: 0,
|
||||
last_time: "",
|
||||
last_time: 0,
|
||||
remark: "",
|
||||
status: 1,
|
||||
total_balance: 0,
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@
|
|||
|
||||
<!-- =============================== 表格列 自动生成 Start =============================== -->
|
||||
<template #status="{ row }"><!-- 这里是自定义列 -->
|
||||
<!-- 转换 row.status 的值 如果是true显示开,否则显示关-->
|
||||
<a-switch :checked="row.status ? true : false" @change="onSwitch(row, 'status')"/>
|
||||
{{ row.status == 1 ? '正常' : '禁用'}}
|
||||
</template>
|
||||
<!-- =============================== 表格列 自动生成 End =============================== -->
|
||||
|
||||
|
|
@ -185,7 +184,7 @@ export default {
|
|||
{field: 'contact_phone', sortable: true, title: '联系人电话', width: 150}, // 客户联系人电话
|
||||
{field: 'total_ton', sortable: true, title: '总计交易吨数', width: 150}, // 总计交易吨数
|
||||
{field: 'total_count', sortable: true, title: '总计交易次数', width: 150}, // 总计交易次数
|
||||
{field: 'last_time', sortable: true, title: '最后交易时间', width: 250}, // 最后交易时间
|
||||
{field: 'last_time', sortable: true, title: '最后交易时间',formatter: 'formatDate', width: 250}, // 最后交易时间
|
||||
{
|
||||
field: 'create_time',
|
||||
formatter: 'formatDate',
|
||||
|
|
@ -311,6 +310,7 @@ export default {
|
|||
},
|
||||
// 加载数据
|
||||
loadData({params}) {
|
||||
params.last_time = Number(params.last_time)
|
||||
params.start_time = this.start_time; // 开始时间
|
||||
params.end_time = this.end_time; // 结束时间
|
||||
return this.$mk.getPagedData({url: this.actions.getList, data: params}); // 获取分页数据
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ import UpdateMixin from "@/application/zk/mixins/UpdateComponents.js";
|
|||
export default {
|
||||
mixins: [ListMixin, DeleteMixin, DetailMixin, UpdateMixin],
|
||||
props: {
|
||||
dataId: {
|
||||
|
||||
},
|
||||
Columns: {
|
||||
type: Array
|
||||
},
|
||||
|
|
@ -128,6 +131,13 @@ export default {
|
|||
}
|
||||
)
|
||||
}
|
||||
this.ListUrlData.search_rules.push(
|
||||
{
|
||||
column: "custom_id",
|
||||
mode: "=",
|
||||
value: this.dataId
|
||||
}
|
||||
)
|
||||
this.$zk.getPagedData({
|
||||
url: this.ListUrl,
|
||||
listFieldName: this.ListFieldName,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
<vxe-toolbar ref="xToolbar" custom>
|
||||
<template #buttons>
|
||||
<a-button type="primary" icon="delete" @click="pageDelete()">批量删除</a-button>
|
||||
<a-button class="btns" @click="grantBatch()" type="primary">批量发放工资</a-button>
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
<!-- 表格区 -->
|
||||
|
|
@ -34,17 +35,19 @@
|
|||
|
||||
<!-- =============================== 表格列 自动生成 End =============================== -->
|
||||
<template #wages_status="{ row }">
|
||||
{{ row.wages_status === 0 ? '未发放' : '已发放' }}
|
||||
|
||||
|
||||
<a-tag color="orange" v-if="row.wages_status === 0">
|
||||
未发放
|
||||
</a-tag>
|
||||
<a-tag color="green" v-if="row.wages_status === 1">
|
||||
已发放
|
||||
</a-tag>
|
||||
</template>
|
||||
|
||||
<template #op="{ row }">
|
||||
<div class="oplinks">
|
||||
<a @click.stop="pageEdit(row)" title="编辑">
|
||||
<a-icon type="edit" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon type="delete" />
|
||||
</a>
|
||||
<a-button @click="grant(row)" type="primary">发放工资</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -101,28 +104,52 @@ export default {
|
|||
DriverWagesBatchUpdate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/batchUpdate`, // 批量更新司机工资
|
||||
DriverWagesBatchCreate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/batchCreate`, // 批量创建司机工资
|
||||
DriverWagesBatchHandle: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/batchHandle`, // 批量处理司机工资
|
||||
|
||||
DriverWagesPay: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/pay`
|
||||
// =============================== 接口地址 自动生成 End ===============================
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
|
||||
year:[
|
||||
{label: '2019', value: 2019},
|
||||
{label: '2020', value: 2020},
|
||||
{label: '2021', value: 2021},
|
||||
{label: '2022', value: 2022},
|
||||
{label: '2023', value: 2023},
|
||||
{label: '2024', value: 2024},
|
||||
{label: '2025', value: 2025},
|
||||
{label: '2026', value: 2026},
|
||||
{label: '2027', value: 2027},
|
||||
],
|
||||
month:[
|
||||
{label: '1月', value: 1},
|
||||
{label: '2月', value: 2},
|
||||
{label: '3月', value: 3},
|
||||
{label: '4月', value: 4},
|
||||
{label: '5月', value: 5},
|
||||
{label: '6月', value: 6},
|
||||
{label: '7月', value: 7},
|
||||
{label: '8月', value: 8},
|
||||
{label: '9月', value: 9},
|
||||
{label: '10月', value: 10},
|
||||
{label: '11月', value: 11},
|
||||
{label: '12月', value: 12},
|
||||
],
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
title: '',
|
||||
desc: '',
|
||||
wages_year: 0,
|
||||
wages_month: 0,
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "title", mode: "like" },
|
||||
{ key: "desc", mode: "like" }
|
||||
{ key: "wages_year", mode: "=" },
|
||||
{ key: "wages_month", mode: "=" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
// {field: 'title', title: '标题', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入标题'}}},
|
||||
// {field: 'desc', title: '描述', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入描述'}}},
|
||||
{field: 'wages_year', title: '年份', span: 5, itemRender: {name: '$select',props: { options: this.year }}},
|
||||
{field: 'wages_month', title: '月份', span: 5, itemRender: {name: '$select',props: { options: this.month }}},
|
||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
|
|
@ -181,19 +208,19 @@ export default {
|
|||
|
||||
|
||||
{ field: 'wages_year', sortable: true, title: '年份', width: 80 }, // 工资年份
|
||||
{ field: 'wages_month', sortable: true, title: '月份', width: 80 }, // 工资月份
|
||||
{ field: 'code', sortable: true, title: '工资单号', width: 120 }, // 编码
|
||||
{ field: 'wages_month', sortable: true, title: '月份', width: 70 }, // 工资月份
|
||||
{ field: 'code', sortable: true, title: '工资单号', width: 100 }, // 编码
|
||||
{ field: 'staff_name', sortable: true, title: '司机姓名', width: 120 }, // 员工姓名
|
||||
{ field: 'staff_code', sortable: true, title: '司机编号', width: 120 }, // 员工编号
|
||||
{ field: 'staff_phone', sortable: true, title: '司机手机', width: 120 }, // 员工手机号
|
||||
{ field: 'wages_date', sortable: true, title: '工资日期', formatter: 'formatDate', width: 120 }, // 工资日期
|
||||
// { field: 'staff_phone', sortable: true, title: '司机手机', width: 120 }, // 员工手机号
|
||||
{ field: 'wages_type', sortable: true, title: '类型', width: 100 }, // 工资类型
|
||||
{ field: 'wages_amount', sortable: true, title: '金额', width: 100 }, // 工资金额
|
||||
{ field: 'wages_balance', sortable: true, title: '帐户结余', width: 120 }, // 工资结余
|
||||
{
|
||||
field: 'wages_status', sortable: true, title: '状态', width: 120,
|
||||
slots: { default: 'wages_status' }
|
||||
}, // 工资状态
|
||||
{ field: 'wages_date', sortable: true, title: '日期', formatter: 'formatDate', width: 120 }, // 工资日期
|
||||
// { field: 'wages_balance', sortable: true, title: '帐户结余', width: 120 }, // 工资结余
|
||||
{ field: 'wages_remark', sortable: true, title: '备注', width: 250 }, // 工资备注
|
||||
|
||||
|
||||
|
|
@ -346,7 +373,60 @@ export default {
|
|||
this.$refs.xGrid.commitProxy('query') // 提交搜索
|
||||
},
|
||||
|
||||
// 发放工资
|
||||
grant(row){
|
||||
console.log("row",row);
|
||||
let ids = [row.id]; // 定义id数组
|
||||
this.$mk.confirm('您确定要发放吗?').then(type => { // 确认删除
|
||||
if (type == 'confirm') { // 如果确认删除
|
||||
this.$mk.post({
|
||||
url: this.actions.DriverWagesPay, // 请求发放工资数据地址
|
||||
loading: "发放中...", // 加载提示
|
||||
data: {
|
||||
ids: ids // 传递id数组
|
||||
},
|
||||
useBigInt: true
|
||||
}).then(() => { // 成功
|
||||
this.$mk.success("发放成功"); // 提示成功
|
||||
this.onSearch(); // 重新加载数据
|
||||
}).catch((a) => { // 失败
|
||||
this.$mk.error(a.data.msg); // 提示错误信息
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 批量发放工资
|
||||
grantBatch(){
|
||||
let rows = this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
||||
let ids = []; // 定义id数组
|
||||
rows.forEach((row) => { // 遍历选中行
|
||||
ids.push(row[this.keyName]); // 将选择行的id添加到id数组
|
||||
});
|
||||
|
||||
if (!ids.length) { // 如果没有选中行
|
||||
this.$mk.error("请选择行"); // 提示
|
||||
return;
|
||||
}
|
||||
|
||||
this.$mk.confirm('您确定要发放吗?').then(type => { // 确认删除
|
||||
if (type == 'confirm') { // 如果确认删除
|
||||
this.$mk.post({
|
||||
url: this.actions.DriverWagesPay, // 请求发放工资数据地址
|
||||
loading: "发放中...", // 加载提示
|
||||
data: {
|
||||
ids: ids // 传递id数组
|
||||
},
|
||||
useBigInt: true
|
||||
}).then(() => { // 成功
|
||||
this.$mk.success("发放成功"); // 提示成功
|
||||
this.onSearch(); // 重新加载数据
|
||||
}).catch((a) => { // 失败
|
||||
this.$mk.error(a.data.msg); // 提示错误信息
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 监听属性
|
||||
watch: {}
|
||||
|
|
@ -362,6 +442,9 @@ export default {
|
|||
.gridPanel {
|
||||
height: calc(100vh - 400px);
|
||||
}
|
||||
.btns{
|
||||
margin-left:10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,14 @@
|
|||
<!-- </div>-->
|
||||
<a-descriptions size="small" :title="pageOptions.title" bordered>
|
||||
<a-descriptions-item label="员工姓名">
|
||||
{{ data.staff_detail.name }}
|
||||
|
||||
{{ staff_detail.name }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="员工工号">
|
||||
{{ data.staff_detail.code }}
|
||||
{{ staff_detail.code }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="员工电话">
|
||||
{{ data.staff_detail.phone }}
|
||||
{{ staff_detail.phone }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="运输总公里数">
|
||||
{{ data.transport_mileage }}
|
||||
|
|
@ -40,13 +41,18 @@
|
|||
</li>
|
||||
<li>
|
||||
|
||||
<div class="btns">
|
||||
<div class="btns" style="z-index:99999;">
|
||||
<!-- 增加结余按钮 -->
|
||||
<a-popconfirm title="是否增加结余?" ok-text="确认" cancel-text="取消" @confirm="addBalance" @cancel="cancel">
|
||||
<a-popconfirm title="是否增加结余?" ok-text="确认" cancel-text="取消" @confirm="addBalance" @cancel="cancel"
|
||||
autoAdjustOverflow="true"
|
||||
>
|
||||
<a-button class="btn-add-balance" type="primary">增加结余</a-button>
|
||||
</a-popconfirm>
|
||||
<!-- 减少结余按钮 -->
|
||||
<a-popconfirm title="是否减少结余?" ok-text="确认" cancel-text="取消" @confirm="reduceBalance" @cancel="cancel">
|
||||
<a-popconfirm title="是否减少结余?" ok-text="确认" cancel-text="取消" @confirm="reduceBalance" @cancel="cancel"
|
||||
|
||||
autoAdjustOverflow="true"
|
||||
>
|
||||
<a-button class="btn-reduce-balance" type="danger"> 减少结余</a-button>
|
||||
</a-popconfirm>
|
||||
|
||||
|
|
@ -57,11 +63,11 @@
|
|||
<!-- 结余日志列表 -->
|
||||
<div class="balance-log">
|
||||
<h2>
|
||||
结余日志
|
||||
结余日志
|
||||
</h2>
|
||||
|
||||
<ZkTableList ref="ZkTableList" :ListUrl="this.DriverWagesGiornaleLogSearch" :ListUrlData="this.zkSelectData"
|
||||
:Columns="this.columns" :ListFieldName="this.zkSelectDataFieldName">
|
||||
:Columns="this.columns" :ListFieldName="this.zkSelectDataFieldName" :dataId="dataId">
|
||||
</ZkTableList>
|
||||
|
||||
</div>
|
||||
|
|
@ -69,7 +75,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BASE_URL from '@/services/Middle/transport/Custom/api.js';
|
||||
import BASE_URL from '@/services/Middle/transport/DriverWages/api.js';
|
||||
import ZkTableList from './zkTableList.vue'
|
||||
// import ZkTable from "@/components/zk/zkTable.vue";
|
||||
|
||||
|
|
@ -123,7 +129,7 @@ export default {
|
|||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
{ type: 'checkbox', width: 50 }, // 多选框
|
||||
// { type: 'checkbox', width: 50 }, // 多选框
|
||||
{ type: 'seq', width: 30 }, // 序号
|
||||
|
||||
|
||||
|
|
@ -131,18 +137,18 @@ export default {
|
|||
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 120 }, // 编码
|
||||
{ field: 'staff_uid', sortable: true, title: '员工uid', width: 250 }, // 员工uid
|
||||
{ field: 'balance_type', sortable: true, title: '结余类型', width: 250 }, // 结余类型:1增加,2减少
|
||||
{ field: 'balance_amount', sortable: true, title: '修改金额', width: 250 }, // 修改金额
|
||||
{ field: 'total_balance', sortable: true, title: '总结余金额', width: 250 }, // 总结余金额
|
||||
{ field: 'remark', sortable: true, title: '备注', width: 250 }, // 备注
|
||||
// { field: 'staff_uid', sortable: true, title: '员工uid', width: 250 }, // 员工uid
|
||||
{ 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 }, // 总结余金额
|
||||
{ field: 'remark', sortable: true, title: '备注', width: "auto" }, // 备注
|
||||
|
||||
{
|
||||
field: 'create_time',
|
||||
formatter: 'formatDate',
|
||||
width: 100,
|
||||
formatter: 'formatDateTime',
|
||||
width: 160,
|
||||
sortable: true,
|
||||
title: '创建时间',
|
||||
title: '时间',
|
||||
showHeaderOverflow: true
|
||||
}, // 创建时间
|
||||
|
||||
|
|
@ -157,6 +163,8 @@ export default {
|
|||
data: {
|
||||
|
||||
},
|
||||
staff_detail: {
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -188,9 +196,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
initDetailData() {
|
||||
console.log("this.pageOptions.FieldName:", this.pageOptions.FieldName)
|
||||
console.log("this.pageOptions.ApiUrl:", this.pageOptions.ApiUrl);
|
||||
console.log("this.pageOptions.ApiData:", this.pageOptions.ApiData);
|
||||
// console.log("this.pageOptions.FieldName:", this.pageOptions.FieldName)
|
||||
// console.log("this.pageOptions.ApiUrl:", this.pageOptions.ApiUrl);
|
||||
// console.log("this.pageOptions.ApiData:", this.pageOptions.ApiData);
|
||||
|
||||
// this.dataId 转换为bigint
|
||||
// 如果this.dataId是对象,则需要转换为数字
|
||||
|
|
@ -211,6 +219,7 @@ export default {
|
|||
console.log("a", a)
|
||||
console.log("this.pageOptions.ApiUrl", this.pageOptions.ApiUrl)
|
||||
this.data = a.data[this.pageOptions.FieldName];
|
||||
this.staff_detail = a.data[this.pageOptions.FieldName].staff_detail;
|
||||
}).catch((a) => {
|
||||
this.$mk.error(a.msg, "aaa");
|
||||
});
|
||||
|
|
@ -238,7 +247,7 @@ export default {
|
|||
this.$zk.post({
|
||||
url: this.DriverWagesSurplusAdd,
|
||||
data: {
|
||||
staff_uid: this.pageOptions.ApiData.id,
|
||||
staff_uid: this.staff_detail.id,
|
||||
add_balance: this.amount,
|
||||
remark: this.remark
|
||||
},
|
||||
|
|
@ -278,7 +287,7 @@ export default {
|
|||
url: this.DriverWagesSurplusReduce,
|
||||
data: {
|
||||
|
||||
staff_uid: this.pageOptions.ApiData.id,
|
||||
staff_uid: this.staff_detail.id,
|
||||
reduce_balance: this.amount,
|
||||
remark: this.remark
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
|
||||
<vxe-toolbar ref="xToolbar" custom>
|
||||
<!-- <template #buttons>
|
||||
<template #buttons>
|
||||
<a-button type="primary" icon="delete" @click="pageDelete()">批量删除</a-button>
|
||||
</template> -->
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
<!-- 表格区 -->
|
||||
<div class="gridPanel">
|
||||
|
|
@ -48,12 +48,6 @@
|
|||
<a @click.stop="pageDetail(row)" title="详情">
|
||||
<a-icon type="file"/>
|
||||
</a>
|
||||
<a @click.stop="pageEdit(row)" title="编辑">
|
||||
<a-icon type="edit" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -209,20 +203,13 @@ export default {
|
|||
showHeaderOverflow: true
|
||||
}, // 状态
|
||||
|
||||
{
|
||||
field: 'create_time',
|
||||
formatter: 'formatDate',
|
||||
width: 100,
|
||||
sortable: true,
|
||||
title: '创建时间',
|
||||
showHeaderOverflow: true
|
||||
}, // 创建时间
|
||||
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 150, fixed: 'right' }
|
||||
{ title: '详情', slots: { default: 'op' }, width: 150, fixed: 'right' }
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -421,7 +408,9 @@ export default {
|
|||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {}
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<vxe-grid ref='xGrid' v-bind="gridOptions" @form-submit="initListData" @page-change="handlePageChange">
|
||||
<!-- 工具栏 -->
|
||||
<template #toolbar_buttons>
|
||||
|
|
@ -10,16 +11,17 @@
|
|||
<a-empty/>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ListMixin from "@/application/zk/mixins/ListComponents.js";
|
||||
import DeleteMixin from "@/application/zk/mixins/DeleteComponents.js";
|
||||
import DetailMixin from "@/application/zk/mixins/DetailComponents.js";
|
||||
import UpdateMixin from "@/application/zk/mixins/UpdateComponents.js";
|
||||
|
||||
|
||||
export default {
|
||||
mixins: [ListMixin, DeleteMixin, DetailMixin, UpdateMixin],
|
||||
mixins: [ListMixin,],
|
||||
props: {
|
||||
dataId: {
|
||||
},
|
||||
Columns: {
|
||||
type: Array
|
||||
},
|
||||
|
|
@ -104,6 +106,8 @@ export default {
|
|||
|
||||
// 初始化列表数据
|
||||
initListData() {
|
||||
console.log("dataId :" ,this.dataId);
|
||||
|
||||
this.ListUrlData.order_bys = []
|
||||
this.ListUrlData.order_bys.push({
|
||||
column: "create_time",
|
||||
|
|
@ -128,6 +132,13 @@ export default {
|
|||
}
|
||||
)
|
||||
}
|
||||
this.ListUrlData.search_rules.push(
|
||||
{
|
||||
column: "staff_uid",
|
||||
mode: "=",
|
||||
value: this.dataId
|
||||
}
|
||||
)
|
||||
this.$zk.getPagedData({
|
||||
url: this.ListUrl,
|
||||
listFieldName: this.ListFieldName,
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{ field: 'maintenance_date', dataRule: { type: 'timestamp' }, title: '维修日期', span: 6, itemRender: { name: '$input', props: { type: "date" } } },
|
||||
{
|
||||
field: 'maintenance_price', title: '维修金额', span: 6, itemRender: {
|
||||
|
|
|
|||
|
|
@ -165,27 +165,18 @@ export default {
|
|||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
{field: 'truck_number_id', sortable: true, title: '车次id', width: 120}, // 车次id
|
||||
{field: 'truck_number_code', sortable: true, title: '车次单号', width: 120}, // 车次单号
|
||||
{field: 'truck_code', sortable: true, title: '车辆编码', width: 120}, // 车辆编码
|
||||
{field: 'truck_name', sortable: true, title: '车辆名称', width: 120}, // 车辆名称
|
||||
{field: 'truck_number', sortable: true, title: '车牌号', width: 120}, // 车牌号
|
||||
{field: 'oil_consumption_number', sortable: true, title: '油耗数量', width: 250}, // 油耗数量
|
||||
{field: 'oil_consumption_price', sortable: true, title: '油耗单价', width: 250}, // 油耗单价
|
||||
{field: 'oil_consumption_total_price', sortable: true, title: '油耗总价', width: 250}, // 油耗总价
|
||||
{field: 'oil_consumption_date', sortable: true, title: '油耗日期', width: 120}, // 油耗日期
|
||||
{field: 'oil_consumption_hundred', sortable: true, title: '百公里油耗', width: 250}, // 百公里油耗
|
||||
{field: 'truck_number', sortable: true, title: '车牌号', width: 90}, // 车牌号
|
||||
{field: 'oil_consumption_number', sortable: true, title: '油耗数量(升)', width: 130}, // 油耗数量
|
||||
{field: 'oil_consumption_price', sortable: true, title: '油耗单价(元)', width: 130}, // 油耗单价
|
||||
{field: 'oil_consumption_total_price', sortable: true, title: '油耗总价(元)', width: 130}, // 油耗总价
|
||||
{field: 'oil_consumption_date', sortable: true, title: '油耗日期',
|
||||
formatter: 'formatDate', width: 120}, // 油耗日期
|
||||
{field: 'oil_consumption_hundred', sortable: true, title: '百公里油耗(升)', width: 140}, // 百公里油耗
|
||||
{field: 'oil_consumption_remark', sortable: true, title: '油耗备注', width: 250}, // 油耗备注
|
||||
|
||||
{
|
||||
field: 'create_time',
|
||||
formatter: 'formatDate',
|
||||
width: 100,
|
||||
sortable: true,
|
||||
title: '创建时间',
|
||||
showHeaderOverflow: true
|
||||
}, // 创建时间
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -181,15 +181,6 @@ export default {
|
|||
{field: 'code', sortable: true, title: '编码', width: 150}, // 编码
|
||||
{field: 'name', sortable: true, title: '品名', width: 150}, // 品名
|
||||
{field: 'description', title: '描述', width: 250}, // 描述
|
||||
{ title: '图片', slots: { default: 'image' }, width: 120 },
|
||||
{
|
||||
field: 'create_time',
|
||||
formatter: 'formatDate',
|
||||
width: 250,
|
||||
sortable: true,
|
||||
title: '创建时间',
|
||||
showHeaderOverflow: true
|
||||
}, // 创建时间
|
||||
{field: 'remark', title: '备注', minWidth: 200}, // 备注
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ export default {
|
|||
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
current_distance:0,
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
|
|
@ -392,6 +393,7 @@ export default {
|
|||
onDataChanged: ({value,data}) => {
|
||||
console.log(value,data)
|
||||
this.formOptions.data.truck_id = data.id;
|
||||
this.current_distance = data.current_distance
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
<a-col :flex="$mk.config.ui.searchFlex">
|
||||
<!-- 搜索区 -->
|
||||
<vxe-form :data="searchFormData" :items="searchFormItems" titleColon @submit="onSearch">
|
||||
<template #date="{}">
|
||||
<template #date="{ }">
|
||||
<a-form-item label="创建时间" :style="{ display: 'inline-block', width: 120 }">
|
||||
</a-form-item>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(100% - 120px )' }">
|
||||
<a-range-picker @change="onDateChange"/>
|
||||
<a-range-picker @change="onDateChange" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</vxe-form>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<!-- =============================== 表格列 自动生成 Start =============================== -->
|
||||
<template #truck_id="{ row }">
|
||||
{{ row.truck_name }}
|
||||
{{ row.truck_name }}
|
||||
</template>
|
||||
<template #driver_id="{ row }">
|
||||
{{ row.driver_name }}
|
||||
|
|
@ -80,10 +80,10 @@
|
|||
<a-icon type="file"/>
|
||||
</a>
|
||||
<a @click.stop="pageEdit(row)" title="编辑">
|
||||
<a-icon type="edit"/>
|
||||
<a-icon type="edit" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon type="delete"/>
|
||||
<a-icon type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -141,8 +141,8 @@ export default {
|
|||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{key: "title", mode: "like"},
|
||||
{key: "desc", mode: "like"}
|
||||
{ key: "title", mode: "like" },
|
||||
{ key: "desc", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
|
|
@ -150,14 +150,14 @@ export default {
|
|||
field: 'code',
|
||||
title: '车次单号',
|
||||
span: 5,
|
||||
itemRender: {name: '$input', props: {placeholder: '请输入车次单号'}}
|
||||
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: { // 按钮列
|
||||
name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, // 搜索按钮
|
||||
{props: {type: 'reset', content: '重置'}}]
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
@ -181,7 +181,7 @@ export default {
|
|||
ajax: {
|
||||
// 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发
|
||||
query: (options) => { // options 为当前表格的配置项
|
||||
const {page, sorts} = options; // 获取当前页码、每页条数、排序信息
|
||||
const { page, sorts } = options; // 获取当前页码、每页条数、排序信息
|
||||
var params = {}; // 定义请求参数
|
||||
params.page = page.currentPage; // 当前页码
|
||||
params.limit = page.pageSize; // 每页条数
|
||||
|
|
@ -195,7 +195,7 @@ export default {
|
|||
})
|
||||
});
|
||||
}
|
||||
return this.loadData({params}); // 返回请求结果
|
||||
return this.loadData({ params }); // 返回请求结果
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -203,44 +203,50 @@ export default {
|
|||
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{type: 'checkbox', width: 50}, // 多选框
|
||||
{type: 'seq', width: 40}, // 序号
|
||||
{ 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: '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: '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: 'supplier_name', align: 'center', sortable: true, title: '供应商名称', width: 200 }, // 客户名称
|
||||
// {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: 'warehousing_soil_quality_material_id', sortable: true, title: '入库物料土质id', width: 250}, // 入库物料土质id
|
||||
|
||||
// {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,
|
||||
slots: {default: 'is_outsourcing'}
|
||||
}, // 是否委外
|
||||
// {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_change_tire', align: 'center',sortable: true, title: '更换轮胎', width: 100,
|
||||
slots: {default: 'is_change_tire'}
|
||||
}, // 是否更换轮胎
|
||||
{field: 'is_repair', align: 'center',sortable: true, title: '维修', width: 70,
|
||||
slots: {default: 'is_repair'}
|
||||
}, // 是否维修
|
||||
{field: 'is_oil',align: 'center', sortable: true, title: '加油', width: 70,
|
||||
slots: {default: 'is_oil'}
|
||||
}, // 是否加油
|
||||
field: 'is_outsourcing', align: 'center', sortable: true, title: '类型', width: 80,
|
||||
slots: { default: 'is_outsourcing' }
|
||||
}, // 是否委外
|
||||
// {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_change_tire', align: 'center',sortable: true, title: '更换轮胎', width: 100,
|
||||
// slots: {default: 'is_change_tire'}
|
||||
// }, // 是否更换轮胎
|
||||
// {field: 'is_repair', align: 'center',sortable: true, title: '维修', width: 70,
|
||||
// slots: {default: 'is_repair'}
|
||||
// }, // 是否维修
|
||||
{
|
||||
field: 'is_oil', align: 'center', sortable: true, title: '加油', width: 70,
|
||||
slots: { default: 'is_oil' }
|
||||
}, // 是否加油
|
||||
|
||||
// {
|
||||
// field: 'create_time',
|
||||
|
|
@ -251,8 +257,8 @@ export default {
|
|||
// showHeaderOverflow: true
|
||||
// }, // 创建时间
|
||||
|
||||
{field: 'outbound_mileage', align: 'center',sortable: true, title: '出车公里数', width: 120}, // 出车公里数
|
||||
{field: 'outbound_remark', align: 'center',sortable: true, title: '出车备注', width: 250}, // 出车备注
|
||||
{ field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, // 出车公里数
|
||||
{ field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 250 }, // 出车备注
|
||||
{
|
||||
field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right',
|
||||
align: 'center',
|
||||
|
|
@ -356,10 +362,10 @@ export default {
|
|||
return row; // 返回选中行
|
||||
},
|
||||
// 加载数据
|
||||
loadData({params}) {
|
||||
loadData({ params }) {
|
||||
params.start_time = this.start_time; // 开始时间
|
||||
params.end_time = this.end_time; // 结束时间
|
||||
return this.$mk.getPagedData({url: this.actions.getList, data: params}); // 获取分页数据
|
||||
return this.$mk.getPagedData({ url: this.actions.getList, data: params }); // 获取分页数据
|
||||
},
|
||||
|
||||
// 工具栏点击事件 add / log / setting
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
<a-descriptions-item label="出车次数">
|
||||
{{ data.out_count }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="当前车辆公里数">
|
||||
{{ data.current_distance }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="出车总公里数">
|
||||
{{ data.out_distance }}
|
||||
</a-descriptions-item>
|
||||
|
|
|
|||
|
|
@ -81,18 +81,18 @@ export default {
|
|||
{type: 'checkbox', width: 42},
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
{field: 'name', sortable: true, title: '名称', width: 120}, // 名称
|
||||
{field: 'code', sortable: true, title: '编码', width: 120}, // 编码
|
||||
{field: 'code', sortable: true, title: '编码', width: 80}, // 编码
|
||||
{field: 'plate_number', sortable: true, title: '车牌号', width: 120}, // 车牌号
|
||||
{field: 'type', sortable: true, title: '车辆类型', width: 120}, // 车辆类型
|
||||
{field: 'current_distance', sortable: true, title: '当前公里数', width: 150}, // 当前公里数
|
||||
{field: 'manager_name', sortable: true, title: '负责人姓名', width: 120}, // 负责人姓名
|
||||
{field: 'manager_phone', sortable: true, title: '负责人电话', width: 150}, // 负责人电话
|
||||
{field: 'out_count', sortable: true, title: '出车次数', width: 120}, // 出车次数
|
||||
{field: 'out_distance', sortable: true, title: '出车总公里数', width: 150}, // 出车总公里数
|
||||
{field: 'type', sortable: true, title: '车辆类型', width: 100}, // 车辆类型
|
||||
{field: 'current_distance', sortable: true, title: '当前公里数', width: 120}, // 当前公里数
|
||||
{field: 'out_count', sortable: true, title: '出车次数', width: 100}, // 出车次数
|
||||
{field: 'out_distance', sortable: true, title: '出车总公里数', width: 130}, // 出车总公里数
|
||||
{field: 'repair_count', sortable: true, title: '维修次数', width: 100}, // 维修次数
|
||||
{field: 'change_tyre_count', sortable: true, title: '更换轮胎次数', width: 130}, // 更换轮胎次数
|
||||
{field: 'add_oil_count', sortable: true, title: '加油次数', width: 100}, // 加油次数
|
||||
{field: 'add_oil_litre', sortable: true, title: '加油总升数', width: 120}, // 加油总升数
|
||||
{field: 'manager_name', sortable: true, title: '负责人姓名', width: 120}, // 负责人姓名
|
||||
{field: 'manager_phone', sortable: true, title: '负责人电话', width: 120}, // 负责人电话
|
||||
{field: 'remark', sortable: true, title: '车辆备注', minWidth: 250}, // 车辆备注
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
{title: '操作', fixed: 'right', slots: {default: 'op'}, width: 140}
|
||||
|
|
|
|||
Loading…
Reference in New Issue