🎈 perf: 排产计划页面简化
This commit is contained in:
@@ -4,14 +4,10 @@
|
||||
<!-- 主表信息 -->
|
||||
<el-descriptions :title="'单号:' + (stockIo.stockIoCode || '-')" :column="2" border>
|
||||
<el-descriptions-item label="类型">
|
||||
<el-tag :type="getIoTypeTagType(stockIo.ioType)">
|
||||
{{ getIoTypeLabel(stockIo.ioType) }}
|
||||
</el-tag>
|
||||
<dict-tag :options="dict.type.stock_io_type" :value="stockIo.ioType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务类型">
|
||||
<el-tag :type="getBizTypeTagType(stockIo.bizType)">
|
||||
{{ getBizTypeLabel(stockIo.bizType) }}
|
||||
</el-tag>
|
||||
<dict-tag :options="dict.type.stock_biz_type" :value="stockIo.bizType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-tag :type="stockIo.status === 2 ? 'success' : (stockIo.status === 1 ? 'warning' : 'info')">
|
||||
@@ -233,7 +229,7 @@ export default {
|
||||
SemiSelect,
|
||||
MaterialSelect
|
||||
},
|
||||
dicts: ['stock_item_type'],
|
||||
dicts: ['stock_item_type', 'stock_biz_type'],
|
||||
props: {
|
||||
stockIo: {
|
||||
type: Object,
|
||||
|
||||
@@ -48,16 +48,15 @@
|
||||
<el-table-column label="出入库单号" align="center" prop="stockIoCode" />
|
||||
<el-table-column label="类型" align="center" prop="ioType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="getIoTypeTagType(scope.row.ioType)">
|
||||
{{ getIoTypeLabel(scope.row.ioType) }}
|
||||
</el-tag>
|
||||
<dict-tag :options="dict.type.stock_io_type" :value="scope.row.ioType"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务类型" align="center" prop="bizType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="getBizTypeTagType(scope.row.bizType)">
|
||||
<!-- <el-tag :type="getBizTypeTagType(scope.row.bizType)">
|
||||
{{ getBizTypeLabel(scope.row.bizType) }}
|
||||
</el-tag>
|
||||
</el-tag> -->
|
||||
<dict-tag :options="dict.type.stock_biz_type" :value="scope.row.bizType"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
|
||||
4
klp-ui/src/views/wms/work/schedule/index.vue
Normal file
4
klp-ui/src/views/wms/work/schedule/index.vue
Normal file
@@ -0,0 +1,4 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -2,39 +2,29 @@
|
||||
<div class="app-container">
|
||||
<el-page-header @back="$router.back()" :content="'排产计划编号:' + (planInfo.planCode || '-')" />
|
||||
|
||||
<el-tabs>
|
||||
<el-tab-pane label="排产计划详情">
|
||||
<el-tabs v-model="activeTab" @tab-click="handleTabClick">
|
||||
<!-- <el-tab-pane label="排产计划详情" name="info">
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="计划ID">{{ planInfo.planId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联订单ID">{{ planInfo.orderId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">{{ planInfo.status }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ planInfo.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="生产目标">
|
||||
<TargetPanel :list="orderDetailList" :planId="planId" />
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="批次管理">
|
||||
<BatchPanel :planId="planId" />
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- <el-tab-pane label="工艺任务">
|
||||
<CraftTaskPanel :list="orderDetailList" />
|
||||
</el-tab-pane> -->
|
||||
|
||||
<el-tab-pane label="计划明细">
|
||||
<el-tab-pane label="生产目标" name="target">
|
||||
<TargetPanel :list="orderDetailList" :planId="planId" v-if="activeTab === 'target'" />
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="生产任务管理" name="batch">
|
||||
<BatchPanel :planId="planId" v-if="activeTab === 'batch'" />
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- <el-tab-pane label="计划明细" name="detail">
|
||||
<el-button type="primary" size="mini" style="float:right" @click="openDetailDialog()">新增明细</el-button>
|
||||
<el-table :data="detailList" v-loading="loading" style="width: 100%">
|
||||
<el-table :data="detailList" v-loading="loading" style="width: 100%" v-if="activeTab === 'detail'">
|
||||
<el-table-column prop="detailId" label="明细ID" align="center" />
|
||||
<el-table-column prop="lineName" label="产线名称" align="center" />
|
||||
<!-- <el-table-column prop="productName" label="产品名称" align="center" /> -->
|
||||
<!-- <el-table-column prop="productCode" label="产品信息" align="center">
|
||||
<template slot-scope="scope">
|
||||
<ProductInfo :productId="scope.row.productId" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" />
|
||||
<el-table-column prop="quantity" label="排产数量" align="center" />
|
||||
<el-table-column prop="startDate" label="开始日期" align="center" />
|
||||
@@ -46,7 +36,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog :title="detailDialogTitle" :visible.sync="detailDialogVisible" width="700px"
|
||||
@@ -114,6 +104,7 @@ export default {
|
||||
components: { GanttChartEcharts, ProductInfo, TargetPanel, CraftTaskPanel, BatchPanel },
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'target',
|
||||
planId: null,
|
||||
planInfo: {},
|
||||
orderDetailList: [],
|
||||
@@ -157,6 +148,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// handleTabClick(tab, event) {
|
||||
// if (this.activeTab === 'detail') {
|
||||
// this.fetchDetailList();
|
||||
// } else if (this.activeTab === 'batch') {
|
||||
// this.fetchBatchList();
|
||||
|
||||
// } else if (this.activeTab === 'target') {
|
||||
// this.fetchOrderDetailList();
|
||||
// }
|
||||
// },
|
||||
fetchPlanInfo() {
|
||||
getSchedulePlan(this.planId).then(res => {
|
||||
this.planInfo = res.data || {};
|
||||
|
||||
@@ -97,13 +97,13 @@
|
||||
<el-tag type="info">新建</el-tag>
|
||||
</el-option>
|
||||
<el-option key="2" :value="1" label="已排产">
|
||||
<el-tag type="warning">已排产</el-tag>
|
||||
<el-tag type="warning">待排产</el-tag>
|
||||
</el-option>
|
||||
<el-option key="3" :value="2" label="生产中">
|
||||
<el-tag type="primary">生产中</el-tag>
|
||||
</el-option>
|
||||
<el-option key="4" :value="3" label="已完成">
|
||||
<el-tag type="success">已完成</el-tag>
|
||||
<el-tag type="danger">已废弃</el-tag>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-tag :type="statusTagType(scope.row.status)" disable-transitions>
|
||||
@@ -164,6 +164,12 @@
|
||||
<el-option v-for="item in orderList" :key="item.orderId" :label="item.orderCode || item.orderId" :value="item.orderId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startDate">
|
||||
<el-date-picker v-model="form.startDate" type="date" placeholder="请选择开始时间" style="width:100%" value-format="yyyy-MM-dd hh:mm:ss" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endDate">
|
||||
<el-date-picker v-model="form.endDate" type="date" placeholder="请选择结束时间" style="width:100%" value-format="yyyy-MM-dd hh:mm:ss" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-select v-model="form.priority" placeholder="请选择优先级">
|
||||
<el-option
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleInitBatch">生成批次</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleInitBatch">生成生产任务</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
@@ -33,14 +33,14 @@
|
||||
|
||||
<el-table v-loading="loading" :data="batchList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="批次ID" align="center" prop="batchId" v-if="true" />
|
||||
<el-table-column label="批次编号" align="center" prop="batchNo" />
|
||||
<el-table-column label="生产任务ID" align="center" prop="batchId" v-if="true" />
|
||||
<el-table-column label="生产任务编号" align="center" prop="batchNo" />
|
||||
<el-table-column label="关联工艺ID" align="center" prop="processId">
|
||||
<template slot-scope="scope">
|
||||
<CraftInfo :craftId="scope.row.processId" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次总数量" align="center" prop="totalQuantity" />
|
||||
<el-table-column label="生产任务总数量" align="center" prop="totalQuantity" />
|
||||
<el-table-column label="合并来源" align="center" prop="mergeSource">
|
||||
<template slot-scope="scope">
|
||||
<div v-for="item in scope.row.mergeSource.split(',')" style="display: flex; align-items: center; justify-content: center; gap: 10px;" :key="item">
|
||||
@@ -59,7 +59,7 @@
|
||||
<span>{{ parseTime(scope.row.estimatedEndTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次状态" align="center" prop="batchStatus">
|
||||
<el-table-column label="状态" align="center" prop="batchStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.batch_status" :value="scope.row.batchStatus" />
|
||||
</template>
|
||||
@@ -76,8 +76,8 @@
|
||||
<!-- 添加或修改批次(合并相同工艺的任务)对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="批次编号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次编号" />
|
||||
<el-form-item label="生产任务编号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入生产任务编号" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="关联工艺ID" prop="processId">
|
||||
<el-input v-model="form.processId" placeholder="请输入关联工艺ID" />
|
||||
@@ -114,9 +114,9 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="批次生成" width="800px" :visible.sync="batchGenerateDialogVisible">
|
||||
<el-dialog title="生成生产任务" width="800px" :visible.sync="batchGenerateDialogVisible">
|
||||
<el-table :data="generateBatchList" style="width: 100%;" border>
|
||||
<el-table-column label="批次编号" align="center" prop="batchNo">
|
||||
<el-table-column label="生产任务编号" align="center" prop="batchNo">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchNo" />
|
||||
</template>
|
||||
@@ -131,7 +131,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次总数量" align="center" prop="totalQuantity" />
|
||||
<el-table-column label="生产任务总数量" align="center" prop="totalQuantity" />
|
||||
<el-table-column label="预计开始时间" align="center" prop="estimatedStartTime">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.estimatedStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@@ -146,7 +146,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="handleAddBatch(scope.row)">生成批次</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleAddBatch(scope.row)">创建生产任务</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -343,7 +343,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加批次(合并相同工艺的任务)";
|
||||
this.title = "添加生产任务(合并相同工艺的任务)";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -354,7 +354,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改批次(合并相同工艺的任务)";
|
||||
this.title = "修改生产任务(合并相同工艺的任务)";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@@ -393,7 +393,7 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const batchIds = row.batchId || this.ids;
|
||||
this.$modal.confirm('是否确认删除批次(合并相同工艺的任务)编号为"' + batchIds + '"的数据项?').then(() => {
|
||||
this.$modal.confirm('是否确认删除生产任务(合并相同工艺的任务)编号为"' + batchIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delBatch(batchIds);
|
||||
}).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user