Commit f73896fb authored by zhengke's avatar zhengke

修改报价单显示

parent 6e428441
......@@ -508,6 +508,10 @@
<!--续课申请-->
<continueclass-form v-if="isShowContinueClass" :save-obj="orderObj" @close="closeContinueClassForm"
@success="refreshClassOrder"></continueclass-form>
<!-- 查看报价单 -->
<viewquotation-form v-if="isShowviewQuo" :rId="rId" @close="closeQuota" @success="refreshView">
</viewquotation-form>
</div>
</template>
......@@ -520,6 +524,8 @@
import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form';
import continueclassForm from '../sale/continueclass-form' //续课申请
import viewquotationForm from '../sale/viewquotation-form'
import {
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
......@@ -536,7 +542,8 @@
classinfoForm,
backclassForm,
moneyForm,
continueclassForm
continueclassForm,
viewquotationForm
},
props: {
//正常订单
......@@ -574,6 +581,8 @@
moneyObj: {},
CommonType: -1, //用于判断是修改提成还是额外奖励
EmployeeList: [], //员工列表
isShowviewQuo:false,
rId:0
}
},
created() {
......@@ -581,14 +590,22 @@
},
mounted() {},
methods: {
closeQuota(){
this.isShowviewQuo=false;
},
refreshView(){
},
//跳转
goQuotation(Id) {
this.$router.push({
path: "/sale/quotation",
query: {
Id: Id
}
});
this.rId=Id;
this.isShowviewQuo=true;
// this.$router.push({
// path: "/sale/quotation",
// query: {
// Id: Id
// }
// });
},
getTkshow(data) {
let Tkshow = false;
......@@ -765,13 +782,26 @@
},
chanceType(obj, type) {
let TCIDARR = []
TCIDARR.push(obj.ClassId)
let orderObj = {
OrderID: obj.OrderId,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR
TCIDARR.push(obj.ClassId);
var orderObj={}
if(obj.OfferId>0){
orderObj = {
OrderID: obj.OrderId,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR,
OtherType:29,
ReFinanceId:obj.OfferId
}
}else{
orderObj = {
OrderID: obj.OrderId,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR
}
}
this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
......
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 1000px;max-width:1000px;">
<q-card-section>
<div class="text-h6">报价单</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh;">
<div class="row justify-center" v-if="!isPrint" id="quotationbox" style="padding:40px;">
<div class="col-12">
<div class="flex items-start" style="padding-bottom:5rem;">
<div class="text-h3 text-weight-bold col">
<span>报价单</span>
<div style="font-size:13px;font-weight:400;" class="text-muted">
No:{{model.SerialNum}}
</div>
</div>
<div class="col-auto">
<div class="text-right" style="margin-bottom:0px;">
<img src="../../assets/images/quo_logo.png" height="30px" />
<img src="../../assets/images/quo_logo_text.png" class="q-ml-xs" height="30px" />
</div>
<div class="text-muted " style="font-size: 1.05rem!important;">
成都市锦江区青和里南段55号阳光新业中心2号楼23楼
</div>
<div class="text-muted text-right" style="font-size: 1.05rem!important;">
联系热线:028-61993633
</div>
</div>
</div>
<div style="margin-bottom: 7.5rem!important;">
<q-img src="../../assets/images/quo/banner1.jpg" spinner-color="white"
style="height: 243px;width:100%;border-radius: 10px;" class="rounded-borders">
</q-img>
</div>
<div class="row" :style="{'margin-bottom':isGengernal?'6rem':'20px'}">
<div class="col-9" style="padding-top: 2.5rem;">
<table class="quo-table">
<thead>
<tr>
<th style="text-align:left;">课程名称</th>
<th>课时</th>
<th>原价</th>
<th>人数</th>
<th>折扣价</th>
<th>优惠内容</th>
</tr>
</thead>
<tbody>
<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>{{item.CourseName}}</span>
</td>
<td>{{item.ClassHours}} 课时</td>
<td>{{item.OriginalPrice.toFixed(2)}}</td>
<td>{{item.JoinNum}}</td>
<td>{{item.ActualPrice.toFixed(2)}}</td>
<td class="remark-font">
<div v-for="(x,i) in item.Remark.split('^')" :key="i">
{{x}}
</div>
</td>
</tr>
</tbody>
</table>
<q-separator color="blue-grey-1" style="margin:20px auto;"></q-separator>
<div class="quo-font text-weight-bold">销售经理</div>
<div class="row">
<div class="col-3 quo-font f14">姓名:</div>
<div class="col-3 quo-font f14 text-right">{{model.CreateByName}}</div>
</div>
<div class="row">
<div class="col-3 quo-font f14">联系电话:</div>
<div class="col-3 quo-font f14 text-right">{{model.CreateTel}}</div>
</div>
<div class="row q-pb-xl">
<div class="col-3 quo-font f14">微信:</div>
<div class="col-3 quo-font f14 text-right">{{model.CreateWeChatNo}}</div><!-- TODO: 完成微信管理功能 -->
</div>
</div>
<div 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">
<div style="color:#b5b5c3!important;font-size:17px;" class="">
合计金额
</div>
<div style="font-family:Poppins,Helvetica,sans-serif;font-size:26px;" class="text-weight-bold">
<span v-if="model.TotalPrice">{{model.TotalPrice.toFixed(2)}}</span>
</div>
<div class="remark-font"
style="padding-bottom: 3rem;margin-bottom: 4rem;border-bottom:1px solid #ebedf3;">
含税报价
</div>
<div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
客户信息
</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">
{{model.CustomerTel}}
</div>
<div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
报价单号
</div>
<div style="font-size:14px;" class="text-weight-bold q-mb-lg">
No:{{model.SerialNum}}
</div>
<div style="color:#b5b5c3!important;font-size:14px;" class="text-weight-bold q-mb-md">
报价时间
</div>
<div style="font-size:14px;" class="text-weight-bold">
{{model.CreateTime}}
</div>
</div>
</div>
<div v-if="!isGengernal">
<q-separator color="blue-grey-1" style="margin-bottom:20px;"></q-separator>
<div style="padding:6rem 0;" class="row">
<div class="col">
<q-btn color="primary" label="下载报价单" class="q-mr-md" @click="saveImage" :loading="isGengernal">
</q-btn>
<q-btn color="primary" flat label="获取二维码"></q-btn>
</div>
<div class="col-auto">
<q-btn v-if="model&&model.CustomerStatus&&(model.CustomerStatus==1||model.CustomerStatus==2)"
color="dark" label="撤销报价单" @click="setOfferStatus"></q-btn>
</div>
</div>
</div>
</div>
</div>
<div v-if="isPrint" id="quotationBoxId">
<img :src="img" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closequoForm" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
queryCourseOfferInfo,
saveCourseOfferCustomerStatus
} from '../../api/course/index'
import print from "print-js";
import html2canvas from "html2canvas";
export default {
props: ["rId"],
data() {
return {
persistent: true,
icons: [
"negative",
"primary",
"warning",
"secondary",
"accent",
"negative",
"primary",
"warning",
"secondary",
"accent"
],
img: "",
isPrint: false,
isGengernal: false,
Id: 0, //报价单编号
model: {}, //报价单详情
};
},
created() {
if (this.rId) {
this.Id = this.rId;
this.getDetails();
}
},
methods: {
//设置报价单状态
setOfferStatus() {
this.$confirm('是否撤销此报价单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveCourseOfferCustomerStatus({
Id: this.Id,
CustomerStatus: 3
}).then(res => {
if (res.Code == 1) {
this.$message.success("撤销成功!")
this.$router.push({
path: "/sale/courseoffer",
});
} else {
this.$message.error(res.Data.Message);
}
})
})
},
//获取报价单详情
getDetails() {
queryCourseOfferInfo({
Id: this.Id
}).then(res => {
if (res.Code == 1) {
this.model = res.Data;
}
});
},
print() {
printJS({
printable: "quotationBoxId", // 标签元素id
type: "html"
});
setTimeout(() => {
this.isPrint = false;
this.isGengernal = false;
}, 1000);
},
dataURLToBlob(dataurl) {
let arr = dataurl.split(",");
let mime = arr[0].match(/:(.*?);/)[1];
let bstr = atob(arr[1]);
let n = bstr.length;
let u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], {
type: mime
});
},
closequoForm() {
this.$emit('close')
this.persistent = false
},
saveImage() {
if (!this.isGengernal) {
this.isGengernal = true;
setTimeout(() => {
let canvasID = document.getElementById("quotationbox");
let a = document.createElement("a");
html2canvas(canvasID, {
useCORS: true,
allowTaint: true,
backgroundColor: "#FFFFFF",
scale: 1.3,
taintTest: false
}).then(canvas => {
let dom = document.body.appendChild(canvas);
dom.style.display = "none";
a.style.display = "none";
document.body.removeChild(dom);
let blob = this.dataURLToBlob(dom.toDataURL("image/png"));
a.setAttribute("href", URL.createObjectURL(blob));
var name = "报价单.png";
if (this.model) {
name = this.model.Name + "报价单.png";
}
a.setAttribute("download", name);
document.body.appendChild(a);
a.click();
URL.revokeObjectURL(blob);
document.body.removeChild(a);
this.isGengernal = false;
});
}, 1000);
}
}
}
};
</script>
<style>
.quo-table {
width: 100%;
}
.quo-table thead th {
font-size: 13px;
font-weight: bold;
color: #b5b5c3 !important;
border-bottom: 1px solid rgb(235, 237, 243);
line-height: 1.5;
padding-bottom: 2.25rem !important;
text-align: right;
}
.quo-table tbody td {
padding-bottom: 0.75rem;
vertical-align: top;
padding-top: 1.75rem !important;
padding-left: 0;
font-size: 13px;
font-weight: 600;
color: #3f4254;
line-height: 1.5;
text-align: right;
}
.quo-font {
color: #3f4254;
font-size: 15px;
margin-bottom: 0.75rem !important;
}
.quo-font.f14 {
font-size: 14px;
}
</style>
......@@ -125,7 +125,8 @@
if(this.$route.query.Handmsg){
this.$router.push({
path: '/financial/financalDocument/addReceivablesDocuments',
query:{"Handmsg":this.Handmsg,"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
query:{"Handmsg":this.Handmsg,"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,
'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
});
}
// 财务收据
......@@ -133,13 +134,15 @@
let Handmsg=this.$route.query.czmsg;
this.$router.push({
path: '/financial/financalDocument/addReceivablesDocuments',
query:{"Handmsg":Handmsg,"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
query:{"Handmsg":Handmsg,"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,
'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
});
}
else{
this.$router.push({
path: '/financial/financalDocument/addReceivablesDocuments',
query:{"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
query:{"tradeWay":this.tradeWay,"platformAccount":this.platformAccount,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,
'companyID':this.$route.query.companyID,blank:'y',tab:'新增收款单'}
});
}
}else if(this.active==2){
......@@ -148,12 +151,14 @@
if(this.$route.query.czmsg){
this.$router.push({
path: '/financial/financalDocument/' + path,
query:{"czmsg":this.czmsg,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,'companyID':this.$route.query.companyID,blank:'y',tab:'新增付款单'}
query:{"czmsg":this.czmsg,"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,
'companyID':this.$route.query.companyID,blank:'y',tab:'新增付款单'}
});
}else{
this.$router.push({
path: '/financial/financalDocument/' + path,
query:{"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,'companyID':this.$route.query.companyID,blank:'y',tab:'新增付款单'}
query:{"id":id,"Name":Name,"Type":Type,"orderObj":this.orderObj,'path':this.$route.query.path,'IsUploadPic':IsUploadPic,'Cmd':this.$route.query.Cmd,
'companyID':this.$route.query.companyID,blank:'y',tab:'新增付款单'}
});
}
}else if(this.active==4){
......
......@@ -396,7 +396,7 @@
<div class="_explain">
<p>附加说明: <span class="fr" v-if="GetDetail.ComplainID > 0" @click="goComplain('ComplaintsDetail', GetDetail.ComplainID,GetDetail.OrderID)">
<span style="color:#000">投诉单号:</span> <span class="cursorpointer text-decoration">{{GetDetail.ComplainID}}</span></span>
<span class="fr" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==15" @click="goassets(GetDetail.ReFinanceId,GetDetail.OtherType)"> 电商采购单:{{GetDetail.ReFinanceId}}</span>
<span class="fr" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==16" @click="goassets(GetDetail.ReFinanceId,GetDetail.OtherType)"> 电商出库单:{{GetDetail.ReFinanceId}}</span>
<span class="fr" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==17" @click="lookbreakage(GetDetail.ReFinanceId)"> 报损/报溢单:{{GetDetail.ReFinanceId}}</span>
......@@ -412,6 +412,9 @@
<span v-if="GetDetail.OtherType==18&&GetDetail.ReFinanceId>0" style="cursor: pointer;float: right;color: #000;font-size: 12px;">
<span @click="goOrderDetails(GetDetail.ReFinanceId)">账单:{{GetDetail.ReFinanceId}}</span>
</span>
<span v-if="GetDetail.OtherType==29&&GetDetail.ReFinanceId>0" style="float: right;color: #000;font-size: 12px;">报价单:
<span style="color:blue;cursor:pointer;text-decoration:underline;" @click="showViewOrder">{{GetDetail.ReFinanceId}}</span>
</span>
</p>
<table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-if="GetDetail.TCIDAndTCNUMList.length>0">
<tr v-for="(o,ox) in GetDetail.TCIDAndTCNUMList" class="_fujiashuoming_tr">
......@@ -841,6 +844,8 @@
<a id='groupTourOrder_DownLoad' target="_blank" style="display:none">1不要删除</a>
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshClass">
</classinfo-form>
<viewquotationForm v-if="isShowviewQuo" :rId="rId" @close="closeQuota">
</viewquotationForm>
</div>
</template>
<script>
......@@ -865,6 +870,7 @@
import {UploadSelfFile} from '../../../api/common/common'
import {getClassNameList} from '../../../api/finance/index'
import classinfoForm from '../../../components/course/classinfo-form';
import viewquotationForm from '../../../components/sale/viewquotation-form';
export default {
data(){
......@@ -945,6 +951,8 @@
huijiShow:true,
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
isShowviewQuo:false, //是否显示预览报价单
rId:0
}
},
components:{
......@@ -966,6 +974,7 @@
"czBillModule":czBillModule,
'classinfo-form':classinfoForm,
'viewquotationForm':viewquotationForm
},
created(){
this.ID = this.$route.query.id;
......@@ -978,6 +987,10 @@
// }
},
methods:{
//查看报价单
showViewOrder(){
this.isShowviewQuo=true;
},
GetAuth() {
var actionCode = this.$AuthCode.TeamShouZhi;
// this.CheckUserAuth(actionCode, res => {
......@@ -1473,6 +1486,7 @@
let newTime = this.$commonUtils.formatMsgTime2(begTime,enTime);
this.endDate = newTime.replace("前","");
}
this.rId = data.ReFinanceId;
this.FinancialFlowTemplate_post_GetProcessList(data.FrID,data.TemplateType)
if(data.VorcherInos.length>0){
data.VorcherInos.forEach(x=>{
......@@ -1601,6 +1615,10 @@
closeClass() {
this.isShowClassInfo = false
},
//关闭预览弹窗
closeQuota(){
this.isShowviewQuo = false;
},
//刷新
refreshClass() {
......
......@@ -84,7 +84,7 @@
合计金额
</div>
<div style="font-family:Poppins,Helvetica,sans-serif;font-size:26px;" class="text-weight-bold">
{{model.TotalPrice.toFixed(2)}}
<span v-if="model.TotalPrice">{{model.TotalPrice.toFixed(2)}}</span>
</div>
<div class="remark-font"
style="padding-bottom: 3rem;margin-bottom: 4rem;border-bottom:1px solid #ebedf3;">
......
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