plm前端
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.

4212 lines
144 KiB

​
​
​
2 years ago
​
​
3 years ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
10 months ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
3 years ago
​
​
​
2 years ago
​
3 years ago
​
2 years ago
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
8 months ago
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
2 years ago
​
3 years ago
​
​
2 years ago
​
3 years ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
1 year ago
​
​
​
2 years ago
2 years ago
2 years ago
​
​
2 years ago
​
​
​
​
​
2 years ago
​
2 years ago
​
2 years ago
​
2 years ago
2 years ago
2 years ago
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
2 years ago
3 years ago
​
​
2 years ago
2 years ago
​
2 years ago
3 years ago
2 years ago
3 years ago
​
2 years ago
​
2 years ago
3 years ago
​
​
​
2 years ago
​
2 years ago
​
​
​
1 year ago
​
​
1 year ago
​
​
2 years ago
​
​
​
​
​
​
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
​
2 years ago
2 years ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
2 years ago
​
​
​
2 years ago
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
2 years ago
2 years ago
3 years ago
​
​
​
2 years ago
3 years ago
​
​
​
​
​
3 years ago
3 years ago
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
2 years ago
​
​
1 year ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
1 year ago
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
1 year ago
​
1 year ago
2 years ago
​
​
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
2 years ago
​
2 years ago
​
2 years ago
2 years ago
​
​
​
2 years ago
​
​
​
2 years ago
​
2 years ago
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
3 years ago
2 years ago
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
2 years ago
​
2 years ago
​
​
2 years ago
​
2 years ago
​
8 months ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
1 year ago
2 years ago
​
​
​
​
​
1 year ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
​
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
10 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
2 years ago
​
2 years ago
​
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
2 years ago
​
2 years ago
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
2 years ago
​
​
​
2 years ago
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
2 years ago
​
2 years ago
​
2 years ago
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
2 years ago
2 years ago
2 years ago
​
​
​
2 years ago
2 years ago
2 years ago
​
2 years ago
2 years ago
2 years ago
2 years ago
​
​
​
3 years ago
2 years ago
2 years ago
2 years ago
​
​
​
3 years ago
2 years ago
2 years ago
2 years ago
​
1 year ago
​
​
​
​
​
​
2 years ago
​
​
​
3 years ago
2 years ago
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
1 year ago
1 year ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
1 year ago
​
​
​
​
2 years ago
​
​
​
​
​
1 year ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
2 years ago
2 years ago
2 years ago
2 years ago
​
2 years ago
​
​
​
2 years ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
1 year ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
1 year ago
2 years ago
​
2 years ago
​
​
1 year ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
2 years ago
​
2 years ago
​
​
2 years ago
​
​
​
​
​
3 years ago
2 years ago
2 years ago
​
1 year ago
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
​
2 years ago
2 years ago
​
​
​
2 years ago
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
2 years ago
​
​
​
2 years ago
​
​
2 years ago
​
​
2 years ago
​
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
8 months ago
2 years ago
​
8 months ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
1 year ago
1 year ago
​
​
1 year ago
1 year ago
​
​
​
​
​
​
​
​
1 year ago
​
1 year ago
1 year ago
​
​
3 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
2 years ago
2 years ago
​
3 years ago
2 years ago
3 years ago
2 years ago
​
​
​
​
​
2 years ago
​
​
2 years ago
2 years ago
​
2 years ago
​
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
2 years ago
​
​
2 years ago
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
1 year ago
​
1 year ago
​
​
​
​
​
​
​
​
​
1 year ago
​
1 year ago
​
1 year ago
1 year ago
​
​
​
​
​
​
2 years ago
​
​
​
​
3 years ago
2 years ago
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item label="BU">
  6. <bu-select v-model="searchData.buNo" style="width: 120px"></bu-select>
  7. </el-form-item>
  8. <el-form-item :label="'打样单号'">
  9. <el-input v-model="searchData.proofingNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'批次号'">
  12. <el-input v-model="searchData.proofingBatchNo" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'项目号'">
  15. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'项目名称'">
  18. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'客户编码'">
  21. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'客户名称'">
  24. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="'创建日期'">
  27. <el-date-picker
  28. style="width: 120px"
  29. v-model="searchData.startDate"
  30. type="date"
  31. value-format="yyyy-MM-dd"
  32. placeholder="开始日期">
  33. </el-date-picker>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="结束日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. <el-form-item label="节点审批人">
  45. <el-input v-model="searchData.approvalUsername" clearable style="width: 120px"></el-input>
  46. </el-form-item>
  47. <el-form-item label="当前节点">
  48. <el-select v-model="searchData.nodeId" placeholder="请选择节点" clearable style="width: 120px">
  49. <el-option
  50. v-for="option in nodeOptions"
  51. :key="option.id"
  52. :label="option.name"
  53. :value="option.id">
  54. </el-option>
  55. </el-select>
  56. </el-form-item>
  57. </el-form>
  58. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  59. <el-form-item :label="'PLM物料编码'">
  60. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  61. </el-form-item>
  62. <el-form-item :label="'IFS物料编码'">
  63. <el-input v-model="searchData.finalPartNo" clearable style="width: 120px"></el-input>
  64. </el-form-item>
  65. <el-form-item :label="'客户物料编码'">
  66. <el-input v-model="searchData.customerPartNo" clearable style="width: 120px"></el-input>
  67. </el-form-item>
  68. <el-form-item :label="'物料名称'">
  69. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  70. </el-form-item>
  71. <el-form-item :label="'CS'">
  72. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  73. </el-form-item>
  74. <el-form-item :label="'NPI工程师'">
  75. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  76. </el-form-item>
  77. <el-form-item :label="'Approver'">
  78. <el-input v-model="searchData.approverName" clearable style="width: 120px"></el-input>
  79. </el-form-item>
  80. <!-- <el-form-item :label="'优先等级'">-->
  81. <!-- <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"></dict-data-select>-->
  82. <!-- </el-form-item>-->
  83. <el-form-item :label="'状态'">
  84. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  85. <el-option label="全部" value=""></el-option>
  86. <el-option label="草稿" value="草稿"></el-option>
  87. <el-option label="审批中" value="审批中"></el-option>
  88. <el-option label="已完成" value="已完成"></el-option>
  89. </el-select>
  90. </el-form-item>
  91. <el-form-item :label="' '">
  92. <el-button @click="getDataList()">查询</el-button>
  93. <el-button v-if="isAuth('103001:save')" type="primary" @click="addModal()">新增</el-button>
  94. <el-button v-if="isAuth('103001:remove')" type="primary" @click="delModal()">删除</el-button>
  95. <download-excel
  96. v-if="isAuth('103001:export')"
  97. :fields="fields()"
  98. :data="exportData"
  99. type="xls"
  100. :name="exportName"
  101. :header="exportHeader"
  102. :footer="exportFooter"
  103. :fetch="createExportData"
  104. :before-generate="startDownload"
  105. :before-finish="finishDownload"
  106. worksheet="导出信息"
  107. :class="['el-button', 'el-button--primary', 'el-button--medium', {'is-loading': exportLoading}]">
  108. <i v-if="exportLoading" class="el-icon-loading"></i>
  109. <span>{{ "导出" }}</span>
  110. </download-excel>
  111. <el-button @click="filterVisible = true">搜索</el-button>
  112. <el-button type="warning" @click="closeProcessModal()">流程关闭</el-button>
  113. <el-button
  114. v-if="isAuth('103001:issued')"
  115. type="warning"
  116. :loading="batchIssuingLoading"
  117. :disabled="batchIssuingLoading"
  118. @click="batchIssueModal()">
  119. 批量下达
  120. </el-button>
  121. </el-form-item>
  122. </el-form>
  123. <!-- 打样列表 -->
  124. <el-table
  125. :height="height"
  126. :data="dataList"
  127. border
  128. :row-style="rowStyle"
  129. ref="proofingTable"
  130. @row-click="proofingClickRow"
  131. @selection-change="selectionProofing"
  132. @current-change="changeCurrentRow"
  133. v-loading="dataListLoading"
  134. style="width: 100%;">
  135. <el-table-column
  136. type="selection"
  137. header-align="center"
  138. align="center"
  139. :selectable="selectFlag"
  140. width="50">
  141. </el-table-column>
  142. <el-table-column
  143. v-for="(item,index) in columnList" :key="index"
  144. :sortable="item.columnSortable"
  145. :prop="item.columnProp"
  146. :header-align="item.headerAlign"
  147. :show-overflow-tooltip="item.showOverflowTooltip"
  148. :align="item.align"
  149. :fixed="item.fixed === ''?false:item.fixed"
  150. :min-width="item.columnWidth"
  151. :label="item.columnLabel">
  152. <template slot-scope="scope">
  153. <div v-if="item.columnProp === 'proofingResultStatus'">
  154. <span v-if="!item.columnHidden">
  155. <span v-show="scope.row.proofingResultStatus === 'B'">草稿</span>
  156. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  157. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  158. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  159. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  160. </span>
  161. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  162. style="width: 100px; height: 80px"/></span>
  163. </div>
  164. <div v-else>
  165. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  166. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  167. style="width: 100px; height: 80px"/></span>
  168. </div>
  169. </template>
  170. <template slot-scope="scope">
  171. <div v-if="item.columnProp === 'oriCodeNo'">
  172. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toTechnicalSpecificationMenu(scope.row.oriCodeNo)"> {{ scope.row[item.columnProp] }}</el-link>
  173. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  174. </div>
  175. <div v-else>
  176. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  177. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  178. </div>
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. fixed="right"
  183. header-align="center"
  184. align="center"
  185. width="100"
  186. label="操作">
  187. <template slot-scope="scope">
  188. <template v-if="isAuth('103001:update')">
  189. <el-link style="cursor: pointer" @click="updateModal(scope.row)" v-if="scope.row.proofingStatus !== '已完成'">编辑</el-link>
  190. </template>
  191. <template v-if="isAuth('103001:issued')">
  192. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '草稿'" :disabled="!!issuingSet[scope.row.proofingNo]" @click="updateModalStatus(scope.row,'C')">
  193. <i v-if="issuingSet[scope.row.proofingNo]" class="el-icon-loading"></i>下达
  194. </el-link>
  195. </template>
  196. <template v-if="isAuth('103001:detail')">
  197. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '已完成'" @click="getDetailData(scope.row)">详情</el-link>
  198. </template>
  199. </template>
  200. </el-table-column>
  201. </el-table>
  202. <selectDiv ref="selectDiv"></selectDiv>
  203. <!-- 分页插件 -->
  204. <el-pagination style="margin-top: 0px"
  205. @size-change="sizeChangeHandle"
  206. @current-change="currentChangeHandle"
  207. :current-page="pageIndex"
  208. :page-sizes="[20, 50, 100, 200, 500]"
  209. :page-size="pageSize"
  210. :total="totalPage"
  211. layout="total, sizes, prev, pager, next, jumper">
  212. </el-pagination>
  213. <!-- 打样模态框 -->
  214. <el-dialog :title="modalData.title" @close="closeModalDiaLog" @open="openModalDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" top="5vh" width="1200px">
  215. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules" :key="editFormKey">
  216. <el-row :gutter="15">
  217. <el-col :span="8">
  218. <el-row :gutter="10">
  219. <el-col :span="10">
  220. <el-form-item prop="customerNo" label="客户编码" :show-message="false">
  221. <span style="cursor: pointer" slot="label" v-if="!headerFieldDisabled('customerNo')"
  222. @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  223. <el-input :disabled="headerFieldDisabled('customerNo')"
  224. v-model="modalData.customerNo" @blur="handleQueryCustomer"></el-input>
  225. </el-form-item>
  226. </el-col>
  227. <el-col :span="14">
  228. <el-form-item label=" " :show-message="false">
  229. <el-input disabled v-model="modalData.customerDesc"></el-input>
  230. </el-form-item>
  231. </el-col>
  232. </el-row>
  233. </el-col>
  234. <el-col :span="4">
  235. <el-form-item label="打样数量" prop="proofingNumber" :show-message="false">
  236. <el-input-number :controls="false" :disabled="headerFieldDisabled('proofingNumber')" :min="0" v-model="modalData.proofingNumber" :step="0" style="width: 100%"></el-input-number>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="4">
  240. <el-form-item label="打样金额" prop="proofingAmount" :show-message="false">
  241. <el-input-number :controls="false" :disabled="headerFieldDisabled('proofingAmount')" v-model="modalData.proofingAmount" :step="0" style="width: 100%"></el-input-number>
  242. </el-form-item>
  243. </el-col>
  244. <el-col :span="4">
  245. <el-form-item label="优先等级" :show-message="false">
  246. <dict-data-select v-if="modalFlag" :disabled="headerFieldDisabled('priorityLevel')"
  247. v-model="modalData.priorityLevel"
  248. dict-type="priority_Level"></dict-data-select>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="4">
  252. <el-form-item label="要求交付日期" prop="requiredDeliveryDate" :show-message="false">
  253. <el-date-picker v-model="modalData.requiredDeliveryDate" style="width: 100%" type="date"
  254. value-format="yyyy-MM-dd" placeholder="选择日期"
  255. :disabled="headerFieldDisabled('requiredDeliveryDate')"></el-date-picker>
  256. </el-form-item>
  257. </el-col>
  258. </el-row>
  259. <el-row :gutter="15">
  260. <el-col :span="8">
  261. <el-row :gutter="10">
  262. <el-col :span="10">
  263. <el-form-item prop="projectId" label="项目号" :show-message="false">
  264. <span slot="label" v-if="modalData.customerNo && !headerFieldDisabled('projectId')"
  265. @click="chooseProjectListFlag = true"><a herf="#">项目号</a></span>
  266. <el-input :disabled="headerFieldDisabled('projectId') || !modalData.customerNo"
  267. v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
  268. </el-form-item>
  269. </el-col>
  270. <el-col :span="14">
  271. <el-form-item label=" " :show-message="false">
  272. <el-input disabled v-model="modalData.projectName"></el-input>
  273. </el-form-item>
  274. </el-col>
  275. </el-row>
  276. </el-col>
  277. <el-col :span="4">
  278. <el-form-item :show-message="false" prop="trackerName">
  279. <label v-if="headerFieldDisabled('tracker')" slot="label">CS</label>
  280. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  281. <el-input v-model="modalData.trackerName" :disabled="headerFieldDisabled('tracker')" readonly>
  282. <span slot="suffix" v-show="modalData.trackerName && !headerFieldDisabled('tracker')" @click="clearModalData('tracker')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  283. </el-input>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="4">
  287. <el-form-item :show-message="false">
  288. <label v-if="headerFieldDisabled('engineer')" slot="label">NPI工程师</label>
  289. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a>NPI工程师</a></span>
  290. <el-input v-model="modalData.engineerName" :disabled="headerFieldDisabled('engineer')" readonly>
  291. <span slot="suffix" v-show="modalData.engineerName && !headerFieldDisabled('engineer')" @click="clearModalData('engineer')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  292. </el-input>
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="4">
  296. <el-form-item>
  297. <label v-if="headerFieldDisabled('approver')" slot="label">Approver</label>
  298. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2053)"><a herf="#">Approver</a></span>
  299. <el-input v-model="modalData.approverName" :disabled="headerFieldDisabled('approver')" readonly>
  300. <span slot="suffix" v-show="modalData.approverName && !headerFieldDisabled('approver')" @click="clearModalData('approver')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  301. </el-input>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="4">
  305. <el-form-item>
  306. <label v-if="delegateFieldDisabled('delegateAccess')" slot="label">DelegateAccess</label>
  307. <span v-else style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  308. <el-input v-model="delegateAccessName" :disabled="delegateFieldDisabled('delegateAccess')" readonly>
  309. <span slot="suffix" v-show="delegateAccessName && !delegateFieldDisabled('delegateAccess')" @click="selectionDelegateAccess = []"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  310. </el-input>
  311. </el-form-item>
  312. </el-col>
  313. </el-row>
  314. <el-row :gutter="15">
  315. <el-col :span="24">
  316. <el-form-item label="样品用途" class="auto" prop="sendSamplesUsage" :show-message="false">
  317. <el-input v-model="modalData.sendSamplesUsage" :disabled="headerFieldDisabled('sendSamplesUsage')" clearable></el-input>
  318. </el-form-item>
  319. </el-col>
  320. </el-row>
  321. <el-row :gutter="15">
  322. <el-col :span="24">
  323. <el-form-item label="样品寄送地址" class="auto">
  324. <el-input type="textarea" v-model="modalData.sendSamplesAddress" :disabled="headerFieldDisabled('sendSamplesAddress')" :rows="3" resize='none' show-word-limit></el-input>
  325. </el-form-item>
  326. </el-col>
  327. </el-row>
  328. <el-row :gutter="15">
  329. <el-col :span="24">
  330. <el-form-item label="备注" style="height: 90px">
  331. <el-input type="textarea" v-model="modalData.technicalConsiderations" :disabled="headerFieldDisabled('technicalConsiderations')" :rows="3" resize='none' show-word-limit></el-input>
  332. </el-form-item>
  333. </el-col>
  334. </el-row>
  335. </el-form>
  336. <div class="rq">
  337. <el-form :inline="true" label-position="top" :model="projectPartData" v-if="modalData.flag === '1'">
  338. <el-form-item label="PLM物料编码">
  339. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  340. </el-form-item>
  341. <el-form-item label="物料名称">
  342. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  343. </el-form-item>
  344. <el-form-item label="IFS物料编码">
  345. <el-input v-model="projectPartData.finalPartNo" clearable style="width: 120px"></el-input>
  346. </el-form-item>
  347. <el-form-item label="客户料号">
  348. <el-input v-model="projectPartData.customerPartNo" clearable style="width: 120px"></el-input>
  349. </el-form-item>
  350. <el-form-item label=" " v-if="modalData.projectId">
  351. <el-button type="primary" @click="searchProjectPartList">查询</el-button>
  352. </el-form-item>
  353. </el-form>
  354. <el-table
  355. :height="300"
  356. :data="projectPartList"
  357. ref="projectPartTable"
  358. @row-click="projectPartClickRow"
  359. @selection-change="selectionProjectPart"
  360. :row-key="getRowKeys"
  361. border
  362. v-loading="queryLoading"
  363. style="width: 100%;">
  364. <el-table-column
  365. type="selection"
  366. header-align="center"
  367. align="center"
  368. :selectable="checkSelectable"
  369. :reserve-selection="true"
  370. width="50">
  371. </el-table-column>
  372. <el-table-column
  373. v-for="(item,index) in projectPartDetailList" :key="index"
  374. :sortable="item.columnSortable"
  375. :prop="item.columnProp"
  376. :header-align="item.headerAlign"
  377. :show-overflow-tooltip="item.showOverflowTooltip"
  378. :align="item.align"
  379. :fixed="item.fixed===''?false:item.fixed"
  380. :min-width="item.columnWidth"
  381. :label="item.columnLabel">
  382. <template slot-scope="scope">
  383. <template v-if="item.columnProp === 'testPartNo'">
  384. <a @click="handleRouter(scope.row)">{{ scope.row[item.columnProp] }}</a>
  385. </template>
  386. <template v-else>
  387. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  388. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  389. </template>
  390. </template>
  391. </el-table-column>
  392. </el-table>
  393. </div>
  394. <el-pagination style="margin-top: 0"
  395. @size-change="handleSizeChange"
  396. @current-change="handleCurrentChange"
  397. :current-page="no"
  398. :page-sizes="[20, 50, 100, 200, 500]"
  399. :page-size="size"
  400. :total="total"
  401. layout="total, sizes, prev, pager, next, jumper">
  402. </el-pagination>
  403. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  404. <template v-if="modalData.proofingStatus === '草稿' || (modalData.proofingStatus === '审批中' && ((modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name)) || superAdmin))">
  405. <el-button type="primary" @click="saveData()">保存</el-button>
  406. </template>
  407. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  408. <template v-if="isAuth('103001:submit')">
  409. <template v-if="superAdmin || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name))">
  410. <el-button v-if="modalData.proofingStatus === '审批中'" type="primary" :loading="submitLoading" :disabled="submitLoading" @click="agreeSubmit">同意</el-button>
  411. </template>
  412. </template>
  413. <template v-if="isAuth('103001:rejected')">
  414. <template v-if="superAdmin || (modalData.approvalUsername && modalData.approvalUsername.split(';').includes($store.state.user.name))">
  415. <el-button v-if="modalData.proofingStatus === '审批中' && modalData.isReject === 'Y'" @click="rejectVisible = true" type="primary">驳回</el-button>
  416. </template>
  417. </template>
  418. </el-footer>
  419. </el-dialog>
  420. <!-- 录入打样结果模态框 -->
  421. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
  422. width="785px">
  423. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  424. style="margin-left: 0px;margin-top: 10px;">
  425. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  426. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd"
  427. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  428. </el-form-item>
  429. </el-form>
  430. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  431. style="margin-left:0px;margin-top: 5px;">
  432. <el-form-item label="打样结果信息" prop="proofingResultInformation"
  433. :rules="enterResultRules.proofingResultInformation">
  434. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none'
  435. show-word-limit style="width: 500px;height: 30px"></el-input>
  436. </el-form-item>
  437. </el-form>
  438. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  439. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  440. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  441. </el-form>
  442. <el-table
  443. :height="200"
  444. :data="fileContentList"
  445. border
  446. v-loading="dataListLoading"
  447. style="width: 100%">
  448. <el-table-column
  449. v-for="(item,index) in fileColumnList" :key="index"
  450. :sortable="item.columnSortable"
  451. :prop="item.columnProp"
  452. :header-align="item.headerAlign"
  453. :show-overflow-tooltip="item.showOverflowTooltip"
  454. :align="item.align"
  455. :fixed="item.fixed===''?false:item.fixed"
  456. :min-width="item.columnWidth"
  457. :label="item.columnLabel">
  458. <template slot-scope="scope">
  459. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  460. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  461. </template>
  462. </el-table-column>
  463. <el-table-column
  464. fixed="right"
  465. header-align="center"
  466. align="center"
  467. width="100"
  468. label="操作">
  469. <template slot-scope="scope">
  470. <a @click="deleteFile(scope.row)">删除</a>
  471. </template>
  472. </el-table-column>
  473. </el-table>
  474. </el-form>
  475. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  476. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  477. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  478. </el-footer>
  479. </el-dialog>
  480. <!-- 录入送样信息模态框 -->
  481. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag"
  482. width="620px">
  483. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules"
  484. style="margin-left: 0px;margin-top: 10px;">
  485. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate"
  486. :rules="submitResultRules.actualitySendSamplesDate">
  487. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd"
  488. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  489. </el-form-item>
  490. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  491. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  492. <el-option label="客户自提" value="客户自提"></el-option>
  493. <el-option label="人员带货" value="人员带货"></el-option>
  494. <el-option label="其它" value="其它"></el-option>
  495. </el-select>
  496. </el-form-item>
  497. <el-form-item label="送货信息">
  498. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  499. </el-form-item>
  500. </el-form>
  501. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  502. <el-form-item label="送货备注">
  503. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none'
  504. show-word-limit style="width: 456px;height: 30px"></el-input>
  505. </el-form-item>
  506. </el-form>
  507. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  508. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  509. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  510. </el-footer>
  511. </el-dialog>
  512. <!-- 客户回复模态框 -->
  513. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag"
  514. width="620px">
  515. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules"
  516. style="margin-left: 0px;margin-top: 10px;">
  517. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  518. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd"
  519. placeholder="请选择日期" style="width: 185px"></el-date-picker>
  520. </el-form-item>
  521. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  522. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  523. <el-option label="接受" value="接受"></el-option>
  524. <el-option label="不接受" value="不接受"></el-option>
  525. </el-select>
  526. </el-form-item>
  527. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  528. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  529. </el-form-item>
  530. </el-form>
  531. <el-form :inline="true" label-position="top" :model="customerResponseData"
  532. style="margin-left:0px;margin-top: 5px;">
  533. <el-form-item label="客户回复信息">
  534. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none'
  535. show-word-limit style="width: 595px;height: 30px"></el-input>
  536. </el-form-item>
  537. </el-form>
  538. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  539. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  540. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  541. </el-footer>
  542. </el-dialog>
  543. <!--选择项目模态框-->
  544. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
  545. :visible.sync="chooseProjectListFlag" width="35%" :close-on-click-modal="false">
  546. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  547. <el-row :gutter="10">
  548. <el-col :span="6">
  549. <el-form-item label="项目号">
  550. <el-input v-model="searchProjectData.projectId"></el-input>
  551. </el-form-item>
  552. </el-col>
  553. <el-col :span="6">
  554. <el-form-item label="项目名称">
  555. <el-input v-model="searchProjectData.projectName"></el-input>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="6">
  559. <el-form-item label=" ">
  560. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  561. </el-form-item>
  562. </el-col>
  563. </el-row>
  564. <el-table :height="223"
  565. :data="projectList"
  566. border
  567. @row-click="projectClickRow">
  568. <el-table-column label="项目号" prop="projectId"/>
  569. <el-table-column label="项目名称" prop="projectName"/>
  570. </el-table>
  571. </el-form>
  572. </el-dialog>
  573. <!-- 页签 -->
  574. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card" @tab-click="tabClick" class="customer-tab">
  575. <el-tab-pane label="基本信息" name="attribute">
  576. <proofing-attribute
  577. ref="dialogAttribute"
  578. :disabled="proofingCurrentRow.proofingStatus === '已完成'"
  579. :order-no="proofingCurrentRow.proofingNo"
  580. :approval-username="proofingCurrentRow.approvalUsername"
  581. :proofing-status="proofingCurrentRow.proofingStatus"
  582. :super-admin="superAdmin"
  583. :code-no="'Proofing'"
  584. :function-type="'order'">
  585. </proofing-attribute>
  586. </el-tab-pane>
  587. <!-- 项目信息页签 -->
  588. <el-tab-pane label="项目信息" name="project_information">
  589. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  590. <el-row :gutter="25">
  591. <el-col :span="6">
  592. <el-form-item label="项目号">
  593. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  594. </el-form-item>
  595. </el-col>
  596. <el-col :span="12">
  597. <el-form-item label="项目名称">
  598. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  599. </el-form-item>
  600. </el-col>
  601. <el-col :span="6">
  602. <el-form-item label="项目类型">
  603. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  604. </el-form-item>
  605. </el-col>
  606. <el-col :span="6">
  607. <el-form-item label="行业">
  608. <el-input v-model="projectInformationData.industryDesc" readonly></el-input>
  609. </el-form-item>
  610. </el-col>
  611. <el-col :span="6">
  612. <el-form-item label="优先级">
  613. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  614. </el-form-item>
  615. </el-col>
  616. <el-col :span="6">
  617. <el-form-item label="项目经理">
  618. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  619. </el-form-item>
  620. </el-col>
  621. <el-col :span="6">
  622. <el-form-item label="项目审批人">
  623. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="6">
  627. <el-form-item label="客户">
  628. <el-input v-model="projectInformationData.customerId" readonly></el-input>
  629. </el-form-item>
  630. </el-col>
  631. <el-col :span="12">
  632. <el-form-item label="客户名称">
  633. <el-input v-model="projectInformationData.customerName" readonly></el-input>
  634. </el-form-item>
  635. </el-col>
  636. <el-col :span="6"></el-col>
  637. <el-col :span="6">
  638. <el-form-item label="客户项目号">
  639. <el-input v-model="projectInformationData.customerProjectNo" readonly></el-input>
  640. </el-form-item>
  641. </el-col>
  642. <el-col :span="10">
  643. <el-form-item label="项目年销售额CNY(K)">
  644. <el-input v-model="projectInformationData.projectAmount" readonly></el-input>
  645. </el-form-item>
  646. </el-col>
  647. <el-col :span="8">
  648. <el-form-item label="直接客户">
  649. <el-input v-model="projectInformationData.finalCustomerId" readonly></el-input>
  650. </el-form-item>
  651. </el-col>
  652. </el-row>
  653. <el-form-item label="客户产品" style="height: 70px">
  654. <el-input type="textarea" resize="none" :autosize="{minRows: 2, maxRows: 2}" v-model="projectInformationData.projectDesc" readonly></el-input>
  655. </el-form-item>
  656. <el-form-item label="客户产品应用" style="height: 70px">
  657. <el-input type="textarea" resize="none" :autosize="{minRows: 2, maxRows: 2}" v-model="projectInformationData.customerRemark" readonly></el-input>
  658. </el-form-item>
  659. <el-form-item label="其他要求" style="height: 70px">
  660. <el-input type="textarea" resize="none" :autosize="{minRows: 2, maxRows: 2}" v-model="projectInformationData.remark" readonly></el-input>
  661. </el-form-item>
  662. <el-form-item label="项目权限">
  663. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  664. </el-form-item>
  665. </el-form>
  666. </el-tab-pane>
  667. <!-- 客户信息页签 -->
  668. <el-tab-pane label="客户信息" name="customer_information">
  669. <customer-info :project="proofingCurrentRow"></customer-info>
  670. </el-tab-pane>
  671. <el-tab-pane label="附件信息" name="proofing_file">
  672. <oss-components
  673. :save-visible="isAuth('103001:tab4:save')"
  674. :download-visible="isAuth('103001:tab4:download')"
  675. :remove-visible="isAuth('103001:tab4:remove')"
  676. :preview-visible="isAuth('103001:tab4:preview')"
  677. label="打样单号" style="margin-top: 5px" height="28vh" :columns="ossColumns"
  678. :order-ref2="proofingCurrentRow.proofingNo"
  679. :order-ref1="proofingCurrentRow.site" :disabled="proofingCurrentRow.proofingStatus === '已完成'"></oss-components>
  680. </el-tab-pane>
  681. <!-- 审批信息 -->
  682. <el-tab-pane label="审批信息" name="approvalInformation">
  683. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="320"></approval-information>
  684. </el-tab-pane>
  685. </el-tabs>
  686. <!-- chooseList模态框 -->
  687. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  688. <!-- 客户地址 -->
  689. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  690. <el-table
  691. :height="300"
  692. :data="addressList"
  693. @row-dblclick="getAddressData"
  694. border
  695. style="width: 100%;">
  696. <el-table-column
  697. v-for="(item,index) in columnAddressList" :key="index"
  698. :sortable="item.columnSortable"
  699. :prop="item.columnProp"
  700. :header-align="item.headerAlign"
  701. :show-overflow-tooltip="item.showOverflowTooltip"
  702. :align="item.align"
  703. :fixed="item.fixed==''?false:item.fixed"
  704. :min-width="item.columnWidth"
  705. :label="item.columnLabel">
  706. <template slot-scope="scope">
  707. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  708. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  709. style="width: 100px; height: 80px"/></span>
  710. </template>
  711. </el-table-column>
  712. </el-table>
  713. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  714. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  715. </el-footer>
  716. </el-dialog>
  717. <!-- 联系人 -->
  718. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  719. <el-table
  720. :height="300"
  721. :data="contactList"
  722. @row-dblclick="getContactData"
  723. border
  724. style="width: 100%;">
  725. <el-table-column
  726. v-for="(item,index) in columnContactList" :key="index"
  727. :sortable="item.columnSortable"
  728. :prop="item.columnProp"
  729. :header-align="item.headerAlign"
  730. :show-overflow-tooltip="item.showOverflowTooltip"
  731. :align="item.align"
  732. :fixed="item.fixed==''?false:item.fixed"
  733. :min-width="item.columnWidth"
  734. :label="item.columnLabel">
  735. <template slot-scope="scope">
  736. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  737. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  738. style="width: 100px; height: 80px"/></span>
  739. </template>
  740. </el-table-column>
  741. </el-table>
  742. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  743. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  744. </el-footer>
  745. </el-dialog>
  746. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  747. :visible.sync="delegateAccessVisible" width="40vw">
  748. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  749. <el-form-item label="编码">
  750. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  751. </el-form-item>
  752. <el-form-item label="名称">
  753. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  754. </el-form-item>
  755. <el-form-item label=" ">
  756. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  757. </el-form-item>
  758. </el-form>
  759. <el-table v-if="delegateAccessVisible"
  760. :height="300"
  761. :data="baseDelegateAccessList"
  762. @selection-change="handleSelectionChange"
  763. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  764. ref="delegateAccesstTable"
  765. border row-key="delegateAccess"
  766. style="width: 100%;">
  767. <el-table-column
  768. type="selection"
  769. header-align="center"
  770. align="center"
  771. :reserve-selection="true"
  772. width="50">
  773. </el-table-column>
  774. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  775. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  776. </el-table>
  777. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  778. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  779. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  780. </el-footer>
  781. </el-dialog>
  782. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="rejectVisible" width="500px">
  783. <el-form label-position="top">
  784. <el-form-item label="驳回意见" class="auto">
  785. <el-input type="textarea" v-model="rejectOpinion" :rows="3"></el-input>
  786. </el-form-item>
  787. </el-form>
  788. <el-footer style="text-align:center;height: 30px;line-height: 30px;">
  789. <el-button type="primary" :loading="submitLoading" :disabled="submitLoading" @click="rejectSubmit">确定</el-button>
  790. <el-button type="primary" :disabled="submitLoading" @click="rejectVisible = false">取消</el-button>
  791. </el-footer>
  792. </el-dialog>
  793. <!-- 上传文件的modal -->
  794. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  795. <filter-search :visible.sync="filterVisible" @search="searchByAnyField"></filter-search>
  796. </div>
  797. </template>
  798. <script>
  799. import {
  800. proofingInformationSearch, // 打样信息列表查询
  801. proofingInformationSave, // 打样信息新增
  802. proofingInformationEdit, // 打样信息编辑
  803. proofingInformationDelete, // 打样信息删除
  804. getFileContentList, // 获取打样单附件列表
  805. proofingResultSearch, // 获取打样结果对象
  806. deleteProofingFile, // 文件删除
  807. saveProofingResult, // 保存打样结果
  808. saveSubmitResult, // 保存送样结果
  809. saveCustomerResponse, // 保存客户回复
  810. getProjectPartList, // 获取产品列表
  811. getProjectInformation, // 获取项目信息
  812. getCustomerInformation, // 获取客户信息
  813. } from '@/api/proofing/proofingInformation.js'
  814. import {
  815. downLoadQuotationFile, // 文件下载
  816. searchProjectInfoList,
  817. } from '@/api/quotation/quotationInformation.js'
  818. import {
  819. customerAddressSearch, // 客户联系地址列表查询
  820. } from '@/api/customer/customerAddress.js'
  821. import {
  822. customerContactSearch, // 客户联系人列表查询
  823. } from '@/api/customer/customerContact.js'
  824. import {
  825. getNodeList
  826. } from "@/api/sampleManagement/technicalSpecificationList.js"
  827. import Chooselist from '@/views/modules/common/Chooselist'
  828. import proofingUploadFile from "./proofing_upload_file"
  829. import DictDataSelect from "../sys/dict-data-select.vue";
  830. import {
  831. proofingInformationEditStatus, proofingInformationSearchAny, queryBuList,
  832. searchDelegateAccess,
  833. searchDelegateAccessByUser, submitChange
  834. } from "../../../api/proofing/proofingInformation";
  835. import {getNodeAuthority, getApprovalList, checkSuperAdmin, closeProcess} from "../../../api/changeManagement/changeManagement";
  836. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  837. import profingFile from "./profingFile"
  838. import proofingAttribute from "../demoComponents/orderProperties"
  839. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  840. import {queryCustomer} from "../../../api/customer/customerInformation";
  841. import {queryProjectByCustomer} from "../../../api/project/project";
  842. import OssComponents from "../oss/ossComponents.vue";
  843. import BuSelect from "../base/BuSelect.vue";
  844. import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
  845. import FilterSearch from "../../common/filterSearch.vue";
  846. import {testInformationSearchAny} from "../../../api/test/testInformation";
  847. import PriceCheckProperties from "../quotation/priceCheckProperties.vue";
  848. import {partInformationSearch, queryPartUnitCostList} from "../../../api/part/partInformation";
  849. import {pickRouteValue} from '@/utils'
  850. export default {
  851. components: {
  852. PriceCheckProperties,
  853. FilterSearch,
  854. CustomerInfo,
  855. BuSelect,
  856. OssComponents,
  857. ApprovalInformation,
  858. ProjectInfo
  859. , DictDataSelect
  860. , Chooselist
  861. , proofingUploadFile
  862. , profingFile
  863. , proofingAttribute
  864. },
  865. watch: {
  866. '$route' () {
  867. this.handleRouteQuery(false)
  868. },
  869. searchData: {
  870. deep: true,
  871. handler: function (newV, oldV) {
  872. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  873. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  874. }
  875. },
  876. 'modalData.proofingNo'(newV, oldV) {
  877. if (newV) {
  878. this.modalData.proofingNo = newV.toUpperCase()
  879. }
  880. },
  881. 'modalData.customerNo'(newV, oldV) {
  882. if (newV) {
  883. this.modalData.customerNo = newV.toUpperCase()
  884. }
  885. if (oldV) {
  886. if (!newV) {
  887. this.modalData.customerDesc = ''
  888. }
  889. this.modalData.projectId = ''
  890. this.modalData.consignee = ''
  891. this.modalData.consigneeContact = ''
  892. this.modalData.sendSamplesAddress = ''
  893. this.modalData.sendSamplesUsage = ''
  894. }
  895. },
  896. 'modalData.projectId'(newV, oldV) {
  897. if (newV) {
  898. this.modalData.projectId = newV.toUpperCase()
  899. }
  900. if (oldV) {
  901. if (!newV) {
  902. this.modalData.projectName = ''
  903. }
  904. this.modalData.testPartNo = ''
  905. this.modalData.partName = ''
  906. this.resetProjectPartSelectionState(true)
  907. }
  908. },
  909. rejectVisible(newVal, oldVal) {
  910. if (newVal === false) {
  911. this.rejectOpinion = ''
  912. }
  913. },
  914. "searchData.proofingNo"(newVal, oldVal) {
  915. this.searchData.proofingNo = (newVal || '').toUpperCase()
  916. },
  917. "searchData.proofingBatchNo"(newVal, oldVal) {
  918. this.searchData.proofingBatchNo = (newVal || '').toUpperCase()
  919. },
  920. 'modalFlag'(newVal, oldVal){
  921. if (newVal === false){
  922. this.detailVisible = false
  923. this.projectPartData.finalPartNo = ''
  924. this.projectPartData.customerPartNo = ''
  925. this.no = 1
  926. this.size = 20
  927. this.total = 0
  928. this.resetProjectPartSelectionState(true)
  929. }
  930. },
  931. 'modalData.tracker'(newVal,oldVal){
  932. if (!newVal){
  933. this.modalData.trackerName = ''
  934. }
  935. },
  936. 'modalData.engineer'(newVal,oldVal){
  937. if (!newVal){
  938. this.modalData.engineerName = ''
  939. }
  940. },
  941. 'modalData.approver'(newVal,oldVal){
  942. if (!newVal){
  943. this.modalData.approverName = ''
  944. }
  945. },
  946. },
  947. computed: {
  948. delegateAccessName: {
  949. get() {
  950. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  951. },
  952. set(val) {
  953. }
  954. },
  955. },
  956. data() {
  957. return {
  958. issuingSet: {},
  959. editFormKey: 0,
  960. approvalList: [],
  961. selectionDelegateAccess: [],
  962. selectionDelegateAccess2: [],
  963. delegateAccessVisible: false,
  964. baseDelegateAccessList: [],
  965. proofingDelegateAccess: {
  966. delegateAccess: '',
  967. delegateAccessName: '',
  968. },
  969. activeName: 'part',
  970. // 导出
  971. exportData: [],
  972. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  973. exportHeader: ['设备分类'],
  974. exportFooter: [],
  975. resultList: [],
  976. // ======== 行高 ========
  977. height: 300,
  978. secondHeight: 200,
  979. // ======== 分页 ========
  980. pageIndex: 1,
  981. pageSize: 50,
  982. totalPage: 0,
  983. selectedDataNum: 0,
  984. // 条件查询
  985. searchData: {
  986. site: this.$store.state.user.site,
  987. customerNo: '',
  988. customerDesc: '',
  989. trackerName: '',
  990. testPartNo: '',
  991. partName: '',
  992. proofingStatus: '',
  993. proofingResultStatus: '',
  994. startDate: '',
  995. endDate: '',
  996. projectId: '',
  997. projectName: '',
  998. engineerName: '',
  999. approverName: '',
  1000. priorityLevel: '',
  1001. proofingNo: '',
  1002. proofingBatchNo: '',
  1003. customerPartNo: '',
  1004. finalPartNo: '',
  1005. page: 1,
  1006. limit: 10,
  1007. menuId: this.$route.meta.menuId,
  1008. buNo: '',
  1009. nodeId: '',
  1010. approvalUsername: ''
  1011. },
  1012. // 其它
  1013. exportLoading: false,
  1014. dataListLoading: false,
  1015. // 初始页签
  1016. activeTable: 'attribute',
  1017. // ======== 数据对象 ========
  1018. modalData: {
  1019. flag: '1',
  1020. title: '打样新增',
  1021. site: this.$store.state.user.site,
  1022. proofingNo: '',
  1023. customerNo: '',
  1024. customerDesc: '',
  1025. projectId: '',
  1026. projectName: '',
  1027. tracker: '',
  1028. trackerName: '',
  1029. testPartNo: '',
  1030. partName: '',
  1031. engineer: '',
  1032. engineerName: '',
  1033. approver: '',
  1034. approverName: '',
  1035. priorityLevel: '',
  1036. proofingNumber: 1,
  1037. requiredDeliveryDate: '',
  1038. remark: '',
  1039. technicalConsiderations: '',
  1040. isNeedToSendSamples: '',
  1041. sendSamplesAddress: '',
  1042. consignee: '',
  1043. consigneeContact: '',
  1044. actualityDeliveryDate: '',
  1045. proofingResultInformation: '',
  1046. actualitySendSamplesDate: '',
  1047. sendSamplesMethod: '',
  1048. deliverGoodsInformation: '',
  1049. deliverGoodsRemark: '',
  1050. actualityReplyDate: '',
  1051. confirmResults: '',
  1052. confirmBy: '',
  1053. confirmInformation: '',
  1054. proofingStatus: '草稿',
  1055. proofingResultStatus: 'B',
  1056. nextToDo: '',
  1057. createDate: '',
  1058. createBy: '',
  1059. updateDate: '',
  1060. updateBy: '',
  1061. nodeConclusion: '',
  1062. stepId: '',
  1063. rejectFlag: '',
  1064. rejectStepId: '',
  1065. isReject: '',
  1066. nodeId: '',
  1067. proofingAmount: undefined,
  1068. sendSamplesUsage: ''
  1069. },
  1070. proofingDetailData: {
  1071. technicalConsiderations: '',
  1072. isNeedToSendSamples: '',
  1073. sendSamplesAddress: '',
  1074. consignee: '',
  1075. consigneeContact: '',
  1076. sendSamplesUsage: ''
  1077. },
  1078. proofingResultData: {
  1079. proofingResultStatus: '',
  1080. actualityDeliveryDate: '',
  1081. isNeedToSendSamples: '',
  1082. proofingResultInformation: '',
  1083. actualitySendSamplesDate: '',
  1084. sendSamplesMethod: '',
  1085. deliverGoodsInformation: '',
  1086. deliverGoodsRemark: '',
  1087. confirmResults: '',
  1088. actualityReplyDate: '',
  1089. confirmBy: '',
  1090. confirmInformation: ''
  1091. },
  1092. enterResultData: {
  1093. site: this.$store.state.user.site,
  1094. proofingNo: '',
  1095. actualityDeliveryDate: '',
  1096. proofingResultInformation: '',
  1097. updateBy: this.$store.state.user.name,
  1098. proofingResultStatus: '',
  1099. fileContentList: []
  1100. },
  1101. submitResultData: {
  1102. site: this.$store.state.user.site,
  1103. proofingNo: '',
  1104. actualitySendSamplesDate: '',
  1105. sendSamplesMethod: '',
  1106. deliverGoodsInformation: '',
  1107. deliverGoodsRemark: '',
  1108. updateBy: this.$store.state.user.name,
  1109. proofingResultStatus: ''
  1110. },
  1111. customerResponseData: {
  1112. site: this.$store.state.user.site,
  1113. proofingNo: '',
  1114. actualityReplyDate: '',
  1115. confirmResults: '',
  1116. confirmBy: '',
  1117. confirmInformation: '',
  1118. updateBy: this.$store.state.user.name,
  1119. proofingResultStatus: ''
  1120. },
  1121. projectPartData: {
  1122. site: this.$store.state.user.site,
  1123. testPartNo: '',
  1124. finalPartNo: '',
  1125. customerPartNo: '',
  1126. partName: ''
  1127. },
  1128. projectInformationData: {
  1129. projectId: '',
  1130. projectName: '',
  1131. projectType: '',
  1132. projectSourceDesc: '',
  1133. priorityDesc: '',
  1134. status: '',
  1135. projectDesc: '',
  1136. projectManagerName: '',
  1137. projectOwnerName: '',
  1138. userRoleName: '',
  1139. remark: ''
  1140. },
  1141. customerInformationData: {
  1142. customerNo: '',
  1143. customerDesc: '',
  1144. importantCustomer: '',
  1145. customerCurrency: '',
  1146. turnoverOfYear: '',
  1147. potentialRevenueOfYear: '',
  1148. customerStatus: '',
  1149. customerIndustry: '',
  1150. companyName: '',
  1151. jobDescription: '',
  1152. customerDescription: '',
  1153. contactName: '',
  1154. contactPhoneNumber1: '',
  1155. position: '',
  1156. addressName: '',
  1157. addressType: '',
  1158. createDate: '',
  1159. createBy: '',
  1160. updateDate: '',
  1161. updateBy: ''
  1162. },
  1163. // ======== 数据列表 ========
  1164. dataList: [],
  1165. fileContentList: [],
  1166. projectPartList: [],
  1167. addressList: [],
  1168. contactList: [],
  1169. nodeOptions: [],
  1170. // ======== 列表表头 ========
  1171. columnList: [
  1172. {
  1173. userId: this.$store.state.user.name,
  1174. functionId: 103001,
  1175. serialNumber: '103001Table1BuDesc',
  1176. tableId: '103001Table1',
  1177. tableName: '打样信息表',
  1178. columnProp: 'buDesc',
  1179. headerAlign: 'center',
  1180. align: 'center',
  1181. columnLabel: 'BU',
  1182. columnHidden: false,
  1183. columnImage: false,
  1184. columnSortable: false,
  1185. sortLv: 0,
  1186. status: true,
  1187. fixed: '',
  1188. columnWidth: 80
  1189. },
  1190. {
  1191. userId: this.$store.state.user.name,
  1192. functionId: 103001,
  1193. serialNumber: '103001Table1ProofingNo',
  1194. tableId: '103001Table1',
  1195. tableName: '打样信息表',
  1196. columnProp: 'proofingNo',
  1197. headerAlign: 'center',
  1198. align: 'center',
  1199. columnLabel: '打样单号',
  1200. columnHidden: false,
  1201. columnImage: false,
  1202. columnSortable: false,
  1203. sortLv: 0,
  1204. status: true,
  1205. fixed: '',
  1206. columnWidth: 120
  1207. },
  1208. {
  1209. userId: this.$store.state.user.name,
  1210. functionId: 103001,
  1211. serialNumber: '103001Table1ProofingBatchNo',
  1212. tableId: '103001Table1',
  1213. tableName: '打样信息表',
  1214. columnProp: 'proofingBatchNo',
  1215. headerAlign: 'center',
  1216. align: 'center',
  1217. columnLabel: '批次号',
  1218. columnHidden: false,
  1219. columnImage: false,
  1220. columnSortable: false,
  1221. sortLv: 0,
  1222. status: true,
  1223. fixed: '',
  1224. columnWidth: 140
  1225. },
  1226. {
  1227. userId: this.$store.state.user.name,
  1228. functionId: 103001,
  1229. serialNumber: '103001Table1CustomerNo',
  1230. tableId: '103001Table1',
  1231. tableName: '打样信息表',
  1232. columnProp: 'customerNo',
  1233. headerAlign: 'center',
  1234. align: 'center',
  1235. columnLabel: '客户编码',
  1236. columnHidden: false,
  1237. columnImage: false,
  1238. columnSortable: false,
  1239. sortLv: 0,
  1240. status: true,
  1241. fixed: '',
  1242. columnWidth: 100
  1243. },
  1244. {
  1245. userId: this.$store.state.user.name,
  1246. functionId: 103001,
  1247. serialNumber: '103001Table1CustomerDesc',
  1248. tableId: '103001Table1',
  1249. tableName: '打样信息表',
  1250. columnProp: 'customerDesc',
  1251. headerAlign: 'center',
  1252. align: 'left',
  1253. columnLabel: '客户名称',
  1254. columnHidden: false,
  1255. columnImage: false,
  1256. columnSortable: false,
  1257. sortLv: 0,
  1258. status: true,
  1259. fixed: '',
  1260. columnWidth: 120
  1261. },
  1262. {
  1263. userId: this.$store.state.user.name,
  1264. functionId: 103001,
  1265. serialNumber: '103001Table1ProjectId',
  1266. tableId: '103001Table1',
  1267. tableName: '打样信息表',
  1268. columnProp: 'projectId',
  1269. headerAlign: 'center',
  1270. align: 'center',
  1271. columnLabel: '项目号',
  1272. columnHidden: false,
  1273. columnImage: false,
  1274. columnSortable: false,
  1275. sortLv: 0,
  1276. status: true,
  1277. fixed: '',
  1278. columnWidth: 110
  1279. },
  1280. {
  1281. userId: this.$store.state.user.name,
  1282. functionId: 103001,
  1283. serialNumber: '103001Table1ProjectName',
  1284. tableId: '103001Table1',
  1285. tableName: '打样信息表',
  1286. columnProp: 'projectName',
  1287. headerAlign: 'center',
  1288. align: 'left',
  1289. columnLabel: '项目名称',
  1290. columnHidden: false,
  1291. columnImage: false,
  1292. columnSortable: false,
  1293. sortLv: 0,
  1294. status: true,
  1295. fixed: '',
  1296. columnWidth: 120
  1297. },
  1298. {
  1299. userId: this.$store.state.user.name,
  1300. functionId: 103001,
  1301. serialNumber: '103001Table1TestPartNo',
  1302. tableId: '103001Table1',
  1303. tableName: '打样信息表',
  1304. columnProp: 'testPartNo',
  1305. headerAlign: 'center',
  1306. align: 'left',
  1307. columnLabel: 'PLM物料编码',
  1308. columnHidden: false,
  1309. columnImage: false,
  1310. columnSortable: false,
  1311. sortLv: 0,
  1312. status: true,
  1313. fixed: '',
  1314. columnWidth: 150
  1315. },
  1316. {
  1317. userId: this.$store.state.user.name,
  1318. functionId: 103001,
  1319. serialNumber: '103001Table1FinalPartNo',
  1320. tableId: '103001Table1',
  1321. tableName: '打样信息表',
  1322. columnProp: 'finalPartNo',
  1323. headerAlign: 'center',
  1324. align: 'left',
  1325. columnLabel: 'IFS物料编码',
  1326. columnHidden: false,
  1327. columnImage: false,
  1328. columnSortable: false,
  1329. sortLv: 0,
  1330. status: true,
  1331. fixed: '',
  1332. columnWidth: 140
  1333. },
  1334. {
  1335. userId: this.$store.state.user.name,
  1336. functionId: 103001,
  1337. serialNumber: '103001Table1PartName',
  1338. tableId: '103001Table1',
  1339. tableName: '打样信息表',
  1340. columnProp: 'partName',
  1341. headerAlign: 'center',
  1342. align: 'left',
  1343. columnLabel: '物料名称',
  1344. columnHidden: false,
  1345. columnImage: false,
  1346. columnSortable: false,
  1347. sortLv: 0,
  1348. status: true,
  1349. fixed: '',
  1350. columnWidth: 180
  1351. },
  1352. {
  1353. userId: this.$store.state.user.name,
  1354. functionId: 103001,
  1355. serialNumber: '103001Table1PartName',
  1356. tableId: '103001Table1',
  1357. tableName: '打样信息表',
  1358. columnProp: 'oriCodeNo',
  1359. headerAlign: 'center',
  1360. align: 'left',
  1361. columnLabel: '参数卡编码',
  1362. columnHidden: false,
  1363. columnImage: false,
  1364. columnSortable: false,
  1365. sortLv: 0,
  1366. status: true,
  1367. fixed: '',
  1368. columnWidth: 180
  1369. },
  1370. {
  1371. userId: this.$store.state.user.name,
  1372. functionId: 103001,
  1373. serialNumber: '103001Table1PartName',
  1374. tableId: '103001Table1',
  1375. tableName: '打样信息表',
  1376. columnProp: 'stage',
  1377. headerAlign: 'center',
  1378. align: 'left',
  1379. columnLabel: 'Production Stage',
  1380. columnHidden: false,
  1381. columnImage: false,
  1382. columnSortable: false,
  1383. sortLv: 0,
  1384. status: true,
  1385. fixed: '',
  1386. columnWidth: 180
  1387. },
  1388. {
  1389. userId: this.$store.state.user.name,
  1390. functionId: 103001,
  1391. serialNumber: '103001Table1CustomerPartNo',
  1392. tableId: '103001Table1',
  1393. tableName: '打样信息表',
  1394. columnProp: 'customerPartNo',
  1395. headerAlign: 'center',
  1396. align: 'left',
  1397. columnLabel: '客户物料编码',
  1398. columnHidden: false,
  1399. columnImage: false,
  1400. columnSortable: false,
  1401. sortLv: 0,
  1402. status: true,
  1403. fixed: '',
  1404. columnWidth: 100
  1405. },
  1406. {
  1407. userId: this.$store.state.user.name,
  1408. functionId: 103001,
  1409. serialNumber: '103001Table1TrackerName',
  1410. tableId: '103001Table1',
  1411. tableName: '打样信息表',
  1412. columnProp: 'trackerName',
  1413. headerAlign: 'center',
  1414. align: 'center',
  1415. columnLabel: 'CS',
  1416. columnHidden: false,
  1417. columnImage: false,
  1418. columnSortable: false,
  1419. sortLv: 0,
  1420. status: true,
  1421. fixed: '',
  1422. columnWidth: 80
  1423. },
  1424. {
  1425. userId: this.$store.state.user.name,
  1426. functionId: 103001,
  1427. serialNumber: '103001Table1EngineerName',
  1428. tableId: '103001Table1',
  1429. tableName: '打样信息表',
  1430. columnProp: 'engineerName',
  1431. headerAlign: 'center',
  1432. align: 'center',
  1433. columnLabel: 'NPI工程师',
  1434. columnHidden: false,
  1435. columnImage: false,
  1436. columnSortable: false,
  1437. sortLv: 0,
  1438. status: true,
  1439. fixed: '',
  1440. columnWidth: 80
  1441. },
  1442. {
  1443. userId: this.$store.state.user.name,
  1444. functionId: 103001,
  1445. serialNumber: '103001Table1EngineerName',
  1446. tableId: '103001Table1',
  1447. tableName: '打样信息表',
  1448. columnProp: 'approverName',
  1449. headerAlign: 'center',
  1450. align: 'center',
  1451. columnLabel: 'Approver',
  1452. columnHidden: false,
  1453. columnImage: false,
  1454. columnSortable: false,
  1455. sortLv: 0,
  1456. status: true,
  1457. fixed: '',
  1458. columnWidth: 80
  1459. },
  1460. {
  1461. userId: this.$store.state.user.name,
  1462. functionId: 103001,
  1463. serialNumber: '103001Table1PriorityLevel',
  1464. tableId: '103001Table1',
  1465. tableName: '打样信息表',
  1466. columnProp: 'priorityLevel',
  1467. headerAlign: 'center',
  1468. align: 'center',
  1469. columnLabel: '优先等级',
  1470. columnHidden: false,
  1471. columnImage: false,
  1472. columnSortable: false,
  1473. sortLv: 0,
  1474. status: true,
  1475. fixed: '',
  1476. columnWidth: 80
  1477. },
  1478. {
  1479. userId: this.$store.state.user.name,
  1480. functionId: 103001,
  1481. serialNumber: '103001Table1ProofingNumber',
  1482. tableId: '103001Table1',
  1483. tableName: '打样信息表',
  1484. columnProp: 'proofingNumber',
  1485. headerAlign: 'center',
  1486. align: 'right',
  1487. columnLabel: '打样数量',
  1488. columnHidden: false,
  1489. columnImage: false,
  1490. columnSortable: false,
  1491. sortLv: 0,
  1492. status: true,
  1493. fixed: '',
  1494. columnWidth: 80
  1495. },
  1496. {
  1497. userId: this.$store.state.user.name,
  1498. functionId: 103001,
  1499. serialNumber: '103001Table1ProofingNumber',
  1500. tableId: '103001Table1',
  1501. tableName: '打样信息表',
  1502. columnProp: 'proofingAmount',
  1503. headerAlign: 'center',
  1504. align: 'right',
  1505. columnLabel: '打样金额',
  1506. columnHidden: false,
  1507. columnImage: false,
  1508. columnSortable: false,
  1509. sortLv: 0,
  1510. status: true,
  1511. fixed: '',
  1512. columnWidth: 80
  1513. },
  1514. {
  1515. userId: this.$store.state.user.name,
  1516. functionId: 103001,
  1517. serialNumber: '103001Table1RequiredDeliveryDate',
  1518. tableId: '103001Table1',
  1519. tableName: '打样信息表',
  1520. columnProp: 'requiredDeliveryDate',
  1521. headerAlign: 'center',
  1522. align: 'center',
  1523. columnLabel: '要求交付日期',
  1524. columnHidden: false,
  1525. columnImage: false,
  1526. columnSortable: false,
  1527. sortLv: 0,
  1528. status: true,
  1529. fixed: '',
  1530. columnWidth: 160
  1531. },
  1532. {
  1533. userId: this.$store.state.user.name,
  1534. functionId: 103001,
  1535. serialNumber: '103001Table1ProofingStatus',
  1536. tableId: '103001Table1',
  1537. tableName: '打样信息表',
  1538. columnProp: 'proofingStatus',
  1539. headerAlign: 'center',
  1540. align: 'left',
  1541. columnLabel: '状态',
  1542. columnHidden: false,
  1543. columnImage: false,
  1544. columnSortable: false,
  1545. sortLv: 0,
  1546. status: true,
  1547. fixed: '',
  1548. columnWidth: 80
  1549. },
  1550. {
  1551. userId: this.$store.state.user.name,
  1552. functionId: 103001,
  1553. serialNumber: '103001Table1NodeName',
  1554. tableId: '103001Table1',
  1555. tableName: '打样信息表',
  1556. columnProp: 'nodeName',
  1557. headerAlign: 'center',
  1558. align: 'left',
  1559. columnLabel: '当前节点',
  1560. columnHidden: false,
  1561. columnImage: false,
  1562. columnSortable: false,
  1563. sortLv: 0,
  1564. status: true,
  1565. fixed: '',
  1566. columnWidth: 150
  1567. },
  1568. {
  1569. userId: this.$store.state.user.name,
  1570. functionId: 103001,
  1571. serialNumber: '103001Table1ApprovalUsername',
  1572. tableId: '103001Table1',
  1573. tableName: '打样信息表',
  1574. columnProp: 'approvalUsername',
  1575. headerAlign: 'center',
  1576. align: 'left',
  1577. columnLabel: '当前节点审批人',
  1578. columnHidden: false,
  1579. columnImage: false,
  1580. columnSortable: false,
  1581. sortLv: 0,
  1582. status: true,
  1583. fixed: '',
  1584. columnWidth: 150
  1585. },
  1586. {
  1587. userId: this.$store.state.user.name,
  1588. functionId: 103001,
  1589. serialNumber: '103001Table1CreateDate',
  1590. tableId: '103001Table1',
  1591. tableName: '打样信息表',
  1592. columnProp: 'createDate',
  1593. headerAlign: 'center',
  1594. align: 'center',
  1595. columnLabel: '创建时间',
  1596. columnHidden: false,
  1597. columnImage: false,
  1598. columnSortable: false,
  1599. sortLv: 0,
  1600. status: true,
  1601. fixed: '',
  1602. columnWidth: 160
  1603. },
  1604. {
  1605. userId: this.$store.state.user.name,
  1606. functionId: 103001,
  1607. serialNumber: '103001Table1CreateBy',
  1608. tableId: '103001Table1',
  1609. tableName: '打样信息表',
  1610. columnProp: 'createBy',
  1611. headerAlign: 'center',
  1612. align: 'center',
  1613. columnLabel: '创建人',
  1614. columnHidden: false,
  1615. columnImage: false,
  1616. columnSortable: false,
  1617. sortLv: 0,
  1618. status: true,
  1619. fixed: '',
  1620. columnWidth: 80
  1621. },
  1622. {
  1623. userId: this.$store.state.user.name,
  1624. functionId: 103001,
  1625. serialNumber: '103001Table1UpdateDate',
  1626. tableId: '103001Table1',
  1627. tableName: '打样信息表',
  1628. columnProp: 'updateDate',
  1629. headerAlign: 'center',
  1630. align: 'center',
  1631. columnLabel: '更新时间',
  1632. columnHidden: false,
  1633. columnImage: false,
  1634. columnSortable: false,
  1635. sortLv: 0,
  1636. status: true,
  1637. fixed: '',
  1638. columnWidth: 160
  1639. },
  1640. {
  1641. userId: this.$store.state.user.name,
  1642. functionId: 103001,
  1643. serialNumber: '103001Table1UpdateBy',
  1644. tableId: '103001Table1',
  1645. tableName: '打样信息表',
  1646. columnProp: 'updateBy',
  1647. headerAlign: 'center',
  1648. align: 'center',
  1649. columnLabel: '更新人',
  1650. columnHidden: false,
  1651. columnImage: false,
  1652. columnSortable: false,
  1653. sortLv: 0,
  1654. status: true,
  1655. fixed: '',
  1656. columnWidth: 80
  1657. }
  1658. ],
  1659. fileColumnList: [
  1660. {
  1661. userId: this.$store.state.user.name,
  1662. functionId: 103001,
  1663. serialNumber: '103001Table2FileName',
  1664. tableId: '103001Table2',
  1665. tableName: '文件信息表',
  1666. columnProp: 'fileName',
  1667. headerAlign: 'center',
  1668. align: 'center',
  1669. columnLabel: '文件名称',
  1670. columnHidden: false,
  1671. columnImage: false,
  1672. columnSortable: false,
  1673. sortLv: 0,
  1674. status: true,
  1675. fixed: '',
  1676. columnWidth: 140
  1677. },
  1678. {
  1679. userId: this.$store.state.user.name,
  1680. functionId: 103001,
  1681. serialNumber: '103001Table2FileRemark',
  1682. tableId: '103001Table2',
  1683. tableName: '文件信息表',
  1684. columnProp: 'fileRemark',
  1685. headerAlign: 'center',
  1686. align: 'center',
  1687. columnLabel: '备注',
  1688. columnHidden: false,
  1689. columnImage: false,
  1690. columnSortable: false,
  1691. sortLv: 0,
  1692. status: true,
  1693. fixed: '',
  1694. columnWidth: 240
  1695. },
  1696. // {
  1697. // userId: this.$store.state.user.name,
  1698. // functionId: 103001,
  1699. // serialNumber: '103001Table2OrderRef3',
  1700. // tableId: '103001Table2',
  1701. // tableName: '文件信息表',
  1702. // columnProp: 'orderRef3',
  1703. // headerAlign: 'center',
  1704. // align: 'center',
  1705. // columnLabel: '文件描述',
  1706. // columnHidden: false,
  1707. // columnImage: false,
  1708. // columnSortable: false,
  1709. // sortLv: 0,
  1710. // status: true,
  1711. // fixed: '',
  1712. // columnWidth: 120
  1713. // },
  1714. {
  1715. userId: this.$store.state.user.name,
  1716. functionId: 103001,
  1717. serialNumber: '103001Table2CreateDate',
  1718. tableId: '103001Table2',
  1719. tableName: '文件信息表',
  1720. columnProp: 'createDate',
  1721. headerAlign: 'center',
  1722. align: 'center',
  1723. columnLabel: '上传时间',
  1724. columnHidden: false,
  1725. columnImage: false,
  1726. columnSortable: false,
  1727. sortLv: 0,
  1728. status: true,
  1729. fixed: '',
  1730. columnWidth: 140
  1731. },
  1732. {
  1733. userId: this.$store.state.user.name,
  1734. functionId: 103001,
  1735. serialNumber: '103001Table2CreatedBy',
  1736. tableId: '103001Table2',
  1737. tableName: '文件信息表',
  1738. columnProp: 'createdBy',
  1739. headerAlign: 'center',
  1740. align: 'center',
  1741. columnLabel: '上传人',
  1742. columnHidden: false,
  1743. columnImage: false,
  1744. columnSortable: false,
  1745. sortLv: 0,
  1746. status: true,
  1747. fixed: '',
  1748. columnWidth: 140
  1749. }
  1750. ],
  1751. projectPartDetailList: [
  1752. {
  1753. userId: this.$store.state.user.name,
  1754. functionId: 102001,
  1755. serialNumber: '103001Table4TestPartNo',
  1756. tableId: '103001Table4',
  1757. tableName: '项目物料表',
  1758. columnProp: 'testPartNo',
  1759. headerAlign: 'center',
  1760. align: 'left',
  1761. columnLabel: 'PLM物料编码',
  1762. columnHidden: false,
  1763. columnImage: false,
  1764. columnSortable: false,
  1765. sortLv: 0,
  1766. status: true,
  1767. fixed: '',
  1768. columnWidth: 150
  1769. },
  1770. {
  1771. userId: this.$store.state.user.name,
  1772. functionId: 102001,
  1773. serialNumber: '103001Table4FinalPartNo',
  1774. tableId: '103001Table4',
  1775. tableName: '项目物料表',
  1776. columnProp: 'finalPartNo',
  1777. headerAlign: 'center',
  1778. align: 'left',
  1779. columnLabel: 'IFS物料编码',
  1780. columnHidden: false,
  1781. columnImage: false,
  1782. columnSortable: false,
  1783. sortLv: 0,
  1784. status: true,
  1785. fixed: '',
  1786. columnWidth: 120
  1787. },
  1788. {
  1789. userId: this.$store.state.user.name,
  1790. functionId: 102001,
  1791. serialNumber: '103001Table4PartDesc',
  1792. tableId: '103001Table4',
  1793. tableName: '项目物料表',
  1794. columnProp: 'partDesc',
  1795. headerAlign: 'center',
  1796. align: 'left',
  1797. columnLabel: '物料名称',
  1798. columnHidden: false,
  1799. columnImage: false,
  1800. columnSortable: false,
  1801. sortLv: 0,
  1802. status: true,
  1803. fixed: '',
  1804. columnWidth: 120
  1805. },
  1806. {
  1807. userId: this.$store.state.user.name,
  1808. functionId: 102001,
  1809. serialNumber: '103001Table4CustomerPartNo',
  1810. tableId: '103001Table4',
  1811. tableName: '项目物料表',
  1812. columnProp: 'customerPartNo',
  1813. headerAlign: 'center',
  1814. align: 'left',
  1815. columnLabel: '客户料号',
  1816. columnHidden: false,
  1817. columnImage: false,
  1818. columnSortable: false,
  1819. sortLv: 0,
  1820. status: true,
  1821. fixed: '',
  1822. columnWidth: 120
  1823. },
  1824. {
  1825. userId: this.$store.state.user.name,
  1826. functionId: 102001,
  1827. serialNumber: '103001Table4PartSpec',
  1828. tableId: '103001Table4',
  1829. tableName: '项目物料表',
  1830. columnProp: 'partSpec',
  1831. headerAlign: 'center',
  1832. align: 'center',
  1833. columnLabel: '产品规格',
  1834. columnHidden: false,
  1835. columnImage: false,
  1836. columnSortable: false,
  1837. sortLv: 0,
  1838. status: true,
  1839. fixed: '',
  1840. columnWidth: 120
  1841. }, {
  1842. userId: this.$store.state.user.name,
  1843. functionId: 102001,
  1844. serialNumber: '103001Table4PartTypeDesc',
  1845. tableId: '103001Table4',
  1846. tableName: '项目物料表',
  1847. columnProp: 'partTypeDesc',
  1848. headerAlign: 'center',
  1849. align: 'center',
  1850. columnLabel: '产品类型',
  1851. columnHidden: false,
  1852. columnImage: false,
  1853. columnSortable: false,
  1854. sortLv: 0,
  1855. status: true,
  1856. fixed: '',
  1857. columnWidth: 120
  1858. },
  1859. {
  1860. userId: this.$store.state.user.name,
  1861. functionId: 102001,
  1862. serialNumber: '103001Table4Type',
  1863. tableId: '103001Table4',
  1864. tableName: '项目物料表',
  1865. columnProp: 'type',
  1866. headerAlign: 'center',
  1867. align: 'center',
  1868. columnLabel: '制造类型',
  1869. columnHidden: false,
  1870. columnImage: false,
  1871. columnSortable: false,
  1872. sortLv: 0,
  1873. status: true,
  1874. fixed: '',
  1875. columnWidth: 120
  1876. },
  1877. {
  1878. userId: this.$store.state.user.name,
  1879. functionId: 102001,
  1880. serialNumber: '103001Table4UmId',
  1881. tableId: '103001Table4',
  1882. tableName: '项目物料表',
  1883. columnProp: 'umId',
  1884. headerAlign: 'center',
  1885. align: 'center',
  1886. columnLabel: '单位',
  1887. columnHidden: false,
  1888. columnImage: false,
  1889. columnSortable: false,
  1890. sortLv: 0,
  1891. status: true,
  1892. fixed: '',
  1893. columnWidth: 100
  1894. },
  1895. ],
  1896. columnAddressList: [
  1897. {
  1898. userId: this.$store.state.user.name,
  1899. functionId: 103001,
  1900. serialNumber: '103001Table4AddressName',
  1901. tableId: '103001Table4',
  1902. tableName: '联系地址表',
  1903. columnProp: 'addressName',
  1904. headerAlign: 'center',
  1905. align: 'center',
  1906. columnLabel: '联系地址',
  1907. columnHidden: false,
  1908. columnImage: false,
  1909. status: true,
  1910. fixed: '',
  1911. },
  1912. {
  1913. userId: this.$store.state.user.name,
  1914. functionId: 103001,
  1915. serialNumber: '103001Table4ContactStatus',
  1916. tableId: '103001Table4',
  1917. tableName: '联系地址表',
  1918. columnProp: 'addressStatus',
  1919. headerAlign: 'center',
  1920. align: 'center',
  1921. columnLabel: '地址状态',
  1922. columnHidden: false,
  1923. columnImage: false,
  1924. status: true,
  1925. fixed: '',
  1926. },
  1927. ],
  1928. columnContactList: [
  1929. {
  1930. userId: this.$store.state.user.name,
  1931. functionId: 103001,
  1932. serialNumber: '103001Table5ContactName',
  1933. tableId: '103001Table5',
  1934. tableName: '客户联系人表',
  1935. columnProp: 'contactName',
  1936. headerAlign: 'center',
  1937. align: 'center',
  1938. columnLabel: '客户负责人',
  1939. columnHidden: false,
  1940. columnImage: false,
  1941. status: true,
  1942. fixed: '',
  1943. },
  1944. {
  1945. userId: this.$store.state.user.name,
  1946. functionId: 103001,
  1947. serialNumber: '103001Table5ContactPhoneNumber1',
  1948. tableId: '103001Table5',
  1949. tableName: '客户联系人表',
  1950. columnProp: 'contactPhoneNumber1',
  1951. headerAlign: 'center',
  1952. align: 'center',
  1953. columnLabel: '联系方式',
  1954. columnHidden: false,
  1955. columnImage: false,
  1956. status: true,
  1957. fixed: '',
  1958. },
  1959. {
  1960. userId: this.$store.state.user.name,
  1961. functionId: 103001,
  1962. serialNumber: '103001Table5PrimaryContact',
  1963. tableId: '103001Table5',
  1964. tableName: '客户联系人表',
  1965. columnProp: 'primaryContact',
  1966. headerAlign: 'center',
  1967. align: 'center',
  1968. columnLabel: '默认联系人',
  1969. columnHidden: false,
  1970. columnImage: false,
  1971. status: true,
  1972. fixed: '',
  1973. },
  1974. {
  1975. userId: this.$store.state.user.name,
  1976. functionId: 103001,
  1977. serialNumber: '103001Table5ContactStatus',
  1978. tableId: '103001Table5',
  1979. tableName: '客户联系人表',
  1980. columnProp: 'contactStatus',
  1981. headerAlign: 'center',
  1982. align: 'center',
  1983. columnLabel: '人员状态',
  1984. columnHidden: false,
  1985. columnImage: false,
  1986. status: true,
  1987. fixed: '',
  1988. },
  1989. ],
  1990. // ======== 必填规则 ========
  1991. rules: {
  1992. customerNo: [
  1993. {
  1994. required: true,
  1995. message: '客户编码不能为空',
  1996. trigger: ['change', 'blur']
  1997. }
  1998. ],
  1999. trackerName: [
  2000. {
  2001. required: true,
  2002. message: 'CS不能为空',
  2003. trigger: ['change', 'blur']
  2004. }
  2005. ],
  2006. proofingNumber: [
  2007. {
  2008. required: true,
  2009. message: '打印数量不能为空',
  2010. trigger: ['change', 'blur']
  2011. }
  2012. ],
  2013. projectId: [
  2014. {
  2015. required: true,
  2016. message: '项目编码不能为空',
  2017. trigger: ['change', 'blur']
  2018. }
  2019. ],
  2020. engineerName: [
  2021. {
  2022. required: true,
  2023. message: 'NPI工程师不能为空',
  2024. trigger: ['change', 'blur']
  2025. }
  2026. ],
  2027. priorityLevel: [
  2028. {
  2029. required: true,
  2030. message: '优先等级不能为空',
  2031. trigger: ['change', 'blur']
  2032. }
  2033. ],
  2034. requiredDeliveryDate: [
  2035. {
  2036. required: true,
  2037. message: '要求交付日期不能为空',
  2038. trigger: ['change', 'blur']
  2039. }
  2040. ],
  2041. sendSamplesUsage: [
  2042. {
  2043. required: true,
  2044. message: '要求样品用途不能为空',
  2045. trigger: ['change', 'blur']
  2046. }
  2047. ]
  2048. },
  2049. enterResultRules: {
  2050. actualityDeliveryDate: [
  2051. {
  2052. required: true,
  2053. message: ' ',
  2054. trigger: 'change'
  2055. }
  2056. ],
  2057. proofingResultInformation: [
  2058. {
  2059. required: true,
  2060. message: ' ',
  2061. trigger: 'change'
  2062. }
  2063. ]
  2064. },
  2065. submitResultRules: {
  2066. actualitySendSamplesDate: [
  2067. {
  2068. required: true,
  2069. message: ' ',
  2070. trigger: 'change'
  2071. }
  2072. ],
  2073. sendSamplesMethod: [
  2074. {
  2075. required: true,
  2076. message: ' ',
  2077. trigger: 'change'
  2078. }
  2079. ]
  2080. },
  2081. customerResponseRules: {
  2082. actualityReplyDate: [
  2083. {
  2084. required: true,
  2085. message: ' ',
  2086. trigger: 'change'
  2087. }
  2088. ],
  2089. confirmResults: [
  2090. {
  2091. required: true,
  2092. message: ' ',
  2093. trigger: 'change'
  2094. }
  2095. ],
  2096. confirmBy: [
  2097. {
  2098. required: true,
  2099. message: ' ',
  2100. trigger: 'change'
  2101. }
  2102. ]
  2103. },
  2104. // ======== 复选数据集 ========
  2105. proofingSelections: [],
  2106. projectPartListSelections: [],
  2107. projectPartSelectionMap: {},
  2108. projectPartTableSyncingSelection: false,
  2109. // ======== 选中的当前行数据 ========
  2110. proofingCurrentRow: {},
  2111. // ======== 模态框开关控制 ========
  2112. filterVisible: false,
  2113. isFilterSearch: false,
  2114. filterSearchData: {},
  2115. modalFlag: false,
  2116. modalDisableFlag: false,
  2117. enterResultModalFlag: false,
  2118. submitResultModalFlag: false,
  2119. customerResponseModalFlag: false,
  2120. // 选择项目弹框开关
  2121. chooseProjectListFlag: false,
  2122. //项目搜索条件
  2123. searchProjectData: {
  2124. site: this.$store.state.user.site,
  2125. projectId: undefined,
  2126. projectName: undefined,
  2127. customerId: undefined,
  2128. },
  2129. // 项目集合
  2130. projectList: [],
  2131. addressModelFlag: false,
  2132. contactModelFlag: false,
  2133. columnFieldList1: [],
  2134. columnFieldList2: [],
  2135. ossColumns: [
  2136. {
  2137. userId: this.$store.state.user.name,
  2138. functionId: 103001,
  2139. serialNumber: '103001Table2FileName',
  2140. tableId: '103001Table2',
  2141. tableName: '文件信息表',
  2142. columnProp: 'fileName',
  2143. headerAlign: 'center',
  2144. align: 'center',
  2145. columnLabel: '文件名称',
  2146. columnHidden: false,
  2147. columnImage: false,
  2148. columnSortable: false,
  2149. sortLv: 0,
  2150. status: true,
  2151. fixed: '',
  2152. columnWidth: 140
  2153. },
  2154. {
  2155. userId: this.$store.state.user.name,
  2156. functionId: 103001,
  2157. serialNumber: '103001Table2FileRemark',
  2158. tableId: '103001Table2',
  2159. tableName: '文件信息表',
  2160. columnProp: 'fileRemark',
  2161. headerAlign: 'center',
  2162. align: 'center',
  2163. columnLabel: '备注',
  2164. columnHidden: false,
  2165. columnImage: false,
  2166. columnSortable: false,
  2167. sortLv: 0,
  2168. status: true,
  2169. fixed: '',
  2170. columnWidth: 240
  2171. },
  2172. // {
  2173. // userId: this.$store.state.user.name,
  2174. // functionId: 103001,
  2175. // serialNumber: '103001Table2OrderRef3',
  2176. // tableId: '103001Table2',
  2177. // tableName: '文件信息表',
  2178. // columnProp: 'orderRef3',
  2179. // headerAlign: 'center',
  2180. // align: 'center',
  2181. // columnLabel: '文件描述',
  2182. // columnHidden: false,
  2183. // columnImage: false,
  2184. // columnSortable: false,
  2185. // sortLv: 0,
  2186. // status: true,
  2187. // fixed: '',
  2188. // columnWidth: 120
  2189. // },
  2190. {
  2191. userId: this.$store.state.user.name,
  2192. functionId: 103001,
  2193. serialNumber: '103001Table2CreateDate',
  2194. tableId: '103001Table2',
  2195. tableName: '文件信息表',
  2196. columnProp: 'createDate',
  2197. headerAlign: 'center',
  2198. align: 'center',
  2199. columnLabel: '上传时间',
  2200. columnHidden: false,
  2201. columnImage: false,
  2202. columnSortable: false,
  2203. sortLv: 0,
  2204. status: true,
  2205. fixed: '',
  2206. columnWidth: 140
  2207. },
  2208. {
  2209. userId: this.$store.state.user.name,
  2210. functionId: 103001,
  2211. serialNumber: '103001Table2CreatedBy',
  2212. tableId: '103001Table2',
  2213. tableName: '文件信息表',
  2214. columnProp: 'createBy',
  2215. headerAlign: 'center',
  2216. align: 'center',
  2217. columnLabel: '上传人',
  2218. columnHidden: false,
  2219. columnImage: false,
  2220. columnSortable: false,
  2221. sortLv: 0,
  2222. status: true,
  2223. fixed: '',
  2224. columnWidth: 140
  2225. }
  2226. ],
  2227. rejectVisible: false,
  2228. rejectOpinion: '',
  2229. submitLoading: false,
  2230. batchIssuingLoading: false,
  2231. detailVisible: false,
  2232. no: 1,
  2233. size: 20,
  2234. total: 0,
  2235. queryLoading: false,
  2236. superAdmin: false,
  2237. }
  2238. },
  2239. mounted() {
  2240. this.$nextTick(() => {
  2241. this.height = window.innerHeight / 2 - 50;
  2242. /*第二个表格高度的动态调整*/
  2243. this.secondHeight = window.innerHeight / 2 - 206;
  2244. })
  2245. this.fetchNodeOptions()
  2246. },
  2247. created() {
  2248. this.handleRouteQuery()
  2249. this.checkSuperAdmin()
  2250. },
  2251. activated() {
  2252. this.handleRouteQuery()
  2253. },
  2254. methods: {
  2255. headerFieldDisabled(fieldId) {
  2256. return this.detailVisible || this.columnFlagByHeader(fieldId)
  2257. },
  2258. delegateFieldDisabled(fieldId) {
  2259. return this.detailVisible || this.columnFlagByDelegateAccess(fieldId)
  2260. },
  2261. // 新增都可填。编辑只有当前节点明确勾选可编辑(updateFlag 为 Y)的字段才能改。
  2262. columnFlagByHeader(value) {
  2263. return !this.fieldEditable(this.columnFieldList1, value)
  2264. },
  2265. columnFlagByDelegateAccess(value) {
  2266. return !this.fieldEditable(this.columnFieldList2, value)
  2267. },
  2268. fieldEditable(list, fieldId) {
  2269. if (this.modalData.flag === '1') {
  2270. return true
  2271. }
  2272. const rows = (list || []).filter(item => item.fieldId === fieldId)
  2273. return rows.length > 0 && rows.every(item => item.updateFlag === 'Y')
  2274. },
  2275. fetchNodeOptions() {
  2276. getNodeList(this.searchData).then(({ data }) => {
  2277. if (data && data.code === 0) {
  2278. this.nodeOptions = data.rows.map(item => ({
  2279. id: item.nodeId,
  2280. name: item.nodeName
  2281. }));
  2282. } else {
  2283. this.$message.error('获取节点列表失败');
  2284. }
  2285. }).catch(error => {
  2286. this.$message.error('请求失败:' + error);
  2287. });
  2288. },
  2289. // 校验是否为超级管理员
  2290. checkSuperAdmin () {
  2291. checkSuperAdmin().then(({data}) => {
  2292. this.superAdmin = data.superAdmin
  2293. })
  2294. },
  2295. handleRouteQuery(allowDefault) {
  2296. const routeType = pickRouteValue(this.$route, 'type')
  2297. const proofingNo = pickRouteValue(this.$route, ['proofingNo', 'docNo'])
  2298. const routeKey = [routeType, proofingNo].join('|')
  2299. if (this._lastLockRouteKey === routeKey) {
  2300. return
  2301. }
  2302. this._lastLockRouteKey = routeKey
  2303. if (routeType === 'tokenLogin' || proofingNo) {
  2304. const params = {
  2305. ...this.searchData,
  2306. site: pickRouteValue(this.$route, 'site') || this.$store.state.user.site,
  2307. proofingBatchNo: '',
  2308. proofingNo: proofingNo,
  2309. limit: this.pageSize,
  2310. page: 1,
  2311. menuId: this.$route.meta.menuId
  2312. }
  2313. this.dataListLoading = true
  2314. proofingInformationSearch(params).then(({data}) => {
  2315. if (data && data.code === 0) {
  2316. this.dataList = data.page.list
  2317. this.totalPage = data.page.totalCount
  2318. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2319. if (this.totalPage > 0) {
  2320. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2321. this.refreshCurrentTabTable()
  2322. this.proofingClickRow(this.dataList[0])
  2323. if (routeType === 'tokenLogin') {
  2324. this.updateModal(this.dataList[0])
  2325. }
  2326. } else {
  2327. this.$refs.proofingTable.setCurrentRow({})
  2328. this.refreshCurrentTabTable()
  2329. this.testClickRow({})
  2330. }
  2331. }
  2332. this.dataListLoading = false
  2333. })
  2334. } else if (allowDefault !== false) {
  2335. this.getDataList();
  2336. }
  2337. },
  2338. // ======== 分页相关方法 ========
  2339. /**
  2340. * 每页数
  2341. * @param val
  2342. */
  2343. sizeChangeHandle(val) {
  2344. this.pageSize = val
  2345. this.pageIndex = 1
  2346. if ( this.isFilterSearch === false){
  2347. this.getDataList()
  2348. } else {
  2349. this.searchByAnyField(this.filterSearchData)
  2350. }
  2351. },
  2352. /**
  2353. * 当前页
  2354. * @param val
  2355. */
  2356. currentChangeHandle(val) {
  2357. this.pageIndex = val
  2358. if ( this.isFilterSearch === false){
  2359. this.getDataList()
  2360. } else {
  2361. this.searchByAnyField(this.filterSearchData)
  2362. }
  2363. },
  2364. // ======== 复选框操作相关方法 ========
  2365. /**
  2366. * 选中一行
  2367. * @param row
  2368. */
  2369. projectPartClickRow(row) {
  2370. if (this.modalData.flag === '1') {
  2371. this.$refs.projectPartTable.toggleRowSelection(row);
  2372. this.confirmProjectPart();
  2373. }
  2374. },
  2375. /**
  2376. * 多选
  2377. * @param val
  2378. */
  2379. selectionProjectPart(val) {
  2380. if (this.projectPartTableSyncingSelection) {
  2381. return
  2382. }
  2383. let selectedKeySet = new Set(val.map(item => this.getRowKeys(item)))
  2384. this.projectPartList.forEach(item => {
  2385. let key = this.getRowKeys(item)
  2386. if (selectedKeySet.has(key)) {
  2387. this.$set(this.projectPartSelectionMap, key, item)
  2388. } else {
  2389. this.$delete(this.projectPartSelectionMap, key)
  2390. }
  2391. })
  2392. this.projectPartListSelections = Object.values(this.projectPartSelectionMap)
  2393. },
  2394. /**
  2395. * 获取唯一值,一般都为 id
  2396. * @param row
  2397. * @returns {*}
  2398. */
  2399. getRowKeys(row) {
  2400. return row.testPartNo;
  2401. },
  2402. /**
  2403. * 未知
  2404. * @returns {boolean}
  2405. */
  2406. selectFlag() {
  2407. return true;
  2408. },
  2409. // ======== 页签切换相关方法 ========
  2410. /**
  2411. * 列表表格选择替换
  2412. * @param tab
  2413. * @param event
  2414. */
  2415. tabClick(tab, event) {
  2416. // 刷新列表数据
  2417. this.refreshCurrentTabTable()
  2418. },
  2419. /**
  2420. * 当前值发生变化的时候修改
  2421. * @param row
  2422. * @param oldRow
  2423. */
  2424. changeCurrentRow(row, oldRow) {
  2425. // 判断是否是获取焦点的事件
  2426. if (row) {
  2427. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2428. //刷新当前页表
  2429. this.refreshCurrentTabTable()
  2430. }
  2431. },
  2432. /**
  2433. * 刷新页签的table数据
  2434. */
  2435. refreshCurrentTabTable() {
  2436. if (this.activeTable === 'proofing_result') {
  2437. this.getProofingResult()
  2438. } else if (this.activeTable === 'project_information') {
  2439. this.getProjectInformation()
  2440. } else if (this.activeTable === 'customer_information') {
  2441. this.getCustomerInformation()
  2442. }
  2443. // else if (this.activeTable === 'proofing_file') {
  2444. // this.getProofingFile()
  2445. // }
  2446. },
  2447. // getProofingFile(){
  2448. //
  2449. // },
  2450. // ======== 列表数据刷新方法 ========
  2451. /**
  2452. * 获取数据列表
  2453. */
  2454. getDataList() {
  2455. if (localStorage.getItem('proofingData') !== undefined) {
  2456. let data = JSON.parse(localStorage.getItem('proofingData'));
  2457. if (data) {
  2458. this.searchData.proofingBatchNo = ''
  2459. this.searchData.proofingNo = data.proofingNo
  2460. }
  2461. localStorage.removeItem('proofingData');
  2462. }
  2463. this.searchData.limit = this.pageSize
  2464. this.searchData.page = this.pageIndex
  2465. let params = {
  2466. ...this.searchData,
  2467. createBy: this.$store.state.user.name,
  2468. }
  2469. proofingInformationSearch(params).then(({data}) => {
  2470. if (data.code === 0) {
  2471. this.dataList = data.page.list
  2472. this.pageIndex = data.page.currPage
  2473. this.pageSize = data.page.pageSize
  2474. this.totalPage = data.page.totalCount
  2475. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2476. // 判断是否全部存在数据
  2477. if (this.totalPage > 0) {
  2478. //设置选中行
  2479. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2480. //加载当前的页签的table
  2481. this.refreshCurrentTabTable()
  2482. this.proofingClickRow(this.dataList[0])
  2483. } else {
  2484. //设置选中行
  2485. this.$refs.proofingTable.setCurrentRow({})
  2486. // 加载当前的页签的table
  2487. this.refreshCurrentTabTable()
  2488. this.testClickRow({})
  2489. }
  2490. }
  2491. this.isFilterSearch = false
  2492. this.dataListLoading = false
  2493. })
  2494. },
  2495. /**
  2496. * 获取打样结果列表
  2497. */
  2498. getProofingResult() {
  2499. let tempData = {
  2500. site: this.$store.state.user.site,
  2501. proofingNo: this.proofingCurrentRow.proofingNo
  2502. }
  2503. // 打样结果对象
  2504. proofingResultSearch(tempData).then(({data}) => {
  2505. if (data && data.code === 0) {
  2506. this.proofingResultData = data.rows[0]
  2507. } else {
  2508. this.proofingResultData = {}
  2509. }
  2510. })
  2511. // 附件列表
  2512. this.getFileContentData()
  2513. },
  2514. /**
  2515. * 获取项目信息
  2516. */
  2517. getProjectInformation() {
  2518. let tempData = {
  2519. site: this.$store.state.user.site,
  2520. projectId: this.proofingCurrentRow.projectId
  2521. }
  2522. // 报价结果对象
  2523. getProjectInformation(tempData).then(({data}) => {
  2524. if (data && data.code === 0) {
  2525. this.projectInformationData = data.rows[0]
  2526. } else {
  2527. this.projectInformationData = {}
  2528. }
  2529. })
  2530. },
  2531. /**
  2532. * 获取客户信息
  2533. */
  2534. getCustomerInformation() {
  2535. let tempData = {
  2536. site: this.$store.state.user.site,
  2537. customerNo: this.proofingCurrentRow.customerNo
  2538. }
  2539. // 报价结果对象
  2540. getCustomerInformation(tempData).then(({data}) => {
  2541. if (data && data.code === 0) {
  2542. this.customerInformationData = data.rows[0]
  2543. } else {
  2544. this.customerInformationData = {}
  2545. }
  2546. })
  2547. },
  2548. // ======== 新增/编辑模态框 ========
  2549. /**
  2550. * 报价信息新增模态框
  2551. */
  2552. addModal() {
  2553. this.searchDelegateAccessByUser();
  2554. this.modalData.createBy = this.$store.state.user.name
  2555. this.columnFieldList1 = []
  2556. this.columnFieldList2 = []
  2557. this.editFormKey += 1
  2558. this.modalDisableFlag = false
  2559. this.modalFlag = true
  2560. },
  2561. /**
  2562. * 报价信息编辑模态框
  2563. * @param row
  2564. */
  2565. async updateModal(row) {
  2566. await this.getNodeAuthority(row)
  2567. this.modalData = {
  2568. flag: '2',
  2569. title: '打样编辑-' + row.proofingNo,
  2570. site: row.site,
  2571. proofingNo: row.proofingNo,
  2572. customerNo: row.customerNo,
  2573. customerDesc: row.customerDesc,
  2574. projectId: row.projectId,
  2575. projectName: row.projectName,
  2576. tracker: row.tracker,
  2577. trackerName: row.trackerName,
  2578. testPartNo: row.testPartNo,
  2579. partName: row.partName,
  2580. engineer: row.engineer,
  2581. engineerName: row.engineerName,
  2582. approver: row.approver,
  2583. approverName: row.approverName,
  2584. priorityLevel: row.priorityLevel,
  2585. proofingNumber: row.proofingNumber,
  2586. requiredDeliveryDate: row.requiredDeliveryDate,
  2587. remark: row.remark,
  2588. technicalConsiderations: row.technicalConsiderations,
  2589. isNeedToSendSamples: row.isNeedToSendSamples,
  2590. sendSamplesAddress: row.sendSamplesAddress,
  2591. consignee: row.consignee,
  2592. consigneeContact: row.consigneeContact,
  2593. actualityDeliveryDate: row.actualityDeliveryDate,
  2594. proofingResultInformation: row.proofingResultInformation,
  2595. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2596. sendSamplesMethod: row.sendSamplesMethod,
  2597. deliverGoodsInformation: row.deliverGoodsInformation,
  2598. deliverGoodsRemark: row.deliverGoodsRemark,
  2599. actualityReplyDate: row.actualityReplyDate,
  2600. confirmResults: row.confirmResults,
  2601. confirmBy: row.confirmBy,
  2602. confirmInformation: row.confirmInformation,
  2603. proofingStatus: row.proofingStatus,
  2604. proofingResultStatus: row.proofingResultStatus,
  2605. nextToDo: row.nextToDo,
  2606. updateBy: this.$store.state.user.name,
  2607. nodeConclusion: '',
  2608. stepId: row.stepId,
  2609. rejectFlag: row.rejectFlag,
  2610. rejectStepId: row.rejectStepId,
  2611. isReject: row.isReject,
  2612. nodeId: row.nodeId,
  2613. approvalUsername: row.approvalUsername,
  2614. proofingAmount: row.proofingAmount,
  2615. sendSamplesUsage: row.sendSamplesUsage
  2616. }
  2617. this.searchDelegateAccessByUser();
  2618. this.editFormKey += 1
  2619. this.modalDisableFlag = true
  2620. this.modalFlag = true
  2621. },
  2622. async getDetailData(row) {
  2623. this.detailVisible = true
  2624. await this.getNodeAuthority(row)
  2625. this.modalData = {
  2626. flag: '2',
  2627. title: '打样编辑-' + row.proofingNo,
  2628. site: row.site,
  2629. proofingNo: row.proofingNo,
  2630. customerNo: row.customerNo,
  2631. customerDesc: row.customerDesc,
  2632. projectId: row.projectId,
  2633. projectName: row.projectName,
  2634. tracker: row.tracker,
  2635. trackerName: row.trackerName,
  2636. testPartNo: row.testPartNo,
  2637. partName: row.partName,
  2638. engineer: row.engineer,
  2639. engineerName: row.engineerName,
  2640. approver: row.approver,
  2641. approverName: row.approverName,
  2642. priorityLevel: row.priorityLevel,
  2643. proofingNumber: row.proofingNumber,
  2644. requiredDeliveryDate: row.requiredDeliveryDate,
  2645. remark: row.remark,
  2646. technicalConsiderations: row.technicalConsiderations,
  2647. isNeedToSendSamples: row.isNeedToSendSamples,
  2648. sendSamplesAddress: row.sendSamplesAddress,
  2649. consignee: row.consignee,
  2650. consigneeContact: row.consigneeContact,
  2651. actualityDeliveryDate: row.actualityDeliveryDate,
  2652. proofingResultInformation: row.proofingResultInformation,
  2653. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2654. sendSamplesMethod: row.sendSamplesMethod,
  2655. deliverGoodsInformation: row.deliverGoodsInformation,
  2656. deliverGoodsRemark: row.deliverGoodsRemark,
  2657. actualityReplyDate: row.actualityReplyDate,
  2658. confirmResults: row.confirmResults,
  2659. confirmBy: row.confirmBy,
  2660. confirmInformation: row.confirmInformation,
  2661. proofingStatus: row.proofingStatus,
  2662. proofingResultStatus: row.proofingResultStatus,
  2663. nextToDo: row.nextToDo,
  2664. updateBy: this.$store.state.user.name,
  2665. nodeConclusion: '',
  2666. stepId: row.stepId,
  2667. rejectFlag: row.rejectFlag,
  2668. rejectStepId: row.rejectStepId,
  2669. isReject: row.isReject,
  2670. nodeId: row.nodeId,
  2671. sendSamplesUsage: row.sendSamplesUsage
  2672. }
  2673. this.searchDelegateAccessByUser();
  2674. this.editFormKey += 1
  2675. this.modalDisableFlag = true
  2676. this.modalFlag = true
  2677. },
  2678. // ======== 新增/编辑/删除方法 ========
  2679. /**
  2680. * 获取项目物料列表
  2681. */
  2682. openModalDialog() {
  2683. if (this.modalData.proofingNo) {
  2684. this.searchDelegateAccess();
  2685. }
  2686. if (this.modalData.flag !== '1'){
  2687. this.projectPartData.testPartNo = this.modalData.testPartNo;
  2688. } else {
  2689. this.projectPartData.testPartNo = '';
  2690. }
  2691. this.initProjectPartSelectionMapFromModalData()
  2692. this.getProjectPartList();
  2693. },
  2694. getProjectPartList() {
  2695. if (!this.modalData.projectId) {
  2696. this.projectPartList = [];
  2697. return
  2698. }
  2699. this.projectPartData.projectId = this.modalData.projectId;
  2700. // 查询所有项目物料
  2701. let params = {
  2702. ...this.projectPartData,
  2703. no:this.no,
  2704. size:this.size,
  2705. }
  2706. this.queryLoading = true
  2707. getProjectPartList(params).then(({data}) => {
  2708. if (data && data.code === 0) {
  2709. this.projectPartList = data.rows
  2710. this.total = data.total
  2711. this.$nextTick(() => this.syncProjectPartSelectionToTable())
  2712. // this.projectPartModelFlag = true
  2713. } else {
  2714. this.$message.warning(data.msg)
  2715. }
  2716. this.queryLoading = false
  2717. }).catch(error => {
  2718. this.queryLoading = false
  2719. this.$message.error(error)
  2720. })
  2721. },
  2722. searchProjectPartList() {
  2723. this.no = 1
  2724. this.getProjectPartList()
  2725. },
  2726. /**
  2727. * 确认多选项目物料
  2728. */
  2729. confirmProjectPart() {
  2730. this.modalData.testPartNo = ''
  2731. this.modalData.partName = ''
  2732. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2733. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2734. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2735. }
  2736. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2737. this.modalData.partName = this.modalData.partName.substring(1)
  2738. this.projectPartModelFlag = false
  2739. },
  2740. /**
  2741. * 客户信息新增/编辑
  2742. */
  2743. saveData() {
  2744. this.$refs.modalForm.validate(async (valid, obj) => {
  2745. if (!valid) {
  2746. let i = 1;
  2747. for (let key in obj) {
  2748. this.$message.error(obj[key][0].message);
  2749. if (i === 1){
  2750. return
  2751. }
  2752. i++;
  2753. }
  2754. } else {
  2755. if (!(await this.validateCustomerAndProject())) {
  2756. return
  2757. }
  2758. if (this.projectPartListSelections.length <= 0) {
  2759. this.$message.warning('请选择项目料号')
  2760. return
  2761. }
  2762. this.confirmProjectPart();
  2763. // 将选中的 人员信息添加到请求
  2764. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2765. if (this.modalData.flag === '1') {
  2766. this.saveProofing()
  2767. } else {
  2768. this.updateProofing()
  2769. }
  2770. }
  2771. })
  2772. },
  2773. updateProofing() {
  2774. proofingInformationEdit(this.modalData).then(({data}) => {
  2775. if (data && data.code === 0) {
  2776. this.getDataList()
  2777. this.modalFlag = false
  2778. this.$message({
  2779. message: '操作成功',
  2780. type: 'success',
  2781. duration: 1500,
  2782. onClose: () => {
  2783. }
  2784. })
  2785. } else {
  2786. this.$alert(data.msg, '错误', {
  2787. confirmButtonText: '确定'
  2788. })
  2789. }
  2790. })
  2791. },
  2792. saveProofing() {
  2793. proofingInformationSave(this.modalData).then(({data}) => {
  2794. if (data && data.code === 0) {
  2795. if (data.proofingBatchNo) {
  2796. this.searchData.proofingBatchNo = data.proofingBatchNo
  2797. this.searchData.proofingNo = ''
  2798. } else {
  2799. this.searchData.proofingNo = data.proofingNo
  2800. this.searchData.proofingBatchNo = ''
  2801. }
  2802. this.pageIndex = 1
  2803. this.getDataList()
  2804. this.modalFlag = false
  2805. this.$message.success('操作成功')
  2806. } else {
  2807. this.$alert(data.msg, '错误', {
  2808. confirmButtonText: '确定'
  2809. })
  2810. }
  2811. })
  2812. },
  2813. /**
  2814. * 验证必填项
  2815. */
  2816. validateDataValue() {
  2817. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2818. this.$message.warning('请选择客户编码!')
  2819. return
  2820. }
  2821. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2822. this.$message.warning('请选择客户名称!')
  2823. return
  2824. }
  2825. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2826. this.$message.warning('请选择CS编码!')
  2827. return
  2828. }
  2829. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2830. this.$message.warning('请选择CS名称!')
  2831. return
  2832. }
  2833. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2834. this.$message.warning('请选择项目编码!')
  2835. return
  2836. }
  2837. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2838. this.$message.warning('请选择项目名称!')
  2839. return
  2840. }
  2841. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2842. // this.$message.warning('请选择工程师编码!')
  2843. // return
  2844. // }
  2845. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2846. // this.$message.warning('请选择工程师名称!')
  2847. // return
  2848. // }
  2849. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2850. this.$message.warning('请输入正确的打样数量!')
  2851. return
  2852. }
  2853. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2854. // this.$message.warning('请选择优先等级!')
  2855. // return
  2856. // }
  2857. if (!this.modalData.requiredDeliveryDate) {
  2858. this.$message.warning('请输入要求交付日期!')
  2859. return
  2860. }
  2861. },
  2862. /**
  2863. * 打样信息删除
  2864. */
  2865. delModal() {
  2866. if (this.proofingSelections.length === 0) {
  2867. this.$message.warning('请勾选要删除的打样信息!')
  2868. return
  2869. }
  2870. for (let i = 0; i < this.proofingSelections.length; i++) {
  2871. let row = this.proofingSelections[i]
  2872. if (row.proofingStatus !== '草稿') {
  2873. this.$message.warning(row.proofingNo + "不是草稿状态,不能删除!")
  2874. return
  2875. }
  2876. }
  2877. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2878. confirmButtonText: '确定',
  2879. cancelButtonText: '取消',
  2880. type: 'warning'
  2881. }).then(() => {
  2882. let tempData = {
  2883. informationList: this.proofingSelections
  2884. }
  2885. proofingInformationDelete(tempData).then(({data}) => {
  2886. if (data && data.code === 0) {
  2887. this.getDataList()
  2888. this.proofingSelections = []
  2889. this.$message({
  2890. message: '操作成功',
  2891. type: 'success',
  2892. duration: 1500,
  2893. onClose: () => {
  2894. }
  2895. })
  2896. } else {
  2897. this.$alert(data.msg, '错误', {
  2898. confirmButtonText: '确定'
  2899. })
  2900. }
  2901. })
  2902. }).catch(() => {
  2903. })
  2904. },
  2905. // ======== 列表操作方法 ========
  2906. /**
  2907. * 单机选中报价信息
  2908. * @param row
  2909. */
  2910. proofingClickRow(row) {
  2911. // this.$refs.proofingTable.toggleRowSelection(row)
  2912. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2913. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2914. this.getApprovalList()
  2915. },
  2916. /**
  2917. * 复选报价信息
  2918. * @param val
  2919. */
  2920. closeProcessModal() {
  2921. const approvedRows = this.proofingSelections.filter(row => row.proofingStatus === '审批中')
  2922. if (approvedRows.length === 0) {
  2923. this.$message.warning('请勾选状态为"审批中"的单据!')
  2924. return
  2925. }
  2926. this.$confirm(`确定关闭这 ${approvedRows.length} 条打样申请的OA流程?关闭后状态将变为"草稿"。`, '流程关闭', {
  2927. confirmButtonText: '确定',
  2928. cancelButtonText: '取消',
  2929. type: 'warning'
  2930. }).then(() => {
  2931. closeProcess({
  2932. site: this.$store.state.user.site,
  2933. documentNos: approvedRows.map(row => row.proofingNo),
  2934. documentType: 'PROOFING'
  2935. }).then(({data}) => {
  2936. if (data && data.code === 0) {
  2937. this.$message.success('流程关闭成功')
  2938. this.getDataList()
  2939. } else {
  2940. this.$message.error(data.msg)
  2941. }
  2942. }).catch(err => {
  2943. this.$message.error(err.message || '流程关闭失败')
  2944. })
  2945. }).catch(() => {})
  2946. },
  2947. batchIssueModal() {
  2948. const draftRows = this.proofingSelections.filter(row => row.proofingStatus === '草稿')
  2949. if (draftRows.length === 0) {
  2950. this.$message.warning('请勾选状态为"草稿"的单据!')
  2951. return
  2952. }
  2953. this.$confirm(`确定下达这 ${draftRows.length} 条打样单?`, '提示', {
  2954. confirmButtonText: '确定',
  2955. cancelButtonText: '取消',
  2956. type: 'warning'
  2957. }).then(async () => {
  2958. this.batchIssuingLoading = true
  2959. let successCount = 0
  2960. const failNos = []
  2961. try {
  2962. for (let i = 0; i < draftRows.length; i++) {
  2963. const row = draftRows[i]
  2964. const success = await this.issueSingleProofing(row, 'C', false)
  2965. if (success) {
  2966. successCount++
  2967. } else {
  2968. failNos.push(row.proofingNo)
  2969. }
  2970. }
  2971. this.getDataList()
  2972. this.modalFlag = false
  2973. if (failNos.length === 0) {
  2974. this.$message.success(`打样单已下达(${successCount}条)`)
  2975. } else if (successCount === 0) {
  2976. this.$message.error('批量下达失败,请重试')
  2977. } else {
  2978. const failPreview = failNos.slice(0, 5).join('、')
  2979. const extraMsg = failNos.length > 5 ? ' 等' : ''
  2980. this.$message.warning(`已下达${successCount}条,失败${failNos.length}条(${failPreview}${extraMsg})`)
  2981. }
  2982. } finally {
  2983. this.batchIssuingLoading = false
  2984. }
  2985. }).catch(() => {})
  2986. },
  2987. selectionProofing(val) {
  2988. this.proofingSelections = val
  2989. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2990. },
  2991. // ======== 报价结果相关方法 ========
  2992. /**
  2993. * 封装录入方法
  2994. */
  2995. packProofingResultModal() {
  2996. // 重置对象
  2997. this.enterResultData = {
  2998. site: this.$store.state.user.site,
  2999. proofingNo: '',
  3000. actualityDeliveryDate: new Date(),
  3001. proofingResultInformation: '',
  3002. proofingResultStatus: 'E',
  3003. fileContentList: [],
  3004. updateBy: this.$store.state.user.name
  3005. }
  3006. // 获得选中的打样号
  3007. // if (this.proofingSelections.length > 0) {
  3008. // this.proofingSelections.forEach(val => {
  3009. // this.enterResultData.proofingNo += ';' + val.proofingNo
  3010. // })
  3011. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  3012. // } else {
  3013. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  3014. // }
  3015. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  3016. // // 获得这些打样号的全部附件
  3017. // this.getFileContentList()
  3018. this.enterResultModalFlag = true
  3019. },
  3020. /**
  3021. * 录入打样结果
  3022. */
  3023. proofingResultModal() {
  3024. // // 如果有选中打样单
  3025. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  3026. // let tempData = {
  3027. // currentStatus: 'C',
  3028. // informationList: this.proofingSelections,
  3029. // }
  3030. // // 检查打样单状态
  3031. // checkProofingStatus(tempData).then(({data}) => {
  3032. // if (data && data.code === 0) {
  3033. // if (data.flag === 1) { // 状态一致
  3034. // this.packProofingResultModal()
  3035. // } else { // 状态不同
  3036. // this.$message.warning('选中的打样单进度有误,请确认!')
  3037. // }
  3038. // } else {
  3039. // this.$alert(data.msg, '错误', {
  3040. // confirmButtonText: '确定'
  3041. // })
  3042. // }
  3043. // })
  3044. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  3045. // this.packProofingResultModal()
  3046. // }
  3047. this.packProofingResultModal()
  3048. },
  3049. /**
  3050. * 保存打样结果
  3051. */
  3052. saveProofingResult() {
  3053. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  3054. this.$message.warning('请选择实际交付日期!')
  3055. return
  3056. }
  3057. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  3058. this.$message.warning('请填写打样结果信息!')
  3059. return
  3060. }
  3061. // if (this.proofingSelections.length > 1) {
  3062. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  3063. // confirmButtonText: '确定',
  3064. // cancelButtonText: '取消',
  3065. // type: 'warning'
  3066. // }).then(() => {
  3067. // saveProofingResult(this.enterResultData).then(({data}) => {
  3068. // if (data && data.code === 0) {
  3069. // this.getDataList()
  3070. // this.enterResultModalFlag = false
  3071. // this.$message({
  3072. // message: '操作成功',
  3073. // type: 'success',
  3074. // duration: 1500,
  3075. // onClose: () => {}
  3076. // })
  3077. // } else {
  3078. // this.$alert(data.msg, '错误', {
  3079. // confirmButtonText: '确定'
  3080. // })
  3081. // }
  3082. // })
  3083. // }).catch(() => {
  3084. // })
  3085. // } else {
  3086. saveProofingResult(this.enterResultData).then(({data}) => {
  3087. if (data && data.code === 0) {
  3088. this.getDataList()
  3089. this.enterResultModalFlag = false
  3090. this.$message({
  3091. message: '操作成功',
  3092. type: 'success',
  3093. duration: 1500,
  3094. onClose: () => {
  3095. }
  3096. })
  3097. } else {
  3098. this.$alert(data.msg, '错误', {
  3099. confirmButtonText: '确定'
  3100. })
  3101. }
  3102. })
  3103. // }
  3104. },
  3105. /**
  3106. * 封装送样方法
  3107. */
  3108. packSubmitProofingModal() {
  3109. this.submitResultData = {
  3110. site: this.$store.state.user.site,
  3111. proofingNo: '',
  3112. actualitySendSamplesDate: new Date(),
  3113. sendSamplesMethod: '',
  3114. deliverGoodsInformation: '',
  3115. deliverGoodsRemark: '',
  3116. proofingResultStatus: 'S',
  3117. updateBy: this.$store.state.user.name,
  3118. }
  3119. // 获得选中的打样号
  3120. // if (this.proofingSelections.length > 0) {
  3121. // this.proofingSelections.forEach(val => {
  3122. // this.submitResultData.quotationNo += ';' + val.quotationNo
  3123. // })
  3124. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  3125. // } else {
  3126. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  3127. // }
  3128. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  3129. this.submitResultModalFlag = true
  3130. },
  3131. /**
  3132. * 提交送样信息
  3133. */
  3134. submitProofingModal() {
  3135. // // 如果有选中打样单
  3136. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  3137. // let tempData = {
  3138. // currentStatus: 'E',
  3139. // informationList: this.proofingSelections,
  3140. // }
  3141. // // 检查打样单状态
  3142. // checkProofingStatus(tempData).then(({data}) => {
  3143. // if (data && data.code === 0) {
  3144. // if (data.flag === 1) { // 状态一致
  3145. // this.packSubmitProofingModal()
  3146. // } else { // 状态不同
  3147. // this.$message.warning('选中的打样单进度有误,请确认!')
  3148. // }
  3149. // } else {
  3150. // this.$alert(data.msg, '错误', {
  3151. // confirmButtonText: '确定'
  3152. // })
  3153. // }
  3154. // })
  3155. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  3156. // this.packSubmitProofingModal()
  3157. // }
  3158. this.packSubmitProofingModal()
  3159. },
  3160. /**
  3161. * 保存送样结果
  3162. */
  3163. saveSubmitResult() {
  3164. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  3165. this.$message.warning('请选择实际送样日期!')
  3166. return
  3167. }
  3168. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  3169. this.$message.warning('请选择送样方式!')
  3170. return
  3171. }
  3172. // if (this.proofingSelections.length > 1) {
  3173. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  3174. // confirmButtonText: '确定',
  3175. // cancelButtonText: '取消',
  3176. // type: 'warning'
  3177. // }).then(() => {
  3178. // saveSubmitResult(this.submitResultData).then(({data}) => {
  3179. // if (data && data.code === 0) {
  3180. // this.getDataList()
  3181. // this.submitResultModalFlag = false
  3182. // this.$message({
  3183. // message: '操作成功',
  3184. // type: 'success',
  3185. // duration: 1500,
  3186. // onClose: () => {}
  3187. // })
  3188. // } else {
  3189. // this.$alert(data.msg, '错误', {
  3190. // confirmButtonText: '确定'
  3191. // })
  3192. // }
  3193. // })
  3194. // }).catch(() => {
  3195. // })
  3196. // } else {
  3197. saveSubmitResult(this.submitResultData).then(({data}) => {
  3198. if (data && data.code === 0) {
  3199. this.getDataList()
  3200. this.submitResultModalFlag = false
  3201. this.$message({
  3202. message: '操作成功',
  3203. type: 'success',
  3204. duration: 1500,
  3205. onClose: () => {
  3206. }
  3207. })
  3208. } else {
  3209. this.$alert(data.msg, '错误', {
  3210. confirmButtonText: '确定'
  3211. })
  3212. }
  3213. })
  3214. // }
  3215. },
  3216. /**
  3217. * 封装回复方法
  3218. */
  3219. packCustomerResponseModal() {
  3220. this.customerResponseData = {
  3221. site: this.$store.state.user.site,
  3222. proofingNo: '',
  3223. actualityReplyDate: new Date(),
  3224. confirmResults: '接受',
  3225. confirmBy: '',
  3226. confirmInformation: '',
  3227. proofingResultStatus: 'R',
  3228. updateBy: this.$store.state.user.name
  3229. }
  3230. // 获得选中的打样号
  3231. // if (this.proofingSelections.length > 0) {
  3232. // this.proofingSelections.forEach(val => {
  3233. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  3234. // })
  3235. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  3236. // } else {
  3237. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3238. // }
  3239. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  3240. this.customerResponseModalFlag = true
  3241. },
  3242. /**
  3243. * 客户回复
  3244. */
  3245. customerResponseModal() {
  3246. // // 如果有选中打样单
  3247. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  3248. // let tempData = {
  3249. // currentStatus: 'S',
  3250. // informationList: this.proofingSelections,
  3251. // }
  3252. // // 检查打样单状态
  3253. // checkProofingStatus(tempData).then(({data}) => {
  3254. // if (data && data.code === 0) {
  3255. // if (data.flag === 1) { // 状态一致
  3256. // this.packCustomerResponseModal()
  3257. // } else { // 状态不同
  3258. // this.$message.warning('选中的打样单进度有误,请确认!')
  3259. // }
  3260. // } else {
  3261. // this.$alert(data.msg, '错误', {
  3262. // confirmButtonText: '确定'
  3263. // })
  3264. // }
  3265. // })
  3266. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  3267. // this.packCustomerResponseModal()
  3268. // }
  3269. this.packCustomerResponseModal()
  3270. },
  3271. /**
  3272. * 保存客户回复
  3273. */
  3274. saveCustomerResponse() {
  3275. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  3276. this.$message.warning('请选择实际回复日期!')
  3277. return
  3278. }
  3279. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3280. this.$message.warning('请选择客户确认结果!')
  3281. return
  3282. }
  3283. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3284. this.$message.warning('请填写客户确认人!')
  3285. return
  3286. }
  3287. // if (this.proofingSelections.length > 1) {
  3288. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3289. // confirmButtonText: '确定',
  3290. // cancelButtonText: '取消',
  3291. // type: 'warning'
  3292. // }).then(() => {
  3293. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3294. // if (data && data.code === 0) {
  3295. // this.getDataList()
  3296. // this.customerResponseModalFlag = false
  3297. // this.$message({
  3298. // message: '操作成功',
  3299. // type: 'success',
  3300. // duration: 1500,
  3301. // onClose: () => {}
  3302. // })
  3303. // } else {
  3304. // this.$alert(data.msg, '错误', {
  3305. // confirmButtonText: '确定'
  3306. // })
  3307. // }
  3308. // })
  3309. // }).catch(() => {
  3310. // })
  3311. // } else {
  3312. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3313. if (data && data.code === 0) {
  3314. this.getDataList()
  3315. this.customerResponseModalFlag = false
  3316. this.$message({
  3317. message: '操作成功',
  3318. type: 'success',
  3319. duration: 1500,
  3320. onClose: () => {
  3321. }
  3322. })
  3323. } else {
  3324. this.$alert(data.msg, '错误', {
  3325. confirmButtonText: '确定'
  3326. })
  3327. }
  3328. })
  3329. // }
  3330. },
  3331. // ======== 报价单附件的相关方法 ========
  3332. /**
  3333. * 获取报价单附件列表
  3334. */
  3335. getFileContentData() {
  3336. let currentData = {
  3337. orderRef1: this.$store.state.user.site,
  3338. orderRef2: this.proofingCurrentRow.proofingNo
  3339. }
  3340. getFileContentList(currentData).then(({data}) => {
  3341. if (data && data.code === 0) {
  3342. this.fileContentList = data.rows
  3343. } else {
  3344. this.fileContentList = []
  3345. }
  3346. })
  3347. },
  3348. // /**
  3349. // * 获得这些报价号的全部附件
  3350. // */
  3351. // getFileContentList () {
  3352. // let currentData = {
  3353. // orderRef1: this.$store.state.user.site,
  3354. // orderRef2: this.enterResultData.proofingNo
  3355. // }
  3356. // getFileContentList(currentData).then(({data}) => {
  3357. // if (data && data.code === 0) {
  3358. // this.enterResultData.fileContentList = data.rows
  3359. // } else {
  3360. // this.enterResultData.fileContentList = []
  3361. // }
  3362. // })
  3363. // },
  3364. /**
  3365. * 上传文件
  3366. */
  3367. uploadFile() {
  3368. let currentData = {
  3369. titleCon: '打样附件上传',
  3370. site: this.$store.state.user.site,
  3371. createBy: this.$store.state.user.name,
  3372. proofingNo: this.enterResultData.proofingNo,
  3373. fileRemark: '',
  3374. folder: 'proofingFile',
  3375. // options: []
  3376. }
  3377. // let num = 0
  3378. // let arr = this.enterResultData.proofingNo.split(';')
  3379. // arr.forEach(val => {
  3380. // currentData.options.push({key: num++, value: val})
  3381. // })
  3382. //打开组件 去做新增业务
  3383. this.$nextTick(() => {
  3384. this.$refs.proofingUploadFile.init(currentData)
  3385. })
  3386. },
  3387. /**
  3388. * 文件删除
  3389. * @param row
  3390. */
  3391. deleteFile(row) {
  3392. this.$confirm('确定要删除此文件?', '提示', {
  3393. confirmButtonText: '确定',
  3394. cancelButtonText: '取消',
  3395. type: 'warning'
  3396. }).then(() => {
  3397. deleteProofingFile(row).then(({data}) => {
  3398. if (data && data.code === 0) {
  3399. this.getFileContentList()
  3400. this.$message({
  3401. message: '操作成功',
  3402. type: 'success',
  3403. duration: 1500,
  3404. onClose: () => {
  3405. }
  3406. })
  3407. } else {
  3408. this.$alert(data.msg, '错误', {
  3409. confirmButtonText: '确定'
  3410. })
  3411. }
  3412. })
  3413. }).catch(() => {
  3414. })
  3415. },
  3416. /**
  3417. * 文件下载
  3418. * @param row
  3419. */
  3420. downloadFile(row) {
  3421. downLoadQuotationFile(row).then(({data}) => {
  3422. // 不限制文件下载类型
  3423. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3424. // 下载文件名称
  3425. const fileName = row.fileName
  3426. // a标签下载
  3427. const linkNode = document.createElement('a')
  3428. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3429. linkNode.style.display = 'none'
  3430. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3431. document.body.appendChild(linkNode)
  3432. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3433. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3434. document.body.removeChild(linkNode)
  3435. })
  3436. },
  3437. /**
  3438. * 获取该客户的客户地址
  3439. */
  3440. getCustomerAddressList() {
  3441. let tempData = {
  3442. site: this.$store.state.user.site,
  3443. customerNo: this.modalData.customerNo,
  3444. addressType: 'A'
  3445. }
  3446. customerAddressSearch(tempData).then(({data}) => {
  3447. if (data && data.code === 0) {
  3448. this.addressList = data.rows
  3449. this.addressModelFlag = true
  3450. } else {
  3451. this.addressList = []
  3452. }
  3453. })
  3454. },
  3455. // 双击选择负责人
  3456. getAddressData(row) {
  3457. this.modalData.sendSamplesAddress = row.addressName
  3458. this.addressModelFlag = false
  3459. },
  3460. /**
  3461. * 获取该客户的客户负责人
  3462. */
  3463. getCustomerContactList() {
  3464. let tempData = {
  3465. site: this.$store.state.user.site,
  3466. customerNo: this.modalData.customerNo
  3467. }
  3468. customerContactSearch(tempData).then(({data}) => {
  3469. if (data && data.code === 0) {
  3470. this.contactList = data.rows
  3471. this.contactModelFlag = true
  3472. } else {
  3473. this.contactList = []
  3474. }
  3475. })
  3476. },
  3477. // 双击选择负责人
  3478. getContactData(row) {
  3479. this.modalData.consignee = row.contactName
  3480. this.modalData.consigneeContact = row.contactPhoneNumber1
  3481. this.contactModelFlag = false
  3482. },
  3483. // ======== chooseList相关方法 ========
  3484. /**
  3485. * 获取基础数据列表S
  3486. * @param val
  3487. * @param type
  3488. */
  3489. getBaseList(val, type) {
  3490. this.tagNo = val
  3491. this.tagNo1 = type
  3492. this.$nextTick(() => {
  3493. let strVal = ''
  3494. let conSql = ''
  3495. if (val === 102) {
  3496. if (type === 1) {
  3497. strVal = this.modalData.customerNo
  3498. conSql = " order by Customer_no "
  3499. }
  3500. }
  3501. // if (val === 103) {
  3502. // if(type === 1) {
  3503. // strVal = this.modalData.tracker
  3504. // }
  3505. // if(type === 2) {
  3506. // strVal = this.modalData.engineer
  3507. // }
  3508. // }
  3509. if (val === 104) {
  3510. if (type === 1) {
  3511. strVal = this.modalData.projectId
  3512. }
  3513. }
  3514. if (val === 2051) {
  3515. strVal = this.modalData.trackerName
  3516. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3517. }
  3518. if (val === 2052) {
  3519. strVal = this.modalData.engineerName
  3520. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3521. }
  3522. if (val === 2053) {
  3523. strVal = this.modalData.approverName
  3524. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3525. }
  3526. this.$refs.baseList.init(val, strVal, conSql)
  3527. })
  3528. },
  3529. /**
  3530. * 列表方法的回调
  3531. * @param val
  3532. */
  3533. getBaseData(val) {
  3534. if (this.tagNo === 102) {
  3535. if (this.tagNo1 === 1) {
  3536. if (val.Customer_no === this.modalData.customerNo) {
  3537. return
  3538. }
  3539. this.modalData.customerNo = val.Customer_no
  3540. this.modalData.customerDesc = val.Customer_desc
  3541. this.modalData.projectId = undefined
  3542. this.modalData.projectName = undefined
  3543. this.resetProjectPartSelectionState(true)
  3544. }
  3545. }
  3546. // if (this.tagNo === 103) {
  3547. // if(this.tagNo1 === 1) {
  3548. // this.modalData.tracker = val.username
  3549. // this.modalData.trackerName = val.user_display
  3550. // }
  3551. // if(this.tagNo1 === 2) {
  3552. // this.modalData.engineer = val.username
  3553. // this.modalData.engineerName = val.user_display
  3554. // }
  3555. // }
  3556. if (this.tagNo === 104) {
  3557. if (this.tagNo1 === 1) {
  3558. this.modalData.projectId = val.project_id
  3559. this.modalData.projectName = val.project_name
  3560. this.getProjectPartList();
  3561. }
  3562. }
  3563. if (this.tagNo === 2051) {
  3564. this.modalData.tracker = val.username
  3565. this.modalData.trackerName = val.user_display
  3566. }
  3567. if (this.tagNo === 2052) {
  3568. this.modalData.engineer = val.username
  3569. this.modalData.engineerName = val.user_display
  3570. }
  3571. if (this.tagNo === 2053) {
  3572. this.modalData.approver = val.username
  3573. this.modalData.approverName = val.user_display
  3574. }
  3575. },
  3576. // ======== 导出相关方法 ========
  3577. /**
  3578. * 导出excel
  3579. */
  3580. async createExportData() {
  3581. this.searchData.limit = -1
  3582. this.searchData.page = 1
  3583. await proofingInformationSearch(this.searchData).then(({data}) => {
  3584. this.resultList = data.page.list
  3585. })
  3586. return this.resultList
  3587. },
  3588. startDownload() {
  3589. this.exportLoading = true
  3590. },
  3591. finishDownload() {
  3592. this.exportLoading = false
  3593. },
  3594. fields() {
  3595. let json = '{'
  3596. this.columnList.forEach((item, index) => {
  3597. if (index === this.columnList.length - 1) {
  3598. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3599. } else {
  3600. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3601. }
  3602. })
  3603. json += '}'
  3604. let s = eval('(' + json + ')')
  3605. return s
  3606. },
  3607. closeModalDiaLog() {
  3608. this.columnFieldList1 = []
  3609. this.columnFieldList2 = []
  3610. if (this.$refs.modalForm) {
  3611. this.$refs.modalForm.resetFields();
  3612. }
  3613. this.modalData = {
  3614. flag: '1',
  3615. title: '打样新增',
  3616. site: this.$store.state.user.site,
  3617. proofingNo: '',
  3618. customerNo: '',
  3619. customerDesc: '',
  3620. projectId: '',
  3621. projectName: '',
  3622. tracker: '',
  3623. trackerName: '',
  3624. approver: '',
  3625. approverName: '',
  3626. testPartNo: '',
  3627. partName: '',
  3628. engineer: '',
  3629. engineerName: '',
  3630. priorityLevel: '',
  3631. proofingNumber: 1,
  3632. requiredDeliveryDate: '',
  3633. remark: '',
  3634. technicalConsiderations: '',
  3635. isNeedToSendSamples: '',
  3636. sendSamplesAddress: '',
  3637. consignee: '',
  3638. consigneeContact: '',
  3639. actualityDeliveryDate: '',
  3640. proofingResultInformation: '',
  3641. actualitySendSamplesDate: '',
  3642. sendSamplesMethod: '',
  3643. deliverGoodsInformation: '',
  3644. deliverGoodsRemark: '',
  3645. actualityReplyDate: '',
  3646. confirmResults: '',
  3647. confirmBy: '',
  3648. confirmInformation: '',
  3649. proofingStatus: '草稿',
  3650. proofingResultStatus: 'B',
  3651. nextToDo: '',
  3652. createBy: this.$store.state.user.name,
  3653. nodeId: '',
  3654. sendSamplesUsage: ''
  3655. };
  3656. this.selectionDelegateAccess = [];
  3657. this.resetProjectPartSelectionState(true)
  3658. this.activeName = 'part'
  3659. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3660. this.proofingDelegateAccess[key] = '';
  3661. })
  3662. },
  3663. initProjectPartSelectionMapFromModalData() {
  3664. if (Object.keys(this.projectPartSelectionMap).length > 0) {
  3665. return
  3666. }
  3667. let testPartNoList = (this.modalData.testPartNo || '').split(';').filter(item => item)
  3668. let partNameList = (this.modalData.partName || '').split(';')
  3669. testPartNoList.forEach((testPartNo, index) => {
  3670. this.$set(this.projectPartSelectionMap, testPartNo, {
  3671. testPartNo: testPartNo,
  3672. partName: partNameList[index] || ''
  3673. })
  3674. })
  3675. this.projectPartListSelections = Object.values(this.projectPartSelectionMap)
  3676. },
  3677. syncProjectPartSelectionToTable() {
  3678. if (!this.$refs.projectPartTable) {
  3679. return
  3680. }
  3681. this.projectPartTableSyncingSelection = true
  3682. this.$refs.projectPartTable.clearSelection()
  3683. this.projectPartList.forEach(row => {
  3684. if (this.projectPartSelectionMap[this.getRowKeys(row)]) {
  3685. this.$refs.projectPartTable.toggleRowSelection(row, true)
  3686. }
  3687. })
  3688. this.$nextTick(() => {
  3689. this.projectPartTableSyncingSelection = false
  3690. })
  3691. },
  3692. resetProjectPartSelectionState(clearTableData = false) {
  3693. this.projectPartListSelections = []
  3694. this.projectPartSelectionMap = {}
  3695. if (clearTableData) {
  3696. this.projectPartList = []
  3697. }
  3698. if (this.$refs.projectPartTable) {
  3699. this.projectPartTableSyncingSelection = true
  3700. this.$refs.projectPartTable.clearSelection()
  3701. this.$nextTick(() => {
  3702. this.projectPartTableSyncingSelection = false
  3703. })
  3704. }
  3705. },
  3706. checkSelectable(row, index) {
  3707. if (this.modalData.flag === '1') {
  3708. return true
  3709. } else {
  3710. return false
  3711. }
  3712. },
  3713. projectClickRow(row) {
  3714. this.modalData.projectId = row.projectId
  3715. this.modalData.projectName = row.projectName
  3716. this.getProjectPartList()
  3717. this.chooseProjectListFlag = false
  3718. },
  3719. // 查询searchProjectInfoList
  3720. searchProjectInfoList() {
  3721. this.projectList = [];
  3722. this.searchProjectData.customerId = this.modalData.customerNo
  3723. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3724. if (data && data.code === 0) {
  3725. this.projectList = data.rows
  3726. } else {
  3727. this.projectList = []
  3728. }
  3729. }).catch((error) => {
  3730. this.$message.error('查询项目信息失败')
  3731. })
  3732. },
  3733. closeProjectInfoDialog() {
  3734. this.$refs.closeProjectInfoForm.resetFields();
  3735. this.searchProjectData = {
  3736. site: this.$store.state.user.site,
  3737. projectId: undefined,
  3738. projectName: undefined,
  3739. customerId: undefined,
  3740. }
  3741. },
  3742. rowStyle({row}) {
  3743. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3744. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3745. }
  3746. },
  3747. updateModalStatus(row, status) {
  3748. this.$confirm(`是否确认下达?`, '提示', {
  3749. confirmButtonText: '确定',
  3750. cancelButtonText: '取消',
  3751. type: 'warning'
  3752. }).then(async () => {
  3753. const success = await this.issueSingleProofing(row, status, true)
  3754. if (success) {
  3755. this.getDataList()
  3756. this.modalFlag = false
  3757. this.$message.success('打样单已下达')
  3758. }
  3759. }).catch(() => {})
  3760. },
  3761. async issueSingleProofing(row, status, showErrorAlert = true) {
  3762. if (this.issuingSet[row.proofingNo]) {
  3763. return false
  3764. }
  3765. this.$set(this.issuingSet, row.proofingNo, true)
  3766. try {
  3767. if (!row.proofingAmount || row.proofingAmount === 0) {
  3768. if (row.finalPartNo) {
  3769. let params = {
  3770. configurationId: '*',
  3771. userName: this.$store.state.user.name,
  3772. partNo: row.finalPartNo,
  3773. site: this.$store.state.user.site
  3774. }
  3775. const {data} = await queryPartUnitCostList(params)
  3776. if (data && data.code === 0 && data.rows.length > 0) {
  3777. let unitPrice = +data.rows[0].inventoryValue
  3778. row.proofingAmount = unitPrice * this.modalData.proofingNumber
  3779. } else {
  3780. row.proofingAmount = 0
  3781. }
  3782. } else {
  3783. let params = {
  3784. site: this.$store.state.user.site,
  3785. plmPartNo: row.testPartNo,
  3786. limit: 5,
  3787. page: 1,
  3788. }
  3789. const {data} = await partInformationSearch(params)
  3790. if (data && data.code === 0 && data.page.list.length > 0) {
  3791. row.proofingAmount = data.page.list[0].estimatedMaterialCost * this.modalData.proofingNumber
  3792. } else {
  3793. row.proofingAmount = 0
  3794. }
  3795. }
  3796. }
  3797. let params = JSON.parse(JSON.stringify(row))
  3798. params.proofingResultStatus = status
  3799. params.proofingStatus = '下达'
  3800. params.userName = this.$store.state.user.name
  3801. params.menuId = this.$route.meta.menuId
  3802. const {data} = await proofingInformationEditStatus(params)
  3803. if (data && data.code === 0) {
  3804. return true
  3805. }
  3806. if (showErrorAlert) {
  3807. this.$alert(data.msg, '错误', {
  3808. confirmButtonText: '确定'
  3809. })
  3810. }
  3811. return false
  3812. } catch (error) {
  3813. if (showErrorAlert) {
  3814. this.$message.error(error.message || '下达失败')
  3815. }
  3816. return false
  3817. } finally {
  3818. this.$set(this.issuingSet, row.proofingNo, false)
  3819. }
  3820. },
  3821. searchDelegateAccessByUser() {
  3822. // 角色 ROO7 的用户
  3823. let params = {
  3824. ...this.proofingDelegateAccess,
  3825. site: this.$store.state.user.site,
  3826. }
  3827. searchDelegateAccessByUser(params).then(({data}) => {
  3828. if (data && data.code === 0) {
  3829. this.baseDelegateAccessList = data.rows;
  3830. } else {
  3831. this.$message.warning(data.msg)
  3832. }
  3833. }).catch((error) => {
  3834. this.$message.error(error)
  3835. })
  3836. },
  3837. handleSelectionChange(val) {
  3838. // 获得选中的 用户
  3839. this.selectionDelegateAccess2 = val;
  3840. },
  3841. handleTableClick(row, column, event, val) {
  3842. // 表格行点击选择
  3843. this.$refs[val].toggleRowSelection(row);
  3844. },
  3845. openDelegateAccess() {
  3846. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3847. if (rows && rows.length > 0) {
  3848. this.$nextTick(() => {
  3849. rows.forEach(item => {
  3850. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3851. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3852. })
  3853. })
  3854. }
  3855. },
  3856. closeDelegateAccess() {
  3857. this.selectionDelegateAccess2 = [];
  3858. },
  3859. confirmDelegateAccess() {
  3860. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3861. this.delegateAccessVisible = false;
  3862. },
  3863. searchDelegateAccess() {
  3864. let params = {
  3865. site: this.modalData.site,
  3866. proofingNo: this.modalData.proofingNo,
  3867. }
  3868. searchDelegateAccess(params).then(({data}) => {
  3869. if (data && data.code === 0) {
  3870. this.selectionDelegateAccess = data.rows.map(item => {
  3871. return {
  3872. delegateAccess: item.delegateAccess,
  3873. delegateAccessName: item.delegateAccessName,
  3874. }
  3875. })
  3876. } else {
  3877. this.$message.warning(data.msg)
  3878. }
  3879. }).catch((error) => {
  3880. this.$message.error(error)
  3881. })
  3882. },
  3883. // 同意提交
  3884. agreeSubmit() {
  3885. this.$confirm(`是否确认提交?`, '提示', {
  3886. confirmButtonText: '确定',
  3887. cancelButtonText: '取消',
  3888. type: 'warning'
  3889. }).then(() => {
  3890. this.modalData.nodeConclusion = 'Y'
  3891. this.submitData()
  3892. })
  3893. },
  3894. // 驳回提交
  3895. rejectSubmit() {
  3896. this.$confirm(`是否确认驳回?`, '提示', {
  3897. confirmButtonText: '确定',
  3898. cancelButtonText: '取消',
  3899. type: 'warning'
  3900. }).then(() => {
  3901. this.modalData.rejectOpinion = this.rejectOpinion
  3902. this.modalData.nodeConclusion = 'N'
  3903. this.submitData()
  3904. })
  3905. },
  3906. // 提交
  3907. submitData() {
  3908. const needValidateRequired = this.modalData.nodeConclusion === 'Y'
  3909. if (needValidateRequired && this.columnFieldList1) {
  3910. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3911. let row = this.columnFieldList1[i]
  3912. if (!this.modalData[row.fieldId] && row.required === 'Y') {
  3913. this.$message.error(row.fieldName + '不能为空')
  3914. return
  3915. }
  3916. }
  3917. }
  3918. // if (this.columnFieldList2) {
  3919. // if (!this.delegateAccessName) {
  3920. // this.$message.error('Delegate Access不能为空')
  3921. // return;
  3922. // }
  3923. // }
  3924. let tempData = {
  3925. ...this.modalData,
  3926. userName: this.$store.state.user.name,
  3927. menuId: this.$route.meta.menuId,
  3928. }
  3929. this.submitLoading = true
  3930. submitChange(tempData).then(({data}) => {
  3931. if (data && data.code === 0) {
  3932. this.getDataList()
  3933. this.$message({message: '操作成功', type: 'success'})
  3934. this.rejectVisible = false
  3935. this.submitModalFlag = false
  3936. this.modalFlag = false
  3937. } else {
  3938. this.$alert(data.msg, '错误', {
  3939. confirmButtonText: '确定'
  3940. })
  3941. }
  3942. }).finally(() => {
  3943. this.submitLoading = false
  3944. })
  3945. },
  3946. // 获取流程的配置权限
  3947. async getNodeAuthority(row) {
  3948. this.columnFieldList1 = []
  3949. this.columnFieldList2 = []
  3950. let tempData = {
  3951. site: row.site,
  3952. stepId: row.stepId,
  3953. menuId: this.$route.meta.menuId,
  3954. currentNodeOnly: true
  3955. }
  3956. await getNodeAuthority(tempData).then(({data}) => {
  3957. if (data && data.code === 0) {
  3958. this.columnFieldList1 = (data.rows && data.rows.plm_proofing_information) || []
  3959. this.columnFieldList2 = (data.rows && data.rows.plm_proofing_delegate_access) || []
  3960. }
  3961. })
  3962. },
  3963. handleQueryCustomer() {
  3964. const customerNo = (this.modalData.customerNo || '').trim()
  3965. if (!customerNo) {
  3966. this.modalData.customerDesc = ''
  3967. return
  3968. }
  3969. this.lookupCustomer().then(ok => {
  3970. if (ok === false) {
  3971. this.$message.warning('客户编码不存在或已失效')
  3972. }
  3973. })
  3974. },
  3975. handleQueryProjectByCustomer() {
  3976. const projectId = (this.modalData.projectId || '').trim()
  3977. if (!projectId) {
  3978. this.modalData.projectName = ''
  3979. return
  3980. }
  3981. if (!(this.modalData.customerNo || '').trim()) {
  3982. this.modalData.projectName = ''
  3983. this.$message.warning('请先填写客户编码')
  3984. return
  3985. }
  3986. this.lookupProject().then(ok => {
  3987. if (ok === false) {
  3988. this.$message.warning('项目号不存在,或不属于该客户')
  3989. }
  3990. })
  3991. },
  3992. lookupCustomer() {
  3993. const customerNo = (this.modalData.customerNo || '').trim()
  3994. if (!customerNo) {
  3995. this.modalData.customerDesc = ''
  3996. return Promise.resolve(false)
  3997. }
  3998. return queryCustomer({
  3999. site: this.$store.state.user.site,
  4000. customerNo
  4001. }).then(({data}) => {
  4002. if (data && data.code !== 0) {
  4003. this.$message.warning(data.msg)
  4004. this.modalData.customerDesc = ''
  4005. return 'error'
  4006. }
  4007. const site = this.$store.state.user.site
  4008. const rows = ((data && data.rows) || []).filter(row => !row.site || row.site === site)
  4009. if (rows.length === 1) {
  4010. this.modalData.customerDesc = rows[0].customerDesc
  4011. return true
  4012. }
  4013. this.modalData.customerDesc = ''
  4014. return false
  4015. }).catch((error) => {
  4016. this.$message.error(error)
  4017. this.modalData.customerDesc = ''
  4018. return 'error'
  4019. })
  4020. },
  4021. lookupProject() {
  4022. const customerNo = (this.modalData.customerNo || '').trim()
  4023. const projectId = (this.modalData.projectId || '').trim()
  4024. if (!customerNo || !projectId) {
  4025. this.modalData.projectName = ''
  4026. return Promise.resolve(false)
  4027. }
  4028. return queryProjectByCustomer({
  4029. site: this.$store.state.user.site,
  4030. customerId: customerNo,
  4031. projectId
  4032. }).then(({data}) => {
  4033. if (data && data.code !== 0) {
  4034. this.$message.warning(data.msg)
  4035. this.modalData.projectName = ''
  4036. return 'error'
  4037. }
  4038. const rows = (data && data.rows) || []
  4039. if (rows.length === 1) {
  4040. this.modalData.projectName = rows[0].projectName
  4041. return true
  4042. }
  4043. this.modalData.projectName = ''
  4044. return false
  4045. }).catch((error) => {
  4046. this.$message.error(error)
  4047. this.modalData.projectName = ''
  4048. return 'error'
  4049. })
  4050. },
  4051. async validateCustomerAndProject() {
  4052. const customerNo = (this.modalData.customerNo || '').trim()
  4053. if (!customerNo) {
  4054. this.$message.warning('请选择客户编码!')
  4055. return false
  4056. }
  4057. const customerOk = await this.lookupCustomer()
  4058. if (customerOk !== true) {
  4059. if (customerOk === false) {
  4060. this.$message.warning('客户编码不存在或已失效')
  4061. }
  4062. return false
  4063. }
  4064. const projectId = (this.modalData.projectId || '').trim()
  4065. if (!projectId) {
  4066. this.$message.warning('请选择项目号!')
  4067. return false
  4068. }
  4069. const projectOk = await this.lookupProject()
  4070. if (projectOk !== true) {
  4071. if (projectOk === false) {
  4072. this.$message.warning('项目号不存在,或不属于该客户')
  4073. }
  4074. return false
  4075. }
  4076. return true
  4077. },
  4078. // 查询审批信息
  4079. getApprovalList() {
  4080. let tempData = {
  4081. site: this.$store.state.user.site,
  4082. menuId: this.$route.meta.menuId,
  4083. documentNo: this.proofingCurrentRow.proofingNo,
  4084. }
  4085. getApprovalList(tempData).then(({data}) => {
  4086. if (data && data.code === 0) {
  4087. this.approvalList = data.rows
  4088. } else {
  4089. this.approvalList = []
  4090. }
  4091. })
  4092. },
  4093. handleRouter(row){
  4094. this.modalFlag = false
  4095. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  4096. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4097. } else {
  4098. this.$router.push({name:`part-partInformation`,params:{partNo:row.testPartNo},})
  4099. }
  4100. },
  4101. clearModalData(filed){
  4102. this.modalData[filed] = ''
  4103. },
  4104. handleSizeChange(val){
  4105. this.size = val
  4106. this.getProjectPartList();
  4107. },
  4108. handleCurrentChange(val){
  4109. this.no = val
  4110. this.getProjectPartList();
  4111. },
  4112. searchByAnyField(params){
  4113. params.site = this.$store.state.user.site
  4114. params.menuId = '103001'
  4115. params.no = this.pageIndex
  4116. params.size = this.pageSize
  4117. params.userId = this.$store.state.user.id.toString()
  4118. params.userName = this.$store.state.user.name
  4119. proofingInformationSearchAny(params).then(({data})=>{
  4120. if (data && data.code === 0){
  4121. this.dataList = data.page.list
  4122. this.totalPage = data.page.totalCount
  4123. }else {
  4124. this.$message.warning(data.msg)
  4125. }
  4126. }).catch((error)=>{
  4127. this.$message.error(error)
  4128. })
  4129. this.filterSearchData = params
  4130. this.isFilterSearch = true
  4131. this.filterVisible = false
  4132. },
  4133. toTechnicalSpecificationMenu (oriCodeNo) {
  4134. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  4135. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4136. } else {
  4137. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{oriCodeNo: oriCodeNo},})
  4138. }
  4139. },
  4140. }
  4141. }
  4142. </script>
  4143. <style scoped lang="scss">
  4144. /deep/ .customer-tab .el-tabs__content {
  4145. padding: 0px !important;
  4146. height: 300px;
  4147. }
  4148. .right /deep/ .el-input__inner {
  4149. text-align: right;
  4150. }
  4151. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  4152. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  4153. -webkit-appearance: none;
  4154. }
  4155. /deep/ .inlineNumber input[type="number"] {
  4156. -moz-appearance: textfield;
  4157. padding-right: 5px !important;
  4158. }
  4159. </style>