This commit is contained in:
77
2024-05-13 00:48:08 +08:00
parent 660fc954eb
commit 6ff0a81561
2 changed files with 27 additions and 26 deletions

View File

@@ -239,6 +239,19 @@ export default {
submitForm () { submitForm () {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if(this.form.id){
updateActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
this.buttonLoading = true; this.buttonLoading = true;
addActivityShop({ addActivityShop({
...this.form, ...this.form,
@@ -251,18 +264,7 @@ export default {
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.buttonLoading = false;
}); });
}else{ }
updateActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
} }
}) })
}, },

View File

@@ -53,8 +53,7 @@
<script> <script>
import { enableStatusList } from '@/constant/statusMap' import { enableStatusList } from '@/constant/statusMap'
import { getTreeAreaCode } from '@/api/xq/areaCode' import { getTreeAreaCode } from '@/api/xq/areaCode'
import { addActivityShop, getActivityShop, updateActivityShop, updateActivityShopUser } from '@/api/xq/activityShop' import { getActivityShop, updateActivityShopUser } from '@/api/xq/activityShop'
import { addBanner, getBanner } from '@/api/xq/banner'
export default { export default {
components: { components: {