赫艾前端
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.

4596 lines
174 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 months ago
6 months ago
​
​
6 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
8 months ago
​
8 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
11 months ago
​
11 months ago
​
​
​
​
​
11 months ago
​
11 months ago
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 months ago
​
​
​
​
7 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <!-- <el-form-item :label="'BU'">-->
  6. <!-- <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 75px">-->
  7. <!-- <el-option-->
  8. <!-- v-for = "i in buList"-->
  9. <!-- :key = "i.buNo"-->
  10. <!-- :label = "i.buDesc"-->
  11. <!-- :value = "i.buNo">-->
  12. <!-- </el-option>-->
  13. <!-- </el-select>-->
  14. <!-- </el-form-item>-->
  15. <el-form-item :label="'工厂编码'">
  16. <el-select filterable clearable v-model="searchData.site" placeholder="请选择" style="width: 160px">
  17. <el-option label="全部" value=""></el-option>
  18. <el-option
  19. v-for="item in siteList"
  20. :key="item.siteID"
  21. :label="item.shortSiteName"
  22. :value="item.siteID">
  23. </el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item :label="'检验单号'">
  27. <el-input v-model="searchData.inspectionNo" clearable style="width: 120px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="'物料编码'">
  30. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  31. </el-form-item>
  32. <!-- <el-form-item :label="'SKU'">
  33. <el-input v-model="searchData.sku" clearable style="width: 120px"></el-input>
  34. </el-form-item> -->
  35. <el-form-item :label="'物料名称'">
  36. <el-input v-model="searchData.partDesc" clearable style="width: 200px"></el-input>
  37. </el-form-item>
  38. <el-form-item :label="'规格型号'">
  39. <el-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
  40. </el-form-item>
  41. <el-form-item :label="'检验结论'">
  42. <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
  43. <el-option label="合格" value="合格"></el-option>
  44. <el-option label="不合格" value="不合格"></el-option>
  45. </el-select>
  46. </el-form-item>
  47. <el-form-item :label="'处置措施'">
  48. <el-select v-model="searchData.disposalMeasures" clearable style="width: 90px">
  49. <el-option
  50. v-for = "i in disposalMeasuresOptions"
  51. :key = "i.id"
  52. :label = "i.disposalMeasures"
  53. :value = "i.disposalMeasures">
  54. </el-option>
  55. </el-select>
  56. </el-form-item>
  57. </el-form>
  58. <el-form :inline="true" label-position="top" :model="searchData">
  59. <el-form-item :label="'PN'">
  60. <el-input v-model="searchData.cinvSourceCode" clearable style="width: 120px"></el-input>
  61. </el-form-item>
  62. <el-form-item :label="'工单号'">
  63. <el-input v-model="searchData.orderNo" clearable style="width: 137px"></el-input>
  64. </el-form-item>
  65. <el-form-item :label="'派工单号'">
  66. <el-input v-model="searchData.seqNo" clearable style="width: 167px"></el-input>
  67. </el-form-item>
  68. <el-form-item :label="'工序'">
  69. <el-input v-model="searchData.operationDesc" clearable style="width: 108px"></el-input>
  70. </el-form-item>
  71. <el-form-item :label="'状态'">
  72. <el-select v-model="searchData.states" multiple style="width: 340px">
  73. <el-option label="未开始" value="未开始"></el-option>
  74. <el-option label="待检验" value="待检验"></el-option>
  75. <el-option label="待审核" value="待审核"></el-option>
  76. <el-option label="已完成" value="已完成"></el-option>
  77. </el-select>
  78. </el-form-item>
  79. </el-form>
  80. <el-form :inline="true" label-position="top" :model="searchData">
  81. <el-form-item :label="'送检日期'">
  82. <el-date-picker style="width: 150px" v-model="searchData.startDate2" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期"></el-date-picker>
  83. -
  84. <el-date-picker style="width: 150px" v-model="searchData.endDate2" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="结束日期"></el-date-picker>
  85. </el-form-item>
  86. <el-form-item :label="'检验时间:'">
  87. <el-date-picker style="width: 170px" v-model="searchData.startDate" type="datetime"
  88. value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期">
  89. </el-date-picker>
  90. -
  91. <el-date-picker style="width: 170px" v-model="searchData.endDate" type="datetime"
  92. value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期">
  93. </el-date-picker>
  94. </el-form-item>
  95. <el-form-item :label="' '">
  96. <el-button v-if="!authSearch" type="primary" :loading="searchLoading" @click="getDataList()">查询</el-button>
  97. <el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button>
  98. <el-button v-if="!authCheck" type="primary" @click="submitResult()">审核</el-button>
  99. <el-button v-if="!authCancelCheck" type="primary" @click="cancelApproval">取消审核</el-button>
  100. <el-button v-if="!authDelete" type="primary" @click="deleteModal()">删除</el-button>
  101. <el-button v-if="!authOverLoad" type="primary" @click="overLoadModal">任务重载</el-button>
  102. <el-button type="primary" @click="printList">打印</el-button>
  103. <download-excel
  104. :fields="fields()"
  105. :data="exportData"
  106. type="xls"
  107. :name="exportName"
  108. :header="exportHeader"
  109. :footer="exportFooter"
  110. :fetch="createExportData"
  111. :before-generate="startDownload"
  112. :before-finish="finishDownload"
  113. worksheet="导出信息"
  114. class="el-button el-button--primary el-button--medium">
  115. {{ "导出" }}
  116. </download-excel>
  117. <el-button type="primary" @click="userSetting">{{ "设置列表" }}</el-button>
  118. <el-button v-show="showDefault" type="primary" @click="saveColumnList">{{ "设置默认配置" }}</el-button>
  119. </el-form-item>
  120. </el-form>
  121. <!-- 检验记录展示列表 -->
  122. <el-table
  123. :height="height"
  124. :data="dataList"
  125. border
  126. ref="FAITable"
  127. @row-click="FAIClickRow"
  128. @selection-change="selectionFAI"
  129. style="width: 100%;">
  130. <el-table-column
  131. type="selection"
  132. header-align="center"
  133. align="center"
  134. :selectable="selectFlag"
  135. width="50">
  136. </el-table-column>
  137. <el-table-column
  138. prop="state"
  139. header-align="center"
  140. align="center"
  141. label="状态">
  142. <template slot-scope="scope">
  143. <div :style="{fontWeight:'bold', color: scope.row.state === '待检验' ? 'red' : scope.row.state === '待审核' ? '#ffa500e0' : scope.row.state === '已完成' ? '#3ac252' : ''}">
  144. {{scope.row.state}}
  145. </div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. v-for="(item,index) in columnList1" :key="index"
  150. :sortable="item.columnSortable"
  151. :prop="item.columnProp"
  152. :header-align="item.headerAlign"
  153. :show-overflow-tooltip="item.showOverflowTooltip"
  154. :align="item.align"
  155. :fixed="item.fixed === '' ? false : item.fixed"
  156. :min-width="item.columnWidth"
  157. :label="item.columnLabel">
  158. <template slot-scope="scope">
  159. <span v-if="!item.columnHidden">
  160. <template v-if="item.columnProp === 'pictureFlag'">
  161. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  162. </template>
  163. <template v-else-if="item.columnProp === 'releaseFlag'">{{ scope.row.releaseFlag === 'Y' ? '是' : '否' }}</template>
  164. <template v-else>{{ scope.row[item.columnProp] }}</template>
  165. </span>
  166. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  167. </template>
  168. </el-table-column>
  169. <el-table-column
  170. fixed="right"
  171. header-align="center"
  172. align="center"
  173. width="180"
  174. label="操作">
  175. <template slot-scope="scope">
  176. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  177. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  178. <el-link v-if="!authFile" style="cursor: pointer" @click="getFileContentData(scope.row)">工作文件</el-link>
  179. <el-link style="cursor: pointer; margin-left: 8px" v-if="scope.row.state === '已完成' && scope.row.refInfo1" @click="toPrintForQMS(scope.row.site, scope.row.refInfo1)">报告打印</el-link>
  180. </template>
  181. </el-table-column>
  182. </el-table>
  183. <!-- 分页-->
  184. <el-pagination
  185. @size-change="sizeChangeHandle"
  186. @current-change="currentChangeHandle"
  187. :current-page="pageIndex"
  188. :page-sizes="[20, 50, 100, 200, 500]"
  189. :page-size="pageSize"
  190. :total="totalPage"
  191. layout="total, sizes, prev, pager, next, jumper">
  192. </el-pagination>
  193. <!-- 新增检验记录 -->
  194. <el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
  195. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  196. <!-- <el-form-item label="BU" prop="bu" :rules="rules.bu">-->
  197. <!-- <el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">-->
  198. <!-- <el-option-->
  199. <!-- v-for = "i in userBuList"-->
  200. <!-- :key = "i.buNo"-->
  201. <!-- :label = "i.sitename"-->
  202. <!-- :value = "i.buNo">-->
  203. <!-- <span style="float: left;width: 100px">{{ i.sitename }}</span>-->
  204. <!-- <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">-->
  205. <!-- {{ i.buDesc }}-->
  206. <!-- </span>-->
  207. <!-- </el-option>-->
  208. <!-- </el-select>-->
  209. <!-- </el-form-item>-->
  210. <el-form-item label="工厂编码" prop="site" :rules="rules.site">
  211. <el-select filterable v-model="modalData.site" placeholder="请选择" @change="onModalSiteChange" style="width: 221px">
  212. <el-option
  213. v-for="item in siteList"
  214. :key="item.siteID"
  215. :label="item.shortSiteName"
  216. :value="item.siteID">
  217. </el-option>
  218. </el-select>
  219. </el-form-item>
  220. <el-form-item label="标签号">
  221. <el-input v-if="this.modalData.specialTaskFlag === 'Y'" disabled v-model="modalData.rollNo" style="width: 221px"></el-input>
  222. <el-input v-else v-model="modalData.rollNo" @keyup.native.enter="rollNoEnter" clearable style="width: 221px"></el-input>
  223. </el-form-item>
  224. </el-form>
  225. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  226. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && (this.modalData.rollNo === '' || this.modalData.rollNo == null)" prop="orderNo" :rules="rules.seqNoType">
  227. <span style="cursor: pointer" slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span>
  228. <el-input v-model="modalData.seqNo" style="width: 221px"></el-input>
  229. </el-form-item>
  230. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && this.modalData.rollNo !== '' && this.modalData.rollNo != null" prop="orderNo" :rules="rules.seqNoType">
  231. <span slot="label">派工单号</span>
  232. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  233. </el-form-item>
  234. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType">
  235. <span slot="label">派工单号</span>
  236. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  237. </el-form-item>
  238. <el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
  239. <el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input>
  240. </el-form-item>
  241. </el-form>
  242. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  243. <el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
  244. <el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px">
  245. <el-option
  246. v-for = "i in operationList"
  247. :key = "i.operationNo"
  248. :label = "i.operationDesc"
  249. :value = "i.operationDesc">
  250. </el-option>
  251. </el-select>
  252. </el-form-item>
  253. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'">
  254. <span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
  255. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  256. </el-form-item>
  257. <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">
  258. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  259. </el-form-item>
  260. </el-form>
  261. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  262. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData">
  263. <span style="cursor: pointer" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  264. <el-input v-model="modalData.partNo" style="width: 221px"></el-input>
  265. </el-form-item>
  266. <el-form-item v-else label="物料编码" prop="partNo" :rules="rules.partNoType">
  267. <el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
  268. </el-form-item>
  269. <el-form-item label="物料名称">
  270. <el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input>
  271. </el-form-item>
  272. </el-form>
  273. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  274. <el-form-item label="物料类别">
  275. <el-input v-model="modalData.invdefinetype" readonly style="width: 221px"></el-input>
  276. </el-form-item>
  277. <el-form-item label="SKU">
  278. <el-input v-model="modalData.sku" readonly style="width: 221px"></el-input>
  279. </el-form-item>
  280. </el-form>
  281. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  282. <el-form-item prop="templateId" :rules="rules.templateId">
  283. <span style="cursor: pointer" v-if="'1' === '1'" slot="label" @click="queryTemplateList"><a>检验模板</a></span>
  284. <span v-else slot="label">检验模板</span>
  285. <el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input>
  286. </el-form-item>
  287. <el-form-item label="送检数量:" prop="rollQty" :rules="rules.rollQtyType">
  288. <el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
  289. </el-form-item>
  290. <el-form-item label="单位" prop="umId" :rules="rules.umIdType">
  291. <el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
  292. <el-option
  293. v-for = "i in umList"
  294. :key = "i.umId"
  295. :label = "i.umName"
  296. :value = "i.umId">
  297. </el-option>
  298. </el-select>
  299. </el-form-item>
  300. </el-form>
  301. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  302. <el-form-item label="送检总数">
  303. <el-input v-model="modalData.sjzs" disabled style="width: 120px"></el-input>
  304. </el-form-item>
  305. <el-form-item label=" ">
  306. <input type="checkbox" id="specialTask" name="specialTask" v-model="checked" @click="changeSpecialTask"/> <label for="specialTask">无工单检验</label>
  307. </el-form-item>
  308. </el-form>
  309. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  310. <el-form-item label="特殊要求">
  311. <el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  312. </el-form-item>
  313. </el-form>
  314. <el-footer style="height:40px;margin-top: 55px;text-align:center">
  315. <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
  316. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  317. </el-footer>
  318. </el-dialog>
  319. <!-- 检验单详情页 -->
  320. <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
  321. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
  322. <el-form-item :label="'物料编码'">
  323. <el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
  324. </el-form-item>
  325. <el-form-item :label="'物料类别'">
  326. <el-input v-model="detailData.invdefinetype" readonly style="width: 100px"></el-input>
  327. </el-form-item>
  328. <el-form-item :label="'PN'">
  329. <el-input v-model="detailData.cinvSourceCode" readonly style="width: 100px"></el-input>
  330. </el-form-item>
  331. <el-form-item :label="'SKU'">
  332. <el-input v-model="detailData.sku" readonly style="width: 100px"></el-input>
  333. </el-form-item>
  334. <el-form-item :label="'物料名称'">
  335. <el-input v-model="detailData.partDesc" readonly style="width: 300px"></el-input>
  336. </el-form-item>
  337. <el-form-item :label="'单位'">
  338. <el-input v-model="detailData.umName" readonly style="width: 60px"></el-input>
  339. </el-form-item>
  340. <el-form-item>
  341. <span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span>
  342. <span v-else style="cursor: pointer" slot="label" @click="getOperatorList"><a>协同人员</a></span>
  343. <el-input v-model="detailData.operatorName" readonly style="width: 150px"></el-input>
  344. </el-form-item>
  345. <el-form-item>
  346. <span v-if="detailData.submitFlag === 'Y'" slot="label">责任人</span>
  347. <span v-else style="cursor: pointer" slot="label" @click="getResponsiblePersonList"><a>责任人</a></span>
  348. <el-input v-model="detailData.responsiblePersonName" readonly style="width: 150px"></el-input>
  349. </el-form-item>
  350. </el-form>
  351. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
  352. <el-form-item :label="'送检数量'">
  353. <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" style="width: 85px"></el-input-number>
  354. </el-form-item>
  355. <el-form-item :label="'抽样数量'">
  356. <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 85px"></el-input-number>
  357. </el-form-item>
  358. <el-form-item :label="'合格数量'">
  359. <el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled style="width: 85px"></el-input-number>
  360. <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" style="width: 85px"></el-input-number>
  361. </el-form-item>
  362. <el-form-item :label="'不合格数量'">
  363. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.notPassQty" disabled style="width: 85px"></el-input-number>
  364. </el-form-item>
  365. <el-form-item :label="'不合格项目数量'">
  366. <el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled style="width: 85px"></el-input-number>
  367. <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 85px"></el-input-number>
  368. </el-form-item>
  369. <el-form-item :label="'批次合格数'">
  370. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.batchQualifiedQty" disabled style="width: 85px"></el-input-number>
  371. </el-form-item>
  372. <el-form-item :label="'批次不合格数'">
  373. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.notbatchQualifiedQty" disabled style="width: 85px"></el-input-number>
  374. </el-form-item>
  375. <el-form-item style="margin-top: 13px;margin-left: 360px">
  376. <!-- <el-button v-if="detailData.submitFlag !== 'Y'" :loading="loadFlag" @click="dataAcquisition">-->
  377. <!-- <svg t="1739002700745" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="38076" width="22" height="22"><path d="M922.000696 762.746435V465.363478l55.652174-0.111304v299.542261c0 131.695304-106.562783 239.571478-236.922435 239.571478H285.42887C155.158261 1004.365913 48.484174 896.623304 48.484174 764.794435V465.252174h59.258435v299.542261c0 101.843478 77.022609 179.712 177.775304 179.712H740.841739c100.61913 0 181.158957-79.916522 181.158957-181.76z" fill="#1D293F" p-id="38077"></path><path d="M290.148174 192.556522c20.301913-20.925217 30.47513-48.617739 30.47513-83.099826 0-72.548174-36.285217-108.833391-108.722087-108.833392H141.401043v223.365566h70.255305c32.055652-0.111304 58.167652-10.529391 78.491826-31.432348z m-105.227131-7.635479V39.446261h23.596522c19.70087 0 35.661913 6.166261 47.994435 18.632348 12.354783 12.466087 18.387478 29.740522 18.387478 52.001391 0 22.973217-5.921391 41.22713-17.652869 54.650435s-27.937391 20.190609-48.617739 20.190608H184.921043zM634.434783 595.366957h-84.057044V498.866087a102.511304 102.511304 0 0 0 74.262261-98.54887c0-56.230957-45.478957-102.310957-101.10887-102.310956-55.629913 0-101.086609 46.08-101.086608 102.310956 0 46.08 30.586435 85.25913 72.192 97.947826v96.990609h-81.252174c-16.829217-43.78713-50.688-99.283478-81.65287-143.070609a101.331478 101.331478 0 0 0 14.269218-52.001391c0-56.230957-45.946435-102.310957-102.177392-102.310956s-102.177391 46.08-102.177391 102.310956c0 56.230957 45.946435 102.310957 102.177391 102.310957 15.716174 0 30.72-3.628522 44.009739-10.017392 21.170087 34.326261 42.829913 74.351304 57.811479 102.778435h-73.906087l128.333913 130.493218 94.675478-108.966957v145.853217h-111.616l148.034783 148.858435 130.715826-148.858435h-111.504696v-129.402434l91.180522 92.516174 113.307826-130.248348h-53.203478c14.758957-28.42713 36.173913-68.452174 57.210434-102.800696 13.178435 6.41113 27.937391 10.039652 43.542261 10.039652 55.629913 0 101.086609-46.08 101.086609-102.310956 0-56.230957-45.456696-102.310957-101.086609-102.310957-55.652174 0-101.220174 46.08-101.220174 102.310957a102.4 102.4 0 0 0 14.135653 52.001391c-30.72 43.653565-64.200348 99.283478-80.896 142.937044z m-390.611479-148.48a46.614261 46.614261 0 0 1-46.436174-46.458435c0-25.510957 20.925217-46.436174 46.436174-46.436174s46.436174 20.925217 46.436174 46.436174-20.925217 46.436174-46.436174 46.436174z m279.819131 0c-25.266087 0-45.946435-20.925217-45.946435-46.458435 0-25.510957 20.702609-46.436174 45.968696-46.436174 25.266087 0 45.946435 20.925217 45.946434 46.436174s-20.680348 46.436174-45.946434 46.436174z m278.639304-93.005914c25.288348 0 45.968696 20.925217 45.968696 46.436174s-20.702609 46.436174-45.968696 46.436174c-25.266087 0-45.946435-20.925217-45.946435-46.436174s20.680348-46.436174 45.946435-46.436174zM395.130435 172.722087h74.128695l15.248696 51.155478h47.415652L458.707478 0.623304h-51.155478L332.8 223.98887h47.170783l15.11513-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517217-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.138783 19.456l23.218087 77.401043h-54.405566l23.329392-78.002087z m168.96 165.932522h43.631304V39.446261h58.189913V0.623304h-159.877565v38.956522h58.056348v184.297739z m169.894956-51.155478h74.128696l15.248696 51.155478h47.415652L830.330435 0.623304h-51.155478l-74.752 223.365566h47.193043l15.09287-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517218-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.161043 19.456l23.218087 77.401043h-54.427826l23.329391-78.002087z" fill="#FD9F01" p-id="38078"></path></svg>-->
  378. <!-- </el-button>-->
  379. <el-button @click="getFileContentData(detailData)">
  380. <svg t="1739002974630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="59598" width="22" height="22"><path d="M807.3216 889.5488H221.184c-78.7456 0-142.848-64.1024-142.848-142.848V286.976c0-78.7456 64.1024-142.848 142.848-142.848h178.8416c20.7872 0 40.7552 8.8064 54.784 24.1664l77.568 85.0944c2.4064 2.6112 5.8368 4.1472 9.3696 4.1472h265.5232c78.7456 0 142.848 64.1024 142.848 142.848v346.2656c0.0512 78.7968-64.0512 142.8992-142.7968 142.8992zM221.184 205.568c-44.9024 0-81.408 36.5056-81.408 81.408v459.6736c0 44.9024 36.5056 81.408 81.408 81.408h586.1376c44.9024 0 81.408-36.5056 81.408-81.408V400.4352c0-44.9024-36.5056-81.408-81.408-81.408h-265.5232c-20.7872 0-40.7552-8.8064-54.784-24.1664L409.3952 209.7152c-2.4064-2.6112-5.8368-4.1472-9.3696-4.1472H221.184z" fill="#6FB1F9" p-id="59599"></path><path d="M466.0224 453.8368H249.0368c-16.9472 0-30.72-13.7728-30.72-30.72s13.7728-30.72 30.72-30.72h216.9856c16.9472 0 30.72 13.7728 30.72 30.72s-13.7728 30.72-30.72 30.72z" fill="#6FB1F9" p-id="59600"></path></svg>
  381. </el-button>
  382. <el-button @click="subDetailUpload">
  383. <svg t="1739002903501" class="icon" viewBox="0 0 1550 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="50418" width="22" height="22"><path d="M985.000229 727.917714c20.48 0 34.113829-13.663086 34.113828-34.143085 0-10.24-3.393829-17.056914-10.24-23.873829l-204.8-204.8c-6.816914-6.846171-13.633829-10.24-23.873828-10.24-10.24 0-17.086171 3.393829-23.903086 10.24l-204.8 204.8c-6.816914 6.816914-10.24 13.633829-10.24 23.873829 0 20.48 13.663086 34.143086 34.143086 34.143085 10.24 0 17.056914-3.423086 23.873828-10.24l146.783086-146.783085v395.966171c0 20.48 13.663086 34.113829 34.143086 34.113829s34.113829-13.633829 34.113828-34.113829V570.894629l146.783086 146.783085c6.816914 6.816914 13.663086 10.24 23.903086 10.24z m282.799542-353.045943c0-10.24 1.287314-17.086171 0-27.296914C1240.502857 128.117029 1043.0464 29.257143 858.199771 29.257143 701.205943 29.257143 564.662857 117.994057 496.405943 247.720229 469.079771 240.874057 441.782857 234.057143 414.485943 234.057143 281.365943 234.057143 175.542857 307.112229 175.542857 440.232229c0 17.056914 3.423086 34.113829 6.816914 51.2C97.514057 535.786057 29.257143 585.5232 29.257143 723.031771c0 170.656914 136.543086 277.942857 307.2 277.942858H585.142857c20.48 0 34.143086-13.633829 34.143086-34.113829S605.622857 932.717714 585.142857 932.717714h-248.685714c-133.12 0-238.943086-76.565943-238.943086-209.685943 0-82.797714 37.566171-131.657143 105.325714-166.765714l58.046172-20.48-13.663086-61.44c-3.423086-10.24-3.423086-23.873829-3.423086-34.113828 0-95.583086 75.103086-137.918171 170.686172-137.918172 20.48 0 37.536914 3.423086 58.016914 10.24l54.623086 20.48 27.296914-51.2c61.44-112.64 179.317029-198.100114 303.776914-184.32 184.846629 20.48 309.511314 71.68 341.343086 250.0608 1.199543 6.787657 0 10.24 0 17.056914v6.846172l-3.423086 47.776914 44.383086 20.48c110.094629 34.6112 222.354286 143.36 222.354286 249.183086 0 150.176914-122.88 243.799771-273.056914 243.799771h-214.571886c-20.48 0-34.113829 13.663086-34.113829 34.143086s13.633829 34.113829 34.113829 34.113829h214.571886c187.713829 0 341.313829-124.342857 341.313828-312.056686 0-144.530286-121.270857-269.663086-263.314286-314.046172z" fill="#6C5FFC" p-id="50419"></path></svg>
  384. </el-button>
  385. </el-form-item>
  386. </el-form>
  387. <el-form :inline="true" label-position="top">
  388. <el-form-item :label="'检验结论'">
  389. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
  390. <el-option label="合格" value="合格"></el-option>
  391. <el-option label="不合格" value="不合格"></el-option>
  392. </el-select>
  393. <el-select v-else v-model="detailData.inspectionResult" style="width: 100px" placeholder="请选择">
  394. <el-option label="合格" value="合格"></el-option>
  395. <el-option label="不合格" value="不合格"></el-option>
  396. </el-select>
  397. </el-form-item>
  398. <el-form-item :label="'质检备注'">
  399. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 293px"></el-input>
  400. <el-input v-else v-model="detailData.inspectionRemark" style="width: 293px"></el-input>
  401. </el-form-item>
  402. <el-form-item v-show="detailData.inspectionResult === '不合格'" style="margin-top: 5px">
  403. <el-form-item :label="'处置措施'">
  404. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px">
  405. <el-option
  406. v-for = "i in disposalMeasuresOptions"
  407. :key = "i.id"
  408. :label = "i.disposalMeasures"
  409. :value = "i.disposalMeasures">
  410. </el-option>
  411. </el-select>
  412. <el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px">
  413. <el-option
  414. v-for = "i in disposalMeasuresOptions"
  415. :key = "i.id"
  416. :label = "i.disposalMeasures"
  417. :value = "i.disposalMeasures">
  418. </el-option>
  419. </el-select>
  420. </el-form-item>
  421. <el-form-item :label="'处置说明'">
  422. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input>
  423. <el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input>
  424. </el-form-item>
  425. </el-form-item>
  426. </el-form>
  427. <!-- 展示列表 -->
  428. <div class="rq ">
  429. <el-table
  430. :height="500"
  431. :data="detailList"
  432. border
  433. style="width: 100%;">
  434. <el-table-column
  435. prop=""
  436. header-align="center"
  437. align="center"
  438. min-width="90"
  439. label="操作">
  440. <template slot-scope="scope">
  441. <el-button class="el-icon-picture" v-if="scope.row.imageDetailNum > 0" type="success" @click="uploadImageModal(scope.row)"></el-button>
  442. <el-button class="el-icon-picture" v-else type="primary" @click="uploadImageModal(scope.row)"></el-button>
  443. <!-- <el-button style="margin-left: 2px" class="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button>-->
  444. </template>
  445. </el-table-column>
  446. <el-table-column
  447. v-for="(item,index) in detailColumnList" :key="index"
  448. :sortable="item.columnSortable"
  449. :prop="item.columnProp"
  450. :header-align="item.headerAlign"
  451. :show-overflow-tooltip="item.showOverflowTooltip"
  452. :align="item.align"
  453. :fixed="item.fixed === ''?false:item.fixed"
  454. :min-width="item.columnWidth"
  455. :label="item.columnLabel">
  456. <template slot-scope="scope">
  457. <span v-if="!item.columnHidden">
  458. <template v-if="item.columnProp === 'pictureFlag'">
  459. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  460. </template>
  461. <template v-else>{{ scope.row[item.columnProp] }}</template>
  462. </span>
  463. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  464. </template>
  465. </el-table-column>
  466. <el-table-column
  467. prop=""
  468. header-align="center"
  469. align="right"
  470. min-width="80"
  471. label="实测值">
  472. <template slot-scope="scope">
  473. <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" @change="updateItemResult(scope.row)" style="height: 11px; width: 98%"></el-input>
  474. <el-input :ref="`textValue${scope.$index}`" v-else v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px; width: 98%"></el-input>
  475. </template>
  476. </el-table-column>
  477. <el-table-column
  478. prop=""
  479. header-align="center"
  480. align="center"
  481. min-width="80"
  482. label="检验明细">
  483. <template slot-scope="scope">
  484. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button>
  485. <el-button v-else type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button>
  486. </template>
  487. </el-table-column>
  488. <el-table-column
  489. prop=""
  490. header-align="center"
  491. align="right"
  492. min-width="80"
  493. label="抽样数量">
  494. <template slot-scope="scope">
  495. <el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
  496. <el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number>
  497. </template>
  498. </el-table-column>
  499. <el-table-column
  500. prop=""
  501. header-align="center"
  502. align="right"
  503. min-width="80"
  504. label="不合格数量">
  505. <template slot-scope="scope">
  506. <el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
  507. <el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
  508. </template>
  509. </el-table-column>
  510. <el-table-column
  511. prop=""
  512. header-align="center"
  513. align="right"
  514. min-width="75"
  515. label="项目检验结论">
  516. <template slot-scope="scope">
  517. <el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.itemResult" disabled style="height: 11px" >
  518. <el-option label="合格" value="Y" style="color: green"></el-option>
  519. <el-option label="不合格" value="N" style="color: red"></el-option>
  520. </el-select>
  521. <el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-else v-model="scope.row.itemResult" style="height: 11px" placeholder="合格">
  522. <el-option label="合格" value="Y" style="color: green"></el-option>
  523. <el-option label="不合格" value="N" style="color: red"></el-option>
  524. </el-select>
  525. </template>
  526. </el-table-column>
  527. </el-table>
  528. </div>
  529. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  530. <el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
  531. <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
  532. <el-button v-if="!authTempRelease && (detailData.state === '待检验' || detailData.state === '待审核') && detailData.releaseFlag !== 'Y'" type="warning" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('3')">临时放行</el-button>
  533. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" :style="{marginLeft: detailData.releaseFlag === 'Y' ? '40px' : '10px'}" @click="Transfer('2')">最终检验完成</el-button>
  534. </el-footer>
  535. </el-dialog>
  536. <!-- 子明细信息 -->
  537. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="1102px">
  538. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  539. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  540. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  541. <div class="rq ">
  542. <el-table
  543. :height="400"
  544. :data="templateTableData"
  545. border
  546. v-loading="subDetailLoading"
  547. element-loading-text="拼命加载中"
  548. :row-class-name="rowClassName"
  549. @selection-change="handleDetailSelectionChange"
  550. style="width: 100%;">
  551. <el-table-column type="selection" align="center" width="40"></el-table-column>
  552. <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
  553. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
  554. <template slot-scope="{row}">
  555. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  556. <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
  557. </template>
  558. </el-table-column>
  559. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
  560. <template slot-scope="{row}">
  561. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  562. <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
  563. </template>
  564. </el-table-column>
  565. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
  566. <template slot-scope="{row}">
  567. <el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
  568. <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
  569. </template>
  570. </el-table-column>
  571. <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
  572. <template slot-scope="{row}">
  573. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
  574. <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
  575. </template>
  576. </el-table-column>
  577. <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
  578. <template slot-scope="{row}">
  579. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
  580. <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
  581. </template>
  582. </el-table-column>
  583. <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
  584. <template slot-scope="{row}">
  585. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
  586. <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
  587. </template>
  588. </el-table-column>
  589. <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
  590. <template slot-scope="{row}">
  591. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
  592. <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
  593. </template>
  594. </el-table-column>
  595. </el-table>
  596. <!-- 分页-->
  597. <el-pagination
  598. @size-change="sizeChangeHandle2"
  599. @current-change="currentChangeHandle2"
  600. :current-page="pageIndex2"
  601. :page-sizes="[20, 50, 100, 200, 500]"
  602. :page-size="pageSize2"
  603. :total="tableData.length"
  604. layout="total, sizes, prev, pager, next, jumper">
  605. </el-pagination>
  606. </div>
  607. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  608. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" :loading="subDetailVisiable" @click="saveSubDetailResult">保存</el-button>
  609. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  610. </el-footer>
  611. </el-dialog>
  612. <!-- 批量新增子明细操作-->
  613. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  614. <el-form :inline="true" label-position="top">
  615. <el-form-item :label="'默认抽样位置A'">
  616. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  617. </el-form-item>
  618. <el-form-item :label="'默认抽样位置B'">
  619. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  620. </el-form-item>
  621. <el-form-item :label="'抽样数量'">
  622. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  623. </el-form-item>
  624. </el-form>
  625. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  626. <el-button type="primary" @click="batchHandleAddModal">保存</el-button>
  627. <el-button type="primary" @click="batchHandleAddModalFlag=false">关闭</el-button>
  628. </el-footer>
  629. </el-dialog>
  630. <!-- 检验模板 -->
  631. <el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px">
  632. <div class="rq">
  633. <el-form :inline="true" label-position="top" :model="templateData">
  634. <el-form-item :label="'模板编码'">
  635. <el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
  636. </el-form-item>
  637. <el-form-item :label="'模板名称'">
  638. <el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
  639. </el-form-item>
  640. <el-form-item :label="' '">
  641. <el-button type="primary" @click="queryTemplateList">查询</el-button>
  642. </el-form-item>
  643. </el-form>
  644. <el-table
  645. :height="300"
  646. :data="templateList"
  647. @row-dblclick="getRowData"
  648. border
  649. style="width: 100%;">
  650. <el-table-column
  651. v-for="(item,index) in templateDetailList" :key="index"
  652. :sortable="item.columnSortable"
  653. :prop="item.columnProp"
  654. :header-align="item.headerAlign"
  655. :show-overflow-tooltip="item.showOverflowTooltip"
  656. :align="item.align"
  657. :fixed="item.fixed==''?false:item.fixed"
  658. :min-width="item.columnWidth"
  659. :label="item.columnLabel">
  660. <template slot-scope="scope">
  661. <span v-if="!item.columnHidden">
  662. <template v-if="item.columnProp === 'pictureFlag'">
  663. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  664. </template>
  665. <template v-else>{{ scope.row[item.columnProp] }}</template>
  666. </span>
  667. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  668. </template>
  669. </el-table-column>
  670. </el-table>
  671. </div>
  672. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  673. <el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
  674. </el-footer>
  675. </el-dialog>
  676. <!-- 物料 -->
  677. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="520px">
  678. <div class="rq">
  679. <el-form :inline="true" label-position="top" :model="partData">
  680. <el-form-item :label="'物料编码'">
  681. <el-input v-model="partData.partNo" clearable style="width: 115px"></el-input>
  682. </el-form-item>
  683. <el-form-item :label="'物料名称'">
  684. <el-input v-model="partData.partDesc" clearable style="width: 115px"></el-input>
  685. </el-form-item>
  686. <el-form-item :label="'SKU'">
  687. <el-input v-model="partData.sku" clearable style="width: 79px"></el-input>
  688. </el-form-item>
  689. <el-form-item :label="'PN'">
  690. <el-input v-model="partData.cinvSourceCode" clearable style="width: 79px"></el-input>
  691. </el-form-item>
  692. <el-form-item :label="' '">
  693. <el-button type="primary" @click="queryPartList">查询</el-button>
  694. </el-form-item>
  695. </el-form>
  696. <el-table
  697. :height="300"
  698. :data="partList"
  699. @row-dblclick="getRowData2"
  700. border
  701. style="width: 100%;">
  702. <el-table-column
  703. v-for="(item,index) in partDetailList" :key="index"
  704. :sortable="item.columnSortable"
  705. :prop="item.columnProp"
  706. :header-align="item.headerAlign"
  707. :show-overflow-tooltip="item.showOverflowTooltip"
  708. :align="item.align"
  709. :fixed="item.fixed==''?false:item.fixed"
  710. :min-width="item.columnWidth"
  711. :label="item.columnLabel">
  712. <template slot-scope="scope">
  713. <span v-if="!item.columnHidden">
  714. <template v-if="item.columnProp === 'pictureFlag'">
  715. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  716. </template>
  717. <template v-else>{{ scope.row[item.columnProp] }}</template>
  718. </span>
  719. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  720. </template>
  721. </el-table-column>
  722. </el-table>
  723. </div>
  724. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  725. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  726. </el-footer>
  727. </el-dialog>
  728. <!-- 文件清单 -->
  729. <el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
  730. <el-form :inline="true" label-position="top">
  731. <el-form-item v-if="detailInformationFlag">
  732. <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>
  733. </el-form-item>
  734. </el-form>
  735. <iqc-file-table :columns="fileColumnList" :data-list="fileContentList" :query-loading="fileLoading" @refresh="getFileContentData(currentFileRow)"></iqc-file-table>
  736. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  737. <el-button type="primary" @click="fileFlag = false">关闭</el-button>
  738. </el-footer>
  739. </el-dialog>
  740. <!-- 派工单号 -->
  741. <el-dialog title="派工单号" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="seqDetailFlag" width="952px" height="273px">
  742. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  743. <el-form-item label="工单号">
  744. <el-input v-model="seqDetailData.orderNo" clearable style="width: 150px"></el-input>
  745. </el-form-item>
  746. <el-form-item label="派工单号">
  747. <el-input v-model="seqDetailData.seqNo" clearable style="width: 150px"></el-input>
  748. </el-form-item>
  749. <el-form-item label="SKU">
  750. <el-input v-model="seqDetailData.sku" clearable style="width: 150px"></el-input>
  751. </el-form-item>
  752. <el-form-item label="状态">
  753. <el-select v-model="seqDetailData.status" style="width: 100px" placeholder="请选择">
  754. <el-option label="下达" value="N"></el-option>
  755. <el-option label="关闭" value="Y"></el-option>
  756. </el-select>
  757. </el-form-item>
  758. </el-form>
  759. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  760. <el-form-item label="物料编码">
  761. <el-input v-model="seqDetailData.partNo" clearable style="width: 150px"></el-input>
  762. </el-form-item>
  763. <el-form-item label="物料名称">
  764. <el-input v-model="seqDetailData.partDesc" clearable style="width: 315px"></el-input>
  765. </el-form-item>
  766. <el-form-item label="工序">
  767. <el-input v-model="seqDetailData.operationDesc" clearable style="width: 150px"></el-input>
  768. </el-form-item>
  769. <el-form-item>
  770. <el-button type="primary" @click="searchSeqInfo" style="margin-top: 24px">查询</el-button>
  771. </el-form-item>
  772. </el-form>
  773. <el-table
  774. :height="400"
  775. :data="seqInfoList"
  776. @row-dblclick="getRowData1"
  777. border
  778. style="width: 100%;">
  779. <el-table-column
  780. v-for="(item,index) in seqDetailColumnList" :key="index"
  781. :sortable="item.columnSortable"
  782. :prop="item.columnProp"
  783. :header-align="item.headerAlign"
  784. :show-overflow-tooltip="item.showOverflowTooltip"
  785. :align="item.align"
  786. :fixed="item.fixed==''?false:item.fixed"
  787. :min-width="item.columnWidth"
  788. :label="item.columnLabel">
  789. <template slot-scope="scope">
  790. <span v-if="!item.columnHidden">
  791. <template v-if="item.columnProp === 'pictureFlag'">
  792. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  793. </template>
  794. <template v-else>{{ scope.row[item.columnProp] }}</template>
  795. </span>
  796. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  797. </template>
  798. </el-table-column>
  799. </el-table>
  800. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  801. <el-button type="primary" @click="seqDetailFlag = false">关闭</el-button>
  802. </el-footer>
  803. </el-dialog>
  804. <!-- 机修人员清单 -->
  805. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  806. <div class="rq">
  807. <el-form :inline="true" label-position="top" :model="operatorData">
  808. <el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
  809. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
  810. <el-option
  811. v-for = "i in roleList"
  812. :key = "i.roleId"
  813. :label = "i.roleName"
  814. :value = "i.roleId">
  815. </el-option>
  816. </el-select>
  817. </el-form-item>
  818. <el-form-item :label="'用户编码'">
  819. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  820. </el-form-item>
  821. <el-form-item :label="'用户姓名'">
  822. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  823. </el-form-item>
  824. <el-form-item :label="' '">
  825. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  826. </el-form-item>
  827. </el-form>
  828. <el-table
  829. :height="300"
  830. :data="operatorList"
  831. ref="operatorTable"
  832. @row-click="operatorClickRow"
  833. @selection-change="selectionChangeHandle2"
  834. border
  835. style="width: 100%;">
  836. <el-table-column
  837. type="selection"
  838. header-align="center"
  839. align="center"
  840. width="50">
  841. </el-table-column>
  842. <el-table-column
  843. v-for="(item,index) in operatorDetailList" :key="index"
  844. :sortable="item.columnSortable"
  845. :prop="item.columnProp"
  846. :header-align="item.headerAlign"
  847. :show-overflow-tooltip="item.showOverflowTooltip"
  848. :align="item.align"
  849. :fixed="item.fixed==''?false:item.fixed"
  850. :min-width="item.columnWidth"
  851. :label="item.columnLabel">
  852. <template slot-scope="scope">
  853. <span v-if="!item.columnHidden">
  854. <template v-if="item.columnProp === 'pictureFlag'">
  855. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  856. </template>
  857. <template v-else>{{ scope.row[item.columnProp] }}</template>
  858. </span>
  859. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  860. </template>
  861. </el-table-column>
  862. </el-table>
  863. </div>
  864. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  865. <el-button type="primary" @click="confirmOperator">确认</el-button>
  866. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  867. </el-footer>
  868. </el-dialog>
  869. <!-- 配置项目设备 -->
  870. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
  871. <div class="rq">
  872. <el-table
  873. :height="350"
  874. :data="itemObjectList"
  875. border
  876. style="width: 100%">
  877. <el-table-column
  878. v-for="(item,index) in itemObjectColumnList" :key="index"
  879. :sortable="item.columnSortable"
  880. :prop="item.columnProp"
  881. :header-align="item.headerAlign"
  882. :show-overflow-tooltip="item.showOverflowTooltip"
  883. :align="item.align"
  884. :fixed="item.fixed===''?false:item.fixed"
  885. :min-width="item.columnWidth"
  886. :label="item.columnLabel">
  887. <template slot-scope="scope">
  888. <span v-if="!item.columnHidden">
  889. <template v-if="item.columnProp === 'pictureFlag'">
  890. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  891. </template>
  892. <template v-else>{{ scope.row[item.columnProp] }}</template>
  893. </span>
  894. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  895. </template>
  896. </el-table-column>
  897. <el-table-column
  898. header-align="center"
  899. align="center"
  900. min-width="100"
  901. label="设备">
  902. <template slot-scope="scope">
  903. <el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
  904. <el-option
  905. v-for = "i in scope.row.objectList"
  906. :key = "i.objectID"
  907. :label = "i.objectDesc"
  908. :value = "i.objectID">
  909. </el-option>
  910. </el-select>
  911. </template>
  912. </el-table-column>
  913. </el-table>
  914. </div>
  915. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  916. <el-button type="primary" @click="actionModal2">保存</el-button>
  917. <el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
  918. </el-footer>
  919. </el-dialog>
  920. <!-- chooseList模态框 -->
  921. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  922. <!-- 上传文件的modal -->
  923. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getFileContentData(currentFileRow)" v-drag></qcFAIUploadFile>
  924. <!-- 上传文件的modal -->
  925. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  926. <!-- 子明细导入 -->
  927. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  928. <!-- 打印标签 -->
  929. <qr-code ref="qrCode"></qr-code>
  930. <!-- 设置动态列 -->
  931. <column v-if="visible" ref="column" @refreshData="refreshColumnList"></column>
  932. </div>
  933. </template>
  934. <script>
  935. import {
  936. qcFQCInspectionSearch, // 查询FAI的检验记录
  937. fqcDetailSearch, // 查询FAI的检验明细
  938. inspectorSearch, // 查询检验员
  939. fqcRecordDelete, // 删除检验记录
  940. saveFQCDetailedRecord, // 新增明细信息
  941. saveFQCSubmitResult, // 审核
  942. saveFQCSubDetailed, // 新增子明细信息
  943. selectFQCSubDetailedRecord, // 子明细记录信息查询
  944. checkFQCIsSubmit, // 检查是否已提交
  945. getResourceList, // 查询机台列表
  946. getOperationList, // 查询工序列表
  947. getPartList, // 查询物料列表
  948. saveFQCInspection, // 新增FQC检验
  949. queryController, // 检查动控
  950. queryTemplateList, // 获取检验模板列表
  951. getPartInformation, // 获取物料信息
  952. getSpecialOperationList, // 获取特殊工序列表
  953. inspectionTypeSearch, // 搜索所有检验类型
  954. disposalMeasuresSearch, // 获取处置措施列表
  955. getRollNo, // 模糊查询标签号
  956. rollNoEnter, // 标签号回车事件
  957. queryPartList, // 查询物料集合
  958. umSearch, // 查询单位列表
  959. getSiteAndBuByUserName,
  960. getSiteAndBuByUserName2,
  961. searchSeqInfo, // 查询派工单号
  962. actionFQCInspection, // 开始检验
  963. dataAcquisition, // 数据采集
  964. getResponsibleOperatorList, // 获取责任人列表
  965. getFQCItemObjectList, // 查询项目设备
  966. dataAcquisitionByItem, // 根据项目数据采集
  967. cancelApproval2, // 取消审核
  968. fqcRecordOverLoad, // 任务重载
  969. searchPartAttributeDetails, // 查询物料属性模板
  970. } from "@/api/qc/qc.js"
  971. import {
  972. getInspectData,
  973. inspectPrint,
  974. } from '@/api/production/inspect.js'
  975. import {
  976. printInspectLabel,
  977. } from "@/views/modules/print/print_inspect_label.js"
  978. import {
  979. printInspectLabelForB,
  980. } from "@/views/modules/print/print_inspect_labelForB.js"
  981. import {
  982. printInspectStockLabel,
  983. } from "@/views/modules/print/print_inspect_labelForPartStock.js"
  984. import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js"
  985. import { getSiteData } from '@/api/board.js'
  986. import Chooselist from '@/views/modules/common/Chooselist_eam'
  987. import workingFiles from "./workingFiles"
  988. import {
  989. deleteObjectFile,
  990. getUserRoleList, // 获取用户角色列表
  991. getOperatorList
  992. } from '@/api/eam/eam.js'
  993. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  994. import {qcPrint} from '@/api/qc/qcPrint.js'
  995. import qcFAIUploadFile from "./qc_FAI_upload_file"
  996. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  997. import subDetailUpload from "./sub_detail_upload"
  998. import QrCode from "../common/QrCode.vue";
  999. import IqcFileTable from "./IQCFileTable.vue";
  1000. import column from "../common/column.vue";
  1001. /*上传文件的組件*/
  1002. export default {
  1003. mixins: [workingFiles],
  1004. components: {
  1005. column,
  1006. IqcFileTable,
  1007. QrCode,
  1008. Chooselist,
  1009. qcFAIUploadFile,
  1010. comQcItemImageUploadFile,
  1011. subDetailUpload
  1012. },
  1013. computed: {
  1014. templateTableData () {
  1015. let start = (this.pageIndex2 - 1) * this.pageSize2
  1016. let end = start + this.pageSize2
  1017. if (end > this.tableData.length){
  1018. end = this.tableData.length
  1019. }
  1020. return this.tableData.slice(start,end)
  1021. }
  1022. },
  1023. watch: {
  1024. detailData: {
  1025. deep: true,
  1026. handler: function (newV, oldV) {
  1027. this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
  1028. if (this.detailData.inspectionResult === '不合格') {
  1029. if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
  1030. this.detailData.batchQualifiedQty = this.detailData.rollQty
  1031. } else if (this.detailData.disposalMeasures === '挑选使用') {
  1032. this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty
  1033. } else {
  1034. this.detailData.batchQualifiedQty = 0
  1035. }
  1036. } else {
  1037. this.detailData.batchQualifiedQty = this.detailData.rollQty
  1038. }
  1039. this.detailData.notbatchQualifiedQty = this.detailData.rollQty - this.detailData.batchQualifiedQty
  1040. }
  1041. },
  1042. detailList: {
  1043. deep: true,
  1044. handler: function (newV, oldV) {
  1045. let num2 = 0
  1046. for (let i = 0; i < this.detailList.length; i++) {
  1047. if (this.detailList[i].itemResult === 'N') {
  1048. num2++
  1049. }
  1050. }
  1051. this.detailData.unqualifiedQty = num2
  1052. }
  1053. },
  1054. },
  1055. data () {
  1056. return {
  1057. visible: false,
  1058. // 是否显示“设置默认配置”按钮(grid_table_default 无默认列时出现)
  1059. showDefault: false,
  1060. loadFlag: false,
  1061. transferLoadFlag: false,
  1062. inspectionNo: '',
  1063. // 是否收藏
  1064. favorite: false,
  1065. // 导出 start
  1066. exportData: [],
  1067. exportName: "FAI检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  1068. exportHeader: ["FAI检验录入"],
  1069. exportFooter: [],
  1070. exportList: [],
  1071. // 导出 end
  1072. checkCompletedData: {
  1073. inspectionNo: ''
  1074. },
  1075. submitData: {
  1076. site: '',
  1077. inspectionNo: '',
  1078. submit_flag: '',
  1079. inspectionResult: '',
  1080. submitList: [],
  1081. updateBy: this.$store.state.user.name,
  1082. type: 'fqc'
  1083. },
  1084. tagNo: '',
  1085. searchData: {
  1086. site: '',
  1087. userName: this.$store.state.user.name,
  1088. inspectionNo: '',
  1089. state: '',
  1090. inspectionResult: '',
  1091. orderNo: '',
  1092. operationDesc: '',
  1093. buNo: '',
  1094. startDate: '',
  1095. endDate: '',
  1096. partNo: '',
  1097. startDate2: '',
  1098. endDate2: '',
  1099. partDesc: '',
  1100. spec: '',
  1101. cinvSourceCode: '',
  1102. sku: '',
  1103. disposalMeasures: '',
  1104. page: 1,
  1105. limit: 10,
  1106. seqNo: '',
  1107. states: ['未开始','待检验'],
  1108. },
  1109. pageIndex: 1,
  1110. pageSize: 20,
  1111. totalPage: 0,
  1112. pageIndex2: 1,
  1113. pageSize2: 20,
  1114. totalPage2: 0,
  1115. height: 200,
  1116. dataList: [],
  1117. dataListSelections: [],
  1118. modalData: {
  1119. flag: '',
  1120. site: '',
  1121. bu: '',
  1122. inspectionNo: '',
  1123. partNo: '',
  1124. partDesc: '',
  1125. inspectionTypeNo: '107',
  1126. inspectionTypeName: '',
  1127. inspectorNo: '',
  1128. inspectorName: '',
  1129. submit_flag: '',
  1130. seqNo: '',
  1131. batchRollNo: '',
  1132. invdefinetype: '',
  1133. sku: '',
  1134. qtyrequired: '',
  1135. lotsize:'',
  1136. operationDesc:'',
  1137. specialRequirements: '',
  1138. templateId: '',
  1139. templateName: '',
  1140. specialTaskFlag: '',
  1141. workCenterNo: '',
  1142. rollNo: '',
  1143. umId: '',
  1144. umName: '',
  1145. sjzs: ''
  1146. },
  1147. // 展示列集
  1148. columnList1: [
  1149. {
  1150. userId: this.$store.state.user.name,
  1151. functionId: 301015,
  1152. serialNumber: '301015Table1BuDesc',
  1153. tableId: "301015Table1",
  1154. tableName: "FQC检验记录表",
  1155. columnProp: 'site',
  1156. headerAlign: "center",
  1157. align: "center",
  1158. columnLabel: '工厂编号',
  1159. columnHidden: false,
  1160. columnImage: false,
  1161. columnSortable: false,
  1162. sortLv: 0,
  1163. status: true,
  1164. fixed: '',
  1165. columnWidth: 80,
  1166. },
  1167. {
  1168. userId: this.$store.state.user.name,
  1169. functionId: 301015,
  1170. serialNumber: '301015Table1InspectionNo',
  1171. tableId: "301015Table1",
  1172. tableName: "FQC检验记录表",
  1173. columnProp: 'inspectionNo',
  1174. headerAlign: "center",
  1175. align: "center",
  1176. columnLabel: '检验单号',
  1177. columnHidden: false,
  1178. columnImage: false,
  1179. columnSortable: false,
  1180. sortLv: 0,
  1181. status: true,
  1182. fixed: '',
  1183. columnWidth: 120,
  1184. },
  1185. {
  1186. userId: this.$store.state.user.name,
  1187. functionId: 301015,
  1188. serialNumber: '301015Table1PartNo',
  1189. tableId: "301015Table1",
  1190. tableName: "FQC检验记录表",
  1191. columnProp: 'partNo',
  1192. headerAlign: "center",
  1193. align: "center",
  1194. columnLabel: '物料编码',
  1195. columnHidden: false,
  1196. columnImage: false,
  1197. columnSortable: false,
  1198. sortLv: 0,
  1199. status: true,
  1200. fixed: '',
  1201. columnWidth: 120,
  1202. },
  1203. {
  1204. userId: this.$store.state.user.name,
  1205. functionId: 301015,
  1206. serialNumber: '301015Table1Spec',
  1207. tableId: "301015Table1",
  1208. tableName: "FQC检验记录表",
  1209. columnProp: 'spec',
  1210. headerAlign: "center",
  1211. align: "left",
  1212. columnLabel: '规格型号',
  1213. columnHidden: false,
  1214. columnImage: false,
  1215. columnSortable: false,
  1216. sortLv: 0,
  1217. status: true,
  1218. fixed: '',
  1219. columnWidth: 200,
  1220. },
  1221. {
  1222. userId: this.$store.state.user.name,
  1223. functionId: 301015,
  1224. serialNumber: '301015Table1PartDesc',
  1225. tableId: "301015Table1",
  1226. tableName: "FQC检验记录表",
  1227. columnProp: 'partDesc',
  1228. headerAlign: "center",
  1229. align: "left",
  1230. columnLabel: '物料名称',
  1231. columnHidden: false,
  1232. columnImage: false,
  1233. columnSortable: false,
  1234. sortLv: 0,
  1235. status: true,
  1236. fixed: '',
  1237. columnWidth: 300,
  1238. },
  1239. {
  1240. userId: this.$store.state.user.name,
  1241. functionId: 301015,
  1242. serialNumber: '301015Table1RollNo',
  1243. tableId: "301015Table1",
  1244. tableName: "FQC检验记录表",
  1245. columnProp: 'rollNo',
  1246. headerAlign: "center",
  1247. align: "center",
  1248. columnLabel: '标签条码',
  1249. columnHidden: false,
  1250. columnImage: false,
  1251. columnSortable: false,
  1252. sortLv: 0,
  1253. status: true,
  1254. fixed: '',
  1255. columnWidth: 100,
  1256. },
  1257. {
  1258. userId: this.$store.state.user.name,
  1259. functionId: 301015,
  1260. serialNumber: '301015Table1InspectionResult',
  1261. tableId: "301015Table1",
  1262. tableName: "FQC检验记录表",
  1263. columnProp: 'inspectionResult',
  1264. headerAlign: "center",
  1265. align: "center",
  1266. columnLabel: '检验结论',
  1267. columnHidden: false,
  1268. columnImage: false,
  1269. columnSortable: false,
  1270. sortLv: 0,
  1271. status: true,
  1272. fixed: '',
  1273. columnWidth: 100,
  1274. },
  1275. {
  1276. userId: this.$store.state.user.name,
  1277. functionId: 301015,
  1278. serialNumber: '301015Table1DisposalMeasures',
  1279. tableId: "301015Table1",
  1280. tableName: "FQC检验记录表",
  1281. columnProp: 'disposalMeasures',
  1282. headerAlign: "center",
  1283. align: "center",
  1284. columnLabel: '处置措施',
  1285. columnHidden: false,
  1286. columnImage: false,
  1287. columnSortable: false,
  1288. sortLv: 0,
  1289. status: true,
  1290. fixed: '',
  1291. columnWidth: 100,
  1292. },
  1293. {
  1294. userId: this.$store.state.user.name,
  1295. functionId: 301015,
  1296. serialNumber: '301015Table1TaskDate',
  1297. tableId: "301015Table1",
  1298. tableName: "FQC检验记录表",
  1299. columnProp: 'taskDate',
  1300. headerAlign: "center",
  1301. align: "center",
  1302. columnLabel: '送检日期',
  1303. columnHidden: false,
  1304. columnImage: false,
  1305. columnSortable: false,
  1306. sortLv: 0,
  1307. status: true,
  1308. fixed: '',
  1309. columnWidth: 130,
  1310. },
  1311. {
  1312. userId: this.$store.state.user.name,
  1313. functionId: 301015,
  1314. serialNumber: '301015Table1InspectionCycle',
  1315. tableId: "301015Table1",
  1316. tableName: "FQC检验记录表",
  1317. columnProp: 'inspectionCycle',
  1318. headerAlign: "center",
  1319. align: "right",
  1320. columnLabel: '检验周期(h)',
  1321. columnHidden: false,
  1322. columnImage: false,
  1323. columnSortable: false,
  1324. sortLv: 0,
  1325. status: true,
  1326. fixed: '',
  1327. columnWidth: 100,
  1328. },
  1329. {
  1330. userId: this.$store.state.user.name,
  1331. functionId: 301015,
  1332. serialNumber: '301015Table1OrderNo',
  1333. tableId: "301015Table1",
  1334. tableName: "FQC检验记录表",
  1335. columnProp: 'orderNo',
  1336. headerAlign: "center",
  1337. align: "left",
  1338. columnLabel: '工单号',
  1339. columnHidden: false,
  1340. columnImage: false,
  1341. columnSortable: false,
  1342. sortLv: 0,
  1343. status: true,
  1344. fixed: '',
  1345. columnWidth: 150,
  1346. },
  1347. {
  1348. userId: this.$store.state.user.name,
  1349. functionId: 301015,
  1350. serialNumber: '301015Table1SeqNo',
  1351. tableId: "301015Table1",
  1352. tableName: "FQC检验记录表",
  1353. columnProp: 'seqNo',
  1354. headerAlign: "center",
  1355. align: "left",
  1356. columnLabel: '派工单号',
  1357. columnHidden: false,
  1358. columnImage: false,
  1359. columnSortable: false,
  1360. sortLv: 0,
  1361. status: true,
  1362. fixed: '',
  1363. columnWidth: 150,
  1364. },
  1365. {
  1366. userId: this.$store.state.user.name,
  1367. functionId: 301015,
  1368. serialNumber: '301015Table1OperationDesc',
  1369. tableId: "301015Table1",
  1370. tableName: "FQC检验记录表",
  1371. columnProp: 'operationDesc',
  1372. headerAlign: "center",
  1373. align: "left",
  1374. columnLabel: '工序',
  1375. columnHidden: false,
  1376. columnImage: false,
  1377. columnSortable: false,
  1378. sortLv: 0,
  1379. status: true,
  1380. fixed: '',
  1381. columnWidth: 120,
  1382. },
  1383. {
  1384. userId: this.$store.state.user.name,
  1385. functionId: 301015,
  1386. serialNumber: '301015Table1ResourceDesc',
  1387. tableId: "301015Table1",
  1388. tableName: "FQC检验记录表",
  1389. columnProp: 'resourceDesc',
  1390. headerAlign: "center",
  1391. align: "left",
  1392. columnLabel: '机台',
  1393. columnHidden: false,
  1394. columnImage: false,
  1395. columnSortable: false,
  1396. sortLv: 0,
  1397. status: true,
  1398. fixed: '',
  1399. columnWidth: 120,
  1400. },
  1401. {
  1402. userId: this.$store.state.user.name,
  1403. functionId: 301015,
  1404. serialNumber: '301015Table1Sku',
  1405. tableId: "301015Table1",
  1406. tableName: "FQC检验记录表",
  1407. columnProp: 'sku',
  1408. headerAlign: "center",
  1409. align: "center",
  1410. columnLabel: 'SKU',
  1411. columnHidden: false,
  1412. columnImage: false,
  1413. columnSortable: false,
  1414. sortLv: 0,
  1415. status: true,
  1416. fixed: '',
  1417. columnWidth: 120,
  1418. },
  1419. {
  1420. userId: this.$store.state.user.name,
  1421. functionId: 301015,
  1422. serialNumber: '301015Table1CinvSourceCode',
  1423. tableId: "301015Table1",
  1424. tableName: "FQC检验记录表",
  1425. columnProp: 'cinvSourceCode',
  1426. headerAlign: "center",
  1427. align: "center",
  1428. columnLabel: 'PN',
  1429. columnHidden: false,
  1430. columnImage: false,
  1431. columnSortable: false,
  1432. sortLv: 0,
  1433. status: true,
  1434. fixed: '',
  1435. columnWidth: 120,
  1436. },
  1437. {
  1438. userId: this.$store.state.user.name,
  1439. functionId: 301015,
  1440. serialNumber: '301015Table1Invdefinetype',
  1441. tableId: "301015Table1",
  1442. tableName: "FQC检验记录表",
  1443. columnProp: 'invdefinetype',
  1444. headerAlign: "center",
  1445. align: "left",
  1446. columnLabel: '物料类别',
  1447. columnHidden: false,
  1448. columnImage: false,
  1449. columnSortable: false,
  1450. sortLv: 0,
  1451. status: true,
  1452. fixed: '',
  1453. columnWidth: 120,
  1454. },
  1455. {
  1456. userId: this.$store.state.user.name,
  1457. functionId: 301015,
  1458. serialNumber: '301015Table1RollQty',
  1459. tableId: "301015Table1",
  1460. tableName: "FQC检验记录表",
  1461. columnProp: 'rollQty',
  1462. headerAlign: "center",
  1463. align: "right",
  1464. columnLabel: '送检数量',
  1465. columnHidden: false,
  1466. columnImage: false,
  1467. columnSortable: false,
  1468. sortLv: 0,
  1469. status: true,
  1470. fixed: '',
  1471. columnWidth: 100,
  1472. },
  1473. {
  1474. userId: this.$store.state.user.name,
  1475. functionId: 301015,
  1476. serialNumber: '301015Table1SamplingQty',
  1477. tableId: "301015Table1",
  1478. tableName: "FQC检验记录表",
  1479. columnProp: 'samplingQty',
  1480. headerAlign: "center",
  1481. align: "right",
  1482. columnLabel: '抽样数量',
  1483. columnHidden: false,
  1484. columnImage: false,
  1485. columnSortable: false,
  1486. sortLv: 0,
  1487. status: true,
  1488. fixed: '',
  1489. columnWidth: 100,
  1490. },
  1491. {
  1492. userId: this.$store.state.user.name,
  1493. functionId: 301015,
  1494. serialNumber: '301015Table1UmName',
  1495. tableId: "301015Table1",
  1496. tableName: "FQC检验记录表",
  1497. columnProp: 'umName',
  1498. headerAlign: "center",
  1499. align: "center",
  1500. columnLabel: '单位',
  1501. columnHidden: false,
  1502. columnImage: false,
  1503. columnSortable: false,
  1504. sortLv: 0,
  1505. status: true,
  1506. fixed: '',
  1507. columnWidth: 100,
  1508. },
  1509. {
  1510. userId: this.$store.state.user.name,
  1511. functionId: 301015,
  1512. serialNumber: '301015Table1InspectionRemark',
  1513. tableId: "301015Table1",
  1514. tableName: "FQC检验记录表",
  1515. columnProp: 'inspectionRemark',
  1516. headerAlign: "center",
  1517. align: "left",
  1518. columnLabel: '质检备注',
  1519. columnHidden: false,
  1520. columnImage: false,
  1521. columnSortable: false,
  1522. sortLv: 0,
  1523. status: true,
  1524. fixed: '',
  1525. columnWidth: 200,
  1526. },
  1527. {
  1528. userId: this.$store.state.user.name,
  1529. functionId: 301015,
  1530. serialNumber: '301015Table1DisposalRemark',
  1531. tableId: "301015Table1",
  1532. tableName: "FQC检验记录表",
  1533. columnProp: 'disposalRemark',
  1534. headerAlign: "center",
  1535. align: "left",
  1536. columnLabel: '处置说明',
  1537. columnHidden: false,
  1538. columnImage: false,
  1539. columnSortable: false,
  1540. sortLv: 0,
  1541. status: true,
  1542. fixed: '',
  1543. columnWidth: 200,
  1544. },
  1545. {
  1546. userId: this.$store.state.user.name,
  1547. functionId: 301015,
  1548. serialNumber: '301015Table1ActionDate',
  1549. tableId: "301015Table1",
  1550. tableName: "FQC检验记录表",
  1551. columnProp: 'actionDate',
  1552. headerAlign: "center",
  1553. align: "center",
  1554. columnLabel: '开始检验时间',
  1555. columnHidden: false,
  1556. columnImage: false,
  1557. columnSortable: false,
  1558. sortLv: 0,
  1559. status: true,
  1560. fixed: '',
  1561. columnWidth: 130,
  1562. },
  1563. {
  1564. userId: this.$store.state.user.name,
  1565. functionId: 301015,
  1566. serialNumber: '301015Table1InspectorDate',
  1567. tableId: "301015Table1",
  1568. tableName: "FQC检验记录表",
  1569. columnProp: 'inspectorDate',
  1570. headerAlign: "center",
  1571. align: "center",
  1572. columnLabel: '检验时间',
  1573. columnHidden: false,
  1574. columnImage: false,
  1575. columnSortable: false,
  1576. sortLv: 0,
  1577. status: true,
  1578. fixed: '',
  1579. columnWidth: 130,
  1580. },
  1581. {
  1582. userId: this.$store.state.user.name,
  1583. functionId: 301015,
  1584. serialNumber: '301015Table1InspectorName',
  1585. tableId: "301015Table1",
  1586. tableName: "FQC检验记录表",
  1587. columnProp: 'inspectorName',
  1588. headerAlign: "center",
  1589. align: "center",
  1590. columnLabel: '质检员',
  1591. columnHidden: false,
  1592. columnImage: false,
  1593. columnSortable: false,
  1594. sortLv: 0,
  1595. status: true,
  1596. fixed: '',
  1597. columnWidth: 100,
  1598. },
  1599. {
  1600. userId: this.$store.state.user.name,
  1601. functionId: 301015,
  1602. serialNumber: '301015Table1SpecialRequirements',
  1603. tableId: "301015Table1",
  1604. tableName: "FQC检验记录表",
  1605. columnProp: 'specialRequirements',
  1606. headerAlign: "center",
  1607. align: "left",
  1608. columnLabel: '特殊要求',
  1609. columnHidden: false,
  1610. columnImage: false,
  1611. columnSortable: false,
  1612. sortLv: 0,
  1613. status: true,
  1614. fixed: '',
  1615. columnWidth: 200,
  1616. },
  1617. {
  1618. userId: this.$store.state.user.name,
  1619. functionId: 301015,
  1620. serialNumber: '301015Table1ReleaseFlag',
  1621. tableId: "301015Table1",
  1622. tableName: "FQC检验记录表",
  1623. columnProp: 'releaseFlag',
  1624. headerAlign: "center",
  1625. align: "center",
  1626. columnLabel: '放行标识',
  1627. columnHidden: false,
  1628. columnImage: false,
  1629. columnSortable: false,
  1630. sortLv: 0,
  1631. status: true,
  1632. fixed: '',
  1633. columnWidth: 90,
  1634. },
  1635. {
  1636. userId: this.$store.state.user.name,
  1637. functionId: 301015,
  1638. serialNumber: '301015Table1ReleaseTime',
  1639. tableId: "301015Table1",
  1640. tableName: "FQC检验记录表",
  1641. columnProp: 'releaseTime',
  1642. headerAlign: "center",
  1643. align: "center",
  1644. columnLabel: '放行时间',
  1645. columnHidden: false,
  1646. columnImage: false,
  1647. columnSortable: false,
  1648. sortLv: 0,
  1649. status: true,
  1650. fixed: '',
  1651. columnWidth: 150,
  1652. },
  1653. {
  1654. userId: this.$store.state.user.name,
  1655. functionId: 301015,
  1656. serialNumber: '301015Table1ReleaseByName',
  1657. tableId: "301015Table1",
  1658. tableName: "FQC检验记录表",
  1659. columnProp: 'releaseByName',
  1660. headerAlign: "center",
  1661. align: "center",
  1662. columnLabel: '放行人',
  1663. columnHidden: false,
  1664. columnImage: false,
  1665. columnSortable: false,
  1666. sortLv: 0,
  1667. status: true,
  1668. fixed: '',
  1669. columnWidth: 100,
  1670. },
  1671. ],
  1672. //项目清单
  1673. detailData: {
  1674. site: '',
  1675. buNo: '',
  1676. inspectionNo:'',
  1677. // 实验室检验单号(qc_fqc_record.ref_info1)
  1678. refInfo1: '',
  1679. partNo:'',
  1680. partDesc:'',
  1681. rollQty:'',
  1682. samplingQty: '',
  1683. unqualifiedQty: 0,
  1684. unqualifiedQuantity:'',
  1685. disposalMeasures:'',
  1686. disposalRemark: '',
  1687. inspectionResult: '',
  1688. inspectorNo: '',
  1689. inspectorName: '',
  1690. inspectionRemark: '',
  1691. submitFlag: '',
  1692. cinvSourceCode: '',
  1693. sku: '',
  1694. invdefinetype: '',
  1695. umId: '',
  1696. umName: '',
  1697. operator: '',
  1698. operatorName: '',
  1699. responsiblePerson: '',
  1700. responsiblePersonName: '',
  1701. state: '',
  1702. releaseFlag: 'N',
  1703. passQty: '',
  1704. notPassQty: '',
  1705. batchQualifiedQty: ''
  1706. },
  1707. detailInformationFlag: false,
  1708. detailList: [],
  1709. saveInformationData: {
  1710. site: '',
  1711. buNo: '',
  1712. inspectionNo:'',
  1713. disposalMeasures: '',
  1714. disposalRemark: '',
  1715. inspectorNo: '',
  1716. inspectionRemark: '',
  1717. samplingQty: '',
  1718. rollQty: '',
  1719. itemList:[],
  1720. unqualifiedQty: '',
  1721. partNo: '',
  1722. partDesc: '',
  1723. operator: '',
  1724. operatorName: '',
  1725. responsiblePerson: '',
  1726. responsiblePersonName: '',
  1727. subDetailList: [],
  1728. type: '',
  1729. passQty: '',
  1730. notPassQty: '',
  1731. batchQualifiedQty: ''
  1732. },
  1733. detailColumnList: [
  1734. {
  1735. userId: this.$store.state.user.name,
  1736. functionId: 301015,
  1737. serialNumber: '301015Table2ItemNo',
  1738. tableId: "301015Table2",
  1739. tableName: "检验单明细表",
  1740. columnProp: 'itemNo',
  1741. headerAlign: "center",
  1742. align: "center",
  1743. columnLabel: '检验项目编码',
  1744. columnHidden: false,
  1745. columnImage: false,
  1746. columnSortable: false,
  1747. sortLv: 0,
  1748. status: true,
  1749. fixed: '',
  1750. columnWidth: 120,
  1751. },
  1752. {
  1753. userId: this.$store.state.user.name,
  1754. functionId: 301015,
  1755. serialNumber: '301015Table2ItemDesc',
  1756. tableId: "301015Table2",
  1757. tableName: "检验单明细表",
  1758. columnProp: 'itemDesc',
  1759. headerAlign: "center",
  1760. align: "left",
  1761. columnLabel: '检验项目',
  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: 301015,
  1773. serialNumber: '301015Table2SamplingLevelDesc',
  1774. tableId: "301015Table2",
  1775. tableName: "检验单明细表",
  1776. columnProp: 'samplingLevelDesc',
  1777. headerAlign: "center",
  1778. align: "left",
  1779. columnLabel: '检验水平',
  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: 301015,
  1791. serialNumber: '301015Table2SamplingProgrammeDesc',
  1792. tableId: "301015Table2",
  1793. tableName: "检验单明细表",
  1794. columnProp: 'samplingProgrammeDesc',
  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: 301015,
  1809. serialNumber: '301015Table2MethodName',
  1810. tableId: "301015Table2",
  1811. tableName: "检验单明细表",
  1812. columnProp: 'methodName',
  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: 301015,
  1827. serialNumber: '301015Table2MethodRemark',
  1828. tableId: "301015Table2",
  1829. tableName: "检验单明细表",
  1830. columnProp: 'methodRemark',
  1831. headerAlign: "center",
  1832. align: "left",
  1833. columnLabel: '检验方法说明',
  1834. columnHidden: false,
  1835. columnImage: false,
  1836. columnSortable: false,
  1837. sortLv: 0,
  1838. status: true,
  1839. fixed: '',
  1840. columnWidth: 200,
  1841. },
  1842. {
  1843. userId: this.$store.state.user.name,
  1844. functionId: 301015,
  1845. serialNumber: '301015Table2ObjectDesc',
  1846. tableId: "301015Table2",
  1847. tableName: "检验单明细表",
  1848. columnProp: 'objectDesc',
  1849. headerAlign: "center",
  1850. align: "center",
  1851. columnLabel: '检测仪器',
  1852. columnHidden: false,
  1853. columnImage: false,
  1854. columnSortable: false,
  1855. sortLv: 0,
  1856. status: true,
  1857. fixed: '',
  1858. columnWidth: 120,
  1859. },
  1860. {
  1861. userId: this.$store.state.user.name,
  1862. functionId: 301006,
  1863. serialNumber: '301006Table2ObjectDesc',
  1864. tableId: "301006Table2",
  1865. tableName: "检验单明细表",
  1866. columnProp: 'pictureFlag',
  1867. headerAlign: "center",
  1868. align: "center",
  1869. columnLabel: '图片是否必填',
  1870. columnHidden: false,
  1871. columnImage: false,
  1872. columnSortable: false,
  1873. sortLv: 0,
  1874. status: true,
  1875. fixed: '',
  1876. columnWidth: 120,
  1877. },
  1878. {
  1879. userId: this.$store.state.user.name,
  1880. functionId: 301015,
  1881. serialNumber: '301015Table2Aql',
  1882. tableId: "301015Table2",
  1883. tableName: "检验单明细表",
  1884. columnProp: 'aql',
  1885. headerAlign: "center",
  1886. align: "right",
  1887. columnLabel: 'AQL',
  1888. columnHidden: false,
  1889. columnImage: false,
  1890. columnSortable: false,
  1891. sortLv: 0,
  1892. status: true,
  1893. fixed: '',
  1894. columnWidth: 100,
  1895. },
  1896. {
  1897. userId: this.$store.state.user.name,
  1898. functionId: 301015,
  1899. serialNumber: '301015Table2Ac',
  1900. tableId: "301015Table2",
  1901. tableName: "检验单明细表",
  1902. columnProp: 'ac',
  1903. headerAlign: "center",
  1904. align: "right",
  1905. columnLabel: 'AC',
  1906. columnHidden: false,
  1907. columnImage: false,
  1908. columnSortable: false,
  1909. sortLv: 0,
  1910. status: true,
  1911. fixed: '',
  1912. columnWidth: 100,
  1913. },
  1914. {
  1915. userId: this.$store.state.user.name,
  1916. functionId: 301015,
  1917. serialNumber: '301015Table2Re',
  1918. tableId: "301015Table2",
  1919. tableName: "检验单明细表",
  1920. columnProp: 're',
  1921. headerAlign: "center",
  1922. align: "right",
  1923. columnLabel: 'RE',
  1924. columnHidden: false,
  1925. columnImage: false,
  1926. columnSortable: false,
  1927. sortLv: 0,
  1928. status: true,
  1929. fixed: '',
  1930. columnWidth: 100,
  1931. },
  1932. {
  1933. userId: this.$store.state.user.name,
  1934. functionId: 301015,
  1935. serialNumber: '301015Table2DefaultValue',
  1936. tableId: "301015Table2",
  1937. tableName: "检验单明细表",
  1938. columnProp: 'defaultValue',
  1939. headerAlign: "center",
  1940. align: "right",
  1941. columnLabel: '标准值',
  1942. columnHidden: false,
  1943. columnImage: false,
  1944. columnSortable: false,
  1945. sortLv: 0,
  1946. status: true,
  1947. fixed: '',
  1948. columnWidth: 100,
  1949. },
  1950. {
  1951. userId: this.$store.state.user.name,
  1952. functionId: 301015,
  1953. serialNumber: '301015Table2MaxValue',
  1954. tableId: "301015Table2",
  1955. tableName: "检验单明细表",
  1956. columnProp: 'maxValue',
  1957. headerAlign: "center",
  1958. align: "right",
  1959. columnLabel: '上限值',
  1960. columnHidden: false,
  1961. columnImage: false,
  1962. columnSortable: false,
  1963. sortLv: 0,
  1964. status: true,
  1965. fixed: '',
  1966. columnWidth: 100,
  1967. },
  1968. {
  1969. userId: this.$store.state.user.name,
  1970. functionId: 301015,
  1971. serialNumber: '301015Table2MinValue',
  1972. tableId: "301015Table2",
  1973. tableName: "检验单明细表",
  1974. columnProp: 'minValue',
  1975. headerAlign: "center",
  1976. align: "right",
  1977. columnLabel: '下限值',
  1978. columnHidden: false,
  1979. columnImage: false,
  1980. columnSortable: false,
  1981. sortLv: 0,
  1982. status: true,
  1983. fixed: '',
  1984. columnWidth: 100,
  1985. },
  1986. {
  1987. userId: this.$store.state.user.name,
  1988. functionId: 301015,
  1989. serialNumber: '301015Table2ValueType',
  1990. tableId: "301015Table2",
  1991. tableName: "检验单明细表",
  1992. columnProp: 'valueType',
  1993. headerAlign: "center",
  1994. align: "center",
  1995. columnLabel: '检测值类型',
  1996. columnHidden: false,
  1997. columnImage: false,
  1998. columnSortable: false,
  1999. sortLv: 0,
  2000. status: true,
  2001. fixed: '',
  2002. columnWidth: 100,
  2003. },
  2004. ],
  2005. fileColumnList: [
  2006. {
  2007. columnProp: 'fileName',
  2008. headerAlign: "center",
  2009. align: "center",
  2010. columnLabel: '文件名称',
  2011. columnHidden: false,
  2012. columnImage: false,
  2013. columnSortable: false,
  2014. sortLv: 0,
  2015. status: true,
  2016. fixed: '',
  2017. },
  2018. {
  2019. columnProp: 'createdBy',
  2020. headerAlign: "center",
  2021. align: 'center',
  2022. columnLabel: '上传人',
  2023. columnHidden: false,
  2024. columnImage: false,
  2025. columnSortable: true,
  2026. sortLv: 0,
  2027. status: true,
  2028. fixed: false
  2029. },
  2030. {
  2031. columnProp: 'createDate',
  2032. headerAlign: "center",
  2033. align: 'center',
  2034. columnLabel: '上传时间',
  2035. columnHidden: false,
  2036. columnImage: false,
  2037. columnSortable: true,
  2038. sortLv: 0,
  2039. status: true,
  2040. fixed: false
  2041. },
  2042. {
  2043. columnProp: 'orderRef3',
  2044. headerAlign: "center",
  2045. align: 'center',
  2046. columnLabel: '备注',
  2047. columnHidden: false,
  2048. columnImage: false,
  2049. columnSortable: true,
  2050. sortLv: 0,
  2051. status: true,
  2052. fixed: false
  2053. },
  2054. ],
  2055. // 派工单号
  2056. seqInfoList: [],
  2057. seqDetailFlag: false,
  2058. seqDetailData: {
  2059. orderNo: '',
  2060. seqNo: '',
  2061. sku: '',
  2062. partNo: '',
  2063. partDesc: '',
  2064. operationDesc: '',
  2065. qtyrequired: '',
  2066. lotsize: '',
  2067. status: 'N'
  2068. },
  2069. seqDetailColumnList: [
  2070. {
  2071. userId: this.$store.state.user.name,
  2072. functionId: 301015,
  2073. serialNumber: '301015Table3OrderNo',
  2074. tableId: "301015Table3",
  2075. tableName: "任务新增-派工单",
  2076. fixed: '',
  2077. columnWidth: 80,
  2078. columnProp: 'orderNo',
  2079. headerAlign: "center",
  2080. align: "center",
  2081. columnLabel: '工单号',
  2082. columnHidden: false,
  2083. columnImage: false,
  2084. columnSortable: false,
  2085. sortLv: 0,
  2086. status: true,
  2087. },
  2088. {
  2089. userId: this.$store.state.user.name,
  2090. functionId: 301015,
  2091. serialNumber: '301015Table3SeqNo',
  2092. tableId: "301015Table3",
  2093. tableName: "任务新增-派工单",
  2094. fixed: '',
  2095. columnWidth: 80,
  2096. columnProp: 'seqNo',
  2097. headerAlign: "center",
  2098. align: "center",
  2099. columnLabel: '派工单号',
  2100. columnHidden: false,
  2101. columnImage: false,
  2102. columnSortable: false,
  2103. sortLv: 0,
  2104. status: true,
  2105. },
  2106. {
  2107. userId: this.$store.state.user.name,
  2108. functionId: 301015,
  2109. serialNumber: '301015Table3Sku',
  2110. tableId: "301015Table3",
  2111. tableName: "任务新增-派工单",
  2112. fixed: '',
  2113. columnWidth: 80,
  2114. columnProp: 'sku',
  2115. headerAlign: "center",
  2116. align: "center",
  2117. columnLabel: 'SKU',
  2118. columnHidden: false,
  2119. columnImage: false,
  2120. columnSortable: false,
  2121. sortLv: 0,
  2122. status: true,
  2123. },
  2124. {
  2125. userId: this.$store.state.user.name,
  2126. functionId: 301015,
  2127. serialNumber: '301015Table3PartNo',
  2128. tableId: "301015Table3",
  2129. tableName: "任务新增-派工单",
  2130. fixed: '',
  2131. columnWidth: 80,
  2132. columnProp: 'partNo',
  2133. headerAlign: "center",
  2134. align: "center",
  2135. columnLabel: '物料编码',
  2136. columnHidden: false,
  2137. columnImage: false,
  2138. columnSortable: false,
  2139. sortLv: 0,
  2140. status: true,
  2141. },
  2142. {
  2143. userId: this.$store.state.user.name,
  2144. functionId: 301015,
  2145. serialNumber: '301015Table3PartDesc',
  2146. tableId: "301015Table3",
  2147. tableName: "任务新增-派工单",
  2148. fixed: '',
  2149. columnWidth: 80,
  2150. columnProp: 'partDesc',
  2151. headerAlign: "center",
  2152. align: "center",
  2153. columnLabel: '物料名称',
  2154. columnHidden: false,
  2155. columnImage: false,
  2156. columnSortable: false,
  2157. sortLv: 0,
  2158. status: true,
  2159. },
  2160. {
  2161. userId: this.$store.state.user.name,
  2162. functionId: 301015,
  2163. serialNumber: '301015Table3Lotsize',
  2164. tableId: "301015Table3",
  2165. tableName: "任务新增-派工单",
  2166. fixed: '',
  2167. columnWidth: 80,
  2168. columnProp: 'lotsize',
  2169. headerAlign: "center",
  2170. align: "center",
  2171. columnLabel: '工单数量',
  2172. columnHidden: false,
  2173. columnImage: false,
  2174. columnSortable: false,
  2175. sortLv: 0,
  2176. status: true,
  2177. },
  2178. {
  2179. userId: this.$store.state.user.name,
  2180. functionId: 301015,
  2181. serialNumber: '301015Table3Qtyrequired',
  2182. tableId: "301015Table3",
  2183. tableName: "任务新增-派工单",
  2184. fixed: '',
  2185. columnWidth: 80,
  2186. columnProp: 'qtyrequired',
  2187. headerAlign: "center",
  2188. align: "center",
  2189. columnLabel: '派工数量',
  2190. columnHidden: false,
  2191. columnImage: false,
  2192. columnSortable: false,
  2193. sortLv: 0,
  2194. status: true,
  2195. },
  2196. {
  2197. userId: this.$store.state.user.name,
  2198. functionId: 301015,
  2199. serialNumber: '301015Table3OperationDesc',
  2200. tableId: "301015Table3",
  2201. tableName: "任务新增-派工单",
  2202. fixed: '',
  2203. columnWidth: 80,
  2204. columnProp: 'operationDesc',
  2205. headerAlign: "center",
  2206. align: "center",
  2207. columnLabel: '工序',
  2208. columnHidden: false,
  2209. columnImage: false,
  2210. columnSortable: false,
  2211. sortLv: 0,
  2212. status: true,
  2213. }
  2214. ],
  2215. // 子明细数据对象
  2216. tableData: [],
  2217. checkedDetail: [],
  2218. subDetailFlag: false,
  2219. subDetailData: {
  2220. site: '',
  2221. buNo: '',
  2222. inspectionNo: '',
  2223. itemNo: '',
  2224. itemDesc: '',
  2225. defaultValue: '',
  2226. maxValue: '',
  2227. minValue: '',
  2228. valueTypeDb: '',
  2229. subDetailValues:[],
  2230. page: 1,
  2231. limit: 10,
  2232. },
  2233. options: [],
  2234. FAISelections: [],
  2235. modalFlag: false,
  2236. rules: {
  2237. orderNoType:[
  2238. {
  2239. required: true,
  2240. message: ' ',
  2241. trigger: ['blur','change']
  2242. }
  2243. ],
  2244. operationDescType:[
  2245. {
  2246. required: true,
  2247. message: ' ',
  2248. trigger: ['blur','change']
  2249. }
  2250. ],
  2251. resourceIdType:[
  2252. {
  2253. required: true,
  2254. message: ' ',
  2255. trigger: ['blur','change']
  2256. }
  2257. ],
  2258. rollQtyType:[
  2259. {
  2260. required: true,
  2261. message: ' ',
  2262. trigger: ['blur','change']
  2263. }
  2264. ],
  2265. seqNoType: [
  2266. {
  2267. required: true,
  2268. message: ' ',
  2269. trigger: ['blur','change']
  2270. }
  2271. ],
  2272. partNoType: [
  2273. {
  2274. required: true,
  2275. message: ' ',
  2276. trigger: ['blur','change']
  2277. }
  2278. ],
  2279. umIdType: [
  2280. {
  2281. required: true,
  2282. message: ' ',
  2283. trigger: ['blur','change']
  2284. }
  2285. ],
  2286. templateId: [
  2287. {
  2288. required: true,
  2289. message: ' ',
  2290. trigger: ['blur','change']
  2291. }
  2292. ],
  2293. bu:[
  2294. {
  2295. required: true,
  2296. message: ' ',
  2297. trigger: ['blur','change']
  2298. }
  2299. ]
  2300. },
  2301. resourceList: [],
  2302. operationList: [],
  2303. partList: [],
  2304. batchHandleAddModalFlag: false,
  2305. batchAddData: {
  2306. samplingLocation: '',
  2307. samplingLocationB: '',
  2308. samplingNumber: ''
  2309. },
  2310. controlData: {},
  2311. templateData: {
  2312. site: '',
  2313. bu: '',
  2314. templateId: '',
  2315. templateName: '',
  2316. inspectionTypeNo: '',
  2317. inspectionTypeName: ''
  2318. },
  2319. templateList: [],
  2320. templateModelFlag: false,
  2321. templateDetailList: [
  2322. {
  2323. columnProp: 'templateId',
  2324. headerAlign: "center",
  2325. align: "center",
  2326. columnLabel: '模板编码',
  2327. columnHidden: false,
  2328. columnImage: false,
  2329. columnSortable: false,
  2330. sortLv: 0,
  2331. status: true,
  2332. fixed: '',
  2333. },
  2334. {
  2335. columnProp: 'templateName',
  2336. headerAlign: "center",
  2337. align: "center",
  2338. columnLabel: '模板名称',
  2339. columnHidden: false,
  2340. columnImage: false,
  2341. columnSortable: false,
  2342. sortLv: 0,
  2343. status: true,
  2344. fixed: '',
  2345. },
  2346. {
  2347. columnProp: 'inspectionTypeName',
  2348. headerAlign: "center",
  2349. align: "center",
  2350. columnLabel: '检验类型',
  2351. columnHidden: false,
  2352. columnImage: false,
  2353. columnSortable: false,
  2354. sortLv: 0,
  2355. status: true,
  2356. fixed: '',
  2357. },
  2358. ],
  2359. checked: false,
  2360. typeOptions: [],
  2361. disposalMeasuresOptions: [],
  2362. timeout: null,
  2363. partData: {
  2364. site: '',
  2365. bu: '',
  2366. partNo: '',
  2367. partDesc: '',
  2368. sku: '',
  2369. cinvSourceCode: ''
  2370. },
  2371. partDetailList: [
  2372. {
  2373. columnProp: 'partNo',
  2374. headerAlign: "center",
  2375. align: "center",
  2376. columnLabel: '物料编码',
  2377. columnHidden: false,
  2378. columnImage: false,
  2379. columnSortable: false,
  2380. sortLv: 0,
  2381. status: true,
  2382. fixed: '',
  2383. },
  2384. {
  2385. columnProp: 'partDesc',
  2386. headerAlign: "center",
  2387. align: "center",
  2388. columnLabel: '物料名称',
  2389. columnHidden: false,
  2390. columnImage: false,
  2391. columnSortable: false,
  2392. sortLv: 0,
  2393. status: true,
  2394. fixed: '',
  2395. },
  2396. {
  2397. columnProp: 'sku',
  2398. headerAlign: "center",
  2399. align: "center",
  2400. columnLabel: 'SKU',
  2401. columnHidden: false,
  2402. columnImage: false,
  2403. columnSortable: false,
  2404. sortLv: 0,
  2405. status: true,
  2406. fixed: '',
  2407. },
  2408. {
  2409. columnProp: 'cinvSourceCode',
  2410. headerAlign: "center",
  2411. align: "center",
  2412. columnLabel: 'PN',
  2413. columnHidden: false,
  2414. columnImage: false,
  2415. columnSortable: false,
  2416. sortLv: 0,
  2417. status: true,
  2418. fixed: '',
  2419. },
  2420. ],
  2421. partModelFlag: false,
  2422. umList: [],
  2423. userBuList: [],
  2424. buList: [],
  2425. siteList: [],
  2426. authSearch: false,
  2427. authSave: false,
  2428. authCheck: false,
  2429. authCancelCheck: false,
  2430. authDelete: false,
  2431. authOverLoad: false,
  2432. authTempRelease: false,
  2433. authDetail: false,
  2434. authFile: false,
  2435. menuId: this.$route.meta.menuId,
  2436. roleList: [],
  2437. operatorList: [],
  2438. operatorData: {
  2439. flag: '',
  2440. site: '',
  2441. bu: '',
  2442. adminID: '',
  2443. adminName: '',
  2444. roleName: '',
  2445. roleId: '',
  2446. userName: this.$store.state.user.name
  2447. },
  2448. operatorModelFlag: false,
  2449. dataListSelections2: [],
  2450. operatorDetailList: [
  2451. {
  2452. columnProp: 'adminID',
  2453. headerAlign: "center",
  2454. align: "center",
  2455. columnLabel: '用户账号',
  2456. columnHidden: false,
  2457. columnImage: false,
  2458. columnSortable: false,
  2459. sortLv: 0,
  2460. status: true,
  2461. fixed: '',
  2462. },
  2463. {
  2464. columnProp: 'adminName',
  2465. headerAlign: "center",
  2466. align: "center",
  2467. columnLabel: '用户名称',
  2468. columnHidden: false,
  2469. columnImage: false,
  2470. columnSortable: false,
  2471. sortLv: 0,
  2472. status: true,
  2473. fixed: '',
  2474. },
  2475. {
  2476. columnProp: 'email',
  2477. headerAlign: "center",
  2478. align: "center",
  2479. columnLabel: '邮箱',
  2480. columnHidden: false,
  2481. columnImage: false,
  2482. columnSortable: false,
  2483. sortLv: 0,
  2484. status: true,
  2485. fixed: '',
  2486. },
  2487. {
  2488. columnProp: 'phone',
  2489. headerAlign: "center",
  2490. align: "center",
  2491. columnLabel: '手机号',
  2492. columnHidden: false,
  2493. columnImage: false,
  2494. columnSortable: false,
  2495. sortLv: 0,
  2496. status: true,
  2497. fixed: '',
  2498. },
  2499. ],
  2500. acquisitionList: [],
  2501. ItemObjectModelFlag: false,
  2502. itemObjectList: [],
  2503. itemObjectColumnList: [
  2504. {
  2505. columnProp: 'itemNo',
  2506. headerAlign: "center",
  2507. align: "center",
  2508. columnLabel: '项目编码',
  2509. columnHidden: false,
  2510. columnImage: false,
  2511. status: true,
  2512. columnWidth: 120,
  2513. },
  2514. {
  2515. columnProp: 'itemDesc',
  2516. headerAlign: "center",
  2517. align: "left",
  2518. columnLabel: '项目名称',
  2519. columnHidden: false,
  2520. columnImage: false,
  2521. status: true,
  2522. columnWidth: 200,
  2523. },
  2524. ],
  2525. actionData: {
  2526. site: '',
  2527. buNo: '',
  2528. inspectionNo: ''
  2529. },
  2530. subDetailLoading: false,
  2531. saveLoading: false,
  2532. searchLoading: false,
  2533. subDetailVisiable: false,
  2534. }
  2535. },
  2536. mounted () {
  2537. this.$nextTick(() => {
  2538. this.height = window.innerHeight - 250
  2539. })
  2540. },
  2541. created () {
  2542. // 按钮控制
  2543. this.getButtonAuthData()
  2544. this.loadSiteList()
  2545. // 获取用户的 site 和 bu
  2546. // this.getSiteAndBuByUserName()
  2547. // 获取用户的 site 和 bu
  2548. // this.getSiteAndBuByUserName2()
  2549. // 收藏
  2550. // this.favoriteIsOk()
  2551. // 检验类型
  2552. this.inspectionTypeSearch()
  2553. // 处置措施
  2554. this.disposalMeasuresSearch()
  2555. // 单位
  2556. this.umSearch()
  2557. // 查看 质量任务生成规则控制 动控是否开启
  2558. // this.queryController()
  2559. // 动态列已移至 activated()(keep-alive 首次加载也触发 activated,避免 created+activated 双重调用导致并发重复插入)
  2560. // this.getTableUserColumn('301015Table1', 1)
  2561. // this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2562. // this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2563. if (!this.authSearch) {
  2564. // 获取数据列表
  2565. this.getDataList()
  2566. }
  2567. // 获取用户角色
  2568. this.getUserRoleList()
  2569. },
  2570. activated () {
  2571. // 页面被激活时(keep-alive 返回或 navbar 全局刷新),重新拉取用户列配置
  2572. this.getTableUserColumn('301015Table1', 1)
  2573. // 通知 navbar 当前页面的真实 functionId(用于 navbar 全局列设置入口)
  2574. if (this.EventBus) this.EventBus.$emit('updateFunctionId', 301015)
  2575. },
  2576. methods: {
  2577. loadSiteList () {
  2578. getSiteData({ userID: this.$store.state.user.name }).then(({data}) => {
  2579. this.siteList = (data && data.rows) ? data.rows : []
  2580. })
  2581. },
  2582. getDefaultSite () {
  2583. return (this.siteList && this.siteList.length) ? this.siteList[0].siteID : ''
  2584. },
  2585. onModalSiteChange () {
  2586. this.modalData.rollNo = ''
  2587. this.modalData.seqNo = ''
  2588. this.modalData.orderNo = ''
  2589. this.modalData.operationDesc = ''
  2590. this.modalData.operationNo = ''
  2591. this.modalData.resourceId = ''
  2592. this.modalData.resourceDesc = ''
  2593. this.modalData.partNo = ''
  2594. this.modalData.partDesc = ''
  2595. this.modalData.invdefinetype = ''
  2596. this.modalData.sku = ''
  2597. this.modalData.cinvSourceCode = ''
  2598. this.modalData.templateId = ''
  2599. this.modalData.templateName = ''
  2600. this.modalData.workCenterNo = ''
  2601. this.modalData.specialRequirements = ''
  2602. this.modalData.batchRollNo = ''
  2603. this.modalData.rollQty = ''
  2604. this.operationList = []
  2605. this.resourceList = []
  2606. this.partList = []
  2607. this.inspectionTypeSearch()
  2608. },
  2609. // 弹窗保存后的回调(column.vue emit refreshData 时仅传 tableId,需包装为两个参数)
  2610. refreshColumnList (tableId) {
  2611. this.getTableUserColumn(tableId, 1)
  2612. },
  2613. // 设置动态列
  2614. userSetting () {
  2615. this.visible = true
  2616. let queryTable = {
  2617. userId: this.$store.state.user.name,
  2618. functionId: 301015,
  2619. languageCode: this.$i18n.locale,
  2620. tableId: "301015Table1"
  2621. }
  2622. this.$nextTick(() => {
  2623. this.$refs.column.init(queryTable)
  2624. })
  2625. },
  2626. // 获取用户的bu
  2627. getSiteAndBuByUserName2 () {
  2628. let tempData = {
  2629. username: this.$store.state.user.name,
  2630. }
  2631. getSiteAndBuByUserName2(tempData).then(({data}) => {
  2632. if (data.code === 0) {
  2633. this.buList = data.rows
  2634. }
  2635. })
  2636. },
  2637. // 批量打印标签
  2638. printList () {
  2639. if (this.FAISelections.length === 0) {
  2640. this.$message.warning('请勾选要打印的检验单!')
  2641. return
  2642. }
  2643. const inspectionNos = this.$refs.qrCode.init(this.FAISelections.map(item => item.inspectionNo))
  2644. for (let i = 0; i < inspectionNos.length; i++) {
  2645. this.FAISelections[i].qrCode = inspectionNos[i]
  2646. }
  2647. qcPrint(this.FAISelections)
  2648. },
  2649. // 数据采集
  2650. dataAcquisition () {
  2651. this.loadFlag = true
  2652. let tempDate = {
  2653. site: this.detailData.site,
  2654. buNo: this.detailData.buNo,
  2655. inspectionNo: this.detailData.inspectionNo,
  2656. flag: 'fqc'
  2657. }
  2658. dataAcquisition(tempDate).then(({data}) => {
  2659. if (data.code === 0) {
  2660. // this.acquisitionList = data.rows
  2661. this.changeMyString(data.rows)
  2662. this.$message({
  2663. message: '数据采集成功',
  2664. type: 'success',
  2665. duration: 1500
  2666. })
  2667. } else {
  2668. this.$message({
  2669. message: data.msg,
  2670. type: 'warning',
  2671. duration: 1500
  2672. })
  2673. }
  2674. this.loadFlag = false
  2675. })
  2676. },
  2677. // 根据项目数据采集
  2678. dataAcquisitionByItem (row) {
  2679. this.loadFlag = true
  2680. let tempDate = {
  2681. site: row.site,
  2682. buNo: row.buNo,
  2683. inspectionNo: row.inspectionNo,
  2684. templateId: row.templateId,
  2685. itemNo: row.itemNo,
  2686. flag: 'fqc'
  2687. }
  2688. dataAcquisitionByItem(tempDate).then(({data}) => {
  2689. if (data.code === 0) {
  2690. this.changeMyString(data.rows)
  2691. this.$message({
  2692. message: '数据采集成功',
  2693. type: 'success',
  2694. duration: 1500
  2695. })
  2696. } else {
  2697. this.$message({
  2698. message: data.msg,
  2699. type: 'warning',
  2700. duration: 1500
  2701. })
  2702. }
  2703. this.loadFlag = false
  2704. })
  2705. },
  2706. // 获取用户角色
  2707. getUserRoleList () {
  2708. getUserRoleList().then(({data}) => {
  2709. if (data.code === 0) {
  2710. this.roleList = data.rows
  2711. } else {
  2712. this.roleList = []
  2713. }
  2714. })
  2715. },
  2716. // 获取协同人员列表
  2717. getOperatorList () {
  2718. this.operatorData.flag = '1'
  2719. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2720. if (this.roleList.length > 0) {
  2721. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2722. if (filterList.length > 0) {
  2723. this.operatorData.roleId = filterList[0].roleId
  2724. } else {
  2725. this.operatorData.roleId = this.roleList[0].roleId
  2726. }
  2727. } else {
  2728. this.operatorData.roleId = ''
  2729. }
  2730. // 先清空缓存选中
  2731. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2732. // 拿到选中的人员编号
  2733. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2734. getOperatorList(this.operatorData).then(({data}) => {
  2735. if (data && data.code === 0) {
  2736. this.operatorList = data.rows
  2737. this.operatorList.forEach(val => {
  2738. // 回显选中
  2739. if (tempDataList.includes(val.adminID)) {
  2740. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2741. }
  2742. })
  2743. this.operatorModelFlag = true
  2744. } else {
  2745. this.$alert(data.msg, '错误', {
  2746. confirmButtonText: '确定'
  2747. })
  2748. }
  2749. })
  2750. },
  2751. // 获取责任人员列表
  2752. getResponsiblePersonList () {
  2753. this.operatorData.flag = '2'
  2754. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2755. // 先清空缓存选中
  2756. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2757. // 拿到选中的人员编号
  2758. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2759. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2760. if (data && data.code === 0) {
  2761. this.operatorList = data.rows
  2762. this.operatorList.forEach(val => {
  2763. // 回显选中
  2764. if (tempDataList.includes(val.adminID)) {
  2765. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2766. }
  2767. })
  2768. this.operatorModelFlag = true
  2769. } else {
  2770. this.$alert(data.msg, '错误', {
  2771. confirmButtonText: '确定'
  2772. })
  2773. }
  2774. })
  2775. },
  2776. // 查询机修人员列表
  2777. getOperatorList2 () {
  2778. if (this.operatorData.flag === '1') {
  2779. // 拿到选中的人员编号
  2780. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2781. getOperatorList(this.operatorData).then(({data}) => {
  2782. if (data && data.code === 0) {
  2783. this.operatorList = data.rows
  2784. this.operatorList.forEach(val => {
  2785. // 回显选中的部门
  2786. if (tempDataList.includes(val.adminID)) {
  2787. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2788. }
  2789. })
  2790. } else {
  2791. this.operatorList = []
  2792. }
  2793. })
  2794. } else {
  2795. // 拿到选中的人员编号
  2796. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2797. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2798. if (data && data.code === 0) {
  2799. this.operatorList = data.rows
  2800. this.operatorList.forEach(val => {
  2801. // 回显选中的部门
  2802. if (tempDataList.includes(val.adminID)) {
  2803. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2804. }
  2805. })
  2806. } else {
  2807. this.operatorList = []
  2808. }
  2809. })
  2810. }
  2811. },
  2812. // 点击行选中复选框
  2813. operatorClickRow (row) {
  2814. this.$refs.operatorTable.toggleRowSelection(row)
  2815. },
  2816. // 多选
  2817. selectionChangeHandle2 (val) {
  2818. this.dataListSelections2 = val
  2819. },
  2820. // 确认多选协同人员
  2821. confirmOperator () {
  2822. if (this.dataListSelections2.length === 0) {
  2823. this.$message.warning('请勾选人员!')
  2824. return
  2825. }
  2826. if (this.operatorData.flag === '1') {
  2827. this.detailData.operator = ''
  2828. this.detailData.operatorName = ''
  2829. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2830. //if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2831. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2832. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2833. //}
  2834. }
  2835. if (this.detailData.operator.charAt(0) === ';') {
  2836. this.detailData.operator = this.detailData.operator.substring(1)
  2837. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2838. }
  2839. } else {
  2840. this.detailData.responsiblePerson = ''
  2841. this.detailData.responsiblePersonName = ''
  2842. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2843. //if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2844. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2845. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2846. //}
  2847. }
  2848. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2849. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2850. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2851. }
  2852. }
  2853. this.operatorData = {
  2854. flag: '',
  2855. site: '',
  2856. bu: '',
  2857. adminID: '',
  2858. adminName: '',
  2859. roleName: '',
  2860. roleId: '',
  2861. userName: this.$store.state.user.name
  2862. }
  2863. this.operatorModelFlag = false
  2864. },
  2865. // bu内容改变事件
  2866. buChange () {
  2867. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  2868. this.modalData.templateId = ''
  2869. this.modalData.templateName = ''
  2870. } else { // 无工单检验
  2871. this.modalData.partNo = ''
  2872. this.modalData.partDesc = ''
  2873. this.modalData.invdefinetype = ''
  2874. this.modalData.sku = ''
  2875. this.modalData.cinvSourceCode = ''
  2876. this.modalData.templateId = ''
  2877. this.modalData.templateName = ''
  2878. }
  2879. },
  2880. // 获取用户的bu
  2881. getSiteAndBuByUserName () {
  2882. let tempData = {
  2883. username: this.$store.state.user.name,
  2884. }
  2885. getSiteAndBuByUserName(tempData).then(({data}) => {
  2886. if (data.code === 0) {
  2887. this.userBuList = data.rows
  2888. }
  2889. })
  2890. },
  2891. // 子明细导入
  2892. subDetailUpload () {
  2893. let currentData = {
  2894. flag: 'FQC',
  2895. site: this.detailData.site,
  2896. buNo: this.detailData.buNo,
  2897. inspectionNo: this.detailData.inspectionNo
  2898. }
  2899. //打开组件 去做新增业务
  2900. this.$nextTick(() => {
  2901. this.$refs.subDetailUpload.init(currentData)
  2902. })
  2903. },
  2904. // 查询单位
  2905. umSearch () {
  2906. let tempData = {
  2907. site: this.$store.state.user.site,
  2908. active: 'Y'
  2909. }
  2910. umSearch(tempData).then(({data}) => {
  2911. if (data.code === 0) {
  2912. this.umList = data.rows
  2913. }
  2914. })
  2915. },
  2916. // 标签号回车事件
  2917. rollNoEnter () {
  2918. const regex = /\(08\)(.*)/
  2919. const result = this.modalData.rollNo.match(regex)
  2920. let tempData = {
  2921. site: this.modalData.site,
  2922. bu: this.modalData.bu,
  2923. rollNo: result == null ? this.modalData.rollNo : result[1]
  2924. }
  2925. rollNoEnter(tempData).then(({data}) => {
  2926. if (data && data.code === 0) {
  2927. this.operationList = data.rows
  2928. this.modalData.seqNo = data.rows[0].seqNo
  2929. this.modalData.orderNo = data.rows[0].orderNo
  2930. this.modalData.operationDesc = data.rows[0].operationDesc
  2931. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2932. this.modalData.resourceId = data.rows[0].resourceId
  2933. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2934. this.modalData.partNo = data.rows[0].partNo
  2935. this.modalData.partDesc = data.rows[0].partDesc
  2936. this.modalData.invdefinetype = data.rows[0].invdefinetype
  2937. this.modalData.sku = data.rows[0].sku
  2938. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2939. } else {
  2940. this.$alert(data.msg, '错误', {
  2941. confirmButtonText: '确定'
  2942. })
  2943. }
  2944. })
  2945. },
  2946. querySearchAsync (queryString, cb) {
  2947. clearTimeout(this.timeout)
  2948. let results = []
  2949. if (queryString === '') {
  2950. cb(results)
  2951. } else {
  2952. // 掉接口需要的参数
  2953. let find = {
  2954. rollNo: queryString, //上面输入框绑定的数据
  2955. site: this.modalData.site,
  2956. }
  2957. // 这里去调后端的接口.根据自己接口的情况进行赋值
  2958. getRollNo(find).then(({data}) => {
  2959. if (data.code === 0) {
  2960. let result = data.rows
  2961. // 循环放到一个远程搜索需要的数组
  2962. for (let i = 0; i < result.length; i++) {
  2963. const element = result[i]
  2964. results.push({
  2965. value: element.rollNo,
  2966. seqNo: element.seqNo,
  2967. orderNo: element.orderNo
  2968. })
  2969. }
  2970. cb(results)
  2971. } else {
  2972. results = []
  2973. cb(results)
  2974. }
  2975. })
  2976. }
  2977. },
  2978. // 点击出现搜索后点击的每一项
  2979. handleSelect (item) {
  2980. this.modalData.rollNo = item.value
  2981. this.modalData.seqNo = item.seqNo
  2982. this.modalData.orderNo = item.orderNo
  2983. this.getOperationList()
  2984. //this.getPartList()
  2985. },
  2986. // 获取处置措施列表
  2987. disposalMeasuresSearch () {
  2988. let tempData = {
  2989. inspectionTypeNo: '107'
  2990. }
  2991. disposalMeasuresSearch(tempData).then(({data}) => {
  2992. if (data.code === 0) {
  2993. this.disposalMeasuresOptions = data.rows
  2994. }
  2995. })
  2996. },
  2997. // 查询检验类型
  2998. inspectionTypeSearch () {
  2999. let tempData = {
  3000. site: this.modalData.site || this.getDefaultSite()
  3001. }
  3002. inspectionTypeSearch(tempData).then(({data}) => {
  3003. if (data.code === 0) {
  3004. this.typeOptions = data.rows
  3005. this.typeOptions.forEach(val => {
  3006. if (val.inspectionTypeName.includes('FQC')) {
  3007. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  3008. this.templateData.inspectionTypeName = val.inspectionTypeName
  3009. }
  3010. })
  3011. }
  3012. })
  3013. },
  3014. // 获取基础数据列表S
  3015. getBaseList (val,type) {
  3016. this.tagNo = val
  3017. this.$nextTick(() => {
  3018. let strVal = ''
  3019. if (val === 1052) {
  3020. this.searchSeqInfo()
  3021. this.seqDetailFlag = true
  3022. }
  3023. if (val === 505) {
  3024. strVal = this.modalData.resourceDesc
  3025. this.$refs.baseList.init(val, strVal)
  3026. }
  3027. // if (val === 206) {
  3028. // strVal = this.modalData.partNo
  3029. // this.$refs.baseList.init(val, strVal)
  3030. // }
  3031. })
  3032. },
  3033. /* 列表方法的回调 */
  3034. getBaseData (val) {
  3035. if (this.tagNo === 1052) {
  3036. this.modalData.seqNo = val.seqno
  3037. this.modalData.orderNo = val.orderno
  3038. this.modalData.operationDesc = ''
  3039. this.modalData.resourceId = ''
  3040. this.getOperationList()
  3041. //this.getPartList()
  3042. }
  3043. if (this.tagNo === 505) {
  3044. this.modalData.resourceId = val.resource_id
  3045. this.modalData.resourceDesc = val.resource_desc
  3046. }
  3047. // if (this.tagNo === 206) {
  3048. // this.modalData.partNo = val.part_no
  3049. // this.modalData.partDesc = val.part_desc
  3050. // // 获取物料的其他信息
  3051. // this.getPartInformation()
  3052. // }
  3053. },
  3054. // // 获取物料其它信息
  3055. // getPartInformation () {
  3056. // getPartInformation(this.modalData).then(({data}) => {
  3057. // if (data && data.code === 0) {
  3058. // this.modalData.spec = data.rows[0].spec
  3059. // this.modalData.sku = data.rows[0].sku
  3060. // } else {
  3061. // this.$alert(data.msg, '错误', {
  3062. // confirmButtonText: '确定'
  3063. // })
  3064. // }
  3065. // })
  3066. // },
  3067. // 获取机台列表
  3068. getResourceList () {
  3069. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  3070. if (this.modalData.specialTaskFlag === 'Y') {
  3071. return
  3072. } else {
  3073. getResourceList(this.modalData).then(({data}) => {
  3074. if (data && data.code === 0) {
  3075. //this.resourceList = data.rows
  3076. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3077. this.modalData.resourceId = data.rows[0].resourceId
  3078. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3079. } else {
  3080. this.$alert(data.msg, '错误', {
  3081. confirmButtonText: '确定'
  3082. })
  3083. }
  3084. })
  3085. }
  3086. },
  3087. // 获取工序列表
  3088. getOperationList () {
  3089. getOperationList(this.modalData).then(({data}) => {
  3090. if (data && data.code === 0) {
  3091. this.operationList = data.rows
  3092. this.modalData.operationDesc = data.rows[0].operationDesc
  3093. //this.getResourceList()
  3094. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3095. this.modalData.resourceId = data.rows[0].resourceId
  3096. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3097. this.modalData.partNo = data.rows[0].partNo
  3098. this.modalData.partDesc = data.rows[0].partDesc
  3099. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3100. this.modalData.sku = data.rows[0].sku
  3101. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3102. this.modalData.operationDesc = data.rows[0].operationDesc
  3103. this.modalData.qtyrequired = data.rows[0].qtyrequired
  3104. this.modalData.lotsize = data.rows[0].lotsize
  3105. } else {
  3106. this.$alert(data.msg, '错误', {
  3107. confirmButtonText: '确定'
  3108. })
  3109. }
  3110. })
  3111. },
  3112. // 获取物料列表
  3113. getPartList () {
  3114. getPartList(this.modalData).then(({data}) => {
  3115. if (data && data.code === 0) {
  3116. this.partList = data.rows
  3117. this.modalData.partNo = this.partList[0].partNo
  3118. this.modalData.partDesc = this.partList[0].partDesc
  3119. this.modalData.invdefinetype = this.partList[0].invdefinetype
  3120. this.modalData.sku = this.partList[0].sku
  3121. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  3122. } else {
  3123. this.$alert(data.msg, '错误', {
  3124. confirmButtonText: '确定'
  3125. })
  3126. }
  3127. })
  3128. },
  3129. // 是否新增特殊任务
  3130. changeSpecialTask () {
  3131. // 先重置数据
  3132. this.modalData = {
  3133. flag: '1',
  3134. site: this.modalData.site || this.getDefaultSite(),
  3135. // bu: this.userBuList[0].buNo,
  3136. buNo: '*',
  3137. inspectionNo: '',
  3138. partNo: '',
  3139. partDesc: '',
  3140. inspectionTypeNo: '',
  3141. inspectionTypeName: '',
  3142. inspectorNo: '',
  3143. inspectorName: '',
  3144. submit_flag: '',
  3145. orderNo: '',
  3146. operationDesc: '',
  3147. operationNo: '',
  3148. resourceId: '',
  3149. resourceDesc: '',
  3150. rollQty: '',
  3151. seqNo: '',
  3152. batchRollNo: '',
  3153. invdefinetype: '',
  3154. sku: '',
  3155. cinvSourceCode: '',
  3156. specialRequirements: '',
  3157. templateId: '',
  3158. templateName: '',
  3159. specialTaskFlag: '',
  3160. workCenterNo: '',
  3161. rollNo: '',
  3162. umId: this.umList[0].umId,
  3163. umName: this.umList[0].umName
  3164. }
  3165. // 获取选中框
  3166. let obj = document.getElementsByName('specialTask')
  3167. // 判断是否打勾
  3168. if (obj[0].checked) {
  3169. let tempData = {
  3170. site: this.$store.state.user.site,
  3171. // bu: this.modalData.bu
  3172. buNo: '*'
  3173. }
  3174. this.modalData.specialTaskFlag = 'Y'
  3175. // 获取特殊工序列表
  3176. getSpecialOperationList(tempData).then(({data}) => {
  3177. if (data && data.code === 0) {
  3178. this.operationList = data.rows
  3179. } else {
  3180. this.$alert(data.msg, '错误', {
  3181. confirmButtonText: '确定'
  3182. })
  3183. }
  3184. })
  3185. // 派工单和工单号赋值
  3186. this.modalData.seqNo = '0'
  3187. this.modalData.orderNo = '000#1'
  3188. } else {
  3189. this.operationList = []
  3190. this.modalData.specialTaskFlag = ''
  3191. }
  3192. },
  3193. // 新增FAI巡检记录
  3194. saveData () {
  3195. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  3196. this.$message.warning('请选择派工单!')
  3197. return
  3198. }
  3199. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  3200. this.$message.warning('请选择工单!')
  3201. return
  3202. }
  3203. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  3204. this.$message.warning('请选择物料!')
  3205. return
  3206. }
  3207. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  3208. this.$message.warning('请选择工序!')
  3209. return
  3210. }
  3211. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  3212. this.$message.warning('请选择机台!')
  3213. return
  3214. }
  3215. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  3216. this.$message.warning('请填写送检数量!')
  3217. return
  3218. }
  3219. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3220. this.$message.warning('请选择单位!')
  3221. return
  3222. }
  3223. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  3224. this.$message.warning('请选择检验模板!')
  3225. return
  3226. }
  3227. this.saveLoading = true
  3228. if (this.modalData.flag === '1') {
  3229. saveFQCInspection(this.modalData).then(({data}) => {
  3230. if (data && data.code === 0) {
  3231. this.getDataList()
  3232. this.operationList = []
  3233. this.resourceList = []
  3234. this.partList = []
  3235. this.modalFlag = false
  3236. this.$message({
  3237. message: '操作成功',
  3238. type: 'success',
  3239. duration: 1500,
  3240. onClose: () => {}
  3241. })
  3242. } else {
  3243. this.$alert(data.msg, '错误', {
  3244. confirmButtonText: '确定'
  3245. })
  3246. }
  3247. this.saveLoading = false
  3248. }).catch(()=>{
  3249. this.saveLoading = false
  3250. })
  3251. }
  3252. },
  3253. // 检查动控是否开启
  3254. queryController () {
  3255. let tempData = {
  3256. controlNo: '10004',
  3257. site: this.$store.state.user.site,
  3258. }
  3259. queryController(tempData).then(({data}) => {
  3260. if (data && data.code === 0) {
  3261. this.controlData = data.rows
  3262. } else {
  3263. this.$alert(data.msg, '错误', {
  3264. confirmButtonText: '确定'
  3265. })
  3266. }
  3267. })
  3268. },
  3269. // 新增
  3270. addModal () {
  3271. this.modalData = {
  3272. flag: '1',
  3273. site: this.getDefaultSite(),
  3274. // bu: this.userBuList[0].buNo,
  3275. buNo: '*',
  3276. inspectionNo: '',
  3277. partNo: '',
  3278. partDesc: '',
  3279. inspectionTypeNo: '107',
  3280. inspectionTypeName: '',
  3281. inspectorNo: '',
  3282. inspectorName: '',
  3283. submit_flag: '',
  3284. orderNo: '',
  3285. operationDesc: '',
  3286. operationNo: '',
  3287. resourceId: '',
  3288. resourceDesc: '',
  3289. rollQty: '',
  3290. seqNo: '',
  3291. batchRollNo: '',
  3292. invdefinetype: '',
  3293. sku: '',
  3294. cinvSourceCode: '',
  3295. specialRequirements: '',
  3296. templateId: '',
  3297. templateName: '',
  3298. specialTaskFlag: '',
  3299. workCenterNo: '',
  3300. rollNo: '',
  3301. umId: this.umList[0].umId,
  3302. umName: this.umList[0].umName,
  3303. sjzs: '',
  3304. }
  3305. this.operationList = []
  3306. this.resourceList = []
  3307. this.partList = []
  3308. this.modalFlag = true
  3309. this.checked = false
  3310. },
  3311. // 获取检验模板列表
  3312. queryTemplateList () {
  3313. // this.templateData.bu = this.modalData.bu
  3314. this.templateData.site = this.modalData.site
  3315. this.templateData.buNo = this.modalData.buNo
  3316. // 查询所有检验模板
  3317. queryTemplateList(this.templateData).then(({data}) => {
  3318. if (data && data.code === 0) {
  3319. this.templateList = data.rows
  3320. this.templateModelFlag = true
  3321. }else {
  3322. this.$alert(data.msg, '错误', {
  3323. confirmButtonText: '确定'
  3324. })
  3325. }
  3326. })
  3327. },
  3328. // 获取物料列表
  3329. queryPartList () {
  3330. // this.partData.bu = this.modalData.bu
  3331. this.partData.site = this.modalData.site
  3332. this.partData.buNo = this.modalData.buNo
  3333. // 查询所有物料
  3334. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3335. this.partList = []
  3336. this.partModelFlag = true
  3337. } else {
  3338. queryPartList(this.partData).then(({data}) => {
  3339. if (data && data.code === 0) {
  3340. this.partList = data.rows
  3341. this.partModelFlag = true
  3342. } else {
  3343. this.$alert(data.msg, '错误', {
  3344. confirmButtonText: '确定'
  3345. })
  3346. }
  3347. })
  3348. }
  3349. },
  3350. // 选中检验模板
  3351. getRowData (row) {
  3352. this.modalData.templateId = row.templateId
  3353. this.modalData.templateName = row.templateName
  3354. this.templateModelFlag = false
  3355. },
  3356. // 选中派工单号
  3357. getRowData1 (row) {
  3358. this.modalData.sku = row.sku
  3359. this.modalData.partNo = row.partNo
  3360. this.modalData.partDesc = row.partDesc
  3361. this.modalData.cinvSourceCode = row.cinvSourceCode
  3362. this.modalData.orderNo = row.orderNo
  3363. this.modalData.seqNo = row.seqNo
  3364. this.modalData.lotsize = row.lotsize
  3365. this.modalData.operationDesc = row.operationDesc
  3366. this.modalData.qtyrequired = row.qtyrequired
  3367. this.modalData.rollQty = row.qtyrequired
  3368. this.modalData.sjzs = row.sjzs
  3369. this.getOperationList()
  3370. //查询物料对应的模板
  3371. let params = {
  3372. site: this.modalData.site,
  3373. buNo: this.modalData.buNo,
  3374. partNo: this.modalData.partNo,
  3375. attributeNo: this.modalData.partNo,
  3376. partDesc: this.modalData.partDesc,
  3377. attributeType: 'A',
  3378. inspectionTypeNo: '107'
  3379. }
  3380. searchPartAttributeDetails(params).then(({data}) => {
  3381. if (data.total = 1){
  3382. this.modalData.templateId = data.rows[0].templateId
  3383. this.modalData.templateName = data.rows[0].templateName
  3384. }
  3385. })
  3386. this.seqDetailFlag = false
  3387. },
  3388. // 选中物料
  3389. getRowData2 (row) {
  3390. this.modalData.partNo = row.partNo
  3391. this.modalData.partDesc = row.partDesc
  3392. this.modalData.sku = row.sku
  3393. this.modalData.cinvSourceCode = row.cinvSourceCode
  3394. this.modalData.invdefinetype = row.invdefinetype
  3395. this.partData = {
  3396. site: '',
  3397. bu: '',
  3398. partNo: '',
  3399. partDesc: '',
  3400. sku: '',
  3401. cinvSourceCode: ''
  3402. }
  3403. this.partModelFlag = false
  3404. },
  3405. selectFlag () {
  3406. return true
  3407. },
  3408. // 单机选中
  3409. FAIClickRow (row) {
  3410. this.$refs.FAITable.toggleRowSelection(row)
  3411. },
  3412. // 复选
  3413. selectionFAI (val) {
  3414. this.FAISelections = val
  3415. },
  3416. // 新增文件的modal
  3417. addUploadFileModal () {
  3418. let currentData = {
  3419. titleCon: 'FQC文件上传',
  3420. site: this.currentFileRow.site,
  3421. buNo: this.currentFileRow.buNo,
  3422. createBy: this.$store.state.user.name,
  3423. inspectionNo: this.currentFileRow.inspectionNo,
  3424. remark: '',
  3425. folder: 'qcFQC',
  3426. }
  3427. //打开组件 去做新增业务
  3428. this.$nextTick(() => {
  3429. this.$refs.qcFAIUploadFile.init(currentData)
  3430. })
  3431. },
  3432. // 上传项目图片
  3433. uploadImageModal (row) {
  3434. const openImage = () => {
  3435. let currentData = {
  3436. site: this.detailData.site,
  3437. buNo: this.detailData.buNo,
  3438. createBy: this.$store.state.user.name,
  3439. inspectionNo: this.detailData.inspectionNo,
  3440. itemNo: row.itemNo,
  3441. folder: 'FQCItemImageFile'
  3442. }
  3443. this.$nextTick(() => {
  3444. this.$refs.comQcItemImageUploadFile.init(currentData)
  3445. })
  3446. }
  3447. if (this.detailData.state !== '待检验') {
  3448. openImage()
  3449. return
  3450. }
  3451. if (this.detailData.passQty > this.detailData.rollQty) {
  3452. this.$message.warning('合格数量不能大于送检数量!')
  3453. return
  3454. }
  3455. this.saveDetailInformation('1', {
  3456. keepDetailOpen: true,
  3457. skipSuccessMessage: true,
  3458. afterSuccess: openImage
  3459. })
  3460. },
  3461. // 查询检验类型
  3462. inspectorSearch () {
  3463. inspectorSearch().then(({data}) => {
  3464. if (data.code === 0) {
  3465. this.options = data.rows
  3466. }
  3467. })
  3468. },
  3469. // 获取主信息数据列表
  3470. getDataList () {
  3471. this.searchLoading = true
  3472. this.searchData.limit = this.pageSize
  3473. this.searchData.page = this.pageIndex
  3474. qcFQCInspectionSearch(this.searchData).then(({data}) => {
  3475. if (data.code === 0) {
  3476. this.dataList = data.page.list
  3477. this.pageIndex = data.page.currPage
  3478. this.pageSize = data.page.pageSize
  3479. this.totalPage = data.page.totalCount
  3480. this.searchLoading = false
  3481. } else {
  3482. this.searchLoading = false
  3483. }
  3484. }).catch(()=>{
  3485. this.searchLoading = false
  3486. })
  3487. },
  3488. // 每页数
  3489. sizeChangeHandle (val) {
  3490. this.pageSize = val
  3491. this.pageIndex = 1
  3492. this.getDataList()
  3493. },
  3494. // 当前页
  3495. currentChangeHandle (val) {
  3496. this.pageIndex = val
  3497. this.getDataList()
  3498. },
  3499. // 子明细每页数
  3500. sizeChangeHandle2 (val) {
  3501. this.pageSize2 = val
  3502. },
  3503. // 子明细当前页
  3504. currentChangeHandle2 (val) {
  3505. this.pageIndex2 = val
  3506. },
  3507. // 多选
  3508. selectionChangeHandle (val) {
  3509. this.dataListSelections = val
  3510. },
  3511. // 删除检验记录
  3512. deleteModal () {
  3513. if (this.FAISelections.length === 0) {
  3514. this.$alert('请勾选要删除的检验单!', '提示', {
  3515. confirmButtonText: '确定'
  3516. })
  3517. return false
  3518. }
  3519. const releasedNos = this.FAISelections.filter(item => item.releaseFlag === 'Y').map(item => item.inspectionNo)
  3520. if (releasedNos.length > 0) {
  3521. this.$alert('检验单号 ' + releasedNos.join('、') + ' 已临时放行,不允许删除,请先取消审核!', '提示', {
  3522. confirmButtonText: '确定'
  3523. })
  3524. return false
  3525. }
  3526. this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', {
  3527. confirmButtonText: '确定',
  3528. cancelButtonText: '取消',
  3529. type: 'warning'
  3530. }).then(() => {
  3531. let tempData = {
  3532. site: '',
  3533. submitList: this.FAISelections
  3534. }
  3535. fqcRecordDelete(tempData).then(({data}) => {
  3536. if (data && data.code === 0) {
  3537. this.getDataList()
  3538. this.FAISelections = []
  3539. this.$message({
  3540. message: '操作成功',
  3541. type: 'success',
  3542. duration: 1500,
  3543. onClose: () => {}
  3544. })
  3545. } else {
  3546. this.$alert(data.msg, '错误', {
  3547. confirmButtonText: '确定'
  3548. })
  3549. }
  3550. })
  3551. }).catch(() => {
  3552. })
  3553. },
  3554. // 任务重载
  3555. overLoadModal () {
  3556. if (this.FAISelections.length === 0) {
  3557. this.$message.warning('请勾选要重载的检验单!')
  3558. return
  3559. }
  3560. this.$confirm(`确认重载选中的检验单?`, '提示', {
  3561. confirmButtonText: '确定',
  3562. cancelButtonText: '取消',
  3563. type: 'warning'
  3564. }).then(() => {
  3565. fqcRecordOverLoad({ submitList: this.FAISelections }).then(({data}) => {
  3566. if (data && data.code === 0) {
  3567. this.$message.success('操作成功')
  3568. this.getDataList()
  3569. this.FAISelections = []
  3570. } else {
  3571. this.$message.warning(data.msg || '操作失败')
  3572. }
  3573. })
  3574. }).catch(() => {})
  3575. },
  3576. Transfer (type) {
  3577. if (type === '2' || type === '3') {
  3578. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3579. this.$message.warning('请选择检验结论!')
  3580. return
  3581. }
  3582. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3583. this.$message.warning('请选择处置措施!')
  3584. return
  3585. }
  3586. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3587. const flag = this.detailList.some(item => item.itemResult === 'N')
  3588. if (!flag) {
  3589. this.$message.warning('请选择不合格项目!')
  3590. return
  3591. }
  3592. }
  3593. if (this.detailData.inspectionResult !== '不合格') {
  3594. this.detailData.disposalMeasures = ''
  3595. this.detailData.disposalRemark = ''
  3596. }
  3597. const picRequiredRow = this.detailList.find(
  3598. item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
  3599. )
  3600. if (picRequiredRow) {
  3601. this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
  3602. return
  3603. }
  3604. }
  3605. if (this.detailData.passQty>this.detailData.rollQty){
  3606. this.$message.warning('合格数量不能大于送检数量!')
  3607. return
  3608. }
  3609. this.saveDetailInformation(type)
  3610. },
  3611. // 新增明细信息
  3612. saveDetailInformation (type, options = {}) {
  3613. const keepDetailOpen = options.keepDetailOpen === true
  3614. this.saveInformationData.site = this.detailData.site
  3615. this.saveInformationData.buNo = this.detailData.buNo
  3616. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3617. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3618. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3619. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3620. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3621. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3622. this.saveInformationData.rollQty = this.detailData.rollQty
  3623. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3624. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3625. this.saveInformationData.partNo = this.detailData.partNo
  3626. this.saveInformationData.partDesc = this.detailData.partDesc
  3627. this.saveInformationData.operator = this.detailData.operator
  3628. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3629. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3630. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3631. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3632. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  3633. this.saveInformationData.type = type
  3634. this.transferLoadFlag = true
  3635. // this.saveInformationData.subDetailList = this.acquisitionList
  3636. saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3637. if (data && data.code === 0) {
  3638. this.getDataList()
  3639. // 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印
  3640. if (type === '2' && this.detailData.refInfo1) {
  3641. this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1)
  3642. }
  3643. if (keepDetailOpen) {
  3644. this.getInspectionFormData()
  3645. if (!options.skipSuccessMessage) {
  3646. this.$message({
  3647. message: '操作成功',
  3648. type: 'success',
  3649. duration: 1500,
  3650. onClose: () => {}
  3651. })
  3652. }
  3653. } else {
  3654. this.detailInformationFlag = false
  3655. this.$message({
  3656. message: '操作成功',
  3657. type: 'success',
  3658. duration: 1500,
  3659. onClose: () => {}
  3660. })
  3661. }
  3662. if (typeof options.afterSuccess === 'function') {
  3663. options.afterSuccess()
  3664. }
  3665. } else {
  3666. this.$alert(data.msg, '错误', {
  3667. confirmButtonText: '确定'
  3668. })
  3669. }
  3670. this.transferLoadFlag = false
  3671. }).catch(()=>{
  3672. this.transferLoadFlag = false
  3673. })
  3674. },
  3675. // 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签(复制自 inspect.vue)
  3676. toPrintForQMS (site, transNo) {
  3677. let indata={
  3678. site:site,
  3679. transNo:transNo
  3680. }
  3681. getInspectData(indata).then(({data}) => {
  3682. if(!data.rows||data.rows.length===0){
  3683. this.$alert("关联的实验室检验数据不存在或者已取消", '错误', {
  3684. confirmButtonText: '确定'
  3685. })
  3686. return
  3687. }
  3688. let row=data.rows[0]
  3689. if(row.toTypeFlagDb=='S') {
  3690. inspectPrint(row).then(({data}) => {
  3691. if (data && data.code === 0) {
  3692. let printData=data.row
  3693. printData.userId=this.$store.state.user.name
  3694. let array=[];
  3695. array.push(printData)
  3696. printInspectStockLabel(array)
  3697. }else {
  3698. this.$alert(data.msg, '错误', {
  3699. confirmButtonText: '确定'
  3700. })
  3701. }
  3702. }).catch((err) => {
  3703. this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
  3704. confirmButtonText: '确定'
  3705. })
  3706. })
  3707. }else if(row.toTypeFlagDb=='B') {
  3708. inspectPrint(row).then(({data}) => {
  3709. if (data && data.code === 0) {
  3710. let printData=data.row
  3711. printData.qtyRequired=row.transQty
  3712. printData.userId=this.$store.state.user.name
  3713. let array=[];
  3714. array.push(printData)
  3715. printInspectLabelForB(array)
  3716. }else {
  3717. this.$alert(data.msg, '错误', {
  3718. confirmButtonText: '确定'
  3719. })
  3720. }
  3721. }).catch((err) => {
  3722. this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
  3723. confirmButtonText: '确定'
  3724. })
  3725. })
  3726. }else {
  3727. inspectPrint(row).then(({data}) => {
  3728. if (data && data.code === 0) {
  3729. let printData = data.row
  3730. printData.userId = this.$store.state.user.name
  3731. if (row.toTypeFlagDb != 'I') {
  3732. printData.seqNo = printData.orderNo
  3733. }
  3734. if (row.toTypeFlag == '硫化检验单(重复)') {
  3735. printData.type = '(变更)'
  3736. } else {
  3737. printData.type = ''
  3738. }
  3739. let array = [];
  3740. array.push(printData)
  3741. printInspectLabel(array)
  3742. } else {
  3743. this.$alert(data.msg, '错误', {
  3744. confirmButtonText: '确定'
  3745. })
  3746. }
  3747. }).catch((err) => {
  3748. this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
  3749. confirmButtonText: '确定'
  3750. })
  3751. })
  3752. }
  3753. }).catch((err) => {
  3754. this.$alert('获取实验室检验数据失败:' + (err && err.message ? err.message : err), '错误', {
  3755. confirmButtonText: '确定'
  3756. })
  3757. })
  3758. },
  3759. // 开始检验
  3760. actionModal (row) {
  3761. this.actionData = {
  3762. site: row.site,
  3763. buNo: row.buNo,
  3764. inspectionNo: row.inspectionNo
  3765. }
  3766. getFQCItemObjectList(this.actionData).then(({data}) => {
  3767. if (data && data.code === 0) {
  3768. if (data.rows.length === 0) {
  3769. this.actionModal2()
  3770. } else {
  3771. this.itemObjectList = data.rows
  3772. this.ItemObjectModelFlag = true
  3773. }
  3774. } else {
  3775. this.$alert(data.msg, '错误', {
  3776. confirmButtonText: '确定'
  3777. })
  3778. }
  3779. })
  3780. },
  3781. // 开始检验
  3782. actionModal2 () {
  3783. this.$confirm(`确认开始检验?`, '提示', {
  3784. confirmButtonText: '确定',
  3785. cancelButtonText: '取消',
  3786. type: 'warning'
  3787. }).then(() => {
  3788. let tempData = {
  3789. site: this.actionData.site,
  3790. buNo: this.actionData.buNo,
  3791. inspectionNo: this.actionData.inspectionNo,
  3792. actionBy: this.$store.state.user.name,
  3793. state: '待检验',
  3794. equipmentList: this.itemObjectList
  3795. }
  3796. actionFQCInspection(tempData).then(({data}) => {
  3797. if (data && data.code === 0) {
  3798. this.getDataList()
  3799. this.$message({
  3800. message: '操作成功',
  3801. type: 'success',
  3802. duration: 1500,
  3803. onClose: () => {}
  3804. })
  3805. this.ItemObjectModelFlag = false
  3806. } else {
  3807. this.$alert(data.msg, '错误', {
  3808. confirmButtonText: '确定'
  3809. })
  3810. }
  3811. })
  3812. })
  3813. },
  3814. // 明细记录信息查询
  3815. detailModal (row) {
  3816. this.detailData.site = row.site
  3817. this.detailData.buNo = row.buNo
  3818. this.detailData.inspectionNo = row.inspectionNo
  3819. this.detailData.partNo = row.partNo
  3820. this.detailData.partDesc = row.partDesc
  3821. this.detailData.rollQty = row.rollQty
  3822. this.detailData.samplingQty = row.samplingQty
  3823. this.detailData.unqualifiedQty = row.unqualifiedQty
  3824. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3825. this.detailData.submitFlag = row.submitFlag
  3826. this.detailData.disposalMeasures = row.disposalMeasures
  3827. this.detailData.disposalRemark = row.disposalRemark
  3828. this.detailData.inspectionResult = row.inspectionResult
  3829. this.detailData.inspectorNo = row.inspectorNo
  3830. this.detailData.inspectorName = row.inspectorName
  3831. this.detailData.inspectionRemark = row.inspectionRemark
  3832. this.detailData.cinvSourceCode = row.cinvSourceCode
  3833. this.detailData.sku = row.sku
  3834. this.detailData.invdefinetype = row.invdefinetype
  3835. this.detailData.umId = row.umId
  3836. this.detailData.umName = row.umName
  3837. this.detailData.operator = row.operator
  3838. this.detailData.operatorName = row.operatorName
  3839. this.detailData.responsiblePerson = row.responsiblePerson
  3840. this.detailData.responsiblePersonName = row.responsiblePersonName
  3841. this.detailData.state = row.state
  3842. this.detailData.refInfo1 = row.refInfo1 || ''
  3843. this.detailData.releaseFlag = row.releaseFlag || 'N'
  3844. if (row.state === '待检验') {
  3845. this.detailData.passQty = row.samplingQty
  3846. } else {
  3847. this.detailData.passQty = row.passQty
  3848. this.detailData.notPassQty = row.notPassQty
  3849. }
  3850. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  3851. this.getInspectionFormData()
  3852. this.inspectorSearch()
  3853. // this.acquisitionList = []
  3854. this.detailInformationFlag = true
  3855. },
  3856. // 检验单明细
  3857. getInspectionFormData () {
  3858. fqcDetailSearch(this.detailData).then(({data}) => {
  3859. if (data && data.code === 0) {
  3860. this.detailList = data.rows
  3861. } else {
  3862. this.detailList = []
  3863. }
  3864. })
  3865. },
  3866. // 子明细记录信息查询
  3867. subDetailModal (row) {
  3868. this.subDetailLoading = true
  3869. this.subDetailData = row
  3870. this.pageIndex2 = 1
  3871. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3872. if (data.code === 0) {
  3873. this.tableData = data.rows
  3874. }
  3875. this.subDetailLoading = false
  3876. }).catch(()=>{
  3877. this.subDetailLoading = false
  3878. })
  3879. this.batchAddData = {
  3880. samplingLocation: '',
  3881. samplingLocationB: '',
  3882. samplingNumber: ''
  3883. }
  3884. this.subDetailFlag = true
  3885. },
  3886. // 子明细分页查询
  3887. subDetailModal2 () {
  3888. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3889. if (data.code === 0) {
  3890. this.tableData = data.rows
  3891. }
  3892. })
  3893. },
  3894. // 审核按钮
  3895. submitResult () {
  3896. let tempData1 = '' // 记录不是待审核状态的单号
  3897. let tempData2 = '' // 记录处置措施未填写的单号
  3898. if (this.FAISelections.length === 0) {
  3899. this.$alert('请勾选要审核的检验单!', '提示', {
  3900. confirmButtonText: '确定'
  3901. })
  3902. return false
  3903. }
  3904. for (let i = 0; i < this.FAISelections.length; i++) {
  3905. if (this.FAISelections[i].state !== '待审核'){
  3906. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  3907. }
  3908. if (this.FAISelections[i].inspectionResult === '不合格' && (this.FAISelections[i].disposalMeasures ==='' || this.FAISelections[i].disposalMeasures == null)) {
  3909. tempData2 = tempData2 + this.FAISelections[i].inspectionNo + '、'
  3910. }
  3911. }
  3912. if (tempData1 !== ''){
  3913. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3914. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  3915. confirmButtonText: '确定'
  3916. })
  3917. return false
  3918. }
  3919. if (tempData2 !== ''){
  3920. tempData2 = tempData2.substring(0, tempData2.length - 1)
  3921. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  3922. confirmButtonText: '确定'
  3923. })
  3924. return false
  3925. }
  3926. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  3927. confirmButtonText: '确定',
  3928. cancelButtonText: '取消',
  3929. type: 'warning'
  3930. }).then(() => {
  3931. this.submitData.submitList = this.FAISelections
  3932. saveFQCSubmitResult(this.submitData).then(({data}) => {
  3933. if (data && data.code ==0) {
  3934. this.getDataList()
  3935. this.FAISelections = []
  3936. this.$message({
  3937. message: '操作成功',
  3938. type: 'success',
  3939. duration: 1500,
  3940. onClose: () => {
  3941. }
  3942. })
  3943. } else {
  3944. this.$alert(data.msg, '错误', {
  3945. confirmButtonText: '确定'
  3946. })
  3947. }
  3948. })
  3949. })
  3950. },
  3951. // 取消审核
  3952. cancelApproval () {
  3953. let tempData1 = '' // 记录不是已完成状态的单号
  3954. if (this.FAISelections.length === 0) {
  3955. this.$message.warning('请勾选要取消审核的检验单!')
  3956. return
  3957. }
  3958. for (let i = 0; i < this.FAISelections.length; i++) {
  3959. if (this.FAISelections[i].state !== '已完成' && this.FAISelections[i].releaseFlag !== 'Y') {
  3960. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  3961. }
  3962. }
  3963. if (tempData1 !== '') {
  3964. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3965. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  3966. return
  3967. }
  3968. this.$confirm(`确定取消审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  3969. confirmButtonText: '确定',
  3970. cancelButtonText: '取消',
  3971. type: 'warning'
  3972. }).then(() => {
  3973. this.submitData.submitList = this.FAISelections
  3974. cancelApproval2(this.submitData).then(({data}) => {
  3975. if (data && data.code === 0) {
  3976. this.getDataList()
  3977. this.FAISelections = []
  3978. this.$message({
  3979. message: '操作成功',
  3980. type: 'success',
  3981. duration: 1500,
  3982. onClose: () => {}
  3983. })
  3984. } else {
  3985. this.$alert(data.msg, '错误', {
  3986. confirmButtonText: '确定'
  3987. })
  3988. }
  3989. })
  3990. })
  3991. },
  3992. // 子明细方法
  3993. //表格的新增
  3994. rowClassName ({ row, rowIndex }) {
  3995. row.xh = rowIndex + 1
  3996. row.num = this.tableData.indexOf(row) + 1
  3997. },
  3998. //单选框选中数据
  3999. handleDetailSelectionChange (selection) {
  4000. this.checkedDetail = selection
  4001. },
  4002. //点击新增更多
  4003. handleAddBtn (td) {
  4004. checkFQCIsSubmit(td).then(({data}) => {
  4005. if (data.flag !== 1) {
  4006. let obj = {
  4007. subDetailValue: '',
  4008. samplingLocation: '',
  4009. samplingLocationB: '',
  4010. subDetailValueB: '',
  4011. subDetailValueC: '',
  4012. subDetailValueD: '',
  4013. subDetailValueE: '',
  4014. }
  4015. this.tableData.push(obj)
  4016. } else {
  4017. this.$alert("记录已提交!", '错误', {
  4018. confirmButtonText: '确定'
  4019. })
  4020. }
  4021. })
  4022. },
  4023. // 批量新增操作
  4024. batchHandleAdd (td) {
  4025. checkFQCIsSubmit(td).then(({data}) => {
  4026. if (data.flag !== 1) {
  4027. this.batchHandleAddModalFlag = true
  4028. } else {
  4029. this.$alert("记录已提交!", '错误', {
  4030. confirmButtonText: '确定'
  4031. })
  4032. }
  4033. })
  4034. },
  4035. // 批量新增行
  4036. batchHandleAddModal () {
  4037. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  4038. let obj = {
  4039. samplingLocation: this.batchAddData.samplingLocation,
  4040. samplingLocationB: this.batchAddData.samplingLocationB,
  4041. subDetailValue: '',
  4042. subDetailValueB: '',
  4043. subDetailValueC: '',
  4044. subDetailValueD: '',
  4045. subDetailValueE: '',
  4046. }
  4047. this.tableData.push(obj)
  4048. }
  4049. this.batchHandleAddModalFlag = false
  4050. },
  4051. // 回车事件
  4052. nextFocus1 (index) {
  4053. let a1 = `${index + 1}` + `a`
  4054. this.$nextTick(() => {
  4055. this.$refs[a1].focus()
  4056. })
  4057. },
  4058. nextFocus2 (index) {
  4059. let a2 = `${index + 1}` + `b`
  4060. this.$nextTick(() => {
  4061. this.$refs[a2].focus()
  4062. })
  4063. },
  4064. nextFocus3 (index) {
  4065. let a3 = `${index + 1}` + `c`
  4066. this.$nextTick(() => {
  4067. this.$refs[a3].focus()
  4068. })
  4069. },
  4070. nextFocus4 (index) {
  4071. let a = `${index + 1}` + `d`
  4072. this.$nextTick(() => {
  4073. this.$refs[a].focus()
  4074. })
  4075. },
  4076. nextFocus5 (index) {
  4077. let a = `${index + 1}` + `e`
  4078. this.$nextTick(() => {
  4079. this.$refs[a].focus()
  4080. })
  4081. },
  4082. nextFocus6 (index) {
  4083. let a = `${index + 1}` + `f`
  4084. this.$nextTick(() => {
  4085. this.$refs[a].focus()
  4086. })
  4087. },
  4088. nextFocus7 (index) {
  4089. let a = `${index + 1}` + `g`
  4090. this.$nextTick(() => {
  4091. this.$refs[a].focus()
  4092. })
  4093. },
  4094. focusNextInput (index, type) {
  4095. let aaa = ''
  4096. if (this.detailList.length - 1 === index) {
  4097. aaa = `${type}0`
  4098. } else {
  4099. aaa = `${type}${index + 1}`
  4100. }
  4101. this.$nextTick(() => {
  4102. this.$refs[aaa].focus()
  4103. })
  4104. },
  4105. updateItemResult(row){
  4106. if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
  4107. this.$message.success("tuichu")
  4108. return;
  4109. }
  4110. if (row.maxValue == null && row.minValue == null) {
  4111. if (row.numberValue!=row.defaultValue){
  4112. row.itemResult = 'N'
  4113. }
  4114. }else if (row.maxValue != null && row.minValue != null){
  4115. if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
  4116. row.itemResult = 'N'
  4117. }else {
  4118. row.itemResult = 'Y'
  4119. }
  4120. }else if(row.maxValue != null){
  4121. if ( row.numberValue>row.maxValue) {
  4122. row.itemResult = 'N'
  4123. }else {
  4124. row.itemResult = 'Y'
  4125. }
  4126. }else if(row.minValue != null){
  4127. if ( row.numberValue<row.minValue) {
  4128. row.itemResult = 'N'
  4129. }else {
  4130. row.itemResult = 'Y'
  4131. }
  4132. }
  4133. },
  4134. //删除
  4135. handleDeleteBtn (td) {
  4136. checkFQCIsSubmit(td).then(({data}) => {
  4137. if (data.flag !== 1) {
  4138. if (this.checkedDetail.length === 0) {
  4139. this.$alert("请先选择要删除的数据", "提示", {
  4140. confirmButtonText: "确定",
  4141. });
  4142. } else {
  4143. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4144. confirmButtonText: "确定",
  4145. cancelButtonText: "取消",
  4146. type: "warning",
  4147. callback: (action) => {
  4148. if (action === "confirm") {
  4149. let val = this.checkedDetail;
  4150. val.forEach((val, index) => {
  4151. this.tableData.splice(this.tableData.indexOf(val), 1)
  4152. if (this.templateTableData.length === 0) {
  4153. this.pageIndex2--
  4154. }
  4155. })
  4156. this.$message({
  4157. message: "删除成功!",
  4158. type: "success",
  4159. })
  4160. return
  4161. } else {
  4162. this.$message({
  4163. message: "已取消删除操作",
  4164. type: "warning",
  4165. })
  4166. return
  4167. }
  4168. },
  4169. })
  4170. }
  4171. } else {
  4172. this.$alert("记录已提交!", '错误', {
  4173. confirmButtonText: '确定'
  4174. })
  4175. }
  4176. })
  4177. },
  4178. // 新增子明细记录
  4179. saveSubDetailResult () {
  4180. for (let i = 0; i < this.tableData.length; i++) {
  4181. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  4182. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  4183. return
  4184. }
  4185. }
  4186. this.subDetailData.subDetailValues = this.tableData
  4187. this.subDetailVisiable = true
  4188. saveFQCSubDetailed(this.subDetailData).then(({data}) => {
  4189. if (data && data.code === 0) {
  4190. if (data.count > 0) {
  4191. this.subDetailData.itemResult = 'N'
  4192. this.subDetailData.unqualifiedQuantity = data.count
  4193. }
  4194. if (this.subDetailData.subDetailValues.length > 0) {
  4195. this.subDetailData.subDetailRecordNum = 1
  4196. } else {
  4197. this.subDetailData.subDetailRecordNum = -1
  4198. this.subDetailData.unqualifiedQuantity = 0
  4199. this.subDetailData.itemResult = 'Y'
  4200. }
  4201. this.subDetailFlag = false
  4202. this.tableData = []
  4203. this.$message({
  4204. message: '操作成功',
  4205. type: 'success',
  4206. duration: 1500,
  4207. onClose: () => {}
  4208. })
  4209. } else {
  4210. this.$alert(data.msg, '错误', {
  4211. confirmButtonText: '确定'
  4212. })
  4213. }
  4214. }).finally(() => {
  4215. this.subDetailVisiable = false
  4216. })
  4217. },
  4218. // 检验结论改变事件
  4219. resultChange () {
  4220. if (this.detailData.inspectionResult === '不合格') {
  4221. this.detailData.passQty = 0
  4222. }
  4223. },
  4224. // 校验用户是否收藏
  4225. favoriteIsOk () {
  4226. let userFavorite = {
  4227. userId: this.$store.state.user.id,
  4228. languageCode: this.$i18n.locale
  4229. }
  4230. userFavoriteList(userFavorite).then(({data}) => {
  4231. for (let i = 0; i < data.list.length; i++) {
  4232. if (this.$route.meta.menuId === data.list[i].menuId) {
  4233. this.favorite = true
  4234. }
  4235. }
  4236. })
  4237. },
  4238. // 收藏 OR 取消收藏
  4239. favoriteFunction () {
  4240. let userFavorite = {
  4241. userId: this.$store.state.user.id,
  4242. functionId: this.$route.meta.menuId,
  4243. }
  4244. if (this.favorite) {
  4245. removeUserFavorite(userFavorite).then(({data}) => {
  4246. this.$message.success(data.msg)
  4247. this.favorite = false
  4248. })
  4249. } else {
  4250. // 收藏
  4251. saveUserFavorite(userFavorite).then(({data}) => {
  4252. this.$message.success(data.msg)
  4253. this.favorite = true
  4254. })
  4255. }
  4256. },
  4257. //导出excel
  4258. async createExportData () {
  4259. this.searchData.limit = -1
  4260. this.searchData.page = 1
  4261. await qcFQCInspectionSearch(this.searchData).then(({data}) => {
  4262. this.exportList= data.page.list
  4263. })
  4264. return this.exportList
  4265. },
  4266. startDownload() {},
  4267. finishDownload() {},
  4268. fields () {
  4269. let json = "{"
  4270. this.columnList1.forEach((item, index) => {
  4271. if (index === this.columnList1.length - 1) {
  4272. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  4273. } else {
  4274. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  4275. }
  4276. })
  4277. json += "}"
  4278. let s = eval("(" + json + ")")
  4279. return s
  4280. },
  4281. appendReleaseColumns () {
  4282. const extras = [
  4283. { columnProp: 'releaseFlag', columnLabel: '放行标识', columnWidth: 90 },
  4284. { columnProp: 'releaseTime', columnLabel: '放行时间', columnWidth: 150 },
  4285. { columnProp: 'releaseByName', columnLabel: '放行人', columnWidth: 100 }
  4286. ]
  4287. extras.forEach(extra => {
  4288. if (this.columnList1.some(item => item.columnProp === extra.columnProp)) {
  4289. return
  4290. }
  4291. this.columnList1.push({
  4292. userId: this.$store.state.user.name,
  4293. functionId: 301015,
  4294. serialNumber: '301015Table1' + extra.columnProp,
  4295. tableId: '301015Table1',
  4296. tableName: 'FQC检验记录表',
  4297. columnProp: extra.columnProp,
  4298. headerAlign: 'center',
  4299. align: 'center',
  4300. columnLabel: extra.columnLabel,
  4301. columnHidden: false,
  4302. columnImage: false,
  4303. columnSortable: false,
  4304. sortLv: 0,
  4305. status: true,
  4306. fixed: '',
  4307. columnWidth: extra.columnWidth
  4308. })
  4309. })
  4310. },
  4311. // 动态列开始 获取 用户保存的 格式列
  4312. async getTableUserColumn (tableId, columnId) {
  4313. let queryTableUser = {
  4314. userId: this.$store.state.user.name,
  4315. functionId: 301015,
  4316. tableId: tableId,
  4317. status: true,
  4318. languageCode: this.$i18n.locale
  4319. }
  4320. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  4321. if (data.rows.length > 0) {
  4322. //this.columnList1 = []
  4323. switch (columnId) {
  4324. case 1:
  4325. this.columnList1 = data.rows
  4326. this.appendReleaseColumns()
  4327. this.showDefault = false
  4328. break;
  4329. case 2:
  4330. this.detailColumnList = data.rows
  4331. break;
  4332. case 3:
  4333. this.seqDetailColumnList = data.rows
  4334. break;
  4335. // case 4:
  4336. // this.columnList3 = data.rows
  4337. // break;
  4338. }
  4339. } else {
  4340. this.getColumnList(tableId, columnId)
  4341. }
  4342. })
  4343. },
  4344. // 获取 tableDefault 列
  4345. async getColumnList (tableId, columnId) {
  4346. let queryTable = {
  4347. functionId: 301015,
  4348. tableId: tableId,
  4349. languageCode: this.$i18n.locale
  4350. }
  4351. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  4352. if (!data.rows.length == 0) {
  4353. switch (columnId) {
  4354. case 1:
  4355. this.columnList1 = data.rows
  4356. this.appendReleaseColumns()
  4357. this.showDefault = false
  4358. break;
  4359. case 2:
  4360. this.detailColumnList = data.rows
  4361. break;
  4362. case 3:
  4363. this.seqDetailColumnList = data.rows
  4364. break;
  4365. // case 4:
  4366. // this.columnList3 = data.rows
  4367. // break;
  4368. }
  4369. } else {
  4370. if (columnId === 1) {
  4371. this.showDefault = true
  4372. }
  4373. }
  4374. })
  4375. },
  4376. // 设置默认配置:将静态 columnList1 播种到 grid_table_default(首次使用时点一次)
  4377. saveColumnList () {
  4378. saveTableDefaultList(this.columnList1).then(({data}) => {
  4379. if (data.code == 0) {
  4380. this.$message.success(data.msg)
  4381. this.showDefault = false
  4382. this.getTableUserColumn('301015Table1', 1)
  4383. } else {
  4384. this.$message.error(data.msg)
  4385. }
  4386. })
  4387. },
  4388. /**
  4389. * 明细导入后将返回值回传给父组件
  4390. * @param val
  4391. */
  4392. changeMyString (val) {
  4393. for (let i = 0; i < this.detailList.length; i++) {
  4394. if (val[this.detailList[i].itemNo] !== undefined) {
  4395. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  4396. if (val[this.detailList[i].itemNo] != null) {
  4397. this.detailList[i].subDetailRecordNum = 1
  4398. }
  4399. if (val[this.detailList[i].itemNo] > 0) {
  4400. this.detailList[i].itemResult = 'N'
  4401. }
  4402. }
  4403. }
  4404. },
  4405. searchSeqInfo () {
  4406. let tempData = {
  4407. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  4408. // bu: this.modalData.bu,
  4409. site: this.modalData.site,
  4410. buNo: this.modalData.buNo,
  4411. seqNo: this.seqDetailData.seqNo,
  4412. orderNo: this.seqDetailData.orderNo,
  4413. sku: this.seqDetailData.sku,
  4414. partDesc: this.seqDetailData.partDesc,
  4415. partNo: this.seqDetailData.partNo,
  4416. operationDesc: this.seqDetailData.operationDesc,
  4417. status: this.seqDetailData.status
  4418. }
  4419. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  4420. this.seqInfoList = []
  4421. } else {
  4422. searchSeqInfo(tempData).then(({data}) => {
  4423. if (data && data.code === 0) {
  4424. this.seqInfoList = data.rows
  4425. } else {
  4426. this.$alert(data.msg, '错误', {
  4427. confirmButtonText: '确定'
  4428. })
  4429. }
  4430. })
  4431. }
  4432. },
  4433. closeDialog () {
  4434. this.seqDetailData = {
  4435. seqNo : '',
  4436. orderNo: '',
  4437. sku: '',
  4438. partNo: '',
  4439. partDesc:'',
  4440. operationDesc: '',
  4441. status: 'N'
  4442. }
  4443. this.seqInfoList = []
  4444. },
  4445. //获取按钮的权限数据
  4446. getButtonAuthData () {
  4447. let searchFlag = this.isAuth(this.menuId + ":search")
  4448. let checkFlag = this.isAuth(this.menuId + ":check")
  4449. let saveFlag = this.isAuth(this.menuId + ":save")
  4450. let deleteFlag = this.isAuth(this.menuId + ":delete")
  4451. let detailFlag = this.isAuth(this.menuId + ":detail")
  4452. let fileFlag = this.isAuth(this.menuId + ":file")
  4453. let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
  4454. let overLoadFlag = this.isAuth(this.menuId + ":overLoad")
  4455. let tempReleaseFlag = this.isAuth(this.menuId + ":tempRelease")
  4456. //处理页面的权限数据
  4457. this.authSearch = !searchFlag
  4458. this.authCheck = !checkFlag
  4459. this.authSave = !saveFlag
  4460. this.authDelete = !deleteFlag
  4461. this.authOverLoad = !overLoadFlag
  4462. this.authTempRelease = !tempReleaseFlag
  4463. this.authDetail = !detailFlag
  4464. this.authFile = !fileFlag
  4465. this.authCancelCheck = !cancelCheckFlag
  4466. },
  4467. }
  4468. }
  4469. </script>
  4470. <style scoped>
  4471. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  4472. color: red;
  4473. font-weight: bold;
  4474. }
  4475. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  4476. color: rgb(103,194,58);
  4477. font-weight: bold;
  4478. }
  4479. .el-table /deep/ .cell{
  4480. height: auto;
  4481. line-height: 1.5;
  4482. }
  4483. </style>