|
@@ -21,7 +21,7 @@
|
|
|
>
|
|
>
|
|
|
<div slot="tips" class="tips">尺寸120x240px</div>
|
|
<div slot="tips" class="tips">尺寸120x240px</div>
|
|
|
</poster-upload> -->
|
|
</poster-upload> -->
|
|
|
- <crop-upload v-model="formData.poster"></crop-upload>
|
|
|
|
|
|
|
+ <single-upload v-model="formData.poster"></single-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="分享图" prop="smallPoster">
|
|
<el-form-item label="分享图" prop="smallPoster">
|
|
|
<multi-upload v-model="formData.smallPoster"></multi-upload>
|
|
<multi-upload v-model="formData.smallPoster"></multi-upload>
|
|
@@ -29,11 +29,11 @@
|
|
|
<el-form-item prop="share" label="文案" style="width: 600px;">
|
|
<el-form-item prop="share" label="文案" style="width: 600px;">
|
|
|
<simple-rich-text v-model="formData.share" class="select-width"></simple-rich-text>
|
|
<simple-rich-text v-model="formData.share" class="select-width"></simple-rich-text>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item>
|
|
|
|
|
|
|
+ <el-form-item>
|
|
|
<el-button @click="onSave" :loading="saving" type="primary" v-if="$route.query.id">保存</el-button>
|
|
<el-button @click="onSave" :loading="saving" type="primary" v-if="$route.query.id">保存</el-button>
|
|
|
<el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button>
|
|
<el-button @click="onDelete" :loading="saving" type="danger" v-if="formData.id">删除 </el-button>
|
|
|
<el-button @click="$router.go(-1)">取消</el-button>
|
|
<el-button @click="$router.go(-1)">取消</el-button>
|
|
|
- </el-form-item> -->
|
|
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -52,51 +52,51 @@ export default {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
this.$message.error(e.error);
|
|
this.$message.error(e.error);
|
|
|
});
|
|
});
|
|
|
- this.$http.get('/stock/byPackageId', { packageId: this.$route.query.id }).then(res => {
|
|
|
|
|
- this.stockList = res;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.$http.get('/stock/byPackageId', { packageId: this.$route.query.id }).then(res => {
|
|
|
|
|
+ // this.stockList = res;
|
|
|
|
|
+ // });
|
|
|
}
|
|
}
|
|
|
- this.$http
|
|
|
|
|
- .post('/attractions/all', { size: 1000, query: { del: false, brand: false } }, { body: 'json' })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.content.length > 0) {
|
|
|
|
|
- res.content.forEach(item => {
|
|
|
|
|
- this.attractionsOptions.push({
|
|
|
|
|
- label: item.name,
|
|
|
|
|
- value: item.id
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- });
|
|
|
|
|
- this.$http
|
|
|
|
|
- .post('/category/getChildren', { id: 731 })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.length > 0) {
|
|
|
|
|
- res.forEach(item => {
|
|
|
|
|
- this.categoryOptions.push({
|
|
|
|
|
- label: item.name,
|
|
|
|
|
- value: item.id
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- });
|
|
|
|
|
- this.$http
|
|
|
|
|
- .post('/coupon/all', { size: 1000, query: { del: false } }, { body: 'json' })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- this.coupons = res.content;
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.$http
|
|
|
|
|
+ // .post('/attractions/all', { size: 1000, query: { del: false, brand: false } }, { body: 'json' })
|
|
|
|
|
+ // .then(res => {
|
|
|
|
|
+ // if (res.content.length > 0) {
|
|
|
|
|
+ // res.content.forEach(item => {
|
|
|
|
|
+ // this.attractionsOptions.push({
|
|
|
|
|
+ // label: item.name,
|
|
|
|
|
+ // value: item.id
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // this.$message.error(e.error);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // this.$http
|
|
|
|
|
+ // .post('/category/getChildren', { id: 731 })
|
|
|
|
|
+ // .then(res => {
|
|
|
|
|
+ // if (res.length > 0) {
|
|
|
|
|
+ // res.forEach(item => {
|
|
|
|
|
+ // this.categoryOptions.push({
|
|
|
|
|
+ // label: item.name,
|
|
|
|
|
+ // value: item.id
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // this.$message.error(e.error);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // this.$http
|
|
|
|
|
+ // .post('/coupon/all', { size: 1000, query: { del: false } }, { body: 'json' })
|
|
|
|
|
+ // .then(res => {
|
|
|
|
|
+ // this.coupons = res.content;
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // console.log(e);
|
|
|
|
|
+ // this.$message.error(e.error);
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -169,22 +169,22 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
onSave() {
|
|
onSave() {
|
|
|
- // this.$refs.form.validate(valid => {
|
|
|
|
|
- // if (valid) {
|
|
|
|
|
- // this.submit();
|
|
|
|
|
- // } else {
|
|
|
|
|
- // return false;
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- Promise.all(this.$refs.subform.map(i => i.validate())).then(() => {
|
|
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- this.submit();
|
|
|
|
|
- } else {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$refs.form.validate(valid => {
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ this.submit();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
+ // Promise.all(this.$refs.subform.map(i => i.validate())).then(() => {
|
|
|
|
|
+ // this.$refs.form.validate(valid => {
|
|
|
|
|
+ // if (valid) {
|
|
|
|
|
+ // this.submit();
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // return false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
let data = { ...this.formData };
|
|
let data = { ...this.formData };
|
|
@@ -196,9 +196,9 @@ export default {
|
|
|
// this.$message.success('成功');
|
|
// this.$message.success('成功');
|
|
|
this.packageId = res.id;
|
|
this.packageId = res.id;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- this.$http.post('/stock/batchSave', {
|
|
|
|
|
- stocks: this.saveOtherJson
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.$http.post('/stock/batchSave', {
|
|
|
|
|
+ // stocks: this.saveOtherJson
|
|
|
|
|
+ // });
|
|
|
this.$message.success('成功');
|
|
this.$message.success('成功');
|
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
|
});
|
|
});
|