|
@@ -12,22 +12,22 @@
|
|
|
row-key="code"
|
|
row-key="code"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
-<!-- <template v-slot:toolbar>
|
|
|
|
|
|
|
+ <template v-slot:toolbar>
|
|
|
<el-button
|
|
<el-button
|
|
|
size="small"
|
|
size="small"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
|
|
+ icon="el-icon-refresh-left"
|
|
|
class="ele-btn-icon"
|
|
class="ele-btn-icon"
|
|
|
- @click="openEdit()"
|
|
|
|
|
|
|
+ @click="toRefresh()"
|
|
|
>
|
|
>
|
|
|
- 新建
|
|
|
|
|
|
|
+ 刷新
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- </template> -->
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
<!-- 状态列 -->
|
|
<!-- 状态列 -->
|
|
|
- <template v-slot:status="{ row }">
|
|
|
|
|
|
|
+<!-- <template v-slot:status="{ row }">
|
|
|
{{ checkStatus(row) }}
|
|
{{ checkStatus(row) }}
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
|
|
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
@@ -48,7 +48,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import UserSearch from './components/user-search.vue';
|
|
import UserSearch from './components/user-search.vue';
|
|
|
- import route from '@/api/technology/route';
|
|
|
|
|
|
|
+ import { pageList } from '@/api/technology/version/version.js';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'technologyVersion',
|
|
name: 'technologyVersion',
|
|
|
components: {
|
|
components: {
|
|
@@ -58,22 +58,15 @@
|
|
|
return {
|
|
return {
|
|
|
// 表格列配置
|
|
// 表格列配置
|
|
|
columns: [
|
|
columns: [
|
|
|
- // {
|
|
|
|
|
- // columnKey: 'selection',
|
|
|
|
|
- // type: 'selection',
|
|
|
|
|
- // width: 45,
|
|
|
|
|
- // align: 'center',
|
|
|
|
|
- // fixed: 'left'
|
|
|
|
|
- // },
|
|
|
|
|
{
|
|
{
|
|
|
- prop: 'code',
|
|
|
|
|
|
|
+ prop: 'categoryCode',
|
|
|
label: '产品编码',
|
|
label: '产品编码',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'name',
|
|
|
|
|
|
|
+ prop: 'categoryName',
|
|
|
label: '产品名称',
|
|
label: '产品名称',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -81,30 +74,29 @@
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- prop: 'categoryCode',
|
|
|
|
|
|
|
+ prop: 'code',
|
|
|
label: '版本号',
|
|
label: '版本号',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'categoryName',
|
|
|
|
|
|
|
+ prop: 'name',
|
|
|
label: '版本名称',
|
|
label: '版本名称',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'version',
|
|
|
|
|
|
|
+ prop: 'routingCode',
|
|
|
label: '工艺路线编码',
|
|
label: '工艺路线编码',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'status',
|
|
|
|
|
|
|
+ prop: 'routingVersion',
|
|
|
label: '工艺版本号',
|
|
label: '工艺版本号',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- slot: 'status',
|
|
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
@@ -136,20 +128,22 @@
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
- async datasource({ page, limit, where, order }) {
|
|
|
|
|
- const res = await route.list({
|
|
|
|
|
- ...where,
|
|
|
|
|
- ...order,
|
|
|
|
|
- pageNum: page,
|
|
|
|
|
- size: limit
|
|
|
|
|
- });
|
|
|
|
|
- return res;
|
|
|
|
|
- },
|
|
|
|
|
- checkStatus(row) {
|
|
|
|
|
- let obj = this.statusList.find((it) => it.value == row.status);
|
|
|
|
|
- return obj.label;
|
|
|
|
|
|
|
+ datasource({ page, limit, where, order }) {
|
|
|
|
|
+ return pageList({ pageNum: page, size: limit, ...where });
|
|
|
},
|
|
},
|
|
|
|
|
+ // async datasource({ page, limit, where, order }) {
|
|
|
|
|
+ // const res = await pageList({
|
|
|
|
|
+ // ...where,
|
|
|
|
|
+ // ...order,
|
|
|
|
|
+ // pageNum: page,
|
|
|
|
|
+ // size: limit
|
|
|
|
|
+ // });
|
|
|
|
|
+ // return res;
|
|
|
|
|
+ // },
|
|
|
|
|
+ /* 点击刷新 */
|
|
|
|
|
+ toRefresh(){
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where: where });
|
|
this.$refs.table.reload({ page: 1, where: where });
|
|
@@ -160,48 +154,6 @@
|
|
|
path: '/technology/version/details',
|
|
path: '/technology/version/details',
|
|
|
query: {id}
|
|
query: {id}
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- /* 删除 */
|
|
|
|
|
- remove(row) {
|
|
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
|
|
-
|
|
|
|
|
- route
|
|
|
|
|
- .delete(row.id)
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.success('删除' + msg);
|
|
|
|
|
- this.reload();
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- // this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- /* 批量删除 */
|
|
|
|
|
- removeBatch() {
|
|
|
|
|
- if (!this.selection.length) {
|
|
|
|
|
- this.$message.error('请至少选择一条数据');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.$confirm('确定要删除选中的工序吗?', '提示', {
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- const loading = this.$loading({ lock: true });
|
|
|
|
|
- producetask
|
|
|
|
|
- .delete(this.selection.map((d) => d.id))
|
|
|
|
|
- .then((msg) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.success('删除' + msg);
|
|
|
|
|
- this.reload();
|
|
|
|
|
- })
|
|
|
|
|
- .catch((e) => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- // this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {});
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|