|
@@ -165,10 +165,13 @@ export class FuwutaiComponent implements OnInit {
|
165
|
165
|
unassignedBuilding = [];
|
166
|
166
|
bLoading = false;
|
167
|
167
|
getUnassignedBuilding() {
|
168
|
|
- let postData = {
|
|
168
|
+ let postData: any = {
|
169
|
169
|
hosId: this.checkedHos,
|
170
|
170
|
unassignedOder: 1, //未派单
|
171
|
171
|
};
|
|
172
|
+ if (this.allUnassignedOrders) {
|
|
173
|
+ postData.wokerIds = this.allUnassignedOrders;
|
|
174
|
+ }
|
172
|
175
|
this.bLoading = true;
|
173
|
176
|
this.mainService
|
174
|
177
|
.getBuildingOrFloor("building", postData)
|
|
@@ -179,6 +182,41 @@ export class FuwutaiComponent implements OnInit {
|
179
|
182
|
}
|
180
|
183
|
});
|
181
|
184
|
}
|
|
185
|
+ allUnassignedOrders = "";
|
|
186
|
+ getUnassignedBuilding2() {
|
|
187
|
+ if (this.user.user.scope) {
|
|
188
|
+ this.user.user.scope.typeIds = this.user.user.scope.typeIds || [];
|
|
189
|
+ } else {
|
|
190
|
+ return;
|
|
191
|
+ }
|
|
192
|
+ let types = "";
|
|
193
|
+ this.user.user.scope.typeIds.forEach((e) => {
|
|
194
|
+ types += e.id + ",";
|
|
195
|
+ });
|
|
196
|
+ types = types.slice(0, types.length - 1);
|
|
197
|
+ let postData = {
|
|
198
|
+ workOrder: {
|
|
199
|
+ serTaskTypes: types || "null",
|
|
200
|
+ serGdState: 1,
|
|
201
|
+ range: this.orderScopeRadio,
|
|
202
|
+ platform: 3,
|
|
203
|
+ searchDays: 1,
|
|
204
|
+ keyWord: "",
|
|
205
|
+ },
|
|
206
|
+ idx: 0,
|
|
207
|
+ sum: 9999,
|
|
208
|
+ };
|
|
209
|
+ this.mainService
|
|
210
|
+ .getFetchDataList("ser", "workOrder", postData)
|
|
211
|
+ .subscribe((result) => {
|
|
212
|
+ if (result.status == 200) {
|
|
213
|
+ this.allUnassignedOrders = result.list
|
|
214
|
+ .map((item) => item.id)
|
|
215
|
+ .toString();
|
|
216
|
+ }
|
|
217
|
+ });
|
|
218
|
+ // -----------------------
|
|
219
|
+ }
|
182
|
220
|
// 选中未派单列表-全选
|
183
|
221
|
changeAllUnassignedList(e) {
|
184
|
222
|
this.unassignedList.forEach((v) => (v.checked = e));
|
|
@@ -495,6 +533,7 @@ export class FuwutaiComponent implements OnInit {
|
495
|
533
|
this.checkTab(this.typeId);
|
496
|
534
|
this.moveMenu();
|
497
|
535
|
this.getPhoneNum();
|
|
536
|
+ this.getUnassignedBuilding2();
|
498
|
537
|
}
|
499
|
538
|
ngOnDestroy() {
|
500
|
539
|
console.log("关闭ser", this.webs.ws);
|
|
@@ -762,6 +801,7 @@ export class FuwutaiComponent implements OnInit {
|
762
|
801
|
}
|
763
|
802
|
this.workerRefreshTime--;
|
764
|
803
|
if (this.orderRefreshTime == 0) {
|
|
804
|
+ this.getUnassignedBuilding2();
|
765
|
805
|
this.getOrderList(1, true);
|
766
|
806
|
this.getOrderList(2);
|
767
|
807
|
this.getOrderList(3);
|
|
@@ -786,6 +826,7 @@ export class FuwutaiComponent implements OnInit {
|
786
|
826
|
}
|
787
|
827
|
// 刷新工单列表
|
788
|
828
|
refreshList() {
|
|
829
|
+ this.getUnassignedBuilding2();
|
789
|
830
|
this.resetList();
|
790
|
831
|
this.getOrderList(1);
|
791
|
832
|
this.getOrderList(2);
|