web屏蔽材料费

main
yanzai 8 months ago
parent 6d456e0c54
commit acd87349ea

@ -25,7 +25,7 @@ class ItemController extends Controller
$group_arr = []; $group_arr = [];
$group_list = []; $group_list = [];
$keshi_list = []; $keshi_list = [];
$keshi_list=DB::table('items')->select('keshi_id','keshi_name')->where(['is_choose'=>1,'status'=>1])->groupBy('keshi_id','keshi_name')->get(); $keshi_list=DB::table('items')->select('keshi_id','keshi_name')->where(['is_choose'=>1,'status'=>1])->where('keshi_name','<>','材料费')->groupBy('keshi_id','keshi_name')->get();
foreach ($items as $item) { foreach ($items as $item) {
if($item->sex <> $sex and $item->sex<>0){ if($item->sex <> $sex and $item->sex<>0){
continue; continue;

@ -122,6 +122,9 @@
color: #909399; color: #909399;
font-weight: bold; font-weight: bold;
} }
.disnone{
display: none;
}
</style> </style>
<script></script> <script></script>
</head> </head>
@ -288,7 +291,7 @@
<div class="mt-3"> <div class="mt-3">
<div class="table_title_wrapper">已选项目</div> <div class="table_title_wrapper">已选项目</div>
<el-table border :data="select_table_computed" style="width: 100%" height="calc(50vh - 45px - 79px)" <el-table border :data="select_table_computed" style="width: 100%" height="calc(50vh - 45px - 79px)"
show-overflow-tooltip ref="select_table_ref" row-class-name="cursor-pointer" highlight-current-row show-overflow-tooltip ref="select_table_ref" :row-class-name="yixuanClassName" highlight-current-row
@row-click="itemRowClick"> @row-click="itemRowClick">
<el-table-column type="selection" width="38"></el-table-column> <el-table-column type="selection" width="38"></el-table-column>
<el-table-column property="name" label="项目名称" width="120"></el-table-column> <el-table-column property="name" label="项目名称" width="120"></el-table-column>
@ -1083,12 +1086,25 @@
for (let i in select_rows) { for (let i in select_rows) {
select_ids.push(select_rows[i].id) select_ids.push(select_rows[i].id)
} }
let classnames=''
if (select_ids.includes(e.row.id)) { if (select_ids.includes(e.row.id)) {
console.log('select_ids', select_ids, e.row.id) console.log('select_ids', select_ids, e.row.id)
return 'item_active cursor-pointer' classnames= 'item_active cursor-pointer'
} else { } else {
return 'cursor-pointer' classnames= 'cursor-pointer'
}
if(e.row.group==='材料费'){
classnames=classnames+' disnone'
}
return classnames
}
const yixuanClassName=(e)=>{
let classname= 'cursor-pointer'
if(e.row.group==='材料费'){
classname=classname+' disnone';
} }
return classname
} }
function isEnglishOnly(str) { function isEnglishOnly(str) {
// 使用正则表达式检查字符串是否只包含英文字符 // 使用正则表达式检查字符串是否只包含英文字符
@ -1113,6 +1129,7 @@
PlanDateChange, PlanDateChange,
isEnglishOnly, isEnglishOnly,
itemTableRowClassName, itemTableRowClassName,
yixuanClassName,
createOrderClick, createOrderClick,
selectPlanClick, selectPlanClick,
getPlanList, getPlanList,

Loading…
Cancel
Save