|
@@ -11,10 +11,22 @@
|
|
|
:form="form"
|
|
|
:courseViewType="courseViewType"
|
|
|
:organId="organId"
|
|
|
+ :payschoolListStatus="payschoolListStatus"
|
|
|
+ />
|
|
|
+ <payFeeInfo
|
|
|
+ :form="form"
|
|
|
+ @setAllTotal="setAllTotal"
|
|
|
+ :payschoolListStatus="payschoolListStatus"
|
|
|
+ />
|
|
|
+ <payAddressInfo
|
|
|
+ :form="form"
|
|
|
+ :payschoolListStatus="payschoolListStatus"
|
|
|
+ />
|
|
|
+ <payBackMoney
|
|
|
+ :form="form"
|
|
|
+ :educationList="educationList"
|
|
|
+ :payschoolListStatus="payschoolListStatus"
|
|
|
/>
|
|
|
- <payFeeInfo :form="form" @setAllTotal="setAllTotal" />
|
|
|
- <payAddressInfo :form="form" />
|
|
|
- <payBackMoney :form="form" :educationList="educationList" />
|
|
|
</div>
|
|
|
</el-form>
|
|
|
|
|
@@ -29,7 +41,11 @@
|
|
|
<script>
|
|
|
import { getMusicGroupPaymentCalenderDetail } from "@/api/buildTeam";
|
|
|
import { queryEmployByOrganId } from "@/api/systemManage";
|
|
|
-import { musicGroupcreateCalender } from "../api";
|
|
|
+import {
|
|
|
+ musicGroupcreateCalender,
|
|
|
+ musicGroupresetCalender,
|
|
|
+ musicGroupbatchUpdate
|
|
|
+} from "../api";
|
|
|
import payGoodsInfo from "../goodsModal/payGoodsInfo";
|
|
|
import payFeeInfo from "../goodsModal/payFeeInfo";
|
|
|
import payAddressInfo from "../goodsModal/payAddressInfo";
|
|
@@ -64,6 +80,7 @@ export default {
|
|
|
region: null
|
|
|
},
|
|
|
responsiblePerson: null, // 责任人
|
|
|
+ responsibleMemo: null, // 备注
|
|
|
musicGroupCalenderRefundPeriods: [{ refundDate: "", refundAmount: "" }] // 回款周期
|
|
|
}
|
|
|
};
|
|
@@ -157,6 +174,15 @@ export default {
|
|
|
path: "/business/resetTeaming",
|
|
|
query
|
|
|
});
|
|
|
+ } else if (query.type == "payschoolList") {
|
|
|
+ this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/financialManager/payschoolList",
|
|
|
+ query: {
|
|
|
+ id: query.id,
|
|
|
+ name: query.name
|
|
|
+ }
|
|
|
+ });
|
|
|
} else if (
|
|
|
query.type == "teamDraft" ||
|
|
|
query.type == "feeAudit" ||
|
|
@@ -187,41 +213,83 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- try {
|
|
|
- const res = await musicGroupcreateCalender(obj);
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("创建缴费成功");
|
|
|
- this.goback();
|
|
|
- }
|
|
|
- if (res.code == 207) {
|
|
|
- await this.$confirm(
|
|
|
- res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
|
|
|
- "提示",
|
|
|
- {
|
|
|
- type: "warning"
|
|
|
+ if (this.$route.query.calenderId) {
|
|
|
+ obj.calenderId = this.$route.query.calenderId;
|
|
|
+ try {
|
|
|
+ // 账期修改
|
|
|
+ if (this.$route.query.type == "payschoolList") {
|
|
|
+ const res = await musicGroupbatchUpdate(
|
|
|
+ obj.musicGroupCalenderRefundPeriods
|
|
|
+ );
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("修改账期成功");
|
|
|
+ this.goback();
|
|
|
}
|
|
|
- );
|
|
|
- obj.confirmCreate = true;
|
|
|
- await musicGroupcreateCalender(obj);
|
|
|
- this.$message.success("创建缴费成功");
|
|
|
- this.goback();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 其它修改
|
|
|
+ const res = await musicGroupresetCalender(obj);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("修改缴费成功");
|
|
|
+ this.goback();
|
|
|
+ }
|
|
|
+ if (res.code == 207) {
|
|
|
+ await this.$confirm(
|
|
|
+ res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning"
|
|
|
+ }
|
|
|
+ );
|
|
|
+ obj.confirmCreate = true;
|
|
|
+ await musicGroupresetCalender(obj);
|
|
|
+ this.$message.success("修改缴费成功");
|
|
|
+ this.goback();
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ const res = await musicGroupcreateCalender(obj);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("创建缴费成功");
|
|
|
+ this.goback();
|
|
|
+ }
|
|
|
+ if (res.code == 207) {
|
|
|
+ await this.$confirm(
|
|
|
+ res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning"
|
|
|
+ }
|
|
|
+ );
|
|
|
+ obj.confirmCreate = true;
|
|
|
+ await musicGroupcreateCalender(obj);
|
|
|
+ this.$message.success("创建缴费成功");
|
|
|
+ this.goback();
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
- } catch (e) {
|
|
|
- console.log(e);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
formatData() {
|
|
|
+ const query = this.$route.query;
|
|
|
let calenderFeeJson = this.form.calenderFeeJson;
|
|
|
const musicGroupCalenderRefundPeriods =
|
|
|
this.form.musicGroupCalenderRefundPeriods || [];
|
|
|
musicGroupCalenderRefundPeriods.forEach(period => {
|
|
|
period.responsiblePerson = this.form.responsiblePerson;
|
|
|
+ period.memo = this.form.responsibleMemo;
|
|
|
});
|
|
|
+
|
|
|
return {
|
|
|
payUserType: "SCHOOL",
|
|
|
memo: this.form.memo,
|
|
|
- musicGroupId: this.$route.query.id,
|
|
|
+ musicGroupId:
|
|
|
+ query.type == "payschoolList" ? query.musicGroupId : query.id,
|
|
|
calenderFeeJson: JSON.stringify(calenderFeeJson),
|
|
|
musicGroupCalenderRefundPeriods,
|
|
|
currentTotalAmount: this.form.currentTotalAmount,
|
|
@@ -256,6 +324,9 @@ export default {
|
|
|
computed: {
|
|
|
musicGroup() {
|
|
|
return this.baseInfo?.musicGroup;
|
|
|
+ },
|
|
|
+ payschoolListStatus() {
|
|
|
+ return this.$route.query.type === "payschoolList" ? true : false;
|
|
|
}
|
|
|
}
|
|
|
};
|