|
|
@@ -141,18 +141,16 @@
|
|
|
],
|
|
|
// 加载状态
|
|
|
loading: false,
|
|
|
- planOrderId: '',
|
|
|
- userInfo: {}
|
|
|
+ planOrderId: ''
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- let info = JSON.parse(localStorage.getItem('info'));
|
|
|
- this.userInfo = info;
|
|
|
- },
|
|
|
methods: {
|
|
|
control(row) {
|
|
|
- console.log(row, this.userInfo);
|
|
|
- if (row.executorId != this.userInfo.userId) {
|
|
|
+ const currentUserId = localStorage.getItem('userId');
|
|
|
+ if (
|
|
|
+ !currentUserId ||
|
|
|
+ String(row.executorId) !== String(currentUserId)
|
|
|
+ ) {
|
|
|
this.$message({
|
|
|
type: 'error',
|
|
|
message: '您不是盘点人员,不能报工!',
|