+
+
-
-
+ prop="memberName"
+ label="会员名称"
+ />
@@ -213,7 +230,7 @@ export default {
moren: 'declarationActivityRecordList',
topList: [
{
- name: '加购升级记录',
+ name: '报单赠送记录',
path: 'declarationActivityRecordList'
}
],
@@ -246,6 +263,7 @@ export default {
this.actStatus = res.data
})
},
+
changeTime(val) {
this.select.startActStartDate = val ? val[0] : ''
this.select.endActStartDate = val ? val[1] : ''
@@ -273,7 +291,7 @@ export default {
getDataList() {
this.loading = true
api
- .upgradeRecordList(
+ .declarationActivityRecordList(
Object.assign({}, this.queryParams, this.select, { actType: 31 })
)
.then((res) => {
@@ -291,9 +309,9 @@ export default {
type: 'warning'
}).then((_) => {
this.download(
- 'activity/manage/addUpgradeRecord/listExport',
+ 'activity/manage/acDeclarationRecord/listExport',
Object.assign({}, { actType: 31 }, this.queryParams, this.select),
- `${'加购升级记录'}${new Date().getTime()}.xlsx`
+ `${'报单赠送记录'}${new Date().getTime()}.xlsx`
)
})
},
diff --git a/src/views/marketing/declarationActivity/update.vue b/src/views/marketing/declarationActivity/update.vue
index efbce92..04483bc 100644
--- a/src/views/marketing/declarationActivity/update.vue
+++ b/src/views/marketing/declarationActivity/update.vue
@@ -110,6 +110,7 @@
v-model="stem.specsName"
disabled
/>
+
@@ -350,15 +351,18 @@ export default {
mounted() {
this.getgradeRanglist()
this.getMemberAuthEnum()
- this.init()
+ this.initData()
},
methods: {
isLocals,
- init() {
+ initData(allData) {
this.allData.push({
acDeclarationConfigParam: []
})
},
+ setAllData(allData) {
+ this.$set(this.allData[0], 'acDeclarationConfigParam', JSON.parse(JSON.stringify(allData || [])))
+ },
getgradeRanglist() {
getgradeRanglist().then((res) => {
if (res.code === 200) {
diff --git a/src/views/marketing/declarationActivity/updateInfo.vue b/src/views/marketing/declarationActivity/updateInfo.vue
index 6501c51..360cef0 100644
--- a/src/views/marketing/declarationActivity/updateInfo.vue
+++ b/src/views/marketing/declarationActivity/updateInfo.vue
@@ -96,7 +96,7 @@
@@ -163,7 +163,8 @@ export default {
pkId: '',
repurchaseCouponsShowList: [],
controlType: '',
- addData: {}
+ addData: {},
+ loading: false
}
},
mounted() {
@@ -218,14 +219,15 @@ export default {
disEndDate
])
- this.$refs.updateInfo.initData(
- this.addData.acDeclarationConfigParams || []
+ this.$refs.updateInfo.setAllData(
+ this.addData.acDeclarationConfigParams || null
)
})
},
// 切换tab
handleLink(id) {
this.tabActive = id
+ console.log(this.$refs.updateInfo.allData, '....this.$refs.updateInfo')
},
// 单选
@@ -251,6 +253,7 @@ export default {
submit() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
+ this.loading = true
const obj = Object.assign(
{},
{
@@ -268,7 +271,7 @@ export default {
}
)
- const api = this.controlType === 1 ? addDeclarationActivityList : updateDeclarationActivityList
+ const api = Number(this.controlType) === 1 ? addDeclarationActivityList : updateDeclarationActivityList
api(obj).then((res) => {
if (res.code === 200) {
this.$message({
@@ -277,6 +280,8 @@ export default {
})
this.$router.back()
}
+ }).finally(() => {
+ this.loading = false
})
}
})