Commit f0d0bd2e authored by 罗超's avatar 罗超

2

parent cb0b6f9b
...@@ -5,30 +5,79 @@ ...@@ -5,30 +5,79 @@
<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 @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.OrderId" label="订单id" <q-input
@clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.OrderId"
label="订单id"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select
v-model="msg.CType" :options="CTypeList" emit-value map-options label="类型" /> @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>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="StatusOpts" <q-select
option-value="Id" option-label="Name" label="状态" emit-value map-options /> @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>
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ContractNo" <q-input
label="合同编号" @clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.ContractNo"
label="合同编号"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.StudentName" <q-input
label="学生姓名" @clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.StudentName"
label="学生姓名"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table
separator="none" title="合同信息" :data="dataList" :columns="columns" row-key="name"> :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"> <template v-slot:top="props">
<div class="col-2 q-table__title">合同信息</div> <div class="col-2 q-table__title">合同信息</div>
<q-space /> <q-space />
...@@ -38,49 +87,106 @@ ...@@ -38,49 +87,106 @@
<q-avatar rounded size="sm" v-if="props.row.CreateByPhoto"> <q-avatar rounded size="sm" v-if="props.row.CreateByPhoto">
<img :src="props.row.CreateByPhoto" /> <img :src="props.row.CreateByPhoto" />
</q-avatar> </q-avatar>
<q-avatar rounded size="sm" color="teal-10" text-color="white" v-if="!props.row.CreateByPhoto"> <q-avatar
{{props.value.substring(0,1)}}</q-avatar> rounded
{{props.row.CreateByName}} 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> </q-td>
</template> </template>
<template v-slot:body-cell-StudentName="props"> <template v-slot:body-cell-StudentName="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.Sign" style="color:#67C23A;">【已签字】</span> <span v-if="props.row.Sign" style="color: #67c23a">【已签字】</span>
<span v-else style="color:#e95252;">【未签字】</span> <span v-else style="color: #e95252">【未签字】</span>
{{props.row.StudentName}} {{ props.row.StudentName }}
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.Status==1" style="color:#409EFF;">待审核</span> <span v-if="props.row.Status == 1" style="color: #409eff"
<span v-if="props.row.Status==2" style="color:#67C23A;">审合通过</span> >待审核</span
<span v-if="props.row.Status==3" style="color:#F56C6C;">已驳回</span> >
<span v-if="props.row.Status == 2" style="color: #67c23a"
>审合通过</span
>
<span v-if="props.row.Status == 3" style="color: #f56c6c"
>已驳回</span
>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-IsCompanySeal="props"> <template v-slot:body-cell-IsCompanySeal="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.IsCompanySeal==0" style="color:#e95252;">未盖章</span> <span v-if="props.row.IsCompanySeal == 0" style="color: #e95252"
<span v-if="props.row.IsCompanySeal==1" style="color:#67C23A;">已盖章</span> >未盖章</span
>
<span v-if="props.row.IsCompanySeal == 1" style="color: #67c23a"
>已盖章</span
>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<q-btn flat size="xs" icon="edit" color="accent" v-if="props.row.Status==1" style="font-weight:400" <q-btn
@click="operationContract(props.row,2)" label="审核通过" /> flat
<q-btn flat size="xs" icon="edit" color="accent" v-if="props.row.Status==1" style="font-weight:400" size="xs"
@click="operationContract(props.row,3)" label="驳回" /> icon="edit"
color="accent"
v-if="props.row.Status == 1"
style="font-weight: 400"
@click="operationContract(props.row, 2)"
label="审核通过"
/>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
v-if="props.row.Status == 1"
style="font-weight: 400"
@click="operationContract(props.row, 3)"
label="驳回"
/>
<q-btn flat size="xs" icon="edit" color="accent" <q-btn
v-if="props.row.IsStuSign==1&& props.row.IsCompanySeal==0&&props.row.Status==2" flat
style="font-weight:400" @click="operationContract(props.row,5)" label="盖章" /> size="xs"
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" @click="goContract(props.row)" icon="edit"
style="font-weight:400" label="查看" /> color="accent"
v-if="
props.row.IsStuSign == 1 &&
props.row.IsCompanySeal == 0 &&
props.row.Status == 2
"
style="font-weight: 400"
@click="operationContract(props.row, 5)"
label="盖章"
/>
<q-btn
flat
size="xs"
icon="iconfont icon-View"
color="accent"
@click="goContract(props.row)"
style="font-weight: 400"
label="查看"
/>
</div> </div>
</q-td> </q-td>
</template> </template>
...@@ -89,183 +195,189 @@ ...@@ -89,183 +195,189 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
GetEducationContractPageList, GetEducationContractPageList,
SetEducationContractAudit SetEducationContractAudit,
} from '../../api/sale/contract' } from "../../api/sale/contract";
export default { export default {
meta: { meta: {
title: "合同审核" title: "合同审核",
}, },
components: { components: {},
data() {
}, return {
data() { columns: [
return { {
columns: [{ name: "ContractNo",
name: 'ContractNo', label: "合同编号",
label: '合同编号', align: "left",
align: 'left', field: "ContractNo",
field: 'ContractNo', },
}, {
{ name: "CTypeName",
name: 'CTypeName', label: "类型",
label: '类型', align: "left",
align: 'left', field: "CTypeName",
field: 'CTypeName' },
}, {
{ name: "StudentName",
name: 'StudentName', label: "学生名称",
label: '学生名称', field: "StudentName",
field: 'StudentName', align: "left",
align: 'left' },
}, {
{ name: "CourseName",
name: 'CourseName', label: "课程名称",
label: '课程名称', align: "left",
align: 'left', field: "CourseName",
field: 'CourseName' },
},
{ {
name: 'CreateByName', name: "CreateByName",
label: '创建人', label: "创建人",
align: 'left', align: "left",
field: 'CreateByName' field: "CreateByName",
}, },
{ {
name: 'CreateTime', name: "CreateTime",
label: '创建时间', label: "创建时间",
align: 'left', align: "left",
field: 'CreateTime' field: "CreateTime",
},
{
name: 'Status',
label: '合同状态',
align: 'left',
field: 'Status'
},
{
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: '', //学生姓名
IsAduit: 1
}, },
pageCount: 0, {
dataList: [], name: "Status",
//类型下拉 label: "合同状态",
CTypeList: [{ align: "left",
field: "Status",
},
{
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: "", //学生姓名
IsAduit: 1,
},
pageCount: 0,
dataList: [],
//类型下拉
CTypeList: [
{
Id: 0, Id: 0,
Name: '不限' Name: "不限",
}, { },
{
Id: 1, Id: 1,
Name: '培训' Name: "培训",
}, { },
{
Id: 2, Id: 2,
Name: '留学' Name: "留学",
}], },
//状态下拉 ],
StatusOpts: [{ //状态下拉
StatusOpts: [
{
Id: -1, Id: -1,
Name: '全部' Name: "全部",
}, { },
{
Id: 1, Id: 1,
Name: '待审' Name: "待审",
}, { },
{
Id: 2, Id: 2,
Name: '审核通过' Name: "审核通过",
}, { },
{
Id: 3, Id: 3,
Name: '驳回' Name: "驳回",
}], },
} ],
};
},
created() {},
mounted() {
this.getList();
},
methods: {
//获取校区列表
getList() {
this.loading = true;
GetEducationContractPageList(this.msg).then((res) => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
});
}, },
created() {}, //重新查询
mounted() { resetSearch() {
this.getList() this.msg.pageIndex = 1;
this.getList();
}, },
methods: {
//获取校区列表
getList() {
this.loading = true;
GetEducationContractPageList(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) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//跳转至编辑 //跳转至编辑
goContract(item) { goContract(item) {
// this.$router.push({ // this.$router.push({
// path: 'contractView', // path: 'contractView',
// query: { // query: {
// "Id": item.Id // "Id": item.Id
// } // }
// }) // })
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: "/contractView", path: "/contractView",
query: { query: {
ContractId: item.Id
}
});
window.open(routeUrl.href, '_blank');
},
//合同操作
operationContract(item, type) {
let msg = {
ContractId: item.Id, ContractId: item.Id,
State: type },
});
window.open(routeUrl.href, "_blank");
},
//合同操作
operationContract(item, type) {
let msg = {
ContractId: item.Id,
State: type,
};
SetEducationContractAudit(msg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "修改成功!",
position: "top",
});
this.getList();
} }
SetEducationContractAudit(msg).then(res => { });
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '修改成功!',
position: 'top'
})
this.getList();
}
})
}
}, },
} },
};
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
...@@ -5,89 +5,208 @@ ...@@ -5,89 +5,208 @@
<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 @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.OrderId" label="订单id" <q-input
@clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.OrderId"
label="订单id"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select
v-model="msg.CType" :options="CTypeList" emit-value map-options label="类型" /> @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>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="StatusOpts" <q-select
option-value="Id" option-label="Name" label="状态" emit-value map-options /> @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>
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ContractNo" <q-input
label="合同编号" @clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.ContractNo"
label="合同编号"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.StudentName" <q-input
label="学生姓名" @clear="resetSearch" maxlength="30" /> @change="resetSearch"
clearable
standout="bg-primary text-white"
v-model="msg.StudentName"
label="学生姓名"
@clear="resetSearch"
maxlength="30"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table
separator="none" title="合同信息" :data="dataList" :columns="columns" row-key="name"> :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"> <template v-slot:top="props">
<div class="col-2 q-table__title">合同信息</div> <div class="col-2 q-table__title">合同信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option"></div>
</div>
</template> </template>
<template v-slot:body-cell-CreateByName="props"> <template v-slot:body-cell-CreateByName="props">
<q-td :props="props"> <q-td :props="props">
<q-avatar rounded size="sm" v-if="props.row.CreateByPhoto"> <q-avatar rounded size="sm" v-if="props.row.CreateByPhoto">
<img :src="props.row.CreateByPhoto" /> <img :src="props.row.CreateByPhoto" />
</q-avatar> </q-avatar>
<q-avatar rounded size="sm" color="teal-10" text-color="white" v-if="!props.row.CreateByPhoto"> <q-avatar
{{props.value.substring(0,1)}}</q-avatar> rounded
{{props.row.CreateByName}} 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> </q-td>
</template> </template>
<template v-slot:body-cell-StudentName="props"> <template v-slot:body-cell-StudentName="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.Sign" style="color:#67C23A;">【已签字】</span> <span v-if="props.row.Sign" style="color: #67c23a">【已签字】</span>
<span v-else style="color:#e95252;">【未签字】</span> <span v-else style="color: #e95252">【未签字】</span>
{{props.row.StudentName}} {{ props.row.StudentName }}
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.Status==0" style="color:#E6A23C;">草稿</span> <span v-if="props.row.Status == 0" style="color: #e6a23c"
<span v-if="props.row.Status==1" style="color:#409EFF;">提交审核</span> >草稿</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 == 1" style="color: #409eff"
<span v-if="props.row.Status==4" style="color:#e95252;">取消</span> >提交审核</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> </q-td>
</template> </template>
<template v-slot:body-cell-IsCompanySeal="props"> <template v-slot:body-cell-IsCompanySeal="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span v-if="props.row.IsCompanySeal==0" style="color:#e95252;">未盖章</span> <span v-if="props.row.IsCompanySeal == 0" style="color: #e95252"
<span v-if="props.row.IsCompanySeal==1" style="color:#67C23A;">已盖章</span> >未盖章</span
>
<span v-if="props.row.IsCompanySeal == 1" style="color: #67c23a"
>已盖章</span
>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<q-btn flat size="xs" v-if="props.row.Status==0||props.row.Status==3" icon="edit" color="accent" <q-btn
style="font-weight:400" @click="EditContract(props.row)" label="编辑" /> flat
<el-tooltip content="复制链接发送给客人签字" placement="top" effect="light"> size="xs"
<q-btn flat size="xs" v-if="props.row.Status==2&&(props.row.Sign==''||props.row.Sign==null)" icon="iconfont icon-qianming" color="accent" v-if="props.row.Status == 0 || props.row.Status == 3"
style="font-weight:400" @click="CopyUrl(props.row)" label="获取合同链接" /> 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.Status == 2 &&
(props.row.Sign == '' || props.row.Sign == null)
"
icon="iconfont icon-qianming"
color="accent"
style="font-weight: 400"
@click="CopyUrl(props.row)"
label="获取合同链接"
/>
</el-tooltip> </el-tooltip>
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" @click="goContract(props.row)" <q-btn
style="font-weight:400" label="查看" /> flat
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;" size="xs"
v-if="props.row.Status==0||props.row.Status==2||props.row.Status==3"> icon="iconfont icon-View"
color="accent"
@click="goContract(props.row)"
style="font-weight: 400"
label="查看"
/>
<q-btn-dropdown
flat
size="xs"
color="dark"
label="更多"
style="margin-left: 10px"
v-if="
props.row.Status == 0 ||
props.row.Status == 2 ||
props.row.Status == 3
"
>
<q-list> <q-list>
<q-item clickable v-close-popup v-if="props.row.Status==0||props.row.Status==3" @click="operationContract(props.row,1)"> <q-item
clickable
v-close-popup
v-if="props.row.Status == 0 || props.row.Status == 3"
@click="operationContract(props.row, 1)"
>
<q-item-section> <q-item-section>
<q-item-label>提交审核</q-item-label> <q-item-label>提交审核</q-item-label>
</q-item-section> </q-item-section>
...@@ -97,12 +216,22 @@ ...@@ -97,12 +216,22 @@
<q-item-label>复制合同</q-item-label> <q-item-label>复制合同</q-item-label>
</q-item-section> </q-item-section>
</q-item> --> </q-item> -->
<q-item clickable v-close-popup v-if="props.row.Status==2" @click="downloadContract(props.row)"> <q-item
clickable
v-close-popup
v-if="props.row.Status == 2"
@click="downloadContract(props.row)"
>
<q-item-section> <q-item-section>
<q-item-label>下载</q-item-label> <q-item-label>下载</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup v-if="props.row.Status==0" @click="operationContract(props.row,4)"> <q-item
clickable
v-close-popup
v-if="props.row.Status == 0"
@click="operationContract(props.row, 4)"
>
<q-item-section> <q-item-section>
<q-item-label>取消</q-item-label> <q-item-label>取消</q-item-label>
</q-item-section> </q-item-section>
...@@ -114,263 +243,288 @@ ...@@ -114,263 +243,288 @@
</template> </template>
</q-table> </q-table>
</div> </div>
<eduinfo-form v-if="isShowEduForm" :seting-obj="eduObj" @close="closeEdudia" @success="refreshPage"> <eduinfo-form
v-if="isShowEduForm"
:seting-obj="eduObj"
@close="closeEdudia"
@success="refreshPage"
>
</eduinfo-form> </eduinfo-form>
</div> </div>
</template> </template>
<script> <script>
import { import {
GetEducationContractPageList, GetEducationContractPageCodeList,
SetEducationContractAudit, SetEducationContractAudit,
GetDownLoadEducationContract, GetDownLoadEducationContract,
SetEducationContractCopy SetEducationContractCopy,
} from '../../api/sale/contract' } from "../../api/sale/contract";
import { import { downloadLocalFile } from "../../api/common/common";
downloadLocalFile
} from '../../api/common/common'
import eduinfoForm from '../../components/sale/eduinfo-form'; import eduinfoForm from "../../components/sale/eduinfo-form";
export default { export default {
meta: { meta: {
title: "合同管理" title: "合同管理",
}, },
components: { components: {
eduinfoForm eduinfoForm,
}, },
data() { data() {
return { return {
columns: [{ columns: [
name: 'ContractNo', {
label: '合同编号', name: "ContractNo",
align: 'left', label: "合同编号",
field: 'ContractNo', align: "left",
}, field: "ContractNo",
{ },
name: 'CTypeName', {
label: '类型', name: "CTypeName",
align: 'left', label: "类型",
field: 'CTypeName' align: "left",
}, field: "CTypeName",
{ },
name: 'StudentName', {
label: '学生名称', name: "StudentName",
field: 'StudentName', label: "学生名称",
align: 'left' field: "StudentName",
}, align: "left",
// { },
// name: 'SchoolName', // {
// label: '学校名称', // name: 'SchoolName',
// align: 'left', // label: '学校名称',
// field: 'SchoolName' // align: 'left',
// }, // field: 'SchoolName'
{ // },
name: 'CourseName', {
label: '课程名称', name: "CourseName",
align: 'left', label: "课程名称",
field: 'CourseName' align: "left",
}, field: "CourseName",
{ },
name: 'CreateByName', {
label: '创建人', name: "CreateByName",
align: 'left', label: "创建人",
field: 'CreateByName' align: "left",
}, field: "CreateByName",
{
name: 'CreateTime',
label: '创建时间',
align: 'left',
field: 'CreateTime'
},
{
name: 'Status',
label: '合同状态',
align: 'left',
field: 'Status'
},
{
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: '' //学生姓名
}, },
pageCount: 0, {
dataList: [], name: "CreateTime",
//类型下拉 label: "创建时间",
CTypeList: [{ align: "left",
field: "CreateTime",
},
{
name: "SchoolStatusStr",
label: "学管部审核状态",
align: "left",
field: "SchoolStatusStr",
},
{
name: "AdminStatusStr",
label: "行政审核状态",
align: "left",
field: "AdminStatusStr",
},
// {
// name: 'Status',
// label: '合同状态',
// align: 'left',
// field: 'Status'
// },
{
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: "", //学生姓名
},
pageCount: 0,
dataList: [],
//类型下拉
CTypeList: [
{
Id: 0, Id: 0,
Name: '不限' Name: "不限",
}, { },
{
Id: 1, Id: 1,
Name: '培训' Name: "培训",
}, { },
{
Id: 2, Id: 2,
Name: '留学' Name: "留学",
}], },
//状态下拉 ],
StatusOpts: [{ //状态下拉
StatusOpts: [
{
Id: -1, Id: -1,
Name: '不限' Name: "不限",
}, { },
{
Id: 0, Id: 0,
Name: '草稿' Name: "草稿",
}, { },
{
Id: 1, Id: 1,
Name: '提交审核' Name: "提交审核",
}, { },
{
Id: 2, Id: 2,
Name: '审核通过' Name: "审核通过",
}, { },
{
Id: 3, Id: 3,
Name: '驳回' Name: "驳回",
}, { },
{
Id: 4, Id: 4,
Name: '取消' Name: "取消",
}], },
eduObj: null, ],
isShowEduForm: false eduObj: null,
} isShowEduForm: false,
};
},
created() {},
mounted() {
if (this.$route.query && this.$route.query.Name) {
//从订单完成统计跳转过来的带的参数
this.msg.ContractNo = decodeURI(this.$route.query.Name);
}
this.getList();
},
methods: {
//获取校区列表
getList() {
this.loading = true;
GetEducationContractPageCodeList(this.msg).then((res) => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData.Result;
this.pageCount = res.Data.PageCount;
}
});
}, },
created() {}, //重新查询
mounted() { resetSearch() {
if(this.$route.query && this.$route.query.Name){//从订单完成统计跳转过来的带的参数 this.msg.pageIndex = 1;
this.msg.ContractNo = decodeURI(this.$route.query.Name) this.getList();
}
this.getList()
}, },
methods: {
//获取校区列表
getList() {
this.loading = true;
GetEducationContractPageList(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) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//跳转至编辑 //跳转至编辑
goContract(item) { goContract(item) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: "/contractView", path: "/contractView",
query: { query: {
ContractId: item.Id
}
});
window.open(routeUrl.href, '_blank');
},
//新增修改合同
EditContract(obj) {
if (obj) {
this.eduObj = {
OrderId: obj.OrderId,
GuestId: obj.GuestId,
ContractId: obj.Id
}
} else {
this.eduObj = null
}
this.isShowEduForm = true
},
//关闭弹窗
closeEdudia() {
this.isShowEduForm = false
},
//刷新页面a
refreshPage() {
this.isShowEduForm = false;
this.getList();
},
//取消合同
operationContract(item, type) {
let msg = {
ContractId: item.Id, ContractId: item.Id,
State: type },
});
window.open(routeUrl.href, "_blank");
},
//新增修改合同
EditContract(obj) {
if (obj) {
this.eduObj = {
OrderId: obj.OrderId,
GuestId: obj.GuestId,
ContractId: obj.Id,
};
} else {
this.eduObj = null;
}
this.isShowEduForm = true;
},
//关闭弹窗
closeEdudia() {
this.isShowEduForm = false;
},
//刷新页面a
refreshPage() {
this.isShowEduForm = false;
this.getList();
},
//取消合同
operationContract(item, type) {
let msg = {
ContractId: item.Id,
State: type,
};
SetEducationContractAudit(msg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "修改成功!",
position: "top",
});
this.getList();
} }
SetEducationContractAudit(msg).then(res => { });
if (res.Code == 1) { },
this.$q.notify({ //下载pdf
icon: 'iconfont icon-chenggong', downloadContract(item) {
color: 'accent', let msg = {
timeout: 2000, ContractId: item.Id,
message: '修改成功!', CType: item.CType,
position: 'top' };
}) GetDownLoadEducationContract(msg).then((res) => {
this.getList(); if (res.Code == 1) {
} let sign = item.StudentName + "-" + item.ContractNo;
}) downloadLocalFile(sign, res.Data);
},
//下载pdf
downloadContract(item) {
let msg = {
ContractId: item.Id,
CType: item.CType
} }
GetDownLoadEducationContract(msg).then(res => { });
if (res.Code == 1) { },
let sign = item.StudentName + '-' + item.ContractNo; //复制合同
downloadLocalFile(sign, res.Data); copyContract(item) {
} let msg = {
}) ContractId: item.Id,
}, };
//复制合同 SetEducationContractCopy(msg).then((res) => {
copyContract(item) { if (res.Code == 1) {
let msg = { this.getList();
ContractId: item.Id
} }
SetEducationContractCopy(msg).then(res => { });
if (res.Code == 1) {
this.getList();
}
})
},
//复制URL
CopyUrl(item) {
var oInput = document.createElement('input');
var url = window.location.host;
oInput.value = url + '/#/contractConfirm' + `?ContractId=${item.Id}`;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = 'oInput';
oInput.style.display = 'none';
this.Info("复制成功!");
},
}, },
} //复制URL
CopyUrl(item) {
var oInput = document.createElement("input");
var url = window.location.host;
oInput.value = url + "/#/contractConfirm" + `?ContractId=${item.Id}`;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = "oInput";
oInput.style.display = "none";
this.Info("复制成功!");
},
},
};
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
...@@ -728,7 +728,7 @@ const routes = [{ ...@@ -728,7 +728,7 @@ const routes = [{
{ {
path: "/sale/contractAudit", //销售 合同审核 path: "/sale/contractAudit", //销售 合同审核
component: () => component: () =>
import("pages/sale/contractAudit.vue") import("pages/sale/contractAudit_new.vue")
}, },
{ {
path: "/sale/studentList", //销售 学生名单 path: "/sale/studentList", //销售 学生名单
......
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