|
@@ -1,64 +1,67 @@
|
|
<template>
|
|
<template>
|
|
- <div class='basea-container'>
|
|
|
|
|
|
+ <div class="basea-container">
|
|
<div class="baseTop">
|
|
<div class="baseTop">
|
|
<div class="left">
|
|
<div class="left">
|
|
<teambaseinfo />
|
|
<teambaseinfo />
|
|
<div class="wrap">
|
|
<div class="wrap">
|
|
- <el-button type="text"
|
|
|
|
- v-if="lookType!=='look'"
|
|
|
|
- v-permission="'order/musicalListExport'"
|
|
|
|
- @click="musicalListExport">订货清单导出</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="lookType !== 'look'"
|
|
|
|
+ v-permission="'order/musicalListExport'"
|
|
|
|
+ @click="musicalListExport"
|
|
|
|
+ >订货清单导出</el-button
|
|
|
|
+ >
|
|
|
|
|
|
- <el-button type="text"
|
|
|
|
- v-if="lookType!=='look'"
|
|
|
|
- v-permission="'order/musicalListDetailExport'"
|
|
|
|
- @click="musicalListDetailExport">分发清单导出</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ v-if="lookType !== 'look'"
|
|
|
|
+ v-permission="'order/musicalListDetailExport'"
|
|
|
|
+ @click="musicalListDetailExport"
|
|
|
|
+ >分发清单导出</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { getMusicGroup, getMusicGroupProcess } from '@/api/buildTeam'
|
|
|
|
-import teambaseinfo from '@/views/teamBuild/components/teamBaseInfo'
|
|
|
|
-import axios from 'axios'
|
|
|
|
-import qs from 'qs'
|
|
|
|
-import {
|
|
|
|
- getToken, getTenantId
|
|
|
|
-} from '@/utils/auth'
|
|
|
|
-import load from '@/utils/loading'
|
|
|
|
|
|
+import { getMusicGroup, getMusicGroupProcess } from "@/api/buildTeam";
|
|
|
|
+import teambaseinfo from "@/views/teamBuild/components/teamBaseInfo";
|
|
|
|
+import axios from "axios";
|
|
|
|
+import qs from "qs";
|
|
|
|
+import { getToken, getTenantId } from "@/utils/auth";
|
|
|
|
+import load from "@/utils/loading";
|
|
export default {
|
|
export default {
|
|
- components:{teambaseinfo},
|
|
|
|
|
|
+ components: { teambaseinfo },
|
|
name: "tbaseInfo",
|
|
name: "tbaseInfo",
|
|
- data () {
|
|
|
|
|
|
+ data() {
|
|
return {
|
|
return {
|
|
- id: '',
|
|
|
|
|
|
+ id: "",
|
|
topForm: {
|
|
topForm: {
|
|
- num: '',
|
|
|
|
- teacher: '',
|
|
|
|
- section: '',
|
|
|
|
- paymentPattern: '',
|
|
|
|
- paymentValidStartDate: '',
|
|
|
|
- paymentValidEndDate: '',
|
|
|
|
- boss: '',
|
|
|
|
- cooperate: '',
|
|
|
|
- add: '',
|
|
|
|
- type: '',
|
|
|
|
- salary: '',
|
|
|
|
- teamTeacherName:'',
|
|
|
|
- ownershipType:'',
|
|
|
|
- repairUserName:''
|
|
|
|
|
|
+ num: "",
|
|
|
|
+ teacher: "",
|
|
|
|
+ section: "",
|
|
|
|
+ paymentPattern: "",
|
|
|
|
+ paymentValidStartDate: "",
|
|
|
|
+ paymentValidEndDate: "",
|
|
|
|
+ boss: "",
|
|
|
|
+ cooperate: "",
|
|
|
|
+ add: "",
|
|
|
|
+ type: "",
|
|
|
|
+ salary: "",
|
|
|
|
+ teamTeacherName: "",
|
|
|
|
+ ownershipType: "",
|
|
|
|
+ repairUserName: ""
|
|
},
|
|
},
|
|
- name: '',
|
|
|
|
|
|
+ name: "",
|
|
processList: [],
|
|
processList: [],
|
|
- lookType: ''
|
|
|
|
- }
|
|
|
|
|
|
+ lookType: ""
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- created () {
|
|
|
|
|
|
+ created() {
|
|
// this.init()
|
|
// this.init()
|
|
},
|
|
},
|
|
- activated () {
|
|
|
|
|
|
+ activated() {
|
|
// this.init()
|
|
// this.init()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -87,119 +90,154 @@ export default {
|
|
// }
|
|
// }
|
|
// })
|
|
// })
|
|
// },
|
|
// },
|
|
- musicalListExport () { // 报表导出
|
|
|
|
- let url = '/api-web/order/musicalListExport'
|
|
|
|
|
|
+ musicalListExport() {
|
|
|
|
+ // 报表导出
|
|
|
|
+ let url = "/api-web/order/musicalListExport";
|
|
let data = {
|
|
let data = {
|
|
- musicGroupId: this.$route.query.id,
|
|
|
|
- }
|
|
|
|
|
|
+ musicGroupId: this.$route.query.id
|
|
|
|
+ };
|
|
const options = {
|
|
const options = {
|
|
- method: 'POST',
|
|
|
|
|
|
+ method: "POST",
|
|
headers: {
|
|
headers: {
|
|
- 'Authorization': getToken(),
|
|
|
|
|
|
+ Authorization: getToken(),
|
|
tenantId: getTenantId()
|
|
tenantId: getTenantId()
|
|
},
|
|
},
|
|
data: qs.stringify(data),
|
|
data: qs.stringify(data),
|
|
url,
|
|
url,
|
|
- responseType: 'blob'
|
|
|
|
- }
|
|
|
|
- this.$confirm('您确定导出订货清单', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).then(() => {
|
|
|
|
- load.startLoading()
|
|
|
|
- axios(options).then(res => {
|
|
|
|
- let blob = new Blob([res.data], {
|
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
|
- type: 'application/vnd.ms-excel;charset=utf-8'
|
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
- })
|
|
|
|
- let text = (new Response(blob)).text()
|
|
|
|
- text.then(res => {
|
|
|
|
- // 判断是否报错
|
|
|
|
- if (res.indexOf('code') != -1) {
|
|
|
|
- let json = JSON.parse(res)
|
|
|
|
- this.$message.error(json.msg)
|
|
|
|
- } else {
|
|
|
|
- let objectUrl = URL.createObjectURL(blob)
|
|
|
|
- let link = document.createElement("a")
|
|
|
|
- let nowTime = new Date()
|
|
|
|
- let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
|
|
|
|
- nowTime.getHours() +
|
|
|
|
- '' + nowTime.getMinutes()
|
|
|
|
- let fname = this.$route.query.id + '-' + ymd + '订货清单.xls' //下载文件的名字
|
|
|
|
- link.href = objectUrl
|
|
|
|
- link.setAttribute("download", fname)
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- load.endLoading();
|
|
|
|
-
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.$message.error('导出数据失败,请联系管理员');
|
|
|
|
- load.endLoading();
|
|
|
|
|
|
+ responseType: "blob"
|
|
|
|
+ };
|
|
|
|
+ this.$confirm("您确定导出订货清单", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ load.startLoading();
|
|
|
|
+ axios(options)
|
|
|
|
+ .then(res => {
|
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
+ });
|
|
|
|
+ let text = new Response(blob).text();
|
|
|
|
+ text.then(res => {
|
|
|
|
+ // 判断是否报错
|
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
|
+ let json = JSON.parse(res);
|
|
|
|
+ if (json.code == 403) {
|
|
|
|
+ this.$message.error(`登录过期,请重新登录!`);
|
|
|
|
+ this.$store.dispatch("user/resetToken").then(() => {
|
|
|
|
+ location.reload();
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.$message.error(json.msg);
|
|
|
|
+ } else {
|
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
|
+ let link = document.createElement("a");
|
|
|
|
+ let nowTime = new Date();
|
|
|
|
+ let ymd =
|
|
|
|
+ nowTime.getFullYear() +
|
|
|
|
+ "" +
|
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getDate() +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getHours() +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getMinutes();
|
|
|
|
+ let fname = this.$route.query.id + "-" + ymd + "订货清单.xls"; //下载文件的名字
|
|
|
|
+ link.href = objectUrl;
|
|
|
|
+ link.setAttribute("download", fname);
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.click();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ load.endLoading();
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ this.$message.error("导出数据失败,请联系管理员");
|
|
|
|
+ load.endLoading();
|
|
|
|
+ });
|
|
})
|
|
})
|
|
- }).catch(() => { })
|
|
|
|
-
|
|
|
|
|
|
+ .catch(() => {});
|
|
},
|
|
},
|
|
- musicalListDetailExport () { // 报表导出
|
|
|
|
- let url = '/api-web/order/musicalListDetailExport'
|
|
|
|
|
|
+ musicalListDetailExport() {
|
|
|
|
+ // 报表导出
|
|
|
|
+ let url = "/api-web/order/musicalListDetailExport";
|
|
let data = {
|
|
let data = {
|
|
musicGroupId: this.$route.query.id
|
|
musicGroupId: this.$route.query.id
|
|
- }
|
|
|
|
|
|
+ };
|
|
const options = {
|
|
const options = {
|
|
- method: 'POST',
|
|
|
|
|
|
+ method: "POST",
|
|
headers: {
|
|
headers: {
|
|
- 'Authorization': getToken(),
|
|
|
|
|
|
+ Authorization: getToken(),
|
|
tenantId: getTenantId()
|
|
tenantId: getTenantId()
|
|
},
|
|
},
|
|
data: qs.stringify(data),
|
|
data: qs.stringify(data),
|
|
url,
|
|
url,
|
|
- responseType: 'blob'
|
|
|
|
- }
|
|
|
|
- this.$confirm('您确定导出分发清单', '提示', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).then(() => {
|
|
|
|
- load.startLoading()
|
|
|
|
- axios(options).then(res => {
|
|
|
|
- let blob = new Blob([res.data], {
|
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
|
- type: 'application/vnd.ms-excel;charset=utf-8'
|
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
- })
|
|
|
|
- let text = (new Response(blob)).text()
|
|
|
|
- text.then(res => {
|
|
|
|
- // 判断是否报错
|
|
|
|
- if (res.indexOf('code') != -1) {
|
|
|
|
- let json = JSON.parse(res)
|
|
|
|
- this.$message.error(json.msg)
|
|
|
|
- } else {
|
|
|
|
- let objectUrl = URL.createObjectURL(blob)
|
|
|
|
- let link = document.createElement("a")
|
|
|
|
- let nowTime = new Date()
|
|
|
|
- let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
|
|
|
|
- nowTime.getHours() +
|
|
|
|
- '' + nowTime.getMinutes()
|
|
|
|
- let fname = this.$route.query.id + '-' + ymd + '分发清单.xls' //下载文件的名字
|
|
|
|
- link.href = objectUrl
|
|
|
|
- link.setAttribute("download", fname)
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- load.endLoading();
|
|
|
|
-
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.$message.error('导出数据失败,请联系管理员');
|
|
|
|
- load.endLoading();
|
|
|
|
|
|
+ responseType: "blob"
|
|
|
|
+ };
|
|
|
|
+ this.$confirm("您确定导出分发清单", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ load.startLoading();
|
|
|
|
+ axios(options)
|
|
|
|
+ .then(res => {
|
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
|
+ });
|
|
|
|
+ let text = new Response(blob).text();
|
|
|
|
+ text.then(res => {
|
|
|
|
+ // 判断是否报错
|
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
|
+ let json = JSON.parse(res);
|
|
|
|
+ if(json.code == 403) {
|
|
|
|
+ this.$message.error(`登录过期,请重新登录!`)
|
|
|
|
+ this.$store.dispatch('user/resetToken').then(() => {
|
|
|
|
+ location.reload()
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$message.error(json.msg);
|
|
|
|
+ } else {
|
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
|
+ let link = document.createElement("a");
|
|
|
|
+ let nowTime = new Date();
|
|
|
|
+ let ymd =
|
|
|
|
+ nowTime.getFullYear() +
|
|
|
|
+ "" +
|
|
|
|
+ (nowTime.getMonth() + 1) +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getDate() +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getHours() +
|
|
|
|
+ "" +
|
|
|
|
+ nowTime.getMinutes();
|
|
|
|
+ let fname = this.$route.query.id + "-" + ymd + "分发清单.xls"; //下载文件的名字
|
|
|
|
+ link.href = objectUrl;
|
|
|
|
+ link.setAttribute("download", fname);
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.click();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ load.endLoading();
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ this.$message.error("导出数据失败,请联系管理员");
|
|
|
|
+ load.endLoading();
|
|
|
|
+ });
|
|
})
|
|
})
|
|
- }).catch(() => { })
|
|
|
|
|
|
+ .catch(() => {});
|
|
}
|
|
}
|
|
- },
|
|
|
|
-}
|
|
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.basea-container {
|
|
.basea-container {
|
|
@@ -209,7 +247,6 @@ export default {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.baseBottom {
|
|
.baseBottom {
|
|
@@ -252,13 +289,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .form-list{
|
|
|
|
- /deep/ .el-form-item__content{
|
|
|
|
|
|
+ .form-list {
|
|
|
|
+ /deep/ .el-form-item__content {
|
|
width: 220px;
|
|
width: 220px;
|
|
- .el-select{
|
|
|
|
- width: 100%!important;
|
|
|
|
|
|
+ .el-select {
|
|
|
|
+ width: 100% !important;
|
|
}
|
|
}
|
|
- .el-textarea.is-disabled .el-textarea__inner{
|
|
|
|
|
|
+ .el-textarea.is-disabled .el-textarea__inner {
|
|
color: #606266;
|
|
color: #606266;
|
|
}
|
|
}
|
|
}
|
|
}
|