|
@@ -212,12 +212,12 @@
|
|
|
:title="title"
|
|
|
:visible.sync="zeroVisible"
|
|
|
@close="onFormClose('maskForm')"
|
|
|
- width="650px"
|
|
|
+ width="675px"
|
|
|
>
|
|
|
<el-form
|
|
|
:model="maskForm"
|
|
|
:rules="maskRules"
|
|
|
- label-width="110px"
|
|
|
+ label-width="90px"
|
|
|
label-position="right"
|
|
|
:inline="true"
|
|
|
ref="maskForm"
|
|
@@ -235,7 +235,7 @@
|
|
|
:disabled="!isNew"
|
|
|
clearable
|
|
|
filterable
|
|
|
- style="width: 180px !important"
|
|
|
+ style="width: 225px !important"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in isNew ? orderType1 : orderType"
|
|
@@ -260,8 +260,8 @@
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请选择是否开启目标金额',
|
|
|
- trigger: 'change',
|
|
|
- },
|
|
|
+ trigger: 'change'
|
|
|
+ }
|
|
|
]"
|
|
|
v-if="maskForm.type == 12"
|
|
|
>
|
|
@@ -291,21 +291,24 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分部" prop="organId">
|
|
|
- <el-select
|
|
|
+ <select-all
|
|
|
v-model.trim="maskForm.organId"
|
|
|
+ placeholder="请选择分部"
|
|
|
:disabled="!isNew"
|
|
|
clearable
|
|
|
@change="onMusicGroupChange"
|
|
|
filterable
|
|
|
- style="width: 180px !important"
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ style="width: 225px !important"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in selects.branchs"
|
|
|
:key="index"
|
|
|
- :value="item.id"
|
|
|
:label="item.name"
|
|
|
+ :value="item.id"
|
|
|
></el-option>
|
|
|
- </el-select>
|
|
|
+ </select-all>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="所属乐团"
|
|
@@ -317,7 +320,7 @@
|
|
|
:disabled="!isNew || !maskForm.organId"
|
|
|
clearable
|
|
|
filterable
|
|
|
- style="width: 180px !important"
|
|
|
+ style="width: 200px !important"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in maskMusicList"
|
|
@@ -368,7 +371,7 @@
|
|
|
<el-form
|
|
|
:model="maskForm1"
|
|
|
:rules="maskRules1"
|
|
|
- label-width="100px"
|
|
|
+ label-width="90px"
|
|
|
label-position="right"
|
|
|
:inline="true"
|
|
|
ref="maskForm1"
|
|
@@ -386,7 +389,7 @@
|
|
|
:disabled="!isNew1"
|
|
|
clearable
|
|
|
filterable
|
|
|
- style="width: 180px !important"
|
|
|
+ style="width: 200px !important"
|
|
|
>
|
|
|
<template v-for="item in isNew1 ? orderType1 : orderType">
|
|
|
<el-option
|
|
@@ -428,7 +431,7 @@
|
|
|
:disabled="!isNew1"
|
|
|
clearable
|
|
|
filterable
|
|
|
- style="width: 180px !important"
|
|
|
+ style="width: 200px !important"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in maskMusicList1"
|
|
@@ -501,7 +504,7 @@ import {
|
|
|
getBasic,
|
|
|
updateOpenFlag,
|
|
|
queryOrganMusicInfos,
|
|
|
- queryUserMusicInfos,
|
|
|
+ queryUserMusicInfos
|
|
|
} from "@/api/zeroManager";
|
|
|
import axios from "axios";
|
|
|
import qs from "qs";
|
|
@@ -531,7 +534,7 @@ export default {
|
|
|
chargeType: null,
|
|
|
type: null,
|
|
|
search: null,
|
|
|
- openFlag: null,
|
|
|
+ openFlag: null
|
|
|
},
|
|
|
tableList: [],
|
|
|
organList: [],
|
|
@@ -548,7 +551,7 @@ export default {
|
|
|
// { label: "乐保服务", value: 10 },
|
|
|
// { label: "网基课活动", value: 13 },
|
|
|
// { label: "云教练购买", value: 15 },
|
|
|
- { label: "其它", value: 11 },
|
|
|
+ { label: "其它", value: 11 }
|
|
|
],
|
|
|
orderType1: [
|
|
|
// { label: "考级", value: 1 },
|
|
@@ -558,13 +561,13 @@ export default {
|
|
|
// { label: '双十一活动', value: 12 },
|
|
|
{ label: "上门费", value: 7 },
|
|
|
{ label: "账户充值", value: 9 },
|
|
|
- { label: "其它", value: 11 },
|
|
|
+ { label: "其它", value: 11 }
|
|
|
// { label: "乐保服务", value: 10 },
|
|
|
// { label: "网基课活动", value: 13 },
|
|
|
// { label: "云教练购买", value: 15 },
|
|
|
],
|
|
|
maskForm: {
|
|
|
- organId: "",
|
|
|
+ organId: [],
|
|
|
type: "",
|
|
|
money: "",
|
|
|
desc: "",
|
|
@@ -573,29 +576,29 @@ export default {
|
|
|
musicGroupId: "",
|
|
|
maxAmount: null,
|
|
|
openMaxTerm: null,
|
|
|
- subMoney: "",
|
|
|
+ subMoney: ""
|
|
|
},
|
|
|
maskMusicList: [],
|
|
|
maskRules: {
|
|
|
organId: [{ required: true, message: "请选择分部", trigger: "change" }],
|
|
|
// musicGroupId: [{ required: true, message: '请选择所属乐团', trigger: 'change' }],
|
|
|
type: [
|
|
|
- { required: true, message: "请选择收费类型", trigger: "change" },
|
|
|
+ { required: true, message: "请选择收费类型", trigger: "change" }
|
|
|
],
|
|
|
money: [
|
|
|
- { required: true, message: "请输入收费金额", trigger: "change" },
|
|
|
+ { required: true, message: "请输入收费金额", trigger: "change" }
|
|
|
],
|
|
|
title: [
|
|
|
- { required: true, message: "请输入标题名称", trigger: "change" },
|
|
|
+ { required: true, message: "请输入标题名称", trigger: "change" }
|
|
|
],
|
|
|
- desc: [{ required: true, message: "请输入收费详情" }],
|
|
|
+ desc: [{ required: true, message: "请输入收费详情" }]
|
|
|
},
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
isNew: false,
|
|
|
title: "新增收费",
|
|
@@ -613,7 +616,7 @@ export default {
|
|
|
code: null,
|
|
|
musicGroupId: null,
|
|
|
studentId: null,
|
|
|
- studentName: null,
|
|
|
+ studentName: null
|
|
|
},
|
|
|
isNew1: false,
|
|
|
maskMusicList1: [],
|
|
@@ -621,19 +624,19 @@ export default {
|
|
|
organId: [{ required: true, message: "请选择分部", trigger: "change" }],
|
|
|
// musicGroupId: [{ required: true, message: '请选择所属乐团', trigger: 'change' }],
|
|
|
type: [
|
|
|
- { required: true, message: "请选择收费类型", trigger: "change" },
|
|
|
+ { required: true, message: "请选择收费类型", trigger: "change" }
|
|
|
],
|
|
|
money: [
|
|
|
- { required: true, message: "请输入收费金额", trigger: "change" },
|
|
|
+ { required: true, message: "请输入收费金额", trigger: "change" }
|
|
|
],
|
|
|
title: [
|
|
|
- { required: true, message: "请输入标题名称", trigger: "change" },
|
|
|
+ { required: true, message: "请输入标题名称", trigger: "change" }
|
|
|
],
|
|
|
studentId: [
|
|
|
- { required: true, message: "请输入学员编号", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入学员编号", trigger: "blur" }
|
|
|
],
|
|
|
- desc: [{ required: true, message: "请输入收费详情" }],
|
|
|
- },
|
|
|
+ desc: [{ required: true, message: "请输入收费详情" }]
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -644,7 +647,7 @@ export default {
|
|
|
// })
|
|
|
this.$store.dispatch("setBranchs");
|
|
|
this.getList();
|
|
|
- this.getAgreement ()
|
|
|
+ this.getAgreement();
|
|
|
},
|
|
|
methods: {
|
|
|
search() {
|
|
@@ -656,7 +659,7 @@ export default {
|
|
|
organId: null,
|
|
|
chargeType: null,
|
|
|
type: null,
|
|
|
- search: null,
|
|
|
+ search: null
|
|
|
};
|
|
|
this.search();
|
|
|
},
|
|
@@ -669,10 +672,10 @@ export default {
|
|
|
search: searchForm.search ? searchForm.search : null,
|
|
|
openFlag: searchForm.openFlag ? searchForm.openFlag * 1 : null,
|
|
|
page: this.pageInfo.page,
|
|
|
- rows: this.pageInfo.limit,
|
|
|
+ rows: this.pageInfo.limit
|
|
|
};
|
|
|
|
|
|
- getZero(params).then((res) => {
|
|
|
+ getZero(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
this.pageInfo.total = res.data.total;
|
|
@@ -683,7 +686,7 @@ export default {
|
|
|
// 关闭弹窗重置验证
|
|
|
if (formName == "maskForm") {
|
|
|
this.maskForm = {
|
|
|
- organId: null,
|
|
|
+ organId: [],
|
|
|
musicGroupId: null,
|
|
|
type: null,
|
|
|
money: null,
|
|
@@ -691,7 +694,7 @@ export default {
|
|
|
openMaxTerm: null,
|
|
|
desc: null,
|
|
|
title: null,
|
|
|
- code: null,
|
|
|
+ code: null
|
|
|
};
|
|
|
} else if (formName == "maskForm1") {
|
|
|
this.maskForm1 = {
|
|
@@ -702,7 +705,7 @@ export default {
|
|
|
title: null,
|
|
|
code: null,
|
|
|
studentId: null,
|
|
|
- studentName: null,
|
|
|
+ studentName: null
|
|
|
};
|
|
|
}
|
|
|
if (this.$refs[formName]) {
|
|
@@ -754,14 +757,16 @@ export default {
|
|
|
maskForm.id = row.id;
|
|
|
maskForm.desc = row.detail;
|
|
|
maskForm.title = row.title;
|
|
|
- maskForm.organId = row.organId;
|
|
|
+ maskForm.organId = row.organId
|
|
|
+ ? row.organId.split(",").map(i => Number(i))
|
|
|
+ : [];
|
|
|
maskForm.money = row.amount;
|
|
|
maskForm.subMoney = row.discountAmount;
|
|
|
maskForm.maxAmount = row.maxAmount;
|
|
|
maskForm.openMaxTerm = row.openMaxTerm;
|
|
|
maskForm.musicGroupId = row.musicGroupId ? row.musicGroupId : null;
|
|
|
if (row.userId) {
|
|
|
- queryUserMusicInfos({ userId: row.userId }).then((studentInfo) => {
|
|
|
+ queryUserMusicInfos({ userId: row.userId }).then(studentInfo => {
|
|
|
if (studentInfo.code == 200) {
|
|
|
this.maskMusicList1 = studentInfo.data;
|
|
|
}
|
|
@@ -778,11 +783,13 @@ export default {
|
|
|
if (!status) {
|
|
|
maskForm.musicGroupId = null; // 重置可能已经选中的乐团
|
|
|
}
|
|
|
- queryOrganMusicInfos({ organId: maskForm.organId }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.maskMusicList = res.data;
|
|
|
+ queryOrganMusicInfos({ organId: maskForm.organId.join(",") }).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.maskMusicList = res.data;
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+ );
|
|
|
},
|
|
|
updateZero() {
|
|
|
let maskForm = this.maskForm;
|
|
@@ -790,15 +797,15 @@ export default {
|
|
|
this.zeroVisible = false;
|
|
|
return;
|
|
|
}
|
|
|
- this.$refs["maskForm"].validate((item) => {
|
|
|
+ this.$refs["maskForm"].validate(item => {
|
|
|
if (item) {
|
|
|
updateZero(
|
|
|
cleanDeep({
|
|
|
id: maskForm.id,
|
|
|
maxAmount: maskForm.maxAmount,
|
|
|
- openMaxTerm: maskForm.openMaxTerm,
|
|
|
+ openMaxTerm: maskForm.openMaxTerm
|
|
|
})
|
|
|
- ).then((res) => {
|
|
|
+ ).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("更新成功");
|
|
|
this.zeroVisible = false;
|
|
@@ -809,24 +816,24 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
addZero() {
|
|
|
- this.$refs["maskForm"].validate((item) => {
|
|
|
+ this.$refs["maskForm"].validate(item => {
|
|
|
if (item) {
|
|
|
let maskForm = this.maskForm;
|
|
|
let obj = {
|
|
|
chargeType: maskForm.type,
|
|
|
detail: maskForm.desc,
|
|
|
title: maskForm.title,
|
|
|
- organId: maskForm.organId,
|
|
|
+ organId: maskForm.organId ? maskForm.organId.join(",") : "",
|
|
|
amount: maskForm.money,
|
|
|
musicGroupId: maskForm.musicGroupId,
|
|
|
- discountAmount: maskForm.subMoney,
|
|
|
+ discountAmount: maskForm.subMoney
|
|
|
};
|
|
|
|
|
|
if (maskForm.type == 12) {
|
|
|
(obj.maxAmount = maskForm.maxAmount),
|
|
|
(obj.openMaxTerm = maskForm.openMaxTerm);
|
|
|
}
|
|
|
- addZero(obj).then((res) => {
|
|
|
+ addZero(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("新增成功");
|
|
|
this.zeroVisible = false;
|
|
@@ -837,7 +844,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
addZero1() {
|
|
|
- this.$refs["maskForm1"].validate((item) => {
|
|
|
+ this.$refs["maskForm1"].validate(item => {
|
|
|
if (item) {
|
|
|
let maskForm1 = this.maskForm1;
|
|
|
if (!maskForm1.studentName) {
|
|
@@ -850,9 +857,9 @@ export default {
|
|
|
title: maskForm1.title,
|
|
|
musicGroupId: this.maskForm1.musicGroupId,
|
|
|
userId: maskForm1.studentId,
|
|
|
- amount: maskForm1.money,
|
|
|
+ amount: maskForm1.money
|
|
|
};
|
|
|
- addZero(obj).then((res) => {
|
|
|
+ addZero(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("新增成功");
|
|
|
this.zeroVisible1 = false;
|
|
@@ -874,11 +881,11 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- await getBasic({ userId: studentId }).then((res) => {
|
|
|
+ await getBasic({ userId: studentId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
if (res.data) {
|
|
|
this.maskForm1.studentName = res.data.name;
|
|
|
- queryUserMusicInfos({ userId: studentId }).then((studentInfo) => {
|
|
|
+ queryUserMusicInfos({ userId: studentId }).then(studentInfo => {
|
|
|
if (studentInfo.code == 200) {
|
|
|
this.maskMusicList1 = studentInfo.data;
|
|
|
}
|
|
@@ -893,10 +900,10 @@ export default {
|
|
|
this.$confirm("是否删除该收费", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- removeZero({ id: row.id }).then((res) => {
|
|
|
+ removeZero({ id: row.id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("删除成功");
|
|
|
this.zeroVisible = false;
|
|
@@ -923,10 +930,10 @@ export default {
|
|
|
this.$confirm(`是否${str}该收费`, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- updateOpenFlag({ sporadicId: row.id, openFlag }).then((res) => {
|
|
|
+ updateOpenFlag({ sporadicId: row.id, openFlag }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success(`${str}成功`);
|
|
|
this.getList();
|
|
@@ -942,29 +949,29 @@ export default {
|
|
|
method: "get",
|
|
|
headers: {
|
|
|
Authorization: getToken(),
|
|
|
- tenantId: getTenantId(),
|
|
|
+ tenantId: getTenantId()
|
|
|
},
|
|
|
params: data,
|
|
|
url,
|
|
|
- responseType: "blob",
|
|
|
+ responseType: "blob"
|
|
|
};
|
|
|
this.$confirm("您确定导出零星缴费列表", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
load.startLoading();
|
|
|
axios(options)
|
|
|
- .then((res) => {
|
|
|
+ .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",
|
|
|
+ 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) => {
|
|
|
+ text.then(res => {
|
|
|
// 判断是否报错
|
|
|
if (res.indexOf("code") != -1) {
|
|
|
let json = JSON.parse(res);
|
|
@@ -997,13 +1004,13 @@ export default {
|
|
|
});
|
|
|
load.endLoading();
|
|
|
})
|
|
|
- .catch((error) => {
|
|
|
+ .catch(error => {
|
|
|
this.$message.error("导出数据失败,请联系管理员");
|
|
|
load.endLoading();
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
zeroVisible(val) {
|
|
@@ -1016,12 +1023,12 @@ export default {
|
|
|
title: "",
|
|
|
maxAmount: null,
|
|
|
openMaxTerm: null,
|
|
|
- code: "",
|
|
|
+ code: ""
|
|
|
};
|
|
|
// this.$refs['maskForm'].resetFields()
|
|
|
// console.log(this.$refs['zeroForm'].resetFields)
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
filters: {
|
|
|
chargeTypeFilter(val) {
|
|
@@ -1038,11 +1045,11 @@ export default {
|
|
|
11: "其它",
|
|
|
12: "双十一活动",
|
|
|
13: "网基课活动",
|
|
|
- 15: "云教练购买",
|
|
|
+ 15: "云教练购买"
|
|
|
};
|
|
|
return template[val];
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -1060,7 +1067,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.el-input {
|
|
|
- width: 180px !important;
|
|
|
+ width: 200px !important;
|
|
|
}
|
|
|
::v-deep .el-select {
|
|
|
width: auto !important;
|