yangg 3 gün önce
ebeveyn
işleme
60be099c32
1 değiştirilmiş dosya ile 8 ekleme ve 8 silme
  1. 8 8
      src/views/system/device/crud.tsx

+ 8 - 8
src/views/system/device/crud.tsx

@@ -361,14 +361,14 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 							show: true,
 							minWidth: 100,
 							formatter: ({ row }) => {
-								const isBorrowed = row.borrowed_quantity > 0;
-								const isMaintenance = row.maintenance_quantity > 0 && row.maintenance_quantity === row.total_quantity;
-								const isDamaged = row.damaged_quantity > 0 && row.damaged_quantity === row.total_quantity;
+								const isBorrowed = row.inventory.borrowed_quantity > 0;
+								const isMaintenance = row.inventory.maintenance_quantity > 0 && row.inventory.maintenance_quantity === row.inventory.total_quantity;
+								const isDamaged = row.inventory.damaged_quantity > 0 &&  row.inventory.total_quantity==0;
 								
 								let label, color;
-								
+								console.log(isDamaged);
 								if (isDamaged) {
-									label = '报';
+									label = '报';
 									color = '#F56C6C';
 								} else if (isMaintenance) {
 									label = '维修';
@@ -510,7 +510,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 					title:'是否可见',
 					type: 'dict-switch',
 					column: {
-						show:false,
+						show:true,
 						minWidth: 90,
 						component: {
 							name: 'fs-dict-switch',
@@ -540,14 +540,14 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 
 
 				},
-				status_label:{
+				/* status_label:{
 					title: '当前状态',
 					search: { show: false },
 					form: {
 						show:false,
 					}
 
-				},
+				}, */
 				department: {
 					title: '所属部门',
 					search: { show: false },