|
@@ -4,69 +4,68 @@
|
|
<section class="list-part-container" style="flex: 2">
|
|
<section class="list-part-container" style="flex: 2">
|
|
<!-- 搜索区 -->
|
|
<!-- 搜索区 -->
|
|
<el-form class="list-search-container" ref="queryRef" :inline="true">
|
|
<el-form class="list-search-container" ref="queryRef" :inline="true">
|
|
- <el-form-item class="section-title" label="资源组"/>
|
|
|
|
|
|
+ <el-form-item class="section-title" label="资源组" />
|
|
<el-form-item class="section-title" label="请选择当前工段:">
|
|
<el-form-item class="section-title" label="请选择当前工段:">
|
|
<el-select-v2
|
|
<el-select-v2
|
|
- v-model="queryParams.deptId"
|
|
|
|
- :options="deptList"
|
|
|
|
- placeholder="请选择工段"
|
|
|
|
- style="width: 100%"
|
|
|
|
- @change="handleChangeDeptId"
|
|
|
|
|
|
+ v-model="queryParams.deptId"
|
|
|
|
+ :options="deptList"
|
|
|
|
+ placeholder="请选择工段"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ @change="handleChangeDeptId"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="资源组名称:">
|
|
<el-form-item label="资源组名称:">
|
|
<el-input
|
|
<el-input
|
|
- placeholder="请输入资源组名称"
|
|
|
|
- v-model.trim="queryParams.code"
|
|
|
|
- style="width: 150px"
|
|
|
|
- clearable
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
|
|
+ placeholder="请输入资源组名称"
|
|
|
|
+ v-model.trim="queryParams.code"
|
|
|
|
+ style="width: 150px"
|
|
|
|
+ clearable
|
|
|
|
+ @keydown.enter.prevent
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
<el-button
|
|
- type="info"
|
|
|
|
- icon="Search"
|
|
|
|
- :disabled="deptList.length === 0"
|
|
|
|
- @click="handleQuery"
|
|
|
|
- >搜索
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ type="info"
|
|
|
|
+ icon="Search"
|
|
|
|
+ :disabled="deptList.length === 0"
|
|
|
|
+ @click="handleQuery"
|
|
|
|
+ >搜索
|
|
|
|
+ </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
<el-table
|
|
<el-table
|
|
- ref="resourceGroupTable"
|
|
|
|
- :data="resourceGroupList"
|
|
|
|
- v-loading="resourceGroupLoading"
|
|
|
|
- highlight-current-row
|
|
|
|
- height="100%"
|
|
|
|
- @current-change="handleResourceGroupCurrentChange"
|
|
|
|
|
|
+ ref="resourceGroupTable"
|
|
|
|
+ :data="resourceGroupList"
|
|
|
|
+ v-loading="resourceGroupLoading"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ height="100%"
|
|
|
|
+ @current-change="handleResourceGroupCurrentChange"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="行号"
|
|
|
|
- type="index"
|
|
|
|
- width="50"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="行号"
|
|
|
|
+ type="index"
|
|
|
|
+ width="50"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="资源组名称"
|
|
|
|
- width="70"
|
|
|
|
- prop="code"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="资源组名称"
|
|
|
|
+ width="70"
|
|
|
|
+ prop="code"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="资源组人员"
|
|
|
|
- width="200"
|
|
|
|
- prop="nickName"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="资源组人员"
|
|
|
|
+ width="200"
|
|
|
|
+ prop="nickName"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column label="设备编码" width="120" align="center">
|
|
<el-table-column label="设备编码" width="120" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in scope.row.groupEquipmentList"
|
|
|
|
- :key="index"
|
|
|
|
|
|
+ v-for="(item, index) in scope.row.groupEquipmentList"
|
|
|
|
+ :key="index"
|
|
>
|
|
>
|
|
<div style="height: auto">{{ item.commonCode }}</div>
|
|
<div style="height: auto">{{ item.commonCode }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -75,8 +74,8 @@
|
|
<el-table-column label="设备名称" align="center">
|
|
<el-table-column label="设备名称" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in scope.row.groupEquipmentList"
|
|
|
|
- :key="index"
|
|
|
|
|
|
+ v-for="(item, index) in scope.row.groupEquipmentList"
|
|
|
|
+ :key="index"
|
|
>
|
|
>
|
|
<div style="height: auto">{{ item.commonName }}</div>
|
|
<div style="height: auto">{{ item.commonName }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -90,119 +89,116 @@
|
|
<section class="list-part-container" style="flex: 2">
|
|
<section class="list-part-container" style="flex: 2">
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form-item
|
|
<el-form-item
|
|
- class="section-title"
|
|
|
|
- label="生产计划"
|
|
|
|
- label-width="60px"
|
|
|
|
|
|
+ class="section-title"
|
|
|
|
+ label="生产计划"
|
|
|
|
+ label-width="60px"
|
|
/>
|
|
/>
|
|
<el-form-item label="生产计划信息:">
|
|
<el-form-item label="生产计划信息:">
|
|
<el-input
|
|
<el-input
|
|
- v-model.trim="queryItemParams.productionPlanNo"
|
|
|
|
- placeholder="请输入厂家/生产计划单号/产品描述"
|
|
|
|
- clearable
|
|
|
|
- style="width: 250px"
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
|
|
+ v-model.trim="queryItemParams.productionPlanNo"
|
|
|
|
+ placeholder="请输入厂家/生产计划单号/产品描述"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 250px"
|
|
|
|
+ @keydown.enter.prevent
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
<el-button
|
|
- type="info"
|
|
|
|
- icon="Search"
|
|
|
|
- :disabled="!currentResourceGroup.id"
|
|
|
|
- @click="handleQueryPlanDetails"
|
|
|
|
- >搜索
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ type="info"
|
|
|
|
+ icon="Search"
|
|
|
|
+ :disabled="!currentResourceGroup.id"
|
|
|
|
+ @click="handleQueryPlanDetails"
|
|
|
|
+ >搜索
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
- type="primary"
|
|
|
|
- icon="Plus"
|
|
|
|
- :disabled="!currentResourceGroup.id"
|
|
|
|
- @click="handleOpenPlanDetailDialog()"
|
|
|
|
- >新增
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="Plus"
|
|
|
|
+ :disabled="!currentResourceGroup.id"
|
|
|
|
+ @click="handleOpenPlanDetailDialog()"
|
|
|
|
+ >新增
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- :disabled="!currentResourceGroup.id || planDetailIds.length == 0"
|
|
|
|
- @click="handleDeletePlanDetail()"
|
|
|
|
- >批量删除
|
|
|
|
- </el-button
|
|
|
|
- >
|
|
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="Delete"
|
|
|
|
+ :disabled="!currentResourceGroup.id || planDetailIds.length == 0"
|
|
|
|
+ @click="handleDeletePlanDetail()"
|
|
|
|
+ >批量删除
|
|
|
|
+ </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
<el-table
|
|
<el-table
|
|
- ref="planDetailsTable"
|
|
|
|
- v-loading="planDetailLoading"
|
|
|
|
- row-key="id"
|
|
|
|
- :data="planDetailList"
|
|
|
|
- highlight-current-row
|
|
|
|
- height="100%"
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
|
|
+ ref="planDetailsTable"
|
|
|
|
+ v-loading="planDetailLoading"
|
|
|
|
+ row-key="id"
|
|
|
|
+ :data="planDetailList"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ height="100%"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
- <el-table-column type="selection" width="40" align="center"/>
|
|
|
|
|
|
+ <el-table-column type="selection" width="40" align="center" />
|
|
<el-table-column
|
|
<el-table-column
|
|
- type="index"
|
|
|
|
- label="行号"
|
|
|
|
- width="50"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ type="index"
|
|
|
|
+ label="行号"
|
|
|
|
+ width="50"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="厂家"
|
|
|
|
- prop="companyAlias"
|
|
|
|
- width="150"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="厂家"
|
|
|
|
+ prop="companyAlias"
|
|
|
|
+ width="150"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="生产计划单号"
|
|
|
|
- prop="productionPlanNo"
|
|
|
|
- width="100"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="生产计划单号"
|
|
|
|
+ prop="productionPlanNo"
|
|
|
|
+ width="100"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="序号"
|
|
|
|
- width="60"
|
|
|
|
- prop="lineNumber"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="序号"
|
|
|
|
+ width="60"
|
|
|
|
+ prop="lineNumber"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="产品描述"
|
|
|
|
- prop="productDescription"
|
|
|
|
- width="350"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="产品描述"
|
|
|
|
+ prop="productDescription"
|
|
|
|
+ width="350"
|
|
|
|
+ align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="投产日期"
|
|
|
|
- prop="issuanceDate"
|
|
|
|
- width="100"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="投产日期"
|
|
|
|
+ prop="issuanceDate"
|
|
|
|
+ width="100"
|
|
|
|
+ align="center"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{
|
|
<span>{{
|
|
- proxy.moment(scope.row.issuanceDate).format("YYYY-MM-DD")
|
|
|
|
- }}</span>
|
|
|
|
|
|
+ proxy.moment(scope.row.issuanceDate).format("YYYY-MM-DD")
|
|
|
|
+ }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="批次数"
|
|
|
|
- prop="lotTotalNumber"
|
|
|
|
- width="70"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ label="批次数"
|
|
|
|
+ prop="lotTotalNumber"
|
|
|
|
+ width="70"
|
|
|
|
+ align="center"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- fixed="right"
|
|
|
|
- label="操作"
|
|
|
|
- width="80"
|
|
|
|
- align="center"
|
|
|
|
|
|
+ fixed="right"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="80"
|
|
|
|
+ align="center"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
- icon="delete"
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- @click="handleDelPlanDetail(scope.row)"
|
|
|
|
- >删除
|
|
|
|
|
|
+ icon="delete"
|
|
|
|
+ link
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="handleDelPlanDetail(scope.row)"
|
|
|
|
+ >删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -211,33 +207,33 @@
|
|
</div>
|
|
</div>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<pagination
|
|
<pagination
|
|
- v-show="itemTotal > 0"
|
|
|
|
- :total="itemTotal"
|
|
|
|
- v-model:page="queryItemParams.pageNum"
|
|
|
|
- v-model:limit="queryItemParams.pageSize"
|
|
|
|
- @pagination="getPlanDetail"
|
|
|
|
|
|
+ v-show="itemTotal > 0"
|
|
|
|
+ :total="itemTotal"
|
|
|
|
+ v-model:page="queryItemParams.pageNum"
|
|
|
|
+ v-model:limit="queryItemParams.pageSize"
|
|
|
|
+ @pagination="getPlanDetail"
|
|
/>
|
|
/>
|
|
</section>
|
|
</section>
|
|
<!-- 生产计划分配弹窗 -->
|
|
<!-- 生产计划分配弹窗 -->
|
|
<plan-detail-dialog
|
|
<plan-detail-dialog
|
|
- ref="planDetailRef"
|
|
|
|
- :multiple-selected="handlePlanDetailSelected"
|
|
|
|
|
|
+ ref="planDetailRef"
|
|
|
|
+ :multiple-selected="handlePlanDetailSelected"
|
|
></plan-detail-dialog>
|
|
></plan-detail-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import {listResourceGroup} from "@/api/business/resourceGroup.js";
|
|
|
|
|
|
+import { listResourceGroup } from "@/api/business/resourceGroup.js";
|
|
import {
|
|
import {
|
|
listResourcePlan,
|
|
listResourcePlan,
|
|
saveBatchResourcePlan,
|
|
saveBatchResourcePlan,
|
|
delResourcePlan,
|
|
delResourcePlan,
|
|
} from "@/api/business/resourcePlan.js";
|
|
} from "@/api/business/resourcePlan.js";
|
|
-import {getDept} from "@/api/business/planDetailSubDetail.js";
|
|
|
|
|
|
+import { getDept } from "@/api/business/planDetailSubDetail.js";
|
|
import planDetailDialog from "./form";
|
|
import planDetailDialog from "./form";
|
|
-import {ref} from "vue";
|
|
|
|
|
|
+import { ref } from "vue";
|
|
|
|
|
|
-const {proxy} = getCurrentInstance();
|
|
|
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
|
|
|
/**资源组*/
|
|
/**资源组*/
|
|
const resourceGroupList = ref([]);
|
|
const resourceGroupList = ref([]);
|
|
@@ -353,15 +349,14 @@ function handleSelectionChange(selection) {
|
|
/**多选删除生产计划 */
|
|
/**多选删除生产计划 */
|
|
function handleDeletePlanDetail() {
|
|
function handleDeletePlanDetail() {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
- .confirm("是否确认删除选中的数据项?")
|
|
|
|
- .then(function () {
|
|
|
|
- delResourcePlan(planDetailIds.value).then((res) => {
|
|
|
|
- getPlanDetail();
|
|
|
|
- proxy.$modal.msgSuccess("删除成功!");
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
|
|
+ .confirm("是否确认删除选中的数据项?")
|
|
|
|
+ .then(function () {
|
|
|
|
+ delResourcePlan(planDetailIds.value).then((res) => {
|
|
|
|
+ getPlanDetail();
|
|
|
|
+ proxy.$modal.msgSuccess("删除成功!");
|
|
});
|
|
});
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
}
|
|
}
|
|
|
|
|
|
/** 生产计划带回 */
|
|
/** 生产计划带回 */
|
|
@@ -374,6 +369,7 @@ function handlePlanDetailSelected(selection) {
|
|
planDetailInfo.technologicalProcessId = selection[i].technologicalProcessId;
|
|
planDetailInfo.technologicalProcessId = selection[i].technologicalProcessId;
|
|
planDetailInfo.resourceGroupId = currentResourceGroup.value.id;
|
|
planDetailInfo.resourceGroupId = currentResourceGroup.value.id;
|
|
planDetailInfo.resourceGroupCode = currentResourceGroup.value.code;
|
|
planDetailInfo.resourceGroupCode = currentResourceGroup.value.code;
|
|
|
|
+ planDetailInfo.deptId = queryParams.value.deptId;
|
|
planDetail.push(planDetailInfo);
|
|
planDetail.push(planDetailInfo);
|
|
}
|
|
}
|
|
saveBatchResourcePlan(planDetail).then((res) => {
|
|
saveBatchResourcePlan(planDetail).then((res) => {
|
|
@@ -387,15 +383,14 @@ function handlePlanDetailSelected(selection) {
|
|
/**生产计划删除 */
|
|
/**生产计划删除 */
|
|
function handleDelPlanDetail(row) {
|
|
function handleDelPlanDetail(row) {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
- .confirm("是否确认删除选中的数据项?")
|
|
|
|
- .then(function () {
|
|
|
|
- delResourcePlan(row.id).then((res) => {
|
|
|
|
- getPlanDetail();
|
|
|
|
- proxy.$modal.msgSuccess("删除成功!");
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
|
|
+ .confirm("是否确认删除选中的数据项?")
|
|
|
|
+ .then(function () {
|
|
|
|
+ delResourcePlan(row.id).then((res) => {
|
|
|
|
+ getPlanDetail();
|
|
|
|
+ proxy.$modal.msgSuccess("删除成功!");
|
|
});
|
|
});
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|