You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7235 lines
299 KiB

​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
7 months ago
​
7 months ago
​
7 months ago
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 weeks ago
​
​
​
​
​
​
​
4 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
5 months ago
​
5 months ago
​
5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
4 weeks ago
​
4 weeks ago
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
5 months ago
​
5 months ago
​
5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
5 months ago
​
5 months ago
​
5 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
​
​
​
​
​
​
2 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
5 months ago
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 weeks ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="mod-config">
  3. <!-- <div>-->
  4. <!-- <span @click="favoriteFunction()">-->
  5. <!-- <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>-->
  6. <!-- </span>-->
  7. <!-- </div>-->
  8. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  9. <el-form-item :label="'BU'">
  10. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px" @change="searchBuChangeHandle">
  11. <el-option
  12. v-for = "i in userBuList"
  13. :key = "i.buNo"
  14. :label = "i.buDesc"
  15. :value = "i.buDesc">
  16. </el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item :label="'项目编码'">
  20. <el-input v-model="searchData.projectNo" style="width: 120px" clearable></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'项目名称'">
  23. <el-input v-model="searchData.projectDesc" style="width: 120px" clearable></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'项目料号'">
  26. <el-input v-model="searchData.testPartNo" style="width: 120px" clearable></el-input>
  27. </el-form-item>
  28. <el-form-item :label="'料号描述'">
  29. <el-input v-model="searchData.partDesc" style="width: 120px" clearable></el-input>
  30. </el-form-item>
  31. <el-form-item :label="'分类'">
  32. <el-select v-model="searchData.dryWetType" placeholder="请选择" clearable style="width: 100px">
  33. <el-option
  34. v-for="i in dryWetTypeList"
  35. :key="i"
  36. :label="i"
  37. :value="i">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item :label="'客户编码'">
  42. <el-input v-model="searchData.customerNo" style="width: 120px" clearable></el-input>
  43. </el-form-item>
  44. <el-form-item :label="'客户名称'">
  45. <el-select
  46. v-model="searchData.customerDesc"
  47. filterable
  48. clearable
  49. remote
  50. reserve-keyword
  51. placeholder="请输入客户名称"
  52. style="width: 160px"
  53. :remote-method="handleSearchCustomerRemote"
  54. :loading="searchCustomerOptionLoading"
  55. @visible-change="handleSearchCustomerVisibleChange">
  56. <el-option
  57. v-for="item in searchCustomerOptions"
  58. :key="item.customerNo + '_' + item.customerDesc"
  59. :label="item.customerDesc"
  60. :value="item.customerDesc">
  61. </el-option>
  62. </el-select>
  63. </el-form-item>
  64. <el-form-item :label="'项目分类'">
  65. <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
  66. <el-option
  67. v-for = "i in projectCategoryList"
  68. :key = "i.projectCategory"
  69. :label = "i.projectCategory"
  70. :value = "i.projectCategory">
  71. </el-option>
  72. </el-select>
  73. </el-form-item>
  74. <el-form-item :label="'项目状态'">
  75. <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
  76. <el-option
  77. v-for = "i in statusList"
  78. :key = "i.status"
  79. :label = "i.status"
  80. :value = "i.status">
  81. </el-option>
  82. </el-select>
  83. </el-form-item>
  84. <!-- 物料状态对应列表列“料号状态”,过滤 plm_project_part.part_type,与项目状态 status 分开。 -->
  85. <el-form-item :label="'料号状态'">
  86. <el-select v-model="searchData.partType" placeholder="请选择" clearable style="width: 130px">
  87. <el-option
  88. v-for = "i in partTypeList"
  89. :key = "i.partType"
  90. :label = "i.partType"
  91. :value = "i.partType">
  92. </el-option>
  93. </el-select>
  94. </el-form-item>
  95. <el-form-item :label="'PM/Sales'">
  96. <el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
  97. <el-option
  98. v-for = "i in projectManagersList"
  99. :key = "i.projectManagerId"
  100. :label = "i.projectManagerName"
  101. :value = "i.projectManager">
  102. </el-option>
  103. </el-select>
  104. </el-form-item>
  105. <el-form-item :label="'PjM'">
  106. <el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
  107. <el-option
  108. v-for = "i in projectOwnersList"
  109. :key = "i.projectOwnerId"
  110. :label = "i.projectOwnerName"
  111. :value = "i.projectOwner">
  112. </el-option>
  113. </el-select>
  114. </el-form-item>
  115. <el-form-item :label="'Engineer'">
  116. <el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
  117. <el-option
  118. v-for = "i in engineersList"
  119. :key = "i.engineerId"
  120. :label = "i.engineerName"
  121. :value = "i.engineer">
  122. </el-option>
  123. </el-select>
  124. </el-form-item>
  125. <el-form-item :label="'区域'">
  126. <el-select clearable v-model="searchData.cProjectRegion" style="width: 120px">
  127. <el-option
  128. v-for = "i in cProjectRegionList"
  129. :key = "i.cProjectRegion"
  130. :label = "i.cProjectRegion"
  131. :value = "i.cProjectRegion">
  132. </el-option>
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item :label="'ERP正式料号'">
  136. <el-select v-model="searchData.finalPartNo" filterable placeholder="请选择" clearable style="width: 130px">
  137. <el-option
  138. v-for = "i in finalPartNosList"
  139. :key = "i.finalPartNoId"
  140. :label = "i.finalPartNo"
  141. :value = "i.finalPartNo">
  142. </el-option>
  143. </el-select>
  144. </el-form-item>
  145. <el-form-item :label="'转量产日期:'">
  146. <el-date-picker
  147. style="width: 120px"
  148. v-model="searchData.massProductionStartDate"
  149. type="date"
  150. value-format="yyyy-MM-dd"
  151. placeholder="选择日期">
  152. </el-date-picker>
  153. -
  154. <el-date-picker
  155. style="width: 120px"
  156. v-model="searchData.massProductionEndDate"
  157. type="date"
  158. value-format="yyyy-MM-dd"
  159. placeholder="选择日期">
  160. </el-date-picker>
  161. </el-form-item>
  162. <el-form-item :label="'立项日期:'">
  163. <el-date-picker
  164. style="width: 120px"
  165. v-model="searchData.startDate"
  166. type="date"
  167. value-format="yyyy-MM-dd"
  168. placeholder="选择日期">
  169. </el-date-picker>
  170. -
  171. <el-date-picker
  172. style="width: 120px"
  173. v-model="searchData.endDate"
  174. type="date"
  175. value-format="yyyy-MM-dd"
  176. placeholder="选择日期">
  177. </el-date-picker>
  178. </el-form-item>
  179. <el-form-item :label="'是否存在打料记录'">
  180. <el-select v-model="searchData.feedingFlag" style="width: 100px">
  181. <el-option value="0" label="全部"></el-option>
  182. <el-option value="1" label="存在"></el-option>
  183. <el-option value="2" label="不存在"></el-option>
  184. </el-select>
  185. </el-form-item>
  186. <!-- <el-form-item :label="'在用'">-->
  187. <!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
  188. <!-- <el-option label="全部" value=""></el-option>-->
  189. <!-- <el-option label="是" value="Y"></el-option>-->
  190. <!-- <el-option label="否" value="N"></el-option>-->
  191. <!-- </el-select>-->
  192. <!-- </el-form-item>-->
  193. <el-form-item :label="' '">
  194. <el-button @click="agencyMatter()">查询</el-button>
  195. <download-excel
  196. :fields="fields()"
  197. :data="exportData"
  198. type="xls"
  199. :name="exportName"
  200. :header="exportHeader"
  201. :footer="exportFooter"
  202. :fetch="createExportData"
  203. :before-generate="startDownload"
  204. :before-finish="finishDownload"
  205. worksheet="导出信息"
  206. class="el-button el-button--primary el-button--medium">
  207. {{ "导出" }}
  208. </download-excel>
  209. </el-form-item>
  210. </el-form>
  211. <el-table
  212. @header-dragend="handleColumnResize"
  213. :height="this.height + 350"
  214. :data="dataList"
  215. ref="mainTable"
  216. highlight-current-row
  217. @row-click="proofingClickRow"
  218. @current-change="changeCurrentRow"
  219. :row-class-name="tableRowClassName"
  220. :cell-style="getCellStyle"
  221. border
  222. style="width: 100%;">
  223. <el-table-column
  224. v-for="(item,index) in visibleColumnList"
  225. :key="item.serialNumber || item.columnProp || index"
  226. :sortable="item.columnSortable"
  227. :prop="item.columnProp"
  228. :header-align="item.headerAlign"
  229. :show-overflow-tooltip="item.showOverflowTooltip"
  230. :align="item.align"
  231. :fixed="item.fixed==''?false:item.fixed"
  232. :min-width="item.columnWidth"
  233. :label="item.columnLabel">
  234. <template slot-scope="scope">
  235. <div v-if="item.columnProp === 'partType'">
  236. <span style="color: black">
  237. {{ scope.row[item.columnProp] }}
  238. </span>
  239. </div>
  240. <div v-else-if="item.columnProp === 'projectCategory'">
  241. <span :style="{ color: scope.row.projectCategory === 'High Risk' ? 'rgb(255, 62, 62)' : (scope.row.projectCategory === 'Sustaining' ? 'rgb(34, 254, 4)' : 'rgb(255,224,89)') , fontSize: '14px'}">
  242. {{ scope.row[item.columnProp] }}
  243. </span>
  244. </div>
  245. <div v-else>
  246. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  247. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  248. style="width: 100px; height: 80px"/></span>
  249. </div>
  250. </template>
  251. </el-table-column>
  252. <el-table-column
  253. v-if="this.$store.state.user.name === 'admin' || !this.authUpdate"
  254. fixed="right"
  255. header-align="center"
  256. align="center"
  257. width="220"
  258. label="操作">
  259. <template slot-scope="scope">
  260. <div v-if="scope.row.partType !== 'Active'">
  261. <a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">下达</a>
  262. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" @click="addProofRecord(scope.row)">新增打样</a>
  263. <a @click="showProofDetailModal(scope.row)">详情</a>
  264. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转正式料号</a>
  265. <a v-if="scope.row.status === '进行中' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转量产</a>
  266. </div>
  267. <div v-else-if="scope.row.status !== '已量产' && scope.row.status !== '正式量产'">
  268. <a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a>
  269. <a v-if="scope.row.status !== '草稿'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  270. <a type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  271. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  272. <a v-if="scope.row.status === '进行中' || scope.row.status === '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  273. </div>
  274. <div v-else-if="scope.row.status === '已量产'">
  275. <a style="color: #0c4dbb" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  276. <a style="color: #0c4dbb" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  277. <a style="color: #0c4dbb" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  278. <a style="color: #0c4dbb" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  279. <a style="color: #0c4dbb" type="text" size="small" @click="cancelModalStatus(scope.row)">撤销</a>
  280. </div>
  281. <div v-else>
  282. <a style="color: red" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  283. <a style="color: red" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  284. <a style="color: red" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  285. <a style="color: red" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  286. </div>
  287. </template>
  288. </el-table-column>
  289. <el-table-column
  290. v-else
  291. fixed="right"
  292. header-align="center"
  293. align="center"
  294. width="70"
  295. label="操作">
  296. <template slot-scope="scope">
  297. <div v-if="scope.row.partType !== 'Active'">
  298. <a style="color: gray; pointer-events: none;">详情</a>
  299. </div>
  300. <div v-else-if="scope.row.status !== '已量产' && scope.row.status !== '正式量产'">
  301. <a type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  302. </div>
  303. <div v-else-if="scope.row.status === '已量产'">
  304. <a style="color: #0c4dbb" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  305. </div>
  306. <div v-else>
  307. <a style="color: red" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  308. </div>
  309. </template>
  310. </el-table-column>
  311. </el-table>
  312. <el-pagination
  313. @size-change="sizeChangeHandle"
  314. @current-change="currentChangeHandle"
  315. :current-page="pageIndex"
  316. :page-sizes="[20, 50, 100, 200, 500]"
  317. :page-size="pageSize"
  318. :total="totalPage"
  319. layout="total, sizes, prev, pager, next, jumper">
  320. </el-pagination>
  321. <el-dialog title="转正式料号" :visible.sync="formalPartNoFlag" width="508px" v-drag :close-on-click-modal="false">
  322. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  323. <el-form-item label="客户编码" prop="customerNo" >
  324. <el-input v-model="modalData.customerNo" style="width: 151px;" disabled></el-input>
  325. </el-form-item>
  326. <el-form-item label="客户名称" style="margin-left: 15px" prop="customerDesc" >
  327. <el-input v-model="modalData.customerDesc" style="width: 291px;" disabled></el-input>
  328. </el-form-item>
  329. </el-form>
  330. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  331. <el-form-item label="项目编码" prop="projectNo" >
  332. <el-input v-model="modalData.projectNo" style="width: 151px;" disabled></el-input>
  333. </el-form-item>
  334. <el-form-item label="项目名称" style="margin-left: 15px" prop="projectDesc" >
  335. <el-input v-model="modalData.projectDesc" style="width: 175px;" disabled></el-input>
  336. </el-form-item>
  337. <el-form-item label="BU" prop="bu" >
  338. <el-input v-model="modalData.bu" style="width: 102px;" disabled></el-input>
  339. </el-form-item>
  340. </el-form>
  341. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  342. <el-form-item label="项目料号" prop="testPartNo" >
  343. <el-input v-model="modalData.testPartNo" style="width: 151px;" disabled></el-input>
  344. </el-form-item>
  345. <el-form-item label="料号描述" style="margin-left: 15px" prop="partDesc" >
  346. <el-input v-model="modalData.partDesc" style="width: 291px;" disabled></el-input>
  347. </el-form-item>
  348. </el-form>
  349. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  350. <el-form-item label="ERP正式料号" prop="finalPartNo" :rules="rules.finalPartNo">
  351. <el-input v-model="modalData.finalPartNo"
  352. @blur="getFinalPartDesc()"
  353. style="width: 151px"></el-input>
  354. </el-form-item>
  355. <el-form-item label="ERP正式料号描述" style="margin-left: 15px" prop="finalPartDesc">
  356. <el-input v-model="modalData.finalPartDesc" style="width: 291px" disabled></el-input>
  357. </el-form-item>
  358. </el-form>
  359. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  360. <el-button type="primary" @click="saveFormalPartNo()">保存</el-button>
  361. <el-button @click="formalPartNoFlag = false">关闭</el-button>
  362. </el-footer>
  363. </el-dialog>
  364. <!-- <el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">-->
  365. <!-- <el-tab-pane label="打样记录" name="proofRecord" style="margin-left: -10px">-->
  366. <!-- <proofRecord ref="proofRecord"></proofRecord>-->
  367. <!-- </el-tab-pane>-->
  368. <!-- <el-tab-pane label="转量产阶段文档" name="massProductionStage">-->
  369. <!-- <el-button type="primary" v-if="!this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>-->
  370. <!-- <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>-->
  371. <!-- <el-button type="primary" v-if="this.sendMassMailFlag === true && !this.authUpdate" style="margin-top: -5px" @click="sendMassMailHandle()">邮件提醒</el-button>-->
  372. <!-- <el-table-->
  373. <!-- :data="projectOtherDocumentList"-->
  374. <!-- border-->
  375. <!-- style="width: 100%;margin-top: 5px;"-->
  376. <!-- :height="this.height + 110"-->
  377. <!-- ref="proofDocumentTable"-->
  378. <!-- @row-click="projectOtherDocumentClickRow"-->
  379. <!-- @current-change="changeCurrentRow1"-->
  380. <!-- :row-class-name="tableRowClassName"-->
  381. <!-- v-loading="dataListLoading">-->
  382. <!-- <el-table-column-->
  383. <!-- v-if="this.authUpdate"-->
  384. <!-- header-align="center"-->
  385. <!-- align="center"-->
  386. <!-- width="140"-->
  387. <!-- fixed="left"-->
  388. <!-- label="操作">-->
  389. <!-- <template slot-scope="scope">-->
  390. <!-- <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>-->
  391. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  392. <!-- @click="copyFile(scope.row)">复制</a>-->
  393. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  394. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"-->
  395. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  396. <!-- </template>-->
  397. <!-- </el-table-column>-->
  398. <!-- <el-table-column-->
  399. <!-- v-else-->
  400. <!-- header-align="center"-->
  401. <!-- align="center"-->
  402. <!-- width="150"-->
  403. <!-- fixed="left"-->
  404. <!-- label="操作">-->
  405. <!-- <template slot-scope="scope">-->
  406. <!-- <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>-->
  407. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  408. <!-- @click="copyFile(scope.row)">复制</a>-->
  409. <!-- <a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a>-->
  410. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  411. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  412. <!-- </template>-->
  413. <!-- </el-table-column>-->
  414. <!-- <el-table-column label="序号" type="index" align="center" :index="indexMethod">-->
  415. <!-- <template slot-scope="scope">-->
  416. <!-- <span>-->
  417. <!-- {{ scope.$index + 1 }}-->
  418. <!-- </span>-->
  419. <!-- </template>-->
  420. <!-- </el-table-column>-->
  421. <!-- <el-table-column label="文档类型" align="left">-->
  422. <!-- <template slot-scope="scope">-->
  423. <!-- <span>-->
  424. <!-- {{ getCombinedDocumentType(scope.row) }}-->
  425. <!-- </span>-->
  426. <!-- </template>-->
  427. <!-- </el-table-column>-->
  428. <!-- <el-table-column-->
  429. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  430. <!-- :sortable="item.columnSortable"-->
  431. <!-- :prop="item.columnProp"-->
  432. <!-- :header-align="item.headerAlign"-->
  433. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  434. <!-- :align="item.align"-->
  435. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  436. <!-- :min-width="item.columnWidth"-->
  437. <!-- :label="item.columnLabel">-->
  438. <!-- <template slot-scope="scope">-->
  439. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  440. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  441. <!-- style="width: 100px; height: 80px"/></span>-->
  442. <!-- </template>-->
  443. <!-- </el-table-column>-->
  444. <!-- </el-table>-->
  445. <!-- </el-tab-pane>-->
  446. <!-- <el-tab-pane label="所有文档" name="allDocument">-->
  447. <!-- <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿' && !this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>-->
  448. <!-- <el-table-->
  449. <!-- :data="projectAllDocumentList"-->
  450. <!-- border-->
  451. <!-- style="width: 100%;margin-top: 5px;"-->
  452. <!-- :height="this.height + 50"-->
  453. <!-- ref="projectAllDocumentDocumentTable"-->
  454. <!-- @row-click="projectAllDocumentClickRow"-->
  455. <!-- v-loading="dataListLoading"-->
  456. <!-- :row-class-name="tableRowClassName">-->
  457. <!-- <el-table-column-->
  458. <!-- v-if="this.authUpdate"-->
  459. <!-- header-align="center"-->
  460. <!-- fixed="left"-->
  461. <!-- align="center"-->
  462. <!-- width="90"-->
  463. <!-- label="操作">-->
  464. <!-- <template slot-scope="scope">-->
  465. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  466. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  467. <!-- @click="copyFile(scope.row)">复制</a>-->
  468. <!-- <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>-->
  469. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"-->
  470. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  471. <!-- </template>-->
  472. <!-- </el-table-column>-->
  473. <!-- <el-table-column-->
  474. <!-- v-else-->
  475. <!-- header-align="center"-->
  476. <!-- fixed="left"-->
  477. <!-- align="center"-->
  478. <!-- width="90"-->
  479. <!-- label="操作">-->
  480. <!-- <template slot-scope="scope">-->
  481. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  482. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  483. <!-- @click="copyFile(scope.row)">复制</a>-->
  484. <!-- <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>-->
  485. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row)"-->
  486. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  487. <!-- </template>-->
  488. <!-- </el-table-column>-->
  489. <!-- <el-table-column label="序号" type="index" align="center" :index="indexMethod">-->
  490. <!-- <template slot-scope="scope">-->
  491. <!-- <span>-->
  492. <!-- {{ scope.$index + 1 }}-->
  493. <!-- </span>-->
  494. <!-- </template>-->
  495. <!-- </el-table-column>-->
  496. <!-- <el-table-column label="文档类型" align="left">-->
  497. <!-- <template slot-scope="scope">-->
  498. <!-- <span>-->
  499. <!-- {{ getCombinedDocumentType(scope.row) }}-->
  500. <!-- </span>-->
  501. <!-- </template>-->
  502. <!-- </el-table-column>-->
  503. <!-- <el-table-column-->
  504. <!-- v-for="(item,index) in columnProjectAllDocumentList" :key="index"-->
  505. <!-- :sortable="item.columnSortable"-->
  506. <!-- :prop="item.columnProp"-->
  507. <!-- :header-align="item.headerAlign"-->
  508. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  509. <!-- :align="item.align"-->
  510. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  511. <!-- :min-width="item.columnWidth"-->
  512. <!-- :label="item.columnLabel">-->
  513. <!-- <template slot-scope="scope">-->
  514. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  515. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  516. <!-- style="width: 100px; height: 80px"/></span>-->
  517. <!-- </template>-->
  518. <!-- </el-table-column>-->
  519. <!-- </el-table>-->
  520. <!-- </el-tab-pane>-->
  521. <!-- <el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">-->
  522. <!-- <el-row>-->
  523. <!-- <el-col :span="8" class="left-section">-->
  524. <!-- <div class="table-container" style="height: 100%;margin-top: -5px">-->
  525. <!-- <p style="margin-top: -5px">文档清单</p>-->
  526. <!-- <el-table :data="confirmProgressDocumentList"-->
  527. <!-- border-->
  528. <!-- style="width: 100%;margin-top: -5px;"-->
  529. <!-- :height="this.height + 95">-->
  530. <!-- <el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>-->
  531. <!-- <el-table-column header-align="center" align="left" prop="documentType" label="文档类型"></el-table-column>-->
  532. <!-- <el-table-column header-align="center" align="left" prop="fileName" label="文件名"></el-table-column>-->
  533. <!-- <el-table-column-->
  534. <!-- header-align="center"-->
  535. <!-- align="center"-->
  536. <!-- width="90"-->
  537. <!-- fixed="right"-->
  538. <!-- label="操作">-->
  539. <!-- <template slot-scope="scope">-->
  540. <!-- <a type="text" size="small" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  541. <!-- </template>-->
  542. <!-- </el-table-column>-->
  543. <!-- </el-table>-->
  544. <!-- </div>-->
  545. <!-- </el-col>-->
  546. <!-- <el-col :span="15" class="right-section">-->
  547. <!-- <div class="table-container" style="height: 100%;margin-top: -5px">-->
  548. <!-- <p style="margin-top: -5px">推送人员清单</p>-->
  549. <!-- <el-table :data="confirmProgressPusherList"-->
  550. <!-- border-->
  551. <!-- style="width: 100%;margin-top: -5px;"-->
  552. <!-- :height="this.height + 95">-->
  553. <!-- <el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>-->
  554. <!-- <el-table-column header-align="center" align="left" width="70" prop="userDisplay" label="指定确认人"></el-table-column>-->
  555. <!-- <el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>-->
  556. <!-- <el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>-->
  557. <!-- <el-table-column header-align="center" align="left" prop="confirmedBy" label="实际确认人"></el-table-column>-->
  558. <!-- <el-table-column header-align="center" align="left" prop="remark" label="备注"></el-table-column>-->
  559. <!-- <el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>-->
  560. <!-- <el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>-->
  561. <!-- <el-table-column header-align="center" align="left" prop="createBy" label="推送人"></el-table-column>-->
  562. <!-- <el-table-column-->
  563. <!-- header-align="center"-->
  564. <!-- align="center"-->
  565. <!-- width="90"-->
  566. <!-- fixed="left"-->
  567. <!-- label="操作">-->
  568. <!-- <template slot-scope="scope">-->
  569. <!-- <a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>-->
  570. <!-- <a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>-->
  571. <!-- </template>-->
  572. <!-- </el-table-column>-->
  573. <!-- </el-table>-->
  574. <!-- </div>-->
  575. <!-- </el-col>-->
  576. <!-- </el-row>-->
  577. <!-- </el-tab-pane>-->
  578. <!-- <el-tab-pane label="量产BOM" name="massProductionBOM">-->
  579. <!-- <el-table-->
  580. <!-- :data="projectPartBomList"-->
  581. <!-- row-key="levelCode"-->
  582. <!-- border-->
  583. <!-- style="width: 100%; margin-top: 5px;"-->
  584. <!-- :height="this.height + 50"-->
  585. <!-- ref="projectBomTable"-->
  586. <!-- v-loading="dataListLoading"-->
  587. <!-- :tree-props="{ children: 'children' }">-->
  588. <!-- &lt;!&ndash; 数据列 &ndash;&gt;-->
  589. <!-- <el-table-column-->
  590. <!-- label=""-->
  591. <!-- prop=""-->
  592. <!-- header-align="center"-->
  593. <!-- align="center"-->
  594. <!-- width="80">-->
  595. <!-- </el-table-column>-->
  596. <!-- <el-table-column-->
  597. <!-- v-for="(item, index) in columnProjectBomList"-->
  598. <!-- :key="index"-->
  599. <!-- :sortable="item.columnSortable"-->
  600. <!-- :prop="item.columnProp"-->
  601. <!-- :header-align="item.headerAlign"-->
  602. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  603. <!-- :align="item.align"-->
  604. <!-- :fixed="item.fixed === '' ? false : item.fixed"-->
  605. <!-- :min-width="item.columnWidth"-->
  606. <!-- :label="item.columnLabel">-->
  607. <!-- <template slot-scope="scope">-->
  608. <!-- <div v-if="item.columnProp === 'levelCode'">-->
  609. <!-- <span v-if="scope.row.levelCode === '1'">{{ '主BOM' }}</span>-->
  610. <!-- <span v-else>{{ scope.row.levelCode }}</span>-->
  611. <!-- </div>-->
  612. <!-- <div v-else>-->
  613. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  614. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  615. <!-- </div>-->
  616. <!-- </template>-->
  617. <!-- </el-table-column>-->
  618. <!-- </el-table>-->
  619. <!-- </el-tab-pane>-->
  620. <!-- <el-tab-pane label="产品工艺路线" name="Routing">-->
  621. <!-- <el-table-->
  622. <!-- :data="projectPartRoutingList"-->
  623. <!-- border-->
  624. <!-- style="width: 100%; margin-top: 5px;"-->
  625. <!-- :height="this.height + 50"-->
  626. <!-- ref="projectBomTable"-->
  627. <!-- v-loading="dataListLoading"-->
  628. <!-- >-->
  629. <!-- &lt;!&ndash; 数据列 &ndash;&gt;-->
  630. <!-- <el-table-column-->
  631. <!-- v-for="(item, index) in columnProjectRoutingList"-->
  632. <!-- :key="index"-->
  633. <!-- :sortable="item.columnSortable"-->
  634. <!-- :prop="item.columnProp"-->
  635. <!-- :header-align="item.headerAlign"-->
  636. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  637. <!-- :align="item.align"-->
  638. <!-- :fixed="item.fixed === '' ? false : item.fixed"-->
  639. <!-- :min-width="item.columnWidth"-->
  640. <!-- :label="item.columnLabel">-->
  641. <!-- <template slot-scope="scope">-->
  642. <!-- <div v-if="item.columnProp === 'levelCode'">-->
  643. <!-- <span v-if="scope.row.levelCode === '1'">{{ '1' }}</span>-->
  644. <!-- <span v-else>{{ scope.row.levelCode }}</span>-->
  645. <!-- </div>-->
  646. <!-- <div v-else>-->
  647. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  648. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  649. <!-- </div>-->
  650. <!-- </template>-->
  651. <!-- </el-table-column>-->
  652. <!-- </el-table>-->
  653. <!-- </el-tab-pane>-->
  654. <!-- </el-tabs>-->
  655. <el-dialog title="文档清单定义" @close="projectDocumentListVisibleFalse" :visible.sync="projectDocumentListVisible" width="768px" style="margin-top: 7px" :close-on-click-modal="false">
  656. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  657. <el-form-item prop="projectNo">
  658. <template #label>
  659. <span class="big-label">项目编码</span>
  660. </template>
  661. <el-input v-model="modalData.projectNo" disabled style="width: 151px;"></el-input>
  662. </el-form-item>
  663. <el-form-item prop="projectDesc" style="margin-left: 15px">
  664. <template #label>
  665. <span class="big-label">项目名称</span>
  666. </template>
  667. <el-input v-model="modalData.projectDesc" disabled style="width: 191px;"></el-input>
  668. </el-form-item>
  669. <el-form-item prop="bu" style="margin-left: 15px">
  670. <template #label>
  671. <span class="big-label">BU</span>
  672. </template>
  673. <el-input v-model="modalData.bu" disabled style="width: 151px;"></el-input>
  674. </el-form-item>
  675. </el-form>
  676. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  677. <el-form-item prop="customerNo">
  678. <template #label>
  679. <span class="big-label">客户编码</span>
  680. </template>
  681. <el-input v-model="modalData.customerNo" disabled style="width: 151px;"></el-input>
  682. </el-form-item>
  683. <el-form-item prop="customerDesc" style="margin-left: 15px">
  684. <template #label>
  685. <span class="big-label">客户名称</span>
  686. </template>
  687. <el-input v-model="modalData.customerDesc" disabled style="width: 191px;"></el-input>
  688. </el-form-item>
  689. <el-form-item prop="cProjectTypeDb" style="margin-left: 15px">
  690. <template #label>
  691. <span class="big-label">项目分类</span>
  692. </template>
  693. <el-input v-model="modalData.cProjectTypeDb" disabled style="width: 151px;"></el-input>
  694. </el-form-item>
  695. </el-form>
  696. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  697. <el-form-item prop="testPartNo" :rules="rules.testPartNo">
  698. <template #label>
  699. <span class="big-label">项目料号</span>
  700. </template>
  701. <el-input v-model="modalData.testPartNo" disabled style="width: 151px;"></el-input>
  702. </el-form-item>
  703. <el-form-item prop="partDesc" style="margin-left: 15px">
  704. <template #label>
  705. <span class="big-label">料号描述</span>
  706. </template>
  707. <el-input v-model="modalData.partDesc" disabled style="width: 191px;"></el-input>
  708. </el-form-item>
  709. <el-form-item prop="proofingNo" style="margin-left: 15px">
  710. <template #label>
  711. <span class="big-label">打样单号</span>
  712. </template>
  713. <el-input v-model="modalData.proofingNo" disabled style="width: 151px;"></el-input>
  714. </el-form-item>
  715. </el-form>
  716. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addProjectDocumentTypeFlag = true">新增</el-button>
  717. <el-table
  718. :height="this.height + 50"
  719. :data="proofDocumentListDefinition"
  720. border
  721. style="width: 100%;">
  722. <el-table-column
  723. v-for="(item,index) in columnProjectDocumentManifestDefinitionList" :key="index"
  724. :sortable="item.columnSortable"
  725. :prop="item.columnProp"
  726. :header-align="item.headerAlign"
  727. :show-overflow-tooltip="item.showOverflowTooltip"
  728. :align="item.align"
  729. :fixed="item.fixed==''?false:item.fixed"
  730. :min-width="item.columnWidth"
  731. :label="item.columnLabel">
  732. <template slot-scope="scope">
  733. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  734. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  735. </template>
  736. </el-table-column>
  737. <el-table-column
  738. header-align="center"
  739. align="center"
  740. width="100"
  741. label="操作">
  742. <template slot-scope="scope">
  743. <a v-if="!authDelete" type="text" size="small" @click="deleteProjectDocumentType(scope.row)">删除</a>
  744. </template>
  745. </el-table-column>
  746. </el-table>
  747. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  748. <el-button @click="projectDocumentListVisible = false">关闭</el-button>
  749. </el-footer>
  750. </el-dialog>
  751. <!-- 新增文档类型 -->
  752. <el-dialog title="新增文档类型" @close="closeAddProjectDocumentTypeFlag" @open="searchProjectDocumentTypeList" :visible.sync="addProjectDocumentTypeFlag" width="768px" style="margin-top: 7px" v-drag :close-on-click-modal="false">
  753. <el-form inline="inline" label-position="top" :model="searchProjectDocumentTypeData" style="margin-left: 7px;margin-top: -5px;">
  754. <el-form-item label="文档类型ID">
  755. <el-input v-model="searchProjectDocumentTypeData.documentTypeId" clearable style="width: 151px"></el-input>
  756. </el-form-item>
  757. <el-form-item label="文档类型">
  758. <el-input v-model="searchProjectDocumentTypeData.documentType" clearable style="width: 151px"></el-input>
  759. </el-form-item>
  760. <el-form-item label="责任部门">
  761. <el-input v-model="searchProjectDocumentTypeData.responsibleDepartment" clearable style="width: 151px"></el-input>
  762. </el-form-item>
  763. <el-form-item label=" ">
  764. <el-button type="primary" style="padding: 3px 12px" @click="searchProjectDocumentTypeList()">查询</el-button>
  765. </el-form-item>
  766. </el-form>
  767. <el-table
  768. :height="this.height + 150"
  769. :data="extraProjectDocumentList"
  770. stripe
  771. border
  772. @selection-change="selectionProjectDocument"
  773. style="width: 100%;">
  774. <el-table-column
  775. header-align="center"
  776. type="selection"
  777. align="center"
  778. width="55">
  779. </el-table-column>
  780. <el-table-column
  781. prop="documentTypeId"
  782. header-align="center"
  783. align="center"
  784. width="100"
  785. label="文档类型ID">
  786. </el-table-column>
  787. <el-table-column
  788. prop="documentType"
  789. header-align="center"
  790. align="left"
  791. label="文档类型">
  792. </el-table-column>
  793. <el-table-column
  794. prop="responsibleDepartment"
  795. header-align="center"
  796. align="left"
  797. label="责任部门">
  798. </el-table-column>
  799. </el-table>
  800. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  801. <el-button type="primary" @click="saveSelectionProjectDocumentType()">确定</el-button>
  802. <el-button @click="addProjectDocumentTypeFlag = false">关闭</el-button>
  803. </el-footer>
  804. </el-dialog>
  805. <el-dialog title="选择生产确认文档" :visible.sync="projectProductionValidationDocumentVisible" width="1050px" style="margin-top: -5vh" :close-on-click-modal="false">
  806. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  807. <el-form-item label="项目编码" prop="projectNo" class="red-label">
  808. <el-input v-model="modalData.projectNo" style="width: 110px;" disabled></el-input>
  809. </el-form-item>
  810. <el-form-item label="项目名称" prop="projectDesc" >
  811. <el-input v-model="modalData.projectDesc" style="width: 170px;" disabled></el-input>
  812. </el-form-item>
  813. <el-form-item label="BU" prop="bu">
  814. <el-input v-model="modalData.bu" style="width: 110px;" disabled></el-input>
  815. </el-form-item>
  816. <el-form-item label="项目料号" prop="testPartNo" >
  817. <el-input v-model="modalData.testPartNo" style="width: 110px;" disabled></el-input>
  818. </el-form-item>
  819. <el-form-item label="料号描述" prop="partDesc" >
  820. <el-input v-model="modalData.partDesc" style="width: 170px;" disabled></el-input>
  821. </el-form-item>
  822. </el-form>
  823. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  824. <el-form-item label="客户编码" prop="customerNo" >
  825. <el-input v-model="modalData.customerNo" style="width: 110px;" disabled></el-input>
  826. </el-form-item>
  827. <el-form-item label="客户名称" prop="customerDesc" >
  828. <el-input v-model="modalData.customerDesc" style="width: 170px;" disabled></el-input>
  829. </el-form-item>
  830. <el-form-item label="项目分类" prop="cProjectTypeDb">
  831. <el-input v-model="modalData.cProjectTypeDb" style="width: 110px;" disabled></el-input>
  832. </el-form-item>
  833. <el-form-item label="要求最晚确认日期" prop="wantedConfirmDate" :rules="rules.wantedConfirmDate">
  834. <el-date-picker
  835. v-model="modalData.wantedConfirmDate"
  836. type="date"
  837. placeholder="选择日期"
  838. style="width: 110px;">
  839. </el-date-picker>
  840. </el-form-item>
  841. </el-form>
  842. <el-tabs v-model="activeName1" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
  843. <el-tab-pane label="文档选择" name="selectDocument" style="width: 104%">
  844. <el-table
  845. v-model="selectedDocumentItems"
  846. :height="height + 250"
  847. :data="projectAllDocumentList1"
  848. border
  849. style="width: 100%;margin-top: -13px;margin-left: -14px !important; margin-right: 0 !important;"
  850. @selection-change="handleDocumentSelectionChange">
  851. <el-table-column
  852. type="selection"
  853. header-align="center"
  854. align="center"
  855. width="50">
  856. </el-table-column>
  857. <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
  858. <el-table-column label="文档类型" align="center">
  859. <template slot-scope="scope">
  860. {{ getCombinedDocumentType(scope.row) }}
  861. </template>
  862. </el-table-column>
  863. <el-table-column
  864. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  865. :sortable="item.columnSortable"
  866. :prop="item.columnProp"
  867. :header-align="item.headerAlign"
  868. :show-overflow-tooltip="item.showOverflowTooltip"
  869. :align="item.align"
  870. :fixed="item.fixed==''?false:item.fixed"
  871. :min-width="item.columnWidth"
  872. :label="item.columnLabel">
  873. <template slot-scope="scope">
  874. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  875. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  876. </template>
  877. </el-table-column>
  878. </el-table>
  879. </el-tab-pane>
  880. <el-tab-pane label="确认人员清单" name="confirmatory" style="width: 104%">
  881. <div style="font-size: 12px;margin-top: -15px">
  882. <el-form :inline="true" label-position="top" :model="confirmatoryData">
  883. <el-form-item :label="'用户账号'">
  884. <el-input v-model="confirmatoryData.username" clearable style="width: 120px"></el-input>
  885. </el-form-item>
  886. <el-form-item :label="'用户名称'">
  887. <el-input v-model="confirmatoryData.userDisplay" clearable style="width: 200px"></el-input>
  888. </el-form-item>
  889. <el-form-item :label="' '">
  890. <el-button type="primary" @click="searchConfirmatorList()">查询</el-button>
  891. </el-form-item>
  892. </el-form>
  893. </div>
  894. <el-container style="margin-top: -5px;margin-left: -10px">
  895. <el-main style="width: 400px; padding: 1px">
  896. <span style="font-size: 12px" >可选人员</span>
  897. <el-table
  898. :height="height + 200"
  899. :data="projectANotDocumentConfirmatorList"
  900. border
  901. ref="confirmatoryTable1"
  902. @row-click="confirmatoryClickRow1"
  903. @selection-change="selectionConfirmatory1"
  904. highlight-current-row
  905. style="width: 100%">
  906. <el-table-column
  907. type="selection"
  908. header-align="center"
  909. align="center"
  910. :selectable="selectFlag"
  911. width="50">
  912. </el-table-column>
  913. <el-table-column
  914. prop="username"
  915. header-align="center"
  916. align="center"
  917. min-width="80"
  918. label="用户账号">
  919. </el-table-column>
  920. <el-table-column
  921. prop="userDisplay"
  922. header-align="center"
  923. align="center"
  924. min-width="120"
  925. label="用户名称">
  926. </el-table-column>
  927. </el-table>
  928. </el-main>
  929. <el-main style="width: 111px;padding: 1px;margin-right: -20px">
  930. <div style="margin-top: 126px;margin-left: 7px">
  931. <el-button type="primary" @click="addConfirmatory()">添加>></el-button>
  932. </div>
  933. <div style="margin-top: 15px;margin-left: 7px">
  934. <el-button type="primary" @click="deleteConfirmatory()">删除<<</el-button>
  935. </div>
  936. </el-main>
  937. <el-main style="width: 400px;padding: 1px;margin-left: -90px">
  938. <span style="font-size: 12px" >确认人员</span>
  939. <el-table
  940. :height="height + 200"
  941. :data="projectAllDocumentConfirmatorList"
  942. border
  943. ref="confirmatoryTable2"
  944. @row-click="confirmatoryClickRow2"
  945. @selection-change="selectionConfirmatory2"
  946. highlight-current-row
  947. style="width: 96%">
  948. <el-table-column
  949. type="selection"
  950. header-align="center"
  951. align="center"
  952. :selectable="selectFlag"
  953. width="50">
  954. </el-table-column>
  955. <el-table-column
  956. prop="username"
  957. header-align="center"
  958. align="center"
  959. min-width="80"
  960. label="用户账号">
  961. </el-table-column>
  962. <el-table-column
  963. prop="userDisplay"
  964. header-align="center"
  965. align="center"
  966. min-width="120"
  967. label="用户名称">
  968. </el-table-column>
  969. </el-table>
  970. </el-main>
  971. </el-container>
  972. </el-tab-pane>
  973. </el-tabs>
  974. <div slot="footer" class="dialog-footer" style="margin-top: 6px">
  975. <el-button type="primary" @click="saveProductionValidationDocument()">确定</el-button>
  976. <el-button @click="closeProjectProductionValidationDocumentVisibleDialog">关闭</el-button>
  977. </div>
  978. </el-dialog>
  979. <el-dialog title="确认" @close="closeUploadFileVisible" :visible.sync="confirmVisible" width="619px" style="margin-top: 0vh;height: 100%;" :close-on-click-modal="false">
  980. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  981. <el-form-item label="项目编码" prop="projectNo" class="red-label">
  982. <el-input v-model="modalData.projectNo" style="width: 110px;" disabled></el-input>
  983. </el-form-item>
  984. <el-form-item label="项目名称" prop="projectDesc" >
  985. <el-input v-model="modalData.projectDesc" style="width: 210px;" disabled></el-input>
  986. </el-form-item>
  987. <el-form-item label="BU" prop="bu">
  988. <el-input v-model="modalData.bu" style="width: 110px;" disabled></el-input>
  989. </el-form-item>
  990. <el-form-item label="项目分类" prop="cProjectTypeDb">
  991. <el-input v-model="modalData.cProjectTypeDb" style="width: 110px;" disabled></el-input>
  992. </el-form-item>
  993. </el-form>
  994. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  995. <el-form-item label="项目料号" prop="testPartNo" >
  996. <el-input v-model="modalData.testPartNo" style="width: 110px;" disabled></el-input>
  997. </el-form-item>
  998. <el-form-item label="料号描述" prop="partDesc" >
  999. <el-input v-model="modalData.partDesc" style="width: 210px;" disabled></el-input>
  1000. </el-form-item>
  1001. <el-form-item label="指定确认人" prop="userDisplay">
  1002. <el-input v-model="confirmData.userDisplay" disabled style="width: 110px;"></el-input>
  1003. </el-form-item>
  1004. <el-form-item label="要求确认日期" prop="wantedConfirmDate">
  1005. <el-input v-model="confirmData.wantedConfirmDate" style="width: 110px;" disabled></el-input>
  1006. </el-form-item>
  1007. </el-form>
  1008. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -5px;">
  1009. <el-form-item label="备注" prop="remark">
  1010. <el-input v-model="confirmData.remark" style="width: 581px" type="textarea" :rows="1"></el-input>
  1011. </el-form-item>
  1012. </el-form>
  1013. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -15px;">
  1014. <el-form-item label=" ">
  1015. <a href="javascript:void(0);" @click="triggerUpload" type="text" size="small">点击选择文件</a>
  1016. <tr></tr>
  1017. <el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 581px"></el-input>
  1018. <el-upload class="custom-upload" :file-list="fileList"
  1019. action="javascript:void(0);" ref="uploadFile"
  1020. :on-change="onChange" :on-close="closeFileUpdate"
  1021. multiple :auto-upload="false"
  1022. style="text-align: left;margin-top: 0px;margin-left: 6px;display: none;">
  1023. </el-upload>
  1024. </el-form-item>
  1025. </el-form>
  1026. <el-table
  1027. :height="this.height + 70"
  1028. :data="projectConfirmatorFileList"
  1029. border
  1030. style="width: 100%;margin-top: 25px;margin-left: 0px;">
  1031. <el-table-column
  1032. prop="fileName"
  1033. header-align="center"
  1034. align="center"
  1035. min-width="180"
  1036. label="文件名">
  1037. </el-table-column>
  1038. <el-table-column
  1039. prop="createDate"
  1040. header-align="center"
  1041. align="center"
  1042. min-width="80"
  1043. label="上传时间">
  1044. </el-table-column>
  1045. <el-table-column
  1046. prop="createdBy"
  1047. header-align="center"
  1048. align="center"
  1049. min-width="60"
  1050. label="上传人">
  1051. </el-table-column>
  1052. </el-table>
  1053. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1054. <el-button type="primary" @click="saveUploadFile()">确定</el-button>
  1055. <el-button @click="closeUploadFileVisible()">关闭</el-button>
  1056. </div>
  1057. </el-dialog>
  1058. <el-dialog title="查看附件" @close="closeViewDocumentFileVisible" :visible.sync="viewDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false">
  1059. <el-table
  1060. :height="height + 200"
  1061. :data="projectConfirmatorFileList"
  1062. border
  1063. style="width: 100%;margin-top: 0px;margin-left: 0px;">
  1064. <el-table-column
  1065. prop="fileName"
  1066. header-align="center"
  1067. align="left"
  1068. min-width="250"
  1069. label="文件名">
  1070. </el-table-column>
  1071. <el-table-column
  1072. prop="createDate"
  1073. header-align="center"
  1074. align="center"
  1075. min-width="80"
  1076. label="上传时间">
  1077. </el-table-column>
  1078. <el-table-column
  1079. prop="createdBy"
  1080. header-align="center"
  1081. align="center"
  1082. min-width="50"
  1083. label="上传人">
  1084. </el-table-column>
  1085. <el-table-column
  1086. header-align="center"
  1087. align="center"
  1088. width="100"
  1089. label="操作">
  1090. <template slot-scope="scope">
  1091. <a type="text" size="small" @click="viewFile(scope.row)">查看</a>
  1092. <a type="text" size="small" @click="downloadFile(scope.row)">下载</a>
  1093. <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
  1094. </template>
  1095. </el-table-column>
  1096. </el-table>
  1097. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1098. <el-button @click="closeViewDocumentFileVisible()">关闭</el-button>
  1099. </div>
  1100. </el-dialog>
  1101. <el-dialog title="查看附件" @close="closeViewMassDocumentFileVisible" :visible.sync="viewMassDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false">
  1102. <el-table
  1103. :height="height + 200"
  1104. :data="projectConfirmatorFileList"
  1105. border
  1106. style="width: 100%;margin-top: 0px;margin-left: 0px;">
  1107. <el-table-column
  1108. prop="fileName"
  1109. header-align="center"
  1110. align="left"
  1111. min-width="250"
  1112. label="文件名">
  1113. </el-table-column>
  1114. <el-table-column
  1115. prop="createDate"
  1116. header-align="center"
  1117. align="center"
  1118. min-width="80"
  1119. label="上传时间">
  1120. </el-table-column>
  1121. <el-table-column
  1122. prop="createdBy"
  1123. header-align="center"
  1124. align="center"
  1125. min-width="50"
  1126. label="上传人">
  1127. </el-table-column>
  1128. <el-table-column
  1129. header-align="center"
  1130. align="center"
  1131. width="100"
  1132. label="操作">
  1133. <template slot-scope="scope">
  1134. <a type="text" size="small" @click="viewFile(scope.row)">查看</a>
  1135. <a type="text" size="small" @click="downloadFile(scope.row)">下载</a>
  1136. </template>
  1137. </el-table-column>
  1138. </el-table>
  1139. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1140. <el-button @click="closeViewMassDocumentFileVisible()">关闭</el-button>
  1141. </div>
  1142. </el-dialog>
  1143. <el-dialog title="新增打样" :visible.sync="visible" v-drag width="768px" style="margin-top: 7px" :close-on-click-modal="false">
  1144. <el-form :inline="true" label-position="top" :model="newProofingRecordData" style="margin-left: 7px;margin-top: -5px;">
  1145. <el-form-item prop="projectNo">
  1146. <template #label>
  1147. <span class="big-label">项目编码</span>
  1148. </template>
  1149. <el-input v-model="newProofingRecordData.projectNo" style="width: 189px;" disabled></el-input>
  1150. </el-form-item>
  1151. <el-form-item prop="projectDesc" style="margin-left: 15px">
  1152. <template #label>
  1153. <span class="big-label">项目名称</span>
  1154. </template>
  1155. <el-input v-model="newProofingRecordData.projectDesc" style="width: 330px;" disabled></el-input>
  1156. </el-form-item>
  1157. <el-form-item prop="bu" style="margin-left: 15px" :rules="rules.bu">
  1158. <template #label>
  1159. <span class="big-label">BU</span>
  1160. </template>
  1161. <el-select v-model="newProofingRecordData.bu" placeholder="请选择" style="width: 154px" disabled>
  1162. <el-option
  1163. v-for="i in userBuList"
  1164. :key="i.buNo"
  1165. :label="i.buDesc"
  1166. :value="i.buNo">
  1167. </el-option>
  1168. </el-select>
  1169. </el-form-item>
  1170. </el-form>
  1171. <el-form :inline="true" label-position="top" :model="newProofingRecordData" style="margin-left: 7px;margin-top: 20px;">
  1172. <el-form-item prop="customerNo">
  1173. <template #label>
  1174. <span class="big-label">客户编码</span>
  1175. </template>
  1176. <el-input v-model="newProofingRecordData.customerNo" style="width: 189px;" disabled></el-input>
  1177. </el-form-item>
  1178. <el-form-item prop="customerDesc" style="margin-left: 15px">
  1179. <template #label>
  1180. <span class="big-label">客户名称</span>
  1181. </template>
  1182. <el-input v-model="newProofingRecordData.customerDesc" style="width: 330px;" disabled></el-input>
  1183. </el-form-item>
  1184. </el-form>
  1185. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1186. <el-form-item prop="testPartNo" :rules="rules.testPartNo">
  1187. <template #label>
  1188. <span class="big-label">项目料号</span>
  1189. </template>
  1190. <el-input v-model="newProofingRecordData.testPartNo" style="width: 189px;" disabled></el-input>
  1191. </el-form-item>
  1192. <el-form-item prop="partDesc" style="margin-left: 15px">
  1193. <template #label>
  1194. <span class="big-label">料号描述</span>
  1195. </template>
  1196. <el-input v-model="newProofingRecordData.partDesc" style="width: 330px;" disabled></el-input>
  1197. </el-form-item>
  1198. </el-form>
  1199. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1200. <el-form-item prop="cProjectTypeDb">
  1201. <template #label>
  1202. <span class="big-label">项目分类</span>
  1203. </template>
  1204. <el-select v-model="newProofingRecordData.cProjectTypeDb" placeholder="请选择" clearable style="width: 189px">
  1205. <el-option
  1206. v-for="i in cProjectTypeDbList"
  1207. :key="i.cProjectTypeDb"
  1208. :label="i.cProjectTypeDb"
  1209. :value="i.cProjectTypeDb">
  1210. </el-option>
  1211. </el-select>
  1212. </el-form-item>
  1213. <el-form-item prop="projectPhase" style="margin-left: 15px" :rules="rules.projectPhase">
  1214. <template #label>
  1215. <span class="big-label">项目阶段</span>
  1216. </template>
  1217. <el-select v-model="newProofingRecordData.projectPhase" placeholder="请选择" clearable style="width: 150px">
  1218. <el-option
  1219. v-for="i in projectPhaseList"
  1220. :key="i.projectPhase"
  1221. :label="i.projectPhase"
  1222. :value="i.projectPhase">
  1223. </el-option>
  1224. </el-select>
  1225. </el-form-item>
  1226. <el-form-item prop="proofingNo" style="margin-left: 15px" :rules="rules.proofingNo">
  1227. <template #label>
  1228. <span class="big-label">打样单号</span>
  1229. </template>
  1230. <el-input v-model="newProofingRecordData.proofingNo" style="width: 151px;"></el-input>
  1231. </el-form-item>
  1232. <el-form-item prop="proofingNumber" style="margin-left: 15px" :rules="rules.proofingNo">
  1233. <template #label>
  1234. <span class="big-label">数量</span>
  1235. </template>
  1236. <el-input v-model="newProofingRecordData.proofingNumber" style="width: 154px"></el-input>
  1237. </el-form-item>
  1238. </el-form>
  1239. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1240. <el-form-item prop="" :rules="rules.planStartDate">
  1241. <template #label>
  1242. <span class="big-label">打样开始日期</span>
  1243. </template>
  1244. <el-date-picker
  1245. v-model="newProofingRecordData.planStartDate"
  1246. type="date"
  1247. value-format="yyyy-MM-dd"
  1248. placeholder="选择日期"
  1249. style="width: 189px;"
  1250. >
  1251. </el-date-picker>
  1252. </el-form-item>
  1253. <el-form-item prop="" style="margin-left: 15px" :rules="rules.requiredDeliveryDate">
  1254. <template #label>
  1255. <span class="big-label">预计完成日期</span>
  1256. </template>
  1257. <el-date-picker
  1258. v-model="newProofingRecordData.requiredDeliveryDate"
  1259. type="date"
  1260. value-format="yyyy-MM-dd"
  1261. placeholder="选择日期"
  1262. style="width: 150px;"
  1263. >
  1264. </el-date-picker>
  1265. </el-form-item>
  1266. <el-form-item prop="" style="margin-left: 15px">
  1267. <template #label>
  1268. <span class="big-label">实际完成日期</span>
  1269. </template>
  1270. <el-date-picker
  1271. v-model="newProofingRecordData.actualityDeliveryDate"
  1272. type="date"
  1273. placeholder="选择日期"
  1274. style="width: 151px;"
  1275. disabled>
  1276. </el-date-picker>
  1277. </el-form-item>
  1278. </el-form>
  1279. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1280. <el-form-item prop="remark">
  1281. <template #label>
  1282. <span class="big-label">备注</span>
  1283. </template>
  1284. <el-input v-model="newProofingRecordData.remark" style="width: 731px" type="textarea" :rows="2"></el-input>
  1285. </el-form-item>
  1286. </el-form>
  1287. <el-footer style="height:40px;margin-top: 45px;text-align:center">
  1288. <el-button @click="visible = false">取 消</el-button>
  1289. <el-button type="primary" @click="newProofingRecord()">确 定</el-button>
  1290. </el-footer>
  1291. </el-dialog>
  1292. <!-- 模态框:详情 -->
  1293. <el-dialog :visible.sync="dialogVisible" width="80%" style="margin-top: -15px">
  1294. <el-tabs style="margin-top: -2px; width: 100%; height: 100%;" v-model="activeModalTab" type="border-card" @tab-click="tabClick">
  1295. <el-tab-pane label="打样记录" name="proofRecord">
  1296. <!-- 注意这里使用了一个新的 ref,用于模态框内部的 proofRecord 组件 -->
  1297. <proofRecord ref="proofRecordModal" :inModal="true" :selected-site="proofingCurrentRow.site"></proofRecord>
  1298. </el-tab-pane>
  1299. <el-tab-pane label="转量产阶段文档" name="massProductionStage">
  1300. <el-button type="primary" v-if="!this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>
  1301. <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>
  1302. <el-button type="primary" v-if="this.sendMassMailFlag === true && !this.authUpdate" style="margin-top: -5px" @click="sendMassMailHandle()">邮件提醒</el-button>
  1303. <el-button type="primary" v-loading="this.downloadLoading" v-if="projectOtherDocumentList.length>0" style="margin-top: -3px;" @click="dowloadAllFile()">一键下载</el-button>
  1304. <el-table
  1305. :data="projectOtherDocumentList"
  1306. border
  1307. style="width: 100%;margin-top: 5px;"
  1308. :height="this.height + 250"
  1309. ref="proofDocumentTable"
  1310. @row-click="projectOtherDocumentClickRow"
  1311. @current-change="changeCurrentRow1"
  1312. :row-class-name="tableRowClassName"
  1313. v-loading="dataListLoading">
  1314. <el-table-column
  1315. v-if="this.authUpdate"
  1316. header-align="center"
  1317. align="center"
  1318. width="120"
  1319. fixed="left"
  1320. label="操作">
  1321. <template slot-scope="scope">
  1322. <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
  1323. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1324. @click="copyFile(scope.row)">复制</a>
  1325. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1326. <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"
  1327. @click="massProductionDocumentDelete(scope.row)">删除</a>
  1328. </template>
  1329. </el-table-column>
  1330. <el-table-column
  1331. v-else
  1332. header-align="center"
  1333. align="center"
  1334. width="150"
  1335. fixed="left"
  1336. label="操作">
  1337. <template slot-scope="scope">
  1338. <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
  1339. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1340. @click="copyFile(scope.row)">复制</a>
  1341. <a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a>
  1342. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1343. <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
  1344. </template>
  1345. </el-table-column>
  1346. <el-table-column label="序号" type="index" align="center" :index="indexMethod">
  1347. <template slot-scope="scope">
  1348. <span>
  1349. {{ scope.$index + 1 }}
  1350. </span>
  1351. </template>
  1352. </el-table-column>
  1353. <el-table-column label="文档类型" align="left">
  1354. <template slot-scope="scope">
  1355. <span>
  1356. {{ getCombinedDocumentType(scope.row) }}
  1357. </span>
  1358. </template>
  1359. </el-table-column>
  1360. <el-table-column
  1361. v-for="(item,index) in columnFileContentArray" :key="index"
  1362. :sortable="item.columnSortable"
  1363. :prop="item.columnProp"
  1364. :header-align="item.headerAlign"
  1365. :show-overflow-tooltip="item.showOverflowTooltip"
  1366. :align="item.align"
  1367. :fixed="item.fixed==''?false:item.fixed"
  1368. :min-width="item.columnWidth"
  1369. :label="item.columnLabel">
  1370. <template slot-scope="scope">
  1371. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1372. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1373. style="width: 100px; height: 80px"/></span>
  1374. </template>
  1375. </el-table-column>
  1376. </el-table>
  1377. </el-tab-pane>
  1378. <el-tab-pane label="所有文档" name="allDocument">
  1379. <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿' && !this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>
  1380. <el-button type="primary" v-loading="this.downloadLoading" v-if="projectAllDocumentList.length>0" style="margin-top: -3px;" @click="dowloadAllFile2()">一键下载</el-button>
  1381. <el-table
  1382. :data="projectAllDocumentList"
  1383. border
  1384. style="width: 100%;margin-top: 5px;"
  1385. :height="this.height + 250"
  1386. ref="projectAllDocumentDocumentTable"
  1387. @row-click="projectAllDocumentClickRow"
  1388. v-loading="dataListLoading"
  1389. :row-class-name="tableRowClassName">
  1390. <el-table-column
  1391. v-if="this.authUpdate"
  1392. header-align="center"
  1393. fixed="left"
  1394. align="center"
  1395. width="90"
  1396. label="操作">
  1397. <template slot-scope="scope">
  1398. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1399. <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>
  1400. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1401. @click="copyFile(scope.row)">复制</a>
  1402. <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"
  1403. @click="massProductionDocumentDelete(scope.row)">删除</a>
  1404. </template>
  1405. </el-table-column>
  1406. <el-table-column
  1407. v-else
  1408. header-align="center"
  1409. fixed="left"
  1410. align="center"
  1411. width="90"
  1412. label="操作">
  1413. <template slot-scope="scope">
  1414. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1415. <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>
  1416. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1417. @click="copyFile(scope.row)">复制</a>
  1418. <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
  1419. </template>
  1420. </el-table-column>
  1421. <el-table-column label="序号" type="index" align="center" :index="indexMethod">
  1422. <template slot-scope="scope">
  1423. <span>
  1424. {{ scope.$index + 1 }}
  1425. </span>
  1426. </template>
  1427. </el-table-column>
  1428. <el-table-column label="文档类型" align="left">
  1429. <template slot-scope="scope">
  1430. <span>
  1431. {{ getCombinedDocumentType(scope.row) }}
  1432. </span>
  1433. </template>
  1434. </el-table-column>
  1435. <el-table-column
  1436. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  1437. :sortable="item.columnSortable"
  1438. :prop="item.columnProp"
  1439. :header-align="item.headerAlign"
  1440. :show-overflow-tooltip="item.showOverflowTooltip"
  1441. :align="item.align"
  1442. :fixed="item.fixed==''?false:item.fixed"
  1443. :min-width="item.columnWidth"
  1444. :label="item.columnLabel">
  1445. <template slot-scope="scope">
  1446. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1447. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1448. style="width: 100px; height: 80px"/></span>
  1449. </template>
  1450. </el-table-column>
  1451. </el-table>
  1452. </el-tab-pane>
  1453. <el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">
  1454. <el-row>
  1455. <el-col :span="8" class="left-section">
  1456. <div class="table-container" style="height: 100%;margin-top: -5px">
  1457. <p style="margin-top: -5px">文档清单</p>
  1458. <el-table :data="confirmProgressDocumentList"
  1459. border
  1460. style="width: 100%;margin-top: -5px;"
  1461. :height="this.height + 95">
  1462. <el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>
  1463. <el-table-column header-align="center" align="left" prop="documentType" label="文档类型"></el-table-column>
  1464. <el-table-column header-align="center" align="left" prop="fileName" label="文件名"></el-table-column>
  1465. <el-table-column
  1466. header-align="center"
  1467. align="center"
  1468. width="90"
  1469. fixed="right"
  1470. label="操作">
  1471. <template slot-scope="scope">
  1472. <a type="text" size="small" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1473. </template>
  1474. </el-table-column>
  1475. </el-table>
  1476. </div>
  1477. </el-col>
  1478. <el-col :span="15" class="right-section">
  1479. <div class="table-container" style="height: 100%;margin-top: -5px">
  1480. <p style="margin-top: -5px">推送人员清单</p>
  1481. <el-table :data="confirmProgressPusherList"
  1482. border
  1483. style="width: 100%;margin-top: -5px;"
  1484. :height="this.height + 95">
  1485. <el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>
  1486. <el-table-column header-align="center" align="left" width="70" prop="userDisplay" label="指定确认人"></el-table-column>
  1487. <el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>
  1488. <el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>
  1489. <el-table-column header-align="center" align="left" prop="confirmedBy" label="实际确认人"></el-table-column>
  1490. <el-table-column header-align="center" align="left" prop="remark" label="备注"></el-table-column>
  1491. <el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>
  1492. <el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>
  1493. <el-table-column header-align="center" align="left" prop="createBy" label="推送人"></el-table-column>
  1494. <el-table-column
  1495. header-align="center"
  1496. align="center"
  1497. width="90"
  1498. fixed="left"
  1499. label="操作">
  1500. <template slot-scope="scope">
  1501. <a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>
  1502. <a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>
  1503. </template>
  1504. </el-table-column>
  1505. </el-table>
  1506. </div>
  1507. </el-col>
  1508. </el-row>
  1509. </el-tab-pane>
  1510. <el-tab-pane label="量产BOM" name="massProductionBOM">
  1511. <el-table
  1512. :data="projectPartBomList"
  1513. row-key="levelCode"
  1514. border
  1515. style="width: 100%; margin-top: 5px;"
  1516. :height="this.height + 250"
  1517. ref="projectBomTable"
  1518. v-loading="dataListLoading"
  1519. :tree-props="{ children: 'children' }">
  1520. <!-- 数据列 -->
  1521. <el-table-column
  1522. label=""
  1523. prop=""
  1524. header-align="center"
  1525. align="center"
  1526. width="80">
  1527. </el-table-column>
  1528. <el-table-column
  1529. v-for="(item, index) in columnProjectBomList"
  1530. :key="index"
  1531. :sortable="item.columnSortable"
  1532. :prop="item.columnProp"
  1533. :header-align="item.headerAlign"
  1534. :show-overflow-tooltip="item.showOverflowTooltip"
  1535. :align="item.align"
  1536. :fixed="item.fixed === '' ? false : item.fixed"
  1537. :min-width="item.columnWidth"
  1538. :label="item.columnLabel">
  1539. <template slot-scope="scope">
  1540. <div v-if="item.columnProp === 'levelCode'">
  1541. <span v-if="scope.row.levelCode === '1'">{{ '主BOM' }}</span>
  1542. <span v-else>{{ scope.row.levelCode }}</span>
  1543. </div>
  1544. <div v-else>
  1545. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1546. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1547. </div>
  1548. </template>
  1549. </el-table-column>
  1550. </el-table>
  1551. </el-tab-pane>
  1552. <el-tab-pane label="产品工艺路线" name="Routing">
  1553. <el-table
  1554. :data="projectPartRoutingList"
  1555. border
  1556. style="width: 100%; margin-top: 5px;"
  1557. :height="this.height + 250"
  1558. ref="projectBomTable"
  1559. v-loading="dataListLoading"
  1560. >
  1561. <!-- 数据列 -->
  1562. <el-table-column
  1563. v-for="(item, index) in columnProjectRoutingList"
  1564. :key="index"
  1565. :sortable="item.columnSortable"
  1566. :prop="item.columnProp"
  1567. :header-align="item.headerAlign"
  1568. :show-overflow-tooltip="item.showOverflowTooltip"
  1569. :align="item.align"
  1570. :fixed="item.fixed === '' ? false : item.fixed"
  1571. :min-width="item.columnWidth"
  1572. :label="item.columnLabel">
  1573. <template slot-scope="scope">
  1574. <div v-if="item.columnProp === 'levelCode'">
  1575. <span v-if="scope.row.levelCode === '1'">{{ '1' }}</span>
  1576. <span v-else>{{ scope.row.levelCode }}</span>
  1577. </div>
  1578. <div v-else>
  1579. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1580. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1581. </div>
  1582. </template>
  1583. </el-table-column>
  1584. </el-table>
  1585. </el-tab-pane>
  1586. <el-tab-pane label="项目打样记录" name="projectProofRecord">
  1587. <el-table
  1588. :data="projectProofRecordList"
  1589. border
  1590. style="width: 100%; margin-top: 5px;"
  1591. :height="this.height + 250"
  1592. v-loading="dataListLoading">
  1593. <el-table-column
  1594. v-for="(item, index) in columnProjectProofRecordList"
  1595. :key="index"
  1596. :sortable="item.columnSortable"
  1597. :prop="item.columnProp"
  1598. :header-align="item.headerAlign"
  1599. :show-overflow-tooltip="true"
  1600. :align="item.align"
  1601. :fixed="item.fixed === '' ? false : item.fixed"
  1602. :min-width="item.columnWidth"
  1603. :label="item.columnLabel">
  1604. <template slot-scope="scope">
  1605. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1606. </template>
  1607. </el-table-column>
  1608. </el-table>
  1609. </el-tab-pane>
  1610. </el-tabs>
  1611. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1612. <el-button @click="dialogVisible = false">关闭</el-button>
  1613. </div>
  1614. </el-dialog>
  1615. <!-- 复制文件模态框 -->
  1616. <el-dialog title="复制" @close="closeCopyDocumentFileFlag" @open="searchCopyDocumentFileList"
  1617. :visible.sync="copyDialog" width="1168px" style="margin-top: -15px" v-drag
  1618. :close-on-click-modal="false" append-to-body>
  1619. <el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;">
  1620. <el-form-item label="项目编码">
  1621. <el-input v-model="copyModalData.projectNo" readonly style="width: 101px"></el-input>
  1622. </el-form-item>
  1623. <el-form-item label="项目名称">
  1624. <el-input v-model="copyModalData.projectDesc" readonly style="width: 181px"></el-input>
  1625. </el-form-item>
  1626. <el-form-item label="物料编码">
  1627. <el-input v-model="copyModalData.testPartNo" readonly style="width: 101px"></el-input>
  1628. </el-form-item>
  1629. <el-form-item label="物料描述">
  1630. <el-input v-model="copyModalData.partDesc" readonly style="width: 181px"></el-input>
  1631. </el-form-item>
  1632. <el-form-item label="打样单号">
  1633. <el-input v-model="copyModalData.proofingNo" readonly style="width: 101px"></el-input>
  1634. </el-form-item>
  1635. </el-form>
  1636. <el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;">
  1637. <el-form-item label="文档类型ID">
  1638. <el-input v-model="copyModalData.documentTypeId" readonly style="width: 101px"></el-input>
  1639. </el-form-item>
  1640. <el-form-item label="文档类型">
  1641. <el-input v-model="copyModalData.documentType" readonly style="width: 181px"></el-input>
  1642. </el-form-item>
  1643. <el-form-item label="结论" :rules="rules.conclusion" v-if="copyModalData.proofingNo !== '*'">
  1644. <el-select v-model="copyModalData.conclusion" placeholder="请选择" clearable style="width: 101px">
  1645. <el-option label = "合格" value = "合格"></el-option>
  1646. <el-option label = "不合格" value = "不合格"></el-option>
  1647. <el-option label = "让步接受" value = "让步接受"></el-option>
  1648. <el-option label = "N/A" value = "N/A"></el-option>
  1649. </el-select>
  1650. </el-form-item>
  1651. </el-form>
  1652. <el-table
  1653. :height="this.height + 200"
  1654. :data="copyDocumentList"
  1655. border
  1656. @selection-change="selectionCopyDocument"
  1657. style="width: 100%;">
  1658. <el-table-column
  1659. type="selection"
  1660. align="center"
  1661. width="55">
  1662. </el-table-column>
  1663. <el-table-column
  1664. prop="testPartNo"
  1665. header-align="center"
  1666. align="left"
  1667. width="141"
  1668. label="物料编码">
  1669. </el-table-column>
  1670. <el-table-column
  1671. prop="partDesc"
  1672. header-align="center"
  1673. align="left"
  1674. width="191"
  1675. label="物料描述">
  1676. </el-table-column>
  1677. <el-table-column
  1678. prop="proofingNo"
  1679. header-align="center"
  1680. align="left"
  1681. label="打样单号">
  1682. </el-table-column>
  1683. <el-table-column
  1684. prop="documentTypeId"
  1685. header-align="center"
  1686. align="left"
  1687. label="文档类型ID">
  1688. </el-table-column>
  1689. <el-table-column
  1690. prop="documentType"
  1691. header-align="center"
  1692. align="left"
  1693. label="文档类型">
  1694. </el-table-column>
  1695. <el-table-column
  1696. prop="fileName"
  1697. header-align="center"
  1698. align="left"
  1699. width="191"
  1700. label="文档文件">
  1701. </el-table-column>
  1702. <el-table-column
  1703. prop="createDate"
  1704. header-align="center"
  1705. align="center"
  1706. label="上传时间">
  1707. </el-table-column>
  1708. <el-table-column
  1709. prop="createdBy"
  1710. header-align="center"
  1711. align="left"
  1712. label="上传人">
  1713. </el-table-column>
  1714. </el-table>
  1715. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  1716. <el-button type="primary" @click="saveSelectionCopyDocumentType()">确定</el-button>
  1717. <el-button @click="copyDialog = false">关闭</el-button>
  1718. </el-footer>
  1719. </el-dialog>
  1720. <upload-file-list-1 folder="projectPMPDocumentFiles" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="otherDocumentCurrentRow.documentTypeId" :no-type="otherDocumentCurrentRow.documentType"
  1721. :proofing-id="proofingCurrentRow.proofingId" :proofing-no="proofingCurrentRow.proofingNo" :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="otherDocumentCurrentRow.documentDesc" :id="otherDocumentCurrentRow.id"
  1722. :project-id="proofingCurrentRow.projectId" :project-no="proofingCurrentRow.projectNo" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
  1723. :customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo" :project-part-id="proofingCurrentRow.projectPartId" :project-part-no="proofingCurrentRow.projectPartId"
  1724. :part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectOtherDocumentList"
  1725. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
  1726. <upload-file-list-2 :folder="this.folder" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="projectAllDocumentCurrentRow.documentTypeId" :no-type="projectAllDocumentCurrentRow.documentType"
  1727. :proofing-id="projectAllDocumentCurrentRow.proofingId" :proofing-no="projectAllDocumentCurrentRow.proofingNo" :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog1" :no-desc="projectAllDocumentCurrentRow.documentDesc" :id="projectAllDocumentCurrentRow.id"
  1728. :project-id="proofingCurrentRow.projectId" :project-no="proofingCurrentRow.projectNo" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
  1729. :customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo" :project-part-id="proofingCurrentRow.projectPartId" :project-part-no="proofingCurrentRow.projectPartId"
  1730. :part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectPartDocumentList"
  1731. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-2>
  1732. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1733. </div>
  1734. </template>
  1735. <script>
  1736. import {getProjectCategoryByBu, getSiteAndBuByUserName} from "@/api/eam/eam.js"
  1737. import {
  1738. searchBusinessInfo,
  1739. searchBusinessInfo1,
  1740. searchBusinessInfo2,
  1741. searchBusinessInfo3,
  1742. searchBusinessInfo4,
  1743. searchBusinessInfo5,
  1744. searchBusinessInfo6
  1745. } from "@/api/factory/site.js"
  1746. import Chooselist from '@/views/modules/common/Chooselist_eam'
  1747. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from '@/api/userFavorite.js'
  1748. import {getTableDefaultListLanguage, getTableUserListLanguage,} from "@/api/table.js";
  1749. import proofRecord from "./com_project_proof_record";
  1750. import {
  1751. eamProjectInfoDelete,
  1752. eamProjectInfoEdit,
  1753. eamProjectInfoSave,
  1754. eamProjectInfoSearch,
  1755. saveFormalPartNo
  1756. } from "@/api/eam/eamProject.js";
  1757. import {getProjectOtherDocument} from "@/api/eam/eamProofing.js";
  1758. import UploadFileList1 from "../common/uploadFileList1.vue";
  1759. import UploadFileList2 from "../common/uploadFileList1.vue";
  1760. import {
  1761. copyDocumentFileToDoc,
  1762. deleteDocumentType, deleteProofDocument,
  1763. editProjectDocument, getCopyDocumentFileList,
  1764. getExtraDocumentList, getProofDocument,
  1765. projectDocumentSave,
  1766. proofingDocumentNEW, proofingDocumentSave, proofingInformationSave,
  1767. searchProjectAllDocument,
  1768. searchAllProofing
  1769. } from "../../../api/eam/eamProofing";
  1770. import {
  1771. deleteAndSaveHandle,
  1772. saveHandle,
  1773. checkConfirmationRecord,
  1774. checkProductionValidationDocument,
  1775. deleteDocumentInformation,
  1776. deleteProjectFile,
  1777. saveProductionValidationDocument,
  1778. saveProductionValidationDocumentConfirmator,
  1779. searchConfirmatorList,
  1780. searchConfirmProgressDocumentList,
  1781. searchConfirmProgressPusherList,
  1782. searchProjectConfirmatorFileList,
  1783. sendMailHandle,
  1784. updateProjectDocumentConfirm,
  1785. uploadProjectFile,
  1786. warnSendMailHandle,
  1787. confirmatorSendMailHandle,
  1788. eamProjectPartSearch,
  1789. queryProjectPartCustomerOptions,
  1790. eamProjectPartInfoEdit,
  1791. eamProjectPartInfoCancelEdit,
  1792. getFinalPartDesc,
  1793. addConfirmatory,
  1794. deleteConfirmatory,
  1795. queryEamProjectPart,
  1796. searchMassProductionBomList,
  1797. searchRoutingList
  1798. } from "../../../api/eam/eamProject";
  1799. import row from "element-ui/packages/row";
  1800. import moment from 'moment';
  1801. import 'moment/locale/zh-cn';
  1802. import {downLoadObjectFile2} from "../../../api/eam/eam_object_list";
  1803. import {EventBus} from "../../../main";
  1804. import {arrayToTreeByLevelCode} from "../../../utils/arrayToTreeByLevelCode";
  1805. import {updateColumnSize} from "../../../api/table";
  1806. import {uploadFileList} from '@/api/base/baseFunction.js';
  1807. /*打样记录組件*/
  1808. export default {
  1809. computed: {
  1810. row() {
  1811. return row
  1812. },
  1813. projectOwnersList() {
  1814. return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
  1815. },
  1816. projectManagersList() {
  1817. return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
  1818. },
  1819. engineersList() {
  1820. return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
  1821. },
  1822. finalPartNosList() {
  1823. return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined);
  1824. },
  1825. visibleColumnList() {
  1826. return this.columnList.filter(item => item.status !== false && item.status !== 0);
  1827. },
  1828. },
  1829. components: {
  1830. UploadFileList1,
  1831. UploadFileList2,
  1832. Chooselist,
  1833. proofRecord,
  1834. },
  1835. watch: {
  1836. searchData: {
  1837. deep: true,
  1838. handler: function (newV, oldV) {
  1839. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1840. }
  1841. },
  1842. projectProductionValidationDocumentVisible(newVal) {
  1843. if (newVal) {
  1844. this.activeName1 = 'selectDocument';
  1845. }
  1846. },
  1847. // 如果projectOtherDocumentList改变,遍历projectOtherDocumentList
  1848. projectOtherDocumentList: {
  1849. deep: true,
  1850. handler: function (newV, oldV) {
  1851. const sendMassMailFlags = [];
  1852. this.projectOtherDocumentList.forEach(item => {
  1853. if (item.uploadedFlag === 'N') {
  1854. sendMassMailFlags.push(item.uploadedFlag)
  1855. }
  1856. })
  1857. this.sendMassMailFlag = sendMassMailFlags.includes('N');
  1858. }
  1859. },
  1860. },
  1861. data () {
  1862. return {
  1863. // 是否收藏
  1864. favorite: false,
  1865. // 导出 start
  1866. exportData: [],
  1867. exportName: "项目物料" + this.dayjs().format('YYYYMMDDHHmmss'),
  1868. exportHeader: ["项目物料"],
  1869. exportFooter: [],
  1870. exportList:[],
  1871. authSearch: false,
  1872. authSave: false,
  1873. authUpdate: false,
  1874. authDelete: false,
  1875. dialogVisible: false, // 控制模态框显示
  1876. activeModalTab: 'proofRecord',
  1877. // 导出 end
  1878. tagNo:'',
  1879. searchCustomerOptions: [],
  1880. searchCustomerOptionLoading: false,
  1881. searchCustomerQueryToken: 0,
  1882. searchCustomerOptionInitialized: false,
  1883. fileName:'',
  1884. folder: '',
  1885. selectTypeFlag: [],
  1886. searchData: {
  1887. site: this.$store.state.user.site,
  1888. userName: this.$store.state.user.name,
  1889. projectId: '',
  1890. projectNo: '',
  1891. projectDesc: '',
  1892. testPartNo: '',
  1893. partDesc: '',
  1894. dryWetType: '',
  1895. customerNo: '',
  1896. customerDesc: '',
  1897. buDesc: '',
  1898. projectCategory: '',
  1899. status: '',
  1900. partType: '',
  1901. startDate:'',
  1902. endDate:'',
  1903. projectCreationDate: new Date(),
  1904. projectCloseDate:'',
  1905. needDate:'',
  1906. projectManager: '',
  1907. projectOwner: '',
  1908. engineer: '',
  1909. cProjectRegion: '',
  1910. finalPartNo: '',
  1911. massProductionStartDate: '',
  1912. massProductionEndDate: '',
  1913. feedingFlag: '0',
  1914. // active: 'Y',
  1915. page: 1,
  1916. limit: 10,
  1917. },
  1918. searchData1: {
  1919. site: this.$store.state.user.site,
  1920. userName: this.$store.state.user.name,
  1921. projectId: '',
  1922. projectNo: '',
  1923. projectDesc: '',
  1924. projectPartId: '',
  1925. testPartNo: '',
  1926. partDesc: '',
  1927. dryWetType: '',
  1928. customerNo: '',
  1929. customerDesc: '',
  1930. buDesc: '',
  1931. projectCategory: '',
  1932. status: '',
  1933. startDate:'',
  1934. endDate:'',
  1935. projectCreationDate: new Date(),
  1936. projectCloseDate:'',
  1937. needDate:'',
  1938. // active: 'Y',
  1939. page: 1,
  1940. limit: 10,
  1941. },
  1942. height: 200,
  1943. pageIndex: 1,
  1944. pageSize: 20,
  1945. totalPage: 0,
  1946. businessDataList: [],
  1947. businessDataList1: [],
  1948. businessDataList2: [],
  1949. businessDataList3: [],
  1950. businessDataList4: [],
  1951. businessDataList5: [],
  1952. businessDataList6: [],
  1953. dataList: [],
  1954. dataListSelections: [],
  1955. roleDescList: [],
  1956. projectPartDocumentList: [],
  1957. allPersonnelInfoList: [],
  1958. allMFGList: [],
  1959. //用于储存选中的行数据
  1960. selectedDocumentItems: [],
  1961. // ======== 复选数据集 ========
  1962. businessSelections: [],
  1963. // ======== 选中的当前行数据 ========
  1964. proofingCurrentRow: {},
  1965. otherDocumentCurrentRow: {},
  1966. projectAllDocumentCurrentRow: {},
  1967. fileList: [],
  1968. downloadLoading: false,
  1969. projectOtherDocumentList: [],
  1970. extraProjectDocumentList: [],
  1971. projectDocumentSelection: [],
  1972. projectAllDocumentList: [],
  1973. projectAllDocumentList1: [],
  1974. confirmatoryList: [],
  1975. projectAllDocumentConfirmatorList: [],
  1976. projectANotDocumentConfirmatorList: [],
  1977. projectPartBomList: [],// 量产BOM原始平面数据数组
  1978. projectPartRoutingList: [],// 原始平面数据数组
  1979. projectProofRecordList: [],
  1980. confirmatorySelection1: [],
  1981. confirmatorySelection2: [],
  1982. proofDocumentListDefinition: [],
  1983. confirmProgressPusherList: [],
  1984. confirmProgressDocumentList: [],
  1985. projectConfirmatorFileList: [],
  1986. viewDocumentFileVisible: false,
  1987. viewMassDocumentFileVisible: false,
  1988. sendMassMailFlag: false,
  1989. searchProjectDocumentTypeData: {
  1990. site: '',
  1991. projectId: '',
  1992. projectNo: '',
  1993. proofingNo: '*',
  1994. documentTypeId: '',
  1995. documentType: '',
  1996. documentDesc: '',
  1997. responsibleDepartment: '',
  1998. estimatedCompletionDays: '',
  1999. page: 1,
  2000. limit: 1000
  2001. },
  2002. dataListLoading: false,
  2003. modalFlag:false,
  2004. modalDisableFlag:false,
  2005. formalPartNoFlag:false,
  2006. projectManagerFlag:false,
  2007. projectOwnerFlag:false,
  2008. engineerFlag:false,
  2009. engineer6Flag:false,
  2010. IPQCFlag:false,
  2011. FQC1Flag:false,
  2012. MFGlag:false,
  2013. uploadDialog:false,
  2014. uploadDialog1:false,
  2015. isEditable: true,
  2016. isMassProductionStage: true,
  2017. projectDocumentListVisible: false,
  2018. addProjectDocumentTypeFlag: false,
  2019. projectProductionValidationDocumentVisible: false,
  2020. confirmVisible: false,
  2021. confirmationPrompted: false, // 是否已经进行过确认提示的标志
  2022. agencyMatters: false, // 是否代办事项
  2023. lastAppliedRouteQueryKey: '',
  2024. finalPartFlag: false,
  2025. visible: false, // 新增打样模态框
  2026. dataListIndex: 0,
  2027. modalData:{
  2028. flag:'',
  2029. id:'',
  2030. bu: '',
  2031. buNo: '',
  2032. site: '',
  2033. projectId: '',
  2034. projectNo: '',
  2035. oriProjectId: '',
  2036. projectDesc:'',
  2037. projectCloseDate:'',
  2038. proofingNo:'',
  2039. needDate:'',
  2040. customerNo:'',
  2041. finalCustomerId:'',
  2042. customerDesc:'',
  2043. projectCategory:'',
  2044. testPartNo:'',
  2045. partDesc:'',
  2046. priority:'',
  2047. projectManager:'',
  2048. projectManagerName:'',
  2049. projectOwner:'',
  2050. projectOwnerName:'',
  2051. cProjectRegion:'',
  2052. cProjectBuildDate:'',
  2053. cQualityEngineer1:'',
  2054. cQualityEngineer1Name:'',
  2055. cQualityEngineer2:'',
  2056. cQualityEngineer2Name:'',
  2057. cQualityEngineer3:'',
  2058. cQualityEngineer3Name:'',
  2059. cQualityEngineer4:'',
  2060. cQualityEngineer4Name:'',
  2061. cQualityEngineer5:'',
  2062. cQualityEngineer5Name:'',
  2063. cQualityEngineer6:'',
  2064. cQualityEngineer6Name:'',
  2065. cManufactureEngineer:'',
  2066. cManufactureEngineerName:'',
  2067. docEngineer:'',
  2068. docEngineerName:'',
  2069. docEngineer2:'',
  2070. docEngineer2Name:'',
  2071. engineer:'',
  2072. engineerName:'',
  2073. ipqcHardTag:'',
  2074. ipqcHardTagName:'',
  2075. cQualityEngineer7:'',
  2076. cQualityEngineer7Name:'',
  2077. qcEngineer:'',
  2078. qcEngineerName:'',
  2079. peEngineer:'',
  2080. peEngineerName:'',
  2081. eeEngineer:'',
  2082. eeEngineerName:'',
  2083. sqemeEngineer:'',
  2084. sqemeEngineerName:'',
  2085. sqeeeEngineer:'',
  2086. sqeeeEngineerName:'',
  2087. //projectCreationDate为当前服务器的时间
  2088. projectCreationDate: new Date(),
  2089. finalPartNo:'',
  2090. finalPartDesc:'',
  2091. wantedConfirmDate: new Date(),
  2092. // active:'',
  2093. createBy: this.$store.state.user.name,
  2094. updateBy: this.$store.state.user.name,
  2095. },
  2096. newProofingRecordData:{
  2097. site: '',
  2098. projectId: '',
  2099. projectNo: '',
  2100. projectDesc: '',
  2101. bu: '',
  2102. buNo: '',
  2103. customerNo: '',
  2104. customerDesc: '',
  2105. testPartNo: '',
  2106. partDesc: '',
  2107. cProjectTypeDb: '',
  2108. sqemeEngineer: '',
  2109. sqeeeEngineer: '',
  2110. projectPhase: '',
  2111. proofingNo: '',
  2112. proofingNumber: '',
  2113. planStartDate: '',
  2114. requiredDeliveryDate: '',
  2115. actualityDeliveryDate: '',
  2116. remark: '',
  2117. createBy: this.$store.state.user.name,
  2118. updateBy: this.$store.state.user.name,
  2119. },
  2120. searchBusinessData:{
  2121. site: '',
  2122. username: '',
  2123. roleDesc: '',
  2124. userDisplay: '',
  2125. active: '',
  2126. page: 1,
  2127. limit: 10,
  2128. },
  2129. searchBusinessData1:{
  2130. site: '',
  2131. username: '',
  2132. roleDesc: '',
  2133. userDisplay: '',
  2134. active: '',
  2135. page: 1,
  2136. limit: 10,
  2137. },
  2138. searchBusinessData2:{
  2139. site: '',
  2140. username: '',
  2141. roleDesc: '',
  2142. userDisplay: '',
  2143. active: '',
  2144. page: 1,
  2145. limit: 10,
  2146. },
  2147. searchBusinessData3:{
  2148. site: '',
  2149. username: '',
  2150. roleDesc: '',
  2151. userDisplay: '',
  2152. active: '',
  2153. page: 1,
  2154. limit: 10,
  2155. },
  2156. searchBusinessData4:{
  2157. site: '',
  2158. username: '',
  2159. roleDesc: '',
  2160. userDisplay: '',
  2161. active: '',
  2162. page: 1,
  2163. limit: 10,
  2164. },
  2165. searchBusinessData5:{
  2166. site: '',
  2167. username: '',
  2168. roleDesc: '',
  2169. userDisplay: '',
  2170. active: '',
  2171. page: 1,
  2172. limit: 10,
  2173. },
  2174. searchBusinessData6:{
  2175. site: '',
  2176. username: '',
  2177. roleDesc: '',
  2178. userDisplay: '',
  2179. active: '',
  2180. page: 1,
  2181. limit: 10,
  2182. },
  2183. confirmData:{
  2184. site: '',
  2185. projectId: '',
  2186. projectNo: '',
  2187. orderRef1: '',
  2188. orderRef2: '',
  2189. documentId: '',
  2190. documentType: '',
  2191. itemNo: '',
  2192. userid: '',
  2193. wantedConfirmDate: '',
  2194. confirmFlag: '',
  2195. confirmedBy: '',
  2196. remark: '',
  2197. confirmedDate: '',
  2198. createDate: '',
  2199. createBy: '',
  2200. page: 1,
  2201. limit: 1000
  2202. },
  2203. confirmatoryData:{
  2204. username: '',
  2205. userDisplay: ''
  2206. },
  2207. copyModalData: {
  2208. site: '',
  2209. username: this.$store.state.user.name,
  2210. projectId: '',
  2211. projectNo: '',
  2212. proofingId: '',
  2213. proofingNo: '',
  2214. documentTypeId: ''
  2215. },
  2216. documentCopySelection: [],
  2217. copyDocumentList: [],
  2218. copyDialog: false,
  2219. departmentList:[],
  2220. cProjectTypeDbList: [],
  2221. projectPhaseList: [
  2222. {projectPhase: 'Prototype'},
  2223. {projectPhase: 'Alpha'},
  2224. {projectPhase: 'Beta'},
  2225. {projectPhase: 'Pre-launch'},
  2226. ],
  2227. activeName: 'proofRecord',
  2228. activeName1: 'selectDocument',
  2229. // 日期限制
  2230. // pickerOptions: {
  2231. // disabledDate(time) {
  2232. // return time.getTime() > Date.now();
  2233. // },
  2234. // },
  2235. // 展示列集
  2236. columnList: [
  2237. {
  2238. userId: this.$store.state.user.name,
  2239. functionId: 401004,
  2240. serialNumber: '401004Table1BuDesc',
  2241. tableId: "401004Table1",
  2242. tableName: "项目物料表",
  2243. columnProp: 'buDesc',
  2244. headerAlign: "center",
  2245. align: "center",
  2246. columnLabel: 'BU',
  2247. columnHidden: false,
  2248. columnImage: false,
  2249. columnSortable: false,
  2250. sortLv: 0,
  2251. status: true,
  2252. fixed: '',
  2253. columnWidth: 100,
  2254. },
  2255. {
  2256. userId: this.$store.state.user.name,
  2257. functionId: 401004,
  2258. serialNumber: '401004Table1ProjectNo',
  2259. tableId: "401004Table1",
  2260. tableName: "项目物料表",
  2261. columnProp: 'projectNo',
  2262. headerAlign: "center",
  2263. align: "center",
  2264. columnLabel: '项目编码',
  2265. columnHidden: false,
  2266. columnImage: false,
  2267. columnSortable: false,
  2268. sortLv: 0,
  2269. status: true,
  2270. fixed: '',
  2271. columnWidth: 100,
  2272. },
  2273. {
  2274. userId: this.$store.state.user.name,
  2275. functionId: 401004,
  2276. serialNumber: '401004Table1ProjectDesc',
  2277. tableId: "401004Table1",
  2278. tableName: "项目物料表",
  2279. columnProp: 'projectDesc',
  2280. headerAlign: "center",
  2281. align: "center",
  2282. columnLabel: '项目名称',
  2283. columnHidden: false,
  2284. columnImage: false,
  2285. columnSortable: false,
  2286. sortLv: 0,
  2287. status: true,
  2288. fixed: '',
  2289. columnWidth: 100,
  2290. },
  2291. {
  2292. userId: this.$store.state.user.name,
  2293. functionId: 401004,
  2294. serialNumber: '401004Table1TestPartNo',
  2295. tableId: "401004Table1",
  2296. tableName: "项目物料表",
  2297. columnProp: 'testPartNo',
  2298. headerAlign: "center",
  2299. align: "center",
  2300. columnLabel: '项目料号',
  2301. columnHidden: false,
  2302. columnImage: false,
  2303. columnSortable: false,
  2304. sortLv: 0,
  2305. status: true,
  2306. fixed: '',
  2307. columnWidth: 100,
  2308. },
  2309. {
  2310. userId: this.$store.state.user.name,
  2311. functionId: 401004,
  2312. serialNumber: '401004Table1PartDesc',
  2313. tableId: "401004Table1",
  2314. tableName: "项目物料表",
  2315. columnProp: 'partDesc',
  2316. headerAlign: "center",
  2317. align: "center",
  2318. columnLabel: '料号描述',
  2319. columnHidden: false,
  2320. columnImage: false,
  2321. columnSortable: false,
  2322. sortLv: 0,
  2323. status: true,
  2324. fixed: '',
  2325. columnWidth: 100,
  2326. },
  2327. {
  2328. userId: this.$store.state.user.name,
  2329. functionId: 401004,
  2330. serialNumber: '401004Table1customerNo',
  2331. tableId: "401004Table1",
  2332. tableName: "项目物料表",
  2333. columnProp: "customerNo",
  2334. headerAlign: "center",
  2335. align: "left",
  2336. columnLabel: "客户编码",
  2337. columnHidden: false,
  2338. columnImage: false,
  2339. columnSortable: false,
  2340. sortLv: 0,
  2341. status: true,
  2342. fixed: '',
  2343. columnWidth: 100
  2344. },
  2345. {
  2346. userId: this.$store.state.user.name,
  2347. functionId: 401004,
  2348. serialNumber: '401004Table1customerDesc',
  2349. tableId: "401004Table1",
  2350. tableName: "项目物料表",
  2351. columnProp: "customerDesc",
  2352. headerAlign: "center",
  2353. align: "left",
  2354. columnLabel: "客户名称",
  2355. columnHidden: false,
  2356. columnImage: false,
  2357. columnSortable: false,
  2358. sortLv: 0,
  2359. status: true,
  2360. fixed: '',
  2361. columnWidth: 150
  2362. },
  2363. {
  2364. userId: this.$store.state.user.name,
  2365. functionId: 401004,
  2366. serialNumber: '401004Table1BuildDate',
  2367. tableId: "401004Table1",
  2368. tableName: "项目物料表",
  2369. columnProp: "buildDate",
  2370. headerAlign: "center",
  2371. align: "center",
  2372. columnLabel: "立项日期",
  2373. columnHidden: false,
  2374. columnImage: false,
  2375. columnSortable: false,
  2376. sortLv: 0,
  2377. status: true,
  2378. fixed: '',
  2379. columnWidth: 120
  2380. },
  2381. {
  2382. userId: this.$store.state.user.name,
  2383. functionId: 401004,
  2384. serialNumber: '401004Table1ProjectCategory',
  2385. tableId: "401004Table1",
  2386. tableName: "项目物料表",
  2387. columnProp: 'projectCategory',
  2388. headerAlign: "center",
  2389. align: "left",
  2390. columnLabel: '项目分类',
  2391. columnHidden: false,
  2392. columnImage: false,
  2393. columnSortable: false,
  2394. sortLv: 0,
  2395. status: true,
  2396. fixed: '',
  2397. columnWidth: 120,
  2398. },
  2399. {
  2400. userId: this.$store.state.user.name,
  2401. functionId: 401004,
  2402. serialNumber: '401004Table1Priority',
  2403. tableId: "401004Table1",
  2404. tableName: "项目物料表",
  2405. columnProp: 'priority',
  2406. headerAlign: "center",
  2407. align: "left",
  2408. columnLabel: '优先级',
  2409. columnHidden: false,
  2410. columnImage: false,
  2411. columnSortable: false,
  2412. sortLv: 0,
  2413. status: true,
  2414. fixed: '',
  2415. columnWidth: 80,
  2416. },
  2417. {
  2418. userId: this.$store.state.user.name,
  2419. functionId: 401004,
  2420. serialNumber: '401004Table1CProjectRegion',
  2421. tableId: "401004Table1",
  2422. tableName: "项目物料表",
  2423. columnProp: 'cProjectRegion',
  2424. headerAlign: "center",
  2425. align: "left",
  2426. columnLabel: '区域',
  2427. columnHidden: false,
  2428. columnImage: false,
  2429. columnSortable: false,
  2430. sortLv: 0,
  2431. status: true,
  2432. fixed: '',
  2433. columnWidth: 120,
  2434. },
  2435. {
  2436. userId: this.$store.state.user.name,
  2437. functionId: 401004,
  2438. serialNumber: '401004Table1ProjectManager',
  2439. tableId: "401004Table1",
  2440. tableName: "项目物料表",
  2441. columnProp: 'projectManagerName',
  2442. headerAlign: "center",
  2443. align: "left",
  2444. columnLabel: 'PM/Sales',
  2445. columnHidden: false,
  2446. columnImage: false,
  2447. columnSortable: false,
  2448. sortLv: 0,
  2449. status: true,
  2450. fixed: '',
  2451. columnWidth: 120,
  2452. },
  2453. {
  2454. userId: this.$store.state.user.name,
  2455. functionId: 401004,
  2456. serialNumber: '401004Table1ProjectOwner',
  2457. tableId: "401004Table1",
  2458. tableName: "项目物料表",
  2459. columnProp: 'projectOwnerName',
  2460. headerAlign: "center",
  2461. align: "left",
  2462. columnLabel: 'PjM',
  2463. columnHidden: false,
  2464. columnImage: false,
  2465. columnSortable: false,
  2466. sortLv: 0,
  2467. status: true,
  2468. fixed: '',
  2469. columnWidth: 120,
  2470. },
  2471. {
  2472. userId: this.$store.state.user.name,
  2473. functionId: 401004,
  2474. serialNumber: '401004Table1Engineer',
  2475. tableId: "401004Table1",
  2476. tableName: "项目物料表",
  2477. columnProp: 'engineerName',
  2478. headerAlign: "center",
  2479. align: "left",
  2480. columnLabel: 'Engineer',
  2481. columnHidden: false,
  2482. columnImage: false,
  2483. columnSortable: false,
  2484. sortLv: 0,
  2485. status: true,
  2486. fixed: '',
  2487. columnWidth: 120,
  2488. },
  2489. {
  2490. userId: this.$store.state.user.name,
  2491. functionId: 401004,
  2492. serialNumber: '401004Table1CQualityEngineer1',
  2493. tableId: "401004Table1",
  2494. tableName: "项目物料表",
  2495. columnProp: 'cQualityEngineer1Name',
  2496. headerAlign: "center",
  2497. align: "left",
  2498. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  2499. columnHidden: false,
  2500. columnImage: false,
  2501. columnSortable: false,
  2502. sortLv: 0,
  2503. status: true,
  2504. fixed: '',
  2505. columnWidth: 170,
  2506. },
  2507. {
  2508. userId: this.$store.state.user.name,
  2509. functionId: 401004,
  2510. serialNumber: '401004Table1CQualityEngineer2',
  2511. tableId: "401004Table1",
  2512. tableName: "项目物料表",
  2513. columnProp: 'cQualityEngineer2Name',
  2514. headerAlign: "center",
  2515. align: "left",
  2516. columnLabel: 'IPQC-Converting',
  2517. columnHidden: false,
  2518. columnImage: false,
  2519. columnSortable: false,
  2520. sortLv: 0,
  2521. status: true,
  2522. fixed: '',
  2523. columnWidth: 150,
  2524. },
  2525. {
  2526. userId: this.$store.state.user.name,
  2527. functionId: 401004,
  2528. serialNumber: '401004Table1CQualityEngineer3',
  2529. tableId: "401004Table1",
  2530. tableName: "项目物料表",
  2531. columnProp: 'cQualityEngineer3Name',
  2532. headerAlign: "center",
  2533. align: "left",
  2534. columnLabel: 'FQC1',
  2535. columnHidden: false,
  2536. columnImage: false,
  2537. columnSortable: false,
  2538. sortLv: 0,
  2539. status: true,
  2540. fixed: '',
  2541. columnWidth: 120,
  2542. },
  2543. {
  2544. userId: this.$store.state.user.name,
  2545. functionId: 401004,
  2546. serialNumber: '401004Table1CQualityEngineer5',
  2547. tableId: "401004Table1",
  2548. tableName: "项目信息物料表",
  2549. columnProp: 'cQualityEngineer5Name',
  2550. headerAlign: "center",
  2551. align: "left",
  2552. columnLabel: 'FQC2',
  2553. columnHidden: false,
  2554. columnImage: false,
  2555. columnSortable: false,
  2556. sortLv: 0,
  2557. status: true,
  2558. fixed: '',
  2559. columnWidth: 120,
  2560. },
  2561. {
  2562. userId: this.$store.state.user.name,
  2563. functionId: 401004,
  2564. serialNumber: '401004Table1CQualityEngineer6',
  2565. tableId: "401004Table1",
  2566. tableName: "项目信息物料表",
  2567. columnProp: 'cQualityEngineer6Name',
  2568. headerAlign: "center",
  2569. align: "left",
  2570. columnLabel: 'IQC',
  2571. columnHidden: false,
  2572. columnImage: false,
  2573. columnSortable: false,
  2574. sortLv: 0,
  2575. status: true,
  2576. fixed: '',
  2577. columnWidth: 120,
  2578. },
  2579. {
  2580. userId: this.$store.state.user.name,
  2581. functionId: 401004,
  2582. serialNumber: '401004Table1CManufactureEngineer',
  2583. tableId: "401004Table1",
  2584. tableName: "项目物料表",
  2585. columnProp: 'cManufactureEngineerName',
  2586. headerAlign: "center",
  2587. align: "left",
  2588. columnLabel: 'MFG',
  2589. columnHidden: false,
  2590. columnImage: false,
  2591. columnSortable: false,
  2592. sortLv: 0,
  2593. status: true,
  2594. fixed: '',
  2595. columnWidth: 120,
  2596. },
  2597. {
  2598. userId: this.$store.state.user.name,
  2599. functionId: 401004,
  2600. serialNumber: '401004Table1CQualityEngineer4',
  2601. tableId: "401004Table1",
  2602. tableName: "项目物料表",
  2603. columnProp: 'cQualityEngineer4Name',
  2604. headerAlign: "center",
  2605. align: "left",
  2606. columnLabel: 'SQE',
  2607. columnHidden: false,
  2608. columnImage: false,
  2609. columnSortable: false,
  2610. sortLv: 0,
  2611. status: true,
  2612. fixed: '',
  2613. columnWidth: 120,
  2614. },
  2615. {
  2616. userId: this.$store.state.user.name,
  2617. functionId: 401004,
  2618. serialNumber: '401004Table1DocEngineer',
  2619. tableId: "401004Table1",
  2620. tableName: "项目物料表",
  2621. columnProp: 'docEngineerName',
  2622. headerAlign: "center",
  2623. align: "left",
  2624. columnLabel: '文档工程师',
  2625. columnHidden: false,
  2626. columnImage: false,
  2627. columnSortable: false,
  2628. sortLv: 0,
  2629. status: true,
  2630. fixed: '',
  2631. columnWidth: 120,
  2632. },
  2633. {
  2634. userId: this.$store.state.user.name,
  2635. functionId: 401004,
  2636. serialNumber: '401004Table1DocEngineer2',
  2637. tableId: "401004Table1",
  2638. tableName: "项目物料表",
  2639. columnProp: 'docEngineer2Name',
  2640. headerAlign: "center",
  2641. align: "left",
  2642. columnLabel: '文档工程师2',
  2643. columnHidden: false,
  2644. columnImage: false,
  2645. columnSortable: false,
  2646. sortLv: 0,
  2647. status: true,
  2648. fixed: '',
  2649. columnWidth: 120,
  2650. },
  2651. {
  2652. userId: this.$store.state.user.name,
  2653. functionId: 401004,
  2654. serialNumber: '401004Table1IpqcHardTag',
  2655. tableId: "401004Table1",
  2656. tableName: "项目物料表",
  2657. columnProp: 'ipqcHardTagName',
  2658. headerAlign: "center",
  2659. align: "left",
  2660. columnLabel: 'IPQC-Hardtag',
  2661. columnHidden: false,
  2662. columnImage: false,
  2663. columnSortable: false,
  2664. sortLv: 0,
  2665. status: true,
  2666. fixed: '',
  2667. columnWidth: 120,
  2668. },
  2669. {
  2670. userId: this.$store.state.user.name,
  2671. functionId: 401004,
  2672. serialNumber: '401004Table1CQualityEngineer7',
  2673. tableId: "401004Table1",
  2674. tableName: "项目物料表",
  2675. columnProp: 'cQualityEngineer7Name',
  2676. headerAlign: "center",
  2677. align: "left",
  2678. columnLabel: '前道工程师',
  2679. columnHidden: false,
  2680. columnImage: false,
  2681. columnSortable: false,
  2682. sortLv: 0,
  2683. status: true,
  2684. fixed: '',
  2685. columnWidth: 120,
  2686. },
  2687. {
  2688. userId: this.$store.state.user.name,
  2689. functionId: 401004,
  2690. serialNumber: '401004Table1Status',
  2691. tableId: "401004Table1",
  2692. tableName: "项目物料表",
  2693. columnProp: 'status',
  2694. headerAlign: "center",
  2695. align: "left",
  2696. columnLabel: '项目状态' ,
  2697. columnHidden: false,
  2698. columnImage: false,
  2699. columnSortable: false,
  2700. sortLv: 0,
  2701. status: true,
  2702. fixed: '',
  2703. columnWidth: 100,
  2704. },
  2705. {
  2706. userId: this.$store.state.user.name,
  2707. functionId: 401004,
  2708. serialNumber: '401004Table2PartType',
  2709. tableId: "401004Table2",
  2710. tableName: "项目信息物料表",
  2711. columnProp: 'partType',
  2712. headerAlign: "center",
  2713. align: "center",
  2714. columnLabel: '料号状态' ,
  2715. columnHidden: false,
  2716. columnImage: false,
  2717. columnSortable: false,
  2718. sortLv: 0,
  2719. status: true,
  2720. fixed: '',
  2721. columnWidth: 100,
  2722. },
  2723. {
  2724. userId: this.$store.state.user.name,
  2725. functionId: 401004,
  2726. serialNumber: '401004Table1DryWetType',
  2727. tableId: "401004Table1",
  2728. tableName: "项目物料表",
  2729. columnProp: 'dryWetType',
  2730. headerAlign: "center",
  2731. align: "center",
  2732. columnLabel: '分类',
  2733. columnHidden: false,
  2734. columnImage: false,
  2735. columnSortable: false,
  2736. sortLv: 0,
  2737. status: true,
  2738. fixed: '',
  2739. columnWidth: 80,
  2740. },
  2741. {
  2742. userId: this.$store.state.user.name,
  2743. functionId: 401004,
  2744. serialNumber: '401004Table1NeedDate',
  2745. tableId: "401004Table1",
  2746. tableName: "项目物料表",
  2747. columnProp: 'needDate',
  2748. headerAlign: "center",
  2749. align: "center",
  2750. columnLabel: '预计完成日期',
  2751. columnHidden: false,
  2752. columnImage: false,
  2753. columnSortable: false,
  2754. sortLv: 0,
  2755. status: true,
  2756. fixed: '',
  2757. columnWidth: 120,
  2758. },
  2759. {
  2760. userId: this.$store.state.user.name,
  2761. functionId: 401004,
  2762. serialNumber: '401004Table1closeDate',
  2763. tableId: "401004Table1",
  2764. tableName: "项目物料表",
  2765. columnProp: 'closeDate',
  2766. headerAlign: "center",
  2767. align: "left",
  2768. columnLabel: '转量产日期',
  2769. columnHidden: false,
  2770. columnImage: false,
  2771. columnSortable: false,
  2772. sortLv: 0,
  2773. status: true,
  2774. fixed: '',
  2775. columnWidth: 120,
  2776. },
  2777. {
  2778. userId: this.$store.state.user.name,
  2779. functionId: 401004,
  2780. serialNumber: '401004Table1FinalPartNo',
  2781. tableId: "401004Table1",
  2782. tableName: "项目物料表",
  2783. columnProp: 'finalPartNo',
  2784. headerAlign: "center",
  2785. align: "left",
  2786. columnLabel: 'ERP正式料号',
  2787. columnHidden: false,
  2788. columnImage: false,
  2789. columnSortable: false,
  2790. sortLv: 0,
  2791. status: true,
  2792. fixed: '',
  2793. columnWidth: 120,
  2794. },
  2795. {
  2796. userId: this.$store.state.user.name,
  2797. functionId: 401004,
  2798. serialNumber: '401004Table1Remark',
  2799. tableId: "401004Table1",
  2800. tableName: "项目物料表",
  2801. columnProp: 'remark',
  2802. headerAlign: "center",
  2803. align: "left",
  2804. columnLabel: '备注',
  2805. columnHidden: false,
  2806. columnImage: false,
  2807. columnSortable: false,
  2808. sortLv: 0,
  2809. status: true,
  2810. fixed: '',
  2811. columnWidth: 160,
  2812. },
  2813. {
  2814. userId: this.$store.state.user.name,
  2815. functionId: 401004,
  2816. serialNumber: '401004Table1CreateDate',
  2817. tableId: "401004Table1",
  2818. tableName: "项目物料表",
  2819. columnProp: 'createDate',
  2820. headerAlign: "center",
  2821. align: "center",
  2822. columnLabel: '创建时间',
  2823. columnHidden: false,
  2824. columnImage: false,
  2825. columnSortable: false,
  2826. sortLv: 0,
  2827. status: true,
  2828. fixed: '',
  2829. columnWidth: 130,
  2830. },
  2831. {
  2832. userId: this.$store.state.user.name,
  2833. functionId: 401004,
  2834. serialNumber: '401004Table1CreateBy',
  2835. tableId: "401004Table1",
  2836. tableName: "项目物料表",
  2837. columnProp: 'createBy',
  2838. headerAlign: "center",
  2839. align: "left",
  2840. columnLabel: '创建人',
  2841. columnHidden: false,
  2842. columnImage: false,
  2843. columnSortable: false,
  2844. sortLv: 0,
  2845. status: true,
  2846. fixed: '',
  2847. columnWidth: 120,
  2848. },
  2849. {
  2850. userId: this.$store.state.user.name,
  2851. functionId: 401004,
  2852. serialNumber: '401004Table1UpdateDate',
  2853. tableId: "401004Table1",
  2854. tableName: "项目物料表",
  2855. columnProp: 'updateDate',
  2856. headerAlign: "center",
  2857. align: "center",
  2858. columnLabel: '更新时间',
  2859. columnHidden: false,
  2860. columnImage: false,
  2861. columnSortable: false,
  2862. sortLv: 0,
  2863. status: true,
  2864. fixed: '',
  2865. columnWidth: 130,
  2866. },
  2867. {
  2868. userId: this.$store.state.user.name,
  2869. functionId: 401004,
  2870. serialNumber: '401004Table1UpdateBy',
  2871. tableId: "401004Table1",
  2872. tableName: "项目物料表",
  2873. columnProp: 'updateBy',
  2874. headerAlign: "center",
  2875. align: "left",
  2876. columnLabel: '更新人',
  2877. columnHidden: false,
  2878. columnImage: false,
  2879. columnSortable: false,
  2880. sortLv: 0,
  2881. status: true,
  2882. fixed: '',
  2883. columnWidth: 120,
  2884. },
  2885. ],
  2886. columnFileContentArray: [
  2887. {
  2888. userId: this.$store.state.user.name,
  2889. functionId: 401004,
  2890. serialNumber: '401004Table1FileName',
  2891. tableId: "401004Table1",
  2892. tableName: "打样文档表",
  2893. columnProp: 'fileName',
  2894. headerAlign: "center",
  2895. align: "left",
  2896. columnLabel: '文件名',
  2897. columnHidden: false,
  2898. columnImage: false,
  2899. columnSortable: false,
  2900. sortLv: 0,
  2901. status: true,
  2902. fixed: '',
  2903. columnWidth: 180,
  2904. },
  2905. //是否上传
  2906. {
  2907. userId: this.$store.state.user.name,
  2908. functionId: 401004,
  2909. serialNumber: '401004Table1UploadedFlag',
  2910. tableId: "401004Table1",
  2911. tableName: "打样文档表",
  2912. columnProp: 'uploadedFlag',
  2913. headerAlign: "center",
  2914. align: "center",
  2915. columnLabel: '是否上传',
  2916. columnHidden: false,
  2917. columnImage: false,
  2918. columnSortable: false,
  2919. sortLv: 0,
  2920. status: true,
  2921. fixed: '',
  2922. columnWidth: 70,
  2923. },
  2924. {
  2925. userId: this.$store.state.user.name,
  2926. functionId: 401004,
  2927. serialNumber: '401004Table1ProjectLeader',
  2928. tableId: "401004Table1",
  2929. tableName: "打样文档表",
  2930. columnProp: 'projectLeader',
  2931. headerAlign: "center",
  2932. align: "left",
  2933. columnLabel: '文档负责人',
  2934. columnHidden: false,
  2935. columnImage: false,
  2936. columnSortable: false,
  2937. sortLv: 0,
  2938. status: true,
  2939. fixed: '',
  2940. columnWidth: 70,
  2941. },
  2942. {
  2943. userId: this.$store.state.user.name,
  2944. functionId: 401004,
  2945. serialNumber: '401004Table1Conclusion',
  2946. tableId: "401004Table1",
  2947. tableName: "打样文档表",
  2948. columnProp: 'conclusion',
  2949. headerAlign: "center",
  2950. align: "center",
  2951. columnLabel: '结论',
  2952. columnHidden: false,
  2953. columnImage: false,
  2954. columnSortable: false,
  2955. sortLv: 0,
  2956. status: true,
  2957. fixed: '',
  2958. columnWidth: 70,
  2959. },
  2960. {
  2961. userId: this.$store.state.user.name,
  2962. functionId: 401004,
  2963. serialNumber: '401004Table1DocumentGroupDesc',
  2964. tableId: "401004Table1",
  2965. tableName: "打样文档表",
  2966. columnProp: 'documentGroupDesc',
  2967. headerAlign: "center",
  2968. align: "center",
  2969. columnLabel: '文档种类',
  2970. columnHidden: false,
  2971. columnImage: false,
  2972. columnSortable: false,
  2973. sortLv: 0,
  2974. status: true,
  2975. fixed: '',
  2976. columnWidth: 70,
  2977. },
  2978. {
  2979. userId: this.$store.state.user.name,
  2980. functionId: 103001,
  2981. serialNumber: '103001Table1CreateDate',
  2982. tableId: '103001Table1',
  2983. tableName: '打样文档表',
  2984. columnProp: 'createDate',
  2985. headerAlign: 'center',
  2986. align: 'center',
  2987. columnLabel: '上传时间',
  2988. columnHidden: false,
  2989. columnImage: false,
  2990. columnSortable: false,
  2991. sortLv: 0,
  2992. status: true,
  2993. fixed: '',
  2994. columnWidth: 130
  2995. },
  2996. {
  2997. userId: this.$store.state.user.name,
  2998. functionId: 103001,
  2999. serialNumber: '103001Table1CreateBy',
  3000. tableId: '103001Table1',
  3001. tableName: '打样文档表',
  3002. columnProp: 'createdBy',
  3003. headerAlign: 'center',
  3004. align: 'left',
  3005. columnLabel: '上传人',
  3006. columnHidden: false,
  3007. columnImage: false,
  3008. columnSortable: false,
  3009. sortLv: 0,
  3010. status: true,
  3011. fixed: '',
  3012. columnWidth: 80
  3013. }
  3014. ],
  3015. columnProjectDocumentManifestDefinitionList:[
  3016. {
  3017. userId: this.$store.state.user.name,
  3018. functionId: 401004,
  3019. serialNumber: '401004Table1DocumentTypeId',
  3020. tableId: "401004Table1",
  3021. tableName: "BU文档清单表",
  3022. columnProp: 'documentTypeId',
  3023. headerAlign: "center",
  3024. align: "center",
  3025. columnLabel: '文档类型ID',
  3026. columnHidden: false,
  3027. columnImage: false,
  3028. columnSortable: false,
  3029. sortLv: 0,
  3030. status: true,
  3031. fixed: '',
  3032. columnWidth: 120,
  3033. },
  3034. {
  3035. userId: this.$store.state.user.name,
  3036. functionId: 401004,
  3037. serialNumber: '401004Table1DocumentType',
  3038. tableId: "401004Table1",
  3039. tableName: "BU文档清单表",
  3040. columnProp: 'documentType',
  3041. headerAlign: "center",
  3042. align: "left",
  3043. columnLabel: '文档类型',
  3044. columnHidden: false,
  3045. columnImage: false,
  3046. columnSortable: false,
  3047. sortLv: 0,
  3048. status: true,
  3049. fixed: '',
  3050. columnWidth: 120,
  3051. },
  3052. {
  3053. userId: this.$store.state.user.name,
  3054. functionId: 401004,
  3055. serialNumber: '401004Table1ResponsibleDepartment',
  3056. tableId: "401004Table1",
  3057. tableName: "BU文档清单表",
  3058. columnProp: 'responsibleDepartment',
  3059. headerAlign: "center",
  3060. align: "left",
  3061. columnLabel: '责任部门',
  3062. columnHidden: false,
  3063. columnImage: false,
  3064. columnSortable: false,
  3065. sortLv: 0,
  3066. status: true,
  3067. fixed: '',
  3068. columnWidth: 120,
  3069. },
  3070. {
  3071. userId: this.$store.state.user.name,
  3072. functionId: 401004,
  3073. serialNumber: '401004Table1EstimatedCompletionDays',
  3074. tableId: "401004Table1",
  3075. tableName: "BU文档清单表",
  3076. columnProp: 'estimatedCompletionDays',
  3077. headerAlign: "center",
  3078. align: "right",
  3079. columnLabel: '预计完成天数',
  3080. columnHidden: false,
  3081. columnImage: false,
  3082. columnSortable: false,
  3083. sortLv: 0,
  3084. status: true,
  3085. fixed: '',
  3086. columnWidth: 80,
  3087. },
  3088. ],
  3089. columnProjectAllDocumentList: [
  3090. {
  3091. userId: this.$store.state.user.name,
  3092. functionId: 401004,
  3093. serialNumber: '401004Table1ProofingId',
  3094. tableId: "401004Table1",
  3095. tableName: "BU文档清单表",
  3096. columnProp: 'proofingNo',
  3097. headerAlign: "center",
  3098. align: "left",
  3099. columnLabel: '打样单号',
  3100. columnHidden: false,
  3101. columnImage: false,
  3102. columnSortable: false,
  3103. sortLv: 0,
  3104. status: true,
  3105. fixed: '',
  3106. columnWidth: 80,
  3107. },
  3108. {
  3109. userId: this.$store.state.user.name,
  3110. functionId: 401004,
  3111. serialNumber: '401004Table1ProjectPhase',
  3112. tableId: "401004Table1",
  3113. tableName: "BU文档清单表",
  3114. columnProp: 'projectPhase',
  3115. headerAlign: "center",
  3116. align: "center",
  3117. columnLabel: '项目阶段',
  3118. columnHidden: false,
  3119. columnImage: false,
  3120. columnSortable: false,
  3121. sortLv: 0,
  3122. status: true,
  3123. fixed: '',
  3124. columnWidth: 120,
  3125. },
  3126. {
  3127. userId: this.$store.state.user.name,
  3128. functionId: 401004,
  3129. serialNumber: '401004Table1FileName',
  3130. tableId: "401004Table1",
  3131. tableName: "打样文档表",
  3132. columnProp: 'fileName',
  3133. headerAlign: "center",
  3134. align: "left",
  3135. columnLabel: '文件名',
  3136. columnHidden: false,
  3137. columnImage: false,
  3138. columnSortable: false,
  3139. sortLv: 0,
  3140. status: true,
  3141. fixed: '',
  3142. columnWidth: 180,
  3143. },
  3144. {
  3145. userId: this.$store.state.user.name,
  3146. functionId: 401004,
  3147. serialNumber: '401004Table1UploadedFlag',
  3148. tableId: "401004Table1",
  3149. tableName: "打样文档表",
  3150. columnProp: 'uploadedFlag',
  3151. headerAlign: "center",
  3152. align: "center",
  3153. columnLabel: '是否上传',
  3154. columnHidden: false,
  3155. columnImage: false,
  3156. columnSortable: false,
  3157. sortLv: 0,
  3158. status: true,
  3159. fixed: '',
  3160. columnWidth: 70,
  3161. },
  3162. {
  3163. userId: this.$store.state.user.name,
  3164. functionId: 401004,
  3165. serialNumber: '401004Table1ProjectLeader',
  3166. tableId: "401004Table1",
  3167. tableName: "打样文档表",
  3168. columnProp: 'projectLeader',
  3169. headerAlign: "center",
  3170. align: "left",
  3171. columnLabel: '文档负责人',
  3172. columnHidden: false,
  3173. columnImage: false,
  3174. columnSortable: false,
  3175. sortLv: 0,
  3176. status: true,
  3177. fixed: '',
  3178. columnWidth: 70,
  3179. },
  3180. {
  3181. userId: this.$store.state.user.name,
  3182. functionId: 401004,
  3183. serialNumber: '401004Table1Conclusion',
  3184. tableId: "401004Table1",
  3185. tableName: "打样文档表",
  3186. columnProp: 'conclusion',
  3187. headerAlign: "center",
  3188. align: "center",
  3189. columnLabel: '结论',
  3190. columnHidden: false,
  3191. columnImage: false,
  3192. columnSortable: false,
  3193. sortLv: 0,
  3194. status: true,
  3195. fixed: '',
  3196. columnWidth: 70,
  3197. },
  3198. {
  3199. userId: this.$store.state.user.name,
  3200. functionId: 401004,
  3201. serialNumber: '401004Table1DocumentGroupDesc',
  3202. tableId: "401004Table1",
  3203. tableName: "打样文档表",
  3204. columnProp: 'documentGroupDesc',
  3205. headerAlign: "center",
  3206. align: "center",
  3207. columnLabel: '文档种类',
  3208. columnHidden: false,
  3209. columnImage: false,
  3210. columnSortable: false,
  3211. sortLv: 0,
  3212. status: true,
  3213. fixed: '',
  3214. columnWidth: 70,
  3215. },
  3216. {
  3217. userId: this.$store.state.user.name,
  3218. functionId: 103001,
  3219. serialNumber: '103001Table1CreateDate',
  3220. tableId: '103001Table1',
  3221. tableName: '打样文档表',
  3222. columnProp: 'createDate',
  3223. headerAlign: 'center',
  3224. align: 'center',
  3225. columnLabel: '上传时间',
  3226. columnHidden: false,
  3227. columnImage: false,
  3228. columnSortable: false,
  3229. sortLv: 0,
  3230. status: true,
  3231. fixed: '',
  3232. columnWidth: 130
  3233. },
  3234. {
  3235. userId: this.$store.state.user.name,
  3236. functionId: 103001,
  3237. serialNumber: '103001Table1CreateBy',
  3238. tableId: '103001Table1',
  3239. tableName: '打样文档表',
  3240. columnProp: 'createdBy',
  3241. headerAlign: 'center',
  3242. align: 'left',
  3243. columnLabel: '上传人',
  3244. columnHidden: false,
  3245. columnImage: false,
  3246. columnSortable: false,
  3247. sortLv: 0,
  3248. status: true,
  3249. fixed: '',
  3250. columnWidth: 80
  3251. }
  3252. ],
  3253. columnProjectBomList: [
  3254. {
  3255. userId: this.$store.state.user.name,
  3256. functionId: 401005,
  3257. serialNumber: '401005Table1LevelCode',
  3258. tableId: "401005Table1",
  3259. tableName: "项目物料表",
  3260. columnProp: 'levelCode',
  3261. headerAlign: "center",
  3262. align: "left",
  3263. columnLabel: 'BOM层级',
  3264. columnHidden: false,
  3265. columnImage: false,
  3266. columnSortable: false,
  3267. sortLv: 0,
  3268. status: true,
  3269. fixed: '',
  3270. columnWidth: 100,
  3271. },
  3272. {
  3273. userId: this.$store.state.user.name,
  3274. functionId: 401005,
  3275. serialNumber: '401005Table1PartNo2',
  3276. tableId: "401005Table1",
  3277. tableName: "项目物料BOM表",
  3278. columnProp: 'partNo2',
  3279. headerAlign: "center",
  3280. align: "left",
  3281. columnLabel: '物料编码',
  3282. columnHidden: false,
  3283. columnImage: false,
  3284. columnSortable: false,
  3285. sortLv: 0,
  3286. status: true,
  3287. fixed: '',
  3288. columnWidth: 145,
  3289. },
  3290. {
  3291. userId: this.$store.state.user.name,
  3292. functionId: 401005,
  3293. serialNumber: '401005Table1PartDesc2',
  3294. tableId: "401005Table1",
  3295. tableName: "项目物料BOM表",
  3296. columnProp: 'partDesc2',
  3297. headerAlign: "center",
  3298. align: "left",
  3299. columnLabel: '物料描述',
  3300. columnHidden: false,
  3301. columnImage: false,
  3302. columnSortable: false,
  3303. sortLv: 0,
  3304. status: true,
  3305. fixed: '',
  3306. columnWidth: 500,
  3307. },
  3308. {
  3309. userId: this.$store.state.user.name,
  3310. functionId: 401005,
  3311. serialNumber: '401005Table1QtyAssembly',
  3312. tableId: "401005Table1",
  3313. tableName: "项目物料BOM表",
  3314. columnProp: 'qtyAssembly',
  3315. headerAlign: "center",
  3316. align: "right",
  3317. columnLabel: '用量',
  3318. columnHidden: false,
  3319. columnImage: false,
  3320. columnSortable: false,
  3321. sortLv: 0,
  3322. status: true,
  3323. fixed: '',
  3324. columnWidth: 150,
  3325. },
  3326. {
  3327. userId: this.$store.state.user.name,
  3328. functionId: 401005,
  3329. serialNumber: '401005Table1ScrapFactor',
  3330. tableId: "401005Table1",
  3331. tableName: "项目物料表",
  3332. columnProp: 'scrapFactor',
  3333. headerAlign: "center",
  3334. align: "right",
  3335. columnLabel: '损耗',
  3336. columnHidden: false,
  3337. columnImage: false,
  3338. columnSortable: false,
  3339. sortLv: 0,
  3340. status: true,
  3341. fixed: '',
  3342. columnWidth: 150,
  3343. },
  3344. {
  3345. userId: this.$store.state.user.name,
  3346. functionId: 401005,
  3347. serialNumber: '401005Table1EffectiveDate',
  3348. tableId: "401005Table1",
  3349. tableName: "项目物料表",
  3350. columnProp: 'effectiveDate',
  3351. headerAlign: "center",
  3352. align: "center",
  3353. columnLabel: '生效日期',
  3354. columnHidden: false,
  3355. columnImage: false,
  3356. columnSortable: false,
  3357. sortLv: 0,
  3358. status: true,
  3359. fixed: '',
  3360. columnWidth: 120,
  3361. },
  3362. ],
  3363. columnProjectRoutingList: [
  3364. {
  3365. userId: this.$store.state.user.name,
  3366. functionId: 401005,
  3367. serialNumber: '401005Table1PartNo2',
  3368. tableId: "401005Table1",
  3369. tableName: "项目物料BOM表",
  3370. columnProp: 'partNo2',
  3371. headerAlign: "center",
  3372. align: "left",
  3373. columnLabel: '物料编码',
  3374. columnHidden: false,
  3375. columnImage: false,
  3376. columnSortable: false,
  3377. sortLv: 0,
  3378. status: true,
  3379. fixed: '',
  3380. columnWidth: 145,
  3381. },
  3382. {
  3383. userId: this.$store.state.user.name,
  3384. functionId: 401005,
  3385. serialNumber: '401005Table1WorkCenterNo',
  3386. tableId: "401005Table1",
  3387. tableName: "项目物料BOM表",
  3388. columnProp: 'workCenterNo',
  3389. headerAlign: "center",
  3390. align: "left",
  3391. columnLabel: '加工中心',
  3392. columnHidden: false,
  3393. columnImage: false,
  3394. columnSortable: false,
  3395. sortLv: 0,
  3396. status: true,
  3397. fixed: '',
  3398. columnWidth: 150,
  3399. },
  3400. {
  3401. userId: this.$store.state.user.name,
  3402. functionId: 401005,
  3403. serialNumber: '401005Table1ItemNo',
  3404. tableId: "401005Table1",
  3405. tableName: "项目物料表",
  3406. columnProp: 'itemNo',
  3407. headerAlign: "center",
  3408. align: "center",
  3409. columnLabel: '工序行号',
  3410. columnHidden: false,
  3411. columnImage: false,
  3412. columnSortable: false,
  3413. sortLv: 0,
  3414. status: true,
  3415. fixed: '',
  3416. columnWidth: 150,
  3417. },
  3418. {
  3419. userId: this.$store.state.user.name,
  3420. functionId: 401005,
  3421. serialNumber: '401005Table1RoutingItemNo',
  3422. tableId: "401005Table1",
  3423. tableName: "项目物料表",
  3424. columnProp: 'routingItemNo',
  3425. headerAlign: "center",
  3426. align: "left",
  3427. columnLabel: '标准工序代号',
  3428. columnHidden: false,
  3429. columnImage: false,
  3430. columnSortable: false,
  3431. sortLv: 0,
  3432. status: true,
  3433. fixed: '',
  3434. columnWidth: 150,
  3435. },
  3436. {
  3437. userId: this.$store.state.user.name,
  3438. functionId: 401005,
  3439. serialNumber: '401005Table1ItemDesc',
  3440. tableId: "401005Table1",
  3441. tableName: "项目物料表",
  3442. columnProp: 'itemDesc',
  3443. headerAlign: "center",
  3444. align: "left",
  3445. columnLabel: '工序名称',
  3446. columnHidden: false,
  3447. columnImage: false,
  3448. columnSortable: false,
  3449. sortLv: 0,
  3450. status: true,
  3451. fixed: '',
  3452. columnWidth: 150,
  3453. },
  3454. {
  3455. userId: this.$store.state.user.name,
  3456. functionId: 401005,
  3457. serialNumber: '401005Table1LaborTime',
  3458. tableId: "401005Table1",
  3459. tableName: "项目物料表",
  3460. columnProp: 'laborTime',
  3461. headerAlign: "center",
  3462. align: "right",
  3463. columnLabel: '工时',
  3464. columnHidden: false,
  3465. columnImage: false,
  3466. columnSortable: false,
  3467. sortLv: 0,
  3468. status: true,
  3469. fixed: '',
  3470. columnWidth: 150,
  3471. },
  3472. {
  3473. userId: this.$store.state.user.name,
  3474. functionId: 401005,
  3475. serialNumber: '401005Table1LaborResources',
  3476. tableId: "401005Table1",
  3477. tableName: "项目物料表",
  3478. columnProp: 'laborResources',
  3479. headerAlign: "center",
  3480. align: "right",
  3481. columnLabel: '人数',
  3482. columnHidden: false,
  3483. columnImage: false,
  3484. columnSortable: false,
  3485. sortLv: 0,
  3486. status: true,
  3487. fixed: '',
  3488. columnWidth: 150,
  3489. },
  3490. {
  3491. userId: this.$store.state.user.name,
  3492. functionId: 401005,
  3493. serialNumber: '401005Table1MachRunFactor',
  3494. tableId: "401005Table1",
  3495. tableName: "项目物料表",
  3496. columnProp: 'machRunFactor',
  3497. headerAlign: "center",
  3498. align: "right",
  3499. columnLabel: '单位工时',
  3500. columnHidden: false,
  3501. columnImage: false,
  3502. columnSortable: false,
  3503. sortLv: 0,
  3504. status: true,
  3505. fixed: '',
  3506. columnWidth: 150,
  3507. },
  3508. {
  3509. userId: this.$store.state.user.name,
  3510. functionId: 401005,
  3511. serialNumber: '401005Table1FactorUnit',
  3512. tableId: "401005Table1",
  3513. tableName: "项目物料表",
  3514. columnProp: 'factorUnit',
  3515. headerAlign: "center",
  3516. align: "center",
  3517. columnLabel: '单位',
  3518. columnHidden: false,
  3519. columnImage: false,
  3520. columnSortable: false,
  3521. sortLv: 0,
  3522. status: true,
  3523. fixed: '',
  3524. columnWidth: 150,
  3525. },
  3526. ],
  3527. // 与项目打样记录页表格列保持一致,详情里只按当前项目料号展示,不走列配置收藏。
  3528. columnProjectProofRecordList: [
  3529. { columnProp: 'buDesc', headerAlign: 'center', align: 'center', columnLabel: 'BU', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3530. { columnProp: 'projectNo', headerAlign: 'center', align: 'center', columnLabel: '项目编码', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3531. { columnProp: 'projectDesc', headerAlign: 'center', align: 'center', columnLabel: '项目名称', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3532. { columnProp: 'testPartNo', headerAlign: 'center', align: 'center', columnLabel: '项目料号', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3533. { columnProp: 'partDesc', headerAlign: 'center', align: 'center', columnLabel: '料号描述', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3534. { columnProp: 'customerNo', headerAlign: 'center', align: 'left', columnLabel: '客户编码', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3535. { columnProp: 'customerDesc', headerAlign: 'center', align: 'left', columnLabel: '客户名称', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 150 },
  3536. { columnProp: 'buildDate', headerAlign: 'center', align: 'center', columnLabel: '立项日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3537. { columnProp: 'priority', headerAlign: 'center', align: 'left', columnLabel: '优先级', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 80 },
  3538. { columnProp: 'cProjectRegion', headerAlign: 'center', align: 'left', columnLabel: '区域', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3539. { columnProp: 'projectManagerName', headerAlign: 'center', align: 'left', columnLabel: 'PM/Sales', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3540. { columnProp: 'projectOwnerName', headerAlign: 'center', align: 'left', columnLabel: 'PjM', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3541. { columnProp: 'engineerName', headerAlign: 'center', align: 'left', columnLabel: 'Engineer', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3542. { columnProp: 'cQualityEngineer1Name', headerAlign: 'center', align: 'left', columnLabel: 'IPQC-Lam/Pri/Etch/Slit', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 170 },
  3543. { columnProp: 'cQualityEngineer2Name', headerAlign: 'center', align: 'left', columnLabel: 'IPQC-Converting', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 150 },
  3544. { columnProp: 'cQualityEngineer3Name', headerAlign: 'center', align: 'left', columnLabel: 'FQC1', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3545. { columnProp: 'cQualityEngineer5Name', headerAlign: 'center', align: 'left', columnLabel: 'FQC2', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3546. { columnProp: 'cQualityEngineer6Name', headerAlign: 'center', align: 'left', columnLabel: 'IQC', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3547. { columnProp: 'cManufactureEngineerName', headerAlign: 'center', align: 'left', columnLabel: 'MFG', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3548. { columnProp: 'cQualityEngineer4Name', headerAlign: 'center', align: 'left', columnLabel: 'SQE', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3549. { columnProp: 'docEngineerName', headerAlign: 'center', align: 'left', columnLabel: '文档工程师', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3550. { columnProp: 'docEngineer2Name', headerAlign: 'center', align: 'left', columnLabel: '文档工程师2', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3551. { columnProp: 'ipqcHardTagName', headerAlign: 'center', align: 'left', columnLabel: 'IPQC-Hardtag', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3552. { columnProp: 'cQualityEngineer7Name', headerAlign: 'center', align: 'left', columnLabel: '前道工程师', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3553. { columnProp: 'status', headerAlign: 'center', align: 'left', columnLabel: '物料状态', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3554. { columnProp: 'proofingStatus', headerAlign: 'center', align: 'left', columnLabel: '打样状态', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3555. { columnProp: 'proofingResultStatus', headerAlign: 'center', align: 'left', columnLabel: '打样结论', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 100 },
  3556. { columnProp: 'needDate', headerAlign: 'center', align: 'center', columnLabel: '项目物料预计完成日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 130 },
  3557. { columnProp: 'closeDate', headerAlign: 'center', align: 'center', columnLabel: '转量产日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3558. { columnProp: 'finalPartNo', headerAlign: 'center', align: 'left', columnLabel: 'ERP正式料号', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3559. { columnProp: 'planStartDate', headerAlign: 'center', align: 'center', columnLabel: '打样开始日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 90 },
  3560. { columnProp: 'proofingNo', headerAlign: 'center', align: 'center', columnLabel: '打样单号', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 80 },
  3561. { columnProp: 'proofingNumber', headerAlign: 'center', align: 'center', columnLabel: '数量', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 80 },
  3562. { columnProp: 'cProjectTypeDb', headerAlign: 'center', align: 'left', columnLabel: '项目分类', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 80 },
  3563. { columnProp: 'requiredDeliveryDate', headerAlign: 'center', align: 'center', columnLabel: '打样预计完成日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 120 },
  3564. { columnProp: 'actualityDeliveryDate', headerAlign: 'center', align: 'center', columnLabel: '实际完成日期', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 80 },
  3565. { columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '打样单创建时间', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 130 },
  3566. { columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '打样单创建人', columnHidden: false, columnSortable: false, fixed: '', columnWidth: 90 }
  3567. ],
  3568. levelList: [],
  3569. rules:{
  3570. projectNo:[
  3571. {
  3572. required: true,
  3573. message: ' ',
  3574. trigger: ['blur','change']
  3575. }
  3576. ],
  3577. projectDesc:[
  3578. {
  3579. required: true,
  3580. message: ' ',
  3581. trigger: ['blur','change']
  3582. }
  3583. ],
  3584. customerNo:[
  3585. {
  3586. required: true,
  3587. message: ' ',
  3588. trigger: ['blur','change']
  3589. }
  3590. ],
  3591. customerDesc:[
  3592. {
  3593. required: true,
  3594. message: ' ',
  3595. trigger: ['blur','change']
  3596. }
  3597. ],
  3598. testPartNo:[
  3599. {
  3600. required: true,
  3601. message: ' ',
  3602. trigger: ['blur','change']
  3603. }
  3604. ],
  3605. partDesc:[
  3606. {
  3607. required: true,
  3608. message: ' ',
  3609. trigger: ['blur','change']
  3610. }
  3611. ],
  3612. projectManager:[
  3613. {
  3614. required: true,
  3615. message: ' ',
  3616. trigger: ['blur','change']
  3617. }
  3618. ],
  3619. engineer:[
  3620. {
  3621. required: true,
  3622. message: ' ',
  3623. trigger: ['blur','change']
  3624. }
  3625. ],
  3626. projectOwner:[
  3627. {
  3628. required: true,
  3629. message: ' ',
  3630. trigger: ['blur','change']
  3631. }
  3632. ],
  3633. cProjectRegion:[
  3634. {
  3635. required: true,
  3636. message: ' ',
  3637. trigger: ['blur','change']
  3638. }
  3639. ],
  3640. cQualityEngineer1:[
  3641. {
  3642. required: true,
  3643. message: ' ',
  3644. trigger: ['blur','change']
  3645. }
  3646. ],
  3647. cQualityEngineer2:[
  3648. {
  3649. required: true,
  3650. message: ' ',
  3651. trigger: ['blur','change']
  3652. }
  3653. ],
  3654. cQualityEngineer3:[
  3655. {
  3656. required: true,
  3657. message: ' ',
  3658. trigger: ['blur','change']
  3659. }
  3660. ],
  3661. cQualityEngineer4:[
  3662. {
  3663. required: true,
  3664. message: ' ',
  3665. trigger: ['blur','change']
  3666. }
  3667. ],
  3668. cQualityEngineer5:[
  3669. {
  3670. required: true,
  3671. message: ' ',
  3672. trigger: ['blur','change']
  3673. }
  3674. ],
  3675. cQualityEngineer6:[
  3676. {
  3677. required: true,
  3678. message: ' ',
  3679. trigger: ['blur','change']
  3680. }
  3681. ],
  3682. cManufactureEngineer:[
  3683. {
  3684. required: true,
  3685. message: ' ',
  3686. trigger: ['blur','change']
  3687. }
  3688. ],
  3689. docEngineer:[
  3690. {
  3691. required: true,
  3692. message: ' ',
  3693. trigger: ['blur','change']
  3694. }
  3695. ],
  3696. docEngineerName:[
  3697. {
  3698. required: true,
  3699. message: ' ',
  3700. trigger: ['blur','change']
  3701. }
  3702. ],
  3703. projectManagerName:[
  3704. {
  3705. required: true,
  3706. message: ' ',
  3707. trigger: ['blur','change']
  3708. }
  3709. ],
  3710. engineerName:[
  3711. {
  3712. required: true,
  3713. message: ' ',
  3714. trigger: ['blur','change']
  3715. }
  3716. ],
  3717. cQualityEngineer1Name:[
  3718. {
  3719. required: true,
  3720. message: ' ',
  3721. trigger: ['blur','change']
  3722. }
  3723. ],
  3724. cQualityEngineer2Name:[
  3725. {
  3726. required: true,
  3727. message: ' ',
  3728. trigger: ['blur','change']
  3729. }
  3730. ],
  3731. cQualityEngineer3Name:[
  3732. {
  3733. required: true,
  3734. message: ' ',
  3735. trigger: ['blur','change']
  3736. }
  3737. ],
  3738. cQualityEngineer4Name:[
  3739. {
  3740. required: true,
  3741. message: ' ',
  3742. trigger: ['blur','change']
  3743. }
  3744. ],
  3745. cQualityEngineer5Name:[
  3746. {
  3747. required: true,
  3748. message: ' ',
  3749. trigger: ['blur','change']
  3750. }
  3751. ],
  3752. cQualityEngineer6Name:[
  3753. {
  3754. required: true,
  3755. message: ' ',
  3756. trigger: ['blur','change']
  3757. }
  3758. ],
  3759. cManufactureEngineerName:[
  3760. {
  3761. required: true,
  3762. message: ' ',
  3763. trigger: ['blur','change']
  3764. }
  3765. ],
  3766. projectCategoryType:[
  3767. {
  3768. required: true,
  3769. message: ' ',
  3770. trigger: ['blur','change']
  3771. }
  3772. ],
  3773. documentTypeIdType:[
  3774. {
  3775. required: true,
  3776. message: ' ',
  3777. trigger: ['blur','change']
  3778. }
  3779. ],
  3780. documentTypeType:[
  3781. {
  3782. required: true,
  3783. message: ' ',
  3784. trigger: ['blur','change']
  3785. }
  3786. ],
  3787. responsibleDepartmentType:[
  3788. {
  3789. required: true,
  3790. message: ' ',
  3791. trigger: ['blur','change']
  3792. }
  3793. ],
  3794. estimatedCompletionDaysType:[
  3795. {
  3796. required: true,
  3797. message: ' ',
  3798. trigger: ['blur','change']
  3799. }
  3800. ],
  3801. activeType:[
  3802. {
  3803. required: true,
  3804. message: ' ',
  3805. trigger: ['blur','change']
  3806. }
  3807. ],
  3808. bu:[
  3809. {
  3810. required: true,
  3811. message: ' ',
  3812. trigger: ['blur','change']
  3813. }
  3814. ],
  3815. finalPartNo:[
  3816. {
  3817. required: true,
  3818. message: ' ',
  3819. trigger: ['blur','change']
  3820. }
  3821. ],
  3822. needDate:[
  3823. {
  3824. required: true,
  3825. message: ' ',
  3826. trigger: ['blur','change']
  3827. }
  3828. ],
  3829. projectCreationDate:[
  3830. {
  3831. required: true,
  3832. message: ' ',
  3833. trigger: ['blur','change']
  3834. }
  3835. ],
  3836. wantedConfirmDate:[
  3837. {
  3838. required: true,
  3839. message: ' ',
  3840. trigger: ['blur','change']
  3841. }
  3842. ],
  3843. projectCategory: [
  3844. {
  3845. required: true,
  3846. message: ' ',
  3847. trigger: ['blur','change']
  3848. }
  3849. ],
  3850. projectPhase: [
  3851. {
  3852. required: true,
  3853. message: ' ',
  3854. trigger: ['blur','change']
  3855. }
  3856. ],
  3857. proofingNo: [
  3858. {
  3859. required: true,
  3860. message: ' ',
  3861. trigger: ['blur','change']
  3862. }
  3863. ],
  3864. planStartDate: [
  3865. {
  3866. required: true,
  3867. message: ' ',
  3868. trigger: ['blur','change']
  3869. }
  3870. ],
  3871. requiredDeliveryDate: [
  3872. {
  3873. required: true,
  3874. message: ' ',
  3875. trigger: ['blur','change']
  3876. }
  3877. ],
  3878. proofingNumber: [
  3879. {
  3880. required: true,
  3881. message: ' ',
  3882. trigger: ['blur','change']
  3883. }
  3884. ],
  3885. //请选择项目分类
  3886. cProjectTypeDb: [
  3887. {
  3888. required: true,
  3889. message: ' ',
  3890. trigger: ['blur','change']
  3891. }
  3892. ],
  3893. conclusion: [
  3894. {
  3895. required: true,
  3896. message: ' ',
  3897. trigger: ['blur','change']
  3898. }
  3899. ],
  3900. },
  3901. projectCategoryList: [],
  3902. cProjectRegionList: [
  3903. {
  3904. cProjectRegion: 'Global',
  3905. },
  3906. {
  3907. cProjectRegion: 'APAC',
  3908. },
  3909. {
  3910. cProjectRegion: 'CHINA',
  3911. },
  3912. {
  3913. cProjectRegion: 'EU',
  3914. },
  3915. {
  3916. cProjectRegion: 'US',
  3917. },
  3918. {
  3919. cProjectRegion: 'Mexico',
  3920. },
  3921. {
  3922. cProjectRegion: 'Other',
  3923. },
  3924. ],
  3925. priorityList: [
  3926. {
  3927. priority: 'Low',
  3928. },
  3929. {
  3930. priority: 'Risk',
  3931. },
  3932. ],
  3933. statusList: [
  3934. {
  3935. status: '草稿',
  3936. },
  3937. {
  3938. status: '进行中',
  3939. },
  3940. {
  3941. status: '已量产',
  3942. },
  3943. {
  3944. status: '正式量产',
  3945. }
  3946. ],
  3947. // 与项目物料维护弹窗的料号状态下拉保持同一口径。
  3948. partTypeList: [
  3949. {
  3950. partType: 'Active',
  3951. },
  3952. {
  3953. partType: 'On hold',
  3954. },
  3955. {
  3956. partType: 'Cancel',
  3957. },
  3958. {
  3959. partType: 'EOL',
  3960. }
  3961. ],
  3962. dryWetTypeList: ['Dry', 'Wet', '编码打印'],
  3963. userBuList: [],
  3964. menuId: this.$route.meta.menuId,
  3965. }
  3966. },
  3967. mounted () {
  3968. this.$nextTick(() => {
  3969. this.height = window.innerHeight - 558
  3970. })
  3971. EventBus.$on('updateProjectPartInfo', () => {
  3972. this.getDataList();
  3973. });
  3974. EventBus.$on('updateProjectPartDocumentInfo', () => {
  3975. this.getProofDocument()
  3976. });
  3977. EventBus.$on('updateThisProjectPartDocumentInfo', () => {
  3978. this.searchProjectAllDocumentList()
  3979. });
  3980. EventBus.$on('getProjectOtherDocument', () => {
  3981. this.getProjectOtherDocument()
  3982. });
  3983. },
  3984. created () {
  3985. // 按钮控制
  3986. this.getButtonAuthData()
  3987. // 获取用户的 site 和 bu
  3988. this.getSiteAndBuByUserName()
  3989. // 校验用户是否收藏
  3990. this.favoriteIsOk()
  3991. // 动态列
  3992. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  3993. if (!this.authSearch) {
  3994. if (!this.agencyMatters){
  3995. this.applyProjectPartRouteQuery()
  3996. // 获取 URL 查询参数
  3997. const { projectPartId } = this.$route.query;
  3998. // 将查询参数赋值给 searchData
  3999. if (projectPartId){
  4000. this.searchData.projectPartId = projectPartId
  4001. }
  4002. // 获取数据列表
  4003. this.getDataList()
  4004. }
  4005. }
  4006. },
  4007. activated() {
  4008. if (this.applyProjectPartRouteQuery()) {
  4009. this.getDataList();
  4010. }
  4011. this.$store.commit("sift/commitSearchFunction",this.queryEamProjectPart)
  4012. },
  4013. methods: {
  4014. applyProjectPartRouteQuery () {
  4015. const query = this.$route.query || {}
  4016. const projectNo = query.projectNo === undefined || query.projectNo === null ? '' : String(query.projectNo).trim()
  4017. const testPartNo = query.testPartNo === undefined || query.testPartNo === null ? '' : String(query.testPartNo).trim()
  4018. if (!projectNo && !testPartNo) {
  4019. return false
  4020. }
  4021. const queryKey = 'projectNo=' + projectNo + '|testPartNo=' + testPartNo
  4022. // 同一组路由参数只自动查询一次,避免 keep-alive 切回页签时覆盖用户手工条件。
  4023. if (this.lastAppliedRouteQueryKey === queryKey) {
  4024. return false
  4025. }
  4026. this.lastAppliedRouteQueryKey = queryKey
  4027. // 同步到查询表单,便于用户看到当前自动查询条件;searchData1 供跳转查询使用。
  4028. this.searchData.projectNo = projectNo
  4029. this.searchData.testPartNo = testPartNo
  4030. this.searchData.projectDesc = ''
  4031. this.searchData.partDesc = ''
  4032. this.searchData.buDesc = ''
  4033. this.searchData.customerNo = ''
  4034. this.searchData.customerDesc = ''
  4035. this.searchData.projectCategory = ''
  4036. this.searchData.status = ''
  4037. this.searchData.partType = ''
  4038. this.searchData.projectManager = ''
  4039. this.searchData.projectOwner = ''
  4040. this.searchData.engineer = ''
  4041. this.searchData.startDate = ''
  4042. this.searchData.endDate = ''
  4043. this.searchData.cProjectRegion = ''
  4044. this.searchData1.projectNo = projectNo
  4045. this.searchData1.testPartNo = testPartNo
  4046. this.searchData1.buDesc = ''
  4047. this.searchData1.projectDesc = ''
  4048. this.searchData1.partDesc = ''
  4049. this.searchData1.customerNo = ''
  4050. this.searchData1.customerDesc = ''
  4051. this.agencyMatters = true
  4052. this.pageIndex = 1
  4053. this.searchData.page = 1
  4054. this.searchData1.page = 1
  4055. return true
  4056. },
  4057. resolveCurrentPartSite (site) {
  4058. if (site !== null && site !== undefined && site !== '') {
  4059. return site
  4060. }
  4061. if (this.proofingCurrentRow && this.proofingCurrentRow.site) {
  4062. return this.proofingCurrentRow.site
  4063. }
  4064. if (this.modalData && this.modalData.site) {
  4065. return this.modalData.site
  4066. }
  4067. return this.$store.state.user.site
  4068. },
  4069. splitUserDisplayName (userValue) {
  4070. if (userValue === null || userValue === undefined || userValue === '') {
  4071. return ''
  4072. }
  4073. return userValue.indexOf('-') > -1 ? userValue.split('-')[1] : userValue
  4074. },
  4075. refreshMainTableLayout () {
  4076. this.$nextTick(() => {
  4077. if (this.$refs.mainTable && this.$refs.mainTable.doLayout) {
  4078. this.$refs.mainTable.doLayout()
  4079. }
  4080. })
  4081. },
  4082. handleColumnResize(newWidth, oldWidth, column, event){
  4083. let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
  4084. inData.columnWidth=newWidth
  4085. updateColumnSize(inData).then(({data}) => {
  4086. if (data.code === 0) {
  4087. console.log("栏位宽度保存成功!")
  4088. }
  4089. })
  4090. },
  4091. // 获取用户的bu
  4092. getSiteAndBuByUserName () {
  4093. let tempData = {
  4094. username: this.$store.state.user.name,
  4095. }
  4096. getSiteAndBuByUserName(tempData).then(({data}) => {
  4097. if (data.code === 0) {
  4098. this.userBuList = data.rows
  4099. this.loadSearchProjectCategory('')
  4100. } else {
  4101. this.userBuList = []
  4102. this.projectCategoryList = []
  4103. }
  4104. })
  4105. },
  4106. // 从 site_bu 中截取 bu_no
  4107. getBuNoByJoinedValue (buValue) {
  4108. if (!buValue) {
  4109. return ''
  4110. }
  4111. let buParts = buValue.split('_')
  4112. if (buParts.length >= 2) {
  4113. return buParts[1]
  4114. }
  4115. return buValue
  4116. },
  4117. // 根据 BU 描述获取 bu_no
  4118. getBuNoByBuDesc (buDesc) {
  4119. if (!buDesc) {
  4120. return ''
  4121. }
  4122. let matchBu = this.userBuList.find(item => item.buDesc === buDesc)
  4123. if (!matchBu) {
  4124. return ''
  4125. }
  4126. return this.getBuNoByJoinedValue(matchBu.buNo)
  4127. },
  4128. // 加载查询区项目分类
  4129. loadSearchProjectCategory (buNo) {
  4130. let inData = {
  4131. site: this.$store.state.user.site,
  4132. buNo: buNo || ''
  4133. }
  4134. getProjectCategoryByBu(inData).then(({data}) => {
  4135. if (data && data.code === 0) {
  4136. this.projectCategoryList = data.rows || []
  4137. } else {
  4138. this.projectCategoryList = []
  4139. }
  4140. }).catch(() => {
  4141. this.projectCategoryList = []
  4142. })
  4143. },
  4144. handleSearchCustomerVisibleChange (visible) {
  4145. if (!visible || this.searchCustomerOptionInitialized) {
  4146. return
  4147. }
  4148. this.querySearchCustomerOptions('')
  4149. },
  4150. handleSearchCustomerRemote (keyword) {
  4151. this.querySearchCustomerOptions(keyword)
  4152. },
  4153. querySearchCustomerOptions (keyword) {
  4154. const normalizedKeyword = keyword == null ? '' : String(keyword).trim()
  4155. const queryToken = this.searchCustomerQueryToken + 1
  4156. this.searchCustomerQueryToken = queryToken
  4157. this.searchCustomerOptionLoading = true
  4158. queryProjectPartCustomerOptions({
  4159. userName: this.$store.state.user.name,
  4160. customerDesc: normalizedKeyword
  4161. }).then(({ data }) => {
  4162. if (queryToken !== this.searchCustomerQueryToken) {
  4163. return
  4164. }
  4165. if (!(data && data.code === 0)) {
  4166. this.searchCustomerOptions = []
  4167. this.$message.error((data && data.msg) || '查询客户下拉失败')
  4168. return
  4169. }
  4170. const rows = Array.isArray(data.rows) ? data.rows : []
  4171. this.searchCustomerOptions = rows.filter(item => item && item.customerDesc)
  4172. if (!normalizedKeyword) {
  4173. this.searchCustomerOptionInitialized = true
  4174. }
  4175. }).catch(() => {
  4176. if (queryToken === this.searchCustomerQueryToken) {
  4177. this.searchCustomerOptions = []
  4178. this.$message.error('查询客户下拉异常')
  4179. }
  4180. }).finally(() => {
  4181. if (queryToken === this.searchCustomerQueryToken) {
  4182. this.searchCustomerOptionLoading = false
  4183. }
  4184. })
  4185. },
  4186. // 查询区 BU 变化后刷新项目分类
  4187. searchBuChangeHandle (buDesc) {
  4188. this.searchData.projectCategory = ''
  4189. let buNo = this.getBuNoByBuDesc(buDesc)
  4190. this.loadSearchProjectCategory(buNo)
  4191. },
  4192. // 新增打样弹窗按 BU 加载项目分类
  4193. loadProofingProjectCategory (buNo, site) {
  4194. const currentSite = this.resolveCurrentPartSite(site)
  4195. let inData = {
  4196. site: currentSite,
  4197. buNo: buNo || ''
  4198. }
  4199. getProjectCategoryByBu(inData).then(({data}) => {
  4200. if (data && data.code === 0) {
  4201. this.cProjectTypeDbList = (data.rows || []).map(item => ({
  4202. cProjectTypeDb: item.projectCategory
  4203. }))
  4204. } else {
  4205. this.cProjectTypeDbList = []
  4206. }
  4207. if (this.newProofingRecordData.cProjectTypeDb && !this.cProjectTypeDbList.some(item => item.cProjectTypeDb === this.newProofingRecordData.cProjectTypeDb)) {
  4208. this.cProjectTypeDbList.push({ cProjectTypeDb: this.newProofingRecordData.cProjectTypeDb })
  4209. }
  4210. }).catch(() => {
  4211. this.cProjectTypeDbList = []
  4212. if (this.newProofingRecordData.cProjectTypeDb) {
  4213. this.cProjectTypeDbList.push({ cProjectTypeDb: this.newProofingRecordData.cProjectTypeDb })
  4214. }
  4215. })
  4216. },
  4217. // 获取基础数据列表S
  4218. getBaseList (val,type) {
  4219. this.tagNo = val
  4220. this.$nextTick(() => {
  4221. let strVal = ''
  4222. if (val === 509 ) {
  4223. strVal = this.modalData.customerNo
  4224. this.$refs.baseList.init(val, strVal)
  4225. }
  4226. if (val === 301 ) {
  4227. strVal = this.modalData.projectManager
  4228. this.$refs.baseList.init(val, strVal)
  4229. }
  4230. })
  4231. },
  4232. /* 列表方法的回调 */
  4233. getBaseData (val) {
  4234. if (this.tagNo === 509) {
  4235. this.modalData.customerNo = val.customer_no
  4236. this.modalData.customerDesc = val.customer_desc
  4237. }
  4238. },
  4239. // 校验用户是否收藏
  4240. favoriteIsOk () {
  4241. let userFavorite = {
  4242. userId: this.$store.state.user.id,
  4243. languageCode: this.$i18n.locale
  4244. }
  4245. userFavoriteList(userFavorite).then(({data}) => {
  4246. for (let i = 0; i < data.list.length; i++) {
  4247. if (this.$route.meta.menuId === data.list[i].menuId) {
  4248. this.favorite = true
  4249. }
  4250. }
  4251. })
  4252. },
  4253. // 收藏 OR 取消收藏
  4254. favoriteFunction () {
  4255. let userFavorite = {
  4256. userId: this.$store.state.user.id,
  4257. functionId: this.$route.meta.menuId,
  4258. }
  4259. if (this.favorite) {
  4260. removeUserFavorite(userFavorite).then(({data}) => {
  4261. this.$message.success(data.msg)
  4262. this.favorite = false
  4263. })
  4264. } else {
  4265. // 收藏
  4266. saveUserFavorite(userFavorite).then(({data}) => {
  4267. this.$message.success(data.msg)
  4268. this.favorite = true
  4269. })
  4270. }
  4271. },
  4272. //导出excel
  4273. async createExportData () {
  4274. this.searchData.limit = -1
  4275. this.searchData.page = 1
  4276. await eamProjectPartSearch(this.searchData).then(({data}) => {
  4277. this.exportList = data.page.list
  4278. this.exportList.forEach((item) => {
  4279. item.projectManagerName = item.projectManager.split('-')[1];
  4280. item.projectOwnerName = item.projectOwner.split('-')[1];
  4281. item.engineerName = item.engineer.split('-')[1];
  4282. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  4283. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  4284. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  4285. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  4286. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  4287. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  4288. }
  4289. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  4290. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  4291. }
  4292. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  4293. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  4294. }
  4295. if (item.docEngineer !== null && item.docEngineer !== '') {
  4296. item.docEngineerName = item.docEngineer.split('-')[1];
  4297. }
  4298. if (item.docEngineer2 !== null && item.docEngineer2 !== '') {
  4299. item.docEngineer2Name = item.docEngineer2.split('-')[1];
  4300. }
  4301. if (item.ipqcHardTag !== null && item.ipqcHardTag !== '') {
  4302. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1];
  4303. }
  4304. if (item.projectManager !== null && item.projectManager !== '') {
  4305. item.projectManagerName = item.projectManager.split('-')[1];
  4306. }
  4307. item.qcEngineerName = this.splitUserDisplayName(item.qcEngineer);
  4308. item.peEngineerName = this.splitUserDisplayName(item.peEngineer);
  4309. item.eeEngineerName = this.splitUserDisplayName(item.eeEngineer);
  4310. item.sqemeEngineerName = this.splitUserDisplayName(item.sqemeEngineer);
  4311. item.sqeeeEngineerName = this.splitUserDisplayName(item.sqeeeEngineer);
  4312. });
  4313. for (let i = 0; i < this.exportList.length; i++) {
  4314. if (this.exportList[i].responsibleDepartment === 'R001') {
  4315. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  4316. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  4317. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  4318. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  4319. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  4320. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  4321. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  4322. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  4323. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  4324. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  4325. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  4326. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  4327. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  4328. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  4329. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  4330. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  4331. }
  4332. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  4333. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  4334. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  4335. }
  4336. } else if (this.exportList[i].responsibleDepartment === 'R017') {
  4337. if (this.exportList[i].docEngineer2 !== null && this.exportList[i].docEngineer2 !== '') {
  4338. this.exportList[i].projectLeader = this.exportList[i].docEngineer2.split("-")[1];
  4339. }
  4340. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  4341. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  4342. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  4343. }
  4344. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  4345. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  4346. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  4347. }
  4348. } else if (this.exportList[i].responsibleDepartment === 'R015') {
  4349. if (this.exportList[i].ipqcHardTag !== null && this.exportList[i].ipqcHardTag !== '') {
  4350. this.exportList[i].projectLeader = this.exportList[i].ipqcHardTag.split("-")[1];
  4351. }
  4352. } else if (this.exportList[i].responsibleDepartment === 'R016') {
  4353. if (this.exportList[i].cQualityEngineer7 !== null && this.exportList[i].cQualityEngineer7 !== '') {
  4354. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer7.split("-")[1];
  4355. }
  4356. } else if (this.exportList[i].responsibleDepartment === 'QC' || this.exportList[i].responsibleDepartment === 'RQC' || this.exportList[i].responsibleDepartment === 'R018') {
  4357. if (this.exportList[i].qcEngineer !== null && this.exportList[i].qcEngineer !== '') {
  4358. this.exportList[i].projectLeader = this.splitUserDisplayName(this.exportList[i].qcEngineer);
  4359. }
  4360. } else if (this.exportList[i].responsibleDepartment === 'PE' || this.exportList[i].responsibleDepartment === 'RPE' || this.exportList[i].responsibleDepartment === 'R019') {
  4361. if (this.exportList[i].peEngineer !== null && this.exportList[i].peEngineer !== '') {
  4362. this.exportList[i].projectLeader = this.splitUserDisplayName(this.exportList[i].peEngineer);
  4363. }
  4364. } else if (this.exportList[i].responsibleDepartment === 'EE' || this.exportList[i].responsibleDepartment === 'REE' || this.exportList[i].responsibleDepartment === 'R020') {
  4365. if (this.exportList[i].eeEngineer !== null && this.exportList[i].eeEngineer !== '') {
  4366. this.exportList[i].projectLeader = this.splitUserDisplayName(this.exportList[i].eeEngineer);
  4367. }
  4368. } else if (this.exportList[i].responsibleDepartment === 'SQE-ME' || this.exportList[i].responsibleDepartment === 'RSQEME') {
  4369. const sqeMe = this.exportList[i].sqemeEngineer;
  4370. if (sqeMe !== null && sqeMe !== '') {
  4371. this.exportList[i].projectLeader = this.splitUserDisplayName(sqeMe);
  4372. }
  4373. } else if (this.exportList[i].responsibleDepartment === 'SQE-EE' || this.exportList[i].responsibleDepartment === 'RSQEEE') {
  4374. const sqeEe = this.exportList[i].sqeeeEngineer;
  4375. if (sqeEe !== null && sqeEe !== '') {
  4376. this.exportList[i].projectLeader = this.splitUserDisplayName(sqeEe);
  4377. }
  4378. }
  4379. }
  4380. })
  4381. return this.exportList
  4382. },
  4383. startDownload () {},
  4384. finishDownload () {},
  4385. fields () {
  4386. let json = "{"
  4387. this.columnList.forEach((item, index) => {
  4388. if (index == this.columnList.length - 1) {
  4389. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  4390. } else {
  4391. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  4392. }
  4393. })
  4394. json += "}"
  4395. let s = eval("(" + json + ")")
  4396. return s
  4397. },
  4398. agencyMatter(){
  4399. this.agencyMatters = false
  4400. this.getDataList()
  4401. },
  4402. // 获取数据列表
  4403. getDataList (params) {
  4404. this.selectTypeFlag = params
  4405. this.searchData.limit = this.pageSize
  4406. this.searchData.page = this.pageIndex
  4407. this.searchData1.limit = this.pageSize
  4408. this.searchData1.page = this.pageIndex
  4409. if (this.agencyMatters) {
  4410. eamProjectPartSearch(this.searchData1).then(({data}) => {
  4411. if (data.code === 0) {
  4412. this.dataList = data.page.list
  4413. this.pageIndex = data.page.currPage
  4414. this.pageSize = data.page.pageSize
  4415. this.totalPage = data.page.totalCount
  4416. // 遍历dataList
  4417. this.dataList.forEach((item) => {
  4418. item.projectManagerName = item.projectManager.split('-')[1]
  4419. item.projectOwnerName = item.projectOwner.split('-')[1]
  4420. item.engineerName = item.engineer.split('-')[1]
  4421. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4422. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4423. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4424. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4425. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4426. }
  4427. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4428. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4429. }
  4430. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4431. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4432. }
  4433. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4434. if (item.docEngineer != null && item.docEngineer !== ''){
  4435. item.docEngineerName = item.docEngineer.split('-')[1]
  4436. }
  4437. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4438. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4439. }
  4440. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4441. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4442. }
  4443. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4444. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4445. }
  4446. item.qcEngineerName = this.splitUserDisplayName(item.qcEngineer)
  4447. item.peEngineerName = this.splitUserDisplayName(item.peEngineer)
  4448. item.eeEngineerName = this.splitUserDisplayName(item.eeEngineer)
  4449. item.sqemeEngineerName = this.splitUserDisplayName(item.sqemeEngineer)
  4450. item.sqeeeEngineerName = this.splitUserDisplayName(item.sqeeeEngineer)
  4451. })
  4452. // 判断是否全部存在数据
  4453. if (this.totalPage > 0) {
  4454. // 设置选中行
  4455. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4456. this.proofingClickRow(this.dataList[this.dataListIndex])
  4457. this.dataListIndex = 0
  4458. }
  4459. }
  4460. })
  4461. } else {
  4462. eamProjectPartSearch(this.searchData).then(({data}) => {
  4463. if (data.code === 0) {
  4464. this.dataList = data.page.list
  4465. this.allPersonnelInfoList = data.rows
  4466. this.pageIndex = data.page.currPage
  4467. this.pageSize = data.page.pageSize
  4468. this.totalPage = data.page.totalCount
  4469. // 遍历dataList
  4470. this.dataList.forEach((item) => {
  4471. item.projectManagerName = item.projectManager.split('-')[1]
  4472. item.projectOwnerName = item.projectOwner.split('-')[1]
  4473. item.engineerName = item.engineer.split('-')[1]
  4474. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4475. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4476. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4477. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4478. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4479. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4480. }
  4481. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4482. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4483. }
  4484. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4485. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4486. }
  4487. if (item.docEngineer != null && item.docEngineer !== ''){
  4488. item.docEngineerName = item.docEngineer.split('-')[1]
  4489. }
  4490. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4491. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4492. }
  4493. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4494. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4495. }
  4496. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4497. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4498. }
  4499. item.qcEngineerName = this.splitUserDisplayName(item.qcEngineer)
  4500. item.peEngineerName = this.splitUserDisplayName(item.peEngineer)
  4501. item.eeEngineerName = this.splitUserDisplayName(item.eeEngineer)
  4502. item.sqemeEngineerName = this.splitUserDisplayName(item.sqemeEngineer)
  4503. item.sqeeeEngineerName = this.splitUserDisplayName(item.sqeeeEngineer)
  4504. })
  4505. // 获取全部人员信息用于下拉框
  4506. this.getAllPersonnelList()
  4507. // 判断是否全部存在数据
  4508. if (this.totalPage > 0) {
  4509. // 设置选中行
  4510. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4511. // 加载当前的页签的table
  4512. this.refreshCurrentTabTable()
  4513. this.proofingClickRow(this.dataList[this.dataListIndex])
  4514. this.dataListIndex = 0
  4515. }
  4516. }
  4517. })
  4518. }
  4519. },
  4520. queryEamProjectPart (params) {
  4521. this.selectTypeFlag = params
  4522. this.searchData.limit = this.pageSize
  4523. this.searchData.page = this.pageIndex
  4524. if (params !== null && params !== undefined) {
  4525. params.limit = this.pageSize
  4526. params.page = this.pageIndex
  4527. params.site = this.$store.state.user.site
  4528. params.userName = this.$store.state.user.name
  4529. } else {
  4530. params = this.searchData
  4531. }
  4532. queryEamProjectPart(params).then(({data}) => {
  4533. if (data.code === 0) {
  4534. this.dataList = data.page.list
  4535. this.pageIndex = data.page.currPage
  4536. this.pageSize = data.page.pageSize
  4537. this.totalPage = data.page.totalCount
  4538. // 遍历dataList
  4539. this.dataList.forEach((item) => {
  4540. item.projectManagerName = item.projectManager.split('-')[1]
  4541. item.projectOwnerName = item.projectOwner.split('-')[1]
  4542. item.engineerName = item.engineer.split('-')[1]
  4543. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4544. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4545. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4546. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4547. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4548. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4549. }
  4550. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4551. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4552. }
  4553. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4554. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4555. }
  4556. if (item.docEngineer != null && item.docEngineer !== ''){
  4557. item.docEngineerName = item.docEngineer.split('-')[1]
  4558. }
  4559. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4560. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4561. }
  4562. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4563. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4564. }
  4565. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4566. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4567. }
  4568. item.qcEngineerName = this.splitUserDisplayName(item.qcEngineer)
  4569. item.peEngineerName = this.splitUserDisplayName(item.peEngineer)
  4570. item.eeEngineerName = this.splitUserDisplayName(item.eeEngineer)
  4571. item.sqemeEngineerName = this.splitUserDisplayName(item.sqemeEngineer)
  4572. item.sqeeeEngineerName = this.splitUserDisplayName(item.sqeeeEngineer)
  4573. })
  4574. // 获取全部人员信息用于下拉框
  4575. this.getAllPersonnelList()
  4576. // 判断是否全部存在数据
  4577. if (this.totalPage > 0) {
  4578. // 设置选中行
  4579. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4580. // 加载当前的页签的table
  4581. this.refreshCurrentTabTable()
  4582. this.proofingClickRow(this.dataList[this.dataListIndex])
  4583. this.dataListIndex = 0
  4584. }
  4585. }
  4586. })
  4587. },
  4588. getAllPersonnelList() {
  4589. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  4590. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  4591. const allPersonnelList = [];
  4592. const projectOwnersMap = new Map();
  4593. const projectManagersMap = new Map();
  4594. const engineersMap = new Map();
  4595. const finalPartNosMap = new Map();
  4596. allPersonnelInfoDataList.forEach((item) => {
  4597. // Handle project owners
  4598. if (!projectOwnersMap.has(item.projectOwner)) {
  4599. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  4600. projectOwnersMap.set(item.projectOwner, {
  4601. projectOwnerId,
  4602. projectOwner: item.projectOwner,
  4603. projectOwnerName: item.projectOwner.split('-')[1]
  4604. });
  4605. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  4606. }
  4607. // Handle project managers
  4608. if (!projectManagersMap.has(item.projectManager)) {
  4609. const projectManagerId = projectManagersMap.size + 1;
  4610. projectManagersMap.set(item.projectManager, {
  4611. projectManagerId,
  4612. projectManager: item.projectManager,
  4613. projectManagerName: item.projectManager.split('-')[1]
  4614. });
  4615. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  4616. }
  4617. // Handle engineers
  4618. if (!engineersMap.has(item.engineer)) {
  4619. const engineerId = engineersMap.size + 1;
  4620. engineersMap.set(item.engineer, {
  4621. engineerId,
  4622. engineer: item.engineer,
  4623. engineerName: item.engineer.split('-')[1]
  4624. });
  4625. allPersonnelList.push(engineersMap.get(item.engineer));
  4626. }
  4627. // Handle finalPartNos
  4628. if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) {
  4629. const finalPartNoId = finalPartNosMap.size + 1;
  4630. finalPartNosMap.set(item.finalPartNo, {
  4631. finalPartNoId,
  4632. finalPartNo: item.finalPartNo,
  4633. });
  4634. allPersonnelList.push(finalPartNosMap.get(item.finalPartNo));
  4635. }
  4636. // Handle cManufactureEngineer
  4637. if (item.cManufactureEngineer !== null || item.cManufactureEngineer !== ''){
  4638. if (!this.allMFGList.includes(item.cManufactureEngineer.split('-')[0])) {
  4639. this.allMFGList.push(item.cManufactureEngineer.split('-')[0]);
  4640. }
  4641. }
  4642. });
  4643. this.allPersonnelInfoList = allPersonnelList;
  4644. },
  4645. // ======== 列表操作方法 ========
  4646. /**
  4647. * 单机选中物料信息
  4648. * @param row
  4649. */
  4650. proofingClickRow(row){
  4651. row.proofingId = -1
  4652. this.proofingCurrentRow=JSON.parse(JSON.stringify(row));
  4653. this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(row.site)
  4654. },
  4655. /**
  4656. * 当前值发生变化的时候修改
  4657. * @param row
  4658. * @param oldRow
  4659. */
  4660. changeCurrentRow (row, oldRow) {
  4661. row.proofingId = -1
  4662. // 判断是否是获取焦点的事件
  4663. if (row) {
  4664. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  4665. this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(row.site)
  4666. }
  4667. },
  4668. // 每页数
  4669. sizeChangeHandle (val) {
  4670. this.pageSize = val
  4671. this.pageIndex = 1
  4672. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  4673. this.queryEamProjectPart(this.selectTypeFlag)
  4674. } else {
  4675. this.getDataList()
  4676. }
  4677. },
  4678. // 当前页
  4679. currentChangeHandle (val) {
  4680. this.pageIndex = val
  4681. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  4682. this.queryEamProjectPart(this.selectTypeFlag)
  4683. } else {
  4684. this.getDataList()
  4685. }
  4686. },
  4687. // 多选
  4688. selectionChangeHandle (val) {
  4689. this.dataListSelections = val
  4690. },
  4691. generateNextPartNo() {
  4692. return new Promise((resolve, reject) => {
  4693. getTestPartNo().then(({ data }) => {
  4694. const stringData = String(data); // 显式转换为字符串
  4695. if (stringData === 'null' || stringData === 'undefined' || stringData === '' || stringData === '0') {
  4696. resolve('P00001');
  4697. } else {
  4698. const lastPartNo = parseInt(stringData.substring(1));
  4699. const nextPartNo = lastPartNo + 1;
  4700. let testPartNo;
  4701. if (nextPartNo < 10) {
  4702. testPartNo = 'P0000' + nextPartNo;
  4703. } else if (nextPartNo < 100) {
  4704. testPartNo = 'P000' + nextPartNo;
  4705. } else if (nextPartNo < 1000) {
  4706. testPartNo = 'P00' + nextPartNo;
  4707. } else if (nextPartNo < 10000) {
  4708. testPartNo = 'P0' + nextPartNo;
  4709. } else {
  4710. testPartNo = 'P' + nextPartNo;
  4711. }
  4712. resolve(testPartNo);
  4713. }
  4714. }).catch(error => {
  4715. reject('Failed to fetch testPartNo: ' + error);
  4716. });
  4717. });
  4718. },
  4719. changeFormalPartNo (row) {
  4720. this.modalData = {
  4721. flag: '2',
  4722. site: row.site,
  4723. bu: row.site + '_' + row.buNo,
  4724. customerNo: row.customerNo,
  4725. customerDesc: row.customerDesc,
  4726. projectCategory: row.projectCategory,
  4727. projectPartId: row.projectPartId,
  4728. testPartNo: row.testPartNo,
  4729. partDesc: row.partDesc,
  4730. projectId: row.projectId,
  4731. projectNo: row.projectNo,
  4732. projectDesc: row.projectDesc,
  4733. projectCloseDate: row.projectCloseDate,
  4734. needDate: row.needDate,
  4735. cProjectRegion: row.cProjectRegion,
  4736. projectManager: row.projectManager,
  4737. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  4738. projectOwner: row.projectOwner,
  4739. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  4740. engineer: row.engineer,
  4741. engineerName: row.engineer.split('-')[1], // 截取用户名
  4742. cQualityEngineer1: row.cQualityEngineer1,
  4743. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  4744. cQualityEngineer2: row.cQualityEngineer2,
  4745. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  4746. projectCreationDate: row.projectCreationDate,
  4747. cQualityEngineer3: row.cQualityEngineer3,
  4748. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  4749. cQualityEngineer4: row.cQualityEngineer4,
  4750. cQualityEngineer5: row.cQualityEngineer5,
  4751. cQualityEngineer6: row.cQualityEngineer6,
  4752. cManufactureEngineer: row.cManufactureEngineer,
  4753. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  4754. docEngineer: row.docEngineer,
  4755. docEngineer2: row.docEngineer2,
  4756. ipqcHardTag: row.ipqcHardTag,
  4757. cQualityEngineer7: row.cQualityEngineer7,
  4758. qcEngineer: row.qcEngineer,
  4759. peEngineer: row.peEngineer,
  4760. eeEngineer: row.eeEngineer,
  4761. sqemeEngineer: row.sqemeEngineer || '',
  4762. sqeeeEngineer: row.sqeeeEngineer || '',
  4763. finalPartNo: row.finalPartNo,
  4764. finalPartDesc: row.finalPartDesc,
  4765. // active: row.active,
  4766. createBy: this.$store.state.user.name,
  4767. updateBy: this.$store.state.user.name,
  4768. }
  4769. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== ''){
  4770. this.modalData.cQualityEngineer4Name= row.cQualityEngineer4.split('-')[1] // 截取用户名
  4771. }
  4772. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== ''){
  4773. this.modalData.cQualityEngineer5Name= row.cQualityEngineer5.split('-')[1] // 截取用户名
  4774. }
  4775. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== ''){
  4776. this.modalData.cQualityEngineer6Name= row.cQualityEngineer6.split('-')[1] // 截取用户名
  4777. }
  4778. if (row.docEngineer != null && row.docEngineer !== ''){
  4779. this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名
  4780. }
  4781. if (row.docEngineer2 != null && row.docEngineer2 !== ''){
  4782. this.modalData.docEngineer2Name= row.docEngineer2.split('-')[1] // 截取用户名
  4783. }
  4784. if (row.ipqcHardTag != null && row.ipqcHardTag !== ''){
  4785. this.modalData.ipqcHardTagName= row.ipqcHardTag.split('-')[1] // 截取用户名
  4786. }
  4787. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){
  4788. this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] // 截取用户名
  4789. }
  4790. if (row.qcEngineer != null && row.qcEngineer !== ''){
  4791. this.modalData.qcEngineerName = this.splitUserDisplayName(row.qcEngineer)
  4792. }
  4793. if (row.peEngineer != null && row.peEngineer !== ''){
  4794. this.modalData.peEngineerName = this.splitUserDisplayName(row.peEngineer)
  4795. }
  4796. if (row.eeEngineer != null && row.eeEngineer !== ''){
  4797. this.modalData.eeEngineerName = this.splitUserDisplayName(row.eeEngineer)
  4798. }
  4799. this.getFinalPartDesc()
  4800. this.formalPartNoFlag = true
  4801. },
  4802. addProofRecord (row) {
  4803. this.newProofingRecordData = {
  4804. site: row.site,
  4805. buNo: row.buNo,
  4806. projectId: row.projectId,
  4807. projectNo: row.projectNo,
  4808. projectDesc: row.projectDesc,
  4809. customerNo: row.customerNo,
  4810. customerDesc: row.customerDesc,
  4811. bu: row.site + '_' + row.buNo,
  4812. projectPartId: row.projectPartId,
  4813. testPartNo: row.testPartNo,
  4814. partDesc: row.partDesc,
  4815. projectCategory: row.projectCategory,
  4816. cProjectTypeDb: row.projectCategory,
  4817. projectManager: row.projectManager,
  4818. projectOwner: row.projectOwner,
  4819. engineer: row.engineer,
  4820. cQualityEngineer1: row.cQualityEngineer1,
  4821. cQualityEngineer2: row.cQualityEngineer2,
  4822. cQualityEngineer3: row.cQualityEngineer3,
  4823. cQualityEngineer4: row.cQualityEngineer4,
  4824. cQualityEngineer5: row.cQualityEngineer5,
  4825. cQualityEngineer6: row.cQualityEngineer6,
  4826. cManufactureEngineer: row.cManufactureEngineer,
  4827. docEngineer: row.docEngineer,
  4828. docEngineer2: row.docEngineer2,
  4829. ipqcHardTag: row.ipqcHardTag,
  4830. cQualityEngineer7: row.cQualityEngineer7,
  4831. qcEngineer: row.qcEngineer,
  4832. peEngineer: row.peEngineer,
  4833. eeEngineer: row.eeEngineer,
  4834. sqemeEngineer: row.sqemeEngineer || '',
  4835. sqeeeEngineer: row.sqeeeEngineer || '',
  4836. remark: '',
  4837. // 默认当天,按日期字符串绑定。直接放 Date 会在提交时被转成 UTC,东八区零点会少一天。
  4838. planStartDate: moment().format('YYYY-MM-DD'),
  4839. proofingNo: '',
  4840. proofingStatus: '草稿',
  4841. requiredDeliveryDate: '',
  4842. createDate: '',
  4843. createBy: this.$store.state.user.name,
  4844. }
  4845. this.loadProofingProjectCategory(row.buNo, row.site)
  4846. this.visible = true
  4847. },
  4848. newProofingRecord() {
  4849. if (this.newProofingRecordData.cProjectTypeDb === '' || this.newProofingRecordData.cProjectTypeDb === null || this.newProofingRecordData.cProjectTypeDb === undefined) {
  4850. this.$message({
  4851. message: '项目分类不能为空',
  4852. type: 'warning'
  4853. })
  4854. return
  4855. }
  4856. if (this.newProofingRecordData.projectPhase === '' || this.newProofingRecordData.projectPhase === null || this.newProofingRecordData.projectPhase === undefined) {
  4857. this.$message({
  4858. message: '项目阶段不能为空',
  4859. type: 'warning'
  4860. })
  4861. return
  4862. }
  4863. if (this.newProofingRecordData.proofingNo === '' || this.newProofingRecordData.proofingNo === null || this.newProofingRecordData.proofingNo === undefined) {
  4864. this.$message({
  4865. message: '打样单号不能为空',
  4866. type: 'warning'
  4867. })
  4868. return
  4869. }
  4870. if (this.newProofingRecordData.proofingNumber === '' || this.newProofingRecordData.proofingNumber === null || this.newProofingRecordData.proofingNumber === undefined) {
  4871. this.$message({
  4872. message: '数量不能为空',
  4873. type: 'warning'
  4874. })
  4875. return
  4876. }
  4877. // 数量必须是大于等于0的正整数
  4878. if (!/^[1-9]\d*$/.test(this.newProofingRecordData.proofingNumber)) {
  4879. this.$alert('数量必需是大于等于0的正整数', '提示', {
  4880. confirmButtonText: '确定',
  4881. });
  4882. return
  4883. }
  4884. if (this.newProofingRecordData.planStartDate === '' || this.newProofingRecordData.planStartDate === null || this.newProofingRecordData.planStartDate === undefined) {
  4885. this.$message({
  4886. message: '打样开始日期不能为空',
  4887. type: 'warning'
  4888. })
  4889. return
  4890. }
  4891. if (this.newProofingRecordData.requiredDeliveryDate === '' || this.newProofingRecordData.requiredDeliveryDate === null || this.newProofingRecordData.requiredDeliveryDate === undefined) {
  4892. this.$message({
  4893. message: '预计完成日期不能为空',
  4894. type: 'warning'
  4895. })
  4896. return
  4897. }
  4898. // 后端按 yyyy-MM-dd 解析。若提交 Date,JSON 会先转 UTC,东八区选中的日期会落成前一天。
  4899. this.newProofingRecordData.planStartDate = this.formatProofingDate(this.newProofingRecordData.planStartDate)
  4900. this.newProofingRecordData.requiredDeliveryDate = this.formatProofingDate(this.newProofingRecordData.requiredDeliveryDate)
  4901. proofingInformationSave(this.newProofingRecordData).then(({data}) => {
  4902. //区分请求成功和失败的状况
  4903. if (data && data.code === 0) {
  4904. this.newProofingDocument(data.proofingId).then(() => {
  4905. this.visible = false
  4906. //刷新表格
  4907. this.refreshCurrentTabTable()
  4908. })
  4909. } else {
  4910. this.$alert(data.msg, '错误', {
  4911. confirmButtonText: '确定'
  4912. })
  4913. }
  4914. })
  4915. },
  4916. newProofingDocument(proofingId) {
  4917. this.newProofingRecordData.proofingId = proofingId
  4918. return proofingDocumentSave(this.newProofingRecordData).then(({ data }) => {
  4919. if (data && data.code === 0) {
  4920. this.$message({
  4921. message: '新增成功',
  4922. type: 'success'
  4923. })
  4924. } else {
  4925. this.$alert(data.msg, '错误', {
  4926. confirmButtonText: '确定'
  4927. })
  4928. }
  4929. });
  4930. },
  4931. updateModalStatus (row) {
  4932. this.modalData = {
  4933. site: row.site,
  4934. bu: row.site + '_' + row.buNo,
  4935. buNo: row.buNo,
  4936. username: this.$store.state.user.name,
  4937. customerNo: row.customerNo,
  4938. customerDesc: row.customerDesc,
  4939. projectCategory: row.projectCategory,
  4940. projectPartId: row.projectPartId,
  4941. testPartNo: row.testPartNo,
  4942. partDesc: row.partDesc,
  4943. projectId: row.projectId,
  4944. projectNo: row.projectNo,
  4945. projectDesc: row.projectDesc,
  4946. priority: row.priority,
  4947. closeDate: row.closeDate,
  4948. needDate: row.needDate,
  4949. projectManager: row.projectManager,
  4950. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  4951. projectOwner: row.projectOwner,
  4952. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  4953. engineer: row.engineer,
  4954. engineerName: row.engineer.split('-')[1], // 截取用户名
  4955. cQualityEngineer1: row.cQualityEngineer1,
  4956. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  4957. cQualityEngineer2: row.cQualityEngineer2,
  4958. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  4959. cQualityEngineer3: row.cQualityEngineer3,
  4960. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  4961. cQualityEngineer4: row.cQualityEngineer4,
  4962. cQualityEngineer5: row.cQualityEngineer5,
  4963. cQualityEngineer6: row.cQualityEngineer6,
  4964. cManufactureEngineer: row.cManufactureEngineer,
  4965. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  4966. docEngineer: row.docEngineer,
  4967. docEngineer2: row.docEngineer2,
  4968. ipqcHardTag: row.ipqcHardTag,
  4969. cQualityEngineer7: row.cQualityEngineer7,
  4970. qcEngineer: row.qcEngineer,
  4971. peEngineer: row.peEngineer,
  4972. eeEngineer: row.eeEngineer,
  4973. sqemeEngineer: row.sqemeEngineer || '',
  4974. sqeeeEngineer: row.sqeeeEngineer || '',
  4975. buildDate: row.buildDate,
  4976. status: row.status,
  4977. partType: row.partType,
  4978. // active: row.active,
  4979. createBy: this.$store.state.user.name,
  4980. updateBy: this.$store.state.user.name,
  4981. }
  4982. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== '') {
  4983. this.modalData.cQualityEngineer4Name = row.cQualityEngineer4.split('-')[1] // 截取用户名
  4984. }
  4985. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== '') {
  4986. this.modalData.cQualityEngineer5Name = row.cQualityEngineer5.split('-')[1] // 截取用户名
  4987. }
  4988. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== '') {
  4989. this.modalData.cQualityEngineer6Name = row.cQualityEngineer6.split('-')[1] // 截取用户名
  4990. }
  4991. if (row.docEngineer != null && row.docEngineer !== '') {
  4992. this.modalData.docEngineerName = row.docEngineer.split('-')[1] // 截取用户名
  4993. }
  4994. if (row.docEngineer2 != null && row.docEngineer2 !== '') {
  4995. this.modalData.docEngineer2Name = row.docEngineer2.split('-')[1] // 截取用户名
  4996. }
  4997. if (row.ipqcHardTag != null && row.ipqcHardTag !== '') {
  4998. this.modalData.ipqcHardTagName = row.ipqcHardTag.split('-')[1] // 截取用户名
  4999. }
  5000. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== '') {
  5001. this.modalData.cQualityEngineer7Name = row.cQualityEngineer7.split('-')[1] // 截取用户名
  5002. }
  5003. if (row.qcEngineer != null && row.qcEngineer !== '') {
  5004. this.modalData.qcEngineerName = this.splitUserDisplayName(row.qcEngineer)
  5005. }
  5006. if (row.peEngineer != null && row.peEngineer !== '') {
  5007. this.modalData.peEngineerName = this.splitUserDisplayName(row.peEngineer)
  5008. }
  5009. if (row.eeEngineer != null && row.eeEngineer !== '') {
  5010. this.modalData.eeEngineerName = this.splitUserDisplayName(row.eeEngineer)
  5011. }
  5012. if (row.status === '草稿') {
  5013. if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
  5014. this.modalData.status = '进行中'
  5015. this.$confirm(`是否确认下达该项目?`, '提示', {
  5016. confirmButtonText: '确定',
  5017. cancelButtonText: '取消',
  5018. type: 'warning'
  5019. }).then(() => {
  5020. eamProjectPartInfoEdit(this.modalData).then(({data}) => {
  5021. if (data && (data.code === 0 || data.code === '0')) {
  5022. sendMailHandle(this.modalData).then(({data}) => {
  5023. if (data && data.code === 0) {
  5024. this.$message({
  5025. message: '发送成功',
  5026. type: 'success'
  5027. })
  5028. } else {
  5029. this.$alert(data.msg, '错误', {
  5030. confirmButtonText: '确定'
  5031. })
  5032. }
  5033. })
  5034. EventBus.$emit('updateProjectInfo')
  5035. this.dataList.forEach((item) => {
  5036. if (item.projectPartId === row.projectPartId) {
  5037. this.dataListIndex = this.dataList.indexOf(item)
  5038. }
  5039. })
  5040. this.getDataList()
  5041. this.$message({
  5042. message: '操作成功',
  5043. type: 'success',
  5044. duration: 1500,
  5045. onClose: () => {
  5046. }
  5047. })
  5048. } else {
  5049. this.$alert(data.msg, '错误', {
  5050. confirmButtonText: '确定'
  5051. })
  5052. }
  5053. })
  5054. }).catch(() => {
  5055. })
  5056. } else {
  5057. this.$message({
  5058. message: '该项目只允许PjM人员进行下达!',
  5059. type: 'warning',
  5060. showClose: true, // 显示关闭按钮
  5061. duration: 2000 // 显示时间,单位是毫秒,这里设置为5秒钟
  5062. });
  5063. }
  5064. } else if (row.status === '进行中' || '已量产') {
  5065. if (row.status === '进行中') {
  5066. this.modalData.status2 = '进行中'
  5067. }
  5068. this.modalData.status = '已量产'
  5069. this.modalData.closeDate = new Date()
  5070. this.$confirm(`是否确认转量产?`, '提示', {
  5071. confirmButtonText: '确定',
  5072. cancelButtonText: '取消',
  5073. type: 'warning'
  5074. }).then(() => {
  5075. eamProjectPartInfoEdit(this.modalData).then(({data}) => {
  5076. if (data && ( data.code === 0 || data.code === '0')) {
  5077. this.getDataList()
  5078. EventBus.$emit('updateProjectInfo')
  5079. this.$message({
  5080. message: '操作成功',
  5081. type: 'success',
  5082. duration: 1500,
  5083. onClose: () => {}
  5084. })
  5085. } else {
  5086. this.$alert(data.msg, '错误', {
  5087. confirmButtonText: '确定'
  5088. })
  5089. }
  5090. })
  5091. }).catch(() => {
  5092. })
  5093. }
  5094. },
  5095. sendMassMailHandle () {
  5096. let inData = this.proofingCurrentRow
  5097. inData.proofingId = -1
  5098. sendMailHandle(inData).then(({data}) => {
  5099. if (data && data.code === 0) {
  5100. this.$message({
  5101. message: '发送成功',
  5102. type: 'success'
  5103. })
  5104. } else {
  5105. this.$alert(data.msg, '错误', {
  5106. confirmButtonText: '确定'
  5107. })
  5108. }
  5109. })
  5110. },
  5111. // 转量产 一键下载
  5112. async dowloadAllFile(){
  5113. this.downloadLoading = true
  5114. let oldList = this.projectOtherDocumentList
  5115. let list = oldList.filter(item => {
  5116. return this.shouldShowDelete(item) || item.projectPhase === 'SOP文档'
  5117. })
  5118. for (const item of list) {
  5119. await this.viewMassDocumentFile(item, true)
  5120. this.downloadFile(this.projectConfirmatorFileList[0])
  5121. await new Promise(resolve => setTimeout(resolve, 500))
  5122. }
  5123. this.downloadLoading = false
  5124. },
  5125. // 所有文档 一键下载
  5126. async dowloadAllFile2(){
  5127. this.downloadLoading = true
  5128. let oldList = this.projectAllDocumentList
  5129. let list = oldList.filter(item => {
  5130. return this.shouldShowDelete(item) || item.uploadedFlag === 'Y'
  5131. })
  5132. for (const item of list) {
  5133. await this.viewMassDocumentFile(item, true)
  5134. this.downloadFile(this.projectConfirmatorFileList[0])
  5135. await new Promise(resolve => setTimeout(resolve, 500))
  5136. }
  5137. this.downloadLoading = false
  5138. },
  5139. cancelModalStatus (row) {
  5140. this.modalData = {
  5141. site: row.site,
  5142. bu: row.site + '_' + row.buNo,
  5143. buNo: row.buNo,
  5144. username: this.$store.state.user.name,
  5145. customerNo: row.customerNo,
  5146. customerDesc: row.customerDesc,
  5147. projectCategory: row.projectCategory,
  5148. projectPartId: row.projectPartId,
  5149. testPartNo: row.testPartNo,
  5150. partDesc: row.partDesc,
  5151. projectId: row.projectId,
  5152. projectNo: row.projectNo,
  5153. projectDesc: row.projectDesc,
  5154. priority: row.priority,
  5155. closeDate: row.closeDate,
  5156. needDate: row.needDate,
  5157. projectManager: row.projectManager,
  5158. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  5159. projectOwner: row.projectOwner,
  5160. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  5161. engineer: row.engineer,
  5162. engineerName: row.engineer.split('-')[1], // 截取用户名
  5163. cQualityEngineer1: row.cQualityEngineer1,
  5164. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  5165. cQualityEngineer2: row.cQualityEngineer2,
  5166. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  5167. cQualityEngineer3: row.cQualityEngineer3,
  5168. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  5169. cQualityEngineer4: row.cQualityEngineer4,
  5170. cQualityEngineer5: row.cQualityEngineer5,
  5171. cQualityEngineer6: row.cQualityEngineer6,
  5172. cManufactureEngineer: row.cManufactureEngineer,
  5173. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  5174. docEngineer: row.docEngineer,
  5175. docEngineer2: row.docEngineer2,
  5176. ipqcHardTag: row.ipqcHardTag,
  5177. cQualityEngineer7: row.cQualityEngineer7,
  5178. qcEngineer: row.qcEngineer,
  5179. peEngineer: row.peEngineer,
  5180. eeEngineer: row.eeEngineer,
  5181. sqemeEngineer: row.sqemeEngineer || '',
  5182. sqeeeEngineer: row.sqeeeEngineer || '',
  5183. buildDate: row.buildDate,
  5184. status: row.status,
  5185. partType: row.partType,
  5186. // active: row.active,
  5187. createBy: this.$store.state.user.name,
  5188. updateBy: this.$store.state.user.name,
  5189. }
  5190. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== '') {
  5191. this.modalData.cQualityEngineer4Name = row.cQualityEngineer4.split('-')[1] // 截取用户名
  5192. }
  5193. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== '') {
  5194. this.modalData.cQualityEngineer5Name = row.cQualityEngineer5.split('-')[1] // 截取用户名
  5195. }
  5196. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== '') {
  5197. this.modalData.cQualityEngineer6Name = row.cQualityEngineer6.split('-')[1] // 截取用户名
  5198. }
  5199. if (row.docEngineer != null && row.docEngineer !== '') {
  5200. this.modalData.docEngineerName = row.docEngineer.split('-')[1] // 截取用户名
  5201. }
  5202. if (row.docEngineer2 != null && row.docEngineer2 !== '') {
  5203. this.modalData.docEngineer2Name = row.docEngineer2.split('-')[1] // 截取用户名
  5204. }
  5205. if (row.ipqcHardTag != null && row.ipqcHardTag !== '') {
  5206. this.modalData.ipqcHardTagName = row.ipqcHardTag.split('-')[1] // 截取用户名
  5207. }
  5208. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== '') {
  5209. this.modalData.cQualityEngineer7Name = row.cQualityEngineer7.split('-')[1] // 截取用户名
  5210. }
  5211. if (row.qcEngineer != null && row.qcEngineer !== '') {
  5212. this.modalData.qcEngineerName = this.splitUserDisplayName(row.qcEngineer)
  5213. }
  5214. if (row.peEngineer != null && row.peEngineer !== '') {
  5215. this.modalData.peEngineerName = this.splitUserDisplayName(row.peEngineer)
  5216. }
  5217. if (row.eeEngineer != null && row.eeEngineer !== '') {
  5218. this.modalData.eeEngineerName = this.splitUserDisplayName(row.eeEngineer)
  5219. }
  5220. if (row.status === '已量产') {
  5221. this.modalData.status = '进行中'
  5222. this.modalData.closeDate = ''
  5223. this.$confirm(`是否确认撤销该项目?`, '提示', {
  5224. confirmButtonText: '确定',
  5225. cancelButtonText: '取消',
  5226. type: 'warning'
  5227. }).then(() => {
  5228. eamProjectPartInfoCancelEdit(this.modalData).then(({data}) => {
  5229. if (data && (data.code === 0 || data.code === '0')) {
  5230. EventBus.$emit('updateProjectInfo')
  5231. this.getDataList()
  5232. this.$message({
  5233. message: '操作成功',
  5234. type: 'success',
  5235. duration: 1500,
  5236. onClose: () => {
  5237. }
  5238. })
  5239. } else {
  5240. this.$alert(data.msg, '错误', {
  5241. confirmButtonText: '确定'
  5242. })
  5243. }
  5244. })
  5245. }).catch(() => {
  5246. })
  5247. }
  5248. },
  5249. getRowProjectInfo(){
  5250. this.$nextTick(() => {
  5251. let inData = {
  5252. site: this.proofingCurrentRow.site,
  5253. projectId: this.proofingCurrentRow.projectId,
  5254. projectNo: this.proofingCurrentRow.projectNo,
  5255. projectDesc: this.proofingCurrentRow.projectDesc,
  5256. projectPartId: this.proofingCurrentRow.projectPartId,
  5257. testPartNo: this.proofingCurrentRow.testPartNo,
  5258. partDesc: this.proofingCurrentRow.partDesc,
  5259. projectManager: this.proofingCurrentRow.projectManager,
  5260. projectOwner: this.proofingCurrentRow.projectOwner,
  5261. engineer: this.proofingCurrentRow.engineer,
  5262. cQualityEngineer1: this.proofingCurrentRow.cQualityEngineer1,
  5263. cQualityEngineer2: this.proofingCurrentRow.cQualityEngineer2,
  5264. cQualityEngineer3: this.proofingCurrentRow.cQualityEngineer3,
  5265. cQualityEngineer4: this.proofingCurrentRow.cQualityEngineer4,
  5266. cQualityEngineer5: this.proofingCurrentRow.cQualityEngineer5,
  5267. cQualityEngineer6: this.proofingCurrentRow.cQualityEngineer6,
  5268. cManufactureEngineer: this.proofingCurrentRow.cManufactureEngineer,
  5269. docEngineer: this.proofingCurrentRow.docEngineer,
  5270. docEngineer2: this.proofingCurrentRow.docEngineer2,
  5271. ipqcHardTag: this.proofingCurrentRow.ipqcHardTag,
  5272. cQualityEngineer7: this.proofingCurrentRow.cQualityEngineer7,
  5273. qcEngineer: this.proofingCurrentRow.qcEngineer,
  5274. peEngineer: this.proofingCurrentRow.peEngineer,
  5275. eeEngineer: this.proofingCurrentRow.eeEngineer,
  5276. sqemeEngineer: this.proofingCurrentRow.sqemeEngineer,
  5277. sqeeeEngineer: this.proofingCurrentRow.sqeeeEngineer,
  5278. // username:this.$store.state.user.name,
  5279. page: 1,
  5280. limit: 1000
  5281. }
  5282. this.$refs.proofRecordModal.init(inData, this.authUpdate)
  5283. });
  5284. },
  5285. showProofDetailModal(row) {
  5286. this.activeModalTab = 'proofRecord'
  5287. this.projectProofRecordList = []
  5288. // 保存当前行数据
  5289. this.proofingCurrentRow = JSON.parse(JSON.stringify(row));
  5290. // 打开模态框
  5291. this.dialogVisible = true;
  5292. // 模态框打开后刷新 proofRecord 组件的数据
  5293. this.$nextTick(() => {
  5294. let inData={
  5295. site: this.proofingCurrentRow.site,
  5296. projectId: this.proofingCurrentRow.projectId,
  5297. projectNo: this.proofingCurrentRow.projectNo,
  5298. projectDesc: this.proofingCurrentRow.projectDesc,
  5299. projectPartId: this.proofingCurrentRow.projectPartId,
  5300. testPartNo: this.proofingCurrentRow.testPartNo,
  5301. partDesc: this.proofingCurrentRow.partDesc,
  5302. projectManager: this.proofingCurrentRow.projectManager,
  5303. projectOwner: this.proofingCurrentRow.projectOwner,
  5304. engineer: this.proofingCurrentRow.engineer,
  5305. cQualityEngineer1: this.proofingCurrentRow.cQualityEngineer1,
  5306. cQualityEngineer2: this.proofingCurrentRow.cQualityEngineer2,
  5307. cQualityEngineer3: this.proofingCurrentRow.cQualityEngineer3,
  5308. cQualityEngineer4: this.proofingCurrentRow.cQualityEngineer4,
  5309. cQualityEngineer5: this.proofingCurrentRow.cQualityEngineer5,
  5310. cQualityEngineer6: this.proofingCurrentRow.cQualityEngineer6,
  5311. cManufactureEngineer: this.proofingCurrentRow.cManufactureEngineer,
  5312. docEngineer: this.proofingCurrentRow.docEngineer,
  5313. docEngineer2: this.proofingCurrentRow.docEngineer2,
  5314. ipqcHardTag: this.proofingCurrentRow.ipqcHardTag,
  5315. cQualityEngineer7: this.proofingCurrentRow.cQualityEngineer7,
  5316. qcEngineer: this.proofingCurrentRow.qcEngineer,
  5317. peEngineer: this.proofingCurrentRow.peEngineer,
  5318. eeEngineer: this.proofingCurrentRow.eeEngineer,
  5319. sqemeEngineer: this.proofingCurrentRow.sqemeEngineer,
  5320. sqeeeEngineer: this.proofingCurrentRow.sqeeeEngineer,
  5321. // username:this.$store.state.user.name,
  5322. page: 1,
  5323. limit: 1000
  5324. }
  5325. // 调用模态框内 proofRecord 组件的 init 方法刷新数据
  5326. this.$refs.proofRecordModal.init(inData,this.authUpdate);
  5327. });
  5328. },
  5329. getFinalPartDesc(){
  5330. return new Promise((resolve, reject) => {
  5331. let inData = {
  5332. site: this.modalData.site,
  5333. buNo: this.modalData.bu.split('_')[1],
  5334. finalPartNo: this.modalData.finalPartNo,
  5335. }
  5336. getFinalPartDesc(inData).then(({data}) => {
  5337. if (data && data.code === 0) {
  5338. if (data.data !== null) {
  5339. this.modalData.finalPartDesc = data.data.finalPartDesc
  5340. this.finalPartFlag = false
  5341. } else {
  5342. this.modalData.finalPartDesc = ''
  5343. this.finalPartFlag = true
  5344. }
  5345. } else {
  5346. this.modalData.finalPartDesc = ''
  5347. }
  5348. resolve(); // 在操作成功时解析Promise
  5349. }).catch(error => {
  5350. this.modalData.finalPartDesc = '';
  5351. reject(error); // 如果发生错误,拒绝Promise
  5352. });
  5353. });
  5354. },
  5355. async saveFormalPartNo() {
  5356. try {
  5357. await this.getFinalPartDesc();
  5358. } catch (error) {
  5359. // 处理getFinalPartDesc方法中的错误
  5360. console.error("Error in getFinalPartDesc:", error);
  5361. this.$message({
  5362. message: '获取料号描述时发生错误,请重试',
  5363. type: 'error'
  5364. });
  5365. }
  5366. if (this.modalData.finalPartNo === '' || this.modalData.finalPartNo === null || this.modalData.finalPartNo === undefined) {
  5367. this.$message({
  5368. message: '请输入ERP正式料号',
  5369. type: 'warning'
  5370. })
  5371. return
  5372. }
  5373. if (this.finalPartFlag) {
  5374. this.$confirm('ERP正式料号不存在,是否继续保存?', '提示', {
  5375. confirmButtonText: '确定',
  5376. cancelButtonText: '取消',
  5377. type: 'warning'
  5378. }).then(() => {
  5379. saveFormalPartNo(this.modalData).then(({data}) => {
  5380. if (data && data.code === '0') {
  5381. this.getDataList()
  5382. this.formalPartNoFlag = false
  5383. this.$message({
  5384. message: '操作成功',
  5385. type: 'success',
  5386. duration: 1500,
  5387. onClose: () => {
  5388. }
  5389. })
  5390. } else {
  5391. this.$alert(data.msg, '错误', {
  5392. confirmButtonText: '确定'
  5393. })
  5394. }
  5395. })
  5396. }).catch(() => {
  5397. this.$message({
  5398. type: 'info',
  5399. message: '已取消操作'
  5400. })
  5401. })
  5402. } else {
  5403. saveFormalPartNo(this.modalData).then(({data}) => {
  5404. if (data && data.code === '0') {
  5405. this.getDataList()
  5406. this.formalPartNoFlag = false
  5407. this.$message({
  5408. message: '操作成功',
  5409. type: 'success',
  5410. duration: 1500,
  5411. onClose: () => {
  5412. }
  5413. })
  5414. } else {
  5415. this.$alert(data.msg, '错误', {
  5416. confirmButtonText: '确定'
  5417. })
  5418. }
  5419. })
  5420. }
  5421. },
  5422. selectFlag () {
  5423. return true
  5424. },
  5425. closeClear () {
  5426. this.modalData.bu = ''
  5427. this.modalData.projectNo = ''
  5428. this.modalData.projectDesc = ''
  5429. this.modalData.projectCloseDate = ''
  5430. this.modalData.needDate = ''
  5431. this.modalData.customerNo = ''
  5432. this.modalData.customerDesc = ''
  5433. this.modalData.projectCategory = ''
  5434. this.modalData.testPartNo = ''
  5435. this.modalData.partDesc = ''
  5436. this.modalData.projectManager = ''
  5437. this.modalData.projectManagerName = ''
  5438. this.modalData.engineer = ''
  5439. this.modalData.engineerName = ''
  5440. this.modalData.cQualityEngineer1 = ''
  5441. this.modalData.cQualityEngineer1Name = ''
  5442. this.modalData.cQualityEngineer2 = ''
  5443. this.modalData.cQualityEngineer2Name = ''
  5444. this.modalData.projectCreationDate = new Date()
  5445. },
  5446. projectOtherDocumentClickRow (row) {
  5447. row.id = row.documentDefinitionListId
  5448. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5449. },
  5450. changeCurrentRow1 (row, oldRow) {
  5451. row.id = row.documentDefinitionListId
  5452. // 判断是否是获取焦点的事件
  5453. if (row) {
  5454. this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo
  5455. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5456. }
  5457. },
  5458. projectAllDocumentClickRow (row) {
  5459. row.id = row.documentDefinitionListId
  5460. this.projectAllDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5461. },
  5462. /**
  5463. * 上传文件
  5464. */
  5465. uploadFile () {
  5466. this.isEditable = false;
  5467. this.fileList = []
  5468. this.proofingCurrentRow.proofingId= -1
  5469. this.proofingCurrentRow.proofingNo = '*'
  5470. this.uploadDialog = true
  5471. },
  5472. /**
  5473. * 上传文件
  5474. */
  5475. uploadAllDocumentFile (row) {
  5476. this.isEditable = false;
  5477. this.fileList = []
  5478. if (row.proofingId === -1 || row.proofingId === '-1' || row.proofingId === null || row.proofingId === undefined || row.proofingId === '') {
  5479. this.isMassProductionStage = true
  5480. this.folder = 'projectPMPDocumentFiles'
  5481. } else {
  5482. this.isMassProductionStage = false
  5483. this.folder = 'projectPPDocumentFiles'
  5484. }
  5485. this.getProofDocument(row)
  5486. this.uploadDialog1 = true
  5487. //打开组件 去做新增业务
  5488. // this.$nextTick(() => {
  5489. // this.$refs.partUploadFile.init(currentData);
  5490. // })
  5491. },
  5492. getProofDocument(row){
  5493. let inData = {}
  5494. if (row){
  5495. inData = {
  5496. site: this.resolveCurrentPartSite(row.site || this.proofingCurrentRow.site),
  5497. buNo: this.proofingCurrentRow.buNo,
  5498. projectId: row.projectId,
  5499. projectPartId: this.proofingCurrentRow.projectPartId,
  5500. proofingId: row.proofingId,
  5501. userId: this.$store.state.user.id,
  5502. languageCode: this.$i18n.locale
  5503. }
  5504. } else {
  5505. inData = {
  5506. site: this.proofingCurrentRow.site,
  5507. buNo: this.proofingCurrentRow.buNo,
  5508. projectId: this.proofingCurrentRow.projectId,
  5509. projectNo: this.proofingCurrentRow.projectNo,
  5510. projectDesc: this.proofingCurrentRow.projectDesc,
  5511. projectPartId: this.proofingCurrentRow.projectPartId,
  5512. testPartNo: this.proofingCurrentRow.testPartNo,
  5513. partDesc: this.proofingCurrentRow.partDesc,
  5514. customerId: this.proofingCurrentRow.customerNo,
  5515. customerDesc: this.proofingCurrentRow.customerDesc,
  5516. page: 1,
  5517. limit: 1000
  5518. }
  5519. }
  5520. getProofDocument(inData).then(({data}) => {
  5521. if (row){
  5522. if (data && data.code === 0) {
  5523. this.projectPartDocumentList = data.page.list
  5524. for (let i = 0; i < this.projectPartDocumentList.length; i++) {
  5525. if (this.projectPartDocumentList[i].responsibleDepartment === 'PM/Sales'){
  5526. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  5527. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'PjM'){
  5528. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  5529. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'Engineer'){
  5530. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  5531. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit'){
  5532. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  5533. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Converting'){
  5534. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  5535. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'FQC1'){
  5536. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  5537. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'MFQ'){
  5538. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  5539. }else if (this.projectPartDocumentList[i].responsibleDepartment === 'SQE') {
  5540. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  5541. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  5542. }
  5543. }
  5544. else if (this.projectPartDocumentList[i].responsibleDepartment === 'FQC2') {
  5545. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  5546. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  5547. }
  5548. }
  5549. else if (this.projectPartDocumentList[i].responsibleDepartment === 'IQC') {
  5550. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  5551. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  5552. }
  5553. }
  5554. else if(this.projectPartDocumentList[i].responsibleDepartment === 'DocEngineer'){
  5555. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== ''){
  5556. this.projectPartDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  5557. }
  5558. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'DocEngineer2'){
  5559. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== ''){
  5560. this.projectPartDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  5561. }
  5562. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  5563. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  5564. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  5565. }
  5566. } else if (this.projectPartDocumentList[i].responsibleDepartment === '前道工程师') {
  5567. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  5568. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  5569. }
  5570. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'QC' || this.projectPartDocumentList[i].responsibleDepartment === 'RQC') {
  5571. if (this.proofingCurrentRow.qcEngineer != null && this.proofingCurrentRow.qcEngineer !== '') {
  5572. this.projectPartDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.qcEngineer)
  5573. }
  5574. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'PE' || this.projectPartDocumentList[i].responsibleDepartment === 'RPE') {
  5575. if (this.proofingCurrentRow.peEngineer != null && this.proofingCurrentRow.peEngineer !== '') {
  5576. this.projectPartDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.peEngineer)
  5577. }
  5578. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'EE' || this.projectPartDocumentList[i].responsibleDepartment === 'REE') {
  5579. if (this.proofingCurrentRow.eeEngineer != null && this.proofingCurrentRow.eeEngineer !== '') {
  5580. this.projectPartDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.eeEngineer)
  5581. }
  5582. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'SQE-ME' || this.projectPartDocumentList[i].responsibleDepartment === 'RSQEME') {
  5583. const sqeMe = this.proofingCurrentRow.sqemeEngineer
  5584. if (sqeMe != null && sqeMe !== '') {
  5585. this.projectPartDocumentList[i].projectLeader = this.splitUserDisplayName(sqeMe)
  5586. }
  5587. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'SQE-EE' || this.projectPartDocumentList[i].responsibleDepartment === 'RSQEEE') {
  5588. const sqeEe = this.proofingCurrentRow.sqeeeEngineer
  5589. if (sqeEe != null && sqeEe !== '') {
  5590. this.projectPartDocumentList[i].projectLeader = this.splitUserDisplayName(sqeEe)
  5591. }
  5592. }
  5593. else {
  5594. this.projectPartDocumentList[i].projectLeader = ''
  5595. }
  5596. this.projectPartDocumentList[i].buNo = inData.buNo
  5597. }
  5598. }
  5599. } else {
  5600. if (data && data.code === 0) {
  5601. this.proofDocumentList = data.page.list
  5602. for (let i = 0; i < this.proofDocumentList.length; i++) {
  5603. this.proofDocumentList[i].buNo = this.proofingCurrentRow.buNo
  5604. }
  5605. } else {
  5606. this.proofDocumentList = []
  5607. }
  5608. }
  5609. })
  5610. },
  5611. uploadOtherDocument () {
  5612. this.isEditable = true;
  5613. this.fileList = []
  5614. this.otherDocumentCurrentRow = {
  5615. proofingId: -1,
  5616. documentTypeId: '', // 清空文档类型ID
  5617. id: '-1'
  5618. };
  5619. this.uploadDialog = true
  5620. //打开组件 去做新增业务
  5621. // this.$nextTick(() => {
  5622. // this.$refs.partUploadFile.init(currentData);
  5623. // })
  5624. },
  5625. massProductionDocumentDelete(row) {
  5626. let tempData = {
  5627. site: row.site,
  5628. username: this.$store.state.user.name,
  5629. buNo: row.buNo,
  5630. proofingId: row.proofingId,
  5631. proofingNo: row.proofingNo,
  5632. projectId: row.projectId,
  5633. projectNo: row.projectNo,
  5634. projectDesc: row.projectDesc,
  5635. customerId: row.customerNo,
  5636. customerDesc: row.customerDesc,
  5637. projectPartId: this.proofingCurrentRow.projectPartId,
  5638. testPartNo: this.proofingCurrentRow.testPartNo,
  5639. partDesc: row.partDesc,
  5640. id: row.id,
  5641. fileName: row.fileName,
  5642. uploadedFlag: row.uploadedFlag,
  5643. cAdditionalInfo: row.cAdditionalInfo,
  5644. createBy: row.createdBy,
  5645. documentDefinitionListId: row.documentDefinitionListId,
  5646. documentType: row.documentType,
  5647. documentId: row.documentId,
  5648. }
  5649. let name = '转量产阶段'
  5650. if (row.proofingId !== -1) {
  5651. name = '打样'
  5652. }
  5653. this.$confirm('是否删除该' + name +'文档的文件?', '提示', {
  5654. confirmButtonText: '确定',
  5655. cancelButtonText: '取消',
  5656. type: 'warning'
  5657. }).then(() => {
  5658. deleteProofDocument(tempData).then(({data}) => {
  5659. if (data && data.code === 0) {
  5660. this.$message({
  5661. message: '删除成功',
  5662. type: 'success'
  5663. })
  5664. //刷新表格
  5665. this.refreshCurrentTabTable()
  5666. }
  5667. // 否则提示后端返回的错误信息
  5668. else {
  5669. this.$alert(data.msg, '错误', {
  5670. confirmButtonText: '确定'
  5671. })
  5672. }
  5673. })
  5674. }).catch(() => {
  5675. this.$message({
  5676. type: 'info',
  5677. message: '已取消删除'
  5678. });
  5679. });
  5680. },
  5681. getProjectOtherDocument () {
  5682. const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
  5683. let tempData = {
  5684. site: currentSite,
  5685. username: this.$store.state.user.name,
  5686. buNo: this.proofingCurrentRow.buNo,
  5687. proofingId: -1,
  5688. projectId: this.proofingCurrentRow.projectId,
  5689. projectNo: this.proofingCurrentRow.projectNo,
  5690. projectDesc: this.proofingCurrentRow.projectDesc,
  5691. projectPartId: this.proofingCurrentRow.projectPartId,
  5692. testPartNo: this.proofingCurrentRow.testPartNo,
  5693. partDesc: this.proofingCurrentRow.partDesc,
  5694. customerId: this.proofingCurrentRow.customerNo,
  5695. customerDesc: this.proofingCurrentRow.customerDesc,
  5696. page: 1,
  5697. limit: -1
  5698. }
  5699. getProjectOtherDocument(tempData).then(({data}) => {
  5700. if (data && data.code === 0) {
  5701. this.projectOtherDocumentList = data.page.list
  5702. this.proofDocumentListDefinition = []
  5703. // 遍历proofDocumentList
  5704. for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
  5705. this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
  5706. if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
  5707. this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
  5708. }
  5709. if (this.projectOtherDocumentList[i].responsibleDepartment === 'PM/Sales') {
  5710. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  5711. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'PjM') {
  5712. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  5713. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'Engineer') {
  5714. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  5715. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit') {
  5716. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  5717. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Converting') {
  5718. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  5719. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'FQC1') {
  5720. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  5721. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'MFQ') {
  5722. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  5723. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'SQE') {
  5724. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  5725. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  5726. }
  5727. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'FQC2') {
  5728. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  5729. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  5730. }
  5731. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IQC') {
  5732. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  5733. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  5734. }
  5735. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'DocEngineer') {
  5736. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== '') {
  5737. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  5738. }
  5739. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'DocEngineer2') {
  5740. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== '') {
  5741. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  5742. }
  5743. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  5744. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  5745. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  5746. }
  5747. } else if (this.projectOtherDocumentList[i].responsibleDepartment === '前道工程师') {
  5748. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  5749. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  5750. }
  5751. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'QC' || this.projectOtherDocumentList[i].responsibleDepartment === 'RQC') {
  5752. if (this.proofingCurrentRow.qcEngineer != null && this.proofingCurrentRow.qcEngineer !== '') {
  5753. this.projectOtherDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.qcEngineer)
  5754. }
  5755. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'PE' || this.projectOtherDocumentList[i].responsibleDepartment === 'RPE') {
  5756. if (this.proofingCurrentRow.peEngineer != null && this.proofingCurrentRow.peEngineer !== '') {
  5757. this.projectOtherDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.peEngineer)
  5758. }
  5759. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'EE' || this.projectOtherDocumentList[i].responsibleDepartment === 'REE') {
  5760. if (this.proofingCurrentRow.eeEngineer != null && this.proofingCurrentRow.eeEngineer !== '') {
  5761. this.projectOtherDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.eeEngineer)
  5762. }
  5763. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'SQE-ME' || this.projectOtherDocumentList[i].responsibleDepartment === 'RSQEME') {
  5764. const sqeMe = this.proofingCurrentRow.sqemeEngineer
  5765. if (sqeMe != null && sqeMe !== '') {
  5766. this.projectOtherDocumentList[i].projectLeader = this.splitUserDisplayName(sqeMe)
  5767. }
  5768. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'SQE-EE' || this.projectOtherDocumentList[i].responsibleDepartment === 'RSQEEE') {
  5769. const sqeEe = this.proofingCurrentRow.sqeeeEngineer
  5770. if (sqeEe != null && sqeEe !== '') {
  5771. this.projectOtherDocumentList[i].projectLeader = this.splitUserDisplayName(sqeEe)
  5772. }
  5773. }
  5774. else {
  5775. this.projectOtherDocumentList[i].projectLeader = ''
  5776. }
  5777. }
  5778. } else {
  5779. this.projectOtherDocumentList = []
  5780. }
  5781. })
  5782. },
  5783. getColumnValue(row, column) {
  5784. // 根据列的配置信息决定显示的值
  5785. if (column.columnProp === 'documentType') {
  5786. return this.getCombinedDocumentType(row);
  5787. }
  5788. else if (column.columnProp === 'documentDesc') {
  5789. return row.documentDesc; // 或者根据实际需求处理其他字段的显示
  5790. }
  5791. else {
  5792. return row[column.columnProp]; // 默认返回对应列的值
  5793. }
  5794. },
  5795. getCombinedDocumentType(row) {
  5796. // 根据您的需求,组合或拼接需要显示的字段
  5797. if (row.documentType === null || row.documentType === undefined) {
  5798. return row.documentDesc
  5799. }else {
  5800. return row.documentType
  5801. }
  5802. },
  5803. // 动态列开始 获取 用户保存的 格式列
  5804. async getTableUserColumn(tableId, columnId) {
  5805. let queryTableUser = {
  5806. userId: this.$store.state.user.name,
  5807. functionId: this.$route.meta.menuId,
  5808. tableId: tableId,
  5809. status: true,
  5810. languageCode: this.$i18n.locale
  5811. }
  5812. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  5813. if (data.rows.length > 0) {
  5814. //this.columnList1 = []
  5815. switch (columnId) {
  5816. case 1:
  5817. this.columnList = data.rows
  5818. this.refreshMainTableLayout()
  5819. break;
  5820. // case 2:
  5821. // this.detailColumnList = data.rows
  5822. // break;
  5823. // case 3:
  5824. // this.columnList2 = data.rows
  5825. // break;
  5826. // case 4:
  5827. // this.columnList3 = data.rows
  5828. // break;
  5829. }
  5830. } else {
  5831. this.getColumnList(tableId, columnId)
  5832. }
  5833. })
  5834. },
  5835. projectDocumentList () {
  5836. const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
  5837. this.modalData = {
  5838. site: currentSite,
  5839. buNo: this.proofingCurrentRow.buNo,
  5840. projectId: this.proofingCurrentRow.projectId,
  5841. projectNo: this.proofingCurrentRow.projectNo,
  5842. projectDesc: this.proofingCurrentRow.projectDesc,
  5843. customerNo: this.proofingCurrentRow.customerNo,
  5844. customerDesc: this.proofingCurrentRow.customerDesc,
  5845. bu: currentSite + '_' + this.proofingCurrentRow.buNo,
  5846. testPartNo: this.proofingCurrentRow.testPartNo,
  5847. partDesc: this.proofingCurrentRow.partDesc,
  5848. projectCategory: this.proofingCurrentRow.projectCategory,
  5849. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  5850. proofingNo: '*',
  5851. proofingId: -1,
  5852. rrequiredDeliveryDate: '',
  5853. createDate: new Date(),
  5854. createBy: this.$store.state.user.name,
  5855. limit: 1000,
  5856. page: 1
  5857. }
  5858. this.searchProjectDocumentTypeData.site = currentSite
  5859. this.getProjectOtherDocument()
  5860. this.projectDocumentListVisible = true
  5861. },
  5862. projectDocumentListVisibleFalse() {
  5863. this.projectDocumentListVisible = false
  5864. this.proofDocumentListDefinition = []
  5865. },
  5866. deleteProjectDocumentType(row) {
  5867. this.$confirm('是否删除该文档清单?', '提示', {
  5868. confirmButtonText: '确定',
  5869. cancelButtonText: '取消',
  5870. type: 'warning'
  5871. }).then(() => {
  5872. deleteDocumentType(row).then(({data}) => {
  5873. if (data && data.code === 0) {
  5874. this.$message({
  5875. message: '删除成功',
  5876. type: 'success',
  5877. })
  5878. this.getProjectOtherDocument()
  5879. this.getProofDocument()
  5880. } else {
  5881. this.$alert(data.msg, '错误', {
  5882. confirmButtonText: '确定'
  5883. })
  5884. }
  5885. })
  5886. }).catch(() => {
  5887. this.$message({
  5888. type: 'info',
  5889. message: '已取消删除'
  5890. });
  5891. });
  5892. },
  5893. closeAddProjectDocumentTypeFlag() {
  5894. this.addProjectDocumentTypeFlag = false
  5895. const currentSite = this.resolveCurrentPartSite(this.modalData.site)
  5896. this.searchProjectDocumentTypeData = {
  5897. site: currentSite,
  5898. projectNo: '',
  5899. proofingNo: '*',
  5900. documentTypeId: '',
  5901. documentType: '',
  5902. responsibleDepartment: '',
  5903. estimatedCompletionDays: '',
  5904. page: 1,
  5905. limit: 1000
  5906. }
  5907. this.extraProjectDocumentList = []
  5908. },
  5909. filteredProjectAllDocumentList() {
  5910. this.projectAllDocumentList.map(item => {
  5911. item.id = item.documentDefinitionListId
  5912. })
  5913. return this.projectAllDocumentList.filter(item => item.uploadedFlag !== 'N')
  5914. },
  5915. searchProjectDocumentTypeList() {
  5916. this.searchProjectDocumentTypeData.site = this.resolveCurrentPartSite(this.modalData.site || this.proofingCurrentRow.site)
  5917. this.searchProjectDocumentTypeData.proofingNo = '*'
  5918. this.searchProjectDocumentTypeData.projectNo = this.modalData.projectNo
  5919. getExtraDocumentList(this.searchProjectDocumentTypeData).then(({data}) => {
  5920. if (data && data.code === 0) {
  5921. this.extraProjectDocumentList = data.page.list
  5922. } else {
  5923. this.extraProjectDocumentList = []
  5924. }
  5925. })
  5926. },
  5927. selectionProjectDocument(val) {
  5928. this.projectDocumentSelection = val
  5929. },
  5930. selectionCopyDocument(val) {
  5931. this.documentCopySelection = val;
  5932. },
  5933. saveSelectionProjectDocumentType() {
  5934. const currentSite = this.resolveCurrentPartSite(this.modalData.site || this.proofingCurrentRow.site)
  5935. if (this.projectDocumentSelection.length === 0) {
  5936. this.$message({
  5937. message: '请选择文档类型',
  5938. type: 'error'
  5939. })
  5940. this.extraProjectDocumentList = []
  5941. return
  5942. }
  5943. this.projectDocumentSelection.forEach((item) => {
  5944. const inData = {
  5945. site: currentSite,
  5946. proofingId: -1,
  5947. proofingNo: '*',
  5948. projectId: this.proofingCurrentRow.projectId,
  5949. projectNo: this.modalData.projectNo,
  5950. projectPartId: this.proofingCurrentRow.projectPartId,
  5951. testPartNo: this.modalData.testPartNo,
  5952. documentTypeId: item.documentTypeId,
  5953. documentType: item.documentType,
  5954. responsibleDepartment: item.responsibleDepartment,
  5955. estimatedCompletionDays: item.estimatedCompletionDays,
  5956. createBy: this.$store.state.user.name,
  5957. }
  5958. proofingDocumentNEW(inData).then(({data}) => {
  5959. //区分请求成功和失败的状况
  5960. if (data && data.code === 0) {
  5961. this.$message({
  5962. message: '新增成功',
  5963. type: 'success'
  5964. })
  5965. this.addProjectDocumentTypeFlag = false
  5966. //刷新表格
  5967. this.refreshCurrentTabTable()
  5968. } else {
  5969. this.$message({
  5970. message: '新增失败',
  5971. type: 'error'
  5972. })
  5973. }
  5974. })
  5975. })
  5976. },
  5977. searchProjectAllDocumentList () {
  5978. const currentSite = this.resolveCurrentPartSite(this.proofingCurrentRow.site)
  5979. let inData = {
  5980. site: currentSite,
  5981. username: this.$store.state.user.name,
  5982. buNo: this.proofingCurrentRow.buNo,
  5983. proofingId: -999,
  5984. projectId: this.proofingCurrentRow.projectId,
  5985. projectNo: this.proofingCurrentRow.projectNo,
  5986. projectDesc: this.proofingCurrentRow.projectDesc,
  5987. projectPartId: this.proofingCurrentRow.projectPartId,
  5988. testPartNo: this.proofingCurrentRow.testPartNo,
  5989. partDesc: this.proofingCurrentRow.partDesc,
  5990. customerId: this.proofingCurrentRow.customerNo,
  5991. customerDesc: this.proofingCurrentRow.customerDesc,
  5992. page: 1,
  5993. limit: 1000
  5994. }
  5995. searchProjectAllDocument(inData).then(({data}) => {
  5996. if (data && data.code === 0){
  5997. this.projectAllDocumentList = data.page.list;
  5998. for (let i = 0; i < this.projectAllDocumentList.length; i++) {
  5999. if (this.projectAllDocumentList[i].responsibleDepartment === 'PM/Sales'){
  6000. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  6001. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'PjM'){
  6002. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  6003. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'Engineer'){
  6004. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  6005. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit'){
  6006. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  6007. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Converting'){
  6008. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  6009. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'FQC1'){
  6010. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  6011. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'MFQ'){
  6012. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  6013. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'SQE') {
  6014. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  6015. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  6016. }
  6017. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'FQC2') {
  6018. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  6019. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  6020. }
  6021. }
  6022. else if (this.projectAllDocumentList[i].responsibleDepartment === 'IQC') {
  6023. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  6024. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  6025. }
  6026. }
  6027. else if (this.projectAllDocumentList[i].responsibleDepartment === 'DocEngineer'){
  6028. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== ''){
  6029. this.projectAllDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  6030. }
  6031. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'DocEngineer2'){
  6032. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== ''){
  6033. this.projectAllDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  6034. }
  6035. }
  6036. else if (this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  6037. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  6038. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  6039. }
  6040. } else if (this.projectAllDocumentList[i].responsibleDepartment === '前道工程师') {
  6041. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  6042. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  6043. }
  6044. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'QC' || this.projectAllDocumentList[i].responsibleDepartment === 'RQC') {
  6045. if (this.proofingCurrentRow.qcEngineer != null && this.proofingCurrentRow.qcEngineer !== '') {
  6046. this.projectAllDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.qcEngineer)
  6047. }
  6048. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'PE' || this.projectAllDocumentList[i].responsibleDepartment === 'RPE') {
  6049. if (this.proofingCurrentRow.peEngineer != null && this.proofingCurrentRow.peEngineer !== '') {
  6050. this.projectAllDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.peEngineer)
  6051. }
  6052. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'EE' || this.projectAllDocumentList[i].responsibleDepartment === 'REE') {
  6053. if (this.proofingCurrentRow.eeEngineer != null && this.proofingCurrentRow.eeEngineer !== '') {
  6054. this.projectAllDocumentList[i].projectLeader = this.splitUserDisplayName(this.proofingCurrentRow.eeEngineer)
  6055. }
  6056. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'SQE-ME' || this.projectAllDocumentList[i].responsibleDepartment === 'RSQEME') {
  6057. const sqeMe = this.proofingCurrentRow.sqemeEngineer
  6058. if (sqeMe != null && sqeMe !== '') {
  6059. this.projectAllDocumentList[i].projectLeader = this.splitUserDisplayName(sqeMe)
  6060. }
  6061. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'SQE-EE' || this.projectAllDocumentList[i].responsibleDepartment === 'RSQEEE') {
  6062. const sqeEe = this.proofingCurrentRow.sqeeeEngineer
  6063. if (sqeEe != null && sqeEe !== '') {
  6064. this.projectAllDocumentList[i].projectLeader = this.splitUserDisplayName(sqeEe)
  6065. }
  6066. } else {
  6067. this.projectAllDocumentList[i].projectLeader = ''
  6068. }
  6069. }
  6070. }
  6071. })
  6072. },
  6073. projectProductionValidationDocument () {
  6074. this.modalData = {
  6075. site: this.proofingCurrentRow.site,
  6076. buNo: this.proofingCurrentRow.buNo,
  6077. projectId: this.proofingCurrentRow.projectId,
  6078. projectNo: this.proofingCurrentRow.projectNo,
  6079. projectDesc: this.proofingCurrentRow.projectDesc,
  6080. customerNo: this.proofingCurrentRow.customerNo,
  6081. customerDesc: this.proofingCurrentRow.customerDesc,
  6082. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  6083. testPartNo: this.proofingCurrentRow.testPartNo,
  6084. partDesc: this.proofingCurrentRow.partDesc,
  6085. projectCategory: this.proofingCurrentRow.projectCategory,
  6086. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  6087. proofingNo: 'ALL',
  6088. requiredDeliveryDate: '',
  6089. // new Date() GMT+8
  6090. wantedConfirmDate: new Date(),
  6091. createDate: new Date(),
  6092. createBy: this.$store.state.user.name,
  6093. limit: 1000,
  6094. page: 1
  6095. }
  6096. this.projectProductionValidationDocumentVisible = true
  6097. this.projectAllDocumentList1 = this.filteredProjectAllDocumentList()
  6098. },
  6099. handleDocumentSelectionChange(val) {
  6100. // 文档选择页签中选中数据发生变化时的处理
  6101. val.forEach(item => {
  6102. item.projectId = this.proofingCurrentRow.projectId
  6103. item.projectPartId = this.proofingCurrentRow.projectPartId
  6104. item.testPartNo = this.proofingCurrentRow.testPartNo
  6105. })
  6106. this.selectedDocumentItems = val;
  6107. },
  6108. searchConfirmatorList() {
  6109. let inData = {
  6110. site: this.proofingCurrentRow.site,
  6111. buNo: this.proofingCurrentRow.buNo,
  6112. username: this.confirmatoryData.username,
  6113. userDisplay: this.confirmatoryData.userDisplay,
  6114. proofingNo: 'ALL',
  6115. projectId: this.proofingCurrentRow.projectId,
  6116. projectNo: this.proofingCurrentRow.projectNo,
  6117. projectDesc: this.proofingCurrentRow.projectDesc,
  6118. testPartNo: this.proofingCurrentRow.testPartNo,
  6119. partDesc: this.proofingCurrentRow.partDesc,
  6120. customerId: this.proofingCurrentRow.customerNo,
  6121. customerDesc: this.proofingCurrentRow.customerDesc,
  6122. page: 1,
  6123. limit: 1000
  6124. }
  6125. searchConfirmatorList(inData).then(({data}) => {
  6126. if (data && data.code === 0){
  6127. this.projectAllDocumentConfirmatorList = data.page.list;
  6128. this.projectANotDocumentConfirmatorList = data.list;
  6129. }
  6130. })
  6131. },
  6132. //可选人员
  6133. confirmatoryClickRow1(row) {
  6134. this.$refs.confirmatoryTable1.toggleRowSelection(row);
  6135. },
  6136. //已选人员
  6137. confirmatoryClickRow2(row) {
  6138. this.$refs.confirmatoryTable2.toggleRowSelection(row);
  6139. },
  6140. selectionConfirmatory1(val) {
  6141. this.confirmatorySelection1 = val
  6142. },
  6143. selectionConfirmatory2(val) {
  6144. this.confirmatorySelection2 = val
  6145. },
  6146. addConfirmatory() {
  6147. if (this.confirmatorySelection1.length === 0) {
  6148. this.$message.warning('请选择可选用户!')
  6149. return
  6150. }
  6151. let inData = {
  6152. site: this.proofingCurrentRow.site,
  6153. buNo: this.proofingCurrentRow.buNo,
  6154. confirmatoryList: this.confirmatorySelection1,
  6155. createBy: this.$store.state.user.name
  6156. }
  6157. addConfirmatory(inData).then(({data}) => {
  6158. if (data && data.code === 0) {
  6159. this.searchConfirmatorList()
  6160. this.businessRoleSelections1 = []
  6161. } else {
  6162. this.$alert(data.msg, '错误', {
  6163. confirmButtonText: '确定'
  6164. })
  6165. }
  6166. })
  6167. },
  6168. deleteConfirmatory() {
  6169. if (this.confirmatorySelection2.length === 0) {
  6170. this.$message.warning('请选择已选用户!')
  6171. return
  6172. }
  6173. let inData = {
  6174. site: this.proofingCurrentRow.site,
  6175. buNo: this.proofingCurrentRow.buNo,
  6176. confirmatoryList: this.confirmatorySelection2,
  6177. createBy: this.$store.state.user.name
  6178. }
  6179. deleteConfirmatory(inData).then(({data}) => {
  6180. if (data && data.code === 0) {
  6181. this.searchConfirmatorList()
  6182. this.businessRoleSelections2 = []
  6183. } else {
  6184. this.$alert(data.msg, '错误', {
  6185. confirmButtonText: '确定'
  6186. })
  6187. }
  6188. })
  6189. },
  6190. saveProductionValidationDocument() {
  6191. if (this.selectedDocumentItems.length === 0) {
  6192. this.$message({
  6193. message: '请选择文档',
  6194. type: 'warning',
  6195. duration: 2000
  6196. })
  6197. return
  6198. }else {
  6199. this.$confirm('是否确认新增生产文档并向确认人员推送信息?', '提示', {
  6200. confirmButtonText: '确定',
  6201. cancelButtonText: '取消',
  6202. type: 'warning'
  6203. }).then(() => {
  6204. this.projectAllDocumentConfirmatorList.map(item => {
  6205. item.site = this.proofingCurrentRow.site;
  6206. item.projectId = this.proofingCurrentRow.projectId;
  6207. item.projectNo = this.proofingCurrentRow.projectNo;
  6208. item.orderRef1 = this.proofingCurrentRow.projectId;
  6209. item.orderRef2 = this.proofingCurrentRow.projectPartId;
  6210. item.projectPartId = this.proofingCurrentRow.projectPartId;
  6211. item.testPartNo = this.proofingCurrentRow.testPartNo;
  6212. item.partDesc = this.proofingCurrentRow.partDesc;
  6213. item.itemNo = this.projectAllDocumentConfirmatorList.indexOf(item) + 1;
  6214. item.wantedConfirmDate = new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000);
  6215. item.createBy = this.$store.state.user.name;
  6216. item.selectedDocumentItems = this.selectedDocumentItems;
  6217. })
  6218. checkProductionValidationDocument(this.projectAllDocumentConfirmatorList)
  6219. .then(({ data }) => {
  6220. if (data) {
  6221. this.$confirm('该项目已存在生产确认记录或已经有人员进行了确认,是否删除重新推送确认信息?', '提示', {
  6222. confirmButtonText: '是',
  6223. cancelButtonText: '否',
  6224. type: 'warning'
  6225. }).then(() => {
  6226. deleteAndSaveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
  6227. if (data && data.code === 0) {
  6228. this.$message({
  6229. message: '操作成功',
  6230. type: 'success'
  6231. })
  6232. this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
  6233. this.projectProductionValidationDocumentVisible = false
  6234. } else {
  6235. this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
  6236. confirmButtonText: '确定'
  6237. })
  6238. }
  6239. })
  6240. }).catch(() => {
  6241. this.$message({
  6242. type: 'info',
  6243. message: '已取消操作'
  6244. });
  6245. });
  6246. } else {
  6247. saveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
  6248. if (data && data.code === 0) {
  6249. this.$message({
  6250. message: '操作成功',
  6251. type: 'success'
  6252. })
  6253. this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
  6254. this.projectProductionValidationDocumentVisible = false
  6255. } else {
  6256. this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
  6257. confirmButtonText: '确定'
  6258. })
  6259. }
  6260. })
  6261. }
  6262. });
  6263. }).catch(() => {
  6264. this.$message({
  6265. type: 'info',
  6266. message: '已取消操作'
  6267. });
  6268. });
  6269. }
  6270. },
  6271. getConfirmProgressDocumentList() {
  6272. let inData = {
  6273. site: this.proofingCurrentRow.site,
  6274. orderRef1: this.proofingCurrentRow.projectId,
  6275. orderRef2: this.proofingCurrentRow.projectPartId,
  6276. page: 1,
  6277. limit: 1000
  6278. }
  6279. searchConfirmProgressDocumentList(inData).then(({data}) => {
  6280. if (data && data.code === 0){
  6281. this.confirmProgressDocumentList = data.page.list;
  6282. }
  6283. })
  6284. },
  6285. getConfirmProgressPusherList() {
  6286. return new Promise((resolve, reject) => {
  6287. let inData = {
  6288. site: this.proofingCurrentRow.site,
  6289. orderRef1: this.proofingCurrentRow.projectId,
  6290. orderRef2: this.proofingCurrentRow.projectPartId,
  6291. page: 1,
  6292. limit: 1000
  6293. };
  6294. searchConfirmProgressPusherList(inData).then(({ data }) => {
  6295. if (data && data.code === 0) {
  6296. this.confirmProgressPusherList = data.page.list;
  6297. resolve(); // 成功时调用 resolve
  6298. } else {
  6299. reject(new Error(data.msg)); // 处理错误
  6300. }
  6301. }).catch(error => {
  6302. reject(error); // 处理请求错误
  6303. });
  6304. });
  6305. } ,
  6306. confirmDocument(row) {
  6307. // 将this.$store.state.user.id转为字符串
  6308. let userId = this.$store.state.user.id.toString()
  6309. if (row.userid !== userId) {
  6310. // 提示指定确认人为row.confirmedBy,是否继续
  6311. this.$confirm('指定确认人为' + row.userDisplay + ',是否继续确认?', '提示', {
  6312. confirmButtonText: '是',
  6313. cancelButtonText: '否',
  6314. type: 'warning'
  6315. })
  6316. .then(() => {
  6317. this.confirmData = {
  6318. site: row.site,
  6319. documentType: row.documentType,
  6320. orderRef1: row.orderRef1,
  6321. orderRef2: row.orderRef2,
  6322. itemNo: row.itemNo,
  6323. userid: row.userid,
  6324. username: row.username,
  6325. userDisplay: row.userDisplay,
  6326. wantedConfirmDate: row.wantedConfirmDate,
  6327. confirmFlag: row.confirmFlag,
  6328. confirmedDate: new Date(),
  6329. createBy: row.createBy,
  6330. createDate: row.createDate,
  6331. confirmedBy: this.$store.state.user.userDisplay,
  6332. documentId: row.documentId,
  6333. remark: row.remark
  6334. }
  6335. this.modalData = {
  6336. site: this.proofingCurrentRow.site,
  6337. projectId: this.proofingCurrentRow.projectId,
  6338. projectNo: this.proofingCurrentRow.projectNo,
  6339. projectDesc: this.proofingCurrentRow.projectDesc,
  6340. projectPartId: this.proofingCurrentRow.projectPartId,
  6341. testPartNo: this.proofingCurrentRow.testPartNo,
  6342. partDesc: this.proofingCurrentRow.partDesc,
  6343. customerNo: this.proofingCurrentRow.customerNo,
  6344. customerDesc: this.proofingCurrentRow.customerDesc,
  6345. buNo: this.proofingCurrentRow.buNo,
  6346. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  6347. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  6348. }
  6349. this.getProjectConfirmatorFileList(row)
  6350. this.confirmVisible = true
  6351. })
  6352. .catch(() => {
  6353. this.$message({
  6354. type: 'info',
  6355. message: '已取消操作'
  6356. });
  6357. });
  6358. }else {
  6359. this.confirmData = {
  6360. site: row.site,
  6361. documentType: row.documentType,
  6362. orderRef1: row.orderRef1,
  6363. orderRef2: row.orderRef2,
  6364. itemNo: row.itemNo,
  6365. userid: row.userid,
  6366. username: row.username,
  6367. userDisplay: row.userDisplay,
  6368. wantedConfirmDate: row.wantedConfirmDate,
  6369. confirmFlag: row.confirmFlag,
  6370. confirmedDate: new Date(),
  6371. createBy: row.createBy,
  6372. createDate: row.createDate,
  6373. confirmedBy: this.$store.state.user.name,
  6374. documentId: row.documentId,
  6375. remark: row.remark
  6376. }
  6377. this.modalData = {
  6378. site: this.proofingCurrentRow.site,
  6379. projectId: this.proofingCurrentRow.projectId,
  6380. projectNo: this.proofingCurrentRow.projectNo,
  6381. projectDesc: this.proofingCurrentRow.projectDesc,
  6382. projectPartId: this.proofingCurrentRow.projectPartId,
  6383. testPartNo: this.proofingCurrentRow.testPartNo,
  6384. partDesc: this.proofingCurrentRow.partDesc,
  6385. customerNo: this.proofingCurrentRow.customerNo,
  6386. customerDesc: this.proofingCurrentRow.customerDesc,
  6387. buNo: this.proofingCurrentRow.buNo,
  6388. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  6389. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  6390. }
  6391. this.getProjectConfirmatorFileList(row)
  6392. this.confirmVisible = true
  6393. }
  6394. },
  6395. /*选择上传文件时*/
  6396. onChange(file,fileList){
  6397. const newFileName = file.name;
  6398. if (this.fileName) {
  6399. this.fileName += ', ' + newFileName;
  6400. } else {
  6401. this.fileName = newFileName;
  6402. }
  6403. this.fileList.push(file);
  6404. },
  6405. triggerUpload() {
  6406. this.$refs.uploadFile.$el.querySelector('input').click()
  6407. },
  6408. saveUploadFile(){
  6409. this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
  6410. this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
  6411. updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
  6412. if (data.code === 0) {
  6413. this.confirmVisible = false;
  6414. this.getConfirmProgressDocumentList();
  6415. this.getConfirmProgressPusherList().then(() => {
  6416. // 判断 confirmProgressPusherList 中的 confirmFlag 是否全部为 Y
  6417. let flag = true;
  6418. for (let i = 0; i < this.confirmProgressPusherList.length; i++) {
  6419. if (this.confirmProgressPusherList[i].confirmFlag !== 'Y') {
  6420. flag = false;
  6421. break;
  6422. }
  6423. }
  6424. if (flag) {
  6425. this.proofingCurrentRow.status = '正式量产';
  6426. eamProjectPartInfoEdit(this.proofingCurrentRow).then(({ data }) => {
  6427. this.dataList.forEach((item) => {
  6428. if (item.projectPartId === this.proofingCurrentRow.projectPartId) {
  6429. this.dataListIndex = this.dataList.indexOf(item)
  6430. }
  6431. })
  6432. this.getDataList();
  6433. if (data.code !== 0) {
  6434. this.$alert(data.msg, '错误', {
  6435. confirmButtonText: '确定'
  6436. });
  6437. }
  6438. });
  6439. }
  6440. }).catch(error => {
  6441. this.$alert('获取确认进度推送列表失败', '错误', {
  6442. confirmButtonText: '确定'
  6443. });
  6444. });
  6445. EventBus.$emit('updateAgencyMatterForConfirm')
  6446. }else {
  6447. this.$alert(data.msg, '错误', {
  6448. confirmButtonText: '确定'
  6449. })
  6450. }
  6451. })
  6452. let remark = this.confirmData.remark;
  6453. const formData = new FormData();
  6454. //片接文件
  6455. if (this.fileList.length >0) {
  6456. for (let i = 0; i < this.fileList.length; i++) {
  6457. formData.append("file",this.fileList[i].raw)
  6458. }
  6459. formData.append("folder", 'projectPDConfirmFiles');
  6460. formData.append("orderRef1", this.confirmData.site);
  6461. formData.append("orderRef4", this.confirmData.orderRef1);
  6462. formData.append("orderRef2", this.confirmData.itemNo);
  6463. formData.append("orderRef3", this.confirmData.userid);
  6464. formData.append("orderRef5", this.confirmData.orderRef2);
  6465. formData.append("createdBy", this.$store.state.user.name);
  6466. formData.append("updatedBy", this.$store.state.user.name);
  6467. formData.append("remark", remark);
  6468. uploadProjectFile(formData).then(({data}) => {
  6469. if (data.code === 0) {
  6470. this.$message.success('操作成功');
  6471. //清空文件上传记录
  6472. this.$refs.uploadFile.clearFiles();
  6473. this.closeFileUpdate();
  6474. this.projectConfirmatorFileList = [];
  6475. }else {
  6476. this.$alert(data.msg, '错误', {
  6477. confirmButtonText: '确定'
  6478. })
  6479. }
  6480. })
  6481. } else {
  6482. this.$message.success('操作成功');
  6483. }
  6484. },
  6485. closeFileUpdate() {
  6486. this.fileName = '';
  6487. this.uploadDialog = false;
  6488. //this.fileRemark = ''
  6489. this.$refs.uploadFile.clearFiles()
  6490. this.fileList = []
  6491. },
  6492. getProjectConfirmatorFileList (row) {
  6493. let inData = {
  6494. orderRef1: row.site,
  6495. orderRef3: row.userid,
  6496. orderRef2: row.itemNo,
  6497. orderRef4: row.orderRef1,
  6498. orderRef5: row.orderRef2,
  6499. page: 1,
  6500. limit: 1000
  6501. }
  6502. searchProjectConfirmatorFileList(inData).then(({data}) => {
  6503. if (data && data.code === 0){
  6504. this.projectConfirmatorFileList = data.page.list;
  6505. }
  6506. })
  6507. },
  6508. closeUploadFileVisible(){
  6509. this.confirmVisible = false;
  6510. this.projectConfirmatorFileList = [];
  6511. this.fileList = [];
  6512. this.closeFileUpdate()
  6513. },
  6514. closeViewDocumentFileVisible(){
  6515. this.viewDocumentFileVisible = false;
  6516. this.projectConfirmatorFileList = [];
  6517. },
  6518. closeViewMassDocumentFileVisible(){
  6519. this.viewMassDocumentFileVisible = false;
  6520. this.projectConfirmatorFileList = [];
  6521. },
  6522. viewDocumentFile(row) {
  6523. this.confirmData = {
  6524. site: row.site,
  6525. documentType: row.documentType,
  6526. orderRef1: row.orderRef1,
  6527. orderRef2: row.orderRef2,
  6528. itemNo: row.itemNo,
  6529. userid: row.userid,
  6530. username: row.username,
  6531. userDisplay: row.userDisplay,
  6532. wantedConfirmDate: row.wantedConfirmDate,
  6533. confirmFlag: row.confirmFlag,
  6534. confirmedDate: new Date(),
  6535. createBy: row.createBy,
  6536. createDate: row.createDate,
  6537. confirmedBy: this.$store.state.user.userDisplay,
  6538. documentId: row.documentId,
  6539. remark: row.remark
  6540. }
  6541. let inData = {
  6542. orderRef1: row.site,
  6543. orderRef2: row.itemNo,
  6544. orderRef3: row.userid,
  6545. orderRef4: row.orderRef1,
  6546. orderRef5: row.orderRef2,
  6547. id : row.documentId,
  6548. page: 1,
  6549. limit: 1000
  6550. }
  6551. searchProjectConfirmatorFileList(inData).then(({data}) => {
  6552. if (data && data.code === 0){
  6553. this.projectConfirmatorFileList = data.page.list;
  6554. }
  6555. })
  6556. this.viewDocumentFileVisible = true
  6557. },
  6558. async viewMassDocumentFile(row,flag) {
  6559. let inData = {
  6560. orderRef1: row.site,
  6561. orderRef2: row.proofingId,
  6562. orderRef3: row.documentDefinitionListId,
  6563. orderRef4: row.projectId,
  6564. orderRef5: this.proofingCurrentRow.projectPartId,
  6565. createdBy: row.createdBy,
  6566. id : row.documentId,
  6567. documentType: row.documentType,
  6568. fileName: row.fileName,
  6569. page: 1,
  6570. limit: 1000
  6571. }
  6572. await searchProjectConfirmatorFileList(inData).then(({data}) => {
  6573. if (data && data.code === 0){
  6574. this.projectConfirmatorFileList = data.page.list;
  6575. }
  6576. })
  6577. if (flag){
  6578. return
  6579. }
  6580. this.viewMassDocumentFileVisible = true
  6581. },
  6582. deleteFile(row) {
  6583. if (this.confirmData.confirmedBy === this.$store.state.user.userDisplay) {
  6584. this.$confirm('是否删除该文件?', '提示', {
  6585. confirmButtonText: '确定',
  6586. cancelButtonText: '取消',
  6587. type: 'warning'
  6588. }).then(() => {
  6589. let inData = {
  6590. id: row.id,
  6591. orderRef1: row.orderRef1,
  6592. orderRef2: row.orderRef2,
  6593. orderRef3: row.orderRef3,
  6594. orderRef4: row.orderRef4,
  6595. orderRef5: row.orderRef5,
  6596. createdBy: this.$store.state.user.name
  6597. }
  6598. deleteProjectFile(inData).then(({data}) => {
  6599. if (data && data.code === 0) {
  6600. this.$message({
  6601. message: '删除成功',
  6602. type: 'success'
  6603. })
  6604. this.getProjectConfirmatorFileList(this.confirmData)
  6605. } else {
  6606. this.$message({
  6607. message: '删除失败',
  6608. type: 'error'
  6609. })
  6610. }
  6611. })
  6612. }).catch(() => {
  6613. this.$message({
  6614. type: 'info',
  6615. message: '已取消删除'
  6616. });
  6617. });
  6618. } else {
  6619. this.$message({
  6620. message: '只有确认人员才能删除文件',
  6621. type: 'error'
  6622. })
  6623. }
  6624. },
  6625. shouldShowDelete(row) {
  6626. // 根据条件判断是否显示删除操作
  6627. if (row.projectPhase === 'SOP文档') {
  6628. return false
  6629. }else return row.documentId !== null;
  6630. },
  6631. // 查看文件
  6632. viewFile(row) {
  6633. // 预览文件
  6634. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  6635. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  6636. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  6637. let txt = ['txt']
  6638. let type = ''
  6639. let pdf = ['pdf']
  6640. if (image.includes(row.fileType.toLowerCase())) {
  6641. type = 'image/' + row.fileType
  6642. downLoadObjectFile2(row).then(({data}) => {
  6643. const blob = new Blob([data], { type: type });
  6644. // 创建URL来生成预览
  6645. const fileURL = URL.createObjectURL(blob);
  6646. // 在新标签页中打开文件预览
  6647. const newTab = window.open(fileURL, '_blank')
  6648. })
  6649. }
  6650. else if (video.includes(row.fileType.toLowerCase())) {
  6651. type = 'video/' + row.fileType
  6652. downLoadObjectFile2(row).then(({data}) => {
  6653. const blob = new Blob([data], { type: type });
  6654. // 创建URL来生成预览
  6655. const fileURL = URL.createObjectURL(blob);
  6656. // 在新标签页中打开文件预览
  6657. const newTab = window.open(fileURL, '_blank')
  6658. })
  6659. }
  6660. else if (txt.includes(row.fileType.toLowerCase())) {
  6661. type = 'text/plain'
  6662. downLoadObjectFile2(row).then(({data}) => {
  6663. const blob = new Blob([data], { type: type });
  6664. // 创建URL来生成预览
  6665. const fileURL = URL.createObjectURL(blob);
  6666. // 在新标签页中打开文件预览
  6667. const newTab = window.open(fileURL, '_blank')
  6668. })
  6669. }
  6670. else if (office.includes(row.fileType.toLowerCase())) {
  6671. if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx') {
  6672. type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  6673. } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx') {
  6674. type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
  6675. } else {
  6676. type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  6677. }
  6678. downLoadObjectFile2(row).then(({data}) => {
  6679. // 不限制文件下载类型
  6680. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  6681. // 下载文件名称
  6682. const fileName = row.fileName
  6683. // a标签下载
  6684. const linkNode = document.createElement('a')
  6685. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  6686. linkNode.style.display = 'none'
  6687. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  6688. document.body.appendChild(linkNode)
  6689. linkNode.click() // 模拟在按钮上的一次鼠标单击
  6690. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  6691. document.body.removeChild(linkNode)
  6692. })
  6693. }
  6694. else if (pdf.includes(row.fileType.toLowerCase())) {
  6695. type = 'application/pdf'
  6696. downLoadObjectFile2(row).then(({data}) => {
  6697. const blob = new Blob([data], { type: type });
  6698. // 创建URL来生成预览
  6699. const fileURL = URL.createObjectURL(blob);
  6700. // 在新标签页中打开文件预览
  6701. const newTab = window.open(fileURL, '_blank')
  6702. })
  6703. }
  6704. else {
  6705. this.$message({
  6706. message: '不支持的文件类型',
  6707. type: 'warning'
  6708. })
  6709. }
  6710. },
  6711. // 下载
  6712. downloadFile (row) {
  6713. downLoadObjectFile2(row)
  6714. .then(({data}) => {
  6715. // 不限制文件下载类型
  6716. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  6717. // 下载文件名称
  6718. const fileName = row.fileName
  6719. // a标签下载
  6720. const linkNode = document.createElement('a')
  6721. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  6722. linkNode.style.display = 'none'
  6723. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  6724. document.body.appendChild(linkNode)
  6725. linkNode.click() // 模拟在按钮上的一次鼠标单击
  6726. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  6727. document.body.removeChild(linkNode)
  6728. })
  6729. },
  6730. closeProjectProductionValidationDocumentVisibleDialog() {
  6731. this.confirmatoryData = {};
  6732. this.projectAllDocumentConfirmatorList = [];
  6733. this.projectANotDocumentConfirmatorList = [];
  6734. this.projectProductionValidationDocumentVisible = false;
  6735. this.activeName1 = 'selectDocument';
  6736. },
  6737. formatProofingDate (value) {
  6738. if (value === '' || value === null || value === undefined) {
  6739. return ''
  6740. }
  6741. const date = moment(value)
  6742. if (!date.isValid()) {
  6743. return ''
  6744. }
  6745. return date.format('YYYY-MM-DD')
  6746. },
  6747. formatDate(row, column) {
  6748. // row 是当前行的数据对象
  6749. // column 是当前列的属性信息对象
  6750. const date = row[column.property];
  6751. if (date) {
  6752. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  6753. return s.replace(/\//g, '-')
  6754. } else {
  6755. return '';
  6756. }
  6757. },
  6758. indexMethod(index) {
  6759. return index + 1;
  6760. },
  6761. // 获取 tableDefault 列
  6762. async getColumnList (tableId, columnId) {
  6763. let queryTable= {
  6764. functionId: this.$route.meta.menuId,
  6765. tableId: tableId,
  6766. languageCode: this.$i18n.locale
  6767. }
  6768. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  6769. if (!data.rows.length == 0) {
  6770. switch (columnId) {
  6771. case 1:
  6772. this.columnList = data.rows
  6773. this.refreshMainTableLayout()
  6774. break;
  6775. // case 2:
  6776. // this.detailColumnList = data.rows
  6777. // break;
  6778. // case 3:
  6779. // this.columnList2 = data.rows
  6780. // break;
  6781. // case 4:
  6782. // this.columnList3 = data.rows
  6783. // break;
  6784. }
  6785. } else {
  6786. // this.showDefault = true.
  6787. }
  6788. })
  6789. },
  6790. async fetchBomList() {
  6791. let inData = {
  6792. site: this.proofingCurrentRow.site,
  6793. buNo: this.proofingCurrentRow.buNo,
  6794. projectId: this.proofingCurrentRow.projectId,
  6795. projectNo: this.proofingCurrentRow.projectNo,
  6796. projectDesc: this.proofingCurrentRow.projectDesc,
  6797. projectPartId: this.proofingCurrentRow.projectPartId,
  6798. testPartNo: this.proofingCurrentRow.testPartNo,
  6799. partDesc: this.proofingCurrentRow.partDesc,
  6800. page: 1,
  6801. limit: 1000
  6802. }
  6803. return searchMassProductionBomList(inData).then(({data}) => {
  6804. if (data && data.code === 0){
  6805. return data.list
  6806. }
  6807. })
  6808. },
  6809. fetchRoutingList() {
  6810. let inData = {
  6811. site: this.proofingCurrentRow.site,
  6812. buNo: this.proofingCurrentRow.buNo,
  6813. projectId: this.proofingCurrentRow.projectId,
  6814. projectNo: this.proofingCurrentRow.projectNo,
  6815. projectDesc: this.proofingCurrentRow.projectDesc,
  6816. projectPartId: this.proofingCurrentRow.projectPartId,
  6817. testPartNo: this.proofingCurrentRow.testPartNo,
  6818. partNo:this.proofingCurrentRow.finalPartNo,
  6819. partDesc: this.proofingCurrentRow.partDesc,
  6820. page: 1,
  6821. limit: 1000
  6822. }
  6823. searchRoutingList(inData).then(({data}) => {
  6824. if (data && data.code === 0){
  6825. this.dataListLoading = false;
  6826. this.projectPartRoutingList = data.list
  6827. }
  6828. })
  6829. },
  6830. // 项目打样记录页存的是“账号-姓名”,列表只展示姓名;空值不能直接 split,否则整表渲染中断。
  6831. fillProofRecordPersonName (item) {
  6832. const nameFields = [
  6833. ['projectManager', 'projectManagerName'],
  6834. ['projectOwner', 'projectOwnerName'],
  6835. ['engineer', 'engineerName'],
  6836. ['cQualityEngineer1', 'cQualityEngineer1Name'],
  6837. ['cQualityEngineer2', 'cQualityEngineer2Name'],
  6838. ['cQualityEngineer3', 'cQualityEngineer3Name'],
  6839. ['cManufactureEngineer', 'cManufactureEngineerName'],
  6840. ['cQualityEngineer4', 'cQualityEngineer4Name'],
  6841. ['cQualityEngineer5', 'cQualityEngineer5Name'],
  6842. ['cQualityEngineer6', 'cQualityEngineer6Name'],
  6843. ['docEngineer', 'docEngineerName'],
  6844. ['docEngineer2', 'docEngineer2Name'],
  6845. ['ipqcHardTag', 'ipqcHardTagName'],
  6846. ['cQualityEngineer7', 'cQualityEngineer7Name']
  6847. ]
  6848. nameFields.forEach(([source, target]) => {
  6849. const value = item[source]
  6850. if (value === null || value === undefined || value === '') {
  6851. item[target] = ''
  6852. return
  6853. }
  6854. const parts = String(value).split('-')
  6855. item[target] = parts.length > 1 ? parts[1] : String(value)
  6856. })
  6857. },
  6858. // 详情弹窗绑定的是当前项目物料,打样记录必须按该物料的项目料号收口,避免带出其他料号。
  6859. fetchProjectProofRecordList () {
  6860. const testPartNo = this.proofingCurrentRow && this.proofingCurrentRow.testPartNo
  6861. ? String(this.proofingCurrentRow.testPartNo).trim()
  6862. : ''
  6863. if (!testPartNo) {
  6864. this.projectProofRecordList = []
  6865. return
  6866. }
  6867. this.dataListLoading = true
  6868. const inData = {
  6869. site: this.proofingCurrentRow.site,
  6870. username: this.$store.state.user.name,
  6871. testPartNo: testPartNo,
  6872. page: 1,
  6873. limit: 1000
  6874. }
  6875. searchAllProofing(inData).then(({data}) => {
  6876. // 切走页签后丢弃旧响应,避免慢请求把其他页签的加载状态和列表覆盖掉。
  6877. if (this.activeModalTab !== 'projectProofRecord') {
  6878. return
  6879. }
  6880. this.dataListLoading = false
  6881. if (data && data.code === 0 && data.page) {
  6882. // 打样查询接口按料号模糊匹配,详情页只保留与当前项目料号完全一致的记录。
  6883. const list = (data.page.list || []).filter(item => String(item.testPartNo || '').trim() === testPartNo)
  6884. list.forEach(item => this.fillProofRecordPersonName(item))
  6885. this.projectProofRecordList = list
  6886. } else {
  6887. this.projectProofRecordList = []
  6888. this.$message.error((data && data.msg) || '项目打样记录查询失败')
  6889. }
  6890. }).catch(() => {
  6891. if (this.activeModalTab !== 'projectProofRecord') {
  6892. return
  6893. }
  6894. this.dataListLoading = false
  6895. this.projectProofRecordList = []
  6896. })
  6897. },
  6898. copyFile (row) {
  6899. this.copyModalData = {
  6900. ...row,
  6901. projectNo: this.proofingCurrentRow.projectNo,
  6902. projectDesc: this.proofingCurrentRow.projectDesc,
  6903. projectPartId: this.proofingCurrentRow.projectPartId,
  6904. testPartNo: this.proofingCurrentRow.testPartNo,
  6905. partDesc: this.proofingCurrentRow.partDesc,
  6906. };
  6907. this.copyDialog = true
  6908. },
  6909. searchCopyDocumentFileList() {
  6910. getCopyDocumentFileList(this.copyModalData).then(({data}) => {
  6911. if (data && data.code === 0) {
  6912. this.copyDocumentList = data.list
  6913. } else {
  6914. this.copyDocumentList = []
  6915. }
  6916. })
  6917. },
  6918. saveSelectionCopyDocumentType() {
  6919. const currentSite = this.resolveCurrentPartSite(this.copyModalData.site || this.proofingCurrentRow.site)
  6920. if (this.documentCopySelection.length === 0) {
  6921. this.$message({
  6922. message: '请选择文档',
  6923. type: 'error'
  6924. })
  6925. return
  6926. }
  6927. if (this.copyModalData.proofingNo === '*'){
  6928. this.copyModalData.conclusion = 'N/A'
  6929. }
  6930. if (this.copyModalData.conclusion === '' || this.copyModalData.conclusion === null ||
  6931. this.copyModalData.conclusion === undefined) {
  6932. this.$message({
  6933. message: '结论不能为空',
  6934. type: 'warning'
  6935. })
  6936. return
  6937. }
  6938. const inDataList = this.documentCopySelection.map(item => ({
  6939. ossId: item.ossId,
  6940. orderRef1: currentSite,
  6941. orderRef2: this.copyModalData.proofingId.toString(),
  6942. orderRef3: this.copyModalData.documentDefinitionListId,
  6943. orderRef4: this.copyModalData.projectId.toString(),
  6944. orderRef5: this.copyModalData.projectPartId.toString(),
  6945. documentDesc: this.copyModalData.documentTypeId,
  6946. cAdditionalInfo: this.copyModalData.documentType,
  6947. conclusion: this.copyModalData.conclusion,
  6948. createBy: this.$store.state.user.name,
  6949. folder: (this.copyModalData.proofingId === -1)
  6950. ? 'projectPMPDocumentFiles'
  6951. : 'projectPPDocumentFiles'
  6952. }));
  6953. uploadFileList('/upload/testList',inDataList).then(({data}) => {
  6954. //区分请求成功和失败的状况
  6955. if (data && data.code === 0) {
  6956. this.$message({
  6957. message: '复制成功',
  6958. type: 'success'
  6959. })
  6960. this.getProofDocument()
  6961. this.copyDialog = false
  6962. //刷新表格
  6963. this.refreshCurrentTabTable()
  6964. } else {
  6965. this.$message({
  6966. message: '复制失败',
  6967. type: 'error'
  6968. })
  6969. }
  6970. })
  6971. },
  6972. closeCopyDocumentFileFlag() {
  6973. this.copyDialog = false
  6974. this.copyModalData = {}
  6975. this.copyDocumentList = []
  6976. },
  6977. // 列表表格选择替换
  6978. tabClick (tab, event) {
  6979. // 刷新列表数据
  6980. this.refreshCurrentTabTable()
  6981. },
  6982. async refreshCurrentTabTable () {
  6983. if (this.activeModalTab === 'proofRecord') {
  6984. this.getRowProjectInfo();
  6985. }
  6986. if (this.activeModalTab === 'massProductionStage') {
  6987. this.getProjectOtherDocument();
  6988. }
  6989. if (this.activeModalTab === 'allDocument') {
  6990. this.getRowProjectInfo();
  6991. this.getProjectOtherDocument();
  6992. this.searchProjectAllDocumentList()
  6993. this.searchConfirmatorList()
  6994. }
  6995. if (this.activeModalTab === 'productionDocumentsConfirmProgress') {
  6996. this.getConfirmProgressDocumentList()
  6997. this.getConfirmProgressPusherList()
  6998. }
  6999. if (this.activeModalTab === 'massProductionBOM' && this.proofingCurrentRow.finalPartNo
  7000. !== '' &&
  7001. this.proofingCurrentRow.finalPartNo !== null){
  7002. this.dataListLoading = true;
  7003. try {
  7004. // 从后端获取数据
  7005. const flatData = await this.fetchBomList();
  7006. // 将平铺数据转换为树形结构
  7007. this.projectPartBomList = arrayToTreeByLevelCode(flatData, "levelCode", "children");
  7008. // 打印结果
  7009. console.log(JSON.stringify(this.projectPartBomList, null, 2));
  7010. } finally {
  7011. this.dataListLoading = false;
  7012. }
  7013. } else {
  7014. this.projectPartBomList = []
  7015. }
  7016. if (this.activeModalTab === 'Routing' &&
  7017. this.proofingCurrentRow.finalPartNo !== '' &&
  7018. this.proofingCurrentRow.finalPartNo !== null){
  7019. this.dataListLoading = true;
  7020. this.fetchRoutingList()
  7021. } else {
  7022. this.projectPartRoutingList = []
  7023. }
  7024. if (this.activeModalTab === 'projectProofRecord') {
  7025. this.fetchProjectProofRecordList()
  7026. } else {
  7027. this.projectProofRecordList = []
  7028. }
  7029. },
  7030. //获取按钮的权限数据
  7031. getButtonAuthData () {
  7032. let searchFlag = this.isAuth(this.menuId+":search")
  7033. let saveFlag = this.isAuth(this.menuId+":save")
  7034. let updateFlag = this.isAuth(this.menuId+":update")
  7035. let deleteFlag = this.isAuth(this.menuId+":delete")
  7036. //处理页面的权限数据
  7037. this.authSearch = !searchFlag
  7038. this.authSave = !saveFlag
  7039. this.authUpdate = !updateFlag
  7040. this.authDelete = !deleteFlag
  7041. },
  7042. warnSendMail(row) {
  7043. row.projectPartId = this.proofingCurrentRow.projectPartId
  7044. row.testPartNo = this.proofingCurrentRow.testPartNo
  7045. row.partDesc = this.proofingCurrentRow.partDesc
  7046. row.needDate = this.proofingCurrentRow.needDate
  7047. this.$confirm('确认发送提醒?', '提示', {
  7048. confirmButtonText: '确定',
  7049. cancelButtonText: '取消',
  7050. type: 'warning'
  7051. }).then(() => {
  7052. warnSendMailHandle(row).then(({data}) => {
  7053. if (data && data.code === 0) {
  7054. this.$message({
  7055. message: '发送成功',
  7056. type: 'success'
  7057. })
  7058. } else {
  7059. this.$alert(data.msg, '错误', {
  7060. confirmButtonText: '确定'
  7061. })
  7062. }
  7063. })
  7064. }).catch(() => {
  7065. this.$message({
  7066. type: 'info',
  7067. message: '已取消发送'
  7068. });
  7069. });
  7070. },
  7071. confirmatorSendMailHandle(inData) {
  7072. confirmatorSendMailHandle(inData).then(({data}) => {
  7073. if (data && data.code === 0) {
  7074. this.$message({
  7075. message: '发送成功',
  7076. type: 'success'
  7077. })
  7078. } else {
  7079. this.$alert(data.msg, '错误', {
  7080. confirmButtonText: '确定'
  7081. })
  7082. }
  7083. })
  7084. },
  7085. tableRowClassName ({row, rowIndex}) {
  7086. if (row.status === '正式量产') {
  7087. return 'row-production'
  7088. } else if (row.uploadedFlag === 'Y') {
  7089. return 'row-production2'
  7090. }
  7091. return ''
  7092. },
  7093. getCellStyle({ row, column, rowIndex, columnIndex }) {
  7094. // 检查当前列是否是 "partType"
  7095. if (column.property === 'partType') {
  7096. return {
  7097. backgroundColor: row.partType === 'Active' ? 'rgb(141, 255, 115)' : 'rgb(188, 204, 194)',
  7098. };
  7099. }
  7100. return {};
  7101. },
  7102. }
  7103. }
  7104. </script>
  7105. <style>
  7106. .row-production {
  7107. background-color: rgb(185, 244, 250) !important;
  7108. }
  7109. .row-production2 {
  7110. background-color: rgb(253, 240, 225) !important;
  7111. }
  7112. .el-tabs__nav {
  7113. margin-left: 0 !important;
  7114. }
  7115. .red-text /deep/ .el-input__inner {
  7116. color: red;
  7117. }
  7118. /deep/ .left-section {
  7119. flex: 1; /* 左边部分占据剩余空间 */
  7120. margin-right: 10px; /* 右边与左边之间的间隔 */
  7121. margin-left: -10px; /* 左边与父元素之间的间隔 */
  7122. }
  7123. /deep/ .right-section {
  7124. width: 66%; /* 右边部分宽度占满剩余空间 */
  7125. margin-right: 5px;
  7126. }
  7127. /deep/ .custom-upload .el-upload-dragger {
  7128. width: 150px;
  7129. height: 150px;
  7130. text-align: center;
  7131. position: relative;
  7132. overflow: hidden;
  7133. /* 添加其他样式 */
  7134. }
  7135. /deep/ .table-container {
  7136. border: 1px solid #e0e0e0;
  7137. border-radius: 4px;
  7138. padding: 10px;
  7139. margin-bottom: 10px;
  7140. }
  7141. .big-label {
  7142. font-size: medium; /* 调整字号 */
  7143. }
  7144. </style>
  7145. <style lang="scss" scoped>
  7146. .el-table /deep/ .cell{
  7147. height: auto;
  7148. line-height: 1.5;
  7149. }
  7150. </style>
  7151. ```