|
|
@@ -44,7 +44,7 @@
|
|
|
|
|
|
<header-title title="工序">
|
|
|
</header-title>
|
|
|
-
|
|
|
+
|
|
|
<ele-pro-table ref="table" :needPage="false" :columns="columns" :datasource="datasource" row-key="id">
|
|
|
|
|
|
<!-- 表头工具栏 -->
|
|
|
@@ -55,21 +55,32 @@
|
|
|
|
|
|
</template>
|
|
|
|
|
|
- <template v-slot:mouldName="{ row, $index }">
|
|
|
-
|
|
|
- <el-input :v-model="row.mouldName" placeholder="请选择" @click.native="mouldSelect(row, $index)"></el-input>
|
|
|
+ <template v-slot:palletName="{ row, $index }">
|
|
|
+ <el-input :value="row.palletName" placeholder="请选择"
|
|
|
+ @click.native="palletSelect(row, $index)"></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:palletCode="{ row }">
|
|
|
+ <el-input :value="row.palletCode" disabled placeholder="自动带入"></el-input>
|
|
|
</template>
|
|
|
|
|
|
|
|
|
+ <template v-slot:palletModelType="{ row }">
|
|
|
+ <el-input :value="row.palletModelType" disabled placeholder="自动带入"></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
-
|
|
|
+
|
|
|
<el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="handleDel(row, $index)">
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
- 删除 {{ row.mouldName }}
|
|
|
+ 删除
|
|
|
</el-link>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
@@ -78,7 +89,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
</ele-pro-table>
|
|
|
|
|
|
|
|
|
@@ -101,6 +111,7 @@
|
|
|
|
|
|
import processModal from '@/views/technology/productParam/components/processModal.vue'
|
|
|
import ProductModal from '@/views/technology/productParam/components/ProductModal.vue'
|
|
|
+import { categoryTaskPallet } from '@/api/material/list'
|
|
|
export default {
|
|
|
components: {
|
|
|
processModal,
|
|
|
@@ -116,7 +127,6 @@ export default {
|
|
|
data() {
|
|
|
const defaultForm = {
|
|
|
id: null,
|
|
|
-
|
|
|
code: '',
|
|
|
name: '',
|
|
|
modelType: '',
|
|
|
@@ -149,8 +159,23 @@ export default {
|
|
|
|
|
|
{
|
|
|
label: '模具名称',
|
|
|
- prop: 'mouldName',
|
|
|
- slot: 'mouldName',
|
|
|
+ prop: 'palletName',
|
|
|
+ slot: 'palletName',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '模具编码',
|
|
|
+ prop: 'palletCode',
|
|
|
+ slot: 'palletCode',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '模具型号',
|
|
|
+ prop: 'palletModelType',
|
|
|
+ slot: 'palletModelType',
|
|
|
+ minWidth: 110
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -186,7 +211,7 @@ export default {
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
|
- width: 260,
|
|
|
+ width: 160,
|
|
|
align: 'center',
|
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
|
@@ -195,6 +220,7 @@ export default {
|
|
|
],
|
|
|
|
|
|
removeList: [],
|
|
|
+ categoryId: null
|
|
|
|
|
|
|
|
|
|
|
|
@@ -241,24 +267,29 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- mouldSelect(row, idx) {
|
|
|
- this.$refs.productRefs.open(row, '模具', '5', idx)
|
|
|
+ palletSelect(row, idx) {
|
|
|
+ let _arr = this.$refs.table.getData()
|
|
|
+ let param = {
|
|
|
+ categoryId: _arr[idx].palletId,
|
|
|
+ categoryName: _arr[idx].palletName,
|
|
|
+ categoryCode: _arr[idx].palletCode
|
|
|
+ }
|
|
|
+ this.$refs.productRefs.open(param, '模具', '5', idx)
|
|
|
},
|
|
|
|
|
|
determineChoose(title, row, idx) {
|
|
|
-
|
|
|
+
|
|
|
if (title == '模具') {
|
|
|
let _arr = this.$refs.table.getData()
|
|
|
- let _new = _arr
|
|
|
+ this.$set(_arr[idx], 'palletId', row.id)
|
|
|
+ this.$set(_arr[idx], 'palletName', row.name)
|
|
|
+ this.$set(_arr[idx], 'palletCode', row.code)
|
|
|
+ this.$set(_arr[idx], 'palletModelType', row.modelType)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- _new[idx].mouldId = row.id
|
|
|
- _new[idx]['mouldName'] = row.name
|
|
|
-
|
|
|
- console.log(_new)
|
|
|
|
|
|
- this.$refs.table.setData(_new);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.setData(_arr);
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -266,7 +297,16 @@ export default {
|
|
|
},
|
|
|
|
|
|
|
|
|
- save() { },
|
|
|
+ save() {
|
|
|
+ let _arr = this.$refs.table.getData()
|
|
|
+ let param = {
|
|
|
+ categoryId: this.categoryId,
|
|
|
+ takeList: _arr
|
|
|
+ }
|
|
|
+ categoryTaskPallet(param).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
@@ -278,7 +318,7 @@ export default {
|
|
|
|
|
|
if (this.data) {
|
|
|
|
|
|
-
|
|
|
+ this.categoryId = this.data.id
|
|
|
this.$util.assignObject(this.form, {
|
|
|
...this.data
|
|
|
});
|