This commit is contained in:
zxx 2024-03-27 16:09:26 +08:00
parent 168015c00e
commit 21c1ea22b4
11 changed files with 783 additions and 70 deletions

View File

@ -16,7 +16,7 @@
</a-col>
<a-col :flex="$mk.config.ui.toolbarFlex">
<!-- 工具条 -->
<mk-toolbar :isShowAdd="true" @toolbarClick="toolbarClick"></mk-toolbar>
<mk-toolbar :isShowAdd="false" @toolbarClick="toolbarClick"></mk-toolbar>
</a-col>
</a-row>

View File

@ -78,17 +78,31 @@
</li>
</div>
<!-- 结余日志列表 -->
<div class="balance-log">
<h2>
结余日志
</h2>
<ZkTableList
ref="ZkTableList"
:ListUrl="this.BalanceLogSearch" :ListUrlData="this.zkSelectData"
:Columns="this.columns"
:ListFieldName="this.zkSelectDataFieldName">
</ZkTableList>
</div>
</div>
</template>
<script>
import BASE_URL from '@/services/Middle/transport/Custom/api.js';
import ZkTableList from './zkTableList.vue'
// import ZkTable from "@/components/zk/zkTable.vue";
export default {
components: {
// ZkTable
ZkTableList
},
props: {
dataId: {
@ -108,7 +122,48 @@ export default {
return {
BalanceAdd: `${BASE_URL.BASE_URL}/Custom/v1/balance/add`, //
BalanceReduce: `${BASE_URL.BASE_URL}/Custom/v1/balance/reduce`, //
BalanceReduce: `${BASE_URL.BASE_URL}/Custom/v1/balance/reduce`, // BalanceLogList: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/list`, //
BalanceLogSearch: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/search`, //
BalanceLogDetail: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/detail`, //
BalanceLogDelete: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/detele`, //
BalanceLogBatchDelete: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/batchDelete`, //
zkSelectData: {
page: 1,
end_time: 0,
start_time: 0,
search_rules: [
],
order_bys: [
],
limit: 50
},
zkSelectDataFieldName: "BalanceLog",
//
columns: [
// =============================== Start ===============================
{field: 'custom_id', sortable: true, title: '客户id', width: 150}, // id
{field: 'balance_type', sortable: true, title: '结余类型', width: 120}, // :12
{
field: 'create_time',
formatter: 'formatDate',
width: 100,
sortable: true,
title: '创建时间',
showHeaderOverflow: true
}, //
{field: 'total_balance', sortable: true, title: '结余金额', width: 100}, //
{field: 'total_amount', sortable: true, title: '总结余金额', width: 120}, //
{field: 'remark', sortable: true, title: '备注', width: 250}, //
// =============================== Start ===============================
],
amount: 0,
remark: "",
data: {
@ -212,6 +267,8 @@ export default {
this.$mk.success("增加结余成功");
//
this.initDetailData() //
//
this.$refs.ZkTableList.refresh()
}).catch((a) => {
this.$mk.error(a.msg, "aaa");
});
@ -251,6 +308,8 @@ export default {
this.$mk.success("减少结余成功");
//
this.initDetailData() //
//
this.$refs.ZkTableList.refresh()
}).catch((a) => {
this.$mk.error(a.msg, "aaa");
@ -300,4 +359,9 @@ export default {
}
}
.balance-log {
margin-top: 20px;
height:600px;
}
</style>

View File

@ -2,8 +2,8 @@
<vxe-grid ref='xGrid' v-bind="gridOptions" @form-submit="initListData" @page-change="handlePageChange">
<!-- 工具栏 -->
<template #toolbar_buttons>
<a-button @click="pageDelete()">批量删除</a-button>
<a-button type="primary" @click="Add()">新增</a-button>
<!-- <a-button @click="pageDelete()">批量删除</a-button> -->
<!-- <a-button type="primary" @click="Add()">新增</a-button> -->
</template>
<template #empty>
@ -33,22 +33,22 @@ export default {
create_time: 0
},
items: [
{
field: 'name',
title: '名称',
slots: {default: 'name_item'} //
},
{
field: 'code',
title: '编码',
slots: {default: 'code_item'} //
},
{
field: 'create_time',
title: '时间',
slots: {default: 'create_time_item'} //
},
{slots: {default: 'operate_item'}}
// {
// field: 'name',
// title: '',
// slots: {default: 'name_item'} //
// },
// {
// field: 'code',
// title: '',
// slots: {default: 'code_item'} //
// },
// {
// field: 'create_time',
// title: '',
// slots: {default: 'create_time_item'} //
// },
// {slots: {default: 'operate_item'}}
]
}
}
@ -238,7 +238,11 @@ export default {
success && this.initListData(); //
}
})
}
},
//
refresh() {
this.initListData();
},
}
}

View File

@ -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>
@ -33,14 +33,17 @@
<!-- =============================== 表格列 自动生成 Start =============================== -->
<!-- =============================== 表格列 自动生成 End =============================== -->
<template #wages_status="{ row }">
{{ row.wages_status === 0 ? '未发放' : '已发放' }}
</template>
<template #op="{ row }">
<div class="oplinks">
<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>
@ -113,18 +116,18 @@ export default {
},
//
searchRules: [
{key: "title", mode: "like"},
{key: "desc", mode: "like"}
{ key: "title", mode: "like" },
{ key: "desc", mode: "like" }
],
//
searchFormItems: [ //
// {field: 'title', 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: { //
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: '重置' } }]
}
}
],
@ -148,7 +151,7 @@ export default {
ajax: {
// queryreload
query: (options) => { // options
const {page, sorts} = options; //
const { page, sorts } = options; //
var params = {}; //
params.page = page.currentPage; //
params.limit = page.pageSize; //
@ -162,7 +165,7 @@ export default {
})
});
}
return this.loadData({params}); //
return this.loadData({ params }); //
}
}
},
@ -170,40 +173,34 @@ export default {
//
columns: [
{type: 'checkbox', width: 50}, //
{type: 'seq', width: 30}, //
{ type: 'checkbox', width: 50 }, //
{ type: 'seq', width: 30 }, //
// =============================== Start ===============================
{field: 'code', sortable: true, title: '编码', width: 120}, //
{field: 'staff_name', sortable: true, title: '员工姓名', width: 250}, //
{field: 'staff_code', sortable: true, title: '员工编号', width: 250}, //
{field: 'staff_phone', sortable: true, title: '员工手机号', width: 250}, //
{field: 'wages_date', sortable: true, title: '工资日期', width: 120}, //
{field: 'wages_year', sortable: true, title: '工资年份', width: 250}, //
{field: 'wages_month', sortable: true, title: '工资月份', width: 250}, //
{field: 'wages_type', sortable: true, title: '工资类型', width: 250}, //
{field: 'wages_amount', sortable: true, title: '工资金额', width: 250}, //
{field: 'wages_balance', sortable: true, title: '工资结余', width: 250}, //
{field: 'wages_remark', sortable: true, title: '工资备注', width: 250}, //
{field: 'wages_status', sortable: true, title: '工资状态', width: 250}, //
{ field: 'wages_year', sortable: true, title: '年份', width: 80 }, //
{ field: 'wages_month', sortable: true, title: '月份', width: 80 }, //
{ field: 'code', sortable: true, title: '工资单号', width: 120 }, //
{ 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: 'wages_type', sortable: true, title: '类型', width: 100 }, //
{ field: 'wages_amount', sortable: true, title: '金额', width: 100 }, //
{ field: 'wages_balance', sortable: true, title: '帐户结余', width: 120 }, //
{
field: 'create_time',
formatter: 'formatDate',
width: 100,
sortable: true,
title: '创建时间',
showHeaderOverflow: true
}, //
field: 'wages_status', sortable: true, title: '状态', width: 120,
slots: { default: 'wages_status' }
}, //
{ field: 'wages_remark', sortable: true, title: '备注', width: 250 }, //
// =============================== Start ===============================
{title: '操作', slots: {default: 'op'}, width: 120,fixed: 'right'}
{ title: '操作', slots: { default: 'op' }, width: 120, fixed: 'right' }
]
}
@ -290,10 +287,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

View File

@ -0,0 +1,355 @@
<template>
<div class="detail">
<!-- <div class="header">-->
<!-- <h1>详情</h1>-->
<!-- </div>-->
<a-descriptions size="small" :title="pageOptions.title" bordered>
<a-descriptions-item label="员工姓名">
{{ data.staff_detail.name }}
</a-descriptions-item>
<a-descriptions-item label="员工工号">
{{ data.staff_detail.code }}
</a-descriptions-item>
<a-descriptions-item label="员工电话">
{{ data.staff_detail.phone }}
</a-descriptions-item>
<a-descriptions-item label="运输总公里数">
{{ data.transport_mileage }}
</a-descriptions-item>
<a-descriptions-item label="本月份总公里数">
{{ data.month_mileage }}
</a-descriptions-item>
<a-descriptions-item label="工资结余">
{{ data.wages_balance }}
</a-descriptions-item>
</a-descriptions>
<div class="amount">
<h2>
修改结余
</h2>
<li>
<span>操作金额</span>
<a-input id="inputNumber" style="width: 200px;margin-right: 10px;" prefix="¥" suffix="RMB" v-model="amount"
:min="1" :max="1000000000" placeholder="请输入要操作的金额" />
</li>
<li>
<span>操作备注</span>
<a-textarea v-model="remark" placeholder="请输入要操作的备注" :auto-size="{ minRows: 3, maxRows: 5 }"
style="width: 200px;margin-right: 10px;" />
</li>
<li>
<div class="btns">
<!-- 增加结余按钮 -->
<a-popconfirm title="是否增加结余?" ok-text="确认" cancel-text="取消" @confirm="addBalance" @cancel="cancel">
<a-button class="btn-add-balance" type="primary">增加结余</a-button>
</a-popconfirm>
<!-- 减少结余按钮 -->
<a-popconfirm title="是否减少结余?" ok-text="确认" cancel-text="取消" @confirm="reduceBalance" @cancel="cancel">
<a-button class="btn-reduce-balance" type="danger"> 减少结余</a-button>
</a-popconfirm>
</div>
</li>
</div>
<!-- 结余日志列表 -->
<div class="balance-log">
<h2>
结余日志
</h2>
<ZkTableList ref="ZkTableList" :ListUrl="this.DriverWagesGiornaleLogSearch" :ListUrlData="this.zkSelectData"
:Columns="this.columns" :ListFieldName="this.zkSelectDataFieldName">
</ZkTableList>
</div>
</div>
</template>
<script>
import BASE_URL from '@/services/Middle/transport/Custom/api.js';
import ZkTableList from './zkTableList.vue'
// import ZkTable from "@/components/zk/zkTable.vue";
export default {
components: {
ZkTableList
},
props: {
dataId: {
},
pageOptions: {
type: Object
},
ApiUrl: {
type: String
},
ApiData: {
type: Object
},
},
data() {
return {
DriverWagesSurplusAdd: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/surplus/add`, //
DriverWagesSurplusReduce: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/surplus/reduce`, // DriverWagesSurplusLogList: `${BASE_URL.BASE_URL}/Custom/v1/balance/log/list`, //
DriverWagesGiornaleLogList: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/list`, //
DriverWagesGiornaleLogSearch: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/search`, //
DriverWagesGiornaleLogDetail: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/detail`, //
DriverWagesGiornaleLogCreate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/create`, //
DriverWagesGiornaleLogUpdate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/update`, //
DriverWagesGiornaleLogDelete: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/detele`, //
DriverWagesGiornaleLogBatchDelete: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/batchDelete`, //
DriverWagesGiornaleLogBatchUpdate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/batchUpdate`, //
DriverWagesGiornaleLogBatchCreate: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/batchCreate`, //
DriverWagesGiornaleLogBatchHandle: `${BASE_URL.BASE_URL}/DriverWages/v1/driver/wages/giornale/log/batchHandle`, //
zkSelectData: {
page: 1,
end_time: 0,
start_time: 0,
search_rules: [
],
order_bys: [
],
limit: 50
},
zkSelectDataFieldName: "DriverWagesGiornaleLog",
//
columns: [
// =============================== Start ===============================
{ type: 'checkbox', width: 50 }, //
{ type: 'seq', width: 30 }, //
// =============================== Start ===============================
{ 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 }, // :12
{ field: 'balance_amount', sortable: true, title: '修改金额', width: 250 }, //
{ field: 'total_balance', sortable: true, title: '总结余金额', width: 250 }, //
{ field: 'remark', sortable: true, title: '备注', width: 250 }, //
{
field: 'create_time',
formatter: 'formatDate',
width: 100,
sortable: true,
title: '创建时间',
showHeaderOverflow: true
}, //
// =============================== Start ===============================
// =============================== Start ===============================
],
amount: 0,
remark: "",
data: {
},
}
},
created() {
this.initDetailData();
},
filters: {
formatDate: function (value) {
if (value) {
//
return new Date(value).toLocaleString().replace(/:\d{1,2}$/, ' ');
} else {
return "";
}
},
//
formatStatus: function (value) {
if (value === 1) {
return "正常";
// return "success";
} else if (value === 0) {
return "停用";
// return "error";
} else {
return "未知";
// return "warning";
}
},
},
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);
// this.dataId bigint
// this.dataId
this.$zk.post({
url: this.pageOptions.ApiUrl,
data: this.pageOptions.ApiData,
loading: "加载中...",
useBigInt: true,
config: {
headers: {
'Content-Type': 'application/json'
}
}
}).then(a => {
console.log("a", a)
console.log("this.pageOptions.ApiUrl", this.pageOptions.ApiUrl)
this.data = a.data[this.pageOptions.FieldName];
}).catch((a) => {
this.$mk.error(a.msg, "aaa");
});
},
addBalance() {
this.addBalanceApi();
},
reduceBalance() {
this.reduceBalanceApi();
},
addBalanceApi() {
// this.amount
this.amount = Number(this.amount);
//
if (this.amount === undefined || isNaN(this.amount)) {
this.$mk.error("请输入正确的金额");
return
}
if (this.amount <= 0) {
this.$mk.error("请输入正确的金额");
return
}
//
this.$zk.post({
url: this.DriverWagesSurplusAdd,
data: {
staff_uid: this.pageOptions.ApiData.id,
add_balance: this.amount,
remark: this.remark
},
loading: "加载中...",
useBigInt: true,
config: {
headers: {
'Content-Type': 'application/json'
}
}
}).then(a => {
console.log("a", a);
//
this.$mk.success("增加结余成功");
//
this.initDetailData() //
//
this.$refs.ZkTableList.refresh()
}).catch((a) => {
this.$mk.error(a.msg, "aaa");
});
},
reduceBalanceApi() {
// this.amount
this.amount = Number(this.amount);
//
if (this.amount === undefined || isNaN(this.amount)) {
this.$mk.error("请输入正确的金额");
return
}
if (this.amount <= 0) {
this.$mk.error("请输入正确的金额");
return
}
//
this.$zk.post({
url: this.DriverWagesSurplusReduce,
data: {
staff_uid: this.pageOptions.ApiData.id,
reduce_balance: this.amount,
remark: this.remark
},
loading: "加载中...",
useBigInt: true,
config: {
headers: {
'Content-Type': 'application/json'
}
}
}).then(a => {
console.log("a", a);
//
this.$mk.success("减少结余成功");
//
this.initDetailData() //
//
this.$refs.ZkTableList.refresh()
}).catch((a) => {
this.$mk.error(a.msg, "aaa");
});
},
cancel() {
console.log('cancel');
},
confirm() {
console.log('confirm');
}
},
}
</script>
<style scoped lang="less">
.detail {
margin: 10px;
}
.btns {
margin-top: 10px;
.btn-add-balance {}
.btn-reduce-balance {
margin-left: 10px;
}
}
.amount {
margin-top: 20px;
li {
margin-top: 10px;
list-style: none;
span {
display: inline-block;
width: 80px;
}
}
}
.balance-log {
margin-top: 20px;
height: 600px;
}
</style>

View File

@ -39,12 +39,15 @@
</template>
<template #status="{ row }"><!-- 这里是自定义列 -->
<!-- 转换 row.status 的值 如果是true显示开否则显示关-->
<a-switch :checked="row.status ? true : false" @change="onSwitch(row, 'status')" />
{{ row.status === 0 ? '正常' :'异常'}}
</template>
<!-- =============================== 表格列 自动生成 End =============================== -->
<template #op="{ row }">
<div class="oplinks">
<a @click.stop="pageDetail(row)" title="详情">
<a-icon type="file"/>
</a>
<a @click.stop="pageEdit(row)" title="编辑">
<a-icon type="edit" />
</a>
@ -219,7 +222,7 @@ export default {
// =============================== Start ===============================
{ title: '操作', slots: { default: 'op' }, width: 120, fixed: 'right' }
{ title: '操作', slots: { default: 'op' }, width: 150, fixed: 'right' }
]
}
@ -379,6 +382,42 @@ export default {
this.$refs.xGrid.commitProxy('query') //
},
pageDetail(row){
console.log("list row",row)
if (!row) { //
this.$mk.msg("请选择行"); //
return; //
}
this.$mk.dialog.open({
height: 800,
width: 1200,
page: () => import('./Detail.vue'),
title: "详情",
dataId: row.id,
pageOptions: {
ApiUrl: this.actions.DriverWagesSurplusDetail,
ApiData: {
id: row.id
},
FieldName: "driver_wages_surplus",
title: "详情",
},
callback: ({success}) => {
console.log("success",success);
this.$forceUpdate() //
},
//
close: () => {
console.log("close");
//
this.onSearch();
}
})
}
},
//

View File

@ -0,0 +1,254 @@
<template>
<vxe-grid ref='xGrid' v-bind="gridOptions" @form-submit="initListData" @page-change="handlePageChange">
<!-- 工具栏 -->
<template #toolbar_buttons>
<!-- <a-button @click="pageDelete()">批量删除</a-button> -->
<!-- <a-button type="primary" @click="Add()">新增</a-button> -->
</template>
<template #empty>
<a-empty/>
</template>
</vxe-grid>
</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],
props: {
Columns: {
type: Array
},
FormConfig: {
type: Object,
default: () => {
return {
data: {
name: '',
code: '',
create_time: 0
},
items: [
// {
// field: 'name',
// title: '',
// slots: {default: 'name_item'} //
// },
// {
// field: 'code',
// title: '',
// slots: {default: 'code_item'} //
// },
// {
// field: 'create_time',
// title: '',
// slots: {default: 'create_time_item'} //
// },
// {slots: {default: 'operate_item'}}
]
}
}
},
},
data() {
return {
DeleteIds: [], // id
gridOptions: { //
resizable: true, //
border: true, //
showOverflow: true, //
loading: false, //
minHeight: '600', //
maxHeight: '1200', //
//
stripe: true,
exportConfig: { //
},
pagerConfig: {//
total: 0, //
currentPage: this.ListUrlData.page, //
pageSize: this.ListUrlData.limit, //
pageSizes: [10, 20, 30, 50, 100, 500, 1000, 2000] //
},
checkboxConfig: { //
// rowId
reserve: true,
//
trigger: 'row',
highlight: true
},
formConfig: this.FormConfig, //
toolbarConfig: { //
export: true, //
custom: true, //
slots: {
buttons: 'toolbar_buttons' //
}
},
columns: this.Columns, //
data: []
},
}
},
created() {
//
this.initListData()
},
methods: {
//
initListData() {
this.ListUrlData.order_bys = []
this.ListUrlData.order_bys.push({
column: "create_time",
order: "desc"
})
this.ListUrlData.search_rules = [];
if (this.gridOptions.formConfig.data.name !== '') {
this.ListUrlData.search_rules.push(
{
column: "name",
mode: "like",
value: this.gridOptions.formConfig.data.name
}
)
}
if (this.gridOptions.formConfig.data.code !== '') {
this.ListUrlData.search_rules.push(
{
column: "code",
mode: "like",
value: this.gridOptions.formConfig.data.code
}
)
}
this.$zk.getPagedData({
url: this.ListUrl,
listFieldName: this.ListFieldName,
data: this.ListUrlData,
loading: "加载中...",
config: {
headers: {
'Content-Type': 'application/json'
}
}
}).then(a => {
if (a.total === 0) {
this.gridOptions.pagerConfig.currentPage = this.ListUrlData.page;
this.gridOptions.pagerConfig.pageSize = this.ListUrlData.limit;
this.gridOptions.pagerConfig.total = a.total;
this.gridOptions.data = a[this.ListFieldName];
return
}
this.gridOptions.data = a[this.ListFieldName];
// this.listid
this.gridOptions.data.forEach(item => {
item.id = item.id.toString();
});
this.gridOptions.pagerConfig.currentPage = this.ListUrlData.page;
this.gridOptions.pagerConfig.pageSize = this.ListUrlData.limit;
this.gridOptions.pagerConfig.total = a.total;
}).catch((a) => {
this.$mk.error(a.msg);
});
},
//
pageDelete: function (row) {
let ids = [];
if (row) {
ids.push(row.id);
}
this.$refs.xGrid.getCheckboxRecords().forEach(item => {
ids.push(item.id);
});
console.log(ids);
if (!ids.length) { //
this.$mk.error("请选择行"); //
return;
}
this.$mk.confirm('您确定要删除吗?').then(type => { //
if (type === 'confirm') { //
this.DeleteUrlData.ids = ids;
this.Delete()
this.$message.success("删除成功")
}
});
},
//
handlePageChange({currentPage, pageSize}) {
this.ListUrlData.page = currentPage
this.ListUrlData.limit = pageSize
this.initListData()
},
//
onChangeCreatTime(date, dateString) {
console.log("dateString:", dateString)
if (dateString[0] === '' && dateString[1] === '') {
this.ListUrlData.start_time = 0;
this.ListUrlData.end_time = 0;
this.initListData()
} else {
this.ListUrlData.start_time = dateString[0];
this.ListUrlData.end_time = dateString[1];
this.initListData()
}
},
//
Add() {
this.$openPage(this.CreateRouter);
},
//
pageEdit(row) {
console.log(row)
if (!row) { //
this.$mk.msg("请选择行"); //
return; //
}
this.$openPage(this.UpdateRouter + "/" + row.id); //
},
//
pageDetail(row) {
console.log(row)
if (!row) { //
this.$mk.msg("请选择行"); //
return; //
}
this.$mk.dialog.open({
height: 800,
width: 1200,
page: () => import('./Detail.vue'),
title: "详情",
dataId: row.id,
pageOptions: {
ApiUrl: this.DetailUrl,
ApiData: this.DetailUrlData,
FieldName: "truck",
title: "详情",
},
callback: ({success}) => {
success && this.initListData(); //
}
})
},
//
refresh() {
this.initListData();
},
}
}
</script>
<style scoped lang="less">
.ant-btn {
margin-right: 10px;
}
</style>

View File

@ -172,7 +172,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: 50 }, //
{ type: 'seq', width: 30 }, //
{ type: 'seq', width: 50 }, //
// =============================== Start ===============================

View File

@ -191,7 +191,7 @@ export default {
outsourcing_truck_number: "",
outsourcing_driver_name: "",
outsourcing_driver_phone: "",
is_need_outbound: 0,
is_need_outbound: 1,
truck_name: "",
truck_id: 0,
driver_name:'',

View File

@ -70,7 +70,7 @@ const CustomRouterMap = {
icon: 'idcard',
path: '/Custom/BalanceLogList',
meta: {
invisible: false, // 不在菜单中显示
invisible: true, // 不在菜单中显示
},
component: () => import('@/pages/Middle/transport/Custom/BalanceLog/List'),
authority: {

View File

@ -47,7 +47,7 @@ const DriverWagesRouterMap = {
meta: {
invisible: false, // 不在菜单中显示
},
component: () => import('@/pages/Middle/transport/DriverWages/DriverWagesSurplus/List'),
component: () => import('@/pages/Middle/transport/DriverWages/DriverWages/List'),
authority: {
permission: ["DriverWages", "DriverWages-All", "Driver-Wages-List"],
}