|
|
@@ -35,7 +35,7 @@
|
|
|
<script>
|
|
|
import DisposeDialog from './components/disposeDialog.vue';
|
|
|
import WorkSearch from './components/work-search.vue';
|
|
|
- import { getPlanOrderList } from '@/api/inventory';
|
|
|
+ import { checkReportWork, getPlanOrderList } from '@/api/inventory';
|
|
|
export default {
|
|
|
components: {
|
|
|
WorkSearch,
|
|
|
@@ -146,18 +146,15 @@
|
|
|
},
|
|
|
methods: {
|
|
|
control(row) {
|
|
|
- const currentUserId = localStorage.getItem('userId');
|
|
|
- if (
|
|
|
- !currentUserId ||
|
|
|
- String(row.executorId) !== String(currentUserId)
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '您不是盘点人员,不能报工!',
|
|
|
+ checkReportWork(row.id)
|
|
|
+ .then(() => {
|
|
|
+ this.$refs.disposeDialogRef.open(row.id);
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.$message.error(
|
|
|
+ error.message || '校验报工权限失败,请稍后重试!'
|
|
|
+ );
|
|
|
});
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$refs.disposeDialogRef.open(row.id);
|
|
|
},
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where, order }) {
|