|
@@ -2,8 +2,8 @@
|
|
|
<div class="ele-body">
|
|
<div class="ele-body">
|
|
|
|
|
|
|
|
<BOMSearch @search="reload" :statusOpt="statusOpt" />
|
|
<BOMSearch @search="reload" :statusOpt="statusOpt" />
|
|
|
- <ele-pro-table ref="table" :key="tableKey" :columns="columns" :pagination="pagination" :header-cell-style="headerCellStyle" :datasource="datasource" class="dict-table"
|
|
|
|
|
- tool-class="ele-toolbar-actions">
|
|
|
|
|
|
|
+ <ele-pro-table ref="table" :key="tableKey" :columns="columns" :pagination="pagination"
|
|
|
|
|
+ :header-cell-style="headerCellStyle" :datasource="datasource" class="dict-table" tool-class="ele-toolbar-actions">
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
<div class="toolbar_box">
|
|
<div class="toolbar_box">
|
|
|
<div v-if="attributeData.status != 1">
|
|
<div v-if="attributeData.status != 1">
|
|
@@ -21,6 +21,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 用量 -->
|
|
<!-- 用量 -->
|
|
|
|
|
+ <template v-slot:dosageHead="{ column }">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<template v-slot:dosage="{ row }">
|
|
<template v-slot:dosage="{ row }">
|
|
|
|
|
|
|
|
<el-input v-model="row.dosage" placeholder="请输入" size="mini" style="width: 68px">
|
|
<el-input v-model="row.dosage" placeholder="请输入" size="mini" style="width: 68px">
|
|
@@ -104,9 +111,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
- <template v-slot:action="{ row,$index }">
|
|
|
|
|
|
|
+ <template v-slot:action="{ row, $index }">
|
|
|
<el-link v-if="attributeData.status != 1" type="danger" :underline="false" icon="el-icon-delete"
|
|
<el-link v-if="attributeData.status != 1" type="danger" :underline="false" icon="el-icon-delete"
|
|
|
- @click="handleDel(row,$index)">
|
|
|
|
|
|
|
+ @click="handleDel(row, $index)">
|
|
|
删除
|
|
删除
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
@@ -143,8 +150,8 @@ export default {
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- pagination:{
|
|
|
|
|
- tableTotal:0
|
|
|
|
|
|
|
+ pagination: {
|
|
|
|
|
+ tableTotal: 0
|
|
|
},
|
|
},
|
|
|
// 表格列配置
|
|
// 表格列配置
|
|
|
columns: [
|
|
columns: [
|
|
@@ -200,9 +207,9 @@ export default {
|
|
|
{
|
|
{
|
|
|
prop: 'dosage',
|
|
prop: 'dosage',
|
|
|
slot: 'dosage',
|
|
slot: 'dosage',
|
|
|
- label: '用量*',
|
|
|
|
|
|
|
+ label: '用量',
|
|
|
width: 100,
|
|
width: 100,
|
|
|
-
|
|
|
|
|
|
|
+ headerSlot: "dosageHead"
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
{
|
|
{
|
|
@@ -298,6 +305,7 @@ export default {
|
|
|
label: '加工',
|
|
label: '加工',
|
|
|
value: 1
|
|
value: 1
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
label: '装配',
|
|
label: '装配',
|
|
|
value: 3
|
|
value: 3
|
|
@@ -441,14 +449,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- headerCellStyle({ column }) {
|
|
|
|
|
- if (column.property === 'dosage') {
|
|
|
|
|
- return {
|
|
|
|
|
- color: 'red',
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return {}
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
rootCategoryLevelIdText(v) {
|
|
rootCategoryLevelIdText(v) {
|
|
|
if (v) {
|
|
if (v) {
|
|
|
let a = this.rootCategoryLevelIdList.find(item => item.value == v)
|
|
let a = this.rootCategoryLevelIdList.find(item => item.value == v)
|
|
@@ -475,7 +476,7 @@ export default {
|
|
|
this.list = [...list];
|
|
this.list = [...list];
|
|
|
this.listTow = JSON.parse(JSON.stringify(this.list));
|
|
this.listTow = JSON.parse(JSON.stringify(this.list));
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.table.setData(this.list)
|
|
this.$refs.table.setData(this.list)
|
|
|
this.updateFn()
|
|
this.updateFn()
|
|
|
this.tableKey = Date.now();
|
|
this.tableKey = Date.now();
|
|
@@ -598,6 +599,8 @@ export default {
|
|
|
status: 1
|
|
status: 1
|
|
|
};
|
|
};
|
|
|
contactList(param).then((res) => {
|
|
contactList(param).then((res) => {
|
|
|
|
|
+ console.log(res, 'res11111111111');
|
|
|
|
|
+
|
|
|
this.gysList = res.list;
|
|
this.gysList = res.list;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -668,11 +671,11 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
this.list = [...data, ...this.$refs.table.getData()];
|
|
this.list = [...data, ...this.$refs.table.getData()];
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.table._data.tableTotal = this.list.length;
|
|
this.$refs.table._data.tableTotal = this.list.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.table.setData(this.list)
|
|
this.$refs.table.setData(this.list)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -719,7 +722,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
bomClose() {
|
|
bomClose() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -729,7 +732,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- handleDel(row,i) {
|
|
|
|
|
|
|
+ handleDel(row, i) {
|
|
|
this.$confirm('是否确认删除?', '提示', {
|
|
this.$confirm('是否确认删除?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|