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