|
@@ -55,8 +55,6 @@ export class AssetsInfoComponent implements OnInit {
|
55
|
55
|
this.getFloors(v[0], v[2], this.validateForm.value.buildId);
|
56
|
56
|
} else if(v[1] === 'assetProduct'){
|
57
|
57
|
this.getAssetProductList(v[0], v[2]);
|
58
|
|
- } else if(v[1] === 'company'){
|
59
|
|
- this.getCompanyList(v[0], v[2]);
|
60
|
58
|
} else if(v[1] === 'hospital'){
|
61
|
59
|
this.getDutyList(v[0], v[2]);
|
62
|
60
|
}
|
|
@@ -67,7 +65,6 @@ export class AssetsInfoComponent implements OnInit {
|
67
|
65
|
this.getDeparts('search', '');
|
68
|
66
|
this.getDeparts('add', '');
|
69
|
67
|
this.getAssetProductList('add', '');
|
70
|
|
- this.getCompanyList('add', '');
|
71
|
68
|
this.getDutyList('add', '');
|
72
|
69
|
this.getBuildings('add', '');
|
73
|
70
|
this.getDispatchMethods();
|
|
@@ -206,24 +203,6 @@ export class AssetsInfoComponent implements OnInit {
|
206
|
203
|
|
207
|
204
|
// 获取供应商
|
208
|
205
|
companyList: any = [];
|
209
|
|
- getCompanyList(type, keyword, init = false) {
|
210
|
|
- let postData:any = {
|
211
|
|
- company: {
|
212
|
|
- name: keyword,
|
213
|
|
- busiType: {key: "company_busi_type", value: "2"},
|
214
|
|
- hosId: this.currentHospital.id,
|
215
|
|
- },
|
216
|
|
- idx: 0,
|
217
|
|
- sum: 20,
|
218
|
|
- };
|
219
|
|
- this.mainService
|
220
|
|
- .getFetchDataList("simple/data", "company", postData)
|
221
|
|
- .subscribe((data) => {
|
222
|
|
- this.companyList = data.list || [];
|
223
|
|
-
|
224
|
|
- this.isLoading = false;
|
225
|
|
- });
|
226
|
|
- }
|
227
|
206
|
|
228
|
207
|
// 获取责任部门
|
229
|
208
|
dutyList: any = [];
|
|
@@ -275,7 +254,8 @@ export class AssetsInfoComponent implements OnInit {
|
275
|
254
|
let obj = this.assetProductList.find(v => v.id == id);
|
276
|
255
|
console.log(obj);
|
277
|
256
|
this.validateForm.controls.brand.setValue(obj.brand);
|
278
|
|
- this.validateForm.controls.supplierId.setValue((Array.isArray(obj.supplierList) && obj.supplierList.length) ? obj.supplierList[0].id : null);
|
|
257
|
+ this.companyList = obj.supplierList || [];
|
|
258
|
+ this.validateForm.controls.supplierId.setValue(null);
|
279
|
259
|
}
|
280
|
260
|
|
281
|
261
|
// 修改楼栋
|