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

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

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

4
src/views/login.vue

@ -35,7 +35,7 @@
</FormItem> </FormItem>
</Form> </Form>
</TabPane> </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" <Form ref="mobileLoginForm" :model="form" :rules="rules" class="form"
v-if="tabName == 'mobile'"> v-if="tabName == 'mobile'">
<FormItem prop="mobile"> <FormItem prop="mobile">
@ -55,7 +55,7 @@
</Row> </Row>
</FormItem> </FormItem>
</Form> </Form>
</TabPane> </TabPane> -->
</Tabs> </Tabs>
</div> </div>

Loading…
Cancel
Save