feat:生产计划-添加已开工tabs

pull/1/head
黄伟杰 1 month ago
parent fd59c97e0e
commit 972bf17c56

@ -3485,6 +3485,7 @@ export default {
buttonExportText: 'Export',
tabPlannedLabel: 'Scheduled',
tabStartLabel: 'Started',
tabTrialLabel: 'Trial',
tabMassLabel: 'Mass Production',
tabPausedLabel: 'Paused',
@ -3516,6 +3517,7 @@ export default {
actionTrialLabel: 'Trial',
actionInspectLabel: 'Inspect',
actionMassLabel: 'Mass Production',
actionStartLabel: 'Start',
actionBaogongLabel: 'Report',
actionPauseLabel: 'Pause',
actionFinishLabel: 'Finish',

@ -3330,6 +3330,7 @@ export default {
buttonExportText: '导出',
tabPlannedLabel: '已排产',
tabStartLabel: '已开工',
tabTrialLabel: '试产',
tabMassLabel: '量产',
tabPausedLabel: '暂停',
@ -3361,6 +3362,7 @@ export default {
actionTrialLabel: '试产',
actionInspectLabel: '检验',
actionMassLabel: '量产',
actionStartLabel: '开工',
actionBaogongLabel: '报工',
actionPauseLabel: '暂停',
actionFinishLabel: '完工',

@ -1,93 +1,47 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="auto"
>
<el-form-item :label="t('ProductionPlan.Plan.searchTaskLabel')" prop="taskId">
<el-select
v-model="queryParams.taskId"
@change="handleQuery"
clearable
filterable
:placeholder="t('ProductionPlan.Plan.searchTaskPlaceholder')"
class="!w-180px"
>
<el-option
v-for="item in taskList"
:key="item.id"
:label="item.code"
:value="String(item.id)"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchCodeLabel')" prop="code">
<el-input
v-model="queryParams.code"
:placeholder="t('ProductionPlan.Plan.searchCodePlaceholder')"
clearable
@keyup.enter="handleQuery"
class="!w-180px"
/>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchProductLabel')" prop="productId">
<el-select
v-model="queryParams.productId"
@change="handleQuery"
clearable
filterable
:placeholder="t('ProductionPlan.Plan.searchProductPlaceholder')"
class="!w-180px"
>
<el-option
v-for="item in productList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchRemarkLabel')" prop="remark">
<el-input
v-model="queryParams.remark"
:placeholder="t('ProductionPlan.Plan.searchRemarkPlaceholder')"
clearable
@keyup.enter="handleQuery"
class="!w-180px"
/>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchPlanStartLabel')" prop="planStartTime">
<el-date-picker
v-model="queryParams.planStartTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
@change="handleQuery"
:start-placeholder="t('ProductionPlan.Plan.searchPlanStartStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Plan.searchPlanStartEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchPlanEndLabel')" prop="planEndTime">
<el-date-picker
v-model="queryParams.planEndTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
@change="handleQuery"
:start-placeholder="t('ProductionPlan.Plan.searchPlanEndStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Plan.searchPlanEndEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonSearchText') }}</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonResetText') }}</el-button>
<!-- <el-button
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="auto">
<el-form-item :label="t('ProductionPlan.Plan.searchTaskLabel')" prop="taskId">
<el-select v-model="queryParams.taskId" @change="handleQuery" clearable filterable
:placeholder="t('ProductionPlan.Plan.searchTaskPlaceholder')" class="!w-180px">
<el-option v-for="item in taskList" :key="item.id" :label="item.code" :value="String(item.id)" />
</el-select>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchCodeLabel')" prop="code">
<el-input v-model="queryParams.code" :placeholder="t('ProductionPlan.Plan.searchCodePlaceholder')" clearable
@keyup.enter="handleQuery" class="!w-180px" />
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchProductLabel')" prop="productId">
<el-select v-model="queryParams.productId" @change="handleQuery" clearable filterable
:placeholder="t('ProductionPlan.Plan.searchProductPlaceholder')" class="!w-180px">
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchRemarkLabel')" prop="remark">
<el-input v-model="queryParams.remark" :placeholder="t('ProductionPlan.Plan.searchRemarkPlaceholder')" clearable
@keyup.enter="handleQuery" class="!w-180px" />
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchPlanStartLabel')" prop="planStartTime">
<el-date-picker v-model="queryParams.planStartTime" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
@change="handleQuery" :start-placeholder="t('ProductionPlan.Plan.searchPlanStartStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Plan.searchPlanStartEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
</el-form-item>
<el-form-item :label="t('ProductionPlan.Plan.searchPlanEndLabel')" prop="planEndTime">
<el-date-picker v-model="queryParams.planEndTime" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
@change="handleQuery" :start-placeholder="t('ProductionPlan.Plan.searchPlanEndStartPlaceholder')"
:end-placeholder="t('ProductionPlan.Plan.searchPlanEndEndPlaceholder')"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonSearchText') }}
</el-button>
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonResetText') }}
</el-button>
<!-- <el-button
type="primary"
plain
@click="openForm('create')"
@ -95,16 +49,10 @@
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button> -->
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['mes:plan:export']"
>
<Icon icon="ep:download" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonExportText') }}
</el-button>
</el-form-item>
<el-button type="success" plain @click="handleExport" :loading="exportLoading" v-hasPermi="['mes:plan:export']">
<Icon icon="ep:download" class="mr-5px" /> {{ t('ProductionPlan.Plan.buttonExportText') }}
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
@ -114,27 +62,21 @@
<!-- <el-tab-pane label="所有" name="" /> -->
<!-- <el-tab-pane label="派工" name="0" /> -->
<el-tab-pane :label="t('ProductionPlan.Plan.tabPlannedLabel')" name="1" />
<el-tab-pane :label="t('ProductionPlan.Plan.tabTrialLabel')" name="6" />
<el-tab-pane :label="t('ProductionPlan.Plan.tabMassLabel')" name="2" />
<el-tab-pane :label="t('ProductionPlan.Plan.tabStartLabel')" name="8" />
<!-- <el-tab-pane :label="t('ProductionPlan.Plan.tabTrialLabel')" name="6" /> -->
<!-- <el-tab-pane :label="t('ProductionPlan.Plan.tabMassLabel')" name="2" /> -->
<el-tab-pane :label="t('ProductionPlan.Plan.tabPausedLabel')" name="3" />
<el-tab-pane :label="t('ProductionPlan.Plan.tabToStoreLabel')" name="4" />
<el-tab-pane :label="t('ProductionPlan.Plan.tabStoredLabel')" name="5" />
</el-tabs>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
row-key="id"
>
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<!-- 投料进度子表的列表 -->
<el-table-column type="expand">
<el-table-column type="expand">
<template #default="scope">
<el-tabs v-if="scope.row.status <= 1 && scope.row.status != 6" model-value="itemRequisitionDetail">
<el-tab-pane :label="t('ProductionPlan.Plan.detailItemRequisitionTabLabel')" name="itemRequisitionDetail" >
<el-tabs v-if="scope.row.status <= 1 && scope.row.status != 6" model-value="itemRequisitionDetail">
<el-tab-pane :label="t('ProductionPlan.Plan.detailItemRequisitionTabLabel')" name="itemRequisitionDetail">
<ItemRequisitionDetailList :item-requisition-id="scope.row.requisitionId" />
</el-tab-pane>
</el-tab-pane>
<!-- <el-tab-pane label="派工记录" name="paigongRecord">
<PaigongRecordList :plan-id="scope.row.id"/>
</el-tab-pane> -->
@ -144,31 +86,38 @@
<PaigongRecordList :plan-id="scope.row.id"/>
</el-tab-pane>
</el-tabs> -->
<el-tabs v-if="scope.row.status == 6" model-value="zj">
<el-tabs v-if="scope.row.status == 6" model-value="zj">
<el-tab-pane :label="t('ProductionPlan.Plan.detailInspectTabLabel')" name="zj">
<ZjProductPreList
:ticket="scope.row.id"
@inspectable-change="(hasPending) => setInspectable(scope.row.id, hasPending)"
/>
<ZjProductPreList :ticket="scope.row.id"
@inspectable-change="(hasPending) => setInspectable(scope.row.id, hasPending)" />
</el-tab-pane>
</el-tabs>
<el-tabs v-if="scope.row.status >= 2 && scope.row.status != 6" model-value="itemRequisitionDetail">
<el-tab-pane :label="t('ProductionPlan.Plan.detailItemRequisitionTabLabel')" name="itemRequisitionDetail" >
<el-tabs v-if="scope.row.status >= 2 && scope.row.status != 6" model-value="itemRequisitionDetail">
<el-tab-pane :label="t('ProductionPlan.Plan.detailItemRequisitionTabLabel')" name="itemRequisitionDetail">
<ItemRequisitionDetailList :item-requisition-id="scope.row.requisitionId" />
</el-tab-pane>
</el-tab-pane>
<el-tab-pane :label="t('ProductionPlan.Plan.detailBaogongRecordTabLabel')" name="baogongRecord">
<BaogongRecordList :plan-id="scope.row.id"/>
<BaogongRecordList :plan-id="scope.row.id" />
</el-tab-pane>
<el-tab-pane :label="t('ProductionPlan.Plan.detailInspectTabLabel')" name="zj" v-if="scope.row.status == 8">
<ZjProductPreList :ticket="scope.row.id"
@inspectable-change="(hasPending) => setInspectable(scope.row.id, hasPending)" />
</el-tab-pane>
</el-tabs>
</template>
</el-table-column>
<el-table-column :label="t('ProductionPlan.Plan.tableCodeColumn')" align="center" prop="code" min-width="180px" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tableProductColumn')" align="center" prop="productName" min-width="200px" sortable/>
<!-- <el-table-column label="任务单" align="center" prop="taskCode" min-width="150px" sortable />-->
<el-table-column :label="t('ProductionPlan.Plan.tableDeviceNameColumn')" align="center" prop="deviceName" sortable />
<el-table-column :label="t('ProductionPlan.Plan.tablePlanNumberColumn')" align="center" prop="planNumber" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tableFinishNumberColumn')" align="center" prop="wangongNumber" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tablePassRateColumn')" align="center" prop="passRate" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tableCodeColumn')" align="center" prop="code" min-width="180px"
sortable />
<el-table-column :label="t('ProductionPlan.Plan.tableProductColumn')" align="center" prop="productName"
min-width="200px" sortable />
<!-- <el-table-column label="任务单" align="center" prop="taskCode" min-width="150px" sortable />-->
<el-table-column :label="t('ProductionPlan.Plan.tableDeviceNameColumn')" align="center" prop="deviceName"
sortable />
<el-table-column :label="t('ProductionPlan.Plan.tablePlanNumberColumn')" align="center" prop="planNumber"
sortable />
<el-table-column :label="t('ProductionPlan.Plan.tableFinishNumberColumn')" align="center" prop="wangongNumber"
sortable />
<el-table-column :label="t('ProductionPlan.Plan.tablePassRateColumn')" align="center" prop="passRate" sortable />
<!-- <el-table-column label="热压数量" align="center" prop="reyaNumber" /> -->
<el-table-column :label="t('ProductionPlan.Plan.tableStatusColumn')" align="center" prop="status" sortable>
<template #default="scope">
@ -181,77 +130,48 @@
</template>
</el-table-column> -->
<!-- <el-table-column label="领料人" align="center" prop="productionManagerName" sortable /> -->
<el-table-column :label="t('ProductionPlan.Plan.tablePlanStartTimeColumn')" align="center" prop="planStartTime" :formatter="dateFormatter2" width="150px" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tablePlanEndTimeColumn')" align="center" prop="planEndTime" :formatter="dateFormatter2" width="150px" sortable/>
<el-table-column :label="t('ProductionPlan.Plan.tableIsZjColumn')" align="center" prop="isZj" v-if="activeName === '6'">
<template #default="scope">
<el-table-column :label="t('ProductionPlan.Plan.tablePlanStartTimeColumn')" align="center" prop="planStartTime"
:formatter="dateFormatter2" width="150px" sortable />
<el-table-column :label="t('ProductionPlan.Plan.tablePlanEndTimeColumn')" align="center" prop="planEndTime"
:formatter="dateFormatter2" width="150px" sortable />
<el-table-column :label="t('ProductionPlan.Plan.tableIsZjColumn')" align="center" prop="isZj"
v-if="activeName === '6'">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MES_ZJ_PRODUCT" :value="scope.row.isZj" />
</template>
</template>
</el-table-column>
<!-- <el-table-column :label="t('ProductionPlan.Plan.tableRemarkColumn')" align="center" prop="remark" /> -->
<el-table-column :label="t('ProductionPlan.Plan.tableOperateColumn')" align="center" fixed="right" width="350">
<template #default="scope">
<el-button
link
type="info"
@click="openDetail(scope.row.id)"
v-hasPermi="['mes:plan:query']"
>
{{ t('ProductionPlan.Plan.actionDetailLabel') }}
<el-button link type="info" @click="openDetail(scope.row.id)" v-hasPermi="['mes:plan:query']">
{{ t('ProductionPlan.Plan.actionDetailLabel') }}
</el-button>
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 0"
>
<el-button link type="primary" @click="openForm('update', scope.row.id)" v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 0">
{{ t('ProductionPlan.Plan.actionEditLabel') }}
</el-button>
<el-button
link
type="info"
@click="openItemNeed(scope.row.code, scope.row.id)"
v-hasPermi="['mes:task:query']"
>
<el-button link type="info" @click="openItemNeed(scope.row.code, scope.row.id)"
v-hasPermi="['mes:task:query']">
{{ t('ProductionPlan.Plan.actionMaterialLabel') }}
</el-button>
<el-button
link
type="primary"
@click="openPaiForm(scope.row.code, scope.row.id)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 0"
>
<el-button link type="primary" @click="openPaiForm(scope.row.code, scope.row.id)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 0">
{{ t('ProductionPlan.Plan.actionDispatchFeedingLabel') }}
</el-button>
<el-button
link
type="primary"
@click="openTypePaiForm(scope.row.code, scope.row.id)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 0"
>
<el-button link type="primary" @click="openTypePaiForm(scope.row.code, scope.row.id)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 0">
{{ t('ProductionPlan.Plan.actionDispatchProcessLabel') }}
</el-button>
<el-button
link
type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'pre',6, t('ProductionPlan.Plan.actionTrialLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 1 && scope.row.isPreProduction === 1"
>
<el-button link type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'pre', 6, t('ProductionPlan.Plan.actionTrialLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 1 && scope.row.isPreProduction === 1">
{{ t('ProductionPlan.Plan.actionTrialLabel') }}
</el-button>
<el-button
link
type="primary"
@click.stop="handleInspectExpand(scope.row)"
v-if="scope.row.status === 6 && inspectableMap[scope.row.id] !== false"
>
<el-button link type="primary" @click.stop="handleInspectExpand(scope.row)"
v-if="scope.row.status === 6 && inspectableMap[scope.row.id] !== false">
{{ t('ProductionPlan.Plan.actionInspectLabel') }}
</el-button>
<el-button
<!-- <el-button
link
type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'start',2, t('ProductionPlan.Plan.actionMassLabel'), scope.row.isZj)"
@ -259,62 +179,42 @@
v-if="(scope.row.status === 1 && scope.row.isPreProduction === 0) || scope.row.status === 6"
>
{{ t('ProductionPlan.Plan.actionMassLabel') }}
</el-button>
<el-button
link
type="primary"
</el-button> -->
<el-button link type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'commence', 8, t('ProductionPlan.Plan.actionStartLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']"
@click="openBaogongForm(scope.row.code, scope.row.id)"
v-if="scope.row.status === 2"
>
v-if="(scope.row.status === 1 && scope.row.isPreProduction === 0) || scope.row.status === 6">
{{ t('ProductionPlan.Plan.actionStartLabel') }}
</el-button>
<el-button link type="primary" v-hasPermi="['mes:plan:update']"
@click="openBaogongForm(scope.row.code, scope.row.id)" v-if="scope.row.status === 2">
{{ t('ProductionPlan.Plan.actionBaogongLabel') }}
</el-button>
<el-button
link
type="primary"
@click="handleStatus(scope.row.code,scope.row.id, 'pause',3, t('ProductionPlan.Plan.actionPauseLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 2"
>
<el-button link type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'pause', 3, t('ProductionPlan.Plan.actionPauseLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 2">
{{ t('ProductionPlan.Plan.actionPauseLabel') }}
</el-button>
<el-button
link
type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'end',4, t('ProductionPlan.Plan.actionFinishLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 2 || scope.row.status === 3"
>
<el-button link type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'end', 4, t('ProductionPlan.Plan.actionFinishLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 2 || scope.row.status === 3">
{{ t('ProductionPlan.Plan.actionFinishLabel') }}
</el-button>
<el-button
link
type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'store',5, t('ProductionPlan.Plan.actionStoreLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']"
v-if="scope.row.status === 4"
>
<el-button link type="primary"
@click="handleStatus(scope.row.code, scope.row.id, 'store', 5, t('ProductionPlan.Plan.actionStoreLabel'), scope.row.isZj)"
v-hasPermi="['mes:plan:update']" v-if="scope.row.status === 4">
{{ t('ProductionPlan.Plan.actionStoreLabel') }}
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['mes:plan:delete']"
v-if="scope.row.status === 0"
>
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['mes:plan:delete']"
v-if="scope.row.status === 0">
{{ t('ProductionPlan.Plan.actionDeleteLabel') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
@ -325,25 +225,25 @@
<!-- 派工弹出 -->
<Paigong ref="paiFormRef" @success="getList" />
<!-- 工序派工弹出 -->
<!-- 工序派工弹出 -->
<TypePaigong ref="typePaiFormRef" @success="getList" />
<!-- 报工弹出 -->
<!-- 报工弹出 -->
<Baogong ref="baogongFormRef" @success="getList" />
<!-- 详情弹窗 -->
<!-- 详情弹窗 -->
<PlanDetail ref="detailRef" />
</template>
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import {dateFormatter2} from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import { PlanApi, PlanVO } from '@/api/mes/plan'
import PlanForm from './PlanForm.vue'
import {ProductApi, ProductVO} from "@/api/erp/product/product";
import {TaskApi, TaskVO} from "@/api/mes/task";
import { ProductApi, ProductVO } from "@/api/erp/product/product";
import { TaskApi, TaskVO } from "@/api/mes/task";
import ItemNeedIndex from "@/views/mes/bom/ItemNeedIndex.vue";
import Paigong from "./components/Paigong.vue";
import TypePaigong from "./components/TypePaigong.vue";
@ -362,7 +262,7 @@ const activeName = ref('1') // 列表 tab
const message = useMessage() //
const { t } = useI18n() //
const {query} = useRoute() //
const { query } = useRoute() //
const loading = ref(true) //
const list = ref<PlanVO[]>([]) //
const total = ref(0) //
@ -439,7 +339,7 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
} catch { }
}
/** 导出按钮操作 */
@ -461,21 +361,21 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(async () => {
//
if(query.taskId)
if (query.taskId)
queryParams.taskId = String(query.taskId)
if(query.productId)
if (query.productId)
queryParams.productId = String(query.productId)
//
productList.value = await ProductApi.getMesProductSimpleList()
taskList.value = await TaskApi.getTaskList()
if(!query.taskId || !query.productId) {
queryParams.status = '1'
if (!query.taskId || !query.productId) {
queryParams.status = '1'
}
await getList()
})
/** 物料需求 */
const itemFormRef = ref()
const openItemNeed = (planCode:string, planId: number) => {
const openItemNeed = (planCode: string, planId: number) => {
itemFormRef.value.open('plan', t('ProductionPlan.Plan.itemNeedDialogPlanTitlePrefix') + planCode, planId)
}
@ -530,8 +430,8 @@ const refreshInspectableMap = async (rows: PlanVO[]) => {
/** 开工 */
const handleStatus = async (planCode:string, id: number,
type:string, status:number, tip:string, isZj: number) => {
const handleStatus = async (planCode: string, id: number,
type: string, status: number, tip: string, isZj: number) => {
try {
// if((isZj === 0 || isZj === null) && tip === "") {
// // message.alertError("")
@ -544,7 +444,7 @@ const handleStatus = async (planCode:string, id: number,
t('ProductionPlan.Plan.statusConfirmTitle')
)
//
const data ={
const data = {
id: id,
code: type,
status: status //
@ -553,11 +453,11 @@ const handleStatus = async (planCode:string, id: number,
message.success(t('common.success'))
//
await getList()
} catch {}
} catch { }
}
/** 更新质检 */
const handleZjStatus = async (planCode:string, id: number) => {
const handleZjStatus = async (planCode: string, id: number) => {
try {
//
await message.confirm(
@ -565,14 +465,14 @@ const handleZjStatus = async (planCode:string, id: number) => {
t('ProductionPlan.Plan.inspectConfirmTitle')
)
//
const data ={
const data = {
id: id
}
await PlanApi.updatePlanZjStatus(data)
message.success(t('common.success'))
//
await getList()
} catch {}
} catch { }
}
/** tab 切换 */

Loading…
Cancel
Save