|
|
@@ -1,118 +1,217 @@
|
|
|
<template>
|
|
|
- <ele-modal
|
|
|
- width="80vw"
|
|
|
- :visible.sync="visible"
|
|
|
- :close-on-click-modal="false"
|
|
|
- row-key="code"
|
|
|
- custom-class="ele-dialog-form"
|
|
|
- :title="'计划分解'"
|
|
|
- >
|
|
|
- <div class="form-wrapper">
|
|
|
- <el-form :model="requestData" label-width="0" :show-message="false">
|
|
|
- <el-descriptions title="" :column="2" border>
|
|
|
- <el-descriptions-item label="计划编号">
|
|
|
- {{ formData.code }}</el-descriptions-item
|
|
|
- >
|
|
|
-
|
|
|
- <el-descriptions-item label="产品编码">{{
|
|
|
- formData.productCode
|
|
|
- }}</el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item label="产品名称">{{
|
|
|
- formData.productName
|
|
|
- }}</el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item label="牌号|型号">
|
|
|
- {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item
|
|
|
- >
|
|
|
-
|
|
|
- <el-descriptions-item label="子批次号">{{
|
|
|
- formData.batchNo
|
|
|
- }}</el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item label="工艺路线">{{
|
|
|
- formData.produceRoutingName
|
|
|
- }}</el-descriptions-item>
|
|
|
-
|
|
|
- <el-descriptions-item label="要求生产数量">{{
|
|
|
- formData.requiredFormingNum
|
|
|
- }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="要求完成日期">{{
|
|
|
- formData.reqMoldTime
|
|
|
- }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </el-form>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </div>
|
|
|
- <div slot="footer">
|
|
|
- <el-button plain @click="cancel">取消</el-button>
|
|
|
- <el-button type="primary" @click="confirm">确定</el-button>
|
|
|
- </div>
|
|
|
- </ele-modal>
|
|
|
- </template>
|
|
|
-
|
|
|
- <script>
|
|
|
- import { deepClone } from '@/utils';
|
|
|
-
|
|
|
- export default {
|
|
|
- components: {},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- visible: false,
|
|
|
-
|
|
|
- formData: {},
|
|
|
- requestData: {
|
|
|
- deviceCode: '',
|
|
|
- deviceName: '',
|
|
|
- deviceId: ''
|
|
|
+ <ele-modal
|
|
|
+ width="80vw"
|
|
|
+ :visible.sync="visible"
|
|
|
+ v-if="visible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ row-key="code"
|
|
|
+ custom-class="ele-dialog-form"
|
|
|
+ :title="'计划分解'"
|
|
|
+ >
|
|
|
+ <div class="form-wrapper">
|
|
|
+ <el-form :model="requestData" label-width="0" :show-message="false">
|
|
|
+ <el-descriptions title="" :column="2" border>
|
|
|
+ <el-descriptions-item label="计划编号">
|
|
|
+ {{ formData.code }}</el-descriptions-item
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-descriptions-item label="产品编码">{{
|
|
|
+ formData.productCode
|
|
|
+ }}</el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="产品名称">{{
|
|
|
+ formData.productName
|
|
|
+ }}</el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="牌号|型号">
|
|
|
+ {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-descriptions-item label="子批次号">{{
|
|
|
+ formData.batchNo
|
|
|
+ }}</el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="工艺路线">{{
|
|
|
+ formData.produceRoutingName
|
|
|
+ }}</el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="要求生产数量">{{
|
|
|
+ formData.requiredFormingNum
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="要求完成日期">{{
|
|
|
+ formData.reqMoldTime
|
|
|
+ }}</el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="生产方式">{{
|
|
|
+ formData.produceType == 2 ? '加工' : '装配'
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <headerTitle title="BOM信息" class="mt20"> </headerTitle>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :needPage="false"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="bomList"
|
|
|
+ tool-class="ele-toolbar-actions"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <div class="toolbar_box">
|
|
|
+ <div
|
|
|
+ ><span>基本数量</span>
|
|
|
+ <el-input placeholder="请输入" v-model.number="baseCount">
|
|
|
+ </el-input>
|
|
|
+ <DictSelection dictName="计量单位" v-model="unit"
|
|
|
+ /></div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button plain @click="cancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="confirm">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </ele-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import { deepClone } from '@/utils';
|
|
|
+ import { pageByCategoryId } from '@/api/productionPlan/index.js';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+
|
|
|
+ formData: {},
|
|
|
+ requestData: {},
|
|
|
+ bomList: [],
|
|
|
+ baseCount: '',
|
|
|
+ unit: '',
|
|
|
+ rules: {},
|
|
|
+
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: 'BOM编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: 'BOM名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '产品编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryName',
|
|
|
+ label: '产品名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'dosage',
|
|
|
+ label: '用量',
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-
|
|
|
- rules: {},
|
|
|
-
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'versions',
|
|
|
+ label: '版本'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status ',
|
|
|
+ label: '状态',
|
|
|
+ formatter: (row) => {
|
|
|
+ return this.statusOpt[+row.status];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createName',
|
|
|
+ label: '创建人',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建日期',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
|
|
|
-
|
|
|
+ statusOpt: {
|
|
|
+ '': '全部',
|
|
|
+ 0: '已停用',
|
|
|
+ 1: '已发布'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ open(row) {
|
|
|
+ this.formData = deepClone(row);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- };
|
|
|
+ this.getBomList();
|
|
|
},
|
|
|
- methods: {
|
|
|
- open(row) {
|
|
|
+
|
|
|
+ getBomList() {
|
|
|
+ let params = {
|
|
|
+ categoryId: this.formData.categoryId,
|
|
|
+ bomType: this.formData.produceType,
|
|
|
+ pageNum: 1,
|
|
|
+ size: -1
|
|
|
+ };
|
|
|
+ pageByCategoryId(params).then((res) => {
|
|
|
+ this.bomList = res?.list || [];
|
|
|
this.visible = true;
|
|
|
- this.formData = deepClone(row);
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- cancel() {
|
|
|
- this.formData = {};
|
|
|
- this.visible = false;
|
|
|
- this.$refs.form.resetFields();
|
|
|
- },
|
|
|
-
|
|
|
- confirm() {
|
|
|
- this.$refs.form.validate(async (value) => {
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ cancel() {
|
|
|
+ this.formData = {};
|
|
|
+ this.visible = false;
|
|
|
+ this.$refs.form.resetFields();
|
|
|
+ },
|
|
|
+
|
|
|
+ confirm() {
|
|
|
+ this.$refs.form.validate(async (value) => {});
|
|
|
}
|
|
|
- };
|
|
|
- </script>
|
|
|
-
|
|
|
- <style lang="scss" scoped>
|
|
|
- .mt20 {
|
|
|
- margin-top: 20px;
|
|
|
}
|
|
|
-
|
|
|
- .el-form-item {
|
|
|
- margin-bottom: 0 !important;
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .mt20 {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 0 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .toolbar_box {
|
|
|
+ float: right;
|
|
|
+ margin-right: 10px;
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ > span {
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+ > div {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
- </style>
|
|
|
-
|
|
|
+ }
|
|
|
+</style>
|