|
@@ -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 },
|