wangfukang 2 days ago
parent
commit
23ee5c6ee9
  1. 32
      src/views/app/business/logistics/logistics.vue
  2. 4
      src/views/login.vue

32
src/views/app/business/logistics/logistics.vue

@ -64,6 +64,11 @@
line-height: 18px;
word-break: break-all;
}
.transfer-worker-disabled-row td {
background-color: #f7f7f7 !important;
color: #c5c8ce;
}
</style>
<template>
<div class="search">
@ -184,7 +189,7 @@
<Button style="margin-left: 8px;" @click="handleWorkerReset">重置</Button>
</Row>
<Table :loading="workerLoading" border :columns="workerList" :data="transferList" :size="tableSize"
sortable="custom" ref="table1"></Table>
sortable="custom" :row-class-name="getTransferWorkerRowClassName" ref="table1"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchWorker.pageNum" :total="workerTotal" :page-size="searchWorker.pageSize"
@on-change="changeWorkerPage" @on-page-size-change="changeWorkerPageSize"
@ -348,6 +353,7 @@
workerTotal: 0,
workerOrderTotal: 0,
orderId: "",
currentTransferWorkerId: "",
transferActionTitle: "指派配送员",
transferActionType: "assign",
currentRegionId: regionId,
@ -422,13 +428,16 @@
width: 170,
align: "center",
fixed: "right",
render: (h, params) => h("div", [
h("a", {
on: {
click: () => this.goTransferOrder(params.row)
}
}, "指派")
])
render: (h, params) => {
if (this.isCurrentTransferWorker(params.row)) return h("span", "");
return h("div", [
h("a", {
on: {
click: () => this.goTransferOrder(params.row)
}
}, "指派")
]);
}
}];
},
buildOrderColumns(clickableWorker = true) {
@ -922,6 +931,7 @@
this.searchWorker.putAreaId = v.putAreaId;
this.searchWorker.orderType = this.getWorkerOrderType(v);
this.orderId = v.id;
this.currentTransferWorkerId = v.workerId || "";
this.transferActionType = v.workerId ? "reassign" : "assign";
this.transferActionTitle = v.workerId ? "改派配送员" : "指派配送员";
this.getWorker();
@ -966,6 +976,12 @@
getOrderRowClassName(row) {
return this.isNearMustFinishTime(row) ? "logistics-warning-row" : "";
},
getTransferWorkerRowClassName(row) {
return this.isCurrentTransferWorker(row) ? "transfer-worker-disabled-row" : "";
},
isCurrentTransferWorker(row) {
return !!(this.currentTransferWorkerId && row && String(row.workerId) === String(this.currentTransferWorkerId));
},
renderWorkerInfo(h, row, clickable = true) {
const children = [
h("div", { class: "worker-info-name" }, row.workerName || "未分配"),

4
src/views/login.vue

@ -35,7 +35,7 @@
</FormItem>
</Form>
</TabPane>
<TabPane :label="$t('mobileLogin')" name="mobile" icon="ios-phone-portrait">
<!-- <TabPane :label="$t('mobileLogin')" name="mobile" icon="ios-phone-portrait">
<Form ref="mobileLoginForm" :model="form" :rules="rules" class="form"
v-if="tabName == 'mobile'">
<FormItem prop="mobile">
@ -55,7 +55,7 @@
</Row>
</FormItem>
</Form>
</TabPane>
</TabPane> -->
</Tabs>
</div>

Loading…
Cancel
Save