|
|
@@ -22,18 +22,24 @@
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
|
- style="margin-right: 20px"
|
|
|
type="primary"
|
|
|
@click="handelDetail(row)"
|
|
|
>详情</el-link
|
|
|
>
|
|
|
- <el-switch
|
|
|
+ <!-- <el-switch
|
|
|
:active-value="'1'"
|
|
|
:inactive-value="'0'"
|
|
|
@change="openBom(row, $event)"
|
|
|
v-model="row.status"
|
|
|
>
|
|
|
- </el-switch>
|
|
|
+ </el-switch> -->
|
|
|
+ <el-link
|
|
|
+ v-if="row.status == 0"
|
|
|
+ type="primary"
|
|
|
+ @click="handSubmit(row)"
|
|
|
+ >发布</el-link
|
|
|
+ >
|
|
|
+
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-tabs>
|
|
|
@@ -43,7 +49,7 @@
|
|
|
|
|
|
<script>
|
|
|
import BOMSearch from './components/BOM-search.vue';
|
|
|
- import { getBomPageList, startAndStop } from '@/api/material/BOM';
|
|
|
+ import { getBomPageList, startAndStop, bomSubmit } from '@/api/material/BOM';
|
|
|
|
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
|
@@ -91,6 +97,13 @@
|
|
|
return this.statusOpt[+row.status];
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'approvalStatus',
|
|
|
+ label: '审核状态',
|
|
|
+ formatter: (row) => {
|
|
|
+ return this.approvalStatusOpt[+row.approvalStatus];
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'createName',
|
|
|
label: '创建人',
|
|
|
@@ -112,6 +125,13 @@
|
|
|
0: '已停用',
|
|
|
1: '已发布'
|
|
|
},
|
|
|
+
|
|
|
+ approvalStatusOpt: {
|
|
|
+ 0: '未提交',
|
|
|
+ 1: '审核中',
|
|
|
+ 2: '审核通过',
|
|
|
+ 3: '审核不通过'
|
|
|
+ },
|
|
|
loading: false,
|
|
|
loadingInstance: null,
|
|
|
where: {},
|
|
|
@@ -165,6 +185,20 @@
|
|
|
});
|
|
|
setTimeout(() => {}, 2000);
|
|
|
},
|
|
|
+
|
|
|
+ handSubmit(row) {
|
|
|
+ this.$alert('确定要发布吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ bomSubmit({ businessId: row.id }).then((res) => {
|
|
|
+ this.$message.success('发布成功');
|
|
|
+ this.reload();
|
|
|
+ });
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+
|
|
|
/* 表格数据源 */
|
|
|
datasource({ where, page, limit }) {
|
|
|
return getBomPageList({
|