Commit 985a3ef1 authored by zhengke's avatar zhengke

1

parents bf46e757 3806dba8
......@@ -191,7 +191,7 @@ export function SetBackClassProtocolSign(data) {
}
/**
* 销售确认
* 销售确认退课协议
*
*/
export function SetBackClassProtocolSure(data) {
......@@ -201,17 +201,3 @@ export function SetBackClassProtocolSure(data) {
data
})
}
/**
* 获取签字二维码链接
*
*/
export function CreateWeChatCode(data) {
return request({
url: '/EducationContract/CreateWeChatCode',
method: 'post',
data
})
}
......@@ -267,7 +267,7 @@
</div>
</div>
<div class="row col-12" v-if="choosePlat.find((e) => e == 4)">
<!-- <span class="q-mb-sm">选择分类:</span>
<span class="q-mb-sm">选择分类:</span>
<q-card class="full-width">
<q-tree
class="col-sm-6"
......@@ -280,7 +280,7 @@
default-expand-all
@update:ticked="handleCheckChange"
/>
</q-card> -->
</q-card>
</div>
</q-card-section>
<q-separator />
......
<style>
.proTocol_Top {
color: #000;
text-align: center;
width:230px;
}
.proTocol_Top>div {
margin-top: 5px;
}
.proTocol_Top>div:last-child{
margin-bottom:10px;
}
</style>
<template>
<div class="page-content">
<div class="proTocol_Top" id="proToCol">
<img :src="imgUrl" class="imgs" style="width:150px;" alt="" />
<div>尊敬的客户</div>
<div>您的退款协议《{{ProtocolNum}}</div>
<div>请你长按识别二维码,查阅并签字。</div>
</div>
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="退课协议" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
......@@ -47,7 +27,7 @@
<template v-slot:body-cell-AuditStatus="props">
<q-td auto-width :props="props">
<span v-if="props.row.AuditStatus == 1||props.row.AuditStatus == 0" style="color: #409eff">审核中</span>
<span v-if="props.row.AuditStatus == 2" style="color: #67c23a">审合通过</span>
<span v-if="props.row.AuditStatus == 2" style="color: #67c23a">{{props.row.AuditStatusStr}}</span>
<span v-if="props.row.AuditStatus == 3" style="color: #f56c6c">驳回</span>
</q-td>
</template>
......@@ -63,19 +43,15 @@
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" v-if="props.row.Status == 0 || props.row.Status == 3" icon="edit" color="accent"
style="font-weight: 400" @click="EditContract(props.row)" label="编辑" />
<el-tooltip content="复制链接发送给客人签字" placement="top" effect="light">
<!-- <q-btn flat size="xs" v-if="
props.row.AuditStatus == 2 &&
(props.row.Sign == '' || props.row.Sign == null)
" icon="iconfont icon-qianming" color="accent" style="font-weight: 400" @click="CopyUrl(props.row)"
label="获取合同链接" /> -->
<q-btn flat size="xs" icon="iconfont icon-qianming" color="accent" style="font-weight: 400"
@click="CopyUrl(props.row)" label="获取合同链接" />
<el-tooltip v-if="AuthorityObj.isShowCopyLink" content="复制链接发送给客人签字" placement="top" effect="light">
<q-btn flat v-if=" props.row.AuditStatus == 2 &&props.row.IsSure==0" size="xs"
icon="iconfont icon-qianming" color="accent" style="font-weight: 400" @click="CopyUrl(props.row)"
label="获取合同链接" />
</el-tooltip>
<q-btn flat label="销售确认" color="accent" size="xs" icon="iconfont icon-queren"
@click="salerSure(props.row.Id)" style="font-weight:400" />
<q-btn flat
v-if="AuthorityObj.isShowSure&& props.row.AuditStatus == 2 &&props.row.PartyASign!=null && props.row.PartyASign!='' &&props.row.IsSure == 0"
size="xs" icon="iconfont icon-View" color="accent" @click="SureProtocol(props.row)"
style="font-weight: 400" label="确认退课协议" />
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" @click="goContract(props.row.Id)"
style="font-weight: 400" label="查看" />
</div>
......@@ -87,9 +63,7 @@
<script>
import {
SetBackClassProtocolSure,
CreateWeChatCode
} from "../../api/sale/contract";
import html2canvas from "html2canvas";
export default {
props: {
dataList: {
......@@ -99,7 +73,11 @@
loading: {
type: Boolean,
default: null
}
},
//权限数据
authObj: {
type: Object,
},
},
data() {
return {
......@@ -157,115 +135,84 @@
field: "RoomId",
},
],
//权限显示对象
AuthorityObj: {
isShowCopyLink: false, //是否显示复制链接
isShowSure: false, //是否显示确认按钮
},
pageMsg: {
rowsPerPage: 12,
},
ProtocolNum: '', // 协议编号
imgUrl: 'http://192.168.20.24:8300/upfile/temporary/20210805/637637591390867572.jpg'
}
},
created() {
this.initAuth();
},
mounted() {},
methods: {
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowCopyLink != null && this.authObj.isShowCopyLink) {
this.AuthorityObj.isShowCopyLink = this.authObj.isShowCopyLink;
}
if (this.authObj.isShowSure != null && this.authObj.isShowSure) {
this.AuthorityObj.isShowSure = this.authObj.isShowSure;
}
}
},
//跳转至详情
goContract(Id) {
this.OpenNewUrl('/courseRefund', {
Id: Id
})
},
//复制URL
CopyUrl(item) {
// var oInput = document.createElement("input");
// var url = window.location.host;
// oInput.value = url + "/#/courseRefundH5" + `?Id=${item.Id}`;
// document.body.appendChild(oInput);
// oInput.select(); // 选择对象
// document.execCommand("Copy"); // 执行浏览器复制命令
// oInput.className = "oInput";
// oInput.style.display = "none";
// this.Info("复制成功!");
let msg = {
url: '/courseRefundH5',
width: 430
}
this.ProtocolNum = item.ProtocolNum;
// CreateWeChatCode(msg).then((res) => {
// console.log(res,'数据');
// if (res.Code == 1) {
// this.imgUrl = 'http://192.168.20.24:8300'+res.Data;
// }
// });
setTimeout(() => {
let canvasID = document.getElementById("proToCol");
let a = document.createElement("a");
this.getBase64Image(this.imgUrl,document.querySelector('.imgs'))
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 = this.ProtocolNum;
a.setAttribute("download", name);
document.body.appendChild(a);
a.click();
URL.revokeObjectURL(blob);
document.body.removeChild(a);
//确认退课协议
SureProtocol(item) {
let that = this
this.$q.dialog({
title: "提示信息",
message: "你正在进行确认退课协议,是否确认执行",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
var postMsg = {
Id: item.Id,
IsSure: 1
};
SetBackClassProtocolSure(postMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "退课协议确认成功!",
position: "top",
});
this.$emit("success");
}
});
}, 1000);
},
getBase64Image(url, ref) {
var that = this;
var image = new Image();
image.src = url + "?v=" + Math.random(); // 处理缓存
image.crossOrigin = "*"; // 支持跨域图片
image.onload = function () {
var base64 = that.drawBase64Image(image);
ref.src = base64;
};
},
drawBase64Image(img) {
var canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.height;
var ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0, img.width, img.height);
var dataURL = canvas.toDataURL("image/png");
return dataURL;
},
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
});
})
},
//销售确认
salerSure(Id) {
let msg = {
Id: Id
}
SetBackClassProtocolSure(msg).then((res) => {
if (res.Code == 1) {
this.$emit('success');
}
});
//复制URL
CopyUrl(item) {
var oInput = document.createElement("input");
var url = window.location.host;
oInput.value = url + "/#/courseRefundH5" + `?Id=${item.Id}`;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = "oInput";
oInput.style.display = "none";
this.Info("复制成功!");
}
}
}
......
......@@ -380,21 +380,23 @@
<span @click="isShowPop=true">查看合同</span>
<q-popup-proxy v-if="isShowPop">
<q-banner>
<div style="width: 550px;max-height:220px;overflow:auto;">
<div style="width: 700px;max-height:220px;overflow:auto;">
<table class="Contract_Table">
<tr>
<th>姓名</th>
<th style="width:180px;">合同编号</th>
<th>状态</th>
<th width="200px;">操作</th>
<th style="width:100px;">姓名</th>
<th style="width:150px;">合同编号</th>
<th style="width:50px;">状态</th>
<th style="width:150px;">上传合同信息</th>
<th style="width:200px;">操作</th>
</tr>
<tr v-for="subItem in item.GuestList">
<td>{{subItem.GuestName}}</td>
<td>
<span style="color:var(--q-color-primary);cursor:pointer;"
@click="getShowContract(subItem)">{{subItem.ContractNo}}</span>
{{subItem.ContractNo}}
</td>
<td>{{subItem.ContractStatusStr}}</td>
<td> <span style="color:var(--q-color-primary);cursor:pointer;"
@click="getShowContract(subItem)">{{subItem.GuestContractNo}}</span></td>
<td>
<template v-if="subItem.ContractId==0">
<q-btn v-if="AuthorityObj.isShowEdit" color="accent" size="sm"
......
......@@ -20,6 +20,11 @@
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.PartyAName"
label="学生姓名" @clear="resetSearch" maxlength="30" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="EmployeeName"
v-model="msg.QCreateBy" :options="EmployeeList" emit-value map-options label="业务员" use-input
@filter="filterFn2" clearable />
</div>
</div>
</div>
<courserefund-form :loading="loading" :dataList="dataList" @success="getList"></courserefund-form>
......@@ -31,6 +36,9 @@
import {
GetBackClassProtocolPage
} from "../../api/sale/contract";
import {
queryEmployee
} from '../../api/users/user';
import courserefundForm from "../../components/course/courserefund-form"
export default {
meta: {
......@@ -49,7 +57,8 @@
AuditStatus: -1,
QOrderId: '',
ProtocolNum: '',
IsQueryAll: 1
IsQueryAll: 1,
QCreateBy:"",//业务员
},
pageCount: 0,
dataList: [],
......@@ -70,16 +79,55 @@
Id: 3,
Name: "驳回",
},
{
Id: 4,
Name: "待签字",
},
{
Id: 5,
Name: "待确认",
},
{
Id: 6,
Name: "生效",
},
],
EmployeeList: [], //业务员
AllemployeeList: [],
};
},
created() {
this.getEmployee()
},
mounted() {
this.getList();
},
methods: {
//业务员
getEmployee() {
var qMsg = {
Dept_Id: 0
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = JSON.parse(JSON.stringify(this.EmployeeList));
}
}).catch(() => {
})
},
//筛选业务员
filterFn2(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase()
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
//获取校区列表
getList() {
this.loading = true;
......
<style>
</style>
<template>
<div>报名合同管理</div>
</template>
\ No newline at end of file
<div class="page-body">
<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 @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.OrderId" label="订单id"
@clear="resetSearch" maxlength="30" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.CType" :options="CTypeList" emit-value map-options label="类型" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="StatusOpts"
option-value="Id" option-label="Name" label="状态" emit-value map-options />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ContractNo"
label="合同编号" @clear="resetSearch" maxlength="30" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.StudentName"
label="学生姓名" @clear="resetSearch" maxlength="30" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="EmployeeName"
v-model="msg.QCreateBy" :options="EmployeeList" emit-value map-options label="业务员" use-input
@filter="filterFn2" clearable />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="合同信息" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">合同信息</div>
<q-space />
<div class="page-option"></div>
</template>
<template v-slot:body-cell-CreateByName="props">
<q-td :props="props">
<q-avatar rounded size="sm" v-if="props.row.CreateByPhoto">
<img :src="props.row.CreateByPhoto" />
</q-avatar>
<q-avatar rounded size="sm" color="teal-10" text-color="white" v-if="!props.row.CreateByPhoto">
{{ props.value.substring(0, 1) }}</q-avatar>
{{ props.row.CreateByName }}
</q-td>
</template>
<template v-slot:body-cell-StudentName="props">
<q-td auto-width :props="props">
<span v-if="props.row.Sign" style="color: #67c23a">【已签字】</span>
<span v-else style="color: #e95252">【未签字】</span>
{{ props.row.StudentName }}
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td auto-width :props="props">
<span v-if="props.row.Status == 0" style="color: #e6a23c">草稿</span>
<span v-if="props.row.Status == 1" style="color: #409eff">提交审核</span>
<span v-if="props.row.Status == 2" style="color: #67c23a">审合通过</span>
<span v-if="props.row.Status == 3" style="color: #f56c6c">驳回</span>
<span v-if="props.row.Status == 4" style="color: #e95252">取消</span>
</q-td>
</template>
<template v-slot:body-cell-IsCompanySeal="props">
<q-td auto-width :props="props">
<span v-if="props.row.IsCompanySeal == 0" style="color: #e95252">未盖章</span>
<span v-if="props.row.IsCompanySeal == 1" style="color: #67c23a">已盖章</span>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" @click="goContract(props.row)"
style="font-weight: 400" label="查看" />
</q-td>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
GetEducationContractPageCodeList,
GetMyEducationContractPageList,
SetEducationContractAudit,
GetDownLoadEducationContract,
SetEducationContractCopy,
} from "../../api/sale/contract";
import {
downloadLocalFile
} from "../../api/common/common";
import {
queryEmployee
} from '../../api/users/user';
export default {
meta: {
title: "合同查询",
},
components: {
},
data() {
return {
columns: [{
name: "ContractNo",
label: "合同编号",
align: "left",
field: "ContractNo",
},
{
name: "CTypeName",
label: "类型",
align: "left",
field: "CTypeName",
},
{
name: "StudentName",
label: "学生名称",
field: "StudentName",
align: "left",
},
{
name: "CourseName",
label: "课程名称",
align: "left",
field: "CourseName",
},
{
name: "CreateByName",
label: "创建人",
align: "left",
field: "CreateByName",
},
{
name: "CreateTime",
label: "创建时间",
align: "left",
field: "CreateTime",
},
{
name: "SchoolStatusStr",
label: "学管部审核状态",
align: "left",
field: "SchoolStatusStr",
},
{
name: "AdminStatusStr",
label: "行政审核状态",
align: "left",
field: "AdminStatusStr",
},
{
name: "IsCompanySeal",
label: "是否盖章",
align: "left",
field: "Status",
},
{
name: "optioned",
label: "操作",
field: "RoomId",
},
],
loading: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
OrderId: "", //订单id
CType: 0, //1培训 2留学
Status: -1, //0草稿 1提交审核 2审核通过 3驳回 4取消
ContractNo: "", //合同编号
StudentName: "", //学生姓名
IsQueryAll: 1,
QCreateBy: "",
},
pageCount: 0,
dataList: [],
//类型下拉
CTypeList: [{
Id: 0,
Name: "不限",
},
{
Id: 1,
Name: "培训",
},
{
Id: 2,
Name: "留学",
},
],
//状态下拉
StatusOpts: [{
Id: -1,
Name: "不限",
},
{
Id: 0,
Name: "草稿",
},
{
Id: 1,
Name: "提交审核",
},
{
Id: 2,
Name: "审核通过(行政)",
},
{
Id: 5,
Name: "审核通过(学管)",
},
{
Id: 3,
Name: "驳回",
},
{
Id: 4,
Name: "取消",
},
],
EmployeeList: [], //业务员
AllemployeeList: [],
};
},
created() {
this.getEmployee()
},
mounted() {
if (this.$route.query && this.$route.query.Name) {
//从订单完成统计跳转过来的带的参数
this.msg.ContractNo = decodeURI(this.$route.query.Name);
}
this.getList();
},
methods: {
//业务员
getEmployee() {
var qMsg = {
Dept_Id: 0
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = JSON.parse(JSON.stringify(this.EmployeeList));
}
}).catch(() => {
})
},
//筛选业务员
filterFn2(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase()
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
//获取校区列表
getList() {
this.loading = true;
GetMyEducationContractPageList(this.msg).then((res) => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
});
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
//跳转至编辑
goContract(item) {
let routeUrl = this.$router.resolve({
path: "/contractView",
query: {
ContractId: item.Id,
},
});
window.open(routeUrl.href, "_blank");
},
},
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -36,7 +36,7 @@
label="状态"
/>
</div>
<!-- <div class="col-3">
<div class="col-3">
<q-select
@input="resetSearch"
standout="bg-primary text-white"
......@@ -48,7 +48,7 @@
map-options
label="上架渠道"
/>
</div> -->
</div>
</div>
</div>
<div class="page-content">
......@@ -381,12 +381,12 @@ export default {
align: "left",
format: (val, row) => `${val}课时`,
},
// {
// name: "plat",
// label: "上架渠道",
// field: "plat",
// align: "left",
// },
{
name: "plat",
label: "上架渠道",
field: "plat",
align: "left",
},
{
name: "CreateByName",
label: "创建人",
......
......@@ -171,7 +171,6 @@
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
console.log(this.dataList, "this.dataList ");
}
});
},
......
......@@ -22,7 +22,8 @@
</div>
</div>
</div>
<courserefund-form :loading="loading" :dataList="dataList"></courserefund-form>
<courserefund-form :loading="loading" :dataList="dataList" :authObj="authObj" @success="refreshClassProtocol">
</courserefund-form>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" :input="true"
@input="changePage" />
</div>
......@@ -70,7 +71,23 @@
Id: 3,
Name: "驳回",
},
{
Id: 4,
Name: "待签字",
},
{
Id: 5,
Name: "待确认",
},
{
Id: 6,
Name: "生效",
},
],
authObj: {
isShowCopyLink: true, //显示复制链接
isShowSure: true, //显示确认退课协议按钮
}
};
},
created() {
......@@ -80,6 +97,10 @@
this.getList();
},
methods: {
//刷新页面
refreshClassProtocol() {
this.getList();
},
//获取校区列表
getList() {
this.loading = true;
......@@ -88,7 +109,6 @@
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
console.log(this.dataList ,"this.dataList ");
}
});
},
......
......@@ -15,8 +15,9 @@
line-height: 16px;
border-radius: 4px;
}
.bill_Rearsons{
width:250px;
.bill_Rearsons {
width: 250px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis
......
......@@ -81,7 +81,7 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
// let domainUrl = 'http://192.168.20.24';
let domainUrl = 'http://192.168.20.7:8083';
let domainUrl = 'http://192.168.20.24';
let viewFileUrl = 'http://192.168.20.214:8120';
let mallUrl = "http://192.168.20.17:8014";
// let vtUploadUrl = "http://192.168.20.214:8120";
......
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