seimin 10 місяців тому
батько
коміт
59ea3b8637

+ 14 - 4
src/app/views/assets-product-management/assets-product-management.component.html

@@ -37,12 +37,13 @@
37
             <th nzWidth="8%">名称</th>
37
             <th nzWidth="8%">名称</th>
38
             <th nzWidth="8%">型号</th>
38
             <th nzWidth="8%">型号</th>
39
             <th nzWidth="8%">品牌</th>
39
             <th nzWidth="8%">品牌</th>
40
+            <th nzWidth="8%">单位</th>
40
             <th nzWidth="8%">大类</th>
41
             <th nzWidth="8%">大类</th>
41
             <th nzWidth="8%">小类</th>
42
             <th nzWidth="8%">小类</th>
42
-            <th nzWidth="12%">描述</th>
43
-            <th nzWidth="14%">供应商</th>
44
-            <th nzWidth="14%">生产商</th>
45
-            <th nzWidth="12%">操作</th>
43
+            <th nzWidth="11%">描述</th>
44
+            <th nzWidth="11%">供应商</th>
45
+            <th nzWidth="11%">生产商</th>
46
+            <th nzWidth="11%">操作</th>
46
           </tr>
47
           </tr>
47
         </thead>
48
         </thead>
48
         <tbody>
49
         <tbody>
@@ -51,6 +52,7 @@
51
             <td>{{data.name}}</td>
52
             <td>{{data.name}}</td>
52
             <td>{{data.model}}</td>
53
             <td>{{data.model}}</td>
53
             <td>{{data.brand}}</td>
54
             <td>{{data.brand}}</td>
55
+            <td>{{data.unit}}</td>
54
             <td>{{data.mainTypeDTO?.name}}</td>
56
             <td>{{data.mainTypeDTO?.name}}</td>
55
             <td>{{data.subTypeDTO?.name}}</td>
57
             <td>{{data.subTypeDTO?.name}}</td>
56
             <td>{{data.description}}</td>
58
             <td>{{data.description}}</td>
@@ -105,6 +107,14 @@
105
             </nz-form-control>
107
             </nz-form-control>
106
           </nz-form-item>
108
           </nz-form-item>
107
           <nz-form-item>
109
           <nz-form-item>
110
+            <nz-form-label [nzSpan]="5" nzRequired nzFor="unit">单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</nz-form-label>
111
+            <nz-form-control [nzSpan]="19" nzErrorTip="请输入单位!">
112
+              <nz-input-group>
113
+                  <input formControlName="unit" nz-input placeholder="请输入单位">
114
+              </nz-input-group>
115
+            </nz-form-control>
116
+          </nz-form-item>
117
+          <nz-form-item>
108
             <nz-form-label [nzSpan]="5" nzRequired nzFor="mainType">大&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类</nz-form-label>
118
             <nz-form-label [nzSpan]="5" nzRequired nzFor="mainType">大&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类</nz-form-label>
109
             <nz-form-control [nzSpan]="19" nzErrorTip="请选择大类!">
119
             <nz-form-control [nzSpan]="19" nzErrorTip="请选择大类!">
110
               <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="mainType" nzShowSearch
120
               <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="mainType" nzShowSearch

+ 4 - 0
src/app/views/assets-product-management/assets-product-management.component.ts

@@ -137,6 +137,7 @@ export class AssetsProductManagementComponent implements OnInit {
137
       name: ['', [Validators.required, Validators.pattern(/\S/)]],
137
       name: ['', [Validators.required, Validators.pattern(/\S/)]],
138
       model: ['', [Validators.required, Validators.pattern(/\S/)]],
138
       model: ['', [Validators.required, Validators.pattern(/\S/)]],
139
       brand: ['', [Validators.required, Validators.pattern(/\S/)]],
139
       brand: ['', [Validators.required, Validators.pattern(/\S/)]],
140
+      unit: ['', [Validators.required, Validators.pattern(/\S/)]],
140
       mainType: [null, [Validators.required]],
141
       mainType: [null, [Validators.required]],
141
       subType: [null],
142
       subType: [null],
142
       description: [''],
143
       description: [''],
@@ -258,6 +259,7 @@ export class AssetsProductManagementComponent implements OnInit {
258
           name: this.validateForm.value.name,
259
           name: this.validateForm.value.name,
259
           model: this.validateForm.value.model,
260
           model: this.validateForm.value.model,
260
           brand: this.validateForm.value.brand,
261
           brand: this.validateForm.value.brand,
262
+          unit: this.validateForm.value.unit,
261
           mainType: this.validateForm.value.mainType,
263
           mainType: this.validateForm.value.mainType,
262
           subType: this.validateForm.value.subType || undefined,
264
           subType: this.validateForm.value.subType || undefined,
263
           description: this.validateForm.value.description,
265
           description: this.validateForm.value.description,
@@ -275,6 +277,7 @@ export class AssetsProductManagementComponent implements OnInit {
275
             name: this.validateForm.value.name,
277
             name: this.validateForm.value.name,
276
             model: this.validateForm.value.model,
278
             model: this.validateForm.value.model,
277
             brand: this.validateForm.value.brand,
279
             brand: this.validateForm.value.brand,
280
+            unit: this.validateForm.value.unit,
278
             mainType: this.validateForm.value.mainType,
281
             mainType: this.validateForm.value.mainType,
279
             subType: this.validateForm.value.subType || undefined,
282
             subType: this.validateForm.value.subType || undefined,
280
             description: this.validateForm.value.description,
283
             description: this.validateForm.value.description,
@@ -316,6 +319,7 @@ export class AssetsProductManagementComponent implements OnInit {
316
     this.validateForm.controls.name.setValue(data.name);
319
     this.validateForm.controls.name.setValue(data.name);
317
     this.validateForm.controls.model.setValue(data.model);
320
     this.validateForm.controls.model.setValue(data.model);
318
     this.validateForm.controls.brand.setValue(data.brand);
321
     this.validateForm.controls.brand.setValue(data.brand);
322
+    this.validateForm.controls.unit.setValue(data.unit);
319
     this.validateForm.controls.mainType.setValue(data.mainType ? data.mainType.toString() : null);
323
     this.validateForm.controls.mainType.setValue(data.mainType ? data.mainType.toString() : null);
320
     this.validateForm.controls.subType.setValue(data.subType ? data.subType.toString() : null);
324
     this.validateForm.controls.subType.setValue(data.subType ? data.subType.toString() : null);
321
     this.validateForm.controls.description.setValue(data.description);
325
     this.validateForm.controls.description.setValue(data.description);