Commit 4ce694d2 by 黄森林

增加异常提示,订单导出功能修改

parent bf051d3d
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop/';
//订单
let deleteExcel = (params) => postAction(prefix + "exportExcel/deleteExcel" , params);
let uploadExcel = (params) => downFilePost(prefix + "exportExcel/uploadExcel" , params);
let listExportExcel = (params) => postAction(prefix + "exportExcel/listExportExcel" , params);
export {
deleteExcel,
listExportExcel,
uploadExcel
}
......@@ -3,7 +3,7 @@ const prefix = '/manager/ciop/';
//订单
let orderList = (params) => postAction(prefix + "order/list" , params);
let download = (params) => downFilePost(prefix + "order/download" , params);
let download = (params) => postAction(prefix + "order/download" , params);
//返回订单历史状态
let selectOrderHis = (params) => postAction(prefix +"order/selectOrderHis" , params);
let reviewStudentIdCard = (params) => postAction(prefix +"order/reviewStudentIdCard" , params);
......
......@@ -29,12 +29,12 @@
<new-poster ref="model1"></new-poster>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="createTime" slot-scope="text">
{{ text | dayjs}}
</template>
<template slot="picture" slot-scope="text">
<img style="width: 20%" :src="text" @click="imgClick(text)">
<img style="width: 20%" :src="apis + text" @click="imgClick(text)">
</template>
<template slot="enable" slot-scope="text">
<span v-if="text == 0">不启用</span>
......@@ -56,9 +56,6 @@
</template>
</s-table>
<!----弹框-->
<a-modal :title="add ?'添加大学宽带信息': '编辑大学宽带信息'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
</a-modal>
<a-drawer
title="海报图片"
placement="right"
......@@ -87,6 +84,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
jumpPath:'http://hhrcode.winsun-aly.com/#/hhr/home?id=',
imgInfo:'',
visiblepicture:false,
......@@ -113,6 +111,7 @@
publicNumber:'',
universityId:''
},
apis:'',
columns: [
{dataIndex: 'picture', title: '图片 ', scopedSlots: {customRender: 'picture'},align: 'center'},
{dataIndex: 'createName', width: 100, title: '创建人',align: 'center'},
......@@ -128,6 +127,10 @@
}]
,
rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize,
......@@ -136,6 +139,8 @@
return listPicture(params).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......@@ -161,7 +166,7 @@
this.visiblepicture = false;
},
imgClick(res){
this.imgInfo=res
this.imgInfo=this.apis + res
this.visiblepicture=true
},
uploadPicture(file) {
......@@ -198,6 +203,7 @@
},
addPoster(picture,id){
let url = this.jumpPath+id
picture = this.apis + picture
this.$refs.model1.showModal(picture,url);
},
search() {
......
......@@ -73,14 +73,19 @@ export default {
methods: {
showModal(picture,url) {
this.codeText=url
console.log(this.codeText)
this.getBase64(picture, 'jpeg', (base64) =>{
// 给原生img对象的src属性赋值
this.images=base64;
this.visible = true;
});
this.$nextTick(()=>{
/* this.$nextTick(()=>{
this.newCode()
});
});*/
setTimeout(() =>{
this.newCode()
},200);
},
onClose() {
......
......@@ -29,7 +29,7 @@
</a-form>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="genderoperation" slot-scope="text">
<span v-if="text==1"></span>
<span v-else></span>
......@@ -91,6 +91,7 @@
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this, {name: 'Formtable'}),
queryParam: {
name: '',
......@@ -140,6 +141,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="文件名:">
<a-input placeholder="文件名" v-model="queryParam.fileName"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="downloadExcel(record.id)">下载</a>
<a-divider type="vertical"/>
<a @click="remove(record.id)">删除</a>
</span>
</template>
<template slot="createTime" slot-scope="text">{{ text | dayjs}}</template>
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {deleteExcel,listExportExcel,uploadExcel} from "@/api/school-center/exportExcel"
import {cloneObject,exportFile} from '@/utils/util';
import moment from "moment";
export default {
name: "exportExcel",
components: {
STable,
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
queryParam: {
fileName :''
},
modelData:{
id:'',
userName:'',
sign:''
},
columns: [
{dataIndex: 'fileName', title: '文件名'},
{dataIndex: 'createName', title: '导出人'},
{dataIndex: 'createTime', title: '导出时间', scopedSlots: {customRender: 'createTime'}},
{
dataIndex: 'operation',
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return listExportExcel(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
moment,
search() {
this.$refs.table.refresh({search: true})
},
remove(exportId) {
deleteExcel({exportId}).then(res => {
if (res.state == 'success') {
this.$message.success(res.data, 5);
}else {
this.$message.success(res.msg, 5);
}
})
},
downloadExcel(exportId) {
let nowdate = moment().format("YYYY-MM-DD");
exportFile(
uploadExcel({exportId}),
"订单清单" + nowdate + ".xls",
);
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -32,6 +32,7 @@
ref="table"
size="small"
class="flex-filling"
:locale="emptyText"
></s-table>
</div>
</template>
......@@ -48,7 +49,7 @@ export default {
},
data() {
return {
//下载完成状态
emptyText: {emptyText: '暂无数据'},
callback: false,
Formtable: this.$form.createForm(this),
queryParam: {
......@@ -193,6 +194,8 @@ export default {
return reportList(Object.assign(params, obj)).then(res => {
let data = {};
if (res.state !== "success") {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: []
};
......
......@@ -36,7 +36,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<!--拦截器-->
<template slot="statusDefault" slot-scope="text">
<span v-if="text=='1'">
......@@ -165,6 +165,7 @@
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
previewVisible: false,
previewImage: '',
fileList: [
......@@ -231,6 +232,7 @@
return findByList(Object.assign(params, obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5);
data = {
data: [],
......
......@@ -78,11 +78,7 @@
<a-col :md="6" :sm="12">
<a-button @click="search()" type="primary">查询</a-button>
<a-button v-show="!callback" @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-button v-show="callback" @click="handleSubmit" style="margin-left: 10px">
导出中
<a-spin style="margin-left: 5px" size="small" />
</a-button>
<a-button @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-dropdown>
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1">
......@@ -110,6 +106,7 @@
ref="table"
size="small"
class="flex-filling"
:locale="emptyText"
>
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">{{ text | dayjs}}</template>
......@@ -411,6 +408,7 @@ export default {
},
data() {
return {
emptyText: {emptyText: '暂无数据'},
reviewStudentImg: "",
reviewStudent: {
id: "",
......@@ -431,7 +429,6 @@ export default {
importTile: "",
modifyvisible: false,
title: ConstantActivity.title,
callback: false,
Formtable: this.$form.createForm(this),
visible: false,
abnormalInfo: [],
......@@ -445,6 +442,7 @@ export default {
pStyle2: {
marginBottom: "24px"
},
apis:'',
queryParam: {
createTimeStart: "",
createTimeEnd: "",
......@@ -490,6 +488,10 @@ export default {
}
],
rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
......@@ -501,6 +503,7 @@ export default {
let data = {};
if (res.state !== "success") {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......@@ -531,7 +534,7 @@ export default {
}
},
reviewStudentIdCard(res) {
this.reviewStudentImg = res.studenCard;
this.reviewStudentImg =this.apis + res.studenCard;
/*this.reviewStudentImg =this.baseUrl+'abstract0'+1+'.jpg'*/
this.reviewStudent.studentCardCheckStatus = res.studentCardCheckStatus;
this.reviewStudent.checkFail = res.checkFail;
......@@ -703,19 +706,19 @@ export default {
this.visible = false;
},
showDrawer(data) {
this.certificatePhoto.push(data.idCardz);
this.certificatePhoto.push(data.idCardf);
this.certificatePhoto.push(data.idCardzs);
this.certificatePhoto.push(data.studenCard);
this.certificatePhoto.push( this.apis+data.idCardz);
this.certificatePhoto.push(this.apis+data.idCardf);
this.certificatePhoto.push(this.apis+data.idCardzs);
this.certificatePhoto.push(this.apis+data.studenCard);
/* this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')*/
if (
this.certificatePhoto[0] == null &&
this.certificatePhoto[1] == null &&
this.certificatePhoto[2] == null &&
this.certificatePhoto[3] == null
this.certificatePhoto[0] == '/api/null' &&
this.certificatePhoto[1] == '/api/null' &&
this.certificatePhoto[2] == '/api/null' &&
this.certificatePhoto[3] == '/api/null'
) {
this.imgShow = false;
} else {
......@@ -771,7 +774,16 @@ export default {
}
},
handleSubmit() {
if (this.callback == true) {
let downqueryParam = this.queryParam;
download(downqueryParam).then(res => {
if (res.state == "success") {
this.search();
this.$message.success(res.data, 5);
} else {
this.$message.error(res.msg, 5);
}
})
/* if (this.callback == true) {
this.$message.warn("正在导出中...", 5);
}
let downqueryParam = this.queryParam;
......@@ -781,11 +793,15 @@ export default {
download(downqueryParam),
"订单清单" + nowdate + ".xls",
this.downloadstatu
);
},
downloadstatu() {
this.callback = false;
);*/
},
/* downloadstatu(exportId) {
let nowdate = moment().format("YYYY-MM-DD");
exportFile(
uploadExcel({exportId}),
"订单清单" + nowdate + ".xls",
);
},*/
selectOrderHis(orderId) {
selectOrderHis({ orderId }).then(res => {
let liu = res.data;
......@@ -807,7 +823,7 @@ export default {
this.search();
this.$message.success(res.data, 5);
} else {
this.$message.error(res.data, 5);
this.$message.error(res.msg, 5);
}
});
}
......
......@@ -53,7 +53,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -221,7 +221,7 @@
},
data(){
return {
//下载完成状态
emptyText: {emptyText: '暂无数据'},
callback:false,
Formtable: this.$form.createForm(this),
visible: false,
......@@ -275,6 +275,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -23,7 +23,7 @@
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/>
......@@ -133,6 +133,7 @@
},
data: function () {
return {
emptyText: {emptyText: '暂无数据'},
header:{
"Authorization":Vue.ls.get(ACCESS_TOKEN)
},
......@@ -193,6 +194,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -25,7 +25,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -107,6 +107,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -161,6 +162,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -27,7 +27,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}}
......@@ -108,6 +108,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -164,6 +165,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
......@@ -22,7 +22,7 @@
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="modifyfunction(record)">修改</a>
......@@ -61,6 +61,7 @@
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
......@@ -94,6 +95,7 @@
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
......
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