调整号源统计,明细勾选

main
yanzai 2 weeks ago
parent 855afb9adb
commit 626f9c4d7b

@ -168,6 +168,9 @@ class PlanController extends Controller
if (!isset($searchInfo['date'])) {
$searchInfo['date'] = date('Y-m-d');
}
if (isset($searchInfo['plan_type']) and $searchInfo['plan_type']===0) {
$list = $list->where(['a.type' => 0]);
}
$list = $list->where(['a.date' => $searchInfo['date']]);
$list = $list->orderBy('a.time', 'asc')->get();
$plan_model=DB::table('plan_model_time')
@ -181,7 +184,7 @@ class PlanController extends Controller
if ($v1->model_id == $v->model_id and $v1->time == $v->time) {
$list[$k]->plan_type_name = $v1->plan_type_name;
$list[$k]->plan_type_id = $v1->plan_type_id;
if (isset($searchInfo['plan_type']) and !empty($searchInfo['plan_type']) and $v1->plan_type_id==$searchInfo['plan_type']) {
if (isset($searchInfo['plan_type']) and !empty($searchInfo['plan_type']) and $v1->plan_type_id==$searchInfo['plan_type'] and $v->type<>0) {
$list_l[]=$list[$k];
}
break;
@ -368,9 +371,13 @@ class PlanController extends Controller
$list[$k]->plan_type_name = '';
foreach ($plan_model as $k1 => $v1) {
if ($v1->model_id == $v->model_id and $v1->time == $v->time) {
if ($v1->model_id == $v->model_id and $v1->time == $v->time ) {
$list[$k]->plan_type_name = $v1->plan_type_name;
$list[$k]->plan_type_id = $v1->plan_type_id;
if ($v->type==0) {
$list[$k]->plan_type_name = '预留';
$list[$k]->plan_type_id = 0;
}
break;
}
}

@ -25,6 +25,8 @@
<el-select :filterable="true" clearable @change="PlanTypeChange()" v-model="searchInfo.plan_type" placeholder="号源类型(全部)" style="margin-left: 20px;">
<el-option v-for="(item,index) in PlanTypeList" :label="item.name"
:value="item.id" />
<el-option label="预留号"
:value="0" />
</el-select>
<div style="font-size: 14px;color: 333;margin-left: 8px;">已经使用<span style="font-weight: 700;color: chocolate;">{{used_count}}</span> 剩余<span style="font-weight: 700; color:#30ccaa;">{{unused_count}}</span></div>
<div><el-button type="primary" size="small" @click="TongjiClick()" style="margin-left: 10px;">统计全部</el-button></div>
@ -143,10 +145,10 @@
</el-select>
</div>
<div style="margin-bottom: 10px;">
号源间隔<el-input-number v-model="PiLiangJianGe" :min="1" :max="10" />
号源间隔<el-input-number v-model="PiLiangJianGe" :min="1" />
</div>
<div style="margin-bottom: 10px;">
号源数量<el-input-number v-model="PiLiangNeedCount" :min="1" :max="10" /> 需要勾选几个
号源数量<el-input-number v-model="PiLiangNeedCount" :min="1" /> 需要勾选几个
</div>
<template #footer>
<span class="dialog-footer">
@ -459,6 +461,7 @@
list.value.forEach((v,i)=>{
if(v.selected ===true){
list.value[i].selected=false
selected_count.value--
}
})
ElMessage.error("剩余号源数量不足,请调整参数")

@ -223,10 +223,10 @@
/>
</div>
<div style="margin-bottom: 10px;">
号源间隔<el-input-number v-model="PiLiangJianGe" :min="1" :max="10" />
号源间隔<el-input-number v-model="PiLiangJianGe" :min="1" />
</div>
<div style="margin-bottom: 10px;">
号源数量<el-input-number v-model="PiLiangNeedCount" :min="1" :max="10" /> 需要勾选几个
号源数量<el-input-number v-model="PiLiangNeedCount" :min="1" /> 需要勾选几个
</div>
<template #footer>
<span class="dialog-footer">
@ -700,7 +700,6 @@
}
if(ToPlanType.value===0 && (v.plan_type_id==SelectedPlanType.value.id && j==0)){
if(count<PiLiangNeedCount.value){
console.log(999999999)
timeList.value[i].class = ""
timeList.value[i].type_color =null
timeList.value[i].plan_type_id =null

Loading…
Cancel
Save