Commit 2d2ac9d1 authored by zhengke's avatar zhengke

修改

parent 0eea08ee
......@@ -17,7 +17,7 @@
<div class="col-2 baseSet_Title">
基础课时费:
</div>
<div class="col-4">
<div class="col-3">
<q-input filled stack-label :dense="false" v-model="msg.BasicHourFee" ref="BasicHourFee" class="q-pb-lg"
:rules="[val => !!val || '请填写基础课时费']" />
</div>
......@@ -26,7 +26,7 @@
<div class="col-2 baseSet_Title">
基础带班人数:
</div>
<div class="col-4">
<div class="col-3">
<q-input filled stack-label :dense="false" v-model="msg.BasicClassNum" ref="BasicClassNum" class="q-pb-lg"
:rules="[val => !!val || '请填写基础带班人数']" />
</div>
......@@ -35,16 +35,23 @@
<div class="col-2 baseSet_Title">
课时分钟数:
</div>
<div class="col-4">
<div class="col-3">
<q-input filled stack-label :dense="false" v-model="msg.BasicMinutes" ref="BasicMinutes" class="q-pb-lg"
:rules="[val => !!val || '请填写课时分钟数']" />
</div>
<div class="col-3" style="padding:18px 0 0 10px;">
<div class="col-3" style="padding:18px 0 0 10px;color:gray">
每节课的分钟数,单位为分钟计算
</div>
</div>
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important;margin:20px 0 0 120px;width:300px;"
@click="saveInfo" />
<div class="col row wrap">
<div class="col-2 baseSet_Title">
</div>
<div class="col-3">
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important;margin-top:20px;width:100%;"
@click="saveInfo" />
</div>
</div>
</template>
<template v-if="tabCheck=='second'">
<q-table :loading="loading" :pagination="tabeMsg" no-data-label="暂无相关数据" flat class="sticky-column-table"
......@@ -52,29 +59,26 @@
<template v-slot:top="props">
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" @click="isShowAddPop=true" ref="addBtn" label="新增">
<q-popup-proxy >
<q-banner v-show="isShowAddPop">
<div class="dropClassDialog">
<div style="margin:10px 0 15px 0;width:300px;">新增班级类型</div>
</div>
<q-input filled stack-label :dense="false" v-model="addMsg.CTypeName" label="类型名称" ref="CTypeName"
class="q-pb-lg" :rules="[val => !!val || '请填写类型名称']" />
<q-input filled stack-label :dense="false" v-model="addMsg.AddHourFee" label="基础课时费" ref="AddHourFee"
class="q-pb-lg" :rules="[val => !!val || '请填写基础课时费']" />
<q-input filled stack-label :dense="false" v-model="addMsg.DefaultClassNum" label="默认班级人数"
ref="DefaultClassNum" class="q-pb-lg" :rules="[val => !!val || '请填写默认班级人数']" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important"
@click="isShowAddPop=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveClassType()" />
</q-card-actions>
</q-banner>
</q-popup-proxy>
</q-btn>
<q-btn color="accent" size="sm" icon="add" @click="clearInfo()" ref="addBtn" label="新增"/>
</div>
</template>
<template v-slot:body-cell-AddHourFee="props">
<q-td :props="props">
<span v-if="props.row.AddHourFee>0" style="color:green;">{{props.row.AddHourFee}}</span>
<span v-if="props.row.AddHourFee<0" style="color:red;">{{props.row.AddHourFee}}</span>
<span v-if="props.row.AddHourFee==0" style="color:black;">{{props.row.AddHourFee}}</span>
</q-td>
</template>
<template v-slot:body-cell-TotalClassNum="props">
<q-td :props="props">
<span style="color:blue;cursor:pointer" @click="goUrlT('classManage',props.row)">{{props.row.TotalClassNum}}</span>
</q-td>
</template>
<template v-slot:body-cell-CompleteClassNum="props">
<q-td :props="props">
<span style="color:blue;cursor:pointer" @click="goUrlT('classManage',props.row)">{{props.row.CompleteClassNum}}</span>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="tabeMsg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
......@@ -89,6 +93,25 @@
</template>
</q-table>
</template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale">
<q-card style="width: 400px;max-width:900px;padding:0 20px;" class="CLM-Form">
<q-card-section>
<div class="text-h6">{{commonTitle}}</div>
</q-card-section>
<q-input filled stack-label :dense="false" v-model="addMsg.CTypeName" label="类型名称" ref="CTypeName"
class="q-pb-lg" :rules="[val => !!val || '请填写类型名称']" />
<q-input filled stack-label :dense="false" style="margin:20px 0;" v-model="addMsg.AddHourFee" label="基础课时费" ref="AddHourFee"
class="q-pb-lg" :rules="[val => !!val || '请填写基础课时费']" />
<q-input filled stack-label :dense="false" v-model="addMsg.DefaultClassNum" label="默认班级人数"
ref="DefaultClassNum" class="q-pb-lg" :rules="[val => !!val || '请填写默认班级人数']" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important"
@click="persistent=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveClassType()" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
......@@ -151,8 +174,6 @@
],
loading: false,
dataList: [], //列表数据
isShowAddPop: false, // 新增弹出
addMsg: {
CTypeId: 0, //班级类型主键编号
CTypeName: '', //类型名称
......@@ -165,7 +186,8 @@
pageSize: 12
},
pageCount: 0,
isEdit: true
persistent: false,
commonTitle:''
}
},
created() {},
......@@ -204,6 +226,30 @@
},
//保存班级类型
saveClassType() {
if(this.addMsg.CTypeName==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写类型名称`
})
return;
}
if(this.addMsg.AddHourFee==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写基础课时费`
})
return;
}
if(this.addMsg.DefaultClassNum==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写默认班级人数`
})
return;
}
SetClassType(this.addMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
......@@ -213,8 +259,7 @@
message: '数据保存成功!',
position: 'top'
})
this.isShowAddPop = false;
this.clearInfo();
this.persistent = false;
this.GetClassTypePageList();
}
})
......@@ -236,6 +281,8 @@
this.GetClassTypePageList()
},
clearInfo() {
this.commonTitle = '新增班级类型';
this.persistent=true;
this.addMsg.CTypeId = 0;
this.addMsg.CTypeName = '';
this.addMsg.AddHourFee = '';
......@@ -243,7 +290,8 @@
},
//编辑班级类型
EditClassType(obj) {
this.isShowAddPop = true;
this.commonTitle = '修改班级类型';
this.persistent=true;
this.addMsg.CTypeId = obj.CTypeId;
this.addMsg.CTypeName = obj.CTypeName;
this.addMsg.AddHourFee = obj.AddHourFee;
......@@ -273,6 +321,13 @@
}
})
});
},
//跳转
goUrlT: function (path, obj){
this.$router.push({ path:path,query:{"CTypeId":obj.CTypeId,blank:'y'}})
},
closeSetForm(){
this.persistent=false;
}
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment