Commit d787dec2 authored by 黄奎's avatar 黄奎

页面修改

parent ba7470f2
......@@ -162,3 +162,14 @@ export function saveManagerAudit(data) {
data
})
}
/**
* 获取留学就业审核人配置
*/
export function queryStudyAbroadAudit(data) {
return request({
url: '/StudyAbroad/GetStudyAbroadAudit',
method: 'post',
data
})
}
......@@ -161,7 +161,6 @@
if (jsonData && jsonData.length > 0) {
this.AllemployeeList = JSON.parse(JSON.stringify(jsonData));
this.EmployeeList = JSON.parse(JSON.stringify(jsonData));
console.log(res,'数据来了');
}
}
})
......
......@@ -2,10 +2,10 @@
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">{{objOption.Id==0?'新增留学':'修改留学'}}</div>
<div class="text-h6">{{objOption.Id==0?'新增':'修改'}}{{Type==1?'留学':'就业'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg q-px-md text-grey-6">留学信息</div>
<div class="text-caption q-mb-lg q-px-md text-grey-6">{{Type==1?'留学':'就业'}}信息</div>
<div class="row wrap">
<q-input filled stack-label maxlength="30" :dense="false" v-model="objOption.Name" ref="Name"
class="col-6 q-pr-lg q-pb-lg" label="项目名称" :rules="[val => !!val || '项目名称']" />
......@@ -63,12 +63,11 @@
persistent: true,
objOption: {
Id: 0,
Type: 1, //1留学 2就业
Type: 0, //1留学 2就业
Name: '', //项目名称
SupplierId: 0, //供应商编号
SupplierContract: '', //供应商合同
Remark: '', //备注
},
optionTitle: "",
saveLoading: false,
......@@ -150,7 +149,6 @@
UploadAttachment(files) {
UploadSelfFile('Attachment', files.file, res => {
if (res.Code == 1) {
console.log(res);
this.fileObj.FileName = res.FileName;
this.fileObj.FileUrl = res.FileUrl;
this.objOption.SupplierContract = res.FileUrl;
......
......@@ -2,7 +2,7 @@
<q-dialog v-model="persistent" persistent content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">设置留学价格</div>
<div class="text-h6">设置{{Type==1?'留学':'就业'}}价格</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg text-grey-6">基础价格设置</div>
......@@ -144,12 +144,15 @@
saveObj: {
type: Object,
default: null
},
Type: {
type: Number,
default: null
}
},
data() {
return {
persistent: true,
optionTitle: "",
saveStudyAbroadLoading: false,
//价格对象
priceObj: {
......@@ -212,9 +215,7 @@
this.priceObj.priceList = res.Data.PreferentialList;
}
});
this.optionTitle = "修改留学优惠信息";
} else {
this.optionTitle = "新增留学优惠信息";
this.priceObj.studyAbroadObj.CourseId = 0;
this.priceObj.studyAbroadObj.SuggestPrice = 0;
this.priceObj.studyAbroadObj.SellPrice = 0;
......
......@@ -3,214 +3,328 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input ref="filter" filled v-model="keyWords" label="系列名称">
<template v-slot:append>
<q-icon v-if="keyWords !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
</template>
</q-input>
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Name" label="项目名称"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select class="q-pb-lg q-pr-lg" filled stack-label option-value="Id" option-label="Name"
v-model="msg.SaleState" ref="SaleState" :options="saleDownList" label="销售状态" :dense="false" emit-value
map-options>
</q-select>
</div>
</div>
</div>
<div class="page-content">
<!--<div class="q-pa-md q-gutter-sm">
<q-tree v-if="isShow" :nodes="data" node-key="CateId" label-key="CateName" children-key="ChildList"
:filter="keyWords" :filter-method="myFilterMethod" default-expand-all no-results-label="暂无相关数据">
<template v-slot:default-header="prop">
<div class="row items-center">
<div class="text-weight-bold text-primary">{{ prop.node.CateName }}</div>
<template v-if="prop.node.ChildList && prop.node.ChildList.length>0">
&nbsp;
<q-btn round icon="add" size="xs" @click="EditCategory(null)" />
</template>
&nbsp;
<q-btn round icon="edit" size="xs" @click="EditCategory(prop.node)" />
</div>
</template>
</q-tree>
</div>-->
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">系列信息</div>
<div class="col-2 q-table__title">就业信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增系列" @click="EditCategory(null)" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增就业" @click="EditStudy(null)" />
</div>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
<template v-slot:body-cell-SupplierName="props">
<q-td>
<div>{{props.row.SupplierName}}</div>
<div>
<a :href="props.row.SupplierContract" style="color:#2961FE;text-decoration:none;"
v-if="props.row.SupplierContract">
查看合同
</a>
</div>
</q-td>
</template>
<template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right:0px">
<div v-for="x in props.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
{{ x.BuyNum }}{{ x.SendNum }}
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享{{ 100 - x.PriceMoney }}折优惠
</div>
<div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right:0px;padding-left:0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0">
{{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-CateId="props">
<template v-slot:body-cell-PreferentialListB2BCommission="props">
<q-td :props="props" style="padding-left:0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
{{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-Id="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCategory(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400;" label="删除"
@click="deleteCategory(props.row)" />
@click="EditStudy(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="价格设置"
@click="EditStudyPrice(props.row)" />
<q-btn v-if="props.row.SaleState==1&&props.row.SaleState==4" flat size="xs" icon="edit" color="accent" style="font-weight:400" label="申请审核"
@click="applyApply(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.PageCount"
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
:input="true" @input="changePage" />
</template>
</q-table>
<category-form v-if="isShowCategory" :save-obj="categoryObj" @close="closeCagegoryForm" @success="refreshPage">
</category-form>
<studyAbroad-form v-if="isShowStudy" :save-obj="studyObj" :Type="2" @close="closeStudyForm"
@success="refreshPage">
</studyAbroad-form>
<studyAbroadprice-form v-if="isShowStudyPrice" :save-obj="studyObj" :Type="2" @close="closeStudyForm"
@success="refreshPage">
</studyAbroadprice-form>
</div>
</div>
</template>
<script>
import {
queryCourseCategoryPage
} from '../../api/course/index'
import categoryForm from '../../components/course/category-form'
queryStudyAbroadPage,
saveSaleState
} from '../../api/studyabroad/index'
import studyAbroadForm from '../../components/studyAbroad/studyAbroad-form'
import studyAbroadpriceForm from '../../components/studyAbroad/studyAbroadprice-form'
export default {
meta: {
title: "课程系类"
title: "就业管理"
},
components: {
categoryForm,
studyAbroadForm,
studyAbroadpriceForm
},
data() {
return {
msg:{
PageIndex:1,
PageSize:20,
PageCount:1
msg: {
Type: 2, //1留学 2就业
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
Name: "",
IsQPrice: 1,
SaleState: 0 //销售状态
},
currentUrl: "",
data: [],
keyWords: '',
isShowCategory: false,
isShow: false,
categoryObj: {},
loading:true,
columns: [
dataList: [],
loading: true,
columns: [{
name: 'Name',
label: '项目名称',
field: 'Name',
align: 'left'
},
{
name: 'CateName',
label: '系列名称',
field: 'CateName',
name: 'SupplierName',
label: '供应商',
field: 'SupplierName',
align: 'left'
},
{
name: 'CourseCount',
label: '关联课程',
name: 'SuggestPrice',
label: '建议卖价',
field: 'SuggestPrice',
align: 'left',
field: row => row.CourseCount,
format: (val, row) => `${val}个课程`
field: row => row.SuggestPrice.toFixed(2)
},
{
name: 'Status',
label: '状态',
name: 'SellPrice',
label: '实际卖价',
field: 'SellPrice',
align: 'left',
field: row => row.Status
field: row => row.SellPrice.toFixed(2)
},
{
name: 'UpdateByName',
label: '修改人',
align: 'left',
field: row => row.UpdateByName
name: "PreferentialList",
required: true,
label: "优惠政策",
align: "left",
field: row => row.PreferentialList
},
{
name: 'UpdateTimeStr',
label: '修改时间',
align: 'left',
field: row => row.UpdateTimeStr
name: "PreferentialListSellCommission",
required: true,
label: "销售佣金",
align: "left",
field: row => row.PreferentialList
},
{
name: "PreferentialListB2BCommission",
required: true,
label: "同行佣金",
align: "left",
field: row => row.PreferentialList
},
{
name: 'CateId',
name: 'Remark',
label: '备注',
field: 'Remark',
align: 'left'
},
{
name: 'SaleStateName',
label: '销售状态',
field: 'SaleStateName',
align: 'left'
},
{
name: 'Id',
label: '操作',
field: 'CateId'
field: 'Id'
}
],
PageCount: 0,
isShowStudy: false, //是否显示留学弹窗
studyObj: {}, //留学对象
isShowStudyPrice: false, //是否显示价格设置
saleDownList: [{
Id: 0,
Name: '不限'
}, {
Id: 1,
Name: '销售中'
}, {
Id: 2,
Name: '已下架'
}], //销售状态下拉
}
},
mounted() {
this.currentUrl = this.$route.path
this.getcoursecategorytree()
this.getList();
},
created() {
},
methods: {
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getsupplierpage();
},
//获取留学分页列表
getList() {
this.loading = true;
queryStudyAbroadPage(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
changePage(val) {
this.msg.PageIndex = val;
this.getcoursecategorytree()
this.msg.pageIndex = val;
this.getList();
},
//关闭弹窗
closeStudyForm() {
this.isShowStudy = false;
this.isShowStudyPrice = false;
this.refreshPage();
},
//刷新页面
refreshPage() {
this.getList();
},
//编辑留学
EditStudy(obj) {
if (obj) {
this.studyObj = obj;
} else {
this.studyObj = null;
}
this.isShowStudy = true;
},
//显示价格设置
EditStudyPrice(obj) {
this.studyObj = obj;
this.isShowStudyPrice = true;
},
//删除系列
deleteCategory(item) {
let delMsg = {
CateId: item.CateId,
//申请审核
applyApply(obj) {
let applyMsg = {
Id: obj.Id,
SaleState: 2
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除该系列?',
message: '是否要提交主管审核?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
deleteCourseCategory(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.refreshPage();
}
saveSaleState(applyMsg).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
this.refreshPage();
})
}).onCancel(() => {
});
},
//搜索分类
myFilterMethod(node, filter) {
return node.CateName && node.CateName.indexOf(filter) > -1;
},
//重置搜索关键词
resetFilter() {
this.keyWords = ''
this.$refs.filter.focus()
},
//刷新页面
refreshPage() {
this.getcoursecategorytree();
},
//获取课程分类树形结构
getcoursecategorytree() {
this.isShow = false;
queryCourseCategoryPage({
PageSize:this.msg.PageSize,
PageIndex:this.msg.PageIndex
}).then(res => {
this.isShow = true;
this.loading=false;
this.data = res.Data.PageData;
this.msg.PageCount=res.Data.PageCount
})
},
//新增修改角色
EditCategory(obj) {
if (obj) {
this.categoryObj = obj
} else {
this.categoryObj = null
}
this.isShowCategory = true;
},
//关闭弹窗
closeCagegoryForm() {
this.isShowCategory = false
}
}
}
</script>
<style scoped>
.border-bottom {
border-bottom: 1px dashed #EEE;
padding-bottom: 5px;
margin-bottom: 5px;
}
</style>
<style lang="sass">
@import url('~assets/css/table.sass')
......
......@@ -101,7 +101,7 @@
@click="EditStudy(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="价格设置"
@click="EditStudyPrice(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="申请审核"
<q-btn v-if="props.row.SaleState==1&&props.row.SaleState==4" flat size="xs" icon="edit" color="accent" style="font-weight:400" label="申请审核"
@click="applyApply(props.row)" />
</q-td>
</template>
......@@ -113,7 +113,7 @@
<studyAbroad-form v-if="isShowStudy" :save-obj="studyObj" :Type="1" @close="closeStudyForm"
@success="refreshPage">
</studyAbroad-form>
<studyAbroadprice-form v-if="isShowStudyPrice" :save-obj="studyObj" @close="closeStudyForm"
<studyAbroadprice-form v-if="isShowStudyPrice" :save-obj="studyObj" :Type="1" @close="closeStudyForm"
@success="refreshPage">
</studyAbroadprice-form>
</div>
......@@ -291,7 +291,7 @@
};
this.$q.dialog({
title: '提示信息',
message: '是否要提交审核?',
message: '是否要提交主管审核?',
cancel: true,
persistent: true,
ok: "确定",
......
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