feat(activity): 营销管理添加报单赠送功能

This commit is contained in:
woody 2025-10-16 17:04:59 +08:00
parent 7700825478
commit d3cd5a2855
7 changed files with 87 additions and 36 deletions

View File

@ -75,7 +75,7 @@ export function delDeclarationActivityList(data) {
// 报单赠送记录列表 // 报单赠送记录列表
export function declarationActivityRecordList(params) { export function declarationActivityRecordList(params) {
return request({ return request({
url: '/activity/manage/declarationActivityRecord/list', url: '/activity/manage/acDeclarationRecord/list',
method: 'get', method: 'get',
params params
}) })

View File

@ -426,6 +426,12 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
align="center"
prop="deliveryQuantity"
width="120"
:label="'提货基数'"
/>
<el-table-column <el-table-column
align="center" align="center"
prop="typeShippingMerge" prop="typeShippingMerge"

View File

@ -337,6 +337,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="el-col-20">
<el-form-item :label="'提货基数'" prop="deliveryQuantity">
<el-input-number v-model="form.deliveryQuantity" clearable :min="0" :max="999999999" :controls="false" />
</el-form-item>
</el-col>
<el-col class="el-col-20"> <el-col class="el-col-20">
<el-form-item :label="'运输方式'" prop="ysList"> <el-form-item :label="'运输方式'" prop="ysList">
<el-checkbox-group v-model="form.ysList" @change="changeYsfs"> <el-checkbox-group v-model="form.ysList" @change="changeYsfs">
@ -506,6 +511,9 @@ export default {
], ],
wmsCode: [ wmsCode: [
{ required: true, message: '请输入仓储编号', trigger: 'blur' } { required: true, message: '请输入仓储编号', trigger: 'blur' }
],
deliveryQuantity: [
{ required: true, message: '请输入提货基数', trigger: 'blur' }
] ]
}, },
ggList: [], ggList: [],
@ -530,7 +538,8 @@ export default {
weight: '', weight: '',
shelfLife: '', shelfLife: '',
retailPrice: '', retailPrice: '',
wmsCode: '' wmsCode: '',
deliveryQuantity: 1
}, },
tabActive: 0, tabActive: 0,
agreeList: [ agreeList: [

View File

@ -483,6 +483,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="el-col-20">
<el-form-item :label="'提货基数'" prop="deliveryQuantity">
<el-input-number v-model="form.deliveryQuantity" clearable :min="0" :max="999999999" :controls="false" />
</el-form-item>
</el-col>
<el-col class="el-col-20"> <el-col class="el-col-20">
<el-form-item <el-form-item
:label="'运输方式'" :label="'运输方式'"
@ -669,6 +674,9 @@ export default {
], ],
wmsCode: [ wmsCode: [
{ required: true, message: '请输入仓储编号', trigger: 'blur' } { required: true, message: '请输入仓储编号', trigger: 'blur' }
],
deliveryQuantity: [
{ required: true, message: '请输入提货基数', trigger: 'blur' }
] ]
}, },
ggList: [], ggList: [],
@ -731,7 +739,8 @@ export default {
repurchaseTypeList: [], repurchaseTypeList: [],
productList: [], productList: [],
isType: 0, isType: 0,
supplierList: [] supplierList: [],
deliveryQuantity: ''
} }
}, },
mounted() { mounted() {

View File

@ -118,13 +118,23 @@
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="memberCode" prop="referenceCode"
label="会员编号" label="报单会员编号"
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="memberName" prop="referenceName"
label="会员姓名" label="报单会员姓名"
/>
<el-table-column
align="center"
prop="registerAuthorityVal"
label="注册权限"
/>
<el-table-column
align="center"
prop="specifyLevelVal"
label="指定等级"
/> />
<el-table-column <el-table-column
align="center" align="center"
@ -133,33 +143,40 @@
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="originalLevelVal" prop="orderCode"
label="原等级" label="订单编号"
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="upgradeLevelVal" prop="acDeclarationProductParamList"
label="新等级" label="产品信息"
/> min-width="400"
<!-- <el-table-column >
<template slot-scope="scope">
<div v-if="scope.row.acDeclarationProductParamList && scope.row.acDeclarationProductParamList.length > 0">
<div v-for="item in scope.row.acDeclarationProductParamList" :key="item.pkId">
{{ item.productName }}({{ item.specsName }}) x{{ item.quantity }}
</div>
</div>
<div v-else>
-
</div>
</template>
</el-table-column>
<el-table-column
align="center" align="center"
prop="actStartDate" prop="memberCode"
:label="'开始日期'" label="会员编号"
/> />
<el-table-column <el-table-column
align="center" align="center"
prop="actEndDate" prop="memberName"
:label="'结束日期'" label="会员名称"
/> --> />
<!-- <el-table-column
align="center"
prop="status"
:label="'活动状态'"
/> -->
<el-table-column <el-table-column
align="center" align="center"
prop="creationTime" prop="payTime"
:label="'创建日期'" label="支付时间"
/> />
</el-table> </el-table>
@ -213,7 +230,7 @@ export default {
moren: 'declarationActivityRecordList', moren: 'declarationActivityRecordList',
topList: [ topList: [
{ {
name: '加购升级记录', name: '报单赠送记录',
path: 'declarationActivityRecordList' path: 'declarationActivityRecordList'
} }
], ],
@ -246,6 +263,7 @@ export default {
this.actStatus = res.data this.actStatus = res.data
}) })
}, },
changeTime(val) { changeTime(val) {
this.select.startActStartDate = val ? val[0] : '' this.select.startActStartDate = val ? val[0] : ''
this.select.endActStartDate = val ? val[1] : '' this.select.endActStartDate = val ? val[1] : ''
@ -273,7 +291,7 @@ export default {
getDataList() { getDataList() {
this.loading = true this.loading = true
api api
.upgradeRecordList( .declarationActivityRecordList(
Object.assign({}, this.queryParams, this.select, { actType: 31 }) Object.assign({}, this.queryParams, this.select, { actType: 31 })
) )
.then((res) => { .then((res) => {
@ -291,9 +309,9 @@ export default {
type: 'warning' type: 'warning'
}).then((_) => { }).then((_) => {
this.download( this.download(
'activity/manage/addUpgradeRecord/listExport', 'activity/manage/acDeclarationRecord/listExport',
Object.assign({}, { actType: 31 }, this.queryParams, this.select), Object.assign({}, { actType: 31 }, this.queryParams, this.select),
`${'加购升级记录'}${new Date().getTime()}.xlsx` `${'报单赠送记录'}${new Date().getTime()}.xlsx`
) )
}) })
}, },

View File

@ -110,6 +110,7 @@
v-model="stem.specsName" v-model="stem.specsName"
disabled disabled
/> />
</div> </div>
<div class="tableFlex_i"> <div class="tableFlex_i">
<el-input v-model="stem.quantity" /> <el-input v-model="stem.quantity" />
@ -350,15 +351,18 @@ export default {
mounted() { mounted() {
this.getgradeRanglist() this.getgradeRanglist()
this.getMemberAuthEnum() this.getMemberAuthEnum()
this.init() this.initData()
}, },
methods: { methods: {
isLocals, isLocals,
init() { initData(allData) {
this.allData.push({ this.allData.push({
acDeclarationConfigParam: [] acDeclarationConfigParam: []
}) })
}, },
setAllData(allData) {
this.$set(this.allData[0], 'acDeclarationConfigParam', JSON.parse(JSON.stringify(allData || [])))
},
getgradeRanglist() { getgradeRanglist() {
getgradeRanglist().then((res) => { getgradeRanglist().then((res) => {
if (res.code === 200) { if (res.code === 200) {

View File

@ -96,7 +96,7 @@
<div v-show="controlType != 4" class="footer"> <div v-show="controlType != 4" class="footer">
<el-button size="small" class="cancelBtn" @click="$router.back()"> <el-button size="small" class="cancelBtn" @click="$router.back()">
{{ '取消' }}</el-button> {{ '取消' }}</el-button>
<el-button size="small" class="sureBtn" @click="submit('ruleForm')"> <el-button size="small" class="sureBtn" :loading="loading" @click="submit('ruleForm')">
{{ '确认' }}</el-button> {{ '确认' }}</el-button>
</div> </div>
<!-- </div> --> <!-- </div> -->
@ -163,7 +163,8 @@ export default {
pkId: '', pkId: '',
repurchaseCouponsShowList: [], repurchaseCouponsShowList: [],
controlType: '', controlType: '',
addData: {} addData: {},
loading: false
} }
}, },
mounted() { mounted() {
@ -218,14 +219,15 @@ export default {
disEndDate disEndDate
]) ])
this.$refs.updateInfo.initData( this.$refs.updateInfo.setAllData(
this.addData.acDeclarationConfigParams || [] this.addData.acDeclarationConfigParams || null
) )
}) })
}, },
// tab // tab
handleLink(id) { handleLink(id) {
this.tabActive = id this.tabActive = id
console.log(this.$refs.updateInfo.allData, '....this.$refs.updateInfo')
}, },
// //
@ -251,6 +253,7 @@ export default {
submit() { submit() {
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true
const obj = Object.assign( 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) => { api(obj).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message({ this.$message({
@ -277,6 +280,8 @@ export default {
}) })
this.$router.back() this.$router.back()
} }
}).finally(() => {
this.loading = false
}) })
} }
}) })