Commit 8d55cc79 authored by 黄奎's avatar 黄奎

新增页面

parent 0444a6c6
...@@ -50,12 +50,19 @@ ...@@ -50,12 +50,19 @@
</div> </div>
</div> </div>
<div class="text-subtitle2 text-weight-bold q-mb-md"> <div class="text-subtitle2 text-weight-bold q-mb-md">
<span>课程信息</span> <span>
<template v-if="obj.OfferType==1">
课程信息
</template>
<template v-else>
留学就业信息
</template>
</span>
</div> </div>
<div class="q-mt-md"> <div class="q-mt-md">
<q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat <q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat
class="sticky-header-table sticky-right-column-table no-bottom-table" separator="none" class="sticky-header-table sticky-right-column-table no-bottom-table" separator="none" :data="chosenCourses"
:data="chosenCourses" :columns="columns" row-key="name"> :columns="columns" row-key="name" :visible-columns="visibleColumns">
<template v-slot:body-cell-DiscountRemark="props"> <template v-slot:body-cell-DiscountRemark="props">
<q-td :props="props" class="text-negative"> <q-td :props="props" class="text-negative">
<div v-for="(x, i) in props.value.split('^')" style="border-bottom:1px dotted #f5f6f7;"> <div v-for="(x, i) in props.value.split('^')" style="border-bottom:1px dotted #f5f6f7;">
...@@ -66,31 +73,33 @@ ...@@ -66,31 +73,33 @@
<!--设置课程--> <!--设置课程-->
<template v-slot:body-cell-ClassId="props"> <template v-slot:body-cell-ClassId="props">
<q-td> <q-td>
<template v-if="props.row.ClassId>0"> <template v-if="obj.OfferType==1">
{{props.row.ClassName}} <template v-if="props.row.ClassId>0">
</template> {{props.row.ClassName}}
<template v-else> </template>
选择班级 <template v-else>
选择班级
</template>
&nbsp;
<i class="iconfont icon-edit" @click.stop="setClass(props.row)" title="选择班级">
<q-popup-proxy>
<q-banner v-if="isShowClass">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">选择班级</div>
<q-select standout="bg-primary text-white" option-value="ClassId" option-label="ClassName"
v-model="props.row.ClassId" :options="props.row.ClassList" emit-value map-options label="班级"
@input="changeClass(props.row)" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowClass=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="isShowClass=false" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
</template> </template>
&nbsp;
<i class="iconfont icon-edit" @click.stop="setClass(props.row)" title="选择班级">
<q-popup-proxy>
<q-banner v-if="isShowClass">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">选择班级</div>
<q-select standout="bg-primary text-white" option-value="ClassId" option-label="ClassName"
v-model="props.row.ClassId" :options="props.row.ClassList" emit-value map-options label="班级"
@input="changeClass(props.row)" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowClass=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="isShowClass=false" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -106,7 +115,14 @@ ...@@ -106,7 +115,14 @@
}}</span> }}</span>
</div> </div>
<div class="col text-right"> <div class="col text-right">
<span>课程总价:</span> <span>
<template v-if="obj.OfferType==1">
课程总价:
</template>
<template v-else>
留学就业总价:
</template>
</span>
<span class="q-ml-xs text-weight-bold">¥{{ <span class="q-ml-xs text-weight-bold">¥{{
model.TotalPrice ? model.TotalPrice.toFixed(2) : "0.00" model.TotalPrice ? model.TotalPrice.toFixed(2) : "0.00"
}}</span> }}</span>
...@@ -206,6 +222,11 @@ ...@@ -206,6 +222,11 @@
field: row => row.ClassId field: row => row.ClassId
}, },
], ],
//表格可见列
visibleColumns: [
'CourseName', 'OriginalPrice', 'JoinNum', "DiscountPrice", "DiscountRemark", "ActualPrice",
"ClassId",
], //可见列
pageInfo: { pageInfo: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
...@@ -219,7 +240,9 @@ ...@@ -219,7 +240,9 @@
}, },
created() { created() {
if (this.obj && this.obj.OfferType != 1) {
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
}
}, },
mounted() { mounted() {
this.initObj(); this.initObj();
...@@ -230,7 +253,7 @@ ...@@ -230,7 +253,7 @@
this.isShowClass = true; this.isShowClass = true;
getClassDropDownList({ getClassDropDownList({
CourseId: item.CourseId, CourseId: item.CourseId,
IsAddDefault:1,//添加默认选项 IsAddDefault: 1, //添加默认选项
}).then(res => { }).then(res => {
item.ClassList = []; item.ClassList = [];
if (res.Code == 1) { if (res.Code == 1) {
...@@ -302,6 +325,7 @@ ...@@ -302,6 +325,7 @@
transOfferToOrder() { transOfferToOrder() {
var sMsg = { var sMsg = {
OfferId: this.model.Id, OfferId: this.model.Id,
OfferType:this.obj.OfferType,
OfferDetails: this.model.OfferDetails OfferDetails: this.model.OfferDetails
}; };
saveOfferToOrder(sMsg).then(res => { saveOfferToOrder(sMsg).then(res => {
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<div class="col-3"> <div class="col-3">
<q-select filled stack-label use-input input-debounce="0" option-value="Id" clearable @input="resetSearch" <q-select filled stack-label use-input input-debounce="0" option-value="Id" clearable @input="resetSearch"
option-label="EmployeeName" v-model="msg.CreateBy" :options="EmployeeList" label="员工" :dense="false" option-label="EmployeeName" v-model="msg.CreateBy" :options="EmployeeList" label="员工" :dense="false"
emit-value map-options @filter="filterFn" > emit-value map-options @filter="filterFn">
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -231,6 +231,12 @@ ...@@ -231,6 +231,12 @@
field: "Name", field: "Name",
align: "left" align: "left"
}, },
{
name: "OfferTypeName",
label: "类型",
field: "OfferTypeName",
align: "left"
},
{ {
name: "CustomerName", name: "CustomerName",
required: true, required: true,
...@@ -313,7 +319,8 @@ ...@@ -313,7 +319,8 @@
}, },
computed: mapState({ computed: mapState({
isHavePriceAction(state) { isHavePriceAction(state) {
if (state.user.userInfo&&state.user.userInfo.ActionMenuList&&state.user.userInfo.ActionMenuList.length>0) { if (state.user.userInfo && state.user.userInfo.ActionMenuList && state.user.userInfo.ActionMenuList.length >
0) {
let action = state.user.userInfo.ActionMenuList.find(x => { let action = state.user.userInfo.ActionMenuList.find(x => {
if (x.FunctionCode == "Edit_Offer_Price") { if (x.FunctionCode == "Edit_Offer_Price") {
return x; return x;
...@@ -352,10 +359,6 @@ ...@@ -352,10 +359,6 @@
if (res.Code == 1) { if (res.Code == 1) {
var jsonData = res.Data; var jsonData = res.Data;
if (jsonData && jsonData.length > 0) { if (jsonData && jsonData.length > 0) {
// jsonData.unshift({
// Id: 0,
// EmployeeName: "请选择"
// });
this.AllemployeeList = JSON.parse(JSON.stringify(jsonData)); this.AllemployeeList = JSON.parse(JSON.stringify(jsonData));
this.EmployeeList = JSON.parse(JSON.stringify(jsonData));; this.EmployeeList = JSON.parse(JSON.stringify(jsonData));;
} }
...@@ -366,8 +369,12 @@ ...@@ -366,8 +369,12 @@
}, },
//跳转到订单列表 //跳转到订单列表
goOrderList(item) { goOrderList(item) {
var url = "/sale/myOrder";
if (item.OfferType != 1) {
url = "/sale/studyOrder";
}
this.$router.push({ this.$router.push({
path: "/sale/myOrder", path: url,
query: { query: {
OrderId: item OrderId: item
} }
......
...@@ -400,8 +400,12 @@ ...@@ -400,8 +400,12 @@
}, },
//跳转到订单列表 //跳转到订单列表
goOrderList(item) { goOrderList(item) {
var url = "/sale/myOrder";
if (item.OfferType != 1) {
url = "/sale/studyOrder";
}
this.$router.push({ this.$router.push({
path: "/sale/myOrder", path: url,
query: { query: {
OrderId: item OrderId: item
} }
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<orderlist :dataList="data.List" :isShowClass="false" :authObj="authObj" @success="refreshClassOrder" ref="orderL"> <orderlist :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" ref="orderL">
</orderlist> </orderlist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" <q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
......
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