|
@@ -153,7 +153,7 @@ import {
|
|
|
api_tempDirectorTrainingCampAdd,
|
|
|
api_tempDirectorTrainingCampModify
|
|
|
} from "../api";
|
|
|
-import { getTimes } from "@/utils";
|
|
|
+import { getTimeFormat } from "@/utils";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
times: [row.applyStartDate, row.applyEndDate],
|
|
|
applyStartDate: row.applyStartDate,
|
|
|
applyEndDate: row.applyEndDate,
|
|
|
- hasBirdPrice: row.hasBirdPrice,
|
|
|
+ hasBirdPrice: row.hasBirdPrice || false,
|
|
|
birdPriceEndDate: row.birdPriceEndDate,
|
|
|
birdPrice: row.birdPrice,
|
|
|
currentPrice: row.currentPrice,
|
|
@@ -217,12 +217,16 @@ export default {
|
|
|
subEditTraining() {
|
|
|
this.$refs.trainingForm.validate(async flag => {
|
|
|
if (flag) {
|
|
|
- const { times, ...more } = this.agentForm;
|
|
|
+ const { times, birdPriceEndDate, ...more } = this.agentForm;
|
|
|
const params = {
|
|
|
...more,
|
|
|
- ...getTimes(this.agentForm.times, ['applyStartDate', 'applyEndDate'])
|
|
|
+ ...getTimeFormat(this.agentForm.times, ['applyStartDate', 'applyEndDate'])
|
|
|
};
|
|
|
- if (this.agentForm.userId) {
|
|
|
+ if(this.agentForm.hasBirdPrice) {
|
|
|
+ params.birdPriceEndDate = dayjs(this.agentForm.birdPriceEndDate).format("YYYY-MM-DD") + " 23:59:59"
|
|
|
+ }
|
|
|
+ console.log(this.agentForm, 'this.agentForm')
|
|
|
+ if (this.agentForm.id) {
|
|
|
// 修改
|
|
|
try {
|
|
|
const res = await api_tempDirectorTrainingCampModify({
|