Commit 9488d898 authored by 黄奎's avatar 黄奎

页面修改

parent d3400066
...@@ -240,8 +240,7 @@ export function queryCourseJobPageList(data) { ...@@ -240,8 +240,7 @@ export function queryCourseJobPageList(data) {
/** /**
* 获取课程优惠类型列表 * 获取课程优惠类型列表
*/ */
export function queryCoursePreferentialType() export function queryCoursePreferentialType() {
{
return request({ return request({
url: "/Course/GetCoursePreferentialType", url: "/Course/GetCoursePreferentialType",
method: 'post', method: 'post',
...@@ -251,8 +250,7 @@ export function queryCoursePreferentialType() ...@@ -251,8 +250,7 @@ export function queryCoursePreferentialType()
/** /**
* 获取课程优惠列表 * 获取课程优惠列表
*/ */
export function queryCoursePreferentialList(data) export function queryCoursePreferentialList(data) {
{
return request({ return request({
url: "/Course/GetCoursePreferentialList", url: "/Course/GetCoursePreferentialList",
method: 'post', method: 'post',
...@@ -263,8 +261,7 @@ export function queryCoursePreferentialList(data) ...@@ -263,8 +261,7 @@ export function queryCoursePreferentialList(data)
/** /**
* 新增修改课程优惠 * 新增修改课程优惠
*/ */
export function saveCoursePreferential(data) export function saveCoursePreferential(data) {
{
return request({ return request({
url: "/Course/SetBeatchCoursePreferential", url: "/Course/SetBeatchCoursePreferential",
method: 'post', method: 'post',
...@@ -273,13 +270,36 @@ export function saveCoursePreferential(data) ...@@ -273,13 +270,36 @@ export function saveCoursePreferential(data)
} }
/** /**
* 新增修改课程优惠 * 新增修改报价单
*/ */
export function saveCourseOffer(data) export function saveCourseOffer(data) {
{
return request({ return request({
url: "/CourseOffer/SetCourseOffer", url: "/CourseOffer/SetCourseOffer",
method: 'post', method: 'post',
data data
}) })
}
/**
* 获取课程报价列表
*/
export function queryCourseOfferPage(data) {
return request({
url: "/CourseOffer/GetCourseOfferPage",
method: 'post',
data
})
}
/**
* 获取报价单详情
*/
export function queryCourseOfferInfo(data) {
return request({
url: "/CourseOffer/GetCourseOffer",
method: 'post',
data
})
} }
\ No newline at end of file
<template> <template>
<q-card class="q-px-md" style="width:750px;max-width:800px;"> <q-card class="q-px-md" style="width:750px;max-width:800px;">
<q-card-section class="row items-center q-pb-none"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">创建报价单</div> <div class="text-h6">{{model.Id==0?"创建报价单":"修改报价单"}}</div>
<q-space /> <q-space />
<q-btn icon="close" flat round dense v-close-popup /> <q-btn icon="close" flat round dense v-close-popup />
</q-card-section> </q-card-section>
<q-card-section style="max-height:75vh;" class="scroll"> <q-card-section style="max-height:75vh;" class="scroll">
<q-banner <q-banner rounded class="bg-orange-2 text-black q-py-none q-px-md q-mb-md" style="min-height:30px;">
rounded
class="bg-orange-2 text-black q-py-none q-px-md q-mb-md"
style="min-height:30px;"
>
<div class="row items-center"> <div class="row items-center">
<span class="q-mr-md"> <span class="q-mr-md">
<inline-svg <inline-svg class="svg-icon svg-icon-orange" src="icons/svg/Code/Warning-2.svg"></inline-svg>
class="svg-icon svg-icon-orange"
src="icons/svg/Code/Warning-2.svg"
></inline-svg>
</span> </span>
<span style="font-size:12px;" <span style="font-size:12px;">报价单价格系统将进行自动计算,如需额外的优惠请创建报价单后进行申请</span>
>报价单价格系统将进行自动计算,如需额外的优惠请创建报价单后进行申请</span
>
</div> </div>
</q-banner> </q-banner>
<div class="row"> <div class="row">
<div class="col q-mr-md"> <div class="col q-mr-md">
<q-input <q-input standout bottom-slots v-model="model.Name" ref="Name" label="报价单名称" dense />
standout
bottom-slots
v-model="model.Name"
ref="Name"
label="报价单名称"
dense
/>
</div> </div>
<div class="col"> <div class="col">
<q-select <q-select dense standout behavior="menu" v-model="model.CustomerSource" ref="CustomerSource"
dense :options="CustomerSources" option-label="name" option-value="id" label="客户来源" emit-value map-options
standout :rules="[val => !!val || '请选择客户来源']" />
behavior="menu"
v-model="model.CustomerSource"
ref="CustomerSource"
:options="CustomerSources"
option-label="name"
option-value="id"
label="客户来源"
emit-value
map-options
:rules="[val => !!val || '请选择客户来源']"
/>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col q-mr-md"> <div class="col q-mr-md">
<q-select <q-select dense standout behavior="menu" v-model="model.CustomerType" ref="CustomerType"
dense :options="CustomerTypes" option-label="name" option-value="id" label="客户类型" emit-value map-options
standout @input="changeDiscountMoney" :rules="[val => !!val || '请选择客户类型']" />
behavior="menu"
v-model="model.CustomerType"
ref="CustomerType"
:options="CustomerTypes"
option-label="name"
option-value="id"
label="客户类型"
emit-value
map-options
@input="changeDiscountMoney"
:rules="[val => !!val || '请选择客户类型']"
/>
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input standout bottom-slots v-model="model.JoinNum" ref="JoinNum" label="报名人数" dense mask="#" fill-mask="0"
standout reverse-fill-mask :rules="[val => !!val || '请输入报名人数']" @input="changeDiscountMoney">
bottom-slots
v-model="model.JoinNum"
ref="JoinNum"
label="报名人数"
dense
mask="#"
fill-mask="0"
reverse-fill-mask
:rules="[val => !!val || '请输入报名人数']"
@input="changeDiscountMoney"
>
<template v-slot:append> <template v-slot:append>
<span style="font-size:14px;"></span> <span style="font-size:14px;"></span>
</template> </template>
...@@ -91,26 +41,11 @@ ...@@ -91,26 +41,11 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col q-mr-md"> <div class="col q-mr-md">
<q-input <q-input standout bottom-slots v-model="model.CustomerName" ref="CustomerName" label="客户姓名" dense
standout :rules="[val => !!val || '请输入客户姓名']" />
bottom-slots
v-model="model.CustomerName"
ref="CustomerName"
label="客户姓名"
dense
:rules="[val => !!val || '请输入客户姓名']"
/>
</div> </div>
<div class="col"> <div class="col">
<q-input <q-input standout bottom-slots v-model="model.CustomerTel" label="客户电话" dense mask="#" reverse-fill-mask />
standout
bottom-slots
v-model="model.CustomerTel"
label="客户电话"
dense
mask="#"
reverse-fill-mask
/>
</div> </div>
</div> </div>
<div class="text-subtitle2 text-weight-bold q-mb-md"> <div class="text-subtitle2 text-weight-bold q-mb-md">
...@@ -137,44 +72,21 @@ ...@@ -137,44 +72,21 @@
/> />
</div> --> </div> -->
<div class="col"> <div class="col">
<q-select <q-select dense standout behavior="menu" v-model="chosenCourse" :options="courseOptions"
dense @filter="filterCourseFn" input-debounce="0" use-input option-label="CourseName" option-value="CourseId"
standout emit-value map-options :placeholder="!chosenCourse ? '添加客户需要的课程' : ''" clearable />
behavior="menu"
v-model="chosenCourse"
:options="courseOptions"
@filter="filterCourseFn"
input-debounce="0"
use-input
option-label="CourseName"
option-value="CourseId"
emit-value
map-options
:placeholder="!chosenCourse ? '添加客户需要的课程' : ''"
clearable
/>
</div> </div>
<div class="q-ml-md"> <div class="q-ml-md">
<q-btn color="primary" label="添加" @click="addCourse"></q-btn> <q-btn color="primary" label="添加" @click="addCourse"></q-btn>
</div> </div>
</div> </div>
<div class="q-mt-md"> <div class="q-mt-md">
<q-table <q-table :pagination="pageInfo" no-data-label="暂无相关数据" flat
:pagination="pageInfo" class="sticky-column-table sticky-header-table sticky-right-column-table no-bottom-table" separator="none"
no-data-label="暂无相关数据" :data="chosenCourses" :columns="columns" row-key="name">
flat
class="sticky-column-table sticky-header-table sticky-right-column-table no-bottom-table"
separator="none"
:data="chosenCourses"
:columns="columns"
row-key="name"
>
<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 <div v-for="(x, i) in props.value.split('^')" style="border-bottom:1px dotted #f5f6f7;">
v-for="(x, i) in props.value.split('^')"
style="border-bottom:1px dotted #f5f6f7;"
>
{{ x }} {{ x }}
</div> </div>
</q-td> </q-td>
...@@ -187,44 +99,26 @@ ...@@ -187,44 +99,26 @@
<div style="border-top:1px solid #f5f6f7;" class="row q-py-md"> <div style="border-top:1px solid #f5f6f7;" class="row q-py-md">
<div class="col"> <div class="col">
<span>累计优惠:</span> <span>累计优惠:</span>
<span class="q-ml-xs text-weight-bold" <span class="q-ml-xs text-weight-bold">¥{{
>¥{{
model.TotalPrice ? model.TotalDiscountPrice.toFixed(2) : "0.00" model.TotalPrice ? model.TotalDiscountPrice.toFixed(2) : "0.00"
}}</span }}</span>
>
</div> </div>
<div class="col text-right"> <div class="col text-right">
<span>课程总价:</span> <span>课程总价:</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>
>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col q-mr-md"></div> <div class="col q-mr-md"></div>
<div class="col"> <div class="col">
<q-input <q-input standout bottom-slots v-model="model.EffectiveEnd" ref="EffectiveEnd" label="报价有效期" dense mask="date"
standout class="cursor-pointer" readonly :rules="[val => !!val || '请选择有效日期']">
bottom-slots
v-model="model.EffectiveEnd"
ref="EffectiveEnd"
label="报价有效期"
dense
mask="date"
class="cursor-pointer"
readonly
:rules="[val => !!val || '请选择有效日期']"
>
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy> <q-popup-proxy>
<q-date <q-date v-model="model.EffectiveEnd" title="" subtitle="报价有效日期">
v-model="model.EffectiveEnd"
title=""
subtitle="报价有效日期"
>
<div class="row items-center justify-end"> <div class="row items-center justify-end">
<q-btn v-close-popup label="确认" color="primary" flat /> <q-btn v-close-popup label="确认" color="primary" flat />
</div> </div>
...@@ -238,30 +132,26 @@ ...@@ -238,30 +132,26 @@
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="primary" v-close-popup /> <q-btn label="取消" flat color="primary" v-close-popup />
<q-btn <q-btn label="创建报价单" color="accent" class="q-px-md" style="font-weight:400 !important" @click="saveOffice" />
label="创建报价单"
color="accent"
class="q-px-md"
style="font-weight:400 !important"
@click="saveOffice"
/>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</template> </template>
<script> <script>
import { import {
queryCourseDropdownList, queryCourseDropdownList,
queryCourseCategoryTree, queryCourseCategoryTree,
saveCourseOffer saveCourseOffer,
} from "../../api/course/index"; queryCourseOfferInfo
import { date } from "quasar"; } from "../../api/course/index";
export default { import {
date
} from "quasar";
export default {
props: ["obj"], props: ["obj"],
data() { data() {
return { return {
CustomerTypes: [ CustomerTypes: [{
{
id: 1, id: 1,
name: "新客户" name: "新客户"
}, },
...@@ -270,8 +160,7 @@ export default { ...@@ -270,8 +160,7 @@ export default {
name: "续班客户" name: "续班客户"
} }
], ],
CustomerSources: [ CustomerSources: [{
{
id: 1, id: 1,
name: "学校介绍" name: "学校介绍"
}, },
...@@ -285,21 +174,13 @@ export default { ...@@ -285,21 +174,13 @@ export default {
} }
], ],
model: {}, model: {},
columns: [ columns: [{
{
name: "CourseName", name: "CourseName",
required: true, required: true,
label: "课程名称", label: "课程名称",
align: "left", align: "left",
field: row => row.CourseName field: row => row.CourseName
}, },
// {
// name: "OriginalPrice",
// required: true,
// label: "原价",
// align: "left",
// field: row => row.OriginalPrice
// },
{ {
name: "OriginalPrice", name: "OriginalPrice",
required: true, required: true,
...@@ -352,9 +233,45 @@ export default { ...@@ -352,9 +233,45 @@ export default {
}, },
computed: { computed: {
quomodel() { quomodel() {
if (this.obj) {
this.model = model; }
//处理修改传参逻辑 },
created() {
this.getCategorytree();
},
mounted() {
this.initObj();
},
methods: {
//初始化对象
initObj() {
if (this.obj && this.obj.Id > 0) {
queryCourseOfferInfo({
Id: this.obj.Id
}).then(res => {
var tempObj = res.Data;
if (res.Code == 1) {
this.model = {
Id: tempObj.Id,
Name: tempObj.Name,
EffectiveStart: tempObj.EffectiveStart,
EffectiveEnd: tempObj.EffectiveEnd,
CustomerType: tempObj.CustomerType,
CustomerSource: tempObj.CustomerSource,
TotalOriginalPrice: tempObj.TotalOriginalPrice,
TotalPrice: tempObj.TotalPrice,
TotalDiscountPrice: tempObj.TotalDiscountPrice,
CustomerInfo: tempObj.CustomerInfo,
CustomerName: tempObj.CustomerName,
CustomerTel: tempObj.CustomerTel,
OfferDetails: [],
JoinNum: tempObj.JoinNum
};
if (tempObj.OfferDetails && tempObj.OfferDetails.length > 0) {
this.model.OfferDetails = tempObj.OfferDetails;
}
}
})
} else { } else {
this.model = { this.model = {
Id: 0, Id: 0,
...@@ -373,12 +290,7 @@ export default { ...@@ -373,12 +290,7 @@ export default {
JoinNum: 0 JoinNum: 0
}; };
} }
}
}, },
mounted() {
this.getCategorytree();
},
methods: {
saveOffice() { saveOffice() {
this.$refs.EffectiveEnd.validate(); this.$refs.EffectiveEnd.validate();
this.$refs.CustomerType.validate(); this.$refs.CustomerType.validate();
...@@ -408,17 +320,18 @@ export default { ...@@ -408,17 +320,18 @@ export default {
timeout: 2000, timeout: 2000,
message: "报价单保存成功", message: "报价单保存成功",
position: "top", position: "top",
actions: [ actions: [{
{
label: "点击查看", label: "点击查看",
color: "primary", color: "primary",
handler: () => { handler: () => {
this.$router.push({ this.$router.push({
path: "/sale/createQuotation" path: "/sale/quotation",
}); query: {
Id: r.Data
} }
});
} }
] }]
}); });
this.$emit("save"); this.$emit("save");
}); });
...@@ -463,7 +376,6 @@ export default { ...@@ -463,7 +376,6 @@ export default {
this.courseOptions = this.courses.filter( this.courseOptions = this.courses.filter(
v => v.CateId == this.chosenCategory v => v.CateId == this.chosenCategory
); );
console.log(this.courseOptions);
this.$forceUpdate(); this.$forceUpdate();
}, },
addCourse() { addCourse() {
...@@ -529,7 +441,6 @@ export default { ...@@ -529,7 +441,6 @@ export default {
}, },
formatDiscount(val, target) { formatDiscount(val, target) {
let result = {}; let result = {};
if (this.model.JoinNum < 1) { if (this.model.JoinNum < 1) {
target.DiscountPrice = 0; target.DiscountPrice = 0;
target.Remark = "未填写报名人数"; target.Remark = "未填写报名人数";
...@@ -606,7 +517,6 @@ export default { ...@@ -606,7 +517,6 @@ export default {
result.money = result.money =
val.SellPrice * this.model.JoinNum - val.SellPrice * this.model.JoinNum -
parseFloat(val.SellPrice) * joinNum; parseFloat(val.SellPrice) * joinNum;
console.log("只需支付", joinNum);
result.remark = `买${x.BuyNum}${x.SendNum}`; result.remark = `买${x.BuyNum}${x.SendNum}`;
} else if ( } else if (
x.PriceDiscountType == type && x.PriceDiscountType == type &&
...@@ -620,11 +530,11 @@ export default { ...@@ -620,11 +530,11 @@ export default {
result.remark = `续费优惠${x.PriceMoney}%`; result.remark = `续费优惠${x.PriceMoney}%`;
} }
}); });
console.log(result, type);
return result; return result;
},
} }
} };
};
</script> </script>
<style></style> <style></style>
...@@ -324,12 +324,6 @@ export default { ...@@ -324,12 +324,6 @@ export default {
field: "CoverImg", field: "CoverImg",
align: "left" align: "left"
}, },
// {
// name: 'CourseId',
// label: '课程编号',
// field: 'CourseId',
// align: 'left'
// },
{ {
name: "CourseName", name: "CourseName",
required: true, required: true,
...@@ -424,11 +418,7 @@ export default { ...@@ -424,11 +418,7 @@ export default {
}, },
methods: { methods: {
createQuotation(){ createQuotation(){
this.showForm=true this.showForm=true;
// this.$router.push({
// path: '/sale/createQuotation'
// })
}, },
showContentDialog(content){ showContentDialog(content){
this.showContent=content; this.showContent=content;
...@@ -456,11 +446,9 @@ export default { ...@@ -456,11 +446,9 @@ export default {
new RegExp("\n", "gm"), new RegExp("\n", "gm"),
"<br/>" "<br/>"
); );
console.log(x.CourseFeature);
}); });
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
console.log(this.data, "data");
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
......
...@@ -109,13 +109,14 @@ ...@@ -109,13 +109,14 @@
line-height: 25px; line-height: 25px;
background-color: #004d40; background-color: #004d40;
} }
</style> </style>
<template> <template>
<div class="page-body courseList"> <div class="page-body courseList">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.Name" label="报价单名称"
@clear="resetSearch" maxlength="20" /> @clear="resetSearch" maxlength="20" />
</div> </div>
</div> </div>
...@@ -125,129 +126,66 @@ ...@@ -125,129 +126,66 @@
<li v-for="(item,index) in data" :key="index"> <li v-for="(item,index) in data" :key="index">
<div class="dline"> <div class="dline">
<div class="d1" style="width:25%"> <div class="d1" style="width:25%">
<div class="di-title">课程名称</div> <div class="di-title">流水号</div>
<div class="di-c" style="margin-top: 25px;"> <div class="di-c" style="margin-top: 25px;">
<div> <div>{{item.SerialNum}}
<img :src="item.CoverImg" v-if="item.CoverImg" style="width:60px;height:60px;margin-right:10px;" />
<img style="width:60px;height:60px;margin-right:10px;" v-else src="../../assets/images/default.png"/>
</div> </div>
<div>{{item.CourseName}}</div>
</div> </div>
</div> </div>
<div class="d2"> <div class="d2">
<div class="di-title">讲师</div> <div class="di-title">名称</div>
<div class="di-c" style="margin-top: 25px;"> <div class="di-c" style="margin-top: 25px;">
<div style="display:flex;align-items:center;" v-for="(subItem,sIndex) in item.TeacherList" <div style="margin-left:5px;">{{item.Name}}</div>
:key="sIndex">
<div>
<img v-if="subItem.TeacherIcon" style="width:25px;height:25px;border-radius:50%;"
:src="subItem.TeacherIcon" />
<div v-else class="myCourseNName">{{subItem.TeacherName.substring(0,1)}}</div>
</div>
<div style="margin-left:5px;">{{subItem.TeacherName}}</div>
</div>
</div> </div>
</div> </div>
<div class="d3"> <div class="d3">
<div class="di-title">销售平台</div> <div class="di-title">客户信息</div>
<div class="di-c" style="margin-top: 25px;"> <div class="di-c" style="margin-top: 25px;">
<span style="margin-right:5px;" v-for="(pItem,pIndex) in item.SalePlatArr">{{pItem}}</span> <span style="margin-right:5px;">{{item.CustomerName}} / {{item.CustomerTel}}</span>
</div> </div>
</div> </div>
<div class="d4" style="width:20%"> <div class="d4" style="width:20%">
<div class="di-title">基础价格</div> <div class="di-title">总原价</div>
<div class="di-c" style="margin-top: 25px;"> <div class="di-c" style="margin-top: 25px;">
<span <span
style="color: var(--q-color-negative); font-weight: bold;">{{item.OriginalPrice.toFixed(2)}}</span> style="color: var(--q-color-negative); font-weight: bold;">{{item.TotalOriginalPrice.toFixed(2)}}</span>
</div>
</div>
<div class="d5" style="width:20%">
<div class="di-title">总价格</div>
<div class="di-c" style="margin-top: 25px;">
<span style="color: var(--q-color-negative); font-weight: bold;">{{item.TotalPrice.toFixed(2)}}</span>
</div>
</div>
<div class="d5" style="width:20%">
<div class="di-title">总优惠</div>
<div class="di-c" style="margin-top: 25px;">
<span
style="color: var(--q-color-negative); font-weight: bold;">{{item.TotalDiscountPrice.toFixed(2)}}</span>
</div>
</div>
<div class="d5" style="width:19%">
<div class="di-title">报名人数</div>
<div class="di-c" style="margin-top: 25px;">
<span style="color: var(--q-color-negative); font-weight: bold;">{{item.JoinNum}}</span>
</div> </div>
</div> </div>
<div class="d5" style="width:19%"> <div class="d5" style="width:19%">
<div class="di-title">优惠价格</div> <div class="di-title">状态</div>
<div class="di-c" style="margin-top: 25px;"> <div class="di-c" style="margin-top: 25px;">
<template v-if="item.PreferentialList&&item.PreferentialList.length>0"> <span>{{item.CustomerStatusName}}</span>
<table>
<tbody v-for="(pitem,pindex) in item.PreferentialList" v-if="pindex==0">
<tr>
<td>
<template v-if="pitem.PriceDiscountType==1">
<span style="color: var(--q-color-negative); font-weight: bold;">{{pitem.BuyNum}}</span>
<span style="color: var(--q-color-negative); font-weight: bold;">{{pitem.SendNum}}</span>
</template>
<template v-else-if="pitem.PriceDiscountType==5">
刷卡分期
</template>
<template v-else>
{{pitem.PriceDiscountTypeStr}} <span
style="color: var(--q-color-negative); font-weight: bold;"> {{pitem.PriceMoney}} %</span>
</template>
</td>
</tr>
<tr>
<td>
同行返佣<span
style="color: var(--q-color-negative); font-weight: bold;"> {{pitem.B2BCommissionMoney}}
%</span>
</td>
</tr>
<tr>
<td>
销售返佣<span
style="color: var(--q-color-negative); font-weight: bold;"> {{pitem.SaleCommissionMoney}}
%</span>
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px"
v-if="item.PreferentialList.length>1">
<q-popup-proxy>
<q-banner>
<table style="width:400px;" border="0" cellspacing="0" cellpadding="0">
<thead style="background-color:rgba(221, 222, 224, 0.2);">
<tr>
<td style="width:45%;height:30px;">
优惠条件
</td>
<td style="width:25%;height:30px;">
同行返佣
</td>
<td style="width:25%;height:30px;">
销售返佣
</td>
</tr>
</thead>
<tbody>
<tr v-for="(pitem,pindex) in item.PreferentialList">
<td style="height:30px;">
<template v-if="pitem.PriceDiscountType==1">
{{pitem.BuyNum}}{{pitem.SendNum}}
</template>
<template v-else-if="pitem.PriceDiscountType==5">
刷卡分期
</template>
<template v-else>
{{pitem.PriceDiscountTypeStr}} {{pitem.PriceMoney}} %
</template>
</td>
<td style="height:30px;">
{{pitem.B2BCommissionMoney}} %
</td>
<td style="height:30px;">
{{pitem.SaleCommissionMoney}} %
</td>
</tr>
</tbody>
</table>
</q-banner>
</q-popup-proxy>
</span>
</td>
</tr>
</tbody>
</table>
</template>
</div> </div>
</div> </div>
<div class="d5" style="width:19%">
<div class="di-title">操作</div>
<div class="di-c" style="margin-top: 25px;">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="修改报价单"
@click="editQuotation(item)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="详情"
@click="gotoDetails(item)" />
</div>
</div> </div>
<div class="d6 row">
<p style="color:var(--q-color-negative);font-weight: bold"><span
style="color:#2D2D2D;">课程特色:</span>{{item.CourseFeature}}</p>
</div> </div>
</li> </li>
<li style="border: none;display: flex;justify-content: flex-end;background: white;padding: 5px 20px"> <li style="border: none;display: flex;justify-content: flex-end;background: white;padding: 5px 20px">
...@@ -258,18 +196,22 @@ ...@@ -258,18 +196,22 @@
</ul> </ul>
<div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div> <div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div>
</div> </div>
<q-dialog v-model="showForm" persistent>
<quotation-form :obj="offerObj" @save="showForm=false"></quotation-form>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import quotationForm from '../../components/sale/quotation-form'
import { import {
queryCoursePage, queryCourseOfferPage,
} from '../../api/course/index' } from '../../api/course/index'
export default { export default {
meta: { meta: {
title: "课程预览" title: "报价单"
}, },
components: { components: {
quotationForm
}, },
data() { data() {
return { return {
...@@ -280,38 +222,49 @@ ...@@ -280,38 +222,49 @@
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
CourseName: "", Name: "",
QCateIds: "", IsGetDetails: 1,
Status: "0",
IsQPrice: 1, //是否查询优惠价格设置
IsQTeacher: 1, //是否查询课程讲师
}, },
pageCount: 0, pageCount: 0,
showForm: false, //是否显示报价单弹窗
offerObj: {}, //报价单信息
} }
}, },
mounted() { mounted() {
this.currentUrl = this.$route.path this.currentUrl = this.$route.path
this.getcourselist(); this.getcourseofferpage();
}, },
methods: { methods: {
gotoDetails(item) {
this.$router.push({
path: "/sale/quotation",
query: {
Id: item.Id
}
});
},
//显示报价单
editQuotation(item) {
this.showForm = true;
this.offerObj = item;
},
//重新查询 //重新查询
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getcourselist(); this.getcourseofferpage();
}, },
//翻页 //翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getcourselist() this.getcourseofferpage()
}, },
//获取单分页列表 //获取报价单分页列表
getcourselist() { getcourseofferpage() {
this.loading = true; this.loading = true;
queryCoursePage(this.msg).then(res => { queryCourseOfferPage(this.msg).then(res => {
this.loading = false this.loading = false
this.data = res.Data.PageData this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
console.log(this.data, 'data');
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
......
<template> <template>
<div style="max-width:1290px;margin:0 auto;padding:30px;"> <div style="max-width:1290px;margin:0 auto;padding:30px;">
<q-card <q-card style="padding-top: 6.75rem!important;background:rgb(255,255,255)" ref="quotationbox" id="quotationbox"
style="padding-top: 6.75rem!important;background:rgb(255,255,255)" class="shadow-24" v-if="!isPrint">
ref="quotationbox"
id="quotationbox"
class="shadow-24"
v-if="!isPrint"
>
<div class="row justify-center"> <div class="row justify-center">
<div class="col-9"> <div class="col-9">
<div class="flex items-start" style="padding-bottom:5rem;"> <div class="flex items-start" style="padding-bottom:5rem;">
<div class="text-h3 text-weight-bold col"> <div class="text-h3 text-weight-bold col">
<span>报价单</span> <span>报价单</span>
<div style="font-size:13px;font-weight:400;" class="text-muted"> <div style="font-size:13px;font-weight:400;" class="text-muted">
No:20210213001 No:{{model.SerialNum}}
</div> </div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<div class="text-right" style="margin-bottom:0px;"> <div class="text-right" style="margin-bottom:0px;">
<img src="../../assets/images/quo_logo.png" height="30px" /> <img src="../../assets/images/quo_logo.png" height="30px" />
<img <img src="../../assets/images/quo_logo_text.png" class="q-ml-xs" height="30px" />
src="../../assets/images/quo_logo_text.png"
class="q-ml-xs"
height="30px"
/>
</div> </div>
<div class="text-muted " style="font-size: 1.05rem!important;"> <div class="text-muted " style="font-size: 1.05rem!important;">
成都市锦江区青和里南段55号阳光新业中心2号楼23楼 成都市锦江区青和里南段55号阳光新业中心2号楼23楼
</div> </div>
<div <div class="text-muted text-right" style="font-size: 1.05rem!important;">
class="text-muted text-right"
style="font-size: 1.05rem!important;"
>
联系热线:028-61993633 联系热线:028-61993633
</div> </div>
</div> </div>
</div> </div>
<div style="margin-bottom: 7.5rem!important;"> <div style="margin-bottom: 7.5rem!important;">
<q-img <q-img src="../../assets/images/quo/banner1.jpg" spinner-color="white"
src="../../assets/images/quo/banner1.jpg" style="height: 243px;width:100%;border-radius: 10px;" class="rounded-borders">
spinner-color="white"
style="height: 243px;width:100%;border-radius: 10px;"
class="rounded-borders"
>
</q-img> </q-img>
</div> </div>
<div class="row" :style="{'margin-bottom':isGengernal?'6rem':'20px'}"> <div class="row" :style="{'margin-bottom':isGengernal?'6rem':'20px'}">
...@@ -59,139 +43,75 @@ ...@@ -59,139 +43,75 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr v-for="item in model.OfferDetails">
<td style="text-align:left">
<q-icon
:color="icons[0]"
name="iconfont icon-yuanquan"
class="q-mr-xs"
size="14px"
></q-icon>
<span>商用日语导游基础班(无日语基础)</span>
</td>
<td>81课时</td>
<td>3800.00</td>
<td>3800.00</td>
<td>1</td>
<td class="remark-font">暂无</td>
</tr>
<tr>
<td style="text-align:left"> <td style="text-align:left">
<q-icon <q-icon :color="icons[0]" name="iconfont icon-yuanquan" class="q-mr-xs" size="14px"></q-icon>
:color="icons[1]" <span>{{item.CourseName}}</span>
name="iconfont icon-yuanquan"
class="q-mr-xs"
size="14px"
></q-icon>
<span>商用日语导游基础班(无日语基础)</span>
</td> </td>
<td>81课时</td> <td>{{item.ClassHours}} 课时</td>
<td>3800.00</td> <td>{{item.OriginalPrice}}</td>
<td>3800.00</td> <td>{{item.DiscountPrice}}</td>
<td>2</td> <td>{{item.JoinNum}}</td>
<td class="remark-font"> <td class="remark-font">{{item.Remark}}</td>
<!-- <td class="remark-font">
<div>双人报名享70折优惠</div> <div>双人报名享70折优惠</div>
</td> </td> -->
</tr>
<tr>
<td style="text-align:left">
<q-icon
:color="icons[2]"
name="iconfont icon-yuanquan"
class="q-mr-xs"
size="14px"
></q-icon>
<span>商用日语导游基础班(无日语基础)</span>
</td>
<td>81课时</td>
<td>3800.00</td>
<td>3800.00</td>
<td>3</td>
<td class="remark-font">暂无</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<q-separator <q-separator color="blue-grey-1" style="margin:20px auto;"></q-separator>
color="blue-grey-1"
style="margin:20px auto;"
></q-separator>
<div class="quo-font text-weight-bold">销售经理</div> <div class="quo-font text-weight-bold">销售经理</div>
<div class="row"> <div class="row">
<div class="col-3 quo-font f14">姓名:</div> <div class="col-3 quo-font f14">姓名:</div>
<div class="col-3 quo-font f14 text-right">罗超</div> <div class="col-3 quo-font f14 text-right">{{model.CreateByName}}</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-3 quo-font f14">联系电话:</div> <div class="col-3 quo-font f14">联系电话:</div>
<div class="col-3 quo-font f14 text-right">17308037817</div> <div class="col-3 quo-font f14 text-right">{{model.CreateTel}}</div>
</div> </div>
<div class="row q-pb-xl"> <div class="row q-pb-xl">
<div class="col-3 quo-font f14">微信:</div> <div class="col-3 quo-font f14">微信:</div>
<div class="col-3 quo-font f14 text-right">17308037817</div> <div class="col-3 quo-font f14 text-right">{{model.CreateWeChatNo}}</div>
</div> </div>
</div> </div>
<div <div class="col text-right"
class="col text-right" style="border-left:1px solid #ebedf3;padding-left: 2.5rem;padding-bottom: 2.5rem;padding-top: 2.5rem;margin-left:2.5rem">
style="border-left:1px solid #ebedf3;padding-left: 2.5rem;padding-bottom: 2.5rem;padding-top: 2.5rem;margin-left:2.5rem"
>
<div style="color:#b5b5c3!important;font-size:17px;" class=""> <div style="color:#b5b5c3!important;font-size:17px;" class="">
合计金额 合计金额
</div> </div>
<div <div style="font-family:Poppins,Helvetica,sans-serif;font-size:26px;" class="text-weight-bold">
style="font-family:Poppins,Helvetica,sans-serif;font-size:26px;" {{model.TotalPrice}}
class="text-weight-bold"
>
¥20,600.00
</div> </div>
<div <div class="remark-font"
class="remark-font" style="padding-bottom: 3rem;margin-bottom: 4rem;border-bottom:1px solid #ebedf3;">
style="padding-bottom: 3rem;margin-bottom: 4rem;border-bottom:1px solid #ebedf3;"
>
含税报价 含税报价
</div> </div>
<div <div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
style="color:#b5b5c3!important;font-size:14px;"
class="text-weight-bold q-mb-md"
>
客户信息 客户信息
</div> </div>
<div style="font-size:14px;" class="text-weight-bold">张桂花</div> <div style="font-size:14px;" class="text-weight-bold">{{model.CustomerName}}</div>
<div style="font-size:14px;" class="text-weight-bold q-mb-lg"> <div style="font-size:14px;" class="text-weight-bold q-mb-lg">
13551126755 {{model.CustomerTel}}
</div> </div>
<div <div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
style="color:#b5b5c3!important;font-size:14px;"
class="text-weight-bold q-mb-md"
>
报价单号 报价单号
</div> </div>
<div style="font-size:14px;" class="text-weight-bold q-mb-lg"> <div style="font-size:14px;" class="text-weight-bold q-mb-lg">
No:20210213001 No:{{model.SerialNum}}
</div> </div>
<div <div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
style="color:#b5b5c3!important;font-size:14px;"
class="text-weight-bold q-mb-md"
>
报价时间 报价时间
</div> </div>
<div style="font-size:14px;" class="text-weight-bold"> <div style="font-size:14px;" class="text-weight-bold">
2021年02月29日 {{model.CreateTime}}
</div> </div>
</div> </div>
</div> </div>
<div v-if="!isGengernal"> <div v-if="!isGengernal">
<q-separator <q-separator color="blue-grey-1" style="margin-bottom:20px;"></q-separator>
color="blue-grey-1"
style="margin-bottom:20px;"
></q-separator>
<div style="padding:6rem 0;" class="row"> <div style="padding:6rem 0;" class="row">
<div class="col"> <div class="col">
<q-btn <q-btn color="primary" label="下载报价单" class="q-mr-md" @click="saveImage" :loading="isGengernal"></q-btn>
color="primary"
label="下载报价单"
class="q-mr-md"
@click="saveImage"
:loading="isGengernal"
></q-btn>
<q-btn color="primary" flat label="获取二维码"></q-btn> <q-btn color="primary" flat label="获取二维码"></q-btn>
</div> </div>
<div class="col-auto"> <div class="col-auto">
...@@ -209,9 +129,12 @@ ...@@ -209,9 +129,12 @@
</template> </template>
<script> <script>
import print from "print-js"; import {
import html2canvas from "html2canvas"; queryCourseOfferInfo,
export default { } from '../../api/course/index'
import print from "print-js";
import html2canvas from "html2canvas";
export default {
data() { data() {
return { return {
icons: [ icons: [
...@@ -228,10 +151,28 @@ export default { ...@@ -228,10 +151,28 @@ export default {
], ],
img: "", img: "",
isPrint: false, isPrint: false,
isGengernal: false isGengernal: false,
Id: 0, //报价单编号
model: {}, //报价单详情
}; };
}, },
created() {
if (this.$route.query.Id) {
this.Id = this.$route.query.Id;
this.getDetails();
}
},
methods: { methods: {
//获取报价单详情
getDetails() {
queryCourseOfferInfo({
Id: this.Id
}).then(res => {
if (res.Code == 1) {
this.model = res.Data;
}
});
},
print() { print() {
printJS({ printJS({
printable: "quotationBoxId", // 标签元素id printable: "quotationBoxId", // 标签元素id
...@@ -251,7 +192,9 @@ export default { ...@@ -251,7 +192,9 @@ export default {
while (n--) { while (n--) {
u8arr[n] = bstr.charCodeAt(n); u8arr[n] = bstr.charCodeAt(n);
} }
return new Blob([u8arr], { type: mime }); return new Blob([u8arr], {
type: mime
});
}, },
saveImage() { saveImage() {
if (!this.isGengernal) { if (!this.isGengernal) {
...@@ -272,7 +215,11 @@ export default { ...@@ -272,7 +215,11 @@ export default {
document.body.removeChild(dom); document.body.removeChild(dom);
let blob = this.dataURLToBlob(dom.toDataURL("image/png")); let blob = this.dataURLToBlob(dom.toDataURL("image/png"));
a.setAttribute("href", URL.createObjectURL(blob)); a.setAttribute("href", URL.createObjectURL(blob));
a.setAttribute("download", "张桂花的报价单.png"); var name = "报价单.png";
if (this.model) {
name = this.model.Name + "报价单.png";
}
a.setAttribute("download", name);
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
URL.revokeObjectURL(blob); URL.revokeObjectURL(blob);
...@@ -283,14 +230,16 @@ export default { ...@@ -283,14 +230,16 @@ export default {
} }
} }
} }
}; };
</script> </script>
<style> <style>
.quo-table { .quo-table {
width: 100%; width: 100%;
} }
.quo-table thead th {
.quo-table thead th {
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
color: #b5b5c3 !important; color: #b5b5c3 !important;
...@@ -298,8 +247,9 @@ export default { ...@@ -298,8 +247,9 @@ export default {
line-height: 1.5; line-height: 1.5;
padding-bottom: 2.25rem !important; padding-bottom: 2.25rem !important;
text-align: right; text-align: right;
} }
.quo-table tbody td {
.quo-table tbody td {
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
vertical-align: top; vertical-align: top;
padding-top: 1.75rem !important; padding-top: 1.75rem !important;
...@@ -309,13 +259,16 @@ export default { ...@@ -309,13 +259,16 @@ export default {
color: #3f4254; color: #3f4254;
line-height: 1.5; line-height: 1.5;
text-align: right; text-align: right;
} }
.quo-font {
.quo-font {
color: #3f4254; color: #3f4254;
font-size: 15px; font-size: 15px;
margin-bottom: 0.75rem !important; margin-bottom: 0.75rem !important;
} }
.quo-font.f14 {
.quo-font.f14 {
font-size: 14px; font-size: 14px;
} }
</style> </style>
...@@ -426,6 +426,11 @@ const routes = [{ ...@@ -426,6 +426,11 @@ const routes = [{
component: () => component: () =>
import("pages/sale/courseList.vue") import("pages/sale/courseList.vue")
}, },
{
path: "/sale/courseoffer", //销售 报价单
component: () =>
import("pages/sale/courseoffer.vue")
},
{ {
path: "/sale/myOrder", //销售 我的订单 path: "/sale/myOrder", //销售 我的订单
component: () => component: () =>
...@@ -467,7 +472,7 @@ const routes = [{ ...@@ -467,7 +472,7 @@ const routes = [{
import("pages/course/question.vue") import("pages/course/question.vue")
}, },
{ {
path: "/sale/createQuotation", //报价单 path: "/sale/quotation", //报价单
component: () => component: () =>
import("pages/sale/quotation.vue") import("pages/sale/quotation.vue")
}, },
......
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