|
|
|
|
@ -10,25 +10,24 @@
|
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
|
|
<el-table-column label="产品" align="center" prop="productName" width="140px" sortable/>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unitName" />
|
|
|
|
|
<el-table-column label="数量" align="center" prop="number" />
|
|
|
|
|
<el-table-column label="产品" prop="productName" width="220px" sortable/>
|
|
|
|
|
<!-- <el-table-column label="单位" align="center" prop="unitName" />-->
|
|
|
|
|
<el-table-column label="数量/个" align="center" prop="number" />
|
|
|
|
|
<el-table-column label="已计划" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="每包/个" align="center" prop="packageSize" />
|
|
|
|
|
<!-- <el-table-column label="每包/个" align="center" prop="packageSize" />-->
|
|
|
|
|
<el-table-column label="交货日期" align="center" prop="finishDate" :formatter="dateFormatter2"/>
|
|
|
|
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
|
|
|
|
<el-table-column label="技术要求" align="center" prop="techRequirements" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-link @click="openFormView('detail', scope.row.id)" v-if="scope.row.remark" type="warning">
|
|
|
|
|
查看详情
|
|
|
|
|
</el-link>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="备注" align="center" prop="remark" >-->
|
|
|
|
|
<!-- <template #default="scope">-->
|
|
|
|
|
<!-- <el-link @click="openFormView('detail', scope.row.id)" v-if="scope.row.remark" type="warning">-->
|
|
|
|
|
<!-- 查看详情-->
|
|
|
|
|
<!-- </el-link>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="订单单号" align="center" prop="saleOrderCode" />-->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" align="center" width="250px">
|
|
|
|
|
<el-table-column label="操作" align="center" width="300px">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
@ -43,11 +42,19 @@
|
|
|
|
|
>
|
|
|
|
|
物料
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="warning"
|
|
|
|
|
@click="addPlanForm(scope.row.taskId,scope.row.id, scope.row.productId, scope.row.number-scope.row.planNumber)"
|
|
|
|
|
v-hasPermi="['mes:task:plan']"
|
|
|
|
|
>
|
|
|
|
|
新增计划
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="props.taskStatus>1"
|
|
|
|
|
link
|
|
|
|
|
type="success"
|
|
|
|
|
@click="openTaskPlanForm(scope.row.id, scope.row.productId, scope.row.productName, scope.row.number, scope.row.planNumber)"
|
|
|
|
|
@click="openTaskPlanForm(scope.row.taskId,scope.row.id, scope.row.productId, scope.row.productName, scope.row.number, scope.row.planNumber)"
|
|
|
|
|
v-hasPermi="['mes:task:plan']"
|
|
|
|
|
>
|
|
|
|
|
排产
|
|
|
|
|
@ -88,7 +95,8 @@
|
|
|
|
|
<ItemNeedIndex ref="itemNeedFormRef" @success="getList" />
|
|
|
|
|
<!-- 排程弹窗 -->
|
|
|
|
|
<TaskPlanForm ref="taskPlanFormRef" @success="getList" />
|
|
|
|
|
|
|
|
|
|
<!-- 新增计划表单弹窗:添加 -->
|
|
|
|
|
<PlanForm ref="planFormRef" @success="getList" />
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import {dateFormatter, dateFormatter2} from '@/utils/formatTime'
|
|
|
|
|
@ -97,6 +105,7 @@ import TaskDetailForm from './TaskDetailForm.vue'
|
|
|
|
|
import TaskDetailView from './TaskDetailView.vue'
|
|
|
|
|
import ItemNeedIndex from "@/views/mes/bom/ItemNeedIndex.vue";
|
|
|
|
|
import TaskPlanForm from "@/views/mes/task/components/PlanPlan.vue";
|
|
|
|
|
import PlanForm from "@/views/mes/plan/PlanForm.vue";
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
@ -183,9 +192,21 @@ const openItemNeed = (productName:string, productId: number, number:number) => {
|
|
|
|
|
number = number>0 ? number : 0;
|
|
|
|
|
itemNeedFormRef.value.open("product",productName, productId, number)
|
|
|
|
|
}
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
|
|
const planFormRef = ref()
|
|
|
|
|
const addPlanForm = (taskId: number,taskDetailId: number, productId: number, number?: number) => {
|
|
|
|
|
if (!props.taskId) {
|
|
|
|
|
message.error('请选择一个生产任务单')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
planFormRef.value.open("create",null,taskId, productId, number, taskDetailId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 单个计划排产 */
|
|
|
|
|
const taskPlanFormRef = ref()
|
|
|
|
|
const openTaskPlanForm = (taskDetailId: number, productId: number, productName:string, num:number,finishNumber:number) => {
|
|
|
|
|
taskPlanFormRef.value.open(taskDetailId,productId, productName, num, finishNumber )
|
|
|
|
|
const openTaskPlanForm = (taskId:number, taskDetailId: number, productId: number,
|
|
|
|
|
productName:String, num:number, planNumber:number) => {
|
|
|
|
|
taskPlanFormRef.value.open(taskId,taskDetailId,productId, productName, num, planNumber )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|