|
@@ -52,19 +52,19 @@
|
|
|
@click="openEdit">新增</el-button>
|
|
@click="openEdit">新增</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:palletBomCode="{ row }">
|
|
|
|
|
- <el-input v-model="row.palletBomCode" placeholder="请输入模具BOM编码"></el-input>
|
|
|
|
|
|
|
+ <template v-slot:modelCategoryLevelCode="{ row, $index }">
|
|
|
|
|
+ <el-input v-model="row.modelCategoryLevelCode" placeholder="请输入模具BOM编码"
|
|
|
|
|
+ @click.native="openMould(row, $index)"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:palletBomName="{ row }">
|
|
|
|
|
- <el-input v-model="row.palletBomName" placeholder="请输入模具BOM名称"></el-input>
|
|
|
|
|
|
|
+ <template v-slot:modelCategoryLevelName="{ row, $index }">
|
|
|
|
|
+ <el-input v-model="row.modelCategoryLevelName" placeholder="请输入模具BOM名称"
|
|
|
|
|
+ @click.native="openMould(row, $index)"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row, $index }">
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <el-link type="primary" @click="openMould(row)" :underline="false">
|
|
|
|
|
- 配置模具
|
|
|
|
|
- </el-link>
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="handleDel(row, $index)">
|
|
<el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="handleDel(row, $index)">
|
|
|
<template v-slot:reference>
|
|
<template v-slot:reference>
|
|
@@ -75,26 +75,7 @@
|
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:expand="{ row }">
|
|
|
|
|
- <div style="width: 100%; min-height: 60px" v-if="row.palletList">
|
|
|
|
|
- <ele-pro-table :toolbar="false" toolsTheme="none" ref="table2" :need-page="false"
|
|
|
|
|
- :datasource="row.palletList" :columns="columns2" row-key="id">
|
|
|
|
|
-
|
|
|
|
|
- <!-- 操作列 -->
|
|
|
|
|
- <template v-slot:action="{ row }">
|
|
|
|
|
- <el-popconfirm class="ele-action" title="确定要删除当前模具吗?" @confirm="remove2(row)">
|
|
|
|
|
- <template v-slot:reference>
|
|
|
|
|
- <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-link>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-popconfirm>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- </ele-pro-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
@@ -105,20 +86,20 @@
|
|
|
|
|
|
|
|
<processModal ref="processRefs" @chooseProcess="chooseProcess"></processModal>
|
|
<processModal ref="processRefs" @chooseProcess="chooseProcess"></processModal>
|
|
|
|
|
|
|
|
- <!-- 选择模具 -->
|
|
|
|
|
- <SelectProduct ref="productRefs" @chooseProcess="chooseModal"></SelectProduct>
|
|
|
|
|
|
|
+ <mouldChoose id="5" ref="mouldRef" @saveMould="saveMould"></mouldChoose>
|
|
|
|
|
+
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import processModal from '@/views/technology/productParam/components/processModal.vue';
|
|
import processModal from '@/views/technology/productParam/components/processModal.vue';
|
|
|
-import SelectProduct from '@/components/select/SelectProduct';
|
|
|
|
|
-
|
|
|
|
|
import { categoryTaskPallet, getCategoryTaskPallet } from '@/api/material/list';
|
|
import { categoryTaskPallet, getCategoryTaskPallet } from '@/api/material/list';
|
|
|
|
|
+import mouldChoose from './mouldChoose.vue'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
processModal,
|
|
processModal,
|
|
|
- SelectProduct
|
|
|
|
|
|
|
+ mouldChoose
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
// 弹窗是否打开
|
|
// 弹窗是否打开
|
|
@@ -154,16 +135,9 @@ export default {
|
|
|
// 提交状态
|
|
// 提交状态
|
|
|
loading: false,
|
|
loading: false,
|
|
|
current: null,
|
|
current: null,
|
|
|
|
|
+
|
|
|
|
|
|
|
|
columns: [
|
|
columns: [
|
|
|
- {
|
|
|
|
|
- width: 45,
|
|
|
|
|
- type: 'expand',
|
|
|
|
|
- columnKey: 'palletList',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- slot: 'expand'
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
{
|
|
@@ -197,17 +171,17 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- prop: 'palletBomCode',
|
|
|
|
|
|
|
+ prop: 'modelCategoryLevelCode',
|
|
|
label: '模具BOM编码',
|
|
label: '模具BOM编码',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- slot: 'palletBomCode',
|
|
|
|
|
|
|
+ slot: 'modelCategoryLevelCode',
|
|
|
minWidth: 150
|
|
minWidth: 150
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'palletBomName',
|
|
|
|
|
|
|
+ prop: 'modelCategoryLevelName',
|
|
|
label: '模具BOM名称',
|
|
label: '模具BOM名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- slot: 'palletBomName',
|
|
|
|
|
|
|
+ slot: 'modelCategoryLevelName',
|
|
|
minWidth: 150
|
|
minWidth: 150
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -223,46 +197,7 @@ export default {
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
- // 表格列配置
|
|
|
|
|
- columns2: [
|
|
|
|
|
-
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'code',
|
|
|
|
|
- label: '编码'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'name',
|
|
|
|
|
- label: '名称',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'brandNum',
|
|
|
|
|
- label: '牌号'
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'modelType',
|
|
|
|
|
- label: '型号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'specification',
|
|
|
|
|
- label: '规格',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- columnKey: 'action',
|
|
|
|
|
- label: '操作',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- resizable: false,
|
|
|
|
|
- slot: 'action',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
|
|
|
removeList: [],
|
|
removeList: [],
|
|
|
categoryId: null
|
|
categoryId: null
|
|
@@ -317,41 +252,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- openMould(row) {
|
|
|
|
|
- this.$refs.productRefs.open([], '模具', '5', row);
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- chooseModal(data, current) {
|
|
|
|
|
- data.map((m => {
|
|
|
|
|
- m.parentId = current.produceTaskId
|
|
|
|
|
- return {
|
|
|
|
|
- ...m,
|
|
|
|
|
- }
|
|
|
|
|
- }))
|
|
|
|
|
-
|
|
|
|
|
- let tableList = [];
|
|
|
|
|
- tableList = this.$refs.table.getData();
|
|
|
|
|
- tableList.forEach((e) => {
|
|
|
|
|
- if (e.produceTaskId == current.produceTaskId) {
|
|
|
|
|
- e.palletList = data;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- this.$refs.table.setData([...tableList]);
|
|
|
|
|
|
|
+ openMould(row,index) {
|
|
|
|
|
+ this.$refs.mouldRef.open(row, index)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- remove2(row) {
|
|
|
|
|
- const data = this.$refs.table.getData() ?? [];
|
|
|
|
|
- data.forEach((e) => {
|
|
|
|
|
- if (row.parentId == e.produceTaskId) {
|
|
|
|
|
- e.palletList = e.palletList.filter((d) => d.id !== row.id);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- this.$refs.table.setData([...data])
|
|
|
|
|
-
|
|
|
|
|
|
|
+ saveMould(row,idx) {
|
|
|
|
|
+ this.$set('')
|
|
|
|
|
+ console.log(row)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
async getCategoryTaskDetail() {
|
|
async getCategoryTaskDetail() {
|
|
|
const res = await getCategoryTaskPallet(this.categoryId);
|
|
const res = await getCategoryTaskPallet(this.categoryId);
|
|
|
this.$refs.table.setData(res);
|
|
this.$refs.table.setData(res);
|
|
@@ -360,32 +272,8 @@ export default {
|
|
|
save() {
|
|
save() {
|
|
|
let _arr = this.$refs.table.getData();
|
|
let _arr = this.$refs.table.getData();
|
|
|
|
|
|
|
|
- console.log(_arr)
|
|
|
|
|
-
|
|
|
|
|
- let result = true
|
|
|
|
|
- for(let i =0; i < _arr.length; i++) {
|
|
|
|
|
-
|
|
|
|
|
- if(_arr[i].hasOwnProperty('palletList') || e.palletList.length == 0) {
|
|
|
|
|
- result = false
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- console.log(result)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (!result) {
|
|
|
|
|
- this.$message.success('请先配磨具信息');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- return false
|
|
|
|
|
|
|
|
|
|
let param = {
|
|
let param = {
|
|
|
categoryId: this.categoryId,
|
|
categoryId: this.categoryId,
|