|
|
@@ -239,21 +239,21 @@ const handleBack = async (id: number) => {
|
|
|
|
|
|
const openForm = (type: 'create' | 'update', id?: number) => {
|
|
|
if (type === 'update' && typeof id === 'number') {
|
|
|
- push({ name: 'IotMainWorkOrderOptimize', params: { id } })
|
|
|
+ push({ name: 'MaintenanceWorkOrder', query: { status: 'fill', id } })
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- push({ name: 'IotMainWorkOrderAdd', params: {} })
|
|
|
+ push({ name: 'MaintenanceWorkOrder', query: { status: 'create' } })
|
|
|
}
|
|
|
|
|
|
const openModifyForm = (type: 'modify', id?: number) => {
|
|
|
if (type === 'modify' && typeof id === 'number') {
|
|
|
- push({ name: 'IotMainWorkOrderModify', params: { id } })
|
|
|
+ push({ name: 'MaintenanceWorkOrder', query: { status: 'modify', id } })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const detail = (id?: number) => {
|
|
|
- push({ name: 'IotMainWorkOrderDetail', params: { id } })
|
|
|
+ push({ name: 'MaintenanceWorkOrder', query: { status: 'detail', id } })
|
|
|
}
|
|
|
|
|
|
const handleExport = async () => {
|
|
|
@@ -273,8 +273,7 @@ onMounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div
|
|
|
- class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
|
|
|
- >
|
|
|
+ class="main-work-order-page grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
|
|
|
<DeptTreeSelect
|
|
|
:top-id="rootDeptId"
|
|
|
:deptId="deptId"
|
|
|
@@ -283,16 +282,14 @@ onMounted(() => {
|
|
|
:show-title="false"
|
|
|
request-api="getSimpleDeptList"
|
|
|
class="main-work-order-tree row-span-2"
|
|
|
- @node-click="handleDeptNodeClick"
|
|
|
- />
|
|
|
+ @node-click="handleDeptNodeClick" />
|
|
|
|
|
|
<el-form
|
|
|
ref="queryFormRef"
|
|
|
:model="queryParams"
|
|
|
size="default"
|
|
|
label-width="68px"
|
|
|
- class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0"
|
|
|
- >
|
|
|
+ class="main-work-order-query bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-6 py-3 min-w-0">
|
|
|
<div class="query-row">
|
|
|
<el-form-item :label="t('bomList.name')" prop="name">
|
|
|
<el-input
|
|
|
@@ -300,22 +297,19 @@ onMounted(() => {
|
|
|
:placeholder="t('bomList.nHolder')"
|
|
|
clearable
|
|
|
class="query-control"
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- />
|
|
|
+ @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('bomList.status')" prop="result">
|
|
|
<el-select
|
|
|
v-model="queryParams.result"
|
|
|
:placeholder="t('bomList.status')"
|
|
|
clearable
|
|
|
- class="query-control query-control--small"
|
|
|
- >
|
|
|
+ class="query-control query-control--small">
|
|
|
<el-option
|
|
|
v-for="dict in resultOptions"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
+ :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('common.createTime')" prop="createTime" label-width="100px">
|
|
|
@@ -326,8 +320,7 @@ onMounted(() => {
|
|
|
:start-placeholder="t('operationFill.start')"
|
|
|
:end-placeholder="t('operationFill.end')"
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
- class="query-control query-control--date"
|
|
|
- />
|
|
|
+ class="query-control query-control--date" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
@@ -342,8 +335,7 @@ onMounted(() => {
|
|
|
type="primary"
|
|
|
plain
|
|
|
@click="openForm('create')"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:create']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:create']">
|
|
|
<Icon icon="ep:plus" class="mr-5px" />{{ t('operationFill.add') }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -351,8 +343,7 @@ onMounted(() => {
|
|
|
plain
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:export']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:export']">
|
|
|
<Icon icon="ep:download" class="mr-5px" />导出
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -368,15 +359,13 @@ onMounted(() => {
|
|
|
:width="width"
|
|
|
:height="height"
|
|
|
:max-height="height"
|
|
|
- show-border
|
|
|
- >
|
|
|
+ show-border>
|
|
|
<ZmTableColumn
|
|
|
type="index"
|
|
|
:label="t('iotDevice.serial')"
|
|
|
:width="70"
|
|
|
fixed="left"
|
|
|
- hide-in-column-settings
|
|
|
- />
|
|
|
+ hide-in-column-settings />
|
|
|
<ZmTableColumn prop="name" :label="t('bomList.name')" fixed="left" min-width="300" />
|
|
|
<ZmTableColumn prop="deptName" :label="t('iotDevice.dept')" min-width="150" />
|
|
|
<ZmTableColumn prop="result" :label="t('bomList.status')" width="120">
|
|
|
@@ -399,14 +388,12 @@ onMounted(() => {
|
|
|
<ZmTableColumn
|
|
|
prop="responsiblePersonName"
|
|
|
:label="t('iotMaintain.PersonInCharge')"
|
|
|
- min-width="150"
|
|
|
- />
|
|
|
+ min-width="150" />
|
|
|
<ZmTableColumn
|
|
|
prop="createTime"
|
|
|
:label="t('dict.createTime')"
|
|
|
:formatter="dateFormatter2"
|
|
|
- width="180"
|
|
|
- />
|
|
|
+ width="180" />
|
|
|
<ZmTableColumn prop="updateTime" :label="t('dict.fillTime')" width="180">
|
|
|
<template #default="{ row }">
|
|
|
<span v-if="row.result == 2">{{ formatCellDate(row.updateTime) }}</span>
|
|
|
@@ -419,8 +406,7 @@ onMounted(() => {
|
|
|
link
|
|
|
:type="getDelayReasonButtonType(row.delayReason)"
|
|
|
@click="openDelayReasonDialog(row)"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:update']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:update']">
|
|
|
{{ t('mainPlan.delayed') || '延时' }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -428,16 +414,14 @@ onMounted(() => {
|
|
|
link
|
|
|
type="primary"
|
|
|
@click="openForm('update', row.id)"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:update']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:update']">
|
|
|
{{ t('operationFill.fill') }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
link
|
|
|
type="primary"
|
|
|
@click="detail(row.id)"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:query']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:query']">
|
|
|
{{ t('operationFill.view') }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -445,8 +429,7 @@ onMounted(() => {
|
|
|
link
|
|
|
type="danger"
|
|
|
@click="handleBack(row.id)"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:back']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:back']">
|
|
|
{{ t('workOrderMaterial.back') }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -459,8 +442,7 @@ onMounted(() => {
|
|
|
type="warning"
|
|
|
class="warning-btn"
|
|
|
@click="openModifyForm('modify', row.id)"
|
|
|
- v-hasPermi="['pms:iot-main-work-order:update']"
|
|
|
- >
|
|
|
+ v-hasPermi="['pms:iot-main-work-order:update']">
|
|
|
{{ t('modelTemplate.update') }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
@@ -481,8 +463,7 @@ onMounted(() => {
|
|
|
:total="total"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
@size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -491,14 +472,12 @@ onMounted(() => {
|
|
|
v-model="delayReasonDialogVisible"
|
|
|
:title="t('workOrderMaterial.delayReason') || '延时原因'"
|
|
|
width="500px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- >
|
|
|
+ :close-on-click-modal="false">
|
|
|
<el-form
|
|
|
ref="delayReasonFormRef"
|
|
|
:model="delayReasonForm"
|
|
|
:rules="delayReasonRules"
|
|
|
- label-width="0px"
|
|
|
- >
|
|
|
+ label-width="0px">
|
|
|
<el-form-item label=" " prop="delayReason" class="required-item" label-width="16px">
|
|
|
<el-input
|
|
|
v-model="delayReasonForm.delayReason"
|
|
|
@@ -506,8 +485,7 @@ onMounted(() => {
|
|
|
:rows="4"
|
|
|
:placeholder="t('workOrderMaterial.inputDelayReason') || '请输入延时原因'"
|
|
|
maxlength="500"
|
|
|
- show-word-limit
|
|
|
- />
|
|
|
+ show-word-limit />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|