|
@@ -10,10 +10,17 @@
|
|
|
tool-class="ele-toolbar-actions"
|
|
tool-class="ele-toolbar-actions"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
- <!-- <template v-slot:toolbar>
|
|
|
|
|
- <el-button type="primary" @click="handelEdit('新建')">新建</el-button>
|
|
|
|
|
- <el-button type="primary">复制</el-button>
|
|
|
|
|
- </template>-->
|
|
|
|
|
|
|
+ <template v-slot:toolbar>
|
|
|
|
|
+ <!-- <el-button type="primary" @click="handelEdit('新建')">新建</el-button> -->
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-refresh-left"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ @click='refreshData'
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ >刷新</el-button>
|
|
|
|
|
+ </template>
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link type="primary" @click="handelEdit(row)">详情</el-link>
|
|
<el-link type="primary" @click="handelEdit(row)">详情</el-link>
|
|
|
</template>
|
|
</template>
|
|
@@ -26,7 +33,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import BOMSearch from './components/BOM-search.vue';
|
|
import BOMSearch from './components/BOM-search.vue';
|
|
|
import ViewDialog from './components/view-dialog.vue';
|
|
import ViewDialog from './components/view-dialog.vue';
|
|
|
- import { getPage } from '@/api/material/BOM';
|
|
|
|
|
|
|
+ import { getPage , syncBom } from '@/api/material/BOM';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'SystemDictionary',
|
|
name: 'SystemDictionary',
|
|
@@ -90,7 +97,8 @@
|
|
|
'-1': '草稿',
|
|
'-1': '草稿',
|
|
|
0: '已停用',
|
|
0: '已停用',
|
|
|
1: '已发布'
|
|
1: '已发布'
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ loading:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -140,7 +148,23 @@
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 刷新数据
|
|
|
|
|
+ refreshData(){
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ syncBom().then(res=>{
|
|
|
|
|
+ if(res=='0'){
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.$message.success('数据刷新成功!')
|
|
|
|
|
+ this.reload()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((e) => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|