|
|
@@ -49,19 +49,29 @@
|
|
|
<div class="dispatch-toolbar">
|
|
|
<div class="dispatch-toolbar-left">
|
|
|
<el-button
|
|
|
+ v-if="showFirstTaskConfirmButton"
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
:loading="dispatchToolbarLoading"
|
|
|
- :disabled="isDispatchToolbarDisabled(1)"
|
|
|
+ :disabled="readonlyMode || isDispatchToolbarDisabled('confirm')"
|
|
|
+ @click="handleFirstTaskConfirm"
|
|
|
+ >
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ :loading="dispatchToolbarLoading"
|
|
|
+ :disabled="readonlyMode || isDispatchToolbarDisabled(1)"
|
|
|
@click="handleDispatchToolbarAction(1)"
|
|
|
>
|
|
|
- 派单
|
|
|
+ 任务派单
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
:loading="dispatchToolbarLoading"
|
|
|
- :disabled="isDispatchToolbarDisabled(2)"
|
|
|
+ :disabled="readonlyMode || isDispatchToolbarDisabled(2)"
|
|
|
@click="handleDispatchToolbarAction(2)"
|
|
|
>
|
|
|
撤回
|
|
|
@@ -70,7 +80,7 @@
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
:loading="dispatchToolbarLoading"
|
|
|
- :disabled="isDispatchToolbarDisabled(3)"
|
|
|
+ :disabled="readonlyMode || isDispatchToolbarDisabled(3)"
|
|
|
@click="handleDispatchToolbarAction(3)"
|
|
|
>
|
|
|
保存
|
|
|
@@ -79,7 +89,9 @@
|
|
|
type="success"
|
|
|
size="mini"
|
|
|
:loading="dispatchToolbarLoading"
|
|
|
- :disabled="isDispatchToolbarDisabled('addStation')"
|
|
|
+ :disabled="
|
|
|
+ readonlyMode || isDispatchToolbarDisabled('addStation')
|
|
|
+ "
|
|
|
@click="handleDispatchAddStation"
|
|
|
>
|
|
|
添加工位
|
|
|
@@ -169,6 +181,7 @@
|
|
|
class="dispatch-state-checkbox"
|
|
|
:value="isCurrentPageDispatchChecked"
|
|
|
:indeterminate="isCurrentPageDispatchIndeterminate"
|
|
|
+ :disabled="readonlyMode"
|
|
|
@change="handleCurrentPageDispatchCheckChange"
|
|
|
/>
|
|
|
</template>
|
|
|
@@ -176,6 +189,7 @@
|
|
|
<el-checkbox
|
|
|
class="dispatch-state-checkbox"
|
|
|
:value="isSelectedDispatchObject(row)"
|
|
|
+ :disabled="readonlyMode"
|
|
|
@change="handleDispatchObjectCheckChange(row, $event)"
|
|
|
/>
|
|
|
</template>
|
|
|
@@ -258,7 +272,7 @@
|
|
|
:value="row.quantity"
|
|
|
placeholder="请输入数量"
|
|
|
class="config-table-control"
|
|
|
- :disabled="isDispatchRowAssigned(row)"
|
|
|
+ :disabled="isDispatchRowControlDisabled(row)"
|
|
|
@input="handleDispatchRowQuantityInput(row, $event)"
|
|
|
/>
|
|
|
</template>
|
|
|
@@ -277,7 +291,7 @@
|
|
|
placeholder="开始时间"
|
|
|
clearable
|
|
|
class="config-table-control"
|
|
|
- :disabled="isDispatchRowAssigned(row)"
|
|
|
+ :disabled="isDispatchRowControlDisabled(row)"
|
|
|
@change="handleDispatchRowStartTimeChange(row)"
|
|
|
/>
|
|
|
</template>
|
|
|
@@ -306,7 +320,7 @@
|
|
|
placeholder="完成时间"
|
|
|
clearable
|
|
|
class="config-table-control"
|
|
|
- :disabled="isDispatchRowAssigned(row)"
|
|
|
+ :disabled="isDispatchRowControlDisabled(row)"
|
|
|
@change="handleDispatchRowEndTimeChange(row)"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -351,7 +365,7 @@
|
|
|
<div class="panel-header">
|
|
|
<div class="panel-title">工艺配置</div>
|
|
|
<div class="panel-actions">
|
|
|
- <span v-if="isCurrentPlanReadonly" class="readonly-tip">
|
|
|
+ <span v-if="readonlyMode" class="readonly-tip">
|
|
|
当前状态仅支持查看
|
|
|
</span>
|
|
|
<el-tooltip
|
|
|
@@ -368,10 +382,20 @@
|
|
|
></i>
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-button
|
|
|
+ v-if="showApproveButton"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ :loading="approveLoading"
|
|
|
+ :disabled="approveButtonDisabled"
|
|
|
+ @click="$emit('approve')"
|
|
|
+ >
|
|
|
+ 审批
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
- :disabled="!currentPlan || dotLineLoading || isCurrentPlanReadonly"
|
|
|
+ :disabled="!currentPlan || dotLineLoading || readonlyMode"
|
|
|
@click="$emit('submit')"
|
|
|
>
|
|
|
保存
|
|
|
@@ -413,7 +437,7 @@
|
|
|
v-model="row.executionType"
|
|
|
placeholder="执行模式"
|
|
|
clearable
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
@change="$emit('execution-type-change', row)"
|
|
|
>
|
|
|
@@ -438,7 +462,7 @@
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
filterable
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
@change="$emit('execution-object-change', row)"
|
|
|
>
|
|
|
@@ -456,7 +480,7 @@
|
|
|
placeholder="请选择"
|
|
|
clearable
|
|
|
filterable
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
@change="$emit('execution-object-change', row)"
|
|
|
>
|
|
|
@@ -497,12 +521,12 @@
|
|
|
:controls="false"
|
|
|
:precision="3"
|
|
|
placeholder="请输入数量"
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="执行开始时间" min-width="136" align="center">
|
|
|
+ <el-table-column label="执行开始时间" min-width="164" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-date-picker
|
|
|
v-model="row.executionStartTime"
|
|
|
@@ -510,13 +534,13 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="执行开始时间"
|
|
|
clearable
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
@change="$emit('time-change', row, 'executionStartTime')"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="执行结束时间" min-width="136" align="center">
|
|
|
+ <el-table-column label="执行结束时间" min-width="164" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<div
|
|
|
:class="{
|
|
|
@@ -530,7 +554,7 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="执行结束时间"
|
|
|
clearable
|
|
|
- :disabled="isCurrentPlanReadonly"
|
|
|
+ :disabled="readonlyMode"
|
|
|
class="config-table-control"
|
|
|
@change="$emit('time-change', row, 'executionEndTime')"
|
|
|
/>
|
|
|
@@ -542,12 +566,10 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- :disabled="
|
|
|
- !currentPlan || dotLineLoading || isCurrentPlanReadonly
|
|
|
- "
|
|
|
+ :disabled="!currentPlan || dotLineLoading || readonlyMode"
|
|
|
@click="$emit('row-submit', row)"
|
|
|
>
|
|
|
- 保存
|
|
|
+ 缓存
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -566,12 +588,18 @@
|
|
|
<script>
|
|
|
import chooseStation from '@/views/workOrder/components/chooseStation.vue';
|
|
|
import {
|
|
|
+ checkAssignConfirm,
|
|
|
listAssign,
|
|
|
+ parameterGetByCode,
|
|
|
resetAssignee,
|
|
|
taskAssignment,
|
|
|
taskRevoked,
|
|
|
taskSave
|
|
|
} from '@/api/mainData/index.js';
|
|
|
+ import {
|
|
|
+ getcheckLoginUserIsTeamLeader,
|
|
|
+ releaseWorkOrder
|
|
|
+ } from '@/api/workOrder/index.js';
|
|
|
|
|
|
const DISPATCH_TEAM_ID_KEYS = [
|
|
|
'dispatchTeamId',
|
|
|
@@ -604,6 +632,10 @@
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ orderDetailReadonly: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
currentPlan: {
|
|
|
type: Object,
|
|
|
default: null
|
|
|
@@ -640,6 +672,18 @@
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ showApproveButton: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ approveButtonDisabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
+ approveLoading: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
tableMaxHeight: {
|
|
|
type: Number,
|
|
|
default: 390
|
|
|
@@ -713,6 +757,9 @@
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ readonlyMode() {
|
|
|
+ return this.orderDetailReadonly || this.isCurrentPlanReadonly;
|
|
|
+ },
|
|
|
dispatchVisibleColumns: {
|
|
|
get() {
|
|
|
return this.dispatchColumnOptions
|
|
|
@@ -749,6 +796,13 @@
|
|
|
null
|
|
|
);
|
|
|
},
|
|
|
+ showFirstTaskConfirmButton() {
|
|
|
+ return (
|
|
|
+ this.orderDispatchStyle &&
|
|
|
+ !this.readonlyMode &&
|
|
|
+ this.isFirstDispatchTask(this.activeTask)
|
|
|
+ );
|
|
|
+ },
|
|
|
reportTypeValue() {
|
|
|
return this.normalizeDispatchReportType(this.dispatchReportType);
|
|
|
},
|
|
|
@@ -781,7 +835,11 @@
|
|
|
const start =
|
|
|
plan.startTime || plan.planStartTime || plan.executionStartTime || '';
|
|
|
const end =
|
|
|
- plan.endTime || plan.planCompleteTime || plan.executionEndTime || '';
|
|
|
+ plan.endTime ||
|
|
|
+ plan.planEndTime ||
|
|
|
+ plan.planCompleteTime ||
|
|
|
+ plan.executionEndTime ||
|
|
|
+ '';
|
|
|
const startText = this.formatDispatchDateTime(start);
|
|
|
const endText = this.formatDispatchDateTime(end);
|
|
|
if (startText && endText) {
|
|
|
@@ -832,8 +890,8 @@
|
|
|
: task?.executionEndTime ||
|
|
|
assignment?.executionEndTime ||
|
|
|
defaultEndTime,
|
|
|
- status: task?.status || assignment?.status,
|
|
|
- changeId: task?.changeId || assignment?.changeId,
|
|
|
+ status: assignment?.status || '',
|
|
|
+ changeId: assignment?.changeId || '',
|
|
|
teamTimeIds: task?.teamTimeIds || assignment?.teamTimeIds,
|
|
|
weight: task?.weight || assignment?.weight || item.weight || '',
|
|
|
code: item.code || item.workstationCode || '',
|
|
|
@@ -996,7 +1054,11 @@
|
|
|
getDispatchPlanEndTime() {
|
|
|
const plan = this.currentPlan || {};
|
|
|
return (
|
|
|
- plan.endTime || plan.planCompleteTime || plan.executionEndTime || ''
|
|
|
+ plan.endTime ||
|
|
|
+ plan.planEndTime ||
|
|
|
+ plan.planCompleteTime ||
|
|
|
+ plan.executionEndTime ||
|
|
|
+ ''
|
|
|
);
|
|
|
},
|
|
|
getDispatchTaskDefaultStartTime(row = this.activeTask) {
|
|
|
@@ -1032,6 +1094,32 @@
|
|
|
''
|
|
|
);
|
|
|
},
|
|
|
+ isFirstDispatchTask(row) {
|
|
|
+ if (!row) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const firstTaskId =
|
|
|
+ this.currentPlan?.firstTaskId ??
|
|
|
+ this.currentPlan?.taskId ??
|
|
|
+ this.currentPlan?.sourceTaskId ??
|
|
|
+ '';
|
|
|
+ if (
|
|
|
+ firstTaskId !== null &&
|
|
|
+ firstTaskId !== undefined &&
|
|
|
+ firstTaskId !== ''
|
|
|
+ ) {
|
|
|
+ return (
|
|
|
+ String(
|
|
|
+ row.sourceTaskId ?? row.firstTaskId ?? row.taskId ?? row.id
|
|
|
+ ) === String(firstTaskId)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ const index = this.dispatchTaskTabs.findIndex(
|
|
|
+ (item) =>
|
|
|
+ this.dispatchTaskGroupKey(item) === this.dispatchTaskGroupKey(row)
|
|
|
+ );
|
|
|
+ return index === 0;
|
|
|
+ },
|
|
|
dispatchObjectRowKey(row) {
|
|
|
const rawId =
|
|
|
row?.rawId ??
|
|
|
@@ -1214,6 +1302,9 @@
|
|
|
return ids;
|
|
|
},
|
|
|
getDispatchToolbarPermissionState(action) {
|
|
|
+ if (this.readonlyMode) {
|
|
|
+ return { allowed: false, message: '当前状态仅支持查看' };
|
|
|
+ }
|
|
|
if (!this.activeTask) {
|
|
|
return { allowed: false, message: '请选择工序' };
|
|
|
}
|
|
|
@@ -1317,8 +1408,13 @@
|
|
|
const statusText = this.getDispatchStatusText(data?.status);
|
|
|
return statusText === '已派单' || statusText === '派单';
|
|
|
},
|
|
|
+ isDispatchRowControlDisabled() {
|
|
|
+ return this.readonlyMode;
|
|
|
+ },
|
|
|
getDispatchTableRowClassName({ row }) {
|
|
|
- return this.isDispatchRowAssigned(row) ? 'dispatch-row-assigned' : '';
|
|
|
+ return this.readonlyMode && this.isDispatchRowAssigned(row)
|
|
|
+ ? 'dispatch-row-assigned'
|
|
|
+ : '';
|
|
|
},
|
|
|
normalizeDispatchAssignment(item) {
|
|
|
const assigneeId =
|
|
|
@@ -1608,7 +1704,7 @@
|
|
|
return task;
|
|
|
},
|
|
|
handleDispatchRowQuantityInput(row, value) {
|
|
|
- if (this.isDispatchRowAssigned(row)) {
|
|
|
+ if (this.isDispatchRowControlDisabled(row)) {
|
|
|
return;
|
|
|
}
|
|
|
this.$set(row, 'quantity', value);
|
|
|
@@ -1642,6 +1738,9 @@
|
|
|
row.quantity = this.formatDispatchRowQuantity(task.quantity);
|
|
|
},
|
|
|
handleDispatchObjectCheckChange(row, checked) {
|
|
|
+ if (this.readonlyMode) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (checked) {
|
|
|
const task = this.ensureDispatchObjectSelected(row);
|
|
|
if (task && row.quantity) {
|
|
|
@@ -1771,7 +1870,7 @@
|
|
|
this.$emit('time-change', row, 'executionEndTime');
|
|
|
},
|
|
|
handleDispatchRowStartTimeChange(row) {
|
|
|
- if (this.isDispatchRowAssigned(row)) {
|
|
|
+ if (this.isDispatchRowControlDisabled(row)) {
|
|
|
return;
|
|
|
}
|
|
|
const task = this.ensureDispatchObjectSelected(row);
|
|
|
@@ -1789,7 +1888,7 @@
|
|
|
});
|
|
|
},
|
|
|
handleDispatchRowEndTimeChange(row) {
|
|
|
- if (this.isDispatchRowAssigned(row)) {
|
|
|
+ if (this.isDispatchRowControlDisabled(row)) {
|
|
|
return;
|
|
|
}
|
|
|
const task = this.ensureDispatchObjectSelected(row);
|
|
|
@@ -1805,20 +1904,24 @@
|
|
|
});
|
|
|
},
|
|
|
handleCurrentPageDispatchCheckChange(checked) {
|
|
|
+ if (this.readonlyMode) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.pagedDispatchObjectRows.forEach((row) => {
|
|
|
this.handleDispatchObjectCheckChange(row, checked);
|
|
|
});
|
|
|
},
|
|
|
getDispatchActionRowData(row) {
|
|
|
const task = this.getDispatchRowTask(row);
|
|
|
+ const assignment = this.getDispatchAssignment(row);
|
|
|
return {
|
|
|
...row,
|
|
|
quantity: task?.quantity ?? row.quantity,
|
|
|
executionStartTime:
|
|
|
task?.executionStartTime ?? row.executionStartTime,
|
|
|
executionEndTime: task?.executionEndTime ?? row.executionEndTime,
|
|
|
- changeId: task?.changeId ?? row.changeId,
|
|
|
- status: task?.status ?? row.status,
|
|
|
+ changeId: assignment?.changeId ?? row.changeId,
|
|
|
+ status: assignment?.status ?? row.status,
|
|
|
teamTimeIds: task?.teamTimeIds ?? row.teamTimeIds,
|
|
|
weight: task?.weight ?? row.weight
|
|
|
};
|
|
|
@@ -1949,6 +2052,123 @@
|
|
|
assignees: this.buildDispatchAssignees(rows)
|
|
|
};
|
|
|
},
|
|
|
+ validateFirstTaskConfirmReportType() {
|
|
|
+ if (this.reportTypeValue === 0 || this.reportTypeValue === 1) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ this.$message.warning('请先选择报工类型');
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ async validateFirstTaskConfirmLeader(teamId) {
|
|
|
+ try {
|
|
|
+ const permissionRes = await parameterGetByCode({
|
|
|
+ code: 'production_order_dispatch_permission'
|
|
|
+ });
|
|
|
+ if (String(permissionRes?.value || 0) !== '1') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ const isTeamLeader = await getcheckLoginUserIsTeamLeader(teamId);
|
|
|
+ if (!isTeamLeader) {
|
|
|
+ this.$message.warning('当前班组不是对应组长');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ } catch (e) {
|
|
|
+ this.$message.error(e.message || '校验组长身份失败');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getFirstTaskAssignedRows() {
|
|
|
+ return this.dispatchObjectRows.filter((row) =>
|
|
|
+ this.isDispatchRowAssigned(row)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ buildFirstTaskConfirmPayload(assignedRows) {
|
|
|
+ const row = this.activeTask || {};
|
|
|
+ const assignType = Number(row.assignType ?? 1);
|
|
|
+ const dispatchIds = assignedRows.map((item) =>
|
|
|
+ this.getDispatchAssigneeId(item)
|
|
|
+ );
|
|
|
+ const payload = {
|
|
|
+ assignType,
|
|
|
+ singleReport: this.reportTypeValue,
|
|
|
+ teamId: this.getDispatchTeamId(),
|
|
|
+ dispatchingMethod:
|
|
|
+ this.currentPlan?.dispatchingMethod ??
|
|
|
+ this.currentPlan?.taskAss ??
|
|
|
+ 0,
|
|
|
+ crewIds: [],
|
|
|
+ workstationIds: [],
|
|
|
+ factoryLineIds: [],
|
|
|
+ id: this.getDispatchWorkOrderId() || this.currentPlan?.id || '',
|
|
|
+ planStartTime: this.getDispatchPlanStartTime(),
|
|
|
+ planEndTime: this.getDispatchPlanEndTime()
|
|
|
+ };
|
|
|
+ if (assignType === 2) {
|
|
|
+ payload.crewIds = dispatchIds;
|
|
|
+ } else if (assignType === 3) {
|
|
|
+ payload.factoryLineIds = dispatchIds;
|
|
|
+ } else {
|
|
|
+ payload.workstationIds = dispatchIds;
|
|
|
+ }
|
|
|
+ return payload;
|
|
|
+ },
|
|
|
+ async handleFirstTaskConfirm() {
|
|
|
+ if (!this.validateDispatchToolbarPermission('confirm')) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.validateFirstTaskConfirmReportType()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const teamId = this.getDispatchTeamId();
|
|
|
+ if (!teamId) {
|
|
|
+ this.$message.warning('请先选择班组');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const workCenterId = this.getDispatchWorkCenterId(this.activeTask);
|
|
|
+ const workOrderId =
|
|
|
+ this.getDispatchWorkOrderId() || this.currentPlan?.id;
|
|
|
+ if (!workCenterId || !workOrderId) {
|
|
|
+ this.$message.warning('当前订单或工序信息不完整,无法操作');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!(await this.validateFirstTaskConfirmLeader(teamId))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const assignedRows = this.getFirstTaskAssignedRows();
|
|
|
+ if (!assignedRows.length) {
|
|
|
+ const taskName =
|
|
|
+ this.activeTask?.taskName || this.activeTask?.name || '';
|
|
|
+ this.$message.warning(`请您先进行首工序任务(${taskName}工序)派单`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.dispatchToolbarLoading = true;
|
|
|
+ try {
|
|
|
+ const checked = await checkAssignConfirm({
|
|
|
+ teamId,
|
|
|
+ workCenterId,
|
|
|
+ workOrderId
|
|
|
+ });
|
|
|
+ if (!checked) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const response = await releaseWorkOrder(
|
|
|
+ this.buildFirstTaskConfirmPayload(assignedRows)
|
|
|
+ );
|
|
|
+ if (response) {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ await this.loadDispatchAssignData();
|
|
|
+ this.$emit('dispatch-action-success', {
|
|
|
+ type: 'confirm',
|
|
|
+ task: this.activeTask
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ this.$message.error(e.message || '操作失败');
|
|
|
+ } finally {
|
|
|
+ this.dispatchToolbarLoading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
async handleDispatchToolbarAction(type) {
|
|
|
if (!this.validateDispatchToolbarPermission(type)) {
|
|
|
return;
|
|
|
@@ -2236,8 +2456,11 @@
|
|
|
}
|
|
|
|
|
|
.el-tabs__item {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
height: 34px;
|
|
|
- line-height: 34px;
|
|
|
+ line-height: 1;
|
|
|
min-width: 82px;
|
|
|
margin-right: 6px;
|
|
|
padding: 0 14px;
|
|
|
@@ -2345,6 +2568,17 @@
|
|
|
box-shadow: 0 3px 8px rgba(95, 194, 56, 0.2);
|
|
|
}
|
|
|
|
|
|
+ .dispatch-toolbar-left ::v-deep .el-button.is-disabled,
|
|
|
+ .dispatch-toolbar-left ::v-deep .el-button.is-disabled:hover,
|
|
|
+ .dispatch-toolbar-left ::v-deep .el-button.is-disabled:focus,
|
|
|
+ .dispatch-toolbar-left ::v-deep .el-button.is-disabled:active {
|
|
|
+ color: #9aa6b2;
|
|
|
+ border-color: #d8e1eb;
|
|
|
+ background: #edf2f7;
|
|
|
+ box-shadow: none;
|
|
|
+ cursor: not-allowed;
|
|
|
+ }
|
|
|
+
|
|
|
.dispatch-assign-mode {
|
|
|
flex: 1 1 auto;
|
|
|
justify-content: center;
|
|
|
@@ -2592,7 +2826,7 @@
|
|
|
|
|
|
.config-table-control.el-date-editor .el-input__inner {
|
|
|
padding-left: 28px;
|
|
|
- padding-right: 6px;
|
|
|
+ padding-right: 20px;
|
|
|
}
|
|
|
|
|
|
.el-input-number .el-input__inner {
|
|
|
@@ -2615,6 +2849,14 @@
|
|
|
height: 26px;
|
|
|
line-height: 26px;
|
|
|
}
|
|
|
+
|
|
|
+ .config-table-control.el-select .el-input__inner {
|
|
|
+ padding-right: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .config-table-control .el-input--prefix .el-input__inner {
|
|
|
+ padding-left: 28px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.dispatch-table ::v-deep {
|